An in memory cache of the OpenGL state. More...
#include <OgreGLStateCacheManager.h>

Public Member Functions | |
| GLStateCacheManager (void) | |
| ~GLStateCacheManager (void) | |
| bool | activateGLTextureUnit (size_t unit) |
| Activate an OpenGL texture unit. | |
| void | bindGLBuffer (GLenum target, GLuint buffer, bool force=false) |
| Bind an OpenGL buffer of any type. | |
| void | bindGLTexture (GLenum target, GLuint texture) |
| Bind an OpenGL texture of any type. | |
| void | clearCache () |
| Clears all cached values. | |
| void | deleteGLBuffer (GLenum target, GLuint buffer, bool force=false) |
| Delete an OpenGL buffer of any type. | |
| void | disableTextureCoordGen (GLenum type) |
| Disable the specified texture coordinate generation option for the currently active texture unit. | |
| void | enableTextureCoordGen (GLenum type) |
| Enable the specified texture coordinate generation option for the currently active texture unit. | |
| GLenum | getBlendEquation (void) const |
| Gets the current blend equation setting. | |
| GLclampf | getClearDepth (void) const |
| Gets the clear depth in the range from [0..1]. | |
| vector< GLboolean >::type & | getColourMask (void) const |
| Gets the current colour mask setting. | |
| GLenum | getCullFace (void) const |
| Sets the face culling mode. | |
| GLenum | getDepthFunc (void) const |
| Gets the current depth test function. | |
| GLboolean | getDepthMask (void) const |
| Gets the current depth mask setting. | |
| unsigned int | getDiscardBuffers (void) const |
| Gets the mask of buffers to be discarded if GL_EXT_discard_framebuffer is supported. | |
| GLenum | getPolygonMode (void) const |
| Gets the current polygon rendering mode, fill, wireframe, points, etc. | |
| GLuint | getStencilMask (void) const |
| Gets the current stencil mask. | |
| void | getViewport (int *array) |
| void | invalidateStateForTexture (GLuint texture) |
| Invalidates the state associated with a particular texture ID. | |
| void | operator delete (void *ptr) |
| void | operator delete (void *ptr, void *) |
| void | operator delete (void *ptr, const char *, int, const char *) |
| void | operator delete[] (void *ptr) |
| void | operator delete[] (void *ptr, const char *, int, const char *) |
| void * | operator new (size_t sz, const char *file, int line, const char *func) |
| operator new, with debug line info | |
| void * | operator new (size_t sz) |
| void * | operator new (size_t sz, void *ptr) |
| placement operator new | |
| void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
| array operator new, with debug line info | |
| void * | operator new[] (size_t sz) |
| void | setBlendEquation (GLenum eq) |
| Sets the current blend equation setting. | |
| void | setBlendEquation (GLenum eqRGB, GLenum eqA) |
| Set the blend equation for RGB and alpha separately. | |
| void | setBlendFunc (GLenum source, GLenum dest) |
| Sets the blending function. | |
| void | setClearColour (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) |
| Sets the color to clear to. | |
| void | setClearDepth (GLclampf depth) |
| Sets the clear depth in the range from [0..1]. | |
| void | setColourMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) |
| Sets the current colour mask. | |
| void | setCullFace (GLenum face) |
| Sets the face culling setting. | |
| void | setDepthFunc (GLenum func) |
| Sets the current depth test function. | |
| void | setDepthMask (GLboolean mask) |
| Sets the current depth mask setting. | |
| void | setDisabled (GLenum flag) |
| Disables a piece of OpenGL functionality. | |
| void | setDiscardBuffers (unsigned int flags) |
| Sets the mask of buffers to be discarded if GL_EXT_discard_framebuffer is supported. | |
| void | setEnabled (GLenum flag) |
| Enables a piece of OpenGL functionality. | |
| 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. | |
| void | setShadeModel (GLenum model) |
| void | setStencilMask (GLuint mask) |
| Sets the stencil mask. | |
| void | setTexParameteri (GLenum target, GLenum pname, GLint param) |
| Sets an integer parameter value per texture target. | |
| void | setViewport (GLint x, GLint y, GLsizei width, GLsizei height) |
| void | switchContext (intptr_t id) |
| void | unregisterContext (intptr_t id) |
| GL state is tracked per context, so call this function to drop all recorded state for a given context before you destroy it. | |
Private Types | |
| typedef map< intptr_t, GLStateCacheManagerImp * > ::type | CachesMap |
| typedef MapIterator< CachesMap > | CachesMapIterator |
Private Attributes | |
| CachesMap | mCaches |
| GLStateCacheManagerImp * | mImp |
An in memory cache of the OpenGL state.
Definition at line 55 of file OgreGLStateCacheManager.h.
typedef map<intptr_t, GLStateCacheManagerImp*>::type Ogre::GLStateCacheManager::CachesMap [private] |
Definition at line 59 of file OgreGLStateCacheManager.h.
typedef MapIterator<CachesMap> Ogre::GLStateCacheManager::CachesMapIterator [private] |
Definition at line 60 of file OgreGLStateCacheManager.h.
| bool Ogre::GLStateCacheManager::activateGLTextureUnit | ( | size_t | unit | ) |
Activate an OpenGL texture unit.
| unit | The texture unit to activate. |
| void Ogre::GLStateCacheManager::bindGLBuffer | ( | GLenum | target, |
| GLuint | buffer, | ||
| bool | force = false |
||
| ) |
Bind an OpenGL buffer of any type.
| target | The buffer target. |
| buffer | The buffer ID. |
| force | Optional parameter to force an update. |
| void Ogre::GLStateCacheManager::bindGLTexture | ( | GLenum | target, |
| GLuint | texture | ||
| ) |
Bind an OpenGL texture of any type.
| target | The texture target. |
| texture | The texture ID. |
Clears all cached values.
| void Ogre::GLStateCacheManager::deleteGLBuffer | ( | GLenum | target, |
| GLuint | buffer, | ||
| bool | force = false |
||
| ) |
Delete an OpenGL buffer of any type.
| target | The buffer target. |
| buffer | The buffer ID. |
| force | Optional parameter to force an update. |
| void Ogre::GLStateCacheManager::disableTextureCoordGen | ( | GLenum | type | ) |
Disable the specified texture coordinate generation option for the currently active texture unit.
| void Ogre::GLStateCacheManager::enableTextureCoordGen | ( | GLenum | type | ) |
Enable the specified texture coordinate generation option for the currently active texture unit.
| GLenum Ogre::GLStateCacheManager::getBlendEquation | ( | void | ) | const |
Gets the current blend equation setting.
| GLclampf Ogre::GLStateCacheManager::getClearDepth | ( | void | ) | const |
Gets the clear depth in the range from [0..1].
| vector<GLboolean>::type& Ogre::GLStateCacheManager::getColourMask | ( | void | ) | const |
Gets the current colour mask setting.
| GLenum Ogre::GLStateCacheManager::getCullFace | ( | void | ) | const |
Sets the face culling mode.
| GLenum Ogre::GLStateCacheManager::getDepthFunc | ( | void | ) | const |
Gets the current depth test function.
| GLboolean Ogre::GLStateCacheManager::getDepthMask | ( | void | ) | const |
Gets the current depth mask setting.
| unsigned int Ogre::GLStateCacheManager::getDiscardBuffers | ( | void | ) | const |
Gets the mask of buffers to be discarded if GL_EXT_discard_framebuffer is supported.
| GLenum Ogre::GLStateCacheManager::getPolygonMode | ( | void | ) | const |
Gets the current polygon rendering mode, fill, wireframe, points, etc.
| GLuint Ogre::GLStateCacheManager::getStencilMask | ( | void | ) | const |
Gets the current stencil mask.
| void Ogre::GLStateCacheManager::getViewport | ( | int * | array | ) |
| void Ogre::GLStateCacheManager::invalidateStateForTexture | ( | GLuint | texture | ) |
Invalidates the state associated with a particular texture ID.
| texture | The texture ID. |
| void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) | [inherited] |
Definition at line 96 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, |
| void * | |||
| ) | [inherited] |
Definition at line 102 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr, |
| const char * | , | ||
| int | , | ||
| const char * | |||
| ) | [inherited] |
Definition at line 108 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) | [inherited] |
Definition at line 113 of file OgreMemoryAllocatedObject.h.
| void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr, |
| const char * | , | ||
| int | , | ||
| const char * | |||
| ) | [inherited] |
Definition at line 119 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, |
| const char * | file, | ||
| int | line, | ||
| const char * | func | ||
| ) | [inherited] |
operator new, with debug line info
Definition at line 68 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) | [inherited] |
Definition at line 73 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz, |
| void * | ptr | ||
| ) | [inherited] |
placement operator new
Definition at line 79 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz, |
| const char * | file, | ||
| int | line, | ||
| const char * | func | ||
| ) | [inherited] |
array operator new, with debug line info
Definition at line 86 of file OgreMemoryAllocatedObject.h.
| void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) | [inherited] |
Definition at line 91 of file OgreMemoryAllocatedObject.h.
| void Ogre::GLStateCacheManager::setBlendEquation | ( | GLenum | eq | ) |
Sets the current blend equation setting.
| eq | The blend equation to use. |
| void Ogre::GLStateCacheManager::setBlendEquation | ( | GLenum | eqRGB, |
| GLenum | eqA | ||
| ) |
Set the blend equation for RGB and alpha separately.
| void Ogre::GLStateCacheManager::setBlendFunc | ( | GLenum | source, |
| GLenum | dest | ||
| ) |
Sets the blending function.
| source | The blend mode for the source. |
| dest | The blend mode for the destination |
| void Ogre::GLStateCacheManager::setClearColour | ( | GLclampf | red, |
| GLclampf | green, | ||
| GLclampf | blue, | ||
| GLclampf | alpha | ||
| ) |
Sets the color to clear to.
| red | The red component. |
| green | The green component. |
| blue | The blue component. |
| alpha | The alpha component. |
| void Ogre::GLStateCacheManager::setClearDepth | ( | GLclampf | depth | ) |
Sets the clear depth in the range from [0..1].
| depth | The clear depth to use. |
| void Ogre::GLStateCacheManager::setColourMask | ( | GLboolean | red, |
| GLboolean | green, | ||
| GLboolean | blue, | ||
| GLboolean | alpha | ||
| ) |
Sets the current colour mask.
| red | The red component. |
| green | The green component. |
| blue | The blue component. |
| alpha | The alpha component. |
| void Ogre::GLStateCacheManager::setCullFace | ( | GLenum | face | ) |
Sets the face culling setting.
| face | The face culling mode to use. |
| void Ogre::GLStateCacheManager::setDepthFunc | ( | GLenum | func | ) |
Sets the current depth test function.
| func | The depth test function to use. |
| void Ogre::GLStateCacheManager::setDepthMask | ( | GLboolean | mask | ) |
Sets the current depth mask setting.
| mask | The depth mask to use. |
| void Ogre::GLStateCacheManager::setDisabled | ( | GLenum | flag | ) |
Disables a piece of OpenGL functionality.
| flag | The function to disable. |
| void Ogre::GLStateCacheManager::setDiscardBuffers | ( | unsigned int | flags | ) |
Sets the mask of buffers to be discarded if GL_EXT_discard_framebuffer is supported.
| flags | The bit mask of buffers to be discarded. Stored as Ogre::FrameBufferType. |
| void Ogre::GLStateCacheManager::setEnabled | ( | GLenum | flag | ) |
Enables a piece of OpenGL functionality.
| flag | The function to enable. |
| void Ogre::GLStateCacheManager::setLightAmbient | ( | GLfloat | r, |
| GLfloat | g, | ||
| GLfloat | b | ||
| ) |
| void Ogre::GLStateCacheManager::setMaterialAmbient | ( | GLfloat | r, |
| GLfloat | g, | ||
| GLfloat | b, | ||
| GLfloat | a | ||
| ) |
| void Ogre::GLStateCacheManager::setMaterialDiffuse | ( | GLfloat | r, |
| GLfloat | g, | ||
| GLfloat | b, | ||
| GLfloat | a | ||
| ) |
| void Ogre::GLStateCacheManager::setMaterialEmissive | ( | GLfloat | r, |
| GLfloat | g, | ||
| GLfloat | b, | ||
| GLfloat | a | ||
| ) |
| void Ogre::GLStateCacheManager::setMaterialShininess | ( | GLfloat | shininess | ) |
| void Ogre::GLStateCacheManager::setMaterialSpecular | ( | GLfloat | r, |
| GLfloat | g, | ||
| GLfloat | b, | ||
| GLfloat | a | ||
| ) |
| void Ogre::GLStateCacheManager::setPointParameters | ( | GLfloat * | attenuation, |
| float | minSize, | ||
| float | maxSize | ||
| ) |
| void Ogre::GLStateCacheManager::setPointSize | ( | GLfloat | size | ) |
| void Ogre::GLStateCacheManager::setPolygonMode | ( | GLenum | mode | ) |
Sets the current polygon rendering mode.
| mode | The polygon mode to use. |
| void Ogre::GLStateCacheManager::setShadeModel | ( | GLenum | model | ) |
| void Ogre::GLStateCacheManager::setStencilMask | ( | GLuint | mask | ) |
Sets the stencil mask.
| mask | The stencil mask to use |
| void Ogre::GLStateCacheManager::setTexParameteri | ( | GLenum | target, |
| GLenum | pname, | ||
| GLint | param | ||
| ) |
Sets an integer parameter value per texture target.
| target | The texture target. |
| pname | The parameter name. |
| param | The parameter value. |
| void Ogre::GLStateCacheManager::setViewport | ( | GLint | x, |
| GLint | y, | ||
| GLsizei | width, | ||
| GLsizei | height | ||
| ) |
| void Ogre::GLStateCacheManager::switchContext | ( | intptr_t | id | ) |
| id | new context to switch to for state tracking |
| void Ogre::GLStateCacheManager::unregisterContext | ( | intptr_t | id | ) |
GL state is tracked per context, so call this function to drop all recorded state for a given context before you destroy it.
CachesMap Ogre::GLStateCacheManager::mCaches [private] |
Definition at line 62 of file OgreGLStateCacheManager.h.
Definition at line 58 of file OgreGLStateCacheManager.h.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Mon Jul 27 2020 13:41:13