OGRE  1.10.12
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...
void getViewport (int *array)

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.

Constructor & Destructor Documentation

◆ ~GLStateCacheManagerCommon()

virtual Ogre::GLStateCacheManagerCommon::~GLStateCacheManagerCommon ( )

Member Function Documentation

◆ getViewport()

void Ogre::GLStateCacheManagerCommon::getViewport ( int *  array)

◆ getColourMask()

uchar* Ogre::GLStateCacheManagerCommon::getColourMask ( )

Gets the current colour mask setting.

An array containing the mask in RGBA order.

◆ getDepthMask()

uchar Ogre::GLStateCacheManagerCommon::getDepthMask ( ) const

Gets the current depth mask setting.

The current depth mask.

◆ getStencilMask()

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

Gets the current stencil mask.

The stencil mask.

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