Geogram  Version 1.9.1-rc
A programming library of geometric algorithms
GLUP::StateVariable< T > Class Template Reference

A GLUP state variable of a given type. More...

#include <geogram_gfx/GLUP/GLUP_context.h>

Inheritance diagram for GLUP::StateVariable< T >:
GLUP::StateVariableBase

Public Member Functions

 StateVariable ()
 StateVariable default constructor.
 
 StateVariable (Context *context, const char *name, T value)
 StateVariableBase constructor. More...
 
void initialize (Context *context, const char *name, T value)
 Initializes a StateVariable. More...
 
get () const
 Gets the value. More...
 
void set (T val)
 Sets the value. 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...
 

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.
 
- Protected Attributes inherited from GLUP::StateVariableBase
Memory::pointer address_
 
Contextcontext_
 
std::string name_
 

Detailed Description

template<class T>
class GLUP::StateVariable< T >

A GLUP state variable of a given type.

Template Parameters
Tthe type of the state variable

Definition at line 785 of file GLUP_context.h.

Constructor & Destructor Documentation

◆ StateVariable()

template<class T >
GLUP::StateVariable< T >::StateVariable ( Context context,
const char *  name,
value 
)
inline

StateVariableBase constructor.

Parameters
[in]contexta pointer to the GLUP Context
[in]namethe name of the variable, without "GLUPStateBlock." (it is prepended automatically).
[in]valueinitial value of the variable

Definition at line 801 of file GLUP_context.h.

Member Function Documentation

◆ get()

template<class T >
T GLUP::StateVariable< T >::get ( ) const
inline

Gets the value.

Returns
the value of this StateVariable.

Definition at line 823 of file GLUP_context.h.

◆ initialize()

template<class T >
void GLUP::StateVariable< T >::initialize ( Context context,
const char *  name,
value 
)
inline

Initializes a StateVariable.

Parameters
[in]contexta pointer to the GLUP Context
[in]namethe name of the variable, without "GLUPStateBlock." (it is prepended automatically).
[in]valueinitial value of the variable

Definition at line 814 of file GLUP_context.h.

◆ set()

template<class T >
void GLUP::StateVariable< T >::set ( val)
inline

Sets the value.

Parameters
[in]valthe new value

flags the uniform buffer as dirty

Definition at line 832 of file GLUP_context.h.


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