OGRE
13.6
Object-Oriented Graphics Rendering Engine
|
An in memory cache of the OpenGL state. More...
#include <OgreGLStateCacheManagerCommon.h>
Public Member Functions | |
virtual | ~GLStateCacheManagerCommon () |
uchar * | getColourMask () |
Gets the current colour mask setting. More... | |
uchar | getDepthMask () const |
Gets the current depth mask setting. More... | |
uint32 | getStencilMask (void) const |
Gets the current stencil mask. More... | |
An in memory cache of the OpenGL state.
State changes can be particularly expensive time wise. This is because a change requires OpenGL to re-evaluate and update the state machine. Because of the general purpose nature of OGRE we often set the state for a specific texture, material, buffer, etc. But this may be the same as the current status of the state machine and is therefore redundant and causes unnecessary work to be performed by OpenGL.
Instead we are caching the state so that we can check whether it actually does need to be updated. This leads to improved performance all around and can be somewhat dramatic in some cases.
|
inlinevirtual |
|
inline |
Gets the current colour mask setting.
|
inline |
Gets the current depth mask setting.
|
inline |
Gets the current stencil mask.