GenericConstBuffer Class Reference#include <genericConstBuffer.h>
List of all members.
Detailed Description
This class will be used by other const buffers and the material system.
Takes a set of variable names and maps them to a section of memory. Should this descend from GFXConstBuffer? I don't know, we need two of them (one for vert, one for pixel shaders for D3D9, maybe it'd be useful in OpenGL?)
|
Set shader constant values |
Actually set shader constant values - Parameters:
-
| name | Name of the constant, this should be a name contained in the array returned in getShaderConstDesc, if an invalid name is used, its ignored, but it's not an error. |
|
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const F32 f) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const Point2F &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const Point3F &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const Point4F &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const ColorF &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const S32 f) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const Point2I &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const Point3I &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const Point4I &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const AlignedArray< F32 > &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const AlignedArray< Point2F > &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const AlignedArray< Point3F > &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const AlignedArray< Point4F > &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const AlignedArray< S32 > &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const AlignedArray< Point2I > &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const AlignedArray< Point3I > &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const AlignedArray< Point4I > &fv) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const MatrixF &mat, const GFXShaderConstType matrixType) |
| void | set (const GenericConstBufferLayout::ParamDesc &pd, const MatrixF *mat, const U32 arraySize, const GFXShaderConstType matrixType) |
| const U8 * | getDirtyBuffer (U32 &start, U32 &size) |
| | This scans the fields and returns a pointer to the first dirty field and the length of the dirty bytes.
|
| void | setDirty (bool dirty) |
| bool | isDirty () const |
| bool | isEqual (GenericConstBuffer *buffer) const |
| | Returns true if we hold the same data as buffer and have the same layout.
|
| GenericConstBufferLayout * | getLayout () |
| | Returns our layout.
|
| const U8 * | getBuffer () const |
| | Returns a pointer to the raw buffer.
|
| void | internalSet (const GenericConstBufferLayout::ParamDesc &pd, const GFXShaderConstType constType, const U32 size, const void *data) |
| | Called by the set functions above.
|
| bool | isFieldDirty (const U32 index) const |
| | Returns true if the field is marked dirty.
|
| GenericConstBufferLayout * | mLayout |
| | Buffer layout.
|
| U8 * | mBuffer |
| | Buffer.
|
| Vector< bool > | mDirtyFields |
| Vector< bool > | mHasData |
| bool | mDirty |
Public Member Functions |
| | GenericConstBuffer (GenericConstBufferLayout *layout) |
| | ~GenericConstBuffer () |
Constructor & Destructor Documentation
| GenericConstBuffer::~GenericConstBuffer |
( |
|
) |
|
Member Function Documentation
| const U8* GenericConstBuffer::getDirtyBuffer |
( |
U32 & |
start, |
|
|
U32 & |
size | |
|
) |
| | |
This scans the fields and returns a pointer to the first dirty field and the length of the dirty bytes.
| void GenericConstBuffer::setDirty |
( |
bool |
dirty |
) |
|
| bool GenericConstBuffer::isDirty |
( |
|
) |
const [inline] |
Returns true if we hold the same data as buffer and have the same layout.
| const U8* GenericConstBuffer::getBuffer |
( |
|
) |
const [inline, private] |
Returns a pointer to the raw buffer.
Called by the set functions above.
| bool GenericConstBuffer::isFieldDirty |
( |
const U32 |
index |
) |
const [inline, private] |
Returns true if the field is marked dirty.
- Parameters:
-
Member Data Documentation
|