Graphite Version 3
An experimental 3D geometry processing program
Loading...
Searching...
No Matches
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.
void initialize (Context *context, const char *name, T value)
 Initializes a StateVariable.
T get () const
 Gets the value.
void set (T val)
 Sets the value.
Public Member Functions inherited from GLUP::StateVariableBase
 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.

Additional Inherited Members

Protected Member Functions inherited from GLUP::StateVariableBase
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.
Protected Attributes inherited from GLUP::StateVariableBase
Memory::pointer address_
Context * context_
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() [1/2]

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

StateVariable default constructor.

Definition at line 791 of file GLUP_context.h.

◆ StateVariable() [2/2]

template<class T>
GLUP::StateVariable< T >::StateVariable ( Context * context,
const char * name,
T 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,
T 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 ( T 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: