Storage of UBO related data.
More...
#include <UniformBufferObject.hpp>
Storage of UBO related data.
◆ UniformBufferObject() [1/3]
CSCI441::UniformBufferObject::UniformBufferObject |
( |
| ) |
|
|
delete |
- Note
- must use `UniformBufferObject(const char*, std::initializer_list<const char*>
◆ UniformBufferObject() [2/3]
◆ UniformBufferObject() [3/3]
CSCI441::UniformBufferObject::UniformBufferObject |
( |
const char * |
UNIFORM_BLOCK_NAME, |
|
|
std::initializer_list< const char * > |
uniformNamesList |
|
) |
| |
|
inline |
Initializes the UniformBufferObject object.
- Parameters
-
UNIFORM_BLOCK_NAME | name of the uniform block |
uniformNamesList | list of names that makeup the uniform block components |
◆ copyToBuffer()
void CSCI441::UniformBufferObject::copyToBuffer |
( |
const char * |
UNIFORM_NAME, |
|
|
void * |
addr, |
|
|
size_t |
len |
|
) |
| |
|
inline |
copies the value pointed to by addr to the corresponding location within the UBO as denoted by the uniform name
- Parameters
-
UNIFORM_NAME | name of the uniform within the block to copy value to |
addr | starting address of source to copy from |
len | length of buffer to copy |
◆ copyToOffset()
void CSCI441::UniformBufferObject::copyToOffset |
( |
unsigned int |
offset, |
|
|
void * |
addr, |
|
|
size_t |
len |
|
) |
| |
|
inline |
copies the value pointed to by addr to the corresponding location within the UBO as denoted by the offset
- Parameters
-
offset | UBO offset to copy value to |
addr | starting address of source to copy from |
len | length of buffer to copy |
◆ operator=() [1/2]
Move Assign an existing UBO.
- Returns
- this now reconfigured UBO
◆ operator=() [2/2]
◆ setupWithShaderProgram()
void CSCI441::UniformBufferObject::setupWithShaderProgram |
( |
ShaderProgram * |
shaderProgram, |
|
|
GLuint |
bindingPoint |
|
) |
| |
|
inline |
creates the UBO and allocates memory on both the CPU & GPU. binds the UBO and the uniform block for the provided ShaderProgram to the same binding point.
- Parameters
-
shaderProgram | ShaderProgram object that utilizes the uniformBlock |
bindingPoint | Binding point to bind the UBO and ShaderProgram Uniform Block to |
The documentation for this class was generated from the following file: