Geogram Version 1.8.5
A programming library of geometric algorithms
|
A GLUP state variable that contains a vector. More...
#include <geogram_gfx/GLUP/GLUP_context.h>
Public Member Functions | |
VectorStateVariable () | |
VectorStateVariable default constructor. | |
VectorStateVariable (Context *context, const char *name, index_t dimension) | |
VectorStateVariable constructor. | |
void | initialize (Context *context, const char *name, index_t dimension) |
Initializes a VectorStateVariable. | |
index_t | dimension () const |
Gets the dimension. | |
void | get (GLUPfloat *x) const |
Gets the value. | |
void | set (const GLUPfloat *x) |
Sets the value. | |
void | clear () |
clears the vector to its default value. | |
![]() | |
FloatsArrayStateVariable () | |
FloatsArrayStateVariable default constructor. | |
FloatsArrayStateVariable (Context *context, const char *name) | |
FloatsArrayStateVariable constructor. | |
const GLUPfloat * | get_pointer () const |
Gets a pointer to the variable. | |
GLUPfloat * | get_pointer () |
Gets a modifiable pointer to the variable. | |
![]() | |
StateVariableBase () | |
StateVariableBase default constructor. | |
StateVariableBase (Context *context, const char *name) | |
StateVariableBase constructor. | |
void | initialize (Context *context, const char *name) |
Initializes a StateVariableBase. | |
const std::string & | name () const |
Gets the name of this StateVariableBase. | |
Protected Attributes | |
index_t | dimension_ |
![]() | |
Memory::pointer | address_ |
Context * | context_ |
std::string | name_ |
Additional Inherited Members | |
![]() | |
Memory::pointer | address () const |
Gets the address of the StateVariableBase. | |
void | flag_uniform_buffer_as_dirty () |
Indicates that the variables in the context need to be sent to OpenGL. | |
A GLUP state variable that contains a vector.
This corresponds to vec2, vec3, vec4 GLSL types.
Definition at line 857 of file GLUP_context.h.
|
inline |
VectorStateVariable default constructor.
Definition at line 863 of file GLUP_context.h.
|
inline |
VectorStateVariable constructor.
[in] | context | a pointer to the GLUP Context |
[in] | name | the name of the variable, without "GLUPStateBlock." (it is prepended automatically) |
[in] | dimension | 2 for vec2, 3 for vec3, 4 for vec4 |
Definition at line 873 of file GLUP_context.h.
|
inline |
clears the vector to its default value.
For vec2, default value is (0.0, 0.0), for vec3, it is (0.0, 0.0, 0.0) and for vec4 it is (0.0, 0.0, 0.0, 1.0)
Definition at line 925 of file GLUP_context.h.
|
inline |
Gets the dimension.
Definition at line 896 of file GLUP_context.h.
|
inline |
Gets the value.
[out] | x | a pointer to an array of dimension() GLfloats, where to store the value |
Definition at line 905 of file GLUP_context.h.
|
inline |
Initializes a VectorStateVariable.
[in] | context | a pointer to the GLUP Context |
[in] | name | the name of the variable, without "GLUPStateBlock." (it is prepended automatically) |
[in] | dimension | 2 for vec2, 3 for vec3, 4 for vec4 |
Definition at line 886 of file GLUP_context.h.
|
inline |
Sets the value.
[in] | x | a const pointer to an array of dimension() GLfloats that contains the new value |
Definition at line 914 of file GLUP_context.h.
|
protected |
Definition at line 934 of file GLUP_context.h.