Table of Contents

Class ConstantBufferComponent

Namespace
HelixToolkit.SharpDX.Core.Components
Assembly
HelixToolkit.SharpDX.dll
public sealed class ConstantBufferComponent : CoreComponent, IDisposable
Inheritance
ConstantBufferComponent
Implements
Inherited Members

Constructors

ConstantBufferComponent(ConstantBufferDescription)

Initializes a new instance of the ConstantBufferComponent class.

public ConstantBufferComponent(ConstantBufferDescription desc)

Parameters

desc ConstantBufferDescription

The desc.

ConstantBufferComponent(string, int)

Initializes a new instance of the ConstantBufferComponent class.

public ConstantBufferComponent(string name, int structSize)

Parameters

name string

The name.

structSize int

Size of the structure.

Properties

ModelConstBuffer

Gets or sets the model constant buffer.

public ConstantBufferProxy? ModelConstBuffer { get; }

Property Value

ConstantBufferProxy

The model constant buffer.

Methods

OnAttach(IRenderTechnique?)

protected override void OnAttach(IRenderTechnique? technique)

Parameters

technique IRenderTechnique

OnDetach()

protected override void OnDetach()

ReadValueByName<T>(string, out T)

public bool ReadValueByName<T>(string name, out T value) where T : unmanaged

Parameters

name string
value T

Returns

bool

Type Parameters

T

ReadValue<T>(int, out T)

public bool ReadValue<T>(int offset, out T value) where T : unmanaged

Parameters

offset int
value T

Returns

bool

Type Parameters

T

Upload(DeviceContextProxy)

Uploads the specified device context. This uploads internal byte buffer only.

public bool Upload(DeviceContextProxy deviceContext)

Parameters

deviceContext DeviceContextProxy

The device context.

Returns

bool

Upload<T>(DeviceContextProxy, ref T)

Uploads the specified device context. This function writes a external struct and writes remains byte buffer by offset = input struct size/>

public bool Upload<T>(DeviceContextProxy deviceContext, ref T data) where T : unmanaged

Parameters

deviceContext DeviceContextProxy

The device context.

data T

The data.

Returns

bool

Type Parameters

T

WriteValueByName<T>(string, T)

Writes the value into internal byte buffer

public void WriteValueByName<T>(string name, T value) where T : unmanaged

Parameters

name string

The variable name.

value T

The value.

Type Parameters

T

WriteValue<T>(T, int)

Writes the value into internal byte buffer

public void WriteValue<T>(T value, int offset) where T : unmanaged

Parameters

value T

The value.

offset int

The offset.

Type Parameters

T