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 | 
|---|---|
| PixelFormat | Evergine pixel format.  | 
      
FromDirectX(SampleDescription)
To convert 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)
To convert 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)
To convert 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)
To convert form 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 bufferflags to DirectX BindFalgs.
Declaration
public static BindFlags ToDirectX(this BufferFlags flags)
  Parameters
| Type | Name | Description | 
|---|---|---|
| BufferFlags | flags | The bufferFlags to convert.  | 
      
Returns
| Type | Description | 
|---|---|
| BindFlags | The DirectX BingFlags.  | 
      
ToDirectX(ComparisonFunction)
Converts to DirectX compareFunction.
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)
To convert 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 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 | 
|---|---|---|
| GraphicsProfile | 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 | 
|---|---|---|
| IndexFormat | 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 | 
|---|---|---|
| MapMode | mode | The mode to convert.  | 
      
| bool | isDynamic | Whether the resource is dynamic.  | 
      
Returns
| Type | Description | 
|---|---|
| MapMode | The directX map mode.  | 
      
ToDirectX(PixelFormat)
Convert to DirectX Pixel Format.
Declaration
public static Format ToDirectX(this PixelFormat pixelFormat)
  Parameters
| Type | Name | Description | 
|---|---|---|
| PixelFormat | 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 | 
|---|---|---|
| ResourceCpuAccess | cpuAccess | the TextureCpuAccess to convert.  | 
      
Returns
| Type | Description | 
|---|---|
| CpuAccessFlags | the CpuAccessFlags value.  | 
      
ToDirectX(ResourceUsage)
To convert 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 bordercolor.
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 addressMode.  | 
      
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 | 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 | 
|---|---|---|
| TextureFlags | flags | the texture usage value to convert.  | 
      
Returns
| Type | Description | 
|---|---|
| BindFlags | the ResourceUsage value.  | 
      
ToDirectX(TextureOptionFlags)
To convert 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)
To convert 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 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)
To convert from ShaderStage to 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 result string.  | 
      
ToGraphicProfile(FeatureLevel)
To convert from directx feaure level to graphicsProfile.
Declaration
public static GraphicsProfile ToGraphicProfile(this FeatureLevel featureLevel)
  Parameters
| Type | Name | Description | 
|---|---|---|
| FeatureLevel | featureLevel | The feature level to convert.  | 
      
Returns
| Type | Description | 
|---|---|
| GraphicsProfile | The graphicsProfile.  | 
      
ToHLSLSemantic(ElementSemanticType)
To convert 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)
To convert 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.  |