OGRE  13.6
Object-Oriented Graphics Rendering Engine
Ogre::GLStateCacheManagerCommon Class Reference

An in memory cache of the OpenGL state. More...

#include <OgreGLStateCacheManagerCommon.h>

+ Inheritance diagram for Ogre::GLStateCacheManagerCommon:

Public Member Functions

virtual ~GLStateCacheManagerCommon ()
 
uchargetColourMask ()
 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...
 

Detailed Description

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.

Warning
caching does not work with multiple windows, sharing the same context. They will erroneously get different state caches.

Constructor & Destructor Documentation

◆ ~GLStateCacheManagerCommon()

virtual Ogre::GLStateCacheManagerCommon::~GLStateCacheManagerCommon ( )
inlinevirtual

Member Function Documentation

◆ getColourMask()

uchar* Ogre::GLStateCacheManagerCommon::getColourMask ( )
inline

Gets the current colour mask setting.

Returns
An array containing the mask in RGBA order.

◆ getDepthMask()

uchar Ogre::GLStateCacheManagerCommon::getDepthMask ( ) const
inline

Gets the current depth mask setting.

Returns
The current depth mask.

◆ getStencilMask()

uint32 Ogre::GLStateCacheManagerCommon::getStencilMask ( void  ) const
inline

Gets the current stencil mask.

Returns
The stencil mask.

The documentation for this class was generated from the following file: