Class DX12ExtensionsMethods
Extensions methods used to convert valuesfrom Evergineto DirectX.
Inherited Members
Namespace: Evergine.DirectX12
Assembly: Evergine.DirectX12.dll
Syntax
public static class DX12ExtensionsMethods
Methods
FromDirectX(Format)
Convert to Evergine PixelFormat to DirectX Pixel Format.
Declaration
public static PixelFormat FromDirectX(this Format pixelFormat)
Parameters
Type | Name | Description |
---|---|---|
Format | pixelFormat | DirectX pixel format. |
Returns
Type | Description |
---|---|
Pixel |
Evergine pixel format. |
FromDirectX(SampleDescription)
To convert from DirectX SampleDescription to TextureSampleCount.
Declaration
public static TextureSampleCount FromDirectX(this SampleDescription sampleDescription)
Parameters
Type | Name | Description |
---|---|---|
Sample |
sampleDescription | The SampleDescription to convert. |
Returns
Type | Description |
---|---|
Texture |
The TextureSampleCount value. |
FromDirectX(ResourceFlags)
To convert from DirectX BindFlags to TextureFlags.
Declaration
public static TextureFlags FromDirectX(this ResourceFlags flags)
Parameters
Type | Name | Description |
---|---|---|
Resource |
flags | the bindflags value to convert. |
Returns
Type | Description |
---|---|
Texture |
the ResourceUsage value. |
ToDepthStencilFormat(PixelFormat)
Convert to DirectX Depth stencil format.
Declaration
public static Format ToDepthStencilFormat(this PixelFormat pixelFormat)
Parameters
Type | Name | Description |
---|---|---|
Pixel |
pixelFormat | The pixel format. |
Returns
Type | Description |
---|---|
Format | DirectX pixel format for depth stencil. |
ToDirectX(CommandQueueType)
Convert to DirectX CommandListType from CommandQueueType.
Declaration
public static CommandListType ToDirectX(this CommandQueueType queueType)
Parameters
Type | Name | Description |
---|---|---|
Command |
queueType | The commandQueueType to convert. |
Returns
Type | Description |
---|---|
Command |
The DirectX commandListType. |
ToDirectX(ComparisonFunction)
Converts to DirectX compareFunction.
Declaration
public static ComparisonFunction ToDirectX(this ComparisonFunction function)
Parameters
Type | Name | Description |
---|---|---|
Comparison |
function | The value to convert. |
Returns
Type | Description |
---|---|
Comparison |
The native value. |
ToDirectX(ElementFormat)
To convert from VertexElementFormat to DXGI format.
Declaration
public static Format ToDirectX(this ElementFormat format)
Parameters
Type | Name | Description |
---|---|---|
Element |
format | The format to convert. |
Returns
Type | Description |
---|---|
Format | The result DXGI format. |
ToDirectX(GraphicsProfile)
To convert from graphicsProfile to directX graphics profile.
Declaration
public static DxcShaderModel ToDirectX(this GraphicsProfile profile)
Parameters
Type | Name | Description |
---|---|---|
Graphics |
profile | The profile to convert. |
Returns
Type | Description |
---|---|
Dxc |
The profile. |
ToDirectX(IndexFormat)
To convert from indexformat to DXGI format.
Declaration
public static Format ToDirectX(this IndexFormat format)
Parameters
Type | Name | Description |
---|---|---|
Index |
format | The indexformat to convert. |
Returns
Type | Description |
---|---|
Format | The result DXGI format. |
ToDirectX(PixelFormat)
Convert to DirectX Pixel Format.
Declaration
public static Format ToDirectX(this PixelFormat pixelFormat)
Parameters
Type | Name | Description |
---|---|---|
Pixel |
pixelFormat | pixelFormat. |
Returns
Type | Description |
---|---|
Format | DirectX pixel format. |
ToDirectX(HitGroupType)
Convert to DirectX HitGroupType.
Declaration
public static HitGroupType ToDirectX(this HitGroupDescription.HitGroupType hitGroupType)
Parameters
Type | Name | Description |
---|---|---|
Hit |
hitGroupType | HitGroup type. |
Returns
Type | Description |
---|---|
Hit |
DirectX HitGroupType. |
ToDirectX(ResourceType)
Convert to DirectX DescriptorRangeType.
Declaration
public static DescriptorRangeType ToDirectX(this ResourceType resourceType)
Parameters
Type | Name | Description |
---|---|---|
Resource |
resourceType | The resource type. |
Returns
Type | Description |
---|---|
Descriptor |
DirectX DescriptorRangeType. |
ToDirectX(SamplerBorderColor)
Converts to native sampler bordercolor.
Declaration
public static Color4 ToDirectX(this SamplerBorderColor borderColor)
Parameters
Type | Name | Description |
---|---|---|
Sampler |
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 |
---|---|---|
Texture |
addressMode | The address mode to convert. |
Returns
Type | Description |
---|---|
Texture |
The native addressMode. |
ToDirectX(TextureFilter, bool)
Converts to native Texturefilter.
Declaration
public static Filter ToDirectX(this TextureFilter filter, bool isComparison)
Parameters
Type | Name | Description |
---|---|---|
Texture |
filter | The value to convert. |
bool | isComparison | If comparison function is active. |
Returns
Type | Description |
---|---|
Filter | The native value. |
ToDirectX(TextureFlags)
To convert from TextureFlags to DirectX BindFlags.
Declaration
public static ResourceFlags ToDirectX(this TextureFlags flags)
Parameters
Type | Name | Description |
---|---|---|
Texture |
flags | the textureflags value to convert. |
Returns
Type | Description |
---|---|
Resource |
the ResourceUsage value. |
ToDirectX(TextureSampleCount)
To convert from TextureSampleCount to DirectX SampleDescription.
Declaration
public static SampleDescription ToDirectX(this TextureSampleCount sampleCount)
Parameters
Type | Name | Description |
---|---|---|
Texture |
sampleCount | The TextureSampleCount to convert. |
Returns
Type | Description |
---|---|
Sample |
The SampleDescription value. |
ToDirectX(VertexStepFunction)
Converts to DirectX InputClassification enum.
Declaration
public static InputClassification ToDirectX(this VertexStepFunction stepFunction)
Parameters
Type | Name | Description |
---|---|---|
Vertex |
stepFunction | The value to convert. |
Returns
Type | Description |
---|---|
Input |
The native value. |
ToDirectXStage(ShaderStages)
To convert from ShaderStage to DirectX stage.
Declaration
public static DxcShaderStage ToDirectXStage(this ShaderStages stage)
Parameters
Type | Name | Description |
---|---|---|
Shader |
stage | The shaderstage to convert. |
Returns
Type | Description |
---|---|
Dxc |
The result string. |
ToDirectXString(ShaderStages)
To convert from ShaderStage to DirectX string.
Declaration
public static string ToDirectXString(this ShaderStages stage)
Parameters
Type | Name | Description |
---|---|---|
Shader |
stage | The shaderstage to convert. |
Returns
Type | Description |
---|---|
string | The result string. |
ToHLSLSemantic(ElementSemanticType)
To convert from VertexSemanticType to HLSL semantic string.
Declaration
public static string ToHLSLSemantic(this ElementSemanticType semantic)
Parameters
Type | Name | Description |
---|---|---|
Element |
semantic | The semantic to convert. |
Returns
Type | Description |
---|---|
string | The semantic string. |