Class SharpDXInterop
public static class SharpDXInterop
- Inheritance
-
SharpDXInterop
Methods
AsSharpDX(ref DataBox)
public static ref DataBox AsSharpDX(this ref DataBox @this)
Parameters
this
DataBox
Returns
- DataBox
AsSharpDX(ref ResourceRegion)
public static ref ResourceRegion AsSharpDX(this ref ResourceRegion @this)
Parameters
this
ResourceRegion
Returns
- ResourceRegion
AsStride(ref DataBox)
public static ref DataBox AsStride(this ref DataBox @this)
Parameters
this
DataBox
Returns
AsStride(ref ResourceRegion)
public static ref ResourceRegion AsStride(this ref ResourceRegion @this)
Parameters
this
ResourceRegion
Returns
CreateTextureFromNative(GraphicsDevice, object, bool, bool)
Creates a Texture from a DirectX11 native texture This method internally will call AddReference on the dxTexture2D texture.
public static Texture CreateTextureFromNative(GraphicsDevice device, object dxTexture2D, bool takeOwnership, bool isSRgb = false)
Parameters
device
GraphicsDeviceThe GraphicsDevice in use
dxTexture2D
objectThe DX11 texture
takeOwnership
boolIf false AddRef will be called on the texture, if true will not, effectively taking ownership
isSRgb
boolSet the format to SRgb
Returns
GetNativeCommandQueue(GraphicsDevice)
Gets the native command queue (DX12 only)
public static object GetNativeCommandQueue(GraphicsDevice device)
Parameters
device
GraphicsDeviceThe Stride GraphicsDevice
Returns
GetNativeDevice(GraphicsDevice)
Gets the native device (DX11/DX12)
public static object GetNativeDevice(GraphicsDevice device)
Parameters
device
GraphicsDeviceThe Stride GraphicsDevice
Returns
GetNativeDeviceContext(GraphicsDevice)
Gets the native device context (DX11)
public static object GetNativeDeviceContext(GraphicsDevice device)
Parameters
device
GraphicsDeviceThe Stride GraphicsDevice
Returns
GetNativeRenderTargetView(Texture)
public static object GetNativeRenderTargetView(Texture texture)
Parameters
texture
Texture
Returns
GetNativeResource(GraphicsResource)
Gets the DX11 native resource handle
public static object GetNativeResource(GraphicsResource resource)
Parameters
resource
GraphicsResourceThe Stride GraphicsResourceBase
Returns
GetNativeShaderResourceView(GraphicsResource)
public static object GetNativeShaderResourceView(GraphicsResource resource)
Parameters
resource
GraphicsResource