Class DX11ExtensionsMethods
Extension methods used to convert values from Evergine to DirectX.
Namespace: Evergine.DirectX11
Assembly: Evergine.DirectX11.dll
Syntax
public static class DX11ExtensionsMethods
Methods
FromDirectX(Format)
Converts Evergine PixelFormat to DirectX PixelFormat.
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 from DirectX SampleDescription to 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(BindFlags)
Converts from DirectX BindFlags to TextureFlags.
Declaration
public static TextureFlags FromDirectX(this BindFlags flags)
Parameters
Type | Name | Description |
---|---|---|
BindFlags | flags | The bind flags value to convert. |
Returns
Type | Description |
---|---|
TextureFlags | The ResourceUsage value. |
FromDirectX(CpuAccessFlags)
Converts to ResourceCpuAccess.
Declaration
public static ResourceCpuAccess FromDirectX(this CpuAccessFlags cpuAccess)
Parameters
Type | Name | Description |
---|---|---|
CpuAccessFlags | cpuAccess | The CpuAccessFlags to convert. |
Returns
Type | Description |
---|---|
ResourceCpuAccess | The CpuAccessFlags value. |
FromDirectX(ResourceUsage)
Converts from DirectX ResourceUsage to TextureUsage.
Declaration
public static ResourceUsage FromDirectX(this ResourceUsage usage)
Parameters
Type | Name | Description |
---|---|---|
ResourceUsage | usage | The DirectX ResourceUsage value to convert. |
Returns
Type | Description |
---|---|
ResourceUsage | The ResourceUsage value. |
ToDirectX(BufferFlags)
To convert from buffer flags to DirectX BindFlags.
Declaration
public static BindFlags ToDirectX(this BufferFlags flags)
Parameters
Type | Name | Description |
---|---|---|
BufferFlags | flags | The buffer flags to convert. |
Returns
Type | Description |
---|---|
BindFlags | The DirectX BindFlags. |
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 a VertexElementFormat to a 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 graphicsProfile to a DirectX graphics profile.
Declaration
public static string ToDirectX(this GraphicsProfile profile)
Parameters
Type | Name | Description |
---|---|---|
GraphicsProfile | profile | The profile to convert. |
Returns
Type | Description |
---|---|
string | The profile string. |
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(MapMode, bool)
Converts to DirectX MapMode.
Declaration
public static MapMode ToDirectX(this MapMode mode, bool isDynamic)
Parameters
Type | Name | Description |
---|---|---|
MapMode | mode | The mode to convert. |
bool | isDynamic | Indicates whether the resource is dynamic. |
Returns
Type | Description |
---|---|
MapMode | The DirectX map mode. |
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 | DirectX pixel format. |
ToDirectX(ResourceCpuAccess)
Converts to DirectX CpuAccessFlags.
Declaration
public static CpuAccessFlags ToDirectX(this ResourceCpuAccess cpuAccess)
Parameters
Type | Name | Description |
---|---|---|
ResourceCpuAccess | cpuAccess | The TextureCpuAccess to convert. |
Returns
Type | Description |
---|---|
CpuAccessFlags | The CpuAccessFlags value. |
ToDirectX(ResourceUsage)
Converts from TextureUsage to DirectX ResourceUsage.
Declaration
public static ResourceUsage ToDirectX(this ResourceUsage usage)
Parameters
Type | Name | Description |
---|---|---|
ResourceUsage | usage | The texture usage value to convert. |
Returns
Type | Description |
---|---|
ResourceUsage | The ResourceUsage value. |
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 raw Color4. |
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 texture filter.
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 BindFlags ToDirectX(this TextureFlags flags)
Parameters
Type | Name | Description |
---|---|---|
TextureFlags | flags | The texture usage value to convert. |
Returns
Type | Description |
---|---|
BindFlags | The ResourceUsage value. |
ToDirectX(TextureOptionFlags)
Converts from TextureOptionFlags to DirectX ResourceOptionFlags.
Declaration
public static ResourceOptionFlags ToDirectX(this TextureOptionFlags optionFlags)
Parameters
Type | Name | Description |
---|---|---|
TextureOptionFlags | optionFlags | The textureOptionFlags value to convert. |
Returns
Type | Description |
---|---|
ResourceOptionFlags | The converted ResourceOptionFlags. |
ToDirectX(TextureSampleCount)
Converts from 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. |
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 resultant string. |
ToGraphicProfile(FeatureLevel)
Converts from DirectX feature level to graphics profile.
Declaration
public static GraphicsProfile ToGraphicProfile(this FeatureLevel featureLevel)
Parameters
Type | Name | Description |
---|---|---|
FeatureLevel | featureLevel | The feature level to convert. |
Returns
Type | Description |
---|---|
GraphicsProfile | The graphics profile. |
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. |
ToResourceOptionDirectX(BufferFlags)
Converts from ResourceOptionFlags to DirectX ResourceOptionFlags.
Declaration
public static ResourceOptionFlags ToResourceOptionDirectX(this BufferFlags flags)
Parameters
Type | Name | Description |
---|---|---|
BufferFlags | flags | Buffer flags. |
Returns
Type | Description |
---|---|
ResourceOptionFlags | Resource option flags enum. |