Table of Contents

Class SharpDXInterop

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll
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

DataBox

AsStride(ref ResourceRegion)

public static ref ResourceRegion AsStride(this ref ResourceRegion @this)

Parameters

this ResourceRegion

Returns

ResourceRegion

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 GraphicsDevice

The GraphicsDevice in use

dxTexture2D object

The DX11 texture

takeOwnership bool

If false AddRef will be called on the texture, if true will not, effectively taking ownership

isSRgb bool

Set the format to SRgb

Returns

Texture

GetNativeCommandQueue(GraphicsDevice)

Gets the native command queue (DX12 only)

public static object GetNativeCommandQueue(GraphicsDevice device)

Parameters

device GraphicsDevice

The Stride GraphicsDevice

Returns

object

GetNativeDevice(GraphicsDevice)

Gets the native device (DX11/DX12)

public static object GetNativeDevice(GraphicsDevice device)

Parameters

device GraphicsDevice

The Stride GraphicsDevice

Returns

object

GetNativeDeviceContext(GraphicsDevice)

Gets the native device context (DX11)

public static object GetNativeDeviceContext(GraphicsDevice device)

Parameters

device GraphicsDevice

The Stride GraphicsDevice

Returns

object

GetNativeRenderTargetView(Texture)

public static object GetNativeRenderTargetView(Texture texture)

Parameters

texture Texture

Returns

object

GetNativeResource(GraphicsResource)

Gets the DX11 native resource handle

public static object GetNativeResource(GraphicsResource resource)

Parameters

resource GraphicsResource

The Stride GraphicsResourceBase

Returns

object

GetNativeShaderResourceView(GraphicsResource)

public static object GetNativeShaderResourceView(GraphicsResource resource)

Parameters

resource GraphicsResource

Returns

object