LLGLState Class Reference

#include <llgl.h>

Inheritance diagram for LLGLState:

Inheritance graph
[legend]
List of all members.

Public Types

 CURRENT_STATE = -2
enum  { CURRENT_STATE = -2 }

Public Member Functions

 LLGLState (LLGLenum state, S32 enabled=CURRENT_STATE)
 ~LLGLState ()
void setEnabled (S32 enabled)
void enable ()
void disable ()

Static Public Member Functions

static void initClass ()
static void restoreGL ()
static void resetTextureStates ()
static void dumpStates ()
static void checkStates ()
static void checkTextureChannels ()
static void checkClientArrays (U32 data_mask=0x0001)

Protected Attributes

LLGLenum mState
BOOL mWasEnabled
BOOL mIsEnabled

Static Protected Attributes

static std::map< LLGLenum,
LLGLboolean
sStateMap

Detailed Description

Definition at line 217 of file llgl.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
CURRENT_STATE 

Definition at line 233 of file llgl.h.


Constructor & Destructor Documentation

LLGLState::LLGLState ( LLGLenum  state,
S32  enabled = CURRENT_STATE 
)

Definition at line 1229 of file llgl.cpp.

References glIsEnabled, llassert, mState, mWasEnabled, setEnabled(), sStateMap, and stop_glerror.

LLGLState::~LLGLState (  ) 

Definition at line 1265 of file llgl.cpp.

References glDisable, glEnable, glIsEnabled, llassert, mIsEnabled, mState, mWasEnabled, sStateMap, and stop_glerror.


Member Function Documentation

void LLGLState::checkClientArrays ( U32  data_mask = 0x0001  )  [static]

Definition at line 1131 of file llgl.cpp.

References FALSE, glClientActiveTextureARB, glIsEnabled, j, LL_GL_ERRS, llendl, llwarns, mask, S32, stop_glerror, and TRUE.

Referenced by LLSpatialPartition::doOcclusion(), LLDrawPoolBump::renderActive(), LLRenderPass::renderActive(), LLDrawPoolAlpha::renderAlpha(), LLDrawPoolAlpha::renderAlphaHighlight(), LLDrawPoolBump::renderBump(), LLDrawPoolBump::renderBumpActive(), LLPipeline::renderForSelect(), LLFace::renderForSelect(), LLPipeline::renderGeom(), LLRenderPass::renderInvisible(), LLFace::renderSelected(), LLRenderPass::renderStatic(), and LLRenderPass::renderTexture().

void LLGLState::checkStates (  )  [static]

Definition at line 1005 of file llgl.cpp.

References dumpStates(), glGetIntegerv, glIsEnabled, LL_GL_ERRS, llendl, llformat(), sStateMap, and stop_glerror.

Referenced by display(), render_ui_and_swap(), LLPipeline::renderForSelect(), and LLPipeline::renderGeom().

void LLGLState::checkTextureChannels (  )  [static]

Definition at line 1045 of file llgl.cpp.

References FALSE, glClientActiveTextureARB, glGetIntegerv, glIsEnabled, i, j, LL_GL_ERRS, llendl, llwarns, LLMatrix4::mMatrix, S32, and TRUE.

Referenced by display(), LLPipeline::renderForSelect(), and LLPipeline::renderGeom().

void LLGLState::disable (  )  [inline]

Definition at line 238 of file llgl.h.

References FALSE, and setEnabled().

void LLGLState::dumpStates (  )  [static]

Definition at line 995 of file llgl.cpp.

References llendl, llformat(), llinfos, S32, and sStateMap.

Referenced by checkStates().

void LLGLState::enable (  )  [inline]

Definition at line 237 of file llgl.h.

References setEnabled(), and TRUE.

void LLGLState::initClass (  )  [static]

Definition at line 969 of file llgl.cpp.

References sStateMap.

Referenced by LLGLManager::initGLStates(), and restoreGL().

void LLGLState::resetTextureStates (  )  [static]

Definition at line 983 of file llgl.cpp.

References glClientActiveTextureARB, glDisable, glEnable, glGetIntegerv, j, and S32.

Referenced by display().

void LLGLState::restoreGL (  )  [static]

Definition at line 975 of file llgl.cpp.

References initClass(), and sStateMap.

Referenced by LLViewerWindow::restoreGL().

void LLGLState::setEnabled ( S32  enabled  ) 

Definition at line 1242 of file llgl.cpp.

References CURRENT_STATE, FALSE, glDisable, glEnable, mIsEnabled, mState, sStateMap, and TRUE.

Referenced by disable(), enable(), and LLGLState().


Member Data Documentation

BOOL LLGLState::mIsEnabled [protected]

Definition at line 242 of file llgl.h.

Referenced by setEnabled(), and ~LLGLState().

LLGLenum LLGLState::mState [protected]

Definition at line 240 of file llgl.h.

Referenced by LLGLState(), setEnabled(), and ~LLGLState().

BOOL LLGLState::mWasEnabled [protected]

Definition at line 241 of file llgl.h.

Referenced by LLGLState(), and ~LLGLState().

std::map< LLGLenum, LLGLboolean > LLGLState::sStateMap [static, protected]

Definition at line 230 of file llgl.h.

Referenced by checkStates(), dumpStates(), initClass(), LLGLState(), restoreGL(), setEnabled(), and ~LLGLState().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:23 2010 for Second Life Viewer by  doxygen 1.4.7