Torque3D Documentation / _generateds / GFXD3D11ShaderConstBuffer

GFXD3D11ShaderConstBuffer

Engine/source/gfx/D3D11/gfxD3D11Shader.h

The D3D11 implementation of a shader constant buffer.

More...

Public Friends

Private Attributes

ID3D11DeviceContext *

Protected Attributes

Public Functions

activate(GFXD3D11ShaderConstBuffer * prevShaderBuffer)

Called by GFXD3D11Device to activate this buffer.

The resource should put a description of itself (number of vertices, size/width of texture, etc.) in buffer.

Return the shader that created this buffer.

bool

Used internally by GXD3D11ShaderConstBuffer to determine if it's dirty.

Called from GFXD3D11Shader when constants have changed and need to be the shader this buffer references is reloaded.

When called the resource should restore all device sensitive information destroyed by zombify()

Set a shader constant.

Set a variable sized matrix shader constant.

set(GFXShaderConstHandle * handle, const MatrixF * mat, const U32 arraySize, const GFXShaderConstType matrixType)

Set a variable sized matrix shader constant from an array of matricies.

When called the resource should destroy all device sensitive information (e.g. D3D resources in D3DPOOL_DEFAULT.

Protected Functions

Detailed Description

The D3D11 implementation of a shader constant buffer.

Public Friends

Private Attributes

ID3D11DeviceContext * mDeviceContext 

Protected Attributes

ID3D11Buffer * mConstantBuffersP [CBUFFER_MAX]
ID3D11Buffer * mConstantBuffersV [CBUFFER_MAX]
GenericConstBuffer * mPixelConstBuffer 
GFXD3D11ConstBufferLayout * mPixelConstBufferLayout 
WeakRefPtr< GFXD3D11Shader > mShader 

We keep a weak reference to the shader because it will often be deleted.

GenericConstBuffer * mVertexConstBuffer 
GFXD3D11ConstBufferLayout * mVertexConstBufferLayout 

Public Functions

GFXD3D11ShaderConstBuffer(GFXD3D11Shader * shader, GFXD3D11ConstBufferLayout * vertexLayout, GFXD3D11ConstBufferLayout * pixelLayout)

~GFXD3D11ShaderConstBuffer()

activate(GFXD3D11ShaderConstBuffer * prevShaderBuffer)

Called by GFXD3D11Device to activate this buffer.

Parameters:

mPrevShaderBuffer

The previously active buffer

describeSelf()

Reimplemented from: GFXResource

getShader()

Reimplemented from: GFXShaderConstBuffer

isDirty()

Used internally by GXD3D11ShaderConstBuffer to determine if it's dirty.

onShaderReload(GFXD3D11Shader * shader)

Called from GFXD3D11Shader when constants have changed and need to be the shader this buffer references is reloaded.

resurrect()

Reimplemented from: GFXResource

set(GFXShaderConstHandle * handle, const AlignedArray< F32 > & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const AlignedArray< Point2F > & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const AlignedArray< Point2I > & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const AlignedArray< Point3F > & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const AlignedArray< Point3I > & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const AlignedArray< Point4F > & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const AlignedArray< Point4I > & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const AlignedArray< S32 > & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const F32 f)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const LinearColorF & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const MatrixF & mat, const GFXShaderConstType matrixType)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const MatrixF * mat, const U32 arraySize, const GFXShaderConstType matrixType)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const PlaneF & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const Point2F & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const Point2I & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const Point3F & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const Point3I & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const Point4F & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const Point4I & fv)

Reimplemented from: GFXShaderConstBuffer

set(GFXShaderConstHandle * handle, const S32 f)

Reimplemented from: GFXShaderConstBuffer

zombify()

Reimplemented from: GFXResource

Protected Functions

_createBuffers()

SET_CONSTANT(GFXShaderConstHandle * handle, const T & fv, GenericConstBuffer * vBuffer, GenericConstBuffer * pBuffer)