Visual Computing Library
Loading...
Searching...
No Matches
vcl::Uniform Class Reference

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)
 
Uniformoperator= (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)
 

Detailed Description

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.


The documentation for this class was generated from the following file: