Torque3D Documentation / _generateds / GenericConstBufferLayout

GenericConstBufferLayout

Engine/source/gfx/genericConstBuffer.h

This class defines the memory layout for a GenericConstBuffer.

More...

Classes:

class

Describes the parameters we contain.

Protected Types

Params 

Vector of parameter descriptions.

Protected Attributes

Public Functions

addParameter(const String & name, const GFXShaderConstType constType, const U32 offset, const U32 size, const U32 arraySize, const U32 alignValue)

Add a parameter to the buffer.

Restore to initial state.

Get the size of the buffer.

bool
getDesc(const String & name, ParamDesc & param)

Returns the ParamDesc of a parameter.

bool
getDesc(const U32 index, ParamDesc & param)

Returns the ParamDesc of a parameter.

Get the number of parameters.

bool
read(Stream * s)

Load this layout from a stream.

bool
set(const ParamDesc & pd, const GFXShaderConstType constType, const U32 size, const void * data, U8 * basePointer)

Set a parameter, given a base pointer.

bool

Save this layout to a stream.

Protected Functions

bool
setMatrix(const ParamDesc & pd, const GFXShaderConstType constType, const U32 size, const void * data, U8 * basePointer)

Set a matrix, given a base pointer.

Detailed Description

This class defines the memory layout for a GenericConstBuffer.

Protected Types

typedef Vector< ParamDesc > Params 

Vector of parameter descriptions.

Protected Attributes

U32 mBufferSize 
U32 mCurrentIndex 
Params mParams 

Vector of parameter descriptions.

U32 mTimesCleared 

Public Functions

GenericConstBufferLayout()

~GenericConstBufferLayout()

addParameter(const String & name, const GFXShaderConstType constType, const U32 offset, const U32 size, const U32 arraySize, const U32 alignValue)

Add a parameter to the buffer.

clear()

Restore to initial state.

getBufferSize()

Get the size of the buffer.

getDesc(const String & name, ParamDesc & param)

Returns the ParamDesc of a parameter.

getDesc(const U32 index, ParamDesc & param)

Returns the ParamDesc of a parameter.

getParameterCount()

Get the number of parameters.

read(Stream * s)

Load this layout from a stream.

set(const ParamDesc & pd, const GFXShaderConstType constType, const U32 size, const void * data, U8 * basePointer)

Set a parameter, given a base pointer.

Reimplemented by: GFXD3D11ConstBufferLayout

write(Stream * s)

Save this layout to a stream.

Protected Functions

setMatrix(const ParamDesc & pd, const GFXShaderConstType constType, const U32 size, const void * data, U8 * basePointer)

Set a matrix, given a base pointer.

Reimplemented by: GFXD3D11ConstBufferLayout