Table of Contents

Class EffectContext

Namespace
SharpDX.Direct2D1
Assembly
SharpDX.Direct2D1.dll
[Guid("3d9f916b-27dc-4ad7-b4f1-64945340f563")]
public class EffectContext : ComObject
Inheritance
EffectContext
Derived

Constructors

EffectContext(nint)

public EffectContext(nint nativePtr)

Parameters

nativePtr nint

Properties

Dpi

Gets the DPI.

public RawVector2 Dpi { get; }

Property Value

RawVector2

Methods

CheckFeatureSupport(Feature)

Check if this device is supporting a feature.

public bool CheckFeatureSupport(Feature feature)

Parameters

feature Feature

The feature to check.

Returns

bool

Returns true if this device supports this feature, otherwise false.

CreateTransformNodeFromEffect(Effect)

Wraps an effect graph into a single transform node and then inserted into a transform graph. This allows an effect to aggregate other effects. This will typically be done in order to allow the effect properties to be re-expressed with a different contract, or to allow different components to integrate each-other?s effects.

public TransformNode CreateTransformNodeFromEffect(Effect effect)

Parameters

effect Effect

The effect to be wrapped in a transform node.

Returns

TransformNode

The returned transform node that encapsulates the effect graph.

FindResourceTexture(Guid)

Finds the given resource texture if it has already been created with ID2D1EffectContext::CreateResourceTexture with the same Guid.

public ResourceTexture FindResourceTexture(Guid resourceId)

Parameters

resourceId Guid

No documentation.

Returns

ResourceTexture

No documentation.

FindVertexBuffer(Guid)

This finds the given vertex buffer if it has already been created with ID2D1EffectContext::CreateVertexBuffer with the same Guid.

public VertexBuffer FindVertexBuffer(Guid resourceId)

Parameters

resourceId Guid

No documentation.

Returns

VertexBuffer

No documentation.

GetMaximumSupportedFeatureLevel(FeatureLevel[])

Gets the maximum feature level supported by this instance.

public FeatureLevel GetMaximumSupportedFeatureLevel(FeatureLevel[] featureLevels)

Parameters

featureLevels FeatureLevel[]

An array of feature levels

Returns

FeatureLevel

The maximum feature level selected from the array

IsBufferPrecisionSupported(BufferPrecision)

Indicates whether the buffer precision is supported by the underlying Direct2D device.

public RawBool IsBufferPrecisionSupported(BufferPrecision bufferPrecision)

Parameters

bufferPrecision BufferPrecision

No documentation.

Returns

RawBool

Returns TRUE if the buffer precision is supported. Returns SharpDX.Result.False if the buffer precision is not supported.

IsShaderLoaded(Guid)

This tests to see if the given shader is loaded.

public RawBool IsShaderLoaded(Guid shaderId)

Parameters

shaderId Guid

The unique id that identifies the shader.

Returns

RawBool

Whether the shader is loaded.

LoadComputeShader(Guid, byte[])

Loads a compute shader.

public void LoadComputeShader(Guid shaderId, byte[] shaderBytecode)

Parameters

shaderId Guid

An unique identifier associated with the shader bytecode.

shaderBytecode byte[]

The bytecode of the shader.

LoadPixelShader(Guid, byte[])

Loads a pixel shader.

public void LoadPixelShader(Guid shaderId, byte[] shaderBytecode)

Parameters

shaderId Guid

An unique identifier associated with the shader bytecode.

shaderBytecode byte[]

The bytecode of the shader.

LoadVertexShader(Guid, byte[])

Loads a vertex shader.

public void LoadVertexShader(Guid shaderId, byte[] shaderBytecode)

Parameters

shaderId Guid

An unique identifier associated with the shader bytecode.

shaderBytecode byte[]

The bytecode of the shader.

Operators

explicit operator EffectContext(nint)

public static explicit operator EffectContext(nint nativePtr)

Parameters

nativePtr nint

Returns

EffectContext