29 #ifndef __GLES2StateCacheManagerImp_H__
30 #define __GLES2StateCacheManagerImp_H__
52 mTexParameteriMap.clear();
53 mTexParameterfMap.clear();
84 GLenum mBlendEquation;
100 unsigned int mDiscardBuffers;
102 GLclampf mClearDepth;
105 GLES2StateCacheManagerImp(
void);
106 ~GLES2StateCacheManagerImp(
void);
109 void initializeCache();
115 void bindGLBuffer(GLenum target, GLuint buffer, GLenum attach = 0,
bool force =
false);
118 void deleteGLBuffer(GLenum target, GLuint buffer, GLenum attach = 0,
bool force =
false);
121 void bindGLTexture(GLenum target, GLuint texture);
124 void setTexParameteri(GLenum target, GLenum pname, GLint param);
127 void setTexParameterf(GLenum target, GLenum pname, GLfloat params);
130 void getTexParameterfv(GLenum target, GLenum pname, GLfloat *params);
133 void invalidateStateForTexture(GLuint texture);
136 bool activateGLTextureUnit(
size_t unit);
142 void setBlendEquation(GLenum eq);
145 void setBlendFunc(GLenum source, GLenum dest);
151 void setDepthMask(GLboolean mask);
157 void setDepthFunc(GLenum func);
163 void setClearDepth(GLclampf depth);
166 void setClearColour(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
172 void setColourMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
178 void setStencilMask(GLuint mask);
181 void setEnabled(GLenum flag);
184 void setDisabled(GLenum flag);
187 void setVertexAttribEnabled(GLuint attrib);
190 void setVertexAttribDisabled(GLuint attrib);
208 void setCullFace(GLenum face);
GLboolean getDepthMask(void) const
See GLES2StateCacheManager.getDepthMask.
Ogre::GeneralAllocatedObject StateCacheAlloc
void setPolygonMode(GLenum mode)
See GLES2StateCacheManager.setPolygonMode.
unsigned int getDiscardBuffers(void) const
See GLES2StateCacheManager.getDiscardBuffers.
GLuint mLastBoundTexID
Stores the last bound texture id.
GLenum getCullFace(void) const
See GLES2StateCacheManager.getCullFace.
void setDiscardBuffers(unsigned int flags)
See GLES2StateCacheManager.setDiscardBuffers.
GLenum getPolygonMode(void) const
See GLES2StateCacheManager.getPolygonMode.
GLclampf getClearDepth(void) const
See GLES2StateCacheManager.getClearDepth.
BindBufferMap mActiveBufferMap
A map of different buffer types and the currently bound buffer for each type.
GLuint getStencilMask(void) const
See GLES2StateCacheManager.getStencilMask.
GLenum mBlendFuncDest
Stores the current blend destination function.
vector< GLboolean >::type & getColourMask(void)
See GLES2StateCacheManager.getColourMask.
HashMap< GLenum, GLint > TexParameteriMap
GLenum mActiveTextureUnit
Stores the currently active texture unit.
vector< GLenum >::type mEnableVector
Array of each OpenGL feature that is enabled i.e. blending, depth test, etc.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
TexParameteriMap mTexParameteriMap
GLenum mBlendFuncSource
Stores the current blend source function.
vector< GLuint >::type mEnabledVertexAttribs
Stores the currently enabled vertex attributes.
TexParameterfMap mTexParameterfMap
HashMap< GLenum, GLfloat > TexParameterfMap
GLenum getBlendEquation(void) const
See GLES2StateCacheManager.getBlendEquation.
TexUnitsMap mTexUnitsMap
A map of texture parameters for each texture unit.
GLenum getDepthFunc(void) const
See GLES2StateCacheManager.getDepthFunc.
HashMap< GLuint, TextureUnitParams > TexUnitsMap
HashMap< GLenum, GLuint > BindBufferMap