List of all members.
Detailed Description
Shader constant buffer class used for OpenGL 3 and Direct3D 11. Direct3D 9 does not support constant buffers! For this you still have to use the old uniforms or rather individual shader constants. Constant buffers are particularly used to group large shader uniform arrays.
- See also:
- Shader
-
ShaderClass
-
MeshBuffer
- Since:
- Version 3.2
Constructor & Destructor Documentation
Constant buffer constructor.
- Parameters:
-
[in] | Owner | Pointer to the shader-class which owns this constant buffer. This must not be a null pointer! |
[in] | Name | Specifies the constant buffer name. This must not be empty! |
[in] | Index | Specifies the constant buffer index. |
- Exceptions:
-
- See also:
- ShaderClass
sp::video::ConstantBuffer::~ConstantBuffer |
( |
|
) |
[virtual] |
Member Function Documentation
EHWBufferUsage sp::video::ConstantBuffer::getBufferUsage |
( |
|
) |
const [inline] |
Returns the buffer usage. By default HWBUFFER_STATIC.
u32 sp::video::ConstantBuffer::getIndex |
( |
|
) |
const [inline] |
Returns the constant buffer index.
const io::stringc& sp::video::ConstantBuffer::getName |
( |
|
) |
const [inline] |
Returns the buffer name. This is the same name as used in the shader and can not be changed.
ShaderClass* sp::video::ConstantBuffer::getShaderClass |
( |
|
) |
const [inline] |
Returns a pointer to the shader-class reference to which this buffer belongs.
u32 sp::video::ConstantBuffer::getSize |
( |
|
) |
const [inline] |
Returns the buffer size in bytes. By default constant buffers are aligned in 4 component vectors (i.e. 4 floats). Thus the size is normally 16, 32, 48 etc.
void sp::video::ConstantBuffer::setBufferUsage |
( |
const EHWBufferUsage |
Usage |
) |
|
bool sp::video::ConstantBuffer::updateBuffer |
( |
const void * |
Buffer, |
|
|
u32 |
Size = 0 | |
|
) |
| | [virtual] |
Updates the constant buffer by uploading the data to the shader.
- Parameters:
-
[in] | Buffer | Constant pointer to the buffer data. |
[in] | Size | Specifies the buffer size (in bytes). If zero the engine determines the size automatically. By default zero. |
- Returns:
- True if the buffer could be updated successful. Otherwise false is returned and an error or warning message will be printed.
Reimplemented in sp::video::Direct3D11ConstantBuffer, and sp::video::OpenGLConstantBuffer.
bool sp::video::ConstantBuffer::valid |
( |
|
) |
const [virtual] |
Member Data Documentation
The documentation for this class was generated from the following files:
- D:/SoftwareEntwicklung/C++/HLC/Tools/SoftPixelEngine/repository/sources/RenderSystem/spConstantBuffer.hpp
- D:/SoftwareEntwicklung/C++/HLC/Tools/SoftPixelEngine/repository/sources/RenderSystem/spConstantBuffer.cpp