The CYIUniformBufferId class is an identification class for Uniform buffers that also reveals the name of the uniform buffer as a string.
The CYIUniformBufferId can only be generated using CYIUniformBufferId::Generate, which takes a string. The user is responsible of retaining the instance of the CYIUniformBufferId for updating any type of custom shader uniforms using IYIUniformBufferObject::Set
CYIUniformBufferId also comes with a set of predefined instances for You.i Engine default shader program.
#include <renderer/YiUniformBufferId.h>
Public Member Functions | |
| CYIUniformBufferId () | |
| const CYIString & | GetUniformName () const |
| uint32_t | GetID () const |
| bool | operator< (const CYIUniformBufferId &uniformBufferId) const |
| bool | operator== (const CYIUniformBufferId &uniformBufferId) const |
| bool | operator!= (const CYIUniformBufferId &uniformBufferId) const |
Static Public Member Functions | |
| static CYIUniformBufferId | Generate (const char *uniformName) |
| static void | Init () |
Static Public Attributes | |
| static const CYIUniformBufferId | s_YiMatricesID |
| static const CYIUniformBufferId | s_YiNormalMatrixID |
| static const CYIUniformBufferId | s_YiMVMatrixID |
| static const CYIUniformBufferId | s_YiMVPMatrixID |
| static const CYIUniformBufferId | s_YiCameraMatrixID |
| static const CYIUniformBufferId | s_YiModelMatrixID |
| static const CYIUniformBufferId | s_YiMeshMatrixID |
| static const CYIUniformBufferId | s_YiAlphaID |
| static const CYIUniformBufferId | s_YiColorID |
| static const CYIUniformBufferId | s_YiViewportSizeID |
| static std::vector< CYIUniformBufferId > | s_YiTextureID |
| static std::vector< CYIUniformBufferId > | s_YiTextureMatrixID |
|
inline |
|
static |
Generates an instance of CYIUniformBufferId using a given name. Please note that using the same uniform name will not return the same ID than the previous time. A new unique ID will be generated each time, which is why it is the user's responsibility to retain their CYIUniformBufferId instance for their custom shaders.
|
inline |
Returns a unique ID associated with a specific uniform buffer object.
|
inline |
Returns the name of the uniform buffer
|
static |
Initializer for the predefined uniform buffer Ids for You.i Engine default shader program. For internal use only.
|
inline |
Convenient compare operator to determine if the uniforms buffer IDs are not equal
|
inline |
Required operator for std::map for element lookup and sorting.
|
inline |
Convenient compare operator to determine if the uniforms buffer IDs are equal
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |