11 #ifndef _GROPENGLSTATE_H
12 #define _GROPENGLSTATE_H
19 #define MAX_UNIFORM_BUFFERS 6
53 GLuint active_texture_unit;
99 Assert( ((scale == 1.0
f) || (scale == 2.0
f) || (scale == 4.0
f)) );
105 Assert( ((scale == 1.0
f) || (scale == 2.0
f) || (scale == 4.0
f)) );
111 if (mode != units[active_texture_unit].env_mode) {
208 GLuint active_client_texture_unit;
209 GLuint num_client_texture_units;
214 GLuint color_array_Buffer;
215 GLint color_array_size;
218 GLvoid *color_array_pointer;
219 bool color_array_reset_ptr;
220 bool color_array_used_for_draw;
223 GLuint normal_array_Buffer;
226 GLvoid *normal_array_Pointer;
227 bool normal_array_reset_ptr;
228 bool normal_array_used_for_draw;
231 GLuint vertex_array_Buffer;
232 GLint vertex_array_Size;
235 GLvoid *vertex_array_Pointer;
236 bool vertex_array_reset_ptr;
237 bool vertex_array_used_for_draw;
242 GLuint element_array_buffer;
243 GLuint texture_array_buffer;
250 uniform_buffer_index_bindings[
i] = 0;
366 GLenum blendfunc_Value[2];
426 if (new_val != frontface_Value) {
429 frontface_Value = new_val;
433 return frontface_Value;
438 if (new_val != cullface_Value) {
441 cullface_Value = new_val;
445 return cullface_Value;
450 if ( !((s_val == blendfunc_Value[0]) && (d_val == blendfunc_Value[1])) ) {
452 blendfunc_Value[0] = s_val;
453 blendfunc_Value[1] = d_val;
461 return blendfunc_Value[0];
466 return blendfunc_Value[1];
471 if (new_val != depthfunc_Value) {
474 depthfunc_Value = new_val;
480 return depthfunc_Value;
490 if ( color_invalid || (red != red_Status) || (green != green_Status) || (blue != blue_Status) || (alpha != alpha_Status) ) {
493 green_Status =
green;
495 alpha_Status =
alpha;
496 color_invalid =
false;
502 color_invalid =
true;
511 #endif // _GROPENGLSTATE_H
GLboolean ColorMask(GLint state=-1)
void EnableVertexAttrib(GLuint index)
void SetPolygonMode(GLenum face, GLenum mode)
WINGDIAPI void APIENTRY glCullFace(GLenum mode)
void SetWrapS(GLenum mode)
WINGDIAPI void APIENTRY glTexGeni(GLenum coord, GLenum pname, GLint param)
void init(GLuint n_units)
void VertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLvoid *pointer)
void BindUniformBufferBindingIndex(GLuint id, GLuint index)
GLsizei const GLfloat * value
void Color(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha=255)
void SetTextureSource(gr_texture_source ts)
GLboolean StencilTest(GLint state=-1)
void SetTexgenModeS(GLenum mode)
GLboolean ScissorTest(GLint state=-1)
WINGDIAPI void APIENTRY glTexEnvf(GLenum target, GLenum pname, GLfloat param)
WINGDIAPI void APIENTRY glTexEnvi(GLenum target, GLenum pname, GLint param)
GLboolean DepthTest(GLint state=-1)
GLboolean TexgenR(GLint state=-1)
void SetTexgenModeR(GLenum mode)
void SetZbufferType(gr_zbuffer_type zt)
void BindElementBuffer(GLuint id)
void EnableClientNormal()
opengl_texture_state Texture
void EnableClientTexture()
GLboolean CullFace(GLint state=-1)
std::basic_string< char, std::char_traits< char >, std::allocator< char > > SCP_string
void DisableClientVertex()
void SetAlphaScale(GLfloat scale)
GLenum GLenum GLenum GLenum GLenum scale
GLboolean TexgenQ(GLint state=-1)
GLenum CullFaceValue(GLenum new_val=GL_INVALID_ENUM)
GLfloat AnisoFilter(GLfloat aniso=0.0f)
GLenum GLsizei GLsizei const GLvoid * pointer
void DisableClientNormal()
void SetEnvMode(GLenum mode)
void SetStencilType(gr_stencil_type st)
GLint GLenum GLboolean normalized
GLenum GLuint GLint GLenum face
void opengl_setup_render_states(int &r, int &g, int &b, int &alpha, int &tmap_type, int flags, int is_scaler=0)
void DisableClientColor()
GLboolean DepthMask(GLint state=-1)
GLdouble GLdouble GLdouble r
void gr_opengl_clear_states()
void SetPolygonOffset(GLfloat factor, GLfloat units)
GLboolean Light(GLint num, GLint state=-1)
GLboolean AlphaTest(GLint state=-1)
WINGDIAPI void APIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
void SetAlphaBlendMode(gr_alpha_blend ab)
#define MAX_UNIFORM_BUFFERS
void VertexPointer(GLint size, GLenum type, GLsizei stride, GLvoid *pointer)
WINGDIAPI void APIENTRY glDepthFunc(GLenum func)
WINGDIAPI void APIENTRY glFrontFace(GLenum mode)
void TexPointer(GLint size, GLenum type, GLsizei stride, GLvoid *pointer)
opengl_uniform_state Uniform
void BlendFunc(GLenum s_val, GLenum d_val)
void SetTarget(GLenum tex_target)
GLint GLint GLint GLint GLint x
GLboolean Normalize(GLint state=-1)
void Enable(GLuint tex_id=0)
void NormalPointer(GLenum type, GLsizei stride, GLvoid *pointer)
void SetWrapR(GLenum mode)
GLboolean Blend(GLint state=-1)
GLboolean TexgenT(GLint state=-1)
void ColorPointer(GLint size, GLenum type, GLsizei stride, GLvoid *pointer)
void init(GLuint n_units)
GLuint const GLchar * name
void BindArrayBuffer(GLuint id)
void SetTexgenModeQ(GLenum mode)
GLboolean GLboolean GLboolean b
GLboolean PolygonOffsetFill(GLint state=-1)
void SetWrapT(GLenum mode)
void DisableVertexAttrib(GLuint index)
GLboolean ClipPlane(GLint num, GLint state=-1)
void EnableClientVertex()
#define GL_TEXTURE_ENV_MODE
GLboolean Fog(GLint state=-1)
WINGDIAPI void APIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
WINGDIAPI void APIENTRY glAlphaFunc(GLenum func, GLclampf ref)
void DisableClientTexture()
#define GL_TEXTURE_GEN_MODE
void SetRGBScale(GLfloat scale)
void SetShaderMode(GLboolean mode)
void Delete(GLuint tex_id)
void SetActiveClientUnit(GLuint id)
GLenum DepthFunc(GLenum new_val=GL_INVALID_ENUM)
void AlphaFunc(GLenum f_val, GLclampf r_val)
void BindTextureBuffer(GLuint id)
void BindUniformBuffer(GLuint id)
GLboolean TexgenS(GLint state=-1)
void SetTexgenModeT(GLenum mode)
GLclampf GLclampf GLclampf alpha
gr_texture_source Current_texture_source
GLenum FrontFaceValue(GLenum new_val=GL_INVALID_ENUM)
GLboolean ClipDistance(GLint num, GLint state=-1)
void SetActiveUnit(GLuint id=0)
GLboolean Lighting(GLint state=-1)
void SetEnvCombineMode(GLenum cmode, GLenum cfunc)