| OGRE 1.11.1 Object-Oriented Graphics Rendering Engine

Public Member Functions | List of all members
Ogre::GLStateCacheManagerCommon Class Reference

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

`#include <OgreGLStateCacheManagerCommon.h>`

Inheritance diagram for Ogre::GLStateCacheManagerCommon:
[legend]

## 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...
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 | ( |  | ) |
| inline virtual

## Member Function Documentation

## ◆ getViewport()

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

## ◆ 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:

- OgreGLStateCacheManagerCommon.h