29 #ifndef __GLStateCacheManager_H__
30 #define __GLStateCacheManager_H__
40 class GLStateCacheManagerImp;
72 void unregisterContext (intptr_t
id);
77 void switchContext (intptr_t
id);
88 void bindGLBuffer(GLenum target, GLuint buffer,
bool force =
false);
95 void deleteGLBuffer(GLenum target, GLuint buffer,
bool force =
false);
101 void bindGLTexture(GLenum target, GLuint texture);
106 void invalidateStateForTexture(GLuint texture);
113 void setTexParameteri(GLenum target, GLenum pname, GLint param);
119 bool activateGLTextureUnit(
size_t unit);
124 GLenum getBlendEquation(
void)
const;
129 void setBlendEquation(GLenum eq);
132 void setBlendEquation(GLenum eqRGB, GLenum eqA);
138 void setBlendFunc(GLenum source, GLenum dest);
140 void setShadeModel(GLenum model);
142 void setLightAmbient(GLfloat r, GLfloat g, GLfloat b);
147 GLboolean getDepthMask(
void)
const;
152 void setDepthMask(GLboolean mask);
157 GLenum getDepthFunc(
void)
const;
162 void setDepthFunc(GLenum func);
167 GLclampf getClearDepth(
void)
const;
172 void setClearDepth(GLclampf depth);
180 void setClearColour(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
193 void setColourMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
198 GLuint getStencilMask(
void)
const;
203 void setStencilMask(GLuint mask);
208 void setEnabled(GLenum flag);
213 void setDisabled(GLenum flag);
218 unsigned int getDiscardBuffers(
void)
const;
223 void setDiscardBuffers(
unsigned int flags);
228 GLenum getPolygonMode(
void)
const;
233 void setPolygonMode(GLenum mode);
238 GLenum getCullFace(
void)
const;
243 void setCullFace(GLenum face);
246 void enableTextureCoordGen(GLenum type);
248 void disableTextureCoordGen(GLenum type);
251 void setMaterialAmbient(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
252 void setMaterialDiffuse(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
253 void setMaterialEmissive(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
254 void setMaterialSpecular(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
255 void setMaterialShininess(GLfloat shininess);
256 void setPointSize(GLfloat size);
257 void setPointParameters(GLfloat* attenuation,
float minSize,
float maxSize);
259 void setViewport(GLint x, GLint y, GLsizei width, GLsizei height);
260 void getViewport(
int* array);
GLStateCacheManagerImp * mImp
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
An in memory cache of the OpenGL state.
MapIterator< CachesMap > CachesMapIterator
Ogre::GeneralAllocatedObject StateCacheAlloc
map< intptr_t, GLStateCacheManagerImp * >::type CachesMap
An in memory cache of the OpenGL state.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...