Visual Computing Library
|
The Uniform class wraps a bgfx::UniformHandle and provides a simple interface to set the uniform data. More...
#include <vclib/bgfx/uniform.h>
Public Member Functions | |
Uniform (const std::string &name, bgfx::UniformType::Enum type) | |
Uniform (const Uniform &oth) | |
Uniform (Uniform &&oth) | |
bgfx::UniformHandle | handle () const |
const std::string & | name () const |
bgfx::UniformType::Enum | type () const |
void | bind (const void *data) const |
void | swap (Uniform &oth) |
Uniform & | operator= (Uniform oth) |
Static Public Member Functions | |
static float | uintBitsToFloat (uint bits) |
static uint | floatToUintBits (float f) |
Private Attributes | |
bgfx::UniformHandle | mUniformHandle = BGFX_INVALID_HANDLE |
std::string | mUniformName |
bgfx::UniformType::Enum | mUniformType = bgfx::UniformType::Count |
Friends | |
void | swap (Uniform &a, Uniform &b) |
The Uniform class wraps a bgfx::UniformHandle and provides a simple interface to set the uniform data.
It manages the lifetime of the bgfx::UniformHandle: each instance of this class creates a new bgfx::UniformHandle and destroys it when the instance goes out of scope.