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);
GLuint mLastBoundTexID
Stores the last bound texture id.
GLclampf getClearDepth(void) const
See GLES2StateCacheManager.getClearDepth.
BindBufferMap mActiveBufferMap
A map of different buffer types and the currently bound buffer for each type.
GLenum mBlendFuncSource
Stores the current blend source function.
vector< GLuint >::type mEnabledVertexAttribs
Stores the currently enabled vertex attributes.
GLenum getCullFace(void) const
See GLES2StateCacheManager.getCullFace.
void setDiscardBuffers(unsigned int flags)
See GLES2StateCacheManager.setDiscardBuffers.
TexParameterfMap mTexParameterfMap
GLenum getPolygonMode(void) const
See GLES2StateCacheManager.getPolygonMode.
GLenum getDepthFunc(void) const
See GLES2StateCacheManager.getDepthFunc.
TexParameteriMap mTexParameteriMap
unsigned int getDiscardBuffers(void) const
See GLES2StateCacheManager.getDiscardBuffers.
GLboolean getDepthMask(void) const
See GLES2StateCacheManager.getDepthMask.
void setPolygonMode(GLenum mode)
See GLES2StateCacheManager.setPolygonMode.
vector< GLenum >::type mEnableVector
Array of each OpenGL feature that is enabled i.e. blending, depth test, etc.
TexUnitsMap mTexUnitsMap
A map of texture parameters for each texture unit.
GLuint getStencilMask(void) const
See GLES2StateCacheManager.getStencilMask.
GLenum mBlendFuncDest
Stores the current blend destination function.
GLenum getBlendEquation(void) const
See GLES2StateCacheManager.getBlendEquation.
HashMap< GLenum, GLint > TexParameteriMap
HashMap< GLenum, GLfloat > TexParameterfMap
This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info...
HashMap< GLenum, GLuint > BindBufferMap
GLenum mActiveTextureUnit
Stores the currently active texture unit.
Ogre::GeneralAllocatedObject StateCacheAlloc
vector< GLboolean >::type & getColourMask(void)
See GLES2StateCacheManager.getColourMask.
HashMap< GLuint, TextureUnitParams > TexUnitsMap
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...