DirectX11Context

Description

sealed class Tinman.AddOns.DirectX11.DirectX11Context

Derived from

GraphicsContext abstract

Full source code is included in the Tinman 3D SDK download.

An implementation of the IGraphicsContext interface for DirectX 11.

The returned INativeHandles can be interpreted as follows:

Using Direct3D 11 imposes the following restrictions:

Public / Constructors

For​Device


[OwnerReturn]
public static method ForDevice → (6)

deviceHandle in : IntPtr own

The ID3D11DeviceContext* COM pointer. Upon disposal, Release will be called on the COM pointer.

shaderRepository in : Path

Path to the shader repository (see IGraphicsContextFactory.ShaderRepository).

availableVideoMemory in : int32

[>=0]
See IGraphicsContextFactory.AvailableVideoMemory.

multiSampling in : MultiSampleType

See IGraphicsContextFactory.MultiSampling.

verticalSync in : bool

See IGraphicsContextFactory.VerticalSync.

dedicatedVideoMemory opt : int32 = 0

[>=0]
The amount of dedicated video memory of the adapter of the device, in megabytes. If 0, availableVideoMemory in will be used.

returns → DirectX11Context

The graphics context or null if deviceHandle in is zero.

Creates a new instance of DirectX11Context for the given native handle.

RenderException

If a graphics subsystem error has occurred.

Public / Methods

Create​Render​Target​Shared


[OwnerReturn]
public method CreateRenderTargetShared → (4)

width in : int32

[>0]
Width of render target, in pixels.

height in : int32

[>0]
Height of render target, in pixels.

format in : RenderTargetFormat

The render target format.

textureShared in : IntPtr

The shared texture resource that will be opened with ID3D11Device::OpenSharedResource. If IntPtr.Zero, this method behaves identical to IGraphicsContext.CreateRenderTarget, with default values for the color, depth and stencil parameters.

returns → IRenderTarget

The render target.

Creates a new off-screen render target that uses a shared texture resource.

This method is used by the Tinman.AddOns.WPF component to perform rendering with Direct3D 11 while using the built-in D3DImage class, which is based on Direct3D 9.

RenderException

If a graphics subsystem error has occurred.