#include <GLState.h>
Public Types | |
| enum | State { TEXTURE_ON = 0x1, TEXTURE_OFF = 0x2, BLEND_ON = 0x4, BLEND_OFF = 0x8, DEPTH_ON = 0x10, DEPTH_OFF = 0x20, CUBEMAP_ON = 0x40, CUBEMAP_OFF = 0x80, NORMALIZE_ON = 0x100, NORMALIZE_OFF = 0x200, LIGHTING_ON = 0x400, LIGHTING_OFF = 0x800, LIGHT1_ON = 0x1000, LIGHT1_OFF = 0x2000, ALPHATEST_ON = 0x4000, ALPHATEST_OFF = 0x8000 } |
Public Member Functions | |
| GLState (unsigned wantedState) | |
| virtual | ~GLState () |
Static Public Member Functions | |
| static void | setBaseState (unsigned baseState) |
| static const char * | getStateString () |
| static unsigned int | getState () |
| static void | setState (unsigned wanted) |
| static unsigned int | getStateSwitches () |
| static void | resetStateSwitches () |
Protected Attributes | |
| unsigned | returnState_ |
Static Protected Attributes | |
| static unsigned | currentState_ |
| static unsigned int | stateSwitches_ = 0 |
Definition at line 27 of file GLState.h.
| enum GLState::State |
| GLState::GLState | ( | unsigned | wantedState | ) |
| GLState::~GLState | ( | ) | [virtual] |
| void GLState::setBaseState | ( | unsigned | baseState | ) | [static] |
| const char * GLState::getStateString | ( | ) | [static] |
Definition at line 181 of file GLState.cpp.
References addToBuffer(), BLEND_OFF, BLEND_ON, CUBEMAP_OFF, CUBEMAP_ON, DEPTH_OFF, DEPTH_ON, LIGHT1_OFF, LIGHT1_ON, LIGHTING_OFF, LIGHTING_ON, NORMALIZE_OFF, NORMALIZE_ON, TEXTURE_OFF, and TEXTURE_ON.
| static unsigned int GLState::getState | ( | ) | [inline, static] |
Definition at line 55 of file GLState.h.
References currentState_.
Referenced by addToBuffer(), and ModelRendererMesh::drawVerts().
| void GLState::setState | ( | unsigned | wanted | ) | [static] |
Definition at line 47 of file GLState.cpp.
References ALPHATEST_OFF, ALPHATEST_ON, BLEND_OFF, BLEND_ON, CUBEMAP_OFF, CUBEMAP_ON, currentState_, DEPTH_OFF, DEPTH_ON, GL_ALPHA_TEST, GL_ASSERT, GL_BLEND, GL_DEPTH_TEST, GL_LIGHT1, GL_LIGHTING, GL_NORMALIZE, GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_EXT, glDisable(), glEnable(), LIGHT1_OFF, LIGHT1_ON, LIGHTING_OFF, LIGHTING_ON, NORMALIZE_OFF, NORMALIZE_ON, stateSwitches_, TEXTURE_OFF, and TEXTURE_ON.
Referenced by GLGlobalState::GLGlobalState(), GLState(), setBaseState(), GLGlobalState::setState(), and ~GLState().
| static unsigned int GLState::getStateSwitches | ( | ) | [inline, static] |
Definition at line 58 of file GLState.h.
References stateSwitches_.
Referenced by FrameTimer::draw().
| static void GLState::resetStateSwitches | ( | ) | [inline, static] |
Definition at line 59 of file GLState.h.
References stateSwitches_.
Referenced by FrameTimer::draw().
unsigned GLState::currentState_ [static, protected] |
Initial value:
GLState::TEXTURE_OFF | GLState::BLEND_OFF |
GLState::DEPTH_OFF | GLState::CUBEMAP_OFF |
GLState::LIGHTING_OFF | GLState::NORMALIZE_OFF |
GLState::LIGHT1_OFF | GLState::ALPHATEST_OFF
Definition at line 62 of file GLState.h.
Referenced by getState(), GLState(), and setState().
unsigned int GLState::stateSwitches_ = 0 [static, protected] |
Definition at line 63 of file GLState.h.
Referenced by getStateSwitches(), resetStateSwitches(), and setState().
unsigned GLState::returnState_ [protected] |
1.5.3