Table of Contents

Class GeometryRenderCore

Namespace
HelixToolkit.SharpDX.Core
Assembly
HelixToolkit.SharpDX.dll
public abstract class GeometryRenderCore : RenderCore, IDisposable, IGUID, IThrowingShadow, IGeometryRenderCore
Inheritance
GeometryRenderCore
Implements
Derived
Inherited Members

Constructors

GeometryRenderCore()

Initializes a new instance of the GeometryRenderCore class.

public GeometryRenderCore()

GeometryRenderCore(RenderType)

Initializes a new instance of the GeometryRenderCore class.

public GeometryRenderCore(RenderType renderType)

Parameters

renderType RenderType

Type of the render.

Properties

GeometryBuffer

public IAttachableBufferModel? GeometryBuffer { get; set; }

Property Value

IAttachableBufferModel

InstanceBuffer

public IElementsBufferModel InstanceBuffer { get; set; }

Property Value

IElementsBufferModel

InvertCullModeState

public RasterizerStateProxy? InvertCullModeState { get; }

Property Value

RasterizerStateProxy

RasterDescription

public RasterizerStateDescription RasterDescription { get; set; }

Property Value

RasterizerStateDescription

RasterState

public RasterizerStateProxy? RasterState { get; }

Property Value

RasterizerStateProxy

Methods

CreateRasterState(RasterizerStateDescription, bool)

protected virtual bool CreateRasterState(RasterizerStateDescription description, bool force)

Parameters

description RasterizerStateDescription
force bool

Returns

bool

DrawIndexed(DeviceContextProxy, IElementsBufferProxy, IElementsBufferModel)

public static void DrawIndexed(DeviceContextProxy context, IElementsBufferProxy indexBuffer, IElementsBufferModel instanceModel)

Parameters

context DeviceContextProxy
indexBuffer IElementsBufferProxy
instanceModel IElementsBufferModel

DrawPoints(DeviceContextProxy, IElementsBufferProxy, IElementsBufferModel)

public static void DrawPoints(DeviceContextProxy context, IElementsBufferProxy vertexBuffer, IElementsBufferModel instanceModel)

Parameters

context DeviceContextProxy
vertexBuffer IElementsBufferProxy
instanceModel IElementsBufferModel

OnAttach(IRenderTechnique?)

protected override bool OnAttach(IRenderTechnique? technique)

Parameters

technique IRenderTechnique

Returns

bool

OnAttachBuffers(DeviceContextProxy, ref int)

Attach vertex buffer routine

protected virtual bool OnAttachBuffers(DeviceContextProxy context, ref int vertStartSlot)

Parameters

context DeviceContextProxy
vertStartSlot int

Returns

bool

OnBindRasterState(DeviceContextProxy, bool)

Set all necessary states and buffers

protected void OnBindRasterState(DeviceContextProxy context, bool isInvertCullMode)

Parameters

context DeviceContextProxy
isInvertCullMode bool

OnDetach()

On detaching, default is to release all resources

protected override void OnDetach()

OnElementChanged(object?, EventArgs)

protected void OnElementChanged(object? sender, EventArgs e)

Parameters

sender object
e EventArgs

OnGeometryBufferChanged(IAttachableBufferModel?)

Called when [geometry buffer changed].

protected virtual void OnGeometryBufferChanged(IAttachableBufferModel? buffer)

Parameters

buffer IAttachableBufferModel

The buffer.

OnInvalidateRendererEvent(object?, EventArgs)

protected void OnInvalidateRendererEvent(object? sender, EventArgs e)

Parameters

sender object
e EventArgs

OnRender(RenderContext, DeviceContextProxy)

Called when [render].

protected abstract void OnRender(RenderContext context, DeviceContextProxy deviceContext)

Parameters

context RenderContext

The context.

deviceContext DeviceContextProxy

The device context.

OnRenderCustom(RenderContext, DeviceContextProxy)

Render function for custom shader pass. Used to do special effects

protected abstract void OnRenderCustom(RenderContext context, DeviceContextProxy deviceContext)

Parameters

context RenderContext
deviceContext DeviceContextProxy

OnRenderDepth(RenderContext, DeviceContextProxy, ShaderPass?)

Called when [render depth].

protected abstract void OnRenderDepth(RenderContext context, DeviceContextProxy deviceContext, ShaderPass? customPass)

Parameters

context RenderContext

The context.

deviceContext DeviceContextProxy

The device context.

customPass ShaderPass

Custom depth pass

OnRenderShadow(RenderContext, DeviceContextProxy)

Called when [render shadow].

protected abstract void OnRenderShadow(RenderContext context, DeviceContextProxy deviceContext)

Parameters

context RenderContext

The context.

deviceContext DeviceContextProxy

OnUpdateCanRenderFlag()

Called when [update can render flag].

protected override bool OnUpdateCanRenderFlag()

Returns

bool

PreRender(RenderContext, DeviceContextProxy)

protected bool PreRender(RenderContext context, DeviceContextProxy deviceContext)

Parameters

context RenderContext
deviceContext DeviceContextProxy

Returns

bool

Render(RenderContext, DeviceContextProxy)

Trigger OnRender function delegate if CanRender()==true

public override sealed void Render(RenderContext context, DeviceContextProxy deviceContext)

Parameters

context RenderContext
deviceContext DeviceContextProxy

RenderCustom(RenderContext, DeviceContextProxy)

Renders the custom pass. Must apply render pass externally. Usually used during PostEffect rendering.

public override sealed void RenderCustom(RenderContext context, DeviceContextProxy deviceContext)

Parameters

context RenderContext

The context.

deviceContext DeviceContextProxy

The device context.

RenderDepth(RenderContext, DeviceContextProxy, ShaderPass?)

Renders the depth pass.

public override sealed void RenderDepth(RenderContext context, DeviceContextProxy deviceContext, ShaderPass? customPass)

Parameters

context RenderContext

The context.

deviceContext DeviceContextProxy

The device context.

customPass ShaderPass

RenderShadow(RenderContext, DeviceContextProxy)

Renders the shadow pass. Used to generate shadow map.

public override sealed void RenderShadow(RenderContext context, DeviceContextProxy deviceContext)

Parameters

context RenderContext

The context.

deviceContext DeviceContextProxy

The device context.