| OGRE 1.11.1 Object-Oriented Graphics Rendering Engine

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

`#include <OgreGLStateCacheManager.h>`

Inheritance diagram for Ogre::GLStateCacheManager:
[legend]

## Public Member Functions
| GLStateCacheManager (void)
bool | activateGLTextureUnit (size_t unit)
| Activate an OpenGL texture unit. More...
void | bindGLBuffer (GLenum target, GLuint buffer, bool force=false)
| Bind an OpenGL buffer of any type. More...
void | bindGLTexture (GLenum target, GLuint texture)
| Bind an OpenGL texture of any type. More...
void | clearCache ()
| Clears all cached values. More...
void | deleteGLBuffer (GLenum target, GLuint buffer)
| Delete an OpenGL buffer of any type. More...
void | disableTextureCoordGen (GLenum type)
| Disable the specified texture coordinate generation option for the currently active texture unit. More...
void | enableTextureCoordGen (GLenum type)
| Enable the specified texture coordinate generation option for the currently active texture unit. More...
GLclampf | getClearDepth (void) const
| Gets the clear depth in the range from [0..1]. More...
uchar * | getColourMask ()
| Gets the current colour mask setting. More...
GLenum | getCullFace (void) const
| Sets the face culling mode. More...
GLenum | getDepthFunc (void) const
| Gets the current depth test function. More...
uchar | getDepthMask () const
| Gets the current depth mask setting. More...
GLenum | getPolygonMode (void) const
| Gets the current polygon rendering mode, fill, wireframe, points, etc. More...
uint32 | getStencilMask (void) const
| Gets the current stencil mask. More...
void | getViewport (int *array)
void | initializeCache ()
| See GLStateCacheManager.initializeCache. More...
void | invalidateStateForTexture (GLuint texture)
| Invalidates the state associated with a particular texture ID. More...
void | setBlendEquation (GLenum eq)
| Sets the current blend equation setting. More...
void | setBlendEquation (GLenum eqRGB, GLenum eqA)
| Set the blend equation for RGB and alpha separately. More...
void | setBlendFunc (GLenum source, GLenum dest)
| Sets the blending function. More...
void | setClearColour (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
| Sets the color to clear to. More...
void | setClearDepth (GLclampf depth)
| Sets the clear depth in the range from [0..1]. More...
void | setColourMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
| Sets the current colour mask. More...
void | setCullFace (GLenum face)
| Sets the face culling setting. More...
void | setDepthFunc (GLenum func)
| Sets the current depth test function. More...
void | setDepthMask (GLboolean mask)
| Sets the current depth mask setting. More...
void | setEnabled (GLenum flag, bool enabled)
| Enables a piece of OpenGL functionality. More...
void | setLightAmbient (GLfloat r, GLfloat g, GLfloat b)
void | setMaterialAmbient (GLfloat r, GLfloat g, GLfloat b, GLfloat a)
void | setMaterialDiffuse (GLfloat r, GLfloat g, GLfloat b, GLfloat a)
void | setMaterialEmissive (GLfloat r, GLfloat g, GLfloat b, GLfloat a)
void | setMaterialShininess (GLfloat shininess)
void | setMaterialSpecular (GLfloat r, GLfloat g, GLfloat b, GLfloat a)
void | setPointParameters (GLfloat *attenuation, float minSize, float maxSize)
void | setPointSize (GLfloat size)
void | setPolygonMode (GLenum mode)
| Sets the current polygon rendering mode. More...
void | setShadeModel (GLenum model)
void | setStencilMask (GLuint mask)
| Sets the stencil mask. More...
void | setTexParameteri (GLenum target, GLenum pname, GLint param)
| Sets an integer parameter value per texture target. More...
void | setViewport (GLint x, GLint y, GLsizei width, GLsizei height)

## Constructor & Destructor Documentation

## ◆ GLStateCacheManager()

Ogre::GLStateCacheManager::GLStateCacheManager | ( | void |  | ) |

## Member Function Documentation

## ◆ initializeCache()

void Ogre::GLStateCacheManager::initializeCache | ( |  | ) |

See GLStateCacheManager.initializeCache.

## ◆ clearCache()

void Ogre::GLStateCacheManager::clearCache | ( |  | ) |

Clears all cached values.

## ◆ bindGLBuffer()

void Ogre::GLStateCacheManager::bindGLBuffer | ( | GLenum | target,
|  | GLuint | buffer,
|  | bool | force = `false`
| ) |  |

Bind an OpenGL buffer of any type.

Parameters

  target | The buffer target.
  buffer | The buffer ID.
  force | Optional parameter to force an update.

## ◆ deleteGLBuffer()

void Ogre::GLStateCacheManager::deleteGLBuffer | ( | GLenum | target,
|  | GLuint | buffer
| ) |  |

Delete an OpenGL buffer of any type.

Parameters

  target | The buffer target.
  buffer | The buffer ID.

## ◆ bindGLTexture()

void Ogre::GLStateCacheManager::bindGLTexture | ( | GLenum | target,
|  | GLuint | texture
| ) |  |

Bind an OpenGL texture of any type.

Parameters

  target | The texture target.
  texture | The texture ID.

## ◆ invalidateStateForTexture()

void Ogre::GLStateCacheManager::invalidateStateForTexture | ( | GLuint | texture | ) |

Invalidates the state associated with a particular texture ID.

Parameters

  texture | The texture ID.

## ◆ setTexParameteri()

void Ogre::GLStateCacheManager::setTexParameteri | ( | GLenum | target,
|  | GLenum | pname,
|  | GLint | param
| ) |  |

Sets an integer parameter value per texture target.

Parameters

  target | The texture target.
  pname | The parameter name.
  param | The parameter value.

## ◆ activateGLTextureUnit()

bool Ogre::GLStateCacheManager::activateGLTextureUnit | ( | size_t | unit | ) |

Activate an OpenGL texture unit.

Parameters

  unit | The texture unit to activate.

Returns
  Whether or not the texture unit was successfully activated.

## ◆ setBlendEquation() [1/2]

void Ogre::GLStateCacheManager::setBlendEquation | ( | GLenum | eq | ) |

Sets the current blend equation setting.

Parameters

  eq | The blend equation to use.

## ◆ setBlendEquation() [2/2]

void Ogre::GLStateCacheManager::setBlendEquation | ( | GLenum | eqRGB,
|  | GLenum | eqA
| ) |  |

Set the blend equation for RGB and alpha separately.

## ◆ setBlendFunc()

void Ogre::GLStateCacheManager::setBlendFunc | ( | GLenum | source,
|  | GLenum | dest
| ) |  |

Sets the blending function.

Parameters

  source | The blend mode for the source.
  dest | The blend mode for the destination

## ◆ setShadeModel()

void Ogre::GLStateCacheManager::setShadeModel | ( | GLenum | model | ) |

## ◆ setLightAmbient()

void Ogre::GLStateCacheManager::setLightAmbient | ( | GLfloat | r,
|  | GLfloat | g,
|  | GLfloat | b
| ) |  |

## ◆ setDepthMask()

void Ogre::GLStateCacheManager::setDepthMask | ( | GLboolean | mask | ) |

Sets the current depth mask setting.

Parameters

  mask | The depth mask to use.

## ◆ getDepthFunc()

GLenum Ogre::GLStateCacheManager::getDepthFunc | ( | void |  | ) | const
| inline

Gets the current depth test function.

Returns
  The current depth test function.

## ◆ setDepthFunc()

void Ogre::GLStateCacheManager::setDepthFunc | ( | GLenum | func | ) |

Sets the current depth test function.

Parameters

  func | The depth test function to use.

## ◆ getClearDepth()

GLclampf Ogre::GLStateCacheManager::getClearDepth | ( | void |  | ) | const
| inline

Gets the clear depth in the range from [0..1].

Returns
  The current clearing depth.

## ◆ setClearDepth()

void Ogre::GLStateCacheManager::setClearDepth | ( | GLclampf | depth | ) |

Sets the clear depth in the range from [0..1].

Parameters

  depth | The clear depth to use.

## ◆ setClearColour()

void Ogre::GLStateCacheManager::setClearColour | ( | GLclampf | red,
|  | GLclampf | green,
|  | GLclampf | blue,
|  | GLclampf | alpha
| ) |  |

Sets the color to clear to.

Parameters

  red | The red component.
  green | The green component.
  blue | The blue component.
  alpha | The alpha component.

## ◆ setColourMask()

void Ogre::GLStateCacheManager::setColourMask | ( | GLboolean | red,
|  | GLboolean | green,
|  | GLboolean | blue,
|  | GLboolean | alpha
| ) |  |

Sets the current colour mask.

Parameters

  red | The red component.
  green | The green component.
  blue | The blue component.
  alpha | The alpha component.

## ◆ setStencilMask()

void Ogre::GLStateCacheManager::setStencilMask | ( | GLuint | mask | ) |

Sets the stencil mask.

Parameters

  mask | The stencil mask to use

## ◆ setEnabled()

void Ogre::GLStateCacheManager::setEnabled | ( | GLenum | flag,
|  | bool | enabled
| ) |  |

Enables a piece of OpenGL functionality.

Parameters

  flag | The function to enable.

## ◆ getPolygonMode()

GLenum Ogre::GLStateCacheManager::getPolygonMode | ( | void |  | ) | const
| inline

Gets the current polygon rendering mode, fill, wireframe, points, etc.

Returns
  The current polygon rendering mode.

## ◆ setPolygonMode()

void Ogre::GLStateCacheManager::setPolygonMode | ( | GLenum | mode | ) |

Sets the current polygon rendering mode.

Parameters

  mode | The polygon mode to use.

## ◆ getCullFace()

GLenum Ogre::GLStateCacheManager::getCullFace | ( | void |  | ) | const
| inline

Sets the face culling mode.

Returns
  The current face culling mode

## ◆ setCullFace()

void Ogre::GLStateCacheManager::setCullFace | ( | GLenum | face | ) |

Sets the face culling setting.

Parameters

  face | The face culling mode to use.

## ◆ enableTextureCoordGen()

void Ogre::GLStateCacheManager::enableTextureCoordGen | ( | GLenum | type | ) |

Enable the specified texture coordinate generation option for the currently active texture unit.

## ◆ disableTextureCoordGen()

void Ogre::GLStateCacheManager::disableTextureCoordGen | ( | GLenum | type | ) |

Disable the specified texture coordinate generation option for the currently active texture unit.

## ◆ setMaterialAmbient()

void Ogre::GLStateCacheManager::setMaterialAmbient | ( | GLfloat | r,
|  | GLfloat | g,
|  | GLfloat | b,
|  | GLfloat | a
| ) |  |

## ◆ setMaterialDiffuse()

void Ogre::GLStateCacheManager::setMaterialDiffuse | ( | GLfloat | r,
|  | GLfloat | g,
|  | GLfloat | b,
|  | GLfloat | a
| ) |  |

## ◆ setMaterialEmissive()

void Ogre::GLStateCacheManager::setMaterialEmissive | ( | GLfloat | r,
|  | GLfloat | g,
|  | GLfloat | b,
|  | GLfloat | a
| ) |  |

## ◆ setMaterialSpecular()

void Ogre::GLStateCacheManager::setMaterialSpecular | ( | GLfloat | r,
|  | GLfloat | g,
|  | GLfloat | b,
|  | GLfloat | a
| ) |  |

## ◆ setMaterialShininess()

void Ogre::GLStateCacheManager::setMaterialShininess | ( | GLfloat | shininess | ) |

## ◆ setPointSize()

void Ogre::GLStateCacheManager::setPointSize | ( | GLfloat | size | ) |

## ◆ setPointParameters()

void Ogre::GLStateCacheManager::setPointParameters | ( | GLfloat * | attenuation,
|  | float | minSize,
|  | float | maxSize
| ) |  |

## ◆ setViewport()

void Ogre::GLStateCacheManager::setViewport | ( | GLint | x,
|  | GLint | y,
|  | GLsizei | width,
|  | GLsizei | height
| ) |  |

## ◆ getViewport()

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

## ◆ getColourMask()

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

Gets the current colour mask setting.

Returns
  An array containing the mask in RGBA order.

## ◆ getDepthMask()

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

Gets the current depth mask setting.

Returns
  The current depth mask.

## ◆ getStencilMask()

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

Gets the current stencil mask.

Returns
  The stencil mask.

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

- OgreGLStateCacheManager.h