Class DX11ExtensionsMethods
Extensions methods used to convert valuesfrom Evergineto DirectX.
Inherited Members
Namespace: Evergine.DirectX11
Assembly: Evergine.DirectX11.dll
Syntax
public static class DX11ExtensionsMethods
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(BindFlags)
To convert from DirectX BindFlags to TextureFlags.
Declaration
public static TextureFlags FromDirectX(this BindFlags flags)
Parameters
Type | Name | Description |
---|---|---|
Bind |
flags | the bind flags value to convert. |
Returns
Type | Description |
---|---|
Texture |
the ResourceUsage value. |
FromDirectX(CpuAccessFlags)
To convert to ResourceCpuAccess.
Declaration
public static ResourceCpuAccess FromDirectX(this CpuAccessFlags cpuAccess)
Parameters
Type | Name | Description |
---|---|---|
Cpu |
cpuAccess | the CpuAccessFlags to convert. |
Returns
Type | Description |
---|---|
Resource |
the CpuAccessFlags value. |
FromDirectX(ResourceUsage)
To convert form DirectX ResourceUsage to TextureUsage.
Declaration
public static ResourceUsage FromDirectX(this ResourceUsage usage)
Parameters
Type | Name | Description |
---|---|---|
Resource |
usage | The DirectX resourceUsage value to convert. |
Returns
Type | Description |
---|---|
Resource |
The ResourceUsage value. |
ToDirectX(BufferFlags)
To convert from bufferflags to DirectX BindFalgs.
Declaration
public static BindFlags ToDirectX(this BufferFlags flags)
Parameters
Type | Name | Description |
---|---|---|
Buffer |
flags | The bufferFlags to convert. |
Returns
Type | Description |
---|---|
Bind |
The DirectX BingFlags. |
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 string ToDirectX(this GraphicsProfile profile)
Parameters
Type | Name | Description |
---|---|---|
Graphics |
profile | The profile to convert. |
Returns
Type | Description |
---|---|
string | The profile string. |
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(MapMode, bool)
Convert to DirectX MapMode.
Declaration
public static MapMode ToDirectX(this MapMode mode, bool isDynamic)
Parameters
Type | Name | Description |
---|---|---|
Map |
mode | The mode to convert. |
bool | isDynamic | Whether the resource is dynamic. |
Returns
Type | Description |
---|---|
Map |
The directX map mode. |
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(ResourceCpuAccess)
To convert to DirectX CpuAccessFlags.
Declaration
public static CpuAccessFlags ToDirectX(this ResourceCpuAccess cpuAccess)
Parameters
Type | Name | Description |
---|---|---|
Resource |
cpuAccess | the TextureCpuAccess to convert. |
Returns
Type | Description |
---|---|
Cpu |
the CpuAccessFlags value. |
ToDirectX(ResourceUsage)
To convert from TextureUsage to DirectX ResourceUsage.
Declaration
public static ResourceUsage ToDirectX(this ResourceUsage usage)
Parameters
Type | Name | Description |
---|---|---|
Resource |
usage | the texture usage value to convert. |
Returns
Type | Description |
---|---|
Resource |
the ResourceUsage value. |
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 BindFlags ToDirectX(this TextureFlags flags)
Parameters
Type | Name | Description |
---|---|---|
Texture |
flags | the texture usage value to convert. |
Returns
Type | Description |
---|---|
Bind |
the ResourceUsage value. |
ToDirectX(TextureOptionFlags)
To convert from TextureOptionFlags to DirectX ResourceOptionFlags.
Declaration
public static ResourceOptionFlags ToDirectX(this TextureOptionFlags optionFlags)
Parameters
Type | Name | Description |
---|---|---|
Texture |
optionFlags | the textureOptionFlags value to convert. |
Returns
Type | Description |
---|---|
Resource |
The converted ResourceOptionFlags. |
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. |
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. |
ToGraphicProfile(FeatureLevel)
To convert from directx feaure level to graphicsProfile.
Declaration
public static GraphicsProfile ToGraphicProfile(this FeatureLevel featureLevel)
Parameters
Type | Name | Description |
---|---|---|
Feature |
featureLevel | The feature level to convert. |
Returns
Type | Description |
---|---|
Graphics |
The graphicsProfile. |
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. |
ToResourceOptionDirectX(BufferFlags)
To convert from ResourceOptionFlags to DirectX ResourceOptionFlags.
Declaration
public static ResourceOptionFlags ToResourceOptionDirectX(this BufferFlags flags)
Parameters
Type | Name | Description |
---|---|---|
Buffer |
flags | Buffer flags. |
Returns
Type | Description |
---|---|
Resource |
Resource option flags enum. |