Graphite
Version 3
An experimental 3D geometry processing program
|
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. More... | |
void | initialize (Context *context, const char *name, index_t dimension) |
Initializes a VectorStateVariable. More... | |
index_t | dimension () const |
Gets the dimension. More... | |
void | get (GLUPfloat *x) const |
Gets the value. More... | |
void | set (const GLUPfloat *x) |
Sets the value. More... | |
void | clear () |
clears the vector to its default value. More... | |
Public Member Functions inherited from GLUP::FloatsArrayStateVariable | |
FloatsArrayStateVariable () | |
FloatsArrayStateVariable default constructor. | |
FloatsArrayStateVariable (Context *context, const char *name) | |
FloatsArrayStateVariable constructor. More... | |
const GLUPfloat * | get_pointer () const |
Gets a pointer to the variable. More... | |
GLUPfloat * | get_pointer () |
Gets a modifiable pointer to the variable. More... | |
Public Member Functions inherited from GLUP::StateVariableBase | |
StateVariableBase () | |
StateVariableBase default constructor. | |
StateVariableBase (Context *context, const char *name) | |
StateVariableBase constructor. More... | |
void | initialize (Context *context, const char *name) |
Initializes a StateVariableBase. More... | |
const std::string & | name () const |
Gets the name of this StateVariableBase. More... | |
Protected Attributes | |
index_t | dimension_ |
Protected Attributes inherited from GLUP::StateVariableBase | |
Memory::pointer | address_ |
Context * | context_ |
std::string | name_ |
Additional Inherited Members | |
Protected Member Functions inherited from GLUP::StateVariableBase | |
Memory::pointer | address () const |
Gets the address of the StateVariableBase. More... | |
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 892 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 908 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 960 of file GLUP_context.h.
|
inline |
Gets the dimension.
Definition at line 931 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 940 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 921 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 949 of file GLUP_context.h.