Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::utilgl::SimpleState< Policy > Struct Template Reference

Policy-based RAII object for OpenGL state. More...

#include <modules/opengl/openglutils.h>

Public Types

using setter_type = typename Policy::setter_type
using value_type = typename Policy::value_type

Public Member Functions

 operator value_type ()
SimpleState & operator= (const SimpleState &)=delete
SimpleState & operator= (SimpleState &&that) noexcept
 SimpleState (const SimpleState &)=delete
 SimpleState (SimpleState &&rhs) noexcept
 SimpleState (value_type value)

Protected Attributes

value_type oldState_
value_type state_

Detailed Description

template<typename Policy>
struct inviwo::utilgl::SimpleState< Policy >

Policy-based RAII object for OpenGL state.

Template Parameters
PolicyA struct that provides:
  • value_type: The type used for getting the state (e.g. GLint, GLfloat, GLboolean)
  • setter_type: The type used for setting the state (e.g. GLenum, GLfloat, GLboolean)
  • static void get(value_type* v): Gets the current state
  • static void set(setter_type v): Sets the state
  • static value_type validate(value_type v): Validates/adjusts the value (optional identity)

The documentation for this struct was generated from the following file:
  • modules/opengl/include/modules/opengl/openglutils.h