SharpDXInterop Class
Namespace: Stride.GraphicsAssembly: Stride.Graphics.dll
public static class SharpDXInterop
Name | Description | |
---|---|---|
Methods | ||
CreateTextureFromNative(GraphicsDevice, Object, Boolean, Boolean) | Creates a Texture from a DirectX11 native texture This method internally will call AddReference on the dxTexture2D texture. |
|
GetNativeCommandQueue(GraphicsDevice) | Gets the native command queue (DX12 only) |
|
GetNativeDevice(GraphicsDevice) | Gets the native device (DX11/DX12) |
|
GetNativeDeviceContext(GraphicsDevice) | Gets the native device context (DX11) |
|
GetNativeRenderTargetView(Texture) | ||
GetNativeResource(GraphicsResource) | Gets the DX11 native resource handle |
|
GetNativeShaderResourceView(GraphicsResource) |
Methods
CreateTextureFromNative(GraphicsDevice, Object, Boolean, Boolean)
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
Type | Name | Description |
---|---|---|
GraphicsDevice | device | The GraphicsDevice in use |
System.Object | dxTexture2D | The DX11 texture |
System.Boolean | takeOwnership | If false AddRef will be called on the texture, if true will not, effectively taking ownership |
System.Boolean | isSRgb | Set the format to SRgb |
Returns
Type | Description |
---|---|
Texture |
GetNativeCommandQueue(GraphicsDevice)
Gets the native command queue (DX12 only)
public static object GetNativeCommandQueue(GraphicsDevice device)
Parameters
Type | Name | Description |
---|---|---|
GraphicsDevice | device | The Stride GraphicsDevice |
Returns
Type | Description |
---|---|
System.Object |
GetNativeDevice(GraphicsDevice)
Gets the native device (DX11/DX12)
public static object GetNativeDevice(GraphicsDevice device)
Parameters
Type | Name | Description |
---|---|---|
GraphicsDevice | device | The Stride GraphicsDevice |
Returns
Type | Description |
---|---|
System.Object |
GetNativeDeviceContext(GraphicsDevice)
Gets the native device context (DX11)
public static object GetNativeDeviceContext(GraphicsDevice device)
Parameters
Type | Name | Description |
---|---|---|
GraphicsDevice | device | The Stride GraphicsDevice |
Returns
Type | Description |
---|---|
System.Object |
GetNativeRenderTargetView(Texture)
public static object GetNativeRenderTargetView(Texture texture)
Parameters
Type | Name | Description |
---|---|---|
Texture | texture |
Returns
Type | Description |
---|---|
System.Object |
GetNativeResource(GraphicsResource)
Gets the DX11 native resource handle
public static object GetNativeResource(GraphicsResource resource)
Parameters
Type | Name | Description |
---|---|---|
GraphicsResource | resource | The Stride GraphicsResourceBase |
Returns
Type | Description |
---|---|
System.Object |
GetNativeShaderResourceView(GraphicsResource)
public static object GetNativeShaderResourceView(GraphicsResource resource)
Parameters
Type | Name | Description |
---|---|---|
GraphicsResource | resource |
Returns
Type | Description |
---|---|
System.Object |