Class Utils
- Namespace
- Elegy.RenderBackend
- Assembly
- Elegy.RenderBackend.dll
public static class Utils
- Inheritance
-
Utils
- Inherited Members
-
Methods
public static BlendAttachmentDescription ExtractBlendDescription(PipelineInfo info)
Parameters
info
PipelineInfo
Returns
- BlendAttachmentDescription
public static BlendStateDescription ExtractBlendState(MaterialTemplate materialTemplate)
Parameters
materialTemplate
MaterialTemplate
Returns
- BlendStateDescription
public static DepthStencilStateDescription ExtractDepthStencilState(MaterialTemplate materialTemplate)
Parameters
materialTemplate
MaterialTemplate
Returns
- DepthStencilStateDescription
public static RasterizerStateDescription ExtractRasterizerState(MaterialTemplate materialTemplate)
Parameters
materialTemplate
MaterialTemplate
Returns
- RasterizerStateDescription
public static VertexLayoutDescription[] ExtractVertexLayouts(ShaderVariantEntry variant)
Parameters
variant
ShaderVariantEntry
Returns
- VertexLayoutDescription[]
public static uint GetStrideForVertexFormat(VertexElementFormat format)
Parameters
format
VertexElementFormat
Returns
- uint
GetVertexElementSemantic(string)
public static VertexElementSemantic GetVertexElementSemantic(string name)
Parameters
name
string
Returns
- VertexElementSemantic
GetVertexSemantic(string)
public static VertexSemantic GetVertexSemantic(string name)
Parameters
name
string
Returns
- VertexSemantic
LoadShaderBytes(string)
public static byte[] LoadShaderBytes(string path)
Parameters
path
string
Returns
- byte[]
NearestSize16<T>(int)
public static uint NearestSize16<T>(int numElements) where T : unmanaged
Parameters
numElements
int
Returns
- uint
Type Parameters
T
PathToShaderVariant(ShaderTemplate, ShaderVariantEntry)
public static string PathToShaderVariant(ShaderTemplate template, ShaderVariantEntry entry)
Parameters
template
ShaderTemplate
entry
ShaderVariantEntry
Returns
- string
ShaderTypeToGlslString(ShaderDataType)
public static string ShaderTypeToGlslString(ShaderDataType type)
Parameters
type
ShaderDataType
Returns
- string
public static VertexElementFormat ShaderTypeToVertexElementFormat(string name, ShaderDataType type)
Parameters
name
string
type
ShaderDataType
Returns
- VertexElementFormat
StrideIfStructured<T>(BufferUsage)
public static uint StrideIfStructured<T>(BufferUsage usage) where T : unmanaged
Parameters
usage
BufferUsage
Returns
- uint
Type Parameters
T
StrideOf<T>()
public static int StrideOf<T>() where T : unmanaged
Returns
- int
Type Parameters
T
TypeToResourceKind(ShaderDataType)
public static ResourceKind TypeToResourceKind(ShaderDataType type)
Parameters
type
ShaderDataType
Returns
- ResourceKind