|
CSCI441 OpenGL Library 6.0.1.1
CS@Mines CSCI441 Computer Graphics Course Library
|
Storage of UBO related data. More...
#include <UniformBufferObject.hpp>
Public Member Functions | |
| UniformBufferObject ()=delete | |
| UniformBufferObject (UniformBufferObject &unused)=delete | |
| UniformBufferObject & | operator= (UniformBufferObject &unused)=delete |
| UniformBufferObject (UniformBufferObject &&) noexcept | |
| Move Constructor an existing UBO. | |
| UniformBufferObject & | operator= (UniformBufferObject &&) noexcept |
| Move Assign an existing UBO. | |
| UniformBufferObject (const char *UNIFORM_BLOCK_NAME, std::initializer_list< const char * > uniformNamesList) | |
| Initializes the UniformBufferObject object. | |
| ~UniformBufferObject () | |
| Deletes the UBO from the GPU and frees all memory on the CPU. | |
| UniformBufferObject (const UniformBufferObject &)=delete | |
| do not allow UBOs to be copied | |
| UniformBufferObject & | operator= (const UniformBufferObject &)=delete |
| do not allow UBOs to be copied | |
| void | setupWithShaderProgram (ShaderProgram *shaderProgram, GLuint bindingPoint) |
| 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. | |
| void | bindToShaderProgram (ShaderProgram *shaderProgram) |
| sets the shader programs binding point to match this uniform buffer object | |
| void | copyToOffset (unsigned int offset, const void *src, size_t len) |
| copies the value pointed to by addr to the corresponding location within the UBO as denoted by the offset | |
| void | copyToBuffer (const char *UNIFORM_NAME, const void *src, size_t len) |
| copies the value pointed to by addr to the corresponding location within the UBO as denoted by the uniform name | |
| void | setUniform (const char *UNIFORM_NAME, GLboolean value) |
| sets the uniform value within the uniform buffer block | |
| void | setUniform (const char *UNIFORM_NAME, GLint value) |
| sets the uniform value within the uniform buffer block | |
| void | setUniform (const char *UNIFORM_NAME, GLfloat value) |
| sets the uniform value within the uniform buffer block | |
| void | setUniform (const char *UNIFORM_NAME, glm::vec3 vec) |
| sets the uniform value within the uniform buffer block | |
| void | setUniform (const char *UNIFORM_NAME, glm::vec4 vec) |
| sets the uniform value within the uniform buffer block | |
| void | setUniform (const char *UNIFORM_NAME, glm::mat4 mtx) |
| sets the uniform value within the uniform buffer block | |
| void | setUniform (const char *UNIFORM_NAME, const GLint *pArray, GLint count) |
| sets the uniform value within the uniform buffer block | |
| void | setUniform (const char *UNIFORM_NAME, const glm::ivec4 *pArray, GLint count) |
| sets the uniform value within the uniform buffer block | |
| void | bindBuffer () const |
| binds UBO object to UBO buffer | |
| void | bufferSubData () const |
| transfers UBO data to UBO buffer | |
Storage of UBO related data.
|
delete |
|
delete |
| CSCI441::UniformBufferObject::UniformBufferObject | ( | const char * | UNIFORM_BLOCK_NAME, |
| std::initializer_list< const char * > | uniformNamesList | ||
| ) |
Initializes the UniformBufferObject object.
| UNIFORM_BLOCK_NAME | name of the uniform block |
| uniformNamesList | list of names that makeup the uniform block components |
|
inline |
sets the shader programs binding point to match this uniform buffer object
| shaderProgram |
|
inline |
copies the value pointed to by addr to the corresponding location within the UBO as denoted by the uniform name
| UNIFORM_NAME | name of the uniform within the block to copy value to |
| src | starting address of source to copy from |
| len | length of buffer to copy |
|
inline |
copies the value pointed to by addr to the corresponding location within the UBO as denoted by the offset
| offset | UBO offset to copy value to |
| src | starting address of source to copy from |
| len | length of buffer to copy |
|
inlinenoexcept |
Move Assign an existing UBO.
|
delete |
|
inline |
sets the uniform value within the uniform buffer block
| UNIFORM_NAME | uniform to set |
| pArray | pointer to array of values to set |
| count | size of array |
|
inline |
sets the uniform value within the uniform buffer block
| UNIFORM_NAME | uniform to set |
| pArray | pointer to array of values to set |
| count | size of array |
|
inline |
sets the uniform value within the uniform buffer block
| UNIFORM_NAME | uniform to set |
| value | value to set |
|
inline |
sets the uniform value within the uniform buffer block
| UNIFORM_NAME | uniform to set |
| value | value to set |
|
inline |
sets the uniform value within the uniform buffer block
| UNIFORM_NAME | uniform to set |
| value | value to set |
|
inline |
sets the uniform value within the uniform buffer block
| UNIFORM_NAME | uniform to set |
| mtx | value to set |
|
inline |
sets the uniform value within the uniform buffer block
| UNIFORM_NAME | uniform to set |
| vec | value to set |
|
inline |
sets the uniform value within the uniform buffer block
| UNIFORM_NAME | uniform to set |
| vec | value to set |
|
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.
| shaderProgram | ShaderProgram object that utilizes the uniformBlock |
| bindingPoint | Binding point to bind the UBO and ShaderProgram Uniform Block to |