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,
bool enabled);
213 unsigned int getDiscardBuffers(
void)
const;
218 void setDiscardBuffers(
unsigned int flags);
223 GLenum getPolygonMode(
void)
const;
228 void setPolygonMode(GLenum mode);
233 GLenum getCullFace(
void)
const;
238 void setCullFace(GLenum face);
241 void enableTextureCoordGen(GLenum type);
243 void disableTextureCoordGen(GLenum type);
246 void setMaterialAmbient(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
247 void setMaterialDiffuse(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
248 void setMaterialEmissive(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
249 void setMaterialSpecular(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
250 void setMaterialShininess(GLfloat shininess);
251 void setPointSize(GLfloat size);
252 void setPointParameters(GLfloat* attenuation,
float minSize,
float maxSize);
254 void setViewport(GLint x, GLint y, GLsizei width, GLsizei height);
255 void getViewport(
int* array);
Ogre::GeneralAllocatedObject StateCacheAlloc
MapIterator< CachesMap > CachesMapIterator
GLStateCacheManagerImp * mImp
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
map< intptr_t, GLStateCacheManagerImp * >::type CachesMap
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
An in memory cache of the OpenGL state.
An in memory cache of the OpenGL state.