29 #ifndef __GLStateCacheManagerImp_H__
30 #define __GLStateCacheManagerImp_H__
51 mTexParameteriMap.clear();
89 GLenum mBlendEquation;
91 GLenum mBlendFuncSource;
93 GLenum mBlendFuncDest;
103 size_t mActiveTextureUnit;
105 unsigned int mDiscardBuffers;
107 GLclampf mClearDepth;
111 GLenum mBlendEquationRGB;
112 GLenum mBlendEquationAlpha;
117 GLfloat mSpecular[4];
118 GLfloat mEmissive[4];
119 GLfloat mLightAmbient[4];
122 GLfloat mPointAttenuation[3];
124 GLfloat mPointSizeMin;
125 GLfloat mPointSizeMax;
132 void initializeCache();
138 void bindGLBuffer(GLenum target, GLuint buffer, GLenum attach = 0,
bool force =
false);
141 void deleteGLBuffer(GLenum target, GLuint buffer, GLenum attach = 0,
bool force =
false);
144 void bindGLTexture(GLenum target, GLuint texture);
147 void setTexParameteri(GLenum target, GLenum pname, GLint param);
150 void invalidateStateForTexture(GLuint texture);
153 bool activateGLTextureUnit(
size_t unit);
159 void setBlendEquation(GLenum eq);
162 void setBlendEquation(GLenum eqRGB, GLenum eqA);
165 void setBlendFunc(GLenum source, GLenum dest);
168 void setShadeModel(GLenum model);
171 void setLightAmbient(GLfloat r, GLfloat g, GLfloat b);
177 void setDepthMask(GLboolean mask);
183 void setDepthFunc(GLenum func);
189 void setClearDepth(GLclampf depth);
192 void setClearColour(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
198 void setColourMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
204 void setStencilMask(GLuint mask);
207 void setEnabled(GLenum flag);
210 void setDisabled(GLenum flag);
222 void setPolygonMode(GLenum mode);
228 void setCullFace(GLenum face);
231 void enableTextureCoordGen(GLenum type);
233 void disableTextureCoordGen(GLenum type);
236 void setMaterialAmbient(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
237 void setMaterialDiffuse(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
238 void setMaterialEmissive(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
239 void setMaterialSpecular(GLfloat r, GLfloat g, GLfloat b, GLfloat a);
240 void setMaterialShininess(GLfloat shininess);
241 void setPointSize(GLfloat size);
242 void setPointParameters(GLfloat* attenuation,
float minSize,
float maxSize);
245 void setViewport(GLint x, GLint y, GLsizei width, GLsizei height);
248 void getViewport(
int* array);