Class DX12ExtensionsMethods
Extension methods used to convert values from Evergine to DirectX.
Namespace: Evergine.DirectX12
Assembly: Evergine.DirectX12.dll
Syntax
public static class DX12ExtensionsMethods
Methods
FromDirectX(Format)
Converts Evergine PixelFormat to DirectX Pixel Format.
Declaration
public static PixelFormat FromDirectX(this Format pixelFormat)
Parameters
Type | Name | Description |
---|---|---|
Format | pixelFormat | Evergine pixel format. |
Returns
Type | Description |
---|---|
PixelFormat | DirectX pixel format. |
FromDirectX(SampleDescription)
Converts a DirectX SampleDescription to a TextureSampleCount.
Declaration
public static TextureSampleCount FromDirectX(this SampleDescription sampleDescription)
Parameters
Type | Name | Description |
---|---|---|
SampleDescription | sampleDescription | The SampleDescription to convert. |
Returns
Type | Description |
---|---|
TextureSampleCount | The TextureSampleCount value. |
FromDirectX(ResourceFlags)
Converts from DirectX BindFlags to TextureFlags.
Declaration
public static TextureFlags FromDirectX(this ResourceFlags flags)
Parameters
Type | Name | Description |
---|---|---|
ResourceFlags | flags | The BindFlags value to convert. |
Returns
Type | Description |
---|---|
TextureFlags | The ResourceUsage value. |
ToDepthStencilFormat(PixelFormat)
Converts to DirectX Depth stencil format.
Declaration
public static Format ToDepthStencilFormat(this PixelFormat pixelFormat)
Parameters
Type | Name | Description |
---|---|---|
PixelFormat | pixelFormat | The pixel format. |
Returns
Type | Description |
---|---|
Format | DirectX pixel format for depth stencil. |
ToDirectX(CommandQueueType)
Converts to DirectX CommandListType from CommandQueueType.
Declaration
public static CommandListType ToDirectX(this CommandQueueType queueType)
Parameters
Type | Name | Description |
---|---|---|
CommandQueueType | queueType | The CommandQueueType to convert. |
Returns
Type | Description |
---|---|
CommandListType | The DirectX CommandListType. |
ToDirectX(ComparisonFunction)
Converts to DirectX compare function.
Declaration
public static ComparisonFunction ToDirectX(this ComparisonFunction function)
Parameters
Type | Name | Description |
---|---|---|
ComparisonFunction | function | The value to convert. |
Returns
Type | Description |
---|---|
ComparisonFunction | The native value. |
ToDirectX(ElementFormat)
Converts from VertexElementFormat to DXGI format.
Declaration
public static Format ToDirectX(this ElementFormat format)
Parameters
Type | Name | Description |
---|---|---|
ElementFormat | format | The format to convert. |
Returns
Type | Description |
---|---|
Format | The resulting DXGI format. |
ToDirectX(GraphicsProfile)
Converts from a graphics profile to a DirectX graphics profile.
Declaration
public static DxcShaderModel ToDirectX(this GraphicsProfile profile)
Parameters
Type | Name | Description |
---|---|---|
GraphicsProfile | profile | The profile to convert. |
Returns
Type | Description |
---|---|
DxcShaderModel | The converted profile. |
ToDirectX(IndexFormat)
Converts from index format to DXGI format.
Declaration
public static Format ToDirectX(this IndexFormat format)
Parameters
Type | Name | Description |
---|---|---|
IndexFormat | format | The index format to convert. |
Returns
Type | Description |
---|---|
Format | The resulting DXGI format. |
ToDirectX(PixelFormat)
Converts to DirectX Pixel Format.
Declaration
public static Format ToDirectX(this PixelFormat pixelFormat)
Parameters
Type | Name | Description |
---|---|---|
PixelFormat | pixelFormat | The pixel format. |
Returns
Type | Description |
---|---|
Format | The DirectX pixel format. |
ToDirectX(HitGroupType)
Converts to DirectX HitGroupType.
Declaration
public static HitGroupType ToDirectX(this HitGroupDescription.HitGroupType hitGroupType)
Parameters
Type | Name | Description |
---|---|---|
HitGroupDescription.HitGroupType | hitGroupType | HitGroup type. |
Returns
Type | Description |
---|---|
HitGroupType | DirectX HitGroupType. |
ToDirectX(ResourceType)
Converts to DirectX DescriptorRangeType.
Declaration
public static DescriptorRangeType ToDirectX(this ResourceType resourceType)
Parameters
Type | Name | Description |
---|---|---|
ResourceType | resourceType | The resource type. |
Returns
Type | Description |
---|---|
DescriptorRangeType | DirectX DescriptorRangeType. |
ToDirectX(SamplerBorderColor)
Converts to native sampler border color.
Declaration
public static Color4 ToDirectX(this SamplerBorderColor borderColor)
Parameters
Type | Name | Description |
---|---|---|
SamplerBorderColor | borderColor | The value to convert. |
Returns
Type | Description |
---|---|
Color4 | The native RawColor4. |
ToDirectX(TextureAddressMode)
Converts to DirectX sampler address mode.
Declaration
public static TextureAddressMode ToDirectX(this TextureAddressMode addressMode)
Parameters
Type | Name | Description |
---|---|---|
TextureAddressMode | addressMode | The address mode to convert. |
Returns
Type | Description |
---|---|
TextureAddressMode | The native address mode. |
ToDirectX(TextureFilter, bool)
Converts to native TextureFilter.
Declaration
public static Filter ToDirectX(this TextureFilter filter, bool isComparison)
Parameters
Type | Name | Description |
---|---|---|
TextureFilter | filter | The value to convert. |
bool | isComparison | Indicates if the comparison function is active. |
Returns
Type | Description |
---|---|
Filter | The native value. |
ToDirectX(TextureFlags)
Converts from TextureFlags to DirectX BindFlags.
Declaration
public static ResourceFlags ToDirectX(this TextureFlags flags)
Parameters
Type | Name | Description |
---|---|---|
TextureFlags | flags | The TextureFlags value to convert. |
Returns
Type | Description |
---|---|
ResourceFlags | The ResourceUsage value. |
ToDirectX(TextureSampleCount)
Converts TextureSampleCount to DirectX SampleDescription.
Declaration
public static SampleDescription ToDirectX(this TextureSampleCount sampleCount)
Parameters
Type | Name | Description |
---|---|---|
TextureSampleCount | sampleCount | The TextureSampleCount to convert. |
Returns
Type | Description |
---|---|
SampleDescription | The SampleDescription value. |
ToDirectX(VertexStepFunction)
Converts to the DirectX InputClassification enum.
Declaration
public static InputClassification ToDirectX(this VertexStepFunction stepFunction)
Parameters
Type | Name | Description |
---|---|---|
VertexStepFunction | stepFunction | The value to convert. |
Returns
Type | Description |
---|---|
InputClassification | The native value. |
ToDirectXStage(ShaderStages)
Converts from ShaderStage to DirectX stage.
Declaration
public static DxcShaderStage ToDirectXStage(this ShaderStages stage)
Parameters
Type | Name | Description |
---|---|---|
ShaderStages | stage | The ShaderStage to convert. |
Returns
Type | Description |
---|---|
DxcShaderStage | The resulting string. |
ToDirectXString(ShaderStages)
Converts a ShaderStage to a DirectX string.
Declaration
public static string ToDirectXString(this ShaderStages stage)
Parameters
Type | Name | Description |
---|---|---|
ShaderStages | stage | The ShaderStage to convert. |
Returns
Type | Description |
---|---|
string | The resulting string. |
ToHLSLSemantic(ElementSemanticType)
Converts from VertexSemanticType to HLSL semantic string.
Declaration
public static string ToHLSLSemantic(this ElementSemanticType semantic)
Parameters
Type | Name | Description |
---|---|---|
ElementSemanticType | semantic | The semantic to convert. |
Returns
Type | Description |
---|---|
string | The semantic string. |