From 24b2f5892cbbb3b0cc32b8dc47a7d72586a289a7 Mon Sep 17 00:00:00 2001 From: nillerusr Date: Fri, 26 Nov 2021 20:51:33 +0300 Subject: [PATCH] Fix shaders compilation, replace some opengl functions with opengles analogs --- public/togles/linuxwin/cglmprogram.h | 3 +- public/togles/linuxwin/glfuncs.h | 44 +- public/togles/linuxwin/glmgr.h | 52 +- togles/linuxwin/cglmprogram.cpp | 26 +- togles/linuxwin/cglmquery.cpp | 4 +- togles/linuxwin/cglmtex.cpp | 2327 +++++++++++++++++++++++++- togles/linuxwin/decompress.c | 341 ++++ togles/linuxwin/decompress.h | 19 + togles/linuxwin/decompress.o | Bin 0 -> 35548 bytes togles/linuxwin/dx9asmtogl2.cpp | 63 +- togles/linuxwin/dxabstract.cpp | 4 +- togles/linuxwin/glentrypoints.cpp | 14 +- togles/linuxwin/glmgr.cpp | 171 +- togles/linuxwin/glmgr_flush.inl | 12 +- togles/linuxwin/glmgrbasics.cpp | 615 ------- togles/linuxwin/stb_dxt_104.h | 624 +++++++ 16 files changed, 3461 insertions(+), 858 deletions(-) create mode 100644 togles/linuxwin/decompress.c create mode 100644 togles/linuxwin/decompress.h create mode 100644 togles/linuxwin/decompress.o create mode 100644 togles/linuxwin/stb_dxt_104.h diff --git a/public/togles/linuxwin/cglmprogram.h b/public/togles/linuxwin/cglmprogram.h index 9d862f64..63f74d68 100644 --- a/public/togles/linuxwin/cglmprogram.h +++ b/public/togles/linuxwin/cglmprogram.h @@ -263,7 +263,8 @@ public: GLint m_locVertexParams; // "vc" per dx9asmtogl2 convention GLint m_locVertexBoneParams; // "vcbones" GLint m_locVertexInteger0; // "i0" - + GLint m_locAlphaRef; // "alpha_ref" + enum { cMaxVertexShaderBoolUniforms = 4, cMaxFragmentShaderBoolUniforms = 1 }; GLint m_locVertexBool[cMaxVertexShaderBoolUniforms]; // "b0", etc. diff --git a/public/togles/linuxwin/glfuncs.h b/public/togles/linuxwin/glfuncs.h index 72a5bb0f..220416a5 100644 --- a/public/togles/linuxwin/glfuncs.h +++ b/public/togles/linuxwin/glfuncs.h @@ -30,18 +30,16 @@ GL_FUNC_VOID(OpenGL,true,glAlphaFunc,(GLenum a,GLclampf b),(a,b)) GL_FUNC_VOID(OpenGL,true,glAttachShader,(GLuint a, GLuint b),(a,b)) GL_FUNC_VOID(OpenGL,true,glBindAttribLocation,(GLuint a,GLuint b,const GLchar *c),(a,b,c)) GL_FUNC_VOID(OpenGL,true,glBindBuffer,(GLenum a,GLuint b),(a,b)) -GL_FUNC_VOID(OpenGL,true,glBindProgram,(GLenum a,GLuint b),(a,b)) GL_FUNC_VOID(OpenGL,true,glBindTexture,(GLenum a,GLuint b),(a,b)) GL_FUNC_VOID(OpenGL,true,glBlendColor,(GLclampf a,GLclampf b,GLclampf c,GLclampf d),(a,b,c,d)) GL_FUNC_VOID(OpenGL,true,glBlendEquation,(GLenum a),(a)) GL_FUNC_VOID(OpenGL,true,glBlendFunc,(GLenum a,GLenum b),(a,b)) GL_FUNC_VOID(OpenGL,true,glBufferData,(GLenum a, GLsizeiptr b, const GLvoid *c,GLenum d),(a,b,c,d)) GL_FUNC_VOID(OpenGL,true,glClear,(GLbitfield a),(a)) +GL_FUNC_VOID(OpenGL,true,glClearDepthf,(GLfloat a),(a)) GL_FUNC_VOID(OpenGL,true,glClearColor,(GLclampf a,GLclampf b,GLclampf c,GLclampf d),(a,b,c,d)) -GL_FUNC_VOID(OpenGL,true,glClearDepth,(GLclampd a),(a)) GL_FUNC_VOID(OpenGL,true,glReadPixels, (GLint a, GLint b, GLsizei c, GLsizei d, GLenum e, GLenum f, void * g), (a,b,c,d,e,f,g)) GL_FUNC_VOID(OpenGL,true,glClearStencil,(GLint a),(a)) -GL_FUNC_VOID(OpenGL,true,glClipPlane,(GLenum a,const GLdouble *b),(a,b)) GL_FUNC_VOID(OpenGL,true,glColorMask,(GLboolean a,GLboolean b,GLboolean c,GLboolean d),(a,b,c,d)) GL_FUNC_VOID(OpenGL,true,glCompileShader,(GLuint a),(a)) GL_FUNC_VOID(OpenGL,true,glGetShaderiv,(GLuint a, GLenum b, GLint *c),(a,b,c)) @@ -52,20 +50,17 @@ GL_FUNC_VOID(OpenGL,true,glCompressedTexImage3D,(GLenum a,GLint b,GLenum c,GLsiz GL_FUNC(OpenGL,true,GLuint,glCreateProgram,(void),()) GL_FUNC(OpenGL,true,GLuint,glCreateShader,(GLenum a),(a)) GL_FUNC_VOID(OpenGL,true,glDeleteBuffers,(GLsizei a,const GLuint *b),(a,b)) -GL_FUNC_VOID(OpenGL,true,glDeleteObject,(GLuint a),(a)) -GL_FUNC_VOID(OpenGL,true,glDeletePrograms,(GLsizei a,const GLuint *b),(a,b)) +GL_FUNC_VOID(OpenGL,true,glDeleteProgram,(GLuint a),(a)) GL_FUNC_VOID(OpenGL,true,glDeleteShader,(GLuint a),(a)) GL_FUNC_VOID(OpenGL,true,glDeleteTextures,(GLsizei a,const GLuint *b),(a,b)) GL_FUNC_VOID(OpenGL,true,glDepthFunc,(GLenum a),(a)) GL_FUNC_VOID(OpenGL,true,glDepthMask,(GLboolean a),(a)) GL_FUNC_VOID(OpenGL,true,glDepthRangef,(GLfloat a,GLfloat b),(a,b)) -GL_FUNC_VOID(OpenGL,true,glDepthRange,(GLclampd a,GLclampd b),(a,b)) -GL_FUNC_VOID(OpenGL,true,glDetachObject,(GLuint a,GLuint b),(a,b)) GL_FUNC_VOID(OpenGL,true,glDisable,(GLenum a),(a)) GL_FUNC_VOID(OpenGL,true,glDisableVertexAttribArray,(GLuint a),(a)) GL_FUNC_VOID(OpenGL,true,glDrawArrays,(GLenum a,GLint b,GLsizei c),(a,b,c)) -GL_FUNC_VOID(OpenGL,true,glDrawBuffer,(GLenum a),(a)) GL_FUNC_VOID(OpenGL,true,glDrawBuffers,(GLsizei a,const GLenum *b),(a,b)) +GL_FUNC_VOID(OpenGL,true,glDetachShader,(GLuint a,GLuint b),(a,b)) GL_FUNC_VOID(OpenGL,true,glDrawRangeElements,(GLenum a,GLuint b,GLuint c,GLsizei d,GLenum e,const GLvoid *f),(a,b,c,d,e,f)) #ifndef OSX // 10.6/GL 2.1 compatability GL_FUNC_VOID(OpenGL,true,glDrawRangeElementsBaseVertex,(GLenum a,GLuint b,GLuint c,GLsizei d,GLenum e,const GLvoid *f, GLenum g),(a,b,c,d,e,f,g)) @@ -76,35 +71,27 @@ GL_FUNC_VOID(OpenGL,true,glFinish,(void),()) GL_FUNC_VOID(OpenGL,true,glFlush,(void),()) GL_FUNC_VOID(OpenGL,true,glFrontFace,(GLenum a),(a)) GL_FUNC_VOID(OpenGL,true,glGenBuffers,(GLsizei a,GLuint *b),(a,b)) -GL_FUNC_VOID(OpenGL,true,glGenPrograms,(GLsizei a,GLuint *b),(a,b)) GL_FUNC_VOID(OpenGL,true,glGenTextures,(GLsizei a,GLuint *b),(a,b)) GL_FUNC_VOID(OpenGL,true,glGetBooleanv,(GLenum a,GLboolean *b),(a,b)) -GL_FUNC_VOID(OpenGL,true,glGetCompressedTexImage,(GLenum a,GLint b,GLvoid *c),(a,b,c)) -GL_FUNC_VOID(OpenGL,true,glGetDoublev,(GLenum a,GLdouble *b),(a,b)) GL_FUNC_VOID(OpenGL,true,glGetFloatv,(GLenum a,GLfloat *b),(a,b)) -GL_FUNC_VOID(OpenGL,true,glGetInfoLog,(GLuint a,GLsizei b,GLsizei *c,GLchar *d),(a,b,c,d)) +//GL_FUNC_VOID(OpenGL,true,glGetInfoLog,(GLuint a,GLsizei b,GLsizei *c,GLchar *d),(a,b,c,d)) GL_FUNC_VOID(OpenGL,true,glGetIntegerv,(GLenum a,GLint *b),(a,b)) -GL_FUNC_VOID(OpenGL,true,glGetObjectParameteriv,(GLuint a,GLenum b,GLint *c),(a,b,c)) GL_FUNC_VOID(OpenGL,true,glGetProgramiv,(GLenum a,GLenum b,GLint *c),(a,b,c)) GL_FUNC(OpenGL,true,const GLubyte *,glGetString,(GLenum a),(a)) -GL_FUNC_VOID(OpenGL,true,glGetTexImage,(GLenum a,GLint b,GLenum c,GLenum d,GLvoid *e),(a,b,c,d,e)) GL_FUNC(OpenGL,true,GLint,glGetUniformLocation,(GLuint a,const GLchar *b),(a,b)) GL_FUNC(OpenGL,true,GLboolean,glIsEnabled,(GLenum a),(a)) GL_FUNC(OpenGL,true,GLboolean,glIsTexture,(GLuint a),(a)) GL_FUNC_VOID(OpenGL,true,glLinkProgram,(GLuint a),(a)) -GL_FUNC_VOID(OpenGL,true,glOrtho,(GLdouble a,GLdouble b,GLdouble c,GLdouble d,GLdouble e,GLdouble f),(a,b,c,d,e,f)) +//GL_FUNC_VOID(OpenGL,true,glOrtho,(GLdouble a,GLdouble b,GLdouble c,GLdouble d,GLdouble e,GLdouble f),(a,b,c,d,e,f)) GL_FUNC_VOID(OpenGL,true,glPixelStorei,(GLenum a,GLint b),(a,b)) -GL_FUNC_VOID(OpenGL,true,glPolygonMode,(GLenum a,GLenum b),(a,b)) +//GL_FUNC_VOID(OpenGL,true,glPolygonMode,(GLenum a,GLenum b),(a,b)) GL_FUNC_VOID(OpenGL,true,glPolygonOffset,(GLfloat a,GLfloat b),(a,b)) -GL_FUNC_VOID(OpenGL,true,glPopAttrib,(void),()) -GL_FUNC_VOID(OpenGL,true,glPushAttrib,(GLbitfield a),(a)) GL_FUNC_VOID(OpenGL,true,glReadBuffer,(GLenum a),(a)) GL_FUNC_VOID(OpenGL,true,glScissor,(GLint a,GLint b,GLsizei c,GLsizei d),(a,b,c,d)) GL_FUNC_VOID(OpenGL,true,glShaderSource,(GLuint a,GLsizei b,const GLchar **c,const GLint *d),(a,b,c,d)) GL_FUNC_VOID(OpenGL,true,glStencilFunc,(GLenum a,GLint b,GLuint c),(a,b,c)) GL_FUNC_VOID(OpenGL,true,glStencilMask,(GLuint a),(a)) GL_FUNC_VOID(OpenGL,true,glStencilOp,(GLenum a,GLenum b,GLenum c),(a,b,c)) -GL_FUNC_VOID(OpenGL,true,glTexCoord2f,(GLfloat a,GLfloat b),(a,b)) GL_FUNC_VOID(OpenGL,true,glTexImage2D,(GLenum a,GLint b,GLint c,GLsizei d,GLsizei e,GLint f,GLenum g,GLenum h,const GLvoid *i),(a,b,c,d,e,f,g,h,i)) GL_FUNC_VOID(OpenGL,true,glTexImage3D,(GLenum a,GLint b,GLint c,GLsizei d,GLsizei e,GLsizei f,GLint g,GLenum h,GLenum i,const GLvoid *j),(a,b,c,d,e,f,g,h,i,j)) GL_FUNC_VOID(OpenGL,true,glTexParameterfv,(GLenum a,GLenum b,const GLfloat *c),(a,b,c)) @@ -115,16 +102,9 @@ GL_FUNC_VOID(OpenGL,true,glUniform1i,(GLint a,GLint b),(a,b)) GL_FUNC_VOID(OpenGL,true,glUniform4fv,(GLint a,GLsizei b,const GLfloat *c),(a,b,c)) GL_FUNC(OpenGL,true,GLboolean,glUnmapBuffer,(GLenum a),(a)) GL_FUNC_VOID(OpenGL,true,glUseProgram,(GLuint a),(a)) -GL_FUNC_VOID(OpenGL,true,glVertex3f,(GLfloat a,GLfloat b,GLfloat c),(a,b,c)) GL_FUNC_VOID(OpenGL,true,glVertexAttribPointer,(GLuint a,GLint b,GLenum c,GLboolean d,GLsizei e,const GLvoid *f),(a,b,c,d,e,f)) GL_FUNC_VOID(OpenGL,true,glViewport,(GLint a,GLint b,GLsizei c,GLsizei d),(a,b,c,d)) -GL_FUNC_VOID(OpenGL,true,glEnableClientState,(GLenum a),(a)) -GL_FUNC_VOID(OpenGL,true,glDisableClientState,(GLenum a),(a)) GL_FUNC_VOID(OpenGL,true,glClientActiveTexture,(GLenum a),(a)) -GL_FUNC_VOID(OpenGL,true,glVertexPointer,(GLint a,GLenum b,GLsizei c,const GLvoid *d),(a,b,c,d)) -GL_FUNC_VOID(OpenGL,true,glTexCoordPointer,(GLint a,GLenum b,GLsizei c,const GLvoid *d),(a,b,c,d)) -GL_FUNC_VOID(OpenGL,true,glProgramEnvParameters4fvEXT,(GLenum a,GLuint b,GLsizei c,const GLfloat *d),(a,b,c,d)) -GL_FUNC_VOID(OpenGL,true,glColor4sv,(const GLshort *a),(a)) GL_FUNC_VOID(OpenGL,true,glStencilOpSeparate,(GLenum a,GLenum b,GLenum c,GLenum d),(a,b,c,d)) GL_FUNC_VOID(OpenGL,true,glStencilFuncSeparate,(GLenum a,GLenum b,GLint c,GLuint d),(a,b,c,d)) GL_FUNC_VOID(OpenGL,true,glGetTexLevelParameteriv,(GLenum a,GLint b,GLenum c,GLint *d),(a,b,c,d)) @@ -164,11 +144,6 @@ GL_FUNC_VOID(GL_ARB_sync,false,glWaitSync,(GLsync a, GLbitfield b, GLuint64 c),( GL_FUNC_VOID(GL_ARB_sync,false,glDeleteSync,(GLsync a),(a)) GL_FUNC(GL_ARB_sync,false,GLsync,glFenceSync,(GLenum a, GLbitfield b),(a,b)) #endif -GL_EXT(GL_EXT_draw_buffers2,-1,-1) -GL_FUNC_VOID(GL_EXT_draw_buffers2,true,glColorMaskIndexedEXT,(GLuint a,GLboolean b,GLboolean c,GLboolean d,GLboolean e),(a,b,c,d,e)) -GL_FUNC_VOID(GL_EXT_draw_buffers2,true,glEnableIndexedEXT,(GLenum a,GLuint b),(a,b)) -GL_FUNC_VOID(GL_EXT_draw_buffers2,true,glDisableIndexedEXT,(GLenum a,GLuint b),(a,b)) -GL_FUNC_VOID(GL_EXT_draw_buffers2,true,glGetBooleanIndexedvEXT,(GLenum a,GLuint b,GLboolean *c),(a,b,c)) GL_EXT(GL_EXT_bindable_uniform,-1,-1) GL_FUNC_VOID(GL_EXT_bindable_uniform,false,glUniformBufferEXT,(GLuint a,GLint b,GLuint c),(a,b,c)) GL_FUNC(GL_EXT_bindable_uniform,false,int,glGetUniformBufferSizeEXT,(GLenum a, GLenum b),(a,b)) @@ -212,7 +187,7 @@ GL_FUNC_VOID(OpenGL,false,glDeleteRenderbuffers,(GLsizei a,const GLuint *b),(a,b GL_FUNC_VOID(OpenGL,false,glFramebufferRenderbuffer,(GLenum a,GLenum b,GLenum c,GLuint d),(a,b,c,d)) GL_FUNC_VOID(OpenGL,false,glFramebufferTexture2D,(GLenum a,GLenum b,GLenum c,GLuint d,GLint e),(a,b,c,d,e)) GL_FUNC_VOID(OpenGL,false,glFramebufferTexture3D,(GLenum a,GLenum b,GLenum c,GLuint d,GLint e,GLint f),(a,b,c,d,e,f)) -GL_FUNC_VOID(OpenGL,false,glGenFramebuffers,(GLsizei a,GLuint *b),(a,b)) +GL_FUNC_VOID(OpenGL,true,glGenFramebuffers,(GLsizei a,GLuint *b),(a,b)) GL_FUNC_VOID(OpenGL,false,glGenRenderbuffers,(GLsizei a,GLuint *b),(a,b)) GL_FUNC_VOID(OpenGL,false,glDeleteFramebuffers,(GLsizei a,const GLuint *b),(a,b)) GL_FUNC_VOID(OpenGL,false,glBlitFramebuffer,(GLint a,GLint b,GLint c,GLint d,GLint e,GLint f,GLint g,GLint h,GLbitfield i,GLenum j),(a,b,c,d,e,f,g,h,i,j)) @@ -248,9 +223,6 @@ GL_FUNC_VOID(OpenGL,true,glGenQueries,(GLsizei n, GLuint *ids), (n, ids)) GL_FUNC_VOID(OpenGL,true,glDeleteQueries,(GLsizei n, const GLuint *ids),(n, ids)) GL_FUNC_VOID(OpenGL,true,glBeginQuery,(GLenum target, GLuint id), (target, id)) GL_FUNC_VOID(OpenGL,true,glEndQuery,(GLenum target), (target)) -GL_FUNC_VOID(OpenGL,true,glQueryCounter,(GLuint id, GLenum target), (id, target)) -GL_FUNC_VOID(OpenGL,true,glGetQueryObjectiv,(GLuint id, GLenum pname, GLint *params), (id, pname, params)) -GL_FUNC_VOID(OpenGL,true,glGetQueryObjectui64v,(GLuint id, GLenum pname, GLuint64 *params), (id, pname, params)) GL_FUNC_VOID(OpenGL,true,glCopyBufferSubData,(GLenum readtarget, GLenum writetarget, GLintptr readoffset, GLintptr writeoffset, GLsizeiptr size),(readtarget, writetarget, readoffset, writeoffset, size)) #endif // !OSX @@ -264,8 +236,6 @@ GL_FUNC_VOID(OpenGL,true,glBindVertexArray,(GLuint a),(a)) #endif // !OSX GL_EXT(GL_EXT_texture_sRGB_decode,-1,-1) -GL_FUNC_VOID(OpenGL,true,glPushClientAttrib,(GLbitfield a),(a)) -GL_FUNC_VOID(OpenGL,true,glPopClientAttrib,(void),()) GL_EXT(GL_NVX_gpu_memory_info,-1,-1) GL_EXT(GL_ATI_meminfo,-1,-1) GL_EXT(GL_EXT_texture_compression_s3tc,-1,-1) diff --git a/public/togles/linuxwin/glmgr.h b/public/togles/linuxwin/glmgr.h index c1af97c1..a5ec89d6 100644 --- a/public/togles/linuxwin/glmgr.h +++ b/public/togles/linuxwin/glmgr.h @@ -198,9 +198,11 @@ FORCEINLINE void glGetEnumv( GLenum which, GLenum *dst ) // shorthand macros #define EQ(fff) ( (src.fff) == (fff) ) + //rasterizer struct GLAlphaTestEnable_t { GLint enable; inline bool operator==(const GLAlphaTestEnable_t& src) const { return EQ(enable); } }; struct GLAlphaTestFunc_t { GLenum func; GLclampf ref; inline bool operator==(const GLAlphaTestFunc_t& src) const { return EQ(func) && EQ(ref); } }; +struct GLAlphaTest_t { GLint enable; GLenum func; GLclampf ref; }; struct GLCullFaceEnable_t { GLint enable; inline bool operator==(const GLCullFaceEnable_t& src) const { return EQ(enable); } }; struct GLCullFrontFace_t { GLenum value; inline bool operator==(const GLCullFrontFace_t& src) const { return EQ(value); } }; struct GLPolygonMode_t { GLenum values[2]; inline bool operator==(const GLPolygonMode_t& src) const { return EQ(values[0]) && EQ(values[1]); } }; @@ -209,7 +211,7 @@ struct GLScissorEnable_t { GLint enable; inline bool operator==(co struct GLScissorBox_t { GLint x,y; GLsizei width, height; inline bool operator==(const GLScissorBox_t& src) const { return EQ(x) && EQ(y) && EQ(width) && EQ(height); } }; struct GLAlphaToCoverageEnable_t{ GLint enable; inline bool operator==(const GLAlphaToCoverageEnable_t& src) const { return EQ(enable); } }; struct GLViewportBox_t { GLint x,y; GLsizei width, height; uint widthheight; inline bool operator==(const GLViewportBox_t& src) const { return EQ(x) && EQ(y) && EQ(width) && EQ(height); } }; -struct GLViewportDepthRange_t { GLdouble flNear,flFar; inline bool operator==(const GLViewportDepthRange_t& src) const { return EQ(flNear) && EQ(flFar); } }; +struct GLViewportDepthRange_t { GLfloat flNear,flFar; inline bool operator==(const GLViewportDepthRange_t& src) const { return EQ(flNear) && EQ(flFar); } }; struct GLClipPlaneEnable_t { GLint enable; inline bool operator==(const GLClipPlaneEnable_t& src) const { return EQ(enable); } }; struct GLClipPlaneEquation_t { GLfloat x,y,z,w; inline bool operator==(const GLClipPlaneEquation_t& src) const { return EQ(x) && EQ(y) && EQ(z) && EQ(w); } }; @@ -235,7 +237,7 @@ struct GLStencilWriteMask_t { GLint mask; inline bool operator==(c //clearing struct GLClearColor_t { GLfloat r,g,b,a; inline bool operator==(const GLClearColor_t& src) const { return EQ(r) && EQ(g) && EQ(b) && EQ(a); } }; -struct GLClearDepth_t { GLdouble d; inline bool operator==(const GLClearDepth_t& src) const { return EQ(d); } }; +struct GLClearDepth_t { GLfloat d; inline bool operator==(const GLClearDepth_t& src) const { return EQ(d); } }; struct GLClearStencil_t { GLint s; inline bool operator==(const GLClearStencil_t& src) const { return EQ(s); } }; #undef EQ @@ -306,15 +308,20 @@ template void GLContextGetDefaultIndexed( T *dst, int index ); //=============================================================================== // template specializations for each type of state + +static GLAlphaTest_t g_alpha_test; + // --- GLAlphaTestEnable --- FORCEINLINE void GLContextSet( GLAlphaTestEnable_t *src ) { - glSetEnable( GL_ALPHA_TEST, src->enable != 0 ); +// glSetEnable( GL_ALPHA_TEST, src->enable != 0 ); + g_alpha_test.enable = src->enable; } FORCEINLINE void GLContextGet( GLAlphaTestEnable_t *dst ) { - dst->enable = gGL->glIsEnabled( GL_ALPHA_TEST ); +// dst->enable = gGL->glIsEnabled( GL_ALPHA_TEST ); + dst->enable = g_alpha_test.enable; } FORCEINLINE void GLContextGetDefault( GLAlphaTestEnable_t *dst ) @@ -326,12 +333,16 @@ FORCEINLINE void GLContextGetDefault( GLAlphaTestEnable_t *dst ) FORCEINLINE void GLContextSet( GLAlphaTestFunc_t *src ) { // gGL->glAlphaFunc( src->func, src->ref ); + g_alpha_test.func = src->func; + g_alpha_test.ref = src->ref; } FORCEINLINE void GLContextGet( GLAlphaTestFunc_t *dst ) { - glGetEnumv( GL_ALPHA_TEST_FUNC, &dst->func ); - gGL->glGetFloatv( GL_ALPHA_TEST_REF, &dst->ref ); +// glGetEnumv( GL_ALPHA_TEST_FUNC, &dst->func ); +// gGL->glGetFloatv( GL_ALPHA_TEST_REF, &dst->ref ); + dst->func = g_alpha_test.func; + dst->ref = g_alpha_test.ref; } FORCEINLINE void GLContextGetDefault( GLAlphaTestFunc_t *dst ) @@ -502,7 +513,7 @@ FORCEINLINE void GLContextSet( GLViewportDepthRange_t *src ) FORCEINLINE void GLContextGet( GLViewportDepthRange_t *dst ) { - gGL->glGetDoublev ( GL_DEPTH_RANGE, &dst->flNear ); + gGL->glGetFloatv( GL_DEPTH_RANGE, &dst->flNear ); } FORCEINLINE void GLContextGetDefault( GLViewportDepthRange_t *dst ) @@ -584,12 +595,26 @@ FORCEINLINE void GLContextGetDefault( GLColorMaskSingle_t *dst ) // --- GLColorMaskMultiple --- FORCEINLINE void GLContextSetIndexed( GLColorMaskMultiple_t *src, int index ) { - gGL->glColorMaskIndexedEXT ( index, src->r, src->g, src->b, src->a ); + GLint Rfbo = 0, Dfbo = 0; + + gGL->glGetIntegerv( GL_DRAW_FRAMEBUFFER_BINDING, &Dfbo ); + gGL->glGetIntegerv( GL_READ_FRAMEBUFFER_BINDING, &Rfbo ); + GLint target = Dfbo == Rfbo?GL_FRAMEBUFFER:GL_DRAW_FRAMEBUFFER; + gGL->glBindFramebuffer( target, index ); + gGL->glColorMask ( src->r, src->g, src->b, src->a ); + gGL->glBindFramebuffer( target, Dfbo ); } FORCEINLINE void GLContextGetIndexed( GLColorMaskMultiple_t *dst, int index ) { - gGL->glGetBooleanIndexedvEXT ( GL_COLOR_WRITEMASK, index, (GLboolean*)&dst->r ); + GLint Rfbo = 0, Dfbo = 0; + + gGL->glGetIntegerv( GL_DRAW_FRAMEBUFFER_BINDING, &Dfbo ); + gGL->glGetIntegerv( GL_READ_FRAMEBUFFER_BINDING, &Rfbo ); + GLint target = Dfbo == Rfbo?GL_FRAMEBUFFER:GL_DRAW_FRAMEBUFFER; + gGL->glBindFramebuffer( target, index ); + gGL->glGetBooleanv( GL_COLOR_WRITEMASK, (GLboolean*)&dst->r ); + gGL->glBindFramebuffer( target, Dfbo ); } FORCEINLINE void GLContextGetDefaultIndexed( GLColorMaskMultiple_t *dst, int index ) @@ -698,7 +723,7 @@ FORCEINLINE void GLContextSet( GLBlendEnableSRGB_t *src ) FORCEINLINE void GLContextGet( GLBlendEnableSRGB_t *dst ) { - //dst->enable = glIsEnabled( GL_FRAMEBUFFER_SRGB_EXT ); +// dst->enable = gGL->glIsEnabled( GL_FRAMEBUFFER_SRGB_EXT ); dst->enable = true; // wtf ? } @@ -864,13 +889,12 @@ FORCEINLINE void GLContextGetDefault( GLClearColor_t *dst ) // --- GLClearDepth --- FORCEINLINE void GLContextSet( GLClearDepth_t *src ) { -// TOFUCK: wut -// gGL->glClearDepth ( src->d ); + gGL->glClearDepthf( src->d ); } FORCEINLINE void GLContextGet( GLClearDepth_t *dst ) { - gGL->glGetDoublev ( GL_DEPTH_CLEAR_VALUE, &dst->d ); + gGL->glGetFloatv( GL_DEPTH_CLEAR_VALUE, &dst->d ); } FORCEINLINE void GLContextGetDefault( GLClearDepth_t *dst ) @@ -2285,7 +2309,7 @@ public: }; #define kMaxCrawlFrames 100 -#define kMaxCrawlText (kMaxCrawlFrames * 256) +#define kMaxCrawlText (kMaxCrawlFrames * 256) class CStackCrawlParams { public: diff --git a/togles/linuxwin/cglmprogram.cpp b/togles/linuxwin/cglmprogram.cpp index 137c91ac..50d4830c 100644 --- a/togles/linuxwin/cglmprogram.cpp +++ b/togles/linuxwin/cglmprogram.cpp @@ -718,7 +718,7 @@ CGLMShaderPair::~CGLMShaderPair( ) { if (m_program) { - gGL->glDeleteObject( m_program ); + gGL->glDeleteProgram( m_program ); m_program = 0; } } @@ -746,7 +746,7 @@ bool CGLMShaderPair::ValidateProgramPair() // check for success GLint result = GL_TRUE; - gGL->glGetObjectParameteriv( m_program, GL_OBJECT_LINK_STATUS_ARB, &result ); // want GL_TRUE + gGL->glGetProgramiv(m_program, GL_LINK_STATUS, &result); m_bCheckLinkStatus = false; if (result == GL_TRUE) @@ -762,12 +762,6 @@ bool CGLMShaderPair::ValidateProgramPair() GLint laux = 0; // do some digging - gGL->glGetObjectParameteriv( m_program, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length ); - - GLchar *logString = (GLchar *)malloc( length * sizeof(GLchar) ); - gGL->glGetInfoLog( m_program, length, &laux, logString ); - - GLMPRINTF( ("-D- ----- GLSL link failed: \n %s ", logString) ); #if !GLM_FREE_SHADER_TEXT char *vtemp = strdup( m_vertexProg->m_text ); vtemp[m_vertexProg->m_descs[kGLMGLSL].m_textOffset + m_vertexProg->m_descs[kGLMGLSL].m_textLength] = 0; @@ -784,8 +778,6 @@ bool CGLMShaderPair::ValidateProgramPair() free( ftemp ); free( vtemp ); #endif - free( logString ); - GLMPRINTF( ("-D- -----end-----") ); } @@ -793,11 +785,15 @@ bool CGLMShaderPair::ValidateProgramPair() { gGL->glUseProgram( m_program ); + printf("Sample text\n"); + m_ctx->NewLinkedProgram(); m_locVertexParams = gGL->glGetUniformLocation( m_program, "vc" ); m_locVertexBoneParams = gGL->glGetUniformLocation( m_program, "vcbones" ); m_locVertexScreenParams = gGL->glGetUniformLocation( m_program, "vcscreen" ); + m_locAlphaRef = gGL->glGetUniformLocation( m_program, "alpha_ref" ); + m_nScreenWidthHeight = 0xFFFFFFFF; m_locVertexInteger0 = gGL->glGetUniformLocation( m_program, "i0" ); @@ -940,13 +936,13 @@ bool CGLMShaderPair::SetProgramPair( CGLMProgram *vp, CGLMProgram *fp ) // attempt link. but first, detach any previously attached programs if (m_vertexProg) { - gGL->glDetachObject(m_program, m_vertexProg->m_descs[kGLMGLSL].m_object.glsl); + gGL->glDetachShader(m_program, m_vertexProg->m_descs[kGLMGLSL].m_object.glsl); m_vertexProg = NULL; } if (m_fragmentProg) { - gGL->glDetachObject(m_program, m_fragmentProg->m_descs[kGLMGLSL].m_object.glsl); + gGL->glDetachShader(m_program, m_fragmentProg->m_descs[kGLMGLSL].m_object.glsl); m_fragmentProg = NULL; } @@ -987,7 +983,7 @@ bool CGLMShaderPair::SetProgramPair( CGLMProgram *vp, CGLMProgram *fp ) gGL->glLinkProgram( m_program ); GLint isLinked = 0; - gGL->glGetShaderiv(m_program, GL_LINK_STATUS, &isLinked); + gGL->glGetProgramiv(m_program, GL_LINK_STATUS, &isLinked); if(isLinked == GL_FALSE) { GLint maxLength = 0; @@ -997,8 +993,8 @@ bool CGLMShaderPair::SetProgramPair( CGLMProgram *vp, CGLMProgram *fp ) gGL->glGetProgramInfoLog( m_program, sizeof(log), &maxLength, log ); if( maxLength ) { - printf("vp: \n%s\nfp: \n%s\n", vp->m_text, fp->m_text ); - printf("shader %d link log: %s\n", m_program, log); + Msg("vp: \n%s\nfp: \n%s\n", vp->m_text, fp->m_text ); + Msg("shader %d link log: %s\n", m_program, log); } } diff --git a/togles/linuxwin/cglmquery.cpp b/togles/linuxwin/cglmquery.cpp index c0ddbfa8..ffc7f247 100644 --- a/togles/linuxwin/cglmquery.cpp +++ b/togles/linuxwin/cglmquery.cpp @@ -239,8 +239,8 @@ bool CGLMQuery::IsDone( void ) { // prepare to pay a big price on drivers prior to 10.6.4+SLGU - GLint available = 0; - gGL->glGetQueryObjectiv(m_name, GL_QUERY_RESULT_AVAILABLE, &available ); + GLuint available = 0; + gGL->glGetQueryObjectuiv(m_name, GL_QUERY_RESULT_AVAILABLE, &available ); m_done = (available != 0); } diff --git a/togles/linuxwin/cglmtex.cpp b/togles/linuxwin/cglmtex.cpp index 0ce6a030..747ed01e 100644 --- a/togles/linuxwin/cglmtex.cpp +++ b/togles/linuxwin/cglmtex.cpp @@ -28,6 +28,10 @@ #include "togles/rendermechanism.h" +extern "C" { +#include "decompress.h" +} + #include "tier0/icommandline.h" #include "glmtexinlines.h" @@ -75,7 +79,7 @@ int sEncodeLayoutAsIndex( GLMTexLayoutKey *key ) // if not all power of two index |= 2; } - + if (GetFormatDesc( key->m_texFormat )->m_chunkSize >1 ) { index |= 4; @@ -173,6 +177,7 @@ const GLMTexFormatDesc *GetFormatDesc( D3DFORMAT format ) { if (g_formatDescTable[i].m_d3dFormat == format) { + return &g_formatDescTable[i]; } } @@ -1055,7 +1060,7 @@ void CGLMTex::CalcTexelDataOffsetAndStrides( int sliceIndex, int x, int y, int z int zStride = 0; GLMTexFormatDesc *format = m_layout->m_format; - if (format->m_chunkSize==1) + if (format->m_chunkSize==1) { // figure out row stride and layer stride yStride = format->m_bytesPerSquareChunk * m_layout->m_slices[sliceIndex].m_xSize; // bytes per texel row (y stride) @@ -1151,10 +1156,12 @@ void CGLMTex::ReadTexels( GLMTexLockDesc *desc, bool readWholeSlice ) { // compressed path // http://www.opengl.org/sdk/docs/man/xhtml/glGetCompressedTexImage.xml - + // TODO(nillerusr): implement me! +/* gGL->glGetCompressedTexImage( target, // target desc->m_req.m_mip, // level sliceAddress ); // destination +*/ } else { @@ -1165,17 +1172,6 @@ void CGLMTex::ReadTexels( GLMTexLockDesc *desc, bool readWholeSlice ) gGL->glGetIntegerv( GL_DRAW_FRAMEBUFFER_BINDING, &Dfbo ); gGL->glGetIntegerv( GL_READ_FRAMEBUFFER_BINDING, &Rfbo ); - - /* - gl4es_glGenFramebuffers(1, &fbo); - gl4es_glBindFramebuffer(GL_FRAMEBUFFER_OES, fbo); - gl4es_glFramebufferTexture2D(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_TEXTURE_2D, oldBind, 0); - // Read the pixels! - gl4es_glReadPixels(0, nheight-height, width, height, format, type, img); // using "full" version with conversion of format/type - gl4es_glBindFramebuffer(GL_FRAMEBUFFER_OES, old_fbo); - gl4es_glDeleteFramebuffers(1, &fbo); - - */ gGL->glGenFramebuffers(1, &fbo); gGL->glBindFramebuffer(GL_FRAMEBUFFER, fbo); @@ -1214,6 +1210,2301 @@ void CGLMTex::ReadTexels( GLMTexLockDesc *desc, bool readWholeSlice ) m_ctx->BindTexToTMU( pPrevTex, 0 ); } +struct mem_s +{ + const int value; + const char *str; +} g_glEnums[] = +{ +{ 0x0000, "GL_ZERO" }, +{ 0x0001, "GL_ONE" }, +{ 0x0004, "GL_TRIANGLES" }, +{ 0x0005, "GL_TRIANGLE_STRIP" }, +{ 0x0006, "GL_TRIANGLE_FAN" }, +{ 0x0007, "GL_QUADS" }, +{ 0x0008, "GL_QUAD_STRIP" }, +{ 0x0009, "GL_POLYGON" }, +{ 0x0200, "GL_NEVER" }, +{ 0x0201, "GL_LESS" }, +{ 0x0202, "GL_EQUAL" }, +{ 0x0203, "GL_LEQUAL" }, +{ 0x0204, "GL_GREATER" }, +{ 0x0205, "GL_NOTEQUAL" }, +{ 0x0206, "GL_GEQUAL" }, +{ 0x0207, "GL_ALWAYS" }, +{ 0x0300, "GL_SRC_COLOR" }, +{ 0x0301, "GL_ONE_MINUS_SRC_COLOR" }, +{ 0x0302, "GL_SRC_ALPHA" }, +{ 0x0303, "GL_ONE_MINUS_SRC_ALPHA" }, +{ 0x0304, "GL_DST_ALPHA" }, +{ 0x0305, "GL_ONE_MINUS_DST_ALPHA" }, +{ 0x0306, "GL_DST_COLOR" }, +{ 0x0307, "GL_ONE_MINUS_DST_COLOR" }, +{ 0x0308, "GL_SRC_ALPHA_SATURATE" }, +{ 0x0400, "GL_FRONT_LEFT" }, +{ 0x0401, "GL_FRONT_RIGHT" }, +{ 0x0402, "GL_BACK_LEFT" }, +{ 0x0403, "GL_BACK_RIGHT" }, +{ 0x0404, "GL_FRONT" }, +{ 0x0405, "GL_BACK" }, +{ 0x0406, "GL_LEFT" }, +{ 0x0407, "GL_RIGHT" }, +{ 0x0408, "GL_FRONT_AND_BACK" }, +{ 0x0409, "GL_AUX0" }, +{ 0x040A, "GL_AUX1" }, +{ 0x040B, "GL_AUX2" }, +{ 0x040C, "GL_AUX3" }, +{ 0x0500, "GL_INVALID_ENUM" }, +{ 0x0501, "GL_INVALID_VALUE" }, +{ 0x0502, "GL_INVALID_OPERATION" }, +{ 0x0503, "GL_STACK_OVERFLOW" }, +{ 0x0504, "GL_STACK_UNDERFLOW" }, +{ 0x0505, "GL_OUT_OF_MEMORY" }, +{ 0x0506, "GL_INVALID_FRAMEBUFFER_OPERATION" }, +{ 0x0600, "GL_2D" }, +{ 0x0601, "GL_3D" }, +{ 0x0602, "GL_3D_COLOR" }, +{ 0x0603, "GL_3D_COLOR_TEXTURE" }, +{ 0x0604, "GL_4D_COLOR_TEXTURE" }, +{ 0x0700, "GL_PASS_THROUGH_TOKEN" }, +{ 0x0701, "GL_POINT_TOKEN" }, +{ 0x0702, "GL_LINE_TOKEN" }, +{ 0x0703, "GL_POLYGON_TOKEN" }, +{ 0x0704, "GL_BITMAP_TOKEN" }, +{ 0x0705, "GL_DRAW_PIXEL_TOKEN" }, +{ 0x0706, "GL_COPY_PIXEL_TOKEN" }, +{ 0x0707, "GL_LINE_RESET_TOKEN" }, +{ 0x0800, "GL_EXP" }, +{ 0x0801, "GL_EXP2" }, +{ 0x0900, "GL_CW" }, +{ 0x0901, "GL_CCW" }, +{ 0x0A00, "GL_COEFF" }, +{ 0x0A01, "GL_ORDER" }, +{ 0x0A02, "GL_DOMAIN" }, +{ 0x0B00, "GL_CURRENT_COLOR" }, +{ 0x0B01, "GL_CURRENT_INDEX" }, +{ 0x0B02, "GL_CURRENT_NORMAL" }, +{ 0x0B03, "GL_CURRENT_TEXTURE_COORDS" }, +{ 0x0B04, "GL_CURRENT_RASTER_COLOR" }, +{ 0x0B05, "GL_CURRENT_RASTER_INDEX" }, +{ 0x0B06, "GL_CURRENT_RASTER_TEXTURE_COORDS" }, +{ 0x0B07, "GL_CURRENT_RASTER_POSITION" }, +{ 0x0B08, "GL_CURRENT_RASTER_POSITION_VALID" }, +{ 0x0B09, "GL_CURRENT_RASTER_DISTANCE" }, +{ 0x0B10, "GL_POINT_SMOOTH" }, +{ 0x0B11, "GL_POINT_SIZE" }, +{ 0x0B12, "GL_POINT_SIZE_RANGE" }, +{ 0x0B12, "GL_SMOOTH_POINT_SIZE_RANGE" }, +{ 0x0B13, "GL_POINT_SIZE_GRANULARITY" }, +{ 0x0B13, "GL_SMOOTH_POINT_SIZE_GRANULARITY" }, +{ 0x0B20, "GL_LINE_SMOOTH" }, +{ 0x0B21, "GL_LINE_WIDTH" }, +{ 0x0B22, "GL_LINE_WIDTH_RANGE" }, +{ 0x0B22, "GL_SMOOTH_LINE_WIDTH_RANGE" }, +{ 0x0B23, "GL_LINE_WIDTH_GRANULARITY" }, +{ 0x0B23, "GL_SMOOTH_LINE_WIDTH_GRANULARITY" }, +{ 0x0B24, "GL_LINE_STIPPLE" }, +{ 0x0B25, "GL_LINE_STIPPLE_PATTERN" }, +{ 0x0B26, "GL_LINE_STIPPLE_REPEAT" }, +{ 0x0B30, "GL_LIST_MODE" }, +{ 0x0B31, "GL_MAX_LIST_NESTING" }, +{ 0x0B32, "GL_LIST_BASE" }, +{ 0x0B33, "GL_LIST_INDEX" }, +{ 0x0B40, "GL_POLYGON_MODE" }, +{ 0x0B41, "GL_POLYGON_SMOOTH" }, +{ 0x0B42, "GL_POLYGON_STIPPLE" }, +{ 0x0B43, "GL_EDGE_FLAG" }, +{ 0x0B44, "GL_CULL_FACE" }, +{ 0x0B45, "GL_CULL_FACE_MODE" }, +{ 0x0B46, "GL_FRONT_FACE" }, +{ 0x0B50, "GL_LIGHTING" }, +{ 0x0B51, "GL_LIGHT_MODEL_LOCAL_VIEWER" }, +{ 0x0B52, "GL_LIGHT_MODEL_TWO_SIDE" }, +{ 0x0B53, "GL_LIGHT_MODEL_AMBIENT" }, +{ 0x0B54, "GL_SHADE_MODEL" }, +{ 0x0B55, "GL_COLOR_MATERIAL_FACE" }, +{ 0x0B56, "GL_COLOR_MATERIAL_PARAMETER" }, +{ 0x0B57, "GL_COLOR_MATERIAL" }, +{ 0x0B60, "GL_FOG" }, +{ 0x0B61, "GL_FOG_INDEX" }, +{ 0x0B62, "GL_FOG_DENSITY" }, +{ 0x0B63, "GL_FOG_START" }, +{ 0x0B64, "GL_FOG_END" }, +{ 0x0B65, "GL_FOG_MODE" }, +{ 0x0B66, "GL_FOG_COLOR" }, +{ 0x0B70, "GL_DEPTH_RANGE" }, +{ 0x0B71, "GL_DEPTH_TEST" }, +{ 0x0B72, "GL_DEPTH_WRITEMASK" }, +{ 0x0B73, "GL_DEPTH_CLEAR_VALUE" }, +{ 0x0B74, "GL_DEPTH_FUNC" }, +{ 0x0B80, "GL_ACCUM_CLEAR_VALUE" }, +{ 0x0B90, "GL_STENCIL_TEST" }, +{ 0x0B91, "GL_STENCIL_CLEAR_VALUE" }, +{ 0x0B92, "GL_STENCIL_FUNC" }, +{ 0x0B93, "GL_STENCIL_VALUE_MASK" }, +{ 0x0B94, "GL_STENCIL_FAIL" }, +{ 0x0B95, "GL_STENCIL_PASS_DEPTH_FAIL" }, +{ 0x0B96, "GL_STENCIL_PASS_DEPTH_PASS" }, +{ 0x0B97, "GL_STENCIL_REF" }, +{ 0x0B98, "GL_STENCIL_WRITEMASK" }, +{ 0x0BA0, "GL_MATRIX_MODE" }, +{ 0x0BA1, "GL_NORMALIZE" }, +{ 0x0BA2, "GL_VIEWPORT" }, +{ 0x0BA3, "GL_MODELVIEW_STACK_DEPTH" }, +{ 0x0BA4, "GL_PROJECTION_STACK_DEPTH" }, +{ 0x0BA5, "GL_TEXTURE_STACK_DEPTH" }, +{ 0x0BA6, "GL_MODELVIEW_MATRIX" }, +{ 0x0BA7, "GL_PROJECTION_MATRIX" }, +{ 0x0BA8, "GL_TEXTURE_MATRIX" }, +{ 0x0BB0, "GL_ATTRIB_STACK_DEPTH" }, +{ 0x0BB1, "GL_CLIENT_ATTRIB_STACK_DEPTH" }, +{ 0x0BC0, "GL_ALPHA_TEST" }, +{ 0x0BC1, "GL_ALPHA_TEST_FUNC" }, +{ 0x0BC2, "GL_ALPHA_TEST_REF" }, +{ 0x0BD0, "GL_DITHER" }, +{ 0x0BE0, "GL_BLEND_DST" }, +{ 0x0BE1, "GL_BLEND_SRC" }, +{ 0x0BE2, "GL_BLEND" }, +{ 0x0BF0, "GL_LOGIC_OP_MODE" }, +{ 0x0BF1, "GL_INDEX_LOGIC_OP" }, +{ 0x0BF2, "GL_COLOR_LOGIC_OP" }, +{ 0x0C00, "GL_AUX_BUFFERS" }, +{ 0x0C01, "GL_DRAW_BUFFER" }, +{ 0x0C02, "GL_READ_BUFFER" }, +{ 0x0C10, "GL_SCISSOR_BOX" }, +{ 0x0C11, "GL_SCISSOR_TEST" }, +{ 0x0C20, "GL_INDEX_CLEAR_VALUE" }, +{ 0x0C21, "GL_INDEX_WRITEMASK" }, +{ 0x0C22, "GL_COLOR_CLEAR_VALUE" }, +{ 0x0C23, "GL_COLOR_WRITEMASK" }, +{ 0x0C30, "GL_INDEX_MODE" }, +{ 0x0C31, "GL_RGBA_MODE" }, +{ 0x0C32, "GL_DOUBLEBUFFER" }, +{ 0x0C33, "GL_STEREO" }, +{ 0x0C40, "GL_RENDER_MODE" }, +{ 0x0C50, "GL_PERSPECTIVE_CORRECTION_HINT" }, +{ 0x0C51, "GL_POINT_SMOOTH_HINT" }, +{ 0x0C52, "GL_LINE_SMOOTH_HINT" }, +{ 0x0C53, "GL_POLYGON_SMOOTH_HINT" }, +{ 0x0C54, "GL_FOG_HINT" }, +{ 0x0C60, "GL_TEXTURE_GEN_S" }, +{ 0x0C61, "GL_TEXTURE_GEN_T" }, +{ 0x0C62, "GL_TEXTURE_GEN_R" }, +{ 0x0C63, "GL_TEXTURE_GEN_Q" }, +{ 0x0C70, "GL_PIXEL_MAP_I_TO_I" }, +{ 0x0C71, "GL_PIXEL_MAP_S_TO_S" }, +{ 0x0C72, "GL_PIXEL_MAP_I_TO_R" }, +{ 0x0C73, "GL_PIXEL_MAP_I_TO_G" }, +{ 0x0C74, "GL_PIXEL_MAP_I_TO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"GL_INDEX_OFFSET" }, +{ 0x0D14, "GL_RED_SCALE" }, +{ 0x0D15, "GL_RED_BIAS" }, +{ 0x0D16, "GL_ZOOM_X" }, +{ 0x0D17, "GL_ZOOM_Y" }, +{ 0x0D18, "GL_GREEN_SCALE" }, +{ 0x0D19, "GL_GREEN_BIAS" }, +{ 0x0D1A, "GL_BLUE_SCALE" }, +{ 0x0D1B, "GL_BLUE_BIAS" }, +{ 0x0D1C, "GL_ALPHA_SCALE" }, +{ 0x0D1D, "GL_ALPHA_BIAS" }, +{ 0x0D1E, "GL_DEPTH_SCALE" }, +{ 0x0D1F, "GL_DEPTH_BIAS" }, +{ 0x0D30, "GL_MAX_EVAL_ORDER" }, +{ 0x0D31, "GL_MAX_LIGHTS" }, +{ 0x0D32, "GL_MAX_CLIP_PLANES" }, +{ 0x0D33, "GL_MAX_TEXTURE_SIZE" }, +{ 0x0D34, "GL_MAX_PIXEL_MAP_TABLE" }, +{ 0x0D35, "GL_MAX_ATTRIB_STACK_DEPTH" }, +{ 0x0D36, "GL_MAX_MODELVIEW_STACK_DEPTH" }, +{ 0x0D37, "GL_MAX_NAME_STACK_DEPTH" }, +{ 0x0D38, "GL_MAX_PROJECTION_STACK_DEPTH" }, +{ 0x0D39, "GL_MAX_TEXTURE_STACK_DEPTH" }, +{ 0x0D3A, "GL_MAX_VIEWPORT_DIMS" }, +{ 0x0D3B, "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH" }, +{ 0x0D50, "GL_SUBPIXEL_BITS" }, +{ 0x0D51, "GL_INDEX_BITS" }, +{ 0x0D52, "GL_RED_BITS" }, +{ 0x0D53, "GL_GREEN_BITS" }, +{ 0x0D54, "GL_BLUE_BITS" }, +{ 0x0D55, "GL_ALPHA_BITS" }, +{ 0x0D56, "GL_DEPTH_BITS" }, +{ 0x0D57, "GL_STENCIL_BITS" }, +{ 0x0D58, "GL_ACCUM_RED_BITS" }, +{ 0x0D59, "GL_ACCUM_GREEN_BITS" }, +{ 0x0D5A, "GL_ACCUM_BLUE_BITS" }, +{ 0x0D5B, "GL_ACCUM_ALPHA_BITS" }, +{ 0x0D70, "GL_NAME_STACK_DEPTH" }, +{ 0x0D80, "GL_AUTO_NORMAL" }, +{ 0x0D90, "GL_MAP1_COLOR_4" }, +{ 0x0D91, "GL_MAP1_INDEX" }, +{ 0x0D92, "GL_MAP1_NORMAL" }, +{ 0x0D93, "GL_MAP1_TEXTURE_COORD_1" }, +{ 0x0D94, "GL_MAP1_TEXTURE_COORD_2" }, +{ 0x0D95, "GL_MAP1_TEXTURE_COORD_3" }, +{ 0x0D96, "GL_MAP1_TEXTURE_COORD_4" }, +{ 0x0D97, "GL_MAP1_VERTEX_3" }, +{ 0x0D98, "GL_MAP1_VERTEX_4" }, +{ 0x0DB0, "GL_MAP2_COLOR_4" }, +{ 0x0DB1, "GL_MAP2_INDEX" }, +{ 0x0DB2, "GL_MAP2_NORMAL" }, +{ 0x0DB3, "GL_MAP2_TEXTURE_COORD_1" }, +{ 0x0DB4, "GL_MAP2_TEXTURE_COORD_2" }, +{ 0x0DB5, "GL_MAP2_TEXTURE_COORD_3" }, +{ 0x0DB6, "GL_MAP2_TEXTURE_COORD_4" }, +{ 0x0DB7, "GL_MAP2_VERTEX_3" }, +{ 0x0DB8, "GL_MAP2_VERTEX_4" }, +{ 0x0DD0, "GL_MAP1_GRID_DOMAIN" }, +{ 0x0DD1, "GL_MAP1_GRID_SEGMENTS" }, +{ 0x0DD2, "GL_MAP2_GRID_DOMAIN" }, +{ 0x0DD3, "GL_MAP2_GRID_SEGMENTS" }, +{ 0x0DE0, "GL_TEXTURE_1D" }, +{ 0x0DE1, "GL_TEXTURE_2D" }, +{ 0x0DF0, "GL_FEEDBACK_BUFFER_POINTER" }, +{ 0x0DF1, "GL_FEEDBACK_BUFFER_SIZE" }, +{ 0x0DF2, "GL_FEEDBACK_BUFFER_TYPE" }, +{ 0x0DF3, "GL_SELECTION_BUFFER_POINTER" }, +{ 0x0DF4, "GL_SELECTION_BUFFER_SIZE" }, +{ 0x1000, "GL_TEXTURE_WIDTH" }, +{ 0x1001, "GL_TEXTURE_HEIGHT" }, +{ 0x1003, "GL_TEXTURE_INTERNAL_FORMAT" }, +{ 0x1004, "GL_TEXTURE_BORDER_COLOR" }, +{ 0x1005, "GL_TEXTURE_BORDER" }, +{ 0x1100, "GL_DONT_CARE" }, +{ 0x1101, "GL_FASTEST" }, +{ 0x1102, "GL_NICEST" }, +{ 0x1200, "GL_AMBIENT" }, +{ 0x1201, "GL_DIFFUSE" }, +{ 0x1202, "GL_SPECULAR" }, +{ 0x1203, "GL_POSITION" }, +{ 0x1204, "GL_SPOT_DIRECTION" }, +{ 0x1205, "GL_SPOT_EXPONENT" }, +{ 0x1206, "GL_SPOT_CUTOFF" }, +{ 0x1207, "GL_CONSTANT_ATTENUATION" }, +{ 0x1208, "GL_LINEAR_ATTENUATION" }, +{ 0x1209, "GL_QUADRATIC_ATTENUATION" }, +{ 0x1300, "GL_COMPILE" }, +{ 0x1301, "GL_COMPILE_AND_EXECUTE" }, +{ 0x1400, "GL_BYTE " }, +{ 0x1401, "GL_UBYTE" }, +{ 0x1402, "GL_SHORT" }, +{ 0x1403, "GL_USHRT" }, +{ 0x1404, "GL_INT " }, +{ 0x1405, "GL_UINT " }, +{ 0x1406, "GL_FLOAT" }, +{ 0x1407, "GL_2_BYTES" }, +{ 0x1408, "GL_3_BYTES" }, +{ 0x1409, "GL_4_BYTES" }, +{ 0x140A, "GL_DOUBLE" }, +{ 0x140B, "GL_HALF_FLOAT" }, +{ 0x1500, "GL_CLEAR" }, +{ 0x1501, "GL_AND" }, +{ 0x1502, "GL_AND_REVERSE" }, +{ 0x1503, "GL_COPY" }, +{ 0x1504, "GL_AND_INVERTED" }, +{ 0x1505, "GL_NOOP" }, +{ 0x1506, "GL_XOR" }, +{ 0x1507, "GL_OR" }, +{ 0x1508, "GL_NOR" }, +{ 0x1509, "GL_EQUIV" }, +{ 0x150A, "GL_INVERT" }, +{ 0x150B, "GL_OR_REVERSE" }, +{ 0x150C, "GL_COPY_INVERTED" }, +{ 0x150D, "GL_OR_INVERTED" }, +{ 0x150E, "GL_NAND" }, +{ 0x150F, "GL_SET" }, +{ 0x1600, "GL_EMISSION" }, +{ 0x1601, "GL_SHININESS" }, +{ 0x1602, "GL_AMBIENT_AND_DIFFUSE" }, +{ 0x1603, "GL_COLOR_INDEXES" }, +{ 0x1700, "GL_MODELVIEW" }, +{ 0x1700, "GL_MODELVIEW0_ARB" }, +{ 0x1701, "GL_PROJECTION" }, +{ 0x1702, "GL_TEXTURE" }, +{ 0x1800, "GL_COLOR" }, +{ 0x1801, "GL_DEPTH" }, +{ 0x1802, "GL_STENCIL" }, +{ 0x1900, "GL_COLOR_INDEX" }, +{ 0x1901, "GL_STENCIL_INDEX" }, +{ 0x1902, "GL_DEPTH_COMPONENT" }, +{ 0x1903, "GL_RED" }, +{ 0x1904, "GL_GREEN" }, +{ 0x1905, "GL_BLUE" }, +{ 0x1906, "GL_ALPHA" }, +{ 0x1907, "GL_RGB" }, +{ 0x1908, "GL_RGBA" }, +{ 0x1909, "GL_LUMINANCE" }, +{ 0x190A, "GL_LUMINANCE_ALPHA" }, +{ 0x1A00, "GL_BITMAP" }, +{ 0x1B00, "GL_POINT" }, +{ 0x1B01, "GL_LINE" }, +{ 0x1B02, "GL_FILL" }, +{ 0x1C00, "GL_RENDER" }, +{ 0x1C01, "GL_FEEDBACK" }, +{ 0x1C02, "GL_SELECT" }, +{ 0x1D00, "GL_FLAT" }, +{ 0x1D01, "GL_SMOOTH" }, +{ 0x1E00, "GL_KEEP" }, +{ 0x1E01, "GL_REPLACE" }, +{ 0x1E02, "GL_INCR" }, +{ 0x1E03, "GL_DECR" }, +{ 0x1F00, "GL_VENDOR" }, +{ 0x1F01, "GL_RENDERER" }, +{ 0x1F02, "GL_VERSION" }, +{ 0x1F03, "GL_EXTENSIONS" }, +{ 0x2000, "GL_S" }, +{ 0x2001, "GL_T" }, +{ 0x2002, "GL_R" }, +{ 0x2003, "GL_Q" }, +{ 0x2100, "GL_MODULATE" }, +{ 0x2101, "GL_DECAL" }, +{ 0x2200, "GL_TEXTURE_ENV_MODE" }, +{ 0x2201, "GL_TEXTURE_ENV_COLOR" }, +{ 0x2300, "GL_TEXTURE_ENV" }, +{ 0x2400, "GL_EYE_LINEAR" }, +{ 0x2401, "GL_OBJECT_LINEAR" }, +{ 0x2402, "GL_SPHERE_MAP" }, +{ 0x2500, "GL_TEXTURE_GEN_MODE" }, +{ 0x2501, "GL_OBJECT_PLANE" }, +{ 0x2502, "GL_EYE_PLANE" }, +{ 0x2600, "GL_NEAREST" }, +{ 0x2601, "GL_LINEAR" }, +{ 0x2700, "GL_NEAREST_MIPMAP_NEAREST" }, +{ 0x2701, "GL_LINEAR_MIPMAP_NEAREST" }, +{ 0x2702, "GL_NEAREST_MIPMAP_LINEAR" }, +{ 0x2703, "GL_LINEAR_MIPMAP_LINEAR" }, +{ 0x2800, "GL_TEXTURE_MAG_FILTER" }, +{ 0x2801, "GL_TEXTURE_MIN_FILTER" }, +{ 0x2802, "GL_TEXTURE_WRAP_S" }, +{ 0x2803, "GL_TEXTURE_WRAP_T" }, +{ 0x2900, "GL_CLAMP" }, +{ 0x2901, "GL_REPEAT" }, +{ 0x2A00, "GL_POLYGON_OFFSET_UNITS" }, +{ 0x2A01, "GL_POLYGON_OFFSET_POINT" }, +{ 0x2A02, "GL_POLYGON_OFFSET_LINE" }, +{ 0x2A10, "GL_R3_G3_B2" }, +{ 0x2A20, "GL_V2F" }, +{ 0x2A21, "GL_V3F" }, +{ 0x2A22, "GL_C4UB_V2F" }, +{ 0x2A23, "GL_C4UB_V3F" }, +{ 0x2A24, "GL_C3F_V3F" }, +{ 0x2A25, "GL_N3F_V3F" }, +{ 0x2A26, "GL_C4F_N3F_V3F" }, +{ 0x2A27, "GL_T2F_V3F" }, +{ 0x2A28, "GL_T4F_V4F" }, +{ 0x2A29, "GL_T2F_C4UB_V3F" }, +{ 0x2A2A, "GL_T2F_C3F_V3F" }, +{ 0x2A2B, "GL_T2F_N3F_V3F" }, +{ 0x2A2C, "GL_T2F_C4F_N3F_V3F" }, +{ 0x2A2D, "GL_T4F_C4F_N3F_V4F" }, +{ 0x3000, "GL_CLIP_PLANE0" }, +{ 0x3001, "GL_CLIP_PLANE1" }, +{ 0x3002, "GL_CLIP_PLANE2" }, +{ 0x3003, "GL_CLIP_PLANE3" }, +{ 0x3004, "GL_CLIP_PLANE4" }, +{ 0x3005, "GL_CLIP_PLANE5" }, +{ 0x4000, "GL_LIGHT0" }, +{ 0x4001, "GL_LIGHT1" }, +{ 0x4002, "GL_LIGHT2" }, +{ 0x4003, "GL_LIGHT3" }, +{ 0x4004, "GL_LIGHT4" }, +{ 0x4005, "GL_LIGHT5" }, +{ 0x4006, "GL_LIGHT6" }, +{ 0x4007, "GL_LIGHT7" }, +{ 0x8000, "GL_ABGR_EXT" }, +{ 0x8001, "GL_CONSTANT_COLOR" }, +{ 0x8002, "GL_ONE_MINUS_CONSTANT_COLOR" }, +{ 0x8003, "GL_CONSTANT_ALPHA" }, +{ 0x8004, "GL_ONE_MINUS_CONSTANT_ALPHA" }, +{ 0x8005, "GL_BLEND_COLOR" }, +{ 0x8006, "GL_FUNC_ADD" }, +{ 0x8007, "GL_MIN" }, +{ 0x8008, "GL_MAX" }, +{ 0x8009, "GL_BLEND_EQUATION_RGB" }, +{ 0x8009, "GL_BLEND_EQUATION" }, +{ 0x800A, "GL_FUNC_SUBTRACT" }, +{ 0x800B, "GL_FUNC_REVERSE_SUBTRACT" }, +{ 0x8010, "GL_CONVOLUTION_1D" }, +{ 0x8011, "GL_CONVOLUTION_2D" }, +{ 0x8012, "GL_SEPARABLE_2D" }, +{ 0x8013, "GL_CONVOLUTION_BORDER_MODE" }, +{ 0x8014, "GL_CONVOLUTION_FILTER_SCALE" }, +{ 0x8015, "GL_CONVOLUTION_FILTER_BIAS" }, +{ 0x8016, "GL_REDUCE" }, +{ 0x8017, "GL_CONVOLUTION_FORMAT" }, +{ 0x8018, "GL_CONVOLUTION_WIDTH" }, +{ 0x8019, "GL_CONVOLUTION_HEIGHT" }, +{ 0x801A, "GL_MAX_CONVOLUTION_WIDTH" }, +{ 0x801B, "GL_MAX_CONVOLUTION_HEIGHT" }, +{ 0x801C, "GL_POST_CONVOLUTION_RED_SCALE" }, +{ 0x801D, "GL_POST_CONVOLUTION_GREEN_SCALE" }, +{ 0x801E, "GL_POST_CONVOLUTION_BLUE_SCALE" }, +{ 0x801F, "GL_POST_CONVOLUTION_ALPHA_SCALE" }, +{ 0x8020, "GL_POST_CONVOLUTION_RED_BIAS" }, +{ 0x8021, "GL_POST_CONVOLUTION_GREEN_BIAS" }, +{ 0x8022, "GL_POST_CONVOLUTION_BLUE_BIAS" }, +{ 0x8023, "GL_POST_CONVOLUTION_ALPHA_BIAS" }, +{ 0x8024, "GL_HISTOGRAM" }, +{ 0x8025, "GL_PROXY_HISTOGRAM" }, +{ 0x8026, "GL_HISTOGRAM_WIDTH" }, +{ 0x8027, "GL_HISTOGRAM_FORMAT" }, +{ 0x8028, "GL_HISTOGRAM_RED_SIZE" }, +{ 0x8029, "GL_HISTOGRAM_GREEN_SIZE" }, +{ 0x802A, "GL_HISTOGRAM_BLUE_SIZE" }, +{ 0x802B, "GL_HISTOGRAM_ALPHA_SIZE" }, +{ 0x802C, "GL_HISTOGRAM_LUMINANCE_SIZE" }, +{ 0x802D, "GL_HISTOGRAM_SINK" }, +{ 0x802E, "GL_MINMAX" }, +{ 0x802F, "GL_MINMAX_FORMAT" }, +{ 0x8030, "GL_MINMAX_SINK" }, +{ 0x8031, "GL_TABLE_TOO_LARGE" }, +{ 0x8032, "GL_UNSIGNED_BYTE_3_3_2" }, +{ 0x8033, "GL_UNSIGNED_SHORT_4_4_4_4" }, +{ 0x8034, "GL_UNSIGNED_SHORT_5_5_5_1" }, +{ 0x8035, "GL_UNSIGNED_INT_8_8_8_8" }, +{ 0x8036, "GL_UNSIGNED_INT_10_10_10_2" }, +{ 0x8037, "GL_POLYGON_OFFSET_FILL" }, +{ 0x8038, "GL_POLYGON_OFFSET_FACTOR" }, +{ 0x803A, "GL_RESCALE_NORMAL" }, +{ 0x803B, "GL_ALPHA4" }, +{ 0x803C, "GL_ALPHA8" }, +{ 0x803D, "GL_ALPHA12" }, +{ 0x803E, "GL_ALPHA16" }, +{ 0x803F, "GL_LUMINANCE4" }, +{ 0x8040, "GL_LUMINANCE8" }, +{ 0x8041, "GL_LUMINANCE12" }, +{ 0x8042, "GL_LUMINANCE16" }, +{ 0x8043, "GL_LUMINANCE4_ALPHA4" }, +{ 0x8044, "GL_LUMINANCE6_ALPHA2" }, +{ 0x8045, "GL_LUMINANCE8_ALPHA8" }, +{ 0x8046, "GL_LUMINANCE12_ALPHA4" }, +{ 0x8047, "GL_LUMINANCE12_ALPHA12" }, +{ 0x8048, "GL_LUMINANCE16_ALPHA16" }, +{ 0x8049, "GL_INTENSITY" }, +{ 0x804A, "GL_INTENSITY4" }, +{ 0x804B, "GL_INTENSITY8" }, +{ 0x804C, "GL_INTENSITY12" }, +{ 0x804D, "GL_INTENSITY16" }, +{ 0x804F, "GL_RGB4" }, +{ 0x8050, "GL_RGB5" }, +{ 0x8051, "GL_RGB8" }, +{ 0x8052, "GL_RGB10" }, +{ 0x8053, "GL_RGB12" }, +{ 0x8054, "GL_RGB16" }, +{ 0x8055, "GL_RGBA2" }, +{ 0x8056, "GL_RGBA4" }, +{ 0x8057, "GL_RGB5_A1" }, +{ 0x8058, "GL_RGBA8" }, +{ 0x8059, "GL_RGB10_A2" }, +{ 0x805A, "GL_RGBA12" }, +{ 0x805B, "GL_RGBA16" }, +{ 0x805C, "GL_TEXTURE_RED_SIZE" }, +{ 0x805D, "GL_TEXTURE_GREEN_SIZE" }, +{ 0x805E, "GL_TEXTURE_BLUE_SIZE" }, +{ 0x805F, "GL_TEXTURE_ALPHA_SIZE" }, +{ 0x8060, "GL_TEXTURE_LUMINANCE_SIZE" }, +{ 0x8061, "GL_TEXTURE_INTENSITY_SIZE" }, +{ 0x8063, "GL_PROXY_TEXTURE_1D" }, +{ 0x8064, "GL_PROXY_TEXTURE_2D" }, +{ 0x8066, "GL_TEXTURE_PRIORITY" }, +{ 0x8067, "GL_TEXTURE_RESIDENT" }, +{ 0x8068, "GL_TEXTURE_BINDING_1D" }, +{ 0x8069, "GL_TEXTURE_BINDING_2D" }, +{ 0x806A, "GL_TEXTURE_BINDING_3D" }, +{ 0x806B, "GL_PACK_SKIP_IMAGES" }, +{ 0x806C, "GL_PACK_IMAGE_HEIGHT" }, +{ 0x806D, "GL_UNPACK_SKIP_IMAGES" }, +{ 0x806E, "GL_UNPACK_IMAGE_HEIGHT" }, +{ 0x806F, "GL_TEXTURE_3D" }, +{ 0x8070, "GL_PROXY_TEXTURE_3D" }, +{ 0x8071, "GL_TEXTURE_DEPTH" }, +{ 0x8072, "GL_TEXTURE_WRAP_R" }, +{ 0x8073, "GL_MAX_3D_TEXTURE_SIZE" }, +{ 0x8074, "GL_VERTEX_ARRAY" }, +{ 0x8075, "GL_NORMAL_ARRAY" }, +{ 0x8076, "GL_COLOR_ARRAY" }, +{ 0x8077, "GL_INDEX_ARRAY" }, +{ 0x8078, "GL_TEXTURE_COORD_ARRAY" }, +{ 0x8079, "GL_EDGE_FLAG_ARRAY" }, +{ 0x807A, "GL_VERTEX_ARRAY_SIZE" }, +{ 0x807B, "GL_VERTEX_ARRAY_TYPE" }, +{ 0x807C, "GL_VERTEX_ARRAY_STRIDE" }, +{ 0x807E, "GL_NORMAL_ARRAY_TYPE" }, +{ 0x807F, "GL_NORMAL_ARRAY_STRIDE" }, +{ 0x8081, "GL_COLOR_ARRAY_SIZE" }, +{ 0x8082, "GL_COLOR_ARRAY_TYPE" }, +{ 0x8083, "GL_COLOR_ARRAY_STRIDE" }, +{ 0x8085, "GL_INDEX_ARRAY_TYPE" }, +{ 0x8086, "GL_INDEX_ARRAY_STRIDE" }, +{ 0x8088, "GL_TEXTURE_COORD_ARRAY_SIZE" }, +{ 0x8089, "GL_TEXTURE_COORD_ARRAY_TYPE" }, +{ 0x808A, "GL_TEXTURE_COORD_ARRAY_STRIDE" }, +{ 0x808C, "GL_EDGE_FLAG_ARRAY_STRIDE" }, +{ 0x808E, "GL_VERTEX_ARRAY_POINTER" }, +{ 0x808F, "GL_NORMAL_ARRAY_POINTER" }, +{ 0x8090, "GL_COLOR_ARRAY_POINTER" }, +{ 0x8091, "GL_INDEX_ARRAY_POINTER" }, +{ 0x8092, "GL_TEXTURE_COORD_ARRAY_POINTER" }, +{ 0x8093, "GL_EDGE_FLAG_ARRAY_POINTER" }, +{ 0x809D, "GL_MULTISAMPLE_ARB" }, +{ 0x809D, "GL_MULTISAMPLE" }, +{ 0x809E, "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB" }, +{ 0x809E, "GL_SAMPLE_ALPHA_TO_COVERAGE" }, +{ 0x809F, "GL_SAMPLE_ALPHA_TO_ONE_ARB" }, +{ 0x809F, "GL_SAMPLE_ALPHA_TO_ONE" }, +{ 0x80A0, "GL_SAMPLE_COVERAGE_ARB" }, +{ 0x80A0, "GL_SAMPLE_COVERAGE" }, +{ 0x80A0, "GL_SAMPLE_MASK_EXT" }, +{ 0x80A1, "GL_1PASS_EXT" }, +{ 0x80A2, "GL_2PASS_0_EXT" }, +{ 0x80A3, "GL_2PASS_1_EXT" }, +{ 0x80A4, "GL_4PASS_0_EXT" }, +{ 0x80A5, "GL_4PASS_1_EXT" }, +{ 0x80A6, "GL_4PASS_2_EXT" }, +{ 0x80A7, "GL_4PASS_3_EXT" }, +{ 0x80A8, "GL_SAMPLE_BUFFERS" }, +{ 0x80A9, "GL_SAMPLES" }, +{ 0x80AA, "GL_SAMPLE_COVERAGE_VALUE" }, +{ 0x80AB, "GL_SAMPLE_COVERAGE_INVERT" }, +{ 0x80AC, "GL_SAMPLE_PATTERN_EXT" }, +{ 0x80B1, "GL_COLOR_MATRIX" }, +{ 0x80B2, "GL_COLOR_MATRIX_STACK_DEPTH" }, +{ 0x80B3, "GL_MAX_COLOR_MATRIX_STACK_DEPTH" }, +{ 0x80B4, "GL_POST_COLOR_MATRIX_RED_SCALE" }, +{ 0x80B5, "GL_POST_COLOR_MATRIX_GREEN_SCALE" }, +{ 0x80B6, "GL_POST_COLOR_MATRIX_BLUE_SCALE" }, +{ 0x80B7, "GL_POST_COLOR_MATRIX_ALPHA_SCALE" }, +{ 0x80B8, "GL_POST_COLOR_MATRIX_RED_BIAS" }, +{ 0x80B9, "GL_POST_COLOR_MATRIX_GREEN_BIAS" }, +{ 0x80BA, "GL_POST_COLOR_MATRIX_BLUE_BIAS" }, +{ 0x80BB, "GL_POST_COLOR_MATRIX_ALPHA_BIAS" }, +{ 0x80BF, "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB" }, +{ 0x80C8, "GL_BLEND_DST_RGB" }, +{ 0x80C9, "GL_BLEND_SRC_RGB" }, +{ 0x80CA, "GL_BLEND_DST_ALPHA" }, +{ 0x80CB, "GL_BLEND_SRC_ALPHA" }, +{ 0x80CC, "GL_422_EXT" }, +{ 0x80CD, "GL_422_REV_EXT" }, +{ 0x80CE, "GL_422_AVERAGE_EXT" }, +{ 0x80CF, "GL_422_REV_AVERAGE_EXT" }, +{ 0x80D0, "GL_COLOR_TABLE" }, +{ 0x80D1, "GL_POST_CONVOLUTION_COLOR_TABLE" }, +{ 0x80D2, "GL_POST_COLOR_MATRIX_COLOR_TABLE" }, +{ 0x80D3, "GL_PROXY_COLOR_TABLE" }, +{ 0x80D4, "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE" }, +{ 0x80D5, "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE" }, +{ 0x80D6, "GL_COLOR_TABLE_SCALE" }, +{ 0x80D7, "GL_COLOR_TABLE_BIAS" }, +{ 0x80D8, "GL_COLOR_TABLE_FORMAT" }, +{ 0x80D9, "GL_COLOR_TABLE_WIDTH" }, +{ 0x80DA, "GL_COLOR_TABLE_RED_SIZE" }, +{ 0x80DB, "GL_COLOR_TABLE_GREEN_SIZE" }, +{ 0x80DC, "GL_COLOR_TABLE_BLUE_SIZE" }, +{ 0x80DD, "GL_COLOR_TABLE_ALPHA_SIZE" }, +{ 0x80DE, "GL_COLOR_TABLE_LUMINANCE_SIZE" }, +{ 0x80DF, "GL_COLOR_TABLE_INTENSITY_SIZE" }, +{ 0x80E0, "GL_BGR_EXT" }, +{ 0x80E0, "GL_BGR" }, +{ 0x80E1, "GL_BGRA_EXT" }, +{ 0x80E1, "GL_BGRA" }, +{ 0x80E1, "GL_BGRA" }, +{ 0x80E2, "GL_COLOR_INDEX1_EXT" }, +{ 0x80E3, "GL_COLOR_INDEX2_EXT" }, +{ 0x80E4, "GL_COLOR_INDEX4_EXT" }, +{ 0x80E5, "GL_COLOR_INDEX8_EXT" }, +{ 0x80E6, "GL_COLOR_INDEX12_EXT" }, +{ 0x80E7, "GL_COLOR_INDEX16_EXT" }, +{ 0x80E8, "GL_MAX_ELEMENTS_VERTICES_EXT" }, +{ 0x80E8, "GL_MAX_ELEMENTS_VERTICES" }, +{ 0x80E9, "GL_MAX_ELEMENTS_INDICES_EXT" }, +{ 0x80E9, "GL_MAX_ELEMENTS_INDICES" }, +{ 0x80ED, "GL_TEXTURE_INDEX_SIZE_EXT" }, +{ 0x80F0, "GL_CLIP_VOLUME_CLIPPING_HINT_EXT" }, +{ 0x8126, "GL_POINT_SIZE_MIN_ARB" }, +{ 0x8126, "GL_POINT_SIZE_MIN" }, +{ 0x8127, "GL_POINT_SIZE_MAX_ARB" }, +{ 0x8127, "GL_POINT_SIZE_MAX" }, +{ 0x8128, "GL_POINT_FADE_THRESHOLD_SIZE_ARB" }, +{ 0x8128, "GL_POINT_FADE_THRESHOLD_SIZE" }, +{ 0x8129, "GL_POINT_DISTANCE_ATTENUATION_ARB" }, +{ 0x8129, "GL_POINT_DISTANCE_ATTENUATION" }, +{ 0x812D, "GL_CLAMP_TO_BORDER_ARB" }, +{ 0x812D, "GL_CLAMP_TO_BORDER" }, +{ 0x812F, "GL_CLAMP_TO_EDGE" }, +{ 0x813A, "GL_TEXTURE_MIN_LOD" }, +{ 0x813B, "GL_TEXTURE_MAX_LOD" }, +{ 0x813C, "GL_TEXTURE_BASE_LEVEL" }, +{ 0x813D, "GL_TEXTURE_MAX_LEVEL" }, +{ 0x8151, "GL_CONSTANT_BORDER" }, +{ 0x8153, "GL_REPLICATE_BORDER" }, +{ 0x8154, "GL_CONVOLUTION_BORDER_COLOR" }, +{ 0x8191, "GL_GENERATE_MIPMAP" }, +{ 0x8192, "GL_GENERATE_MIPMAP_HINT" }, +{ 0x81A5, "GL_DEPTH_COMPONENT16_ARB" }, +{ 0x81A5, "GL_DEPTH_COMPONENT16" }, +{ 0x81A6, "GL_DEPTH_COMPONENT24_ARB" }, +{ 0x81A6, "GL_DEPTH_COMPONENT24" }, +{ 0x81A7, "GL_DEPTH_COMPONENT32_ARB" }, +{ 0x81A7, "GL_DEPTH_COMPONENT32" }, +{ 0x81A8, "GL_ARRAY_ELEMENT_LOCK_FIRST_EXT" }, +{ 0x81A9, "GL_ARRAY_ELEMENT_LOCK_COUNT_EXT" }, +{ 0x81AA, "GL_CULL_VERTEX_EXT" }, +{ 0x81AB, "GL_CULL_VERTEX_EYE_POSITION_EXT" }, +{ 0x81AC, "GL_CULL_VERTEX_OBJECT_POSITION_EXT" }, +{ 0x81AD, "GL_IUI_V2F_EXT" }, +{ 0x81AE, "GL_IUI_V3F_EXT" }, +{ 0x81AF, "GL_IUI_N3F_V2F_EXT" }, +{ 0x81B0, "GL_IUI_N3F_V3F_EXT" }, +{ 0x81B1, "GL_T2F_IUI_V2F_EXT" }, +{ 0x81B2, "GL_T2F_IUI_V3F_EXT" }, +{ 0x81B3, "GL_T2F_IUI_N3F_V2F_EXT" }, +{ 0x81B4, "GL_T2F_IUI_N3F_V3F_EXT" }, +{ 0x81B5, "GL_INDEX_TEST_EXT" }, +{ 0x81B6, "GL_INDEX_TEST_FUNC_EXT" }, +{ 0x81B7, "GL_INDEX_TEST_REF_EXT" }, +{ 0x81B8, "GL_INDEX_MATERIAL_EXT" }, +{ 0x81B9, "GL_INDEX_MATERIAL_PARAMETER_EXT" }, +{ 0x81BA, "GL_INDEX_MATERIAL_FACE_EXT" }, +{ 0x81F8, "GL_LIGHT_MODEL_COLOR_CONTROL_EXT" }, +{ 0x81F8, "GL_LIGHT_MODEL_COLOR_CONTROL" }, +{ 0x81F9, "GL_SINGLE_COLOR_EXT" }, +{ 0x81F9, "GL_SINGLE_COLOR" }, +{ 0x81FA, "GL_SEPARATE_SPECULAR_COLOR_EXT" }, +{ 0x81FA, "GL_SEPARATE_SPECULAR_COLOR" }, +{ 0x81FB, "GL_SHARED_TEXTURE_PALETTE_EXT" }, +{ 0x8210, "GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING" }, +{ 0x8211, "GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE" }, +{ 0x8212, "GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE" }, +{ 0x8213, "GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE" }, +{ 0x8214, "GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE" }, +{ 0x8215, "GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE" }, +{ 0x8216, "GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE" }, +{ 0x8217, "GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE" }, +{ 0x8218, "GL_FRAMEBUFFER_DEFAULT" }, +{ 0x8219, "GL_FRAMEBUFFER_UNDEFINED" }, +{ 0x821A, "GL_DEPTH_STENCIL_ATTACHMENT" }, +{ 0x8225, "GL_COMPRESSED_RED" }, +{ 0x8226, "GL_COMPRESSED_RG" }, +{ 0x8227, "GL_RG" }, +{ 0x8228, "GL_RG_INTEGER" }, +{ 0x8229, "GL_R8" }, +{ 0x822A, "GL_R16" }, +{ 0x822B, "GL_RG8" }, +{ 0x822C, "GL_RG16" }, +{ 0x822D, "GL_R16F" }, +{ 0x822E, "GL_R32F" }, +{ 0x822F, "GL_RG16F" }, +{ 0x8230, "GL_RG32F" }, +{ 0x8231, "GL_R8I" }, +{ 0x8232, "GL_R8UI" }, +{ 0x8233, "GL_R16I" }, +{ 0x8234, "GL_R16UI" }, +{ 0x8235, "GL_R32I" }, +{ 0x8236, "GL_R32UI" }, +{ 0x8237, "GL_RG8I" }, +{ 0x8238, "GL_RG8UI" }, +{ 0x8239, "GL_RG16I" }, +{ 0x823A, "GL_RG16UI" }, +{ 0x823B, "GL_RG32I" }, +{ 0x823C, "GL_RG32UI" }, +{ 0x8330, "GL_PIXEL_TRANSFORM_2D_EXT" }, +{ 0x8331, "GL_PIXEL_MAG_FILTER_EXT" }, +{ 0x8332, "GL_PIXEL_MIN_FILTER_EXT" }, +{ 0x8333, "GL_PIXEL_CUBIC_WEIGHT_EXT" }, +{ 0x8334, "GL_CUBIC_EXT" }, +{ 0x8335, "GL_AVERAGE_EXT" }, +{ 0x8336, "GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT" }, +{ 0x8337, "GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT" }, +{ 0x8338, "GL_PIXEL_TRANSFORM_2D_MATRIX_EXT" }, +{ 0x8349, "GL_FRAGMENT_MATERIAL_EXT" }, +{ 0x834A, "GL_FRAGMENT_NORMAL_EXT" }, +{ 0x834C, "GL_FRAGMENT_COLOR_EXT" }, +{ 0x834D, "GL_ATTENUATION_EXT" }, +{ 0x834E, "GL_SHADOW_ATTENUATION_EXT" }, +{ 0x834F, "GL_TEXTURE_APPLICATION_MODE_EXT" }, +{ 0x8350, "GL_TEXTURE_LIGHT_EXT" }, +{ 0x8351, "GL_TEXTURE_MATERIAL_FACE_EXT" }, +{ 0x8352, "GL_TEXTURE_MATERIAL_PARAMETER_EXT" }, +{ 0x8362, "GL_UNSIGNED_BYTE_2_3_3_REV" }, +{ 0x8363, "GL_UNSIGNED_SHORT_5_6_5" }, +{ 0x8364, "GL_UNSIGNED_SHORT_5_6_5_REV" }, +{ 0x8365, "GL_UNSIGNED_SHORT_4_4_4_4_REV" }, +{ 0x8366, "GL_UNSIGNED_SHORT_1_5_5_5_REV" }, +{ 0x8367, "GL_UNSIGNED_INT_8_8_8_8_REV" }, +{ 0x8368, "GL_UNSIGNED_INT_2_10_10_10_REV" }, +{ 0x8370, "GL_MIRRORED_REPEAT_ARB" }, +{ 0x8370, "GL_MIRRORED_REPEAT" }, +{ 0x83F0, "GL_COMPRESSED_RGB_S3TC_DXT1_EXT" }, +{ 0x83F1, "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT" }, +{ 0x83F2, "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT" }, +{ 0x83F3, "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT" }, +{ 0x8439, "GL_TANGENT_ARRAY_EXT" }, +{ 0x843A, "GL_BINORMAL_ARRAY_EXT" }, +{ 0x843B, "GL_CURRENT_TANGENT_EXT" }, +{ 0x843C, "GL_CURRENT_BINORMAL_EXT" }, +{ 0x843E, "GL_TANGENT_ARRAY_TYPE_EXT" }, +{ 0x843F, "GL_TANGENT_ARRAY_STRIDE_EXT" }, +{ 0x8440, "GL_BINORMAL_ARRAY_TYPE_EXT" }, +{ 0x8441, "GL_BINORMAL_ARRAY_STRIDE_EXT" }, +{ 0x8442, "GL_TANGENT_ARRAY_POINTER_EXT" }, +{ 0x8443, "GL_BINORMAL_ARRAY_POINTER_EXT" }, +{ 0x8444, "GL_MAP1_TANGENT_EXT" }, +{ 0x8445, "GL_MAP2_TANGENT_EXT" }, +{ 0x8446, "GL_MAP1_BINORMAL_EXT" }, +{ 0x8447, "GL_MAP2_BINORMAL_EXT" }, +{ 0x8450, "GL_FOG_COORD_SRC" }, +{ 0x8450, "GL_FOG_COORDINATE_SOURCE_EXT" }, +{ 0x8450, "GL_FOG_COORDINATE_SOURCE" }, +{ 0x8451, "GL_FOG_COORD" }, +{ 0x8451, "GL_FOG_COORDINATE_EXT" }, +{ 0x8451, "GL_FOG_COORDINATE" }, +{ 0x8452, "GL_FRAGMENT_DEPTH_EXT" }, +{ 0x8452, "GL_FRAGMENT_DEPTH" }, +{ 0x8453 , "GL_CURRENT_FOG_COORD" }, +{ 0x8453 , "GL_CURRENT_FOG_COORDINATE" }, +{ 0x8453, "GL_CURRENT_FOG_COORDINATE_EXT" }, +{ 0x8454, "GL_FOG_COORD_ARRAY_TYPE" }, +{ 0x8454, "GL_FOG_COORDINATE_ARRAY_TYPE_EXT" }, +{ 0x8454, "GL_FOG_COORDINATE_ARRAY_TYPE" }, +{ 0x8455, "GL_FOG_COORD_ARRAY_STRIDE" }, +{ 0x8455, "GL_FOG_COORDINATE_ARRAY_STRIDE_EXT" }, +{ 0x8455, "GL_FOG_COORDINATE_ARRAY_STRIDE" }, +{ 0x8456, "GL_FOG_COORD_ARRAY_POINTER" }, +{ 0x8456, "GL_FOG_COORDINATE_ARRAY_POINTER_EXT" }, +{ 0x8456, "GL_FOG_COORDINATE_ARRAY_POINTER" }, +{ 0x8457, "GL_FOG_COORD_ARRAY" }, +{ 0x8457, "GL_FOG_COORDINATE_ARRAY_EXT" }, +{ 0x8457, "GL_FOG_COORDINATE_ARRAY" }, +{ 0x8458, "GL_COLOR_SUM_ARB" }, +{ 0x8458, "GL_COLOR_SUM_EXT" }, +{ 0x8458, "GL_COLOR_SUM" }, +{ 0x8459, "GL_CURRENT_SECONDARY_COLOR_EXT" }, +{ 0x8459, "GL_CURRENT_SECONDARY_COLOR" }, +{ 0x845A, "GL_SECONDARY_COLOR_ARRAY_SIZE_EXT" }, +{ 0x845A, "GL_SECONDARY_COLOR_ARRAY_SIZE" }, +{ 0x845B, "GL_SECONDARY_COLOR_ARRAY_TYPE_EXT" }, +{ 0x845B, "GL_SECONDARY_COLOR_ARRAY_TYPE" }, +{ 0x845C, "GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT" }, +{ 0x845C, "GL_SECONDARY_COLOR_ARRAY_STRIDE" }, +{ 0x845D, "GL_SECONDARY_COLOR_ARRAY_POINTER_EXT" }, +{ 0x845D, "GL_SECONDARY_COLOR_ARRAY_POINTER" }, +{ 0x845E, "GL_SECONDARY_COLOR_ARRAY_EXT" }, +{ 0x845E, "GL_SECONDARY_COLOR_ARRAY" }, +{ 0x845F, "GL_CURRENT_RASTER_SECONDARY_COLOR" }, +{ 0x846D, "GL_ALIASED_POINT_SIZE_RANGE" }, +{ 0x846E, "GL_ALIASED_LINE_WIDTH_RANGE" }, +{ 0x84C0, "GL_TEXTURE0" }, +{ 0x84C1, "GL_TEXTURE1" }, +{ 0x84C2, "GL_TEXTURE2" }, +{ 0x84C3, "GL_TEXTURE3" }, +{ 0x84C4, "GL_TEXTURE4" }, +{ 0x84C5, "GL_TEXTURE5" }, +{ 0x84C6, "GL_TEXTURE6" }, +{ 0x84C7, "GL_TEXTURE7" }, +{ 0x84C8, "GL_TEXTURE8" }, +{ 0x84C9, "GL_TEXTURE9" }, +{ 0x84CA, "GL_TEXTURE10" }, +{ 0x84CB, "GL_TEXTURE11" }, +{ 0x84CC, "GL_TEXTURE12" }, +{ 0x84CD, "GL_TEXTURE13" }, +{ 0x84CE, "GL_TEXTURE14" }, +{ 0x84CF, "GL_TEXTURE15" }, +{ 0x84D0, "GL_TEXTURE16" }, +{ 0x84D1, "GL_TEXTURE17" }, +{ 0x84D2, "GL_TEXTURE18" }, +{ 0x84D3, "GL_TEXTURE19" }, +{ 0x84D4, "GL_TEXTURE20" }, +{ 0x84D5, "GL_TEXTURE21" }, +{ 0x84D6, "GL_TEXTURE22" }, +{ 0x84D7, "GL_TEXTURE23" }, +{ 0x84D8, "GL_TEXTURE24" }, +{ 0x84D9, "GL_TEXTURE25" }, +{ 0x84DA, "GL_TEXTURE26" }, +{ 0x84DB, "GL_TEXTURE27" }, +{ 0x84DC, "GL_TEXTURE28" }, +{ 0x84DD, "GL_TEXTURE29" }, +{ 0x84DE, "GL_TEXTURE30" }, +{ 0x84DF, "GL_TEXTURE31" }, +{ 0x84E0, "GL_ACTIVE_TEXTURE" }, +{ 0x84E1, "GL_CLIENT_ACTIVE_TEXTURE" }, +{ 0x84E2, "GL_MAX_TEXTURE_UNITS" }, +{ 0x84E3, "GL_TRANSPOSE_MODELVIEW_MATRIX" }, +{ 0x84E4, "GL_TRANSPOSE_PROJECTION_MATRIX" }, +{ 0x84E5, "GL_TRANSPOSE_TEXTURE_MATRIX" }, +{ 0x84E6, "GL_TRANSPOSE_COLOR_MATRIX" }, +{ 0x84E7, "GL_SUBTRACT" }, +{ 0x84E8, "GL_MAX_RENDERBUFFER_SIZE" }, +{ 0x84E9, "GL_COMPRESSED_ALPHA" }, +{ 0x84EA, "GL_COMPRESSED_LUMINANCE" }, +{ 0x84EB, "GL_COMPRESSED_LUMINANCE_ALPHA" }, +{ 0x84EC, "GL_COMPRESSED_INTENSITY" }, +{ 0x84ED, "GL_COMPRESSED_RGB" }, +{ 0x84EE, "GL_COMPRESSED_RGBA" }, +{ 0x84EF, "GL_TEXTURE_COMPRESSION_HINT" }, +{ 0x84F5, "GL_TEXTURE_RECTANGLE_EXT" }, +{ 0x84F6, "GL_TEXTURE_BINDING_RECTANGLE_EXT" }, +{ 0x84F7, "GL_PROXY_TEXTURE_RECTANGLE_EXT" }, +{ 0x84F8, "GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT" }, +{ 0x84F9, "GL_DEPTH_STENCIL" }, +{ 0x84FA, "GL_UNSIGNED_INT_24_8" }, +{ 0x84FD, "GL_MAX_TEXTURE_LOD_BIAS" }, +{ 0x84FE, "GL_TEXTURE_MAX_ANISOTROPY_EXT" }, +{ 0x84FF, "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT" }, +{ 0x8500, "GL_TEXTURE_FILTER_CONTROL" }, +{ 0x8501, "GL_TEXTURE_LOD_BIAS" }, +{ 0x8502, "GL_MODELVIEW1_STACK_DEPTH_EXT" }, +{ 0x8506, "GL_MODELVIEW_MATRIX1_EXT" }, +{ 0x8507, "GL_INCR_WRAP" }, +{ 0x8508, "GL_DECR_WRAP" }, +{ 0x8509, "GL_VERTEX_WEIGHTING_EXT" }, +{ 0x850A, "GL_MODELVIEW1_ARB" }, +{ 0x850B, "GL_CURRENT_VERTEX_WEIGHT_EXT" }, +{ 0x850C, "GL_VERTEX_WEIGHT_ARRAY_EXT" }, +{ 0x850D, "GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT" }, +{ 0x850E, "GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT" }, +{ 0x850F, "GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT" }, +{ 0x8510, "GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT" }, +{ 0x8511, "GL_NORMAL_MAP_ARB" }, +{ 0x8511, "GL_NORMAL_MAP_EXT" }, +{ 0x8511, "GL_NORMAL_MAP" }, +{ 0x8512, "GL_REFLECTION_MAP_ARB" }, +{ 0x8512, "GL_REFLECTION_MAP_EXT" }, +{ 0x8512, "GL_REFLECTION_MAP" }, +{ 0x8513, "GL_TEXTURE_CUBE_MAP_ARB" }, +{ 0x8513, "GL_TEXTURE_CUBE_MAP_EXT" }, +{ 0x8513, "GL_TEXTURE_CUBE_MAP" }, +{ 0x8514, "GL_TEXTURE_BINDING_CUBE_MAP_ARB" }, +{ 0x8514, "GL_TEXTURE_BINDING_CUBE_MAP_EXT" }, +{ 0x8514, "GL_TEXTURE_BINDING_CUBE_MAP" }, +{ 0x8515, "GL_TEXTURE_CUBE_MAP_POSITIVE_X" }, +{ 0x8516, "GL_TEXTURE_CUBE_MAP_NEGATIVE_X" }, +{ 0x8517, "GL_TEXTURE_CUBE_MAP_POSITIVE_Y" }, +{ 0x8518, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y" }, +{ 0x8519, "GL_TEXTURE_CUBE_MAP_POSITIVE_Z" }, +{ 0x851A, "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z" }, +{ 0x851B, "GL_PROXY_TEXTURE_CUBE_MAP" }, +{ 0x851C, "GL_MAX_CUBE_MAP_TEXTURE_SIZE" }, +{ 0x851D, "GL_VERTEX_ARRAY_RANGE_APPLE" }, +{ 0x851E, "GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE" }, +{ 0x851F, "GL_VERTEX_ARRAY_STORAGE_HINT_APPLE" }, +{ 0x8520, "GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE" }, +{ 0x8521, "GL_VERTEX_ARRAY_RANGE_POINTER_APPLE" }, +{ 0x8570, "GL_COMBINE_ARB" }, +{ 0x8570, "GL_COMBINE_EXT" }, +{ 0x8570, "GL_COMBINE" }, +{ 0x8571, "GL_COMBINE_RGB_ARB" }, +{ 0x8571, "GL_COMBINE_RGB_EXT" }, +{ 0x8571, "GL_COMBINE_RGB" }, +{ 0x8572, "GL_COMBINE_ALPHA_ARB" }, +{ 0x8572, "GL_COMBINE_ALPHA_EXT" }, +{ 0x8572, "GL_COMBINE_ALPHA" }, +{ 0x8573, "GL_RGB_SCALE_ARB" }, +{ 0x8573, "GL_RGB_SCALE_EXT" }, +{ 0x8573, "GL_RGB_SCALE" }, +{ 0x8574, "GL_ADD_SIGNED_ARB" }, +{ 0x8574, "GL_ADD_SIGNED_EXT" }, +{ 0x8574, "GL_ADD_SIGNED" }, +{ 0x8575, "GL_INTERPOLATE_ARB" }, +{ 0x8575, "GL_INTERPOLATE_EXT" }, +{ 0x8575, "GL_INTERPOLATE" }, +{ 0x8576, "GL_CONSTANT_ARB" }, +{ 0x8576, "GL_CONSTANT_EXT" }, +{ 0x8576, "GL_CONSTANT" }, +{ 0x8577, "GL_PRIMARY_COLOR_ARB" }, +{ 0x8577, "GL_PRIMARY_COLOR_EXT" }, +{ 0x8577, "GL_PRIMARY_COLOR" }, +{ 0x8578, "GL_PREVIOUS_ARB" }, +{ 0x8578, "GL_PREVIOUS_EXT" }, +{ 0x8578, "GL_PREVIOUS" }, +{ 0x8580, "GL_SOURCE0_RGB_ARB" }, +{ 0x8580, "GL_SOURCE0_RGB_EXT" }, +{ 0x8580, "GL_SOURCE0_RGB" }, +{ 0x8580, "GL_SRC0_RGB" }, +{ 0x8581, "GL_SOURCE1_RGB_ARB" }, +{ 0x8581, "GL_SOURCE1_RGB_EXT" }, +{ 0x8581, "GL_SOURCE1_RGB" }, +{ 0x8581, "GL_SRC1_RGB" }, +{ 0x8582, "GL_SOURCE2_RGB_ARB" }, +{ 0x8582, "GL_SOURCE2_RGB_EXT" }, +{ 0x8582, "GL_SOURCE2_RGB" }, +{ 0x8582, "GL_SRC2_RGB" }, +{ 0x8583, "GL_SOURCE3_RGB_ARB" }, +{ 0x8583, "GL_SOURCE3_RGB_EXT" }, +{ 0x8583, "GL_SOURCE3_RGB" }, +{ 0x8583, "GL_SRC3_RGB" }, +{ 0x8584, "GL_SOURCE4_RGB_ARB" }, +{ 0x8584, "GL_SOURCE4_RGB_EXT" }, +{ 0x8584, "GL_SOURCE4_RGB" }, +{ 0x8584, "GL_SRC4_RGB" }, +{ 0x8585, "GL_SOURCE5_RGB_ARB" }, +{ 0x8585, "GL_SOURCE5_RGB_EXT" }, +{ 0x8585, "GL_SOURCE5_RGB" }, +{ 0x8585, "GL_SRC5_RGB" }, +{ 0x8586, "GL_SOURCE6_RGB_ARB" }, +{ 0x8586, "GL_SOURCE6_RGB_EXT" }, +{ 0x8586, "GL_SOURCE6_RGB" }, +{ 0x8586, "GL_SRC6_RGB" }, +{ 0x8587, "GL_SOURCE7_RGB_ARB" }, +{ 0x8587, "GL_SOURCE7_RGB_EXT" }, +{ 0x8587, "GL_SOURCE7_RGB" }, +{ 0x8587, "GL_SRC7_RGB" }, +{ 0x8588, "GL_SOURCE0_ALPHA_ARB" }, +{ 0x8588, "GL_SOURCE0_ALPHA_EXT" }, +{ 0x8588, "GL_SOURCE0_ALPHA" }, +{ 0x8588, "GL_SRC0_ALPHA" }, +{ 0x8589, "GL_SOURCE1_ALPHA_ARB" }, +{ 0x8589, "GL_SOURCE1_ALPHA_EXT" }, +{ 0x8589, "GL_SOURCE1_ALPHA" }, +{ 0x8589, "GL_SRC1_ALPHA" }, +{ 0x858A, "GL_SOURCE2_ALPHA_ARB" }, +{ 0x858A, "GL_SOURCE2_ALPHA_EXT" }, +{ 0x858A, "GL_SOURCE2_ALPHA" }, +{ 0x858A, "GL_SRC2_ALPHA" }, +{ 0x858B, "GL_SOURCE3_ALPHA_ARB" }, +{ 0x858B, "GL_SOURCE3_ALPHA_EXT" }, +{ 0x858B, "GL_SOURCE3_ALPHA" }, +{ 0x858B, "GL_SRC3_ALPHA" }, +{ 0x858C, "GL_SOURCE4_ALPHA_ARB" }, +{ 0x858C, "GL_SOURCE4_ALPHA_EXT" }, +{ 0x858C, "GL_SOURCE4_ALPHA" }, +{ 0x858C, "GL_SRC4_ALPHA" }, +{ 0x858D, "GL_SOURCE5_ALPHA_ARB" }, +{ 0x858D, "GL_SOURCE5_ALPHA_EXT" }, +{ 0x858D, "GL_SOURCE5_ALPHA" }, +{ 0x858D, "GL_SRC5_ALPHA" }, +{ 0x858E, "GL_SOURCE6_ALPHA_ARB" }, +{ 0x858E, "GL_SOURCE6_ALPHA_EXT" }, +{ 0x858E, "GL_SOURCE6_ALPHA" }, +{ 0x858E, "GL_SRC6_ALPHA" }, +{ 0x858F, "GL_SOURCE7_ALPHA_ARB" }, +{ 0x858F, "GL_SOURCE7_ALPHA_EXT" }, +{ 0x858F, "GL_SOURCE7_ALPHA" }, +{ 0x858F, "GL_SRC7_ALPHA" }, +{ 0x8590, "GL_OPERAND0_RGB_ARB" }, +{ 0x8590, "GL_OPERAND0_RGB_EXT" }, +{ 0x8590, "GL_OPERAND0_RGB" }, +{ 0x8591, "GL_OPERAND1_RGB_ARB" }, +{ 0x8591, "GL_OPERAND1_RGB_EXT" }, +{ 0x8591, "GL_OPERAND1_RGB" }, +{ 0x8592, "GL_OPERAND2_RGB_ARB" }, +{ 0x8592, "GL_OPERAND2_RGB_EXT" }, +{ 0x8592, "GL_OPERAND2_RGB" }, +{ 0x8593, "GL_OPERAND3_RGB_ARB" }, +{ 0x8593, "GL_OPERAND3_RGB_EXT" }, +{ 0x8593, "GL_OPERAND3_RGB" }, +{ 0x8594, "GL_OPERAND4_RGB_ARB" }, +{ 0x8594, "GL_OPERAND4_RGB_EXT" }, +{ 0x8594, "GL_OPERAND4_RGB" }, +{ 0x8595, "GL_OPERAND5_RGB_ARB" }, +{ 0x8595, "GL_OPERAND5_RGB_EXT" }, +{ 0x8595, "GL_OPERAND5_RGB" }, +{ 0x8596, "GL_OPERAND6_RGB_ARB" }, +{ 0x8596, "GL_OPERAND6_RGB_EXT" }, +{ 0x8596, "GL_OPERAND6_RGB" }, +{ 0x8597, "GL_OPERAND7_RGB_ARB" }, +{ 0x8597, "GL_OPERAND7_RGB_EXT" }, +{ 0x8597, "GL_OPERAND7_RGB" }, +{ 0x8598, "GL_OPERAND0_ALPHA_ARB" }, +{ 0x8598, "GL_OPERAND0_ALPHA_EXT" }, +{ 0x8598, "GL_OPERAND0_ALPHA" }, +{ 0x8599, "GL_OPERAND1_ALPHA_ARB" }, +{ 0x8599, "GL_OPERAND1_ALPHA_EXT" }, +{ 0x8599, "GL_OPERAND1_ALPHA" }, +{ 0x859A, "GL_OPERAND2_ALPHA_ARB" }, +{ 0x859A, "GL_OPERAND2_ALPHA_EXT" }, +{ 0x859A, "GL_OPERAND2_ALPHA" }, +{ 0x859B, "GL_OPERAND3_ALPHA_ARB" }, +{ 0x859B, "GL_OPERAND3_ALPHA_EXT" }, +{ 0x859B, "GL_OPERAND3_ALPHA" }, +{ 0x859C, "GL_OPERAND4_ALPHA_ARB" }, +{ 0x859C, "GL_OPERAND4_ALPHA_EXT" }, +{ 0x859C, "GL_OPERAND4_ALPHA" }, +{ 0x859D, "GL_OPERAND5_ALPHA_ARB" }, +{ 0x859D, "GL_OPERAND5_ALPHA_EXT" }, +{ 0x859D, "GL_OPERAND5_ALPHA" }, +{ 0x859E, "GL_OPERAND6_ALPHA_ARB" }, +{ 0x859E, "GL_OPERAND6_ALPHA_EXT" }, +{ 0x859E, "GL_OPERAND6_ALPHA" }, +{ 0x859F, "GL_OPERAND7_ALPHA_ARB" }, +{ 0x859F, "GL_OPERAND7_ALPHA_EXT" }, +{ 0x859F, "GL_OPERAND7_ALPHA" }, +{ 0x85AE, "GL_PERTURB_EXT" }, +{ 0x85AF, "GL_TEXTURE_NORMAL_EXT" }, +{ 0x85B4, "GL_STORAGE_CLIENT_APPLE" }, +{ 0x85B5, "GL_VERTEX_ARRAY_BINDING_APPLE" }, +{ 0x85BD, "GL_STORAGE_PRIVATE_APPLE" }, +{ 0x85BE, "GL_STORAGE_CACHED_APPLE" }, +{ 0x85BF, "GL_STORAGE_SHARED_APPLE" }, +{ 0x8620, "GL_VERTEX_PROGRAM_ARB" }, +{ 0x8620, "GL_VERTEX_PROGRAM_NV" }, +{ 0x8621, "GL_VERTEX_STATE_PROGRAM_NV" }, +{ 0x8622, "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB" }, +{ 0x8622, "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB" }, +{ 0x8622, "GL_VERTEX_ATTRIB_ARRAY_ENABLED" }, +{ 0x8623, "GL_ATTRIB_ARRAY_SIZE_NV" }, +{ 0x8623, "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB" }, +{ 0x8623, "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB" }, +{ 0x8623, "GL_VERTEX_ATTRIB_ARRAY_SIZE" }, +{ 0x8624, "GL_ATTRIB_ARRAY_STRIDE_NV" }, +{ 0x8624, "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB" }, +{ 0x8624, "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB" }, +{ 0x8624, "GL_VERTEX_ATTRIB_ARRAY_STRIDE" }, +{ 0x8625, "GL_ATTRIB_ARRAY_TYPE_NV" }, +{ 0x8625, "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB" }, +{ 0x8625, "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB" }, +{ 0x8625, "GL_VERTEX_ATTRIB_ARRAY_TYPE" }, +{ 0x8626, "GL_CURRENT_ATTRIB_NV" }, +{ 0x8626, "GL_CURRENT_VERTEX_ATTRIB_ARB" }, +{ 0x8626, "GL_CURRENT_VERTEX_ATTRIB_ARB" }, +{ 0x8626, "GL_CURRENT_VERTEX_ATTRIB" }, +{ 0x8627, "GL_PROGRAM_LENGTH_ARB" }, +{ 0x8627, "GL_PROGRAM_LENGTH_NV" }, +{ 0x8628, "GL_PROGRAM_STRING_ARB" }, +{ 0x8628, "GL_PROGRAM_STRING_NV" }, +{ 0x8629, "GL_MODELVIEW_PROJECTION_NV" }, +{ 0x862A, "GL_IDENTITY_NV" }, +{ 0x862B, "GL_INVERSE_NV" }, +{ 0x862C, "GL_TRANSPOSE_NV" }, +{ 0x862D, "GL_INVERSE_TRANSPOSE_NV" }, +{ 0x862E, "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB" }, +{ 0x862E, "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV" }, +{ 0x862F, "GL_MAX_PROGRAM_MATRICES_ARB" }, +{ 0x862F, "GL_MAX_TRACK_MATRICES_NV" }, +{ 0x8630, "GL_MATRIX0_NV" }, +{ 0x8631, "GL_MATRIX1_NV" }, +{ 0x8632, "GL_MATRIX2_NV" }, +{ 0x8633, "GL_MATRIX3_NV" }, +{ 0x8634, "GL_MATRIX4_NV" }, +{ 0x8635, "GL_MATRIX5_NV" }, +{ 0x8636, "GL_MATRIX6_NV" }, +{ 0x8637, "GL_MATRIX7_NV" }, +{ 0x8640, "GL_CURRENT_MATRIX_STACK_DEPTH_ARB" }, +{ 0x8640, "GL_CURRENT_MATRIX_STACK_DEPTH_NV" }, +{ 0x8641, "GL_CURRENT_MATRIX_ARB" }, +{ 0x8641, "GL_CURRENT_MATRIX_NV" }, +{ 0x8642, "GL_PROGRAM_POINT_SIZE_EXT" }, +{ 0x8642, "GL_VERTEX_PROGRAM_POINT_SIZE_ARB" }, +{ 0x8642, "GL_VERTEX_PROGRAM_POINT_SIZE_ARB" }, +{ 0x8642, "GL_VERTEX_PROGRAM_POINT_SIZE_NV" }, +{ 0x8642, "GL_VERTEX_PROGRAM_POINT_SIZE" }, +{ 0x8643, "GL_VERTEX_PROGRAM_TWO_SIDE_ARB" }, +{ 0x8643, "GL_VERTEX_PROGRAM_TWO_SIDE_ARB" }, +{ 0x8643, "GL_VERTEX_PROGRAM_TWO_SIDE_NV" }, +{ 0x8643, "GL_VERTEX_PROGRAM_TWO_SIDE" }, +{ 0x8644, "GL_PROGRAM_PARAMETER_NV" }, +{ 0x8645, "GL_ATTRIB_ARRAY_POINTER_NV" }, +{ 0x8645, "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB" }, +{ 0x8645, "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB" }, +{ 0x8645, "GL_VERTEX_ATTRIB_ARRAY_POINTER" }, +{ 0x8646, "GL_PROGRAM_TARGET_NV" }, +{ 0x8647, "GL_PROGRAM_RESIDENT_NV" }, +{ 0x8648, "GL_TRACK_MATRIX_NV" }, +{ 0x8649, "GL_TRACK_MATRIX_TRANSFORM_NV" }, +{ 0x864A, "GL_VERTEX_PROGRAM_BINDING_NV" }, +{ 0x864B, "GL_PROGRAM_ERROR_POSITION_ARB" }, +{ 0x864B, "GL_PROGRAM_ERROR_POSITION_NV" }, +{ 0x8650, "GL_VERTEX_ATTRIB_ARRAY0_NV" }, +{ 0x8651, "GL_VERTEX_ATTRIB_ARRAY1_NV" }, +{ 0x8652, "GL_VERTEX_ATTRIB_ARRAY2_NV" }, +{ 0x8653, "GL_VERTEX_ATTRIB_ARRAY3_NV" }, +{ 0x8654, "GL_VERTEX_ATTRIB_ARRAY4_NV" }, +{ 0x8655, "GL_VERTEX_ATTRIB_ARRAY5_NV" }, +{ 0x8656, "GL_VERTEX_ATTRIB_ARRAY6_NV" }, +{ 0x8657, "GL_VERTEX_ATTRIB_ARRAY7_NV" }, +{ 0x8658, "GL_VERTEX_ATTRIB_ARRAY8_NV" }, +{ 0x8659, "GL_VERTEX_ATTRIB_ARRAY9_NV" }, +{ 0x865A, "GL_VERTEX_ATTRIB_ARRAY10_NV" }, +{ 0x865B, "GL_VERTEX_ATTRIB_ARRAY11_NV" }, +{ 0x865C, "GL_VERTEX_ATTRIB_ARRAY12_NV" }, +{ 0x865D, "GL_VERTEX_ATTRIB_ARRAY13_NV" }, +{ 0x865E, "GL_VERTEX_ATTRIB_ARRAY14_NV" }, +{ 0x865F, "GL_VERTEX_ATTRIB_ARRAY15_NV" }, +{ 0x8660, "GL_MAP1_VERTEX_ATTRIB0_4_NV" }, +{ 0x8661, "GL_MAP1_VERTEX_ATTRIB1_4_NV" }, +{ 0x8662, "GL_MAP1_VERTEX_ATTRIB2_4_NV" }, +{ 0x8663, "GL_MAP1_VERTEX_ATTRIB3_4_NV" }, +{ 0x8664, "GL_MAP1_VERTEX_ATTRIB4_4_NV" }, +{ 0x8665, "GL_MAP1_VERTEX_ATTRIB5_4_NV" }, +{ 0x8666, "GL_MAP1_VERTEX_ATTRIB6_4_NV" }, +{ 0x8667, "GL_MAP1_VERTEX_ATTRIB7_4_NV" }, +{ 0x8668, "GL_MAP1_VERTEX_ATTRIB8_4_NV" }, +{ 0x8669, "GL_MAP1_VERTEX_ATTRIB9_4_NV" }, +{ 0x866A, "GL_MAP1_VERTEX_ATTRIB10_4_NV" }, +{ 0x866B, "GL_MAP1_VERTEX_ATTRIB11_4_NV" }, +{ 0x866C, "GL_MAP1_VERTEX_ATTRIB12_4_NV" }, +{ 0x866D, "GL_MAP1_VERTEX_ATTRIB13_4_NV" }, +{ 0x866E, "GL_MAP1_VERTEX_ATTRIB14_4_NV" }, +{ 0x866F, "GL_MAP1_VERTEX_ATTRIB15_4_NV" }, +{ 0x8670, "GL_MAP2_VERTEX_ATTRIB0_4_NV" }, +{ 0x8671, "GL_MAP2_VERTEX_ATTRIB1_4_NV" }, +{ 0x8672, "GL_MAP2_VERTEX_ATTRIB2_4_NV" }, +{ 0x8673, "GL_MAP2_VERTEX_ATTRIB3_4_NV" }, +{ 0x8674, "GL_MAP2_VERTEX_ATTRIB4_4_NV" }, +{ 0x8675, "GL_MAP2_VERTEX_ATTRIB5_4_NV" }, +{ 0x8676, "GL_MAP2_VERTEX_ATTRIB6_4_NV" }, +{ 0x8677, "GL_MAP2_VERTEX_ATTRIB7_4_NV" }, +{ 0x8677, "GL_PROGRAM_BINDING_ARB" }, +{ 0x8677, "GL_PROGRAM_NAME_ARB" }, +{ 0x8678, "GL_MAP2_VERTEX_ATTRIB8_4_NV" }, +{ 0x8679, "GL_MAP2_VERTEX_ATTRIB9_4_NV" }, +{ 0x867A, "GL_MAP2_VERTEX_ATTRIB10_4_NV" }, +{ 0x867B, "GL_MAP2_VERTEX_ATTRIB11_4_NV" }, +{ 0x867C, "GL_MAP2_VERTEX_ATTRIB12_4_NV" }, +{ 0x867D, "GL_MAP2_VERTEX_ATTRIB13_4_NV" }, +{ 0x867E, "GL_MAP2_VERTEX_ATTRIB14_4_NV" }, +{ 0x867F, "GL_MAP2_VERTEX_ATTRIB15_4_NV" }, +{ 0x86A0, "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB" }, +{ 0x86A0, "GL_TEXTURE_COMPRESSED_IMAGE_SIZE" }, +{ 0x86A1, "GL_TEXTURE_COMPRESSED_ARB" }, +{ 0x86A1, "GL_TEXTURE_COMPRESSED" }, +{ 0x86A2, "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB" }, +{ 0x86A2, "GL_NUM_COMPRESSED_TEXTURE_FORMATS" }, +{ 0x86A3, "GL_COMPRESSED_TEXTURE_FORMATS_ARB" }, +{ 0x86A3, "GL_COMPRESSED_TEXTURE_FORMATS" }, +{ 0x86A4, "GL_MAX_VERTEX_UNITS_ARB" }, +{ 0x86A5, "GL_ACTIVE_VERTEX_UNITS_ARB" }, +{ 0x86A6, "GL_WEIGHT_SUM_UNITY_ARB" }, +{ 0x86A7, "GL_VERTEX_BLEND_ARB" }, +{ 0x86A8, "GL_CURRENT_WEIGHT_ARB" }, +{ 0x86A9, "GL_WEIGHT_ARRAY_TYPE_ARB" }, +{ 0x86AA, "GL_WEIGHT_ARRAY_STRIDE_ARB" }, +{ 0x86AB, "GL_WEIGHT_ARRAY_SIZE_ARB" }, +{ 0x86AC, "GL_WEIGHT_ARRAY_POINTER_ARB" }, +{ 0x86AD, "GL_WEIGHT_ARRAY_ARB" }, +{ 0x86AE, "GL_DOT3_RGB_ARB" }, +{ 0x86AE, "GL_DOT3_RGB" }, +{ 0x86AF, "GL_DOT3_RGBA_ARB" }, +{ 0x86AF, "GL_DOT3_RGBA" }, +{ 0x8722, "GL_MODELVIEW2_ARB" }, +{ 0x8723, "GL_MODELVIEW3_ARB" }, +{ 0x8724, "GL_MODELVIEW4_ARB" }, +{ 0x8725, "GL_MODELVIEW5_ARB" }, +{ 0x8726, "GL_MODELVIEW6_ARB" }, +{ 0x8727, "GL_MODELVIEW7_ARB" }, +{ 0x8728, "GL_MODELVIEW8_ARB" }, +{ 0x8729, "GL_MODELVIEW9_ARB" }, +{ 0x872A, "GL_MODELVIEW10_ARB" }, +{ 0x872B, "GL_MODELVIEW11_ARB" }, +{ 0x872C, "GL_MODELVIEW12_ARB" }, +{ 0x872D, "GL_MODELVIEW13_ARB" }, +{ 0x872E, "GL_MODELVIEW14_ARB" }, +{ 0x872F, "GL_MODELVIEW15_ARB" }, +{ 0x8730, "GL_MODELVIEW16_ARB" }, +{ 0x8731, "GL_MODELVIEW17_ARB" }, +{ 0x8732, "GL_MODELVIEW18_ARB" }, +{ 0x8733, "GL_MODELVIEW19_ARB" }, +{ 0x8734, "GL_MODELVIEW20_ARB" }, +{ 0x8735, "GL_MODELVIEW21_ARB" }, +{ 0x8736, "GL_MODELVIEW22_ARB" }, +{ 0x8737, "GL_MODELVIEW23_ARB" }, +{ 0x8738, "GL_MODELVIEW24_ARB" }, +{ 0x8739, "GL_MODELVIEW25_ARB" }, +{ 0x873A, "GL_MODELVIEW26_ARB" }, +{ 0x873B, "GL_MODELVIEW27_ARB" }, +{ 0x873C, "GL_MODELVIEW28_ARB" }, +{ 0x873D, "GL_MODELVIEW29_ARB" }, +{ 0x873E, "GL_MODELVIEW30_ARB" }, +{ 0x873F, "GL_MODELVIEW31_ARB" }, +{ 0x8742, "GL_MIRROR_CLAMP_EXT" }, +{ 0x8743, "GL_MIRROR_CLAMP_TO_EDGE_EXT" }, +{ 0x8764, "GL_BUFFER_SIZE_ARB" }, +{ 0x8764, "GL_BUFFER_SIZE" }, +{ 0x8765, "GL_BUFFER_USAGE_ARB" }, +{ 0x8765, "GL_BUFFER_USAGE" }, +{ 0x8780, "GL_VERTEX_SHADER_EXT" }, +{ 0x8781, "GL_VERTEX_SHADER_BINDING_EXT" }, +{ 0x8782, "GL_OP_INDEX_EXT" }, +{ 0x8783, "GL_OP_NEGATE_EXT" }, +{ 0x8784, "GL_OP_DOT3_EXT" }, +{ 0x8785, "GL_OP_DOT4_EXT" }, +{ 0x8786, "GL_OP_MUL_EXT" }, +{ 0x8787, "GL_OP_ADD_EXT" }, +{ 0x8788, "GL_OP_MADD_EXT" }, +{ 0x8789, "GL_OP_FRAC_EXT" }, +{ 0x878A, "GL_OP_MAX_EXT" }, +{ 0x878B, "GL_OP_MIN_EXT" }, +{ 0x878C, "GL_OP_SET_GE_EXT" }, +{ 0x878D, "GL_OP_SET_LT_EXT" }, +{ 0x878E, "GL_OP_CLAMP_EXT" }, +{ 0x878F, "GL_OP_FLOOR_EXT" }, +{ 0x8790, "GL_OP_ROUND_EXT" }, +{ 0x8791, "GL_OP_EXP_BASE_2_EXT" }, +{ 0x8792, "GL_OP_LOG_BASE_2_EXT" }, +{ 0x8793, "GL_OP_POWER_EXT" }, +{ 0x8794, "GL_OP_RECIP_EXT" }, +{ 0x8795, "GL_OP_RECIP_SQRT_EXT" }, +{ 0x8796, "GL_OP_SUB_EXT" }, +{ 0x8797, "GL_OP_CROSS_PRODUCT_EXT" }, +{ 0x8798, "GL_OP_MULTIPLY_MATRIX_EXT" }, +{ 0x8799, "GL_OP_MOV_EXT" }, +{ 0x879A, "GL_OUTPUT_VERTEX_EXT" }, +{ 0x879B, "GL_OUTPUT_COLOR0_EXT" }, +{ 0x879C, "GL_OUTPUT_COLOR1_EXT" }, +{ 0x879D, "GL_OUTPUT_TEXTURE_COORD0_EXT" }, +{ 0x879E, "GL_OUTPUT_TEXTURE_COORD1_EXT" }, +{ 0x879F, "GL_OUTPUT_TEXTURE_COORD2_EXT" }, +{ 0x87A0, "GL_OUTPUT_TEXTURE_COORD3_EXT" }, +{ 0x87A1, "GL_OUTPUT_TEXTURE_COORD4_EXT" }, +{ 0x87A2, "GL_OUTPUT_TEXTURE_COORD5_EXT" }, +{ 0x87A3, "GL_OUTPUT_TEXTURE_COORD6_EXT" }, +{ 0x87A4, "GL_OUTPUT_TEXTURE_COORD7_EXT" }, +{ 0x87A5, "GL_OUTPUT_TEXTURE_COORD8_EXT" }, +{ 0x87A6, "GL_OUTPUT_TEXTURE_COORD9_EXT" }, +{ 0x87A7, "GL_OUTPUT_TEXTURE_COORD10_EXT" }, +{ 0x87A8, "GL_OUTPUT_TEXTURE_COORD11_EXT" }, +{ 0x87A9, "GL_OUTPUT_TEXTURE_COORD12_EXT" }, +{ 0x87AA, "GL_OUTPUT_TEXTURE_COORD13_EXT" }, +{ 0x87AB, "GL_OUTPUT_TEXTURE_COORD14_EXT" }, +{ 0x87AC, "GL_OUTPUT_TEXTURE_COORD15_EXT" }, +{ 0x87AD, "GL_OUTPUT_TEXTURE_COORD16_EXT" }, +{ 0x87AE, "GL_OUTPUT_TEXTURE_COORD17_EXT" }, +{ 0x87AF, "GL_OUTPUT_TEXTURE_COORD18_EXT" }, +{ 0x87B0, "GL_OUTPUT_TEXTURE_COORD19_EXT" }, +{ 0x87B1, "GL_OUTPUT_TEXTURE_COORD20_EXT" }, +{ 0x87B2, "GL_OUTPUT_TEXTURE_COORD21_EXT" }, +{ 0x87B3, "GL_OUTPUT_TEXTURE_COORD22_EXT" }, +{ 0x87B4, "GL_OUTPUT_TEXTURE_COORD23_EXT" }, +{ 0x87B5, "GL_OUTPUT_TEXTURE_COORD24_EXT" }, +{ 0x87B6, "GL_OUTPUT_TEXTURE_COORD25_EXT" }, +{ 0x87B7, "GL_OUTPUT_TEXTURE_COORD26_EXT" }, +{ 0x87B8, "GL_OUTPUT_TEXTURE_COORD27_EXT" }, +{ 0x87B9, "GL_OUTPUT_TEXTURE_COORD28_EXT" }, +{ 0x87BA, "GL_OUTPUT_TEXTURE_COORD29_EXT" }, +{ 0x87BB, "GL_OUTPUT_TEXTURE_COORD30_EXT" }, +{ 0x87BC, "GL_OUTPUT_TEXTURE_COORD31_EXT" }, +{ 0x87BD, "GL_OUTPUT_FOG_EXT" }, +{ 0x87BE, "GL_SCALAR_EXT" }, +{ 0x87BF, "GL_VECTOR_EXT" }, +{ 0x87C0, "GL_MATRIX_EXT" }, +{ 0x87C1, "GL_VARIANT_EXT" }, +{ 0x87C2, "GL_INVARIANT_EXT" }, +{ 0x87C3, "GL_LOCAL_CONSTANT_EXT" }, +{ 0x87C4, "GL_LOCAL_EXT" }, +{ 0x87C5, "GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT" }, +{ 0x87C6, "GL_MAX_VERTEX_SHADER_VARIANTS_EXT" }, +{ 0x87C7, "GL_MAX_VERTEX_SHADER_INVARIANTS_EXT" }, +{ 0x87C8, "GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT" }, +{ 0x87C9, "GL_MAX_VERTEX_SHADER_LOCALS_EXT" }, +{ 0x87CA, "GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT" }, +{ 0x87CB, "GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT" }, +{ 0x87CC, "GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT" }, +{ 0x87CD, "GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT" }, +{ 0x87CE, "GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT" }, +{ 0x87CF, "GL_VERTEX_SHADER_INSTRUCTIONS_EXT" }, +{ 0x87D0, "GL_VERTEX_SHADER_VARIANTS_EXT" }, +{ 0x87D1, "GL_VERTEX_SHADER_INVARIANTS_EXT" }, +{ 0x87D2, "GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT" }, +{ 0x87D3, "GL_VERTEX_SHADER_LOCALS_EXT" }, +{ 0x87D4, "GL_VERTEX_SHADER_OPTIMIZED_EXT" }, +{ 0x87D5, "GL_X_EXT" }, +{ 0x87D6, "GL_Y_EXT" }, +{ 0x87D7, "GL_Z_EXT" }, +{ 0x87D8, "GL_W_EXT" }, +{ 0x87D9, "GL_NEGATIVE_X_EXT" }, +{ 0x87DA, "GL_NEGATIVE_Y_EXT" }, +{ 0x87DB, "GL_NEGATIVE_Z_EXT" }, +{ 0x87DC, "GL_NEGATIVE_W_EXT" }, +{ 0x87DF, "GL_NEGATIVE_ONE_EXT" }, +{ 0x87E0, "GL_NORMALIZED_RANGE_EXT" }, +{ 0x87E1, "GL_FULL_RANGE_EXT" }, +{ 0x87E2, "GL_CURRENT_VERTEX_EXT" }, +{ 0x87E3, "GL_MVP_MATRIX_EXT" }, +{ 0x87E4, "GL_VARIANT_VALUE_EXT" }, +{ 0x87E5, "GL_VARIANT_DATATYPE_EXT" }, +{ 0x87E6, "GL_VARIANT_ARRAY_STRIDE_EXT" }, +{ 0x87E7, "GL_VARIANT_ARRAY_TYPE_EXT" }, +{ 0x87E8, "GL_VARIANT_ARRAY_EXT" }, +{ 0x87E9, "GL_VARIANT_ARRAY_POINTER_EXT" }, +{ 0x87EA, "GL_INVARIANT_VALUE_EXT" }, +{ 0x87EB, "GL_INVARIANT_DATATYPE_EXT" }, +{ 0x87EC, "GL_LOCAL_CONSTANT_VALUE_EXT" }, +{ 0x87Ed, "GL_LOCAL_CONSTANT_DATATYPE_EXT" }, +{ 0x8800, "GL_STENCIL_BACK_FUNC_ATI" }, +{ 0x8800, "GL_STENCIL_BACK_FUNC" }, +{ 0x8801, "GL_STENCIL_BACK_FAIL_ATI" }, +{ 0x8801, "GL_STENCIL_BACK_FAIL" }, +{ 0x8802, "GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI" }, +{ 0x8802, "GL_STENCIL_BACK_PASS_DEPTH_FAIL" }, +{ 0x8803, "GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI" }, +{ 0x8803, "GL_STENCIL_BACK_PASS_DEPTH_PASS" }, +{ 0x8804, "GL_FRAGMENT_PROGRAM_ARB" }, +{ 0x8805, "GL_PROGRAM_ALU_INSTRUCTIONS_ARB" }, +{ 0x8806, "GL_PROGRAM_TEX_INSTRUCTIONS_ARB" }, +{ 0x8807, "GL_PROGRAM_TEX_INDIRECTIONS_ARB" }, +{ 0x8808, "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB" }, +{ 0x8809, "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB" }, +{ 0x880A, "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB" }, +{ 0x880B, "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB" }, +{ 0x880C, "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB" }, +{ 0x880D, "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB" }, +{ 0x880E, "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB" }, +{ 0x880F, "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB" }, +{ 0x8810, "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB" }, +{ 0x8814, "GL_RGBA_FLOAT32_APPLE" }, +{ 0x8814, "GL_RGBA_FLOAT32_ATI" }, +{ 0x8814, "GL_RGBA32F_ARB" }, +{ 0x8815, "GL_RGB_FLOAT32_APPLE" }, +{ 0x8815, "GL_RGB_FLOAT32_ATI" }, +{ 0x8815, "GL_RGB32F_ARB" }, +{ 0x8816, "GL_ALPHA_FLOAT32_APPLE" }, +{ 0x8816, "GL_ALPHA_FLOAT32_ATI" }, +{ 0x8816, "GL_ALPHA32F_ARB" }, +{ 0x8817, "GL_INTENSITY_FLOAT32_APPLE" }, +{ 0x8817, "GL_INTENSITY_FLOAT32_ATI" }, +{ 0x8817, "GL_INTENSITY32F_ARB" }, +{ 0x8818, "GL_LUMINANCE_FLOAT32_APPLE" }, +{ 0x8818, "GL_LUMINANCE_FLOAT32_ATI" }, +{ 0x8818, "GL_LUMINANCE32F_ARB" }, +{ 0x8819, "GL_LUMINANCE_ALPHA_FLOAT32_APPLE" }, +{ 0x8819, "GL_LUMINANCE_ALPHA_FLOAT32_ATI" }, +{ 0x8819, "GL_LUMINANCE_ALPHA32F_ARB" }, +{ 0x881A, "GL_RGBA_FLOAT16_APPLE" }, +{ 0x881A, "GL_RGBA_FLOAT16_ATI" }, +{ 0x881A, "GL_RGBA16F_ARB" }, +{ 0x881B, "GL_RGB_FLOAT16_APPLE" }, +{ 0x881B, "GL_RGB_FLOAT16_ATI" }, +{ 0x881B, "GL_RGB16F_ARB" }, +{ 0x881C, "GL_ALPHA_FLOAT16_APPLE" }, +{ 0x881C, "GL_ALPHA_FLOAT16_ATI" }, +{ 0x881C, "GL_ALPHA16F_ARB" }, +{ 0x881D, "GL_INTENSITY_FLOAT16_APPLE" }, +{ 0x881D, "GL_INTENSITY_FLOAT16_ATI" }, +{ 0x881D, "GL_INTENSITY16F_ARB" }, +{ 0x881E, "GL_LUMINANCE_FLOAT16_APPLE" }, +{ 0x881E, "GL_LUMINANCE_FLOAT16_ATI" }, +{ 0x881E, "GL_LUMINANCE16F_ARB" }, +{ 0x881F, "GL_LUMINANCE_ALPHA_FLOAT16_APPLE" }, +{ 0x881F, "GL_LUMINANCE_ALPHA_FLOAT16_ATI" }, +{ 0x881F, "GL_LUMINANCE_ALPHA16F_ARB" }, +{ 0x8820, "GL_RGBA_FLOAT_MODE_ARB" }, +{ 0x8824, "GL_MAX_DRAW_BUFFERS_ARB" }, +{ 0x8824, "GL_MAX_DRAW_BUFFERS" }, +{ 0x8825, "GL_DRAW_BUFFER0_ARB" }, +{ 0x8825, "GL_DRAW_BUFFER0" }, +{ 0x8826, "GL_DRAW_BUFFER1_ARB" }, +{ 0x8826, "GL_DRAW_BUFFER1" }, +{ 0x8827, "GL_DRAW_BUFFER2_ARB" }, +{ 0x8827, "GL_DRAW_BUFFER2" }, +{ 0x8828, "GL_DRAW_BUFFER3_ARB" }, +{ 0x8828, "GL_DRAW_BUFFER3" }, +{ 0x8829, "GL_DRAW_BUFFER4_ARB" }, +{ 0x8829, "GL_DRAW_BUFFER4" }, +{ 0x882A, "GL_DRAW_BUFFER5_ARB" }, +{ 0x882A, "GL_DRAW_BUFFER5" }, +{ 0x882B, "GL_DRAW_BUFFER6_ARB" }, +{ 0x882B, "GL_DRAW_BUFFER6" }, +{ 0x882C, "GL_DRAW_BUFFER7_ARB" }, +{ 0x882C, "GL_DRAW_BUFFER7" }, +{ 0x882D, "GL_DRAW_BUFFER8_ARB" }, +{ 0x882D, "GL_DRAW_BUFFER8" }, +{ 0x882E, "GL_DRAW_BUFFER9_ARB" }, +{ 0x882E, "GL_DRAW_BUFFER9" }, +{ 0x882F, "GL_DRAW_BUFFER10_ARB" }, +{ 0x882F, "GL_DRAW_BUFFER10" }, +{ 0x8830, "GL_DRAW_BUFFER11_ARB" }, +{ 0x8830, "GL_DRAW_BUFFER11" }, +{ 0x8831, "GL_DRAW_BUFFER12_ARB" }, +{ 0x8831, "GL_DRAW_BUFFER12" }, +{ 0x8832, "GL_DRAW_BUFFER13_ARB" }, +{ 0x8832, "GL_DRAW_BUFFER13" }, +{ 0x8833, "GL_DRAW_BUFFER14_ARB" }, +{ 0x8833, "GL_DRAW_BUFFER14" }, +{ 0x8834, "GL_DRAW_BUFFER15_ARB" }, +{ 0x8834, "GL_DRAW_BUFFER15" }, +{ 0x883D, "GL_ALPHA_BLEND_EQUATION_ATI" }, +{ 0x883D, "GL_BLEND_EQUATION_ALPHA_EXT" }, +{ 0x883D, "GL_BLEND_EQUATION_ALPHA" }, +{ 0x884A, "GL_TEXTURE_DEPTH_SIZE_ARB" }, +{ 0x884A, "GL_TEXTURE_DEPTH_SIZE" }, +{ 0x884B, "GL_DEPTH_TEXTURE_MODE_ARB" }, +{ 0x884B, "GL_DEPTH_TEXTURE_MODE" }, +{ 0x884C, "GL_TEXTURE_COMPARE_MODE_ARB" }, +{ 0x884C, "GL_TEXTURE_COMPARE_MODE" }, +{ 0x884D, "GL_TEXTURE_COMPARE_FUNC_ARB" }, +{ 0x884D, "GL_TEXTURE_COMPARE_FUNC" }, +{ 0x884E, "GL_COMPARE_R_TO_TEXTURE_ARB" }, +{ 0x884E, "GL_COMPARE_R_TO_TEXTURE" }, +{ 0x884E, "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT" }, +{ 0x8861, "GL_POINT_SPRITE_ARB" }, +{ 0x8861, "GL_POINT_SPRITE" }, +{ 0x8862, "GL_COORD_REPLACE_ARB" }, +{ 0x8862, "GL_COORD_REPLACE" }, +{ 0x8864, "GL_QUERY_COUNTER_BITS_ARB" }, +{ 0x8864, "GL_QUERY_COUNTER_BITS" }, +{ 0x8865, "GL_CURRENT_QUERY_ARB" }, +{ 0x8865, "GL_CURRENT_QUERY" }, +{ 0x8866, "GL_QUERY_RESULT_ARB" }, +{ 0x8866, "GL_QUERY_RESULT" }, +{ 0x8867, "GL_QUERY_RESULT_AVAILABLE_ARB" }, +{ 0x8867, "GL_QUERY_RESULT_AVAILABLE" }, +{ 0x8869, "GL_MAX_VERTEX_ATTRIBS_ARB" }, +{ 0x8869, "GL_MAX_VERTEX_ATTRIBS_ARB" }, +{ 0x8869, "GL_MAX_VERTEX_ATTRIBS" }, +{ 0x886A, "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB" }, +{ 0x886A, "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB" }, +{ 0x886A, "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED" }, +{ 0x8871, "GL_MAX_TEXTURE_COORDS_ARB" }, +{ 0x8871, "GL_MAX_TEXTURE_COORDS_ARB" }, +{ 0x8871, "GL_MAX_TEXTURE_COORDS_ARB" }, +{ 0x8871, "GL_MAX_TEXTURE_COORDS" }, +{ 0x8872, "GL_MAX_TEXTURE_IMAGE_UNITS_ARB" }, +{ 0x8872, "GL_MAX_TEXTURE_IMAGE_UNITS_ARB" }, +{ 0x8872, "GL_MAX_TEXTURE_IMAGE_UNITS_ARB" }, +{ 0x8872, "GL_MAX_TEXTURE_IMAGE_UNITS" }, +{ 0x8874, "GL_PROGRAM_ERROR_STRING_ARB" }, +{ 0x8875, "GL_PROGRAM_FORMAT_ASCII_ARB" }, +{ 0x8876, "GL_PROGRAM_FORMAT_ARB" }, +{ 0x8890, "GL_DEPTH_BOUNDS_TEST_EXT" }, +{ 0x8891, "GL_DEPTH_BOUNDS_EXT" }, +{ 0x8892, "GL_ARRAY_BUFFER_ARB" }, +{ 0x8892, "GL_ARRAY_BUFFER" }, +{ 0x8893, "GL_ELEMENT_ARRAY_BUFFER_ARB" }, +{ 0x8893, "GL_ELEMENT_ARRAY_BUFFER" }, +{ 0x8894, "GL_ARRAY_BUFFER_BINDING_ARB" }, +{ 0x8894, "GL_ARRAY_BUFFER_BINDING" }, +{ 0x8895, "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB" }, +{ 0x8895, "GL_ELEMENT_ARRAY_BUFFER_BINDING" }, +{ 0x8896, "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB" }, +{ 0x8896, "GL_VERTEX_ARRAY_BUFFER_BINDING" }, +{ 0x8897, "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB" }, +{ 0x8897, "GL_NORMAL_ARRAY_BUFFER_BINDING" }, +{ 0x8898, "GL_COLOR_ARRAY_BUFFER_BINDING_ARB" }, +{ 0x8898, "GL_COLOR_ARRAY_BUFFER_BINDING" }, +{ 0x8899, "GL_INDEX_ARRAY_BUFFER_BINDING_ARB" }, +{ 0x8899, "GL_INDEX_ARRAY_BUFFER_BINDING" }, +{ 0x889A, "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB" }, +{ 0x889A, "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING" }, +{ 0x889B, "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB" }, +{ 0x889B, "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING" }, +{ 0x889C, "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB" }, +{ 0x889C, "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING" }, +{ 0x889D, "GL_FOG_COORD_ARRAY_BUFFER_BINDING_ARB" }, +{ 0x889D, "GL_FOG_COORD_ARRAY_BUFFER_BINDING" }, +{ 0x889D, "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB" }, +{ 0x889D, "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING" }, +{ 0x889E, "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB" }, +{ 0x889E, "GL_WEIGHT_ARRAY_BUFFER_BINDING" }, +{ 0x889F, "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB" }, +{ 0x889F, "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING" }, +{ 0x88A0, "GL_PROGRAM_INSTRUCTIONS_ARB" }, +{ 0x88A1, "GL_MAX_PROGRAM_INSTRUCTIONS_ARB" }, +{ 0x88A2, "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB" }, +{ 0x88A3, "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB" }, +{ 0x88A4, "GL_PROGRAM_TEMPORARIES_ARB" }, +{ 0x88A5, "GL_MAX_PROGRAM_TEMPORARIES_ARB" }, +{ 0x88A6, "GL_PROGRAM_NATIVE_TEMPORARIES_ARB" }, +{ 0x88A7, "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB" }, +{ 0x88A8, "GL_PROGRAM_PARAMETERS_ARB" }, +{ 0x88A9, "GL_MAX_PROGRAM_PARAMETERS_ARB" }, +{ 0x88AA, "GL_PROGRAM_NATIVE_PARAMETERS_ARB" }, +{ 0x88AB, "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB" }, +{ 0x88AC, "GL_PROGRAM_ATTRIBS_ARB" }, +{ 0x88AD, "GL_MAX_PROGRAM_ATTRIBS_ARB" }, +{ 0x88AE, "GL_PROGRAM_NATIVE_ATTRIBS_ARB" }, +{ 0x88AF, "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB" }, +{ 0x88B0, "GL_PROGRAM_ADDRESS_REGISTERS_ARB" }, +{ 0x88B1, "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB" }, +{ 0x88B2, "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB" }, +{ 0x88B3, "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB" }, +{ 0x88B4, "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB" }, +{ 0x88B5, "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB" }, +{ 0x88B6, "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB" }, +{ 0x88B7, "GL_TRANSPOSE_CURRENT_MATRIX_ARB" }, +{ 0x88B8, "GL_READ_ONLY_ARB" }, +{ 0x88B8, "GL_READ_ONLY" }, +{ 0x88B9, "GL_WRITE_ONLY_ARB" }, +{ 0x88B9, "GL_WRITE_ONLY" }, +{ 0x88BA, "GL_READ_WRITE_ARB" }, +{ 0x88BA, "GL_READ_WRITE" }, +{ 0x88BB, "GL_BUFFER_ACCESS_ARB" }, +{ 0x88BB, "GL_BUFFER_ACCESS" }, +{ 0x88BC, "GL_BUFFER_MAPPED_ARB" }, +{ 0x88BC, "GL_BUFFER_MAPPED" }, +{ 0x88BD, "GL_BUFFER_MAP_POINTER_ARB" }, +{ 0x88BD, "GL_BUFFER_MAP_POINTER" }, +{ 0x88C0, "GL_MATRIX0_ARB" }, +{ 0x88C1, "GL_MATRIX1_ARB" }, +{ 0x88C2, "GL_MATRIX2_ARB" }, +{ 0x88C3, "GL_MATRIX3_ARB" }, +{ 0x88C4, "GL_MATRIX4_ARB" }, +{ 0x88C5, "GL_MATRIX5_ARB" }, +{ 0x88C6, "GL_MATRIX6_ARB" }, +{ 0x88C7, "GL_MATRIX7_ARB" }, +{ 0x88C8, "GL_MATRIX8_ARB" }, +{ 0x88C9, "GL_MATRIX9_ARB" }, +{ 0x88CA, "GL_MATRIX10_ARB" }, +{ 0x88CB, "GL_MATRIX11_ARB" }, +{ 0x88CC, "GL_MATRIX12_ARB" }, +{ 0x88CD, "GL_MATRIX13_ARB" }, +{ 0x88CE, "GL_MATRIX14_ARB" }, +{ 0x88CF, "GL_MATRIX15_ARB" }, +{ 0x88D0, "GL_MATRIX16_ARB" }, +{ 0x88D1, "GL_MATRIX17_ARB" }, +{ 0x88D2, "GL_MATRIX18_ARB" }, +{ 0x88D3, "GL_MATRIX19_ARB" }, +{ 0x88D4, "GL_MATRIX20_ARB" }, +{ 0x88D5, "GL_MATRIX21_ARB" }, +{ 0x88D6, "GL_MATRIX22_ARB" }, +{ 0x88D7, "GL_MATRIX23_ARB" }, +{ 0x88D8, "GL_MATRIX24_ARB" }, +{ 0x88D9, "GL_MATRIX25_ARB" }, +{ 0x88DA, "GL_MATRIX26_ARB" }, +{ 0x88DB, "GL_MATRIX27_ARB" }, +{ 0x88DC, "GL_MATRIX28_ARB" }, +{ 0x88DD, "GL_MATRIX29_ARB" }, +{ 0x88DE, "GL_MATRIX30_ARB" }, +{ 0x88DF, "GL_MATRIX31_ARB" }, +{ 0x88E0, "GL_STREAM_DRAW_ARB" }, +{ 0x88E0, "GL_STREAM_DRAW" }, +{ 0x88E1, "GL_STREAM_READ_ARB" }, +{ 0x88E1, "GL_STREAM_READ" }, +{ 0x88E2, "GL_STREAM_COPY_ARB" }, +{ 0x88E2, "GL_STREAM_COPY" }, +{ 0x88E4, "GL_STATIC_DRAW_ARB" }, +{ 0x88E4, "GL_STATIC_DRAW" }, +{ 0x88E5, "GL_STATIC_READ_ARB" }, +{ 0x88E5, "GL_STATIC_READ" }, +{ 0x88E6, "GL_STATIC_COPY_ARB" }, +{ 0x88E6, "GL_STATIC_COPY" }, +{ 0x88E8, "GL_DYNAMIC_DRAW_ARB" }, +{ 0x88E8, "GL_DYNAMIC_DRAW" }, +{ 0x88E9, "GL_DYNAMIC_READ_ARB" }, +{ 0x88E9, "GL_DYNAMIC_READ" }, +{ 0x88EA, "GL_DYNAMIC_COPY_ARB" }, +{ 0x88EA, "GL_DYNAMIC_COPY" }, +{ 0x88EB, "GL_PIXEL_PACK_BUFFER_ARB" }, +{ 0x88EB, "GL_PIXEL_PACK_BUFFER" }, +{ 0x88EC, "GL_PIXEL_UNPACK_BUFFER_ARB" }, +{ 0x88EC, "GL_PIXEL_UNPACK_BUFFER" }, +{ 0x88ED, "GL_PIXEL_PACK_BUFFER_BINDING_ARB" }, +{ 0x88ED, "GL_PIXEL_PACK_BUFFER_BINDING" }, +{ 0x88EF, "GL_PIXEL_UNPACK_BUFFER_BINDING_ARB" }, +{ 0x88EF, "GL_PIXEL_UNPACK_BUFFER_BINDING" }, +{ 0x88F0, "GL_DEPTH24_STENCIL8_EXT" }, +{ 0x88F0, "GL_DEPTH24_STENCIL8" }, +{ 0x88F1, "GL_TEXTURE_STENCIL_SIZE_EXT" }, +{ 0x88F1, "GL_TEXTURE_STENCIL_SIZE" }, +{ 0x88FD, "GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT" }, +{ 0x88FE, "GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB" }, +{ 0x88FF, "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT" }, +{ 0x8904, "GL_MIN_PROGRAM_TEXEL_OFFSET_EXT" }, +{ 0x8905, "GL_MAX_PROGRAM_TEXEL_OFFSET_EXT" }, +{ 0x8910, "GL_STENCIL_TEST_TWO_SIDE_EXT" }, +{ 0x8911, "GL_ACTIVE_STENCIL_FACE_EXT" }, +{ 0x8912, "GL_MIRROR_CLAMP_TO_BORDER_EXT" }, +{ 0x8914, "GL_SAMPLES_PASSED_ARB" }, +{ 0x8914, "GL_SAMPLES_PASSED" }, +{ 0x891A, "GL_CLAMP_VERTEX_COLOR_ARB" }, +{ 0x891B, "GL_CLAMP_FRAGMENT_COLOR_ARB" }, +{ 0x891C, "GL_CLAMP_READ_COLOR_ARB" }, +{ 0x891D, "GL_FIXED_ONLY_ARB" }, +{ 0x8920, "GL_FRAGMENT_SHADER_EXT" }, +{ 0x896D, "GL_SECONDARY_INTERPOLATOR_EXT" }, +{ 0x896E, "GL_NUM_FRAGMENT_REGISTERS_EXT" }, +{ 0x896F, "GL_NUM_FRAGMENT_CONSTANTS_EXT" }, +{ 0x8A0C, "GL_ELEMENT_ARRAY_APPLE" }, +{ 0x8A0D, "GL_ELEMENT_ARRAY_TYPE_APPLE" }, +{ 0x8A0E, "GL_ELEMENT_ARRAY_POINTER_APPLE" }, +{ 0x8A0F, "GL_COLOR_FLOAT_APPLE" }, +{ 0x8A11, "GL_UNIFORM_BUFFER" }, +{ 0x8A28, "GL_UNIFORM_BUFFER_BINDING" }, +{ 0x8A29, "GL_UNIFORM_BUFFER_START" }, +{ 0x8A2A, "GL_UNIFORM_BUFFER_SIZE" }, +{ 0x8A2B, "GL_MAX_VERTEX_UNIFORM_BLOCKS" }, +{ 0x8A2C, "GL_MAX_GEOMETRY_UNIFORM_BLOCKS" }, +{ 0x8A2D, "GL_MAX_FRAGMENT_UNIFORM_BLOCKS" }, +{ 0x8A2E, "GL_MAX_COMBINED_UNIFORM_BLOCKS" }, +{ 0x8A2F, "GL_MAX_UNIFORM_BUFFER_BINDINGS" }, +{ 0x8A30, "GL_MAX_UNIFORM_BLOCK_SIZE" }, +{ 0x8A31, "GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS" }, +{ 0x8A32, "GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS" }, +{ 0x8A33, "GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS" }, +{ 0x8A34, "GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT" }, +{ 0x8A35, "GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH" }, +{ 0x8A36, "GL_ACTIVE_UNIFORM_BLOCKS" }, +{ 0x8A37, "GL_UNIFORM_TYPE" }, +{ 0x8A38, "GL_UNIFORM_SIZE" }, +{ 0x8A39, "GL_UNIFORM_NAME_LENGTH" }, +{ 0x8A3A, "GL_UNIFORM_BLOCK_INDEX" }, +{ 0x8A3B, "GL_UNIFORM_OFFSET" }, +{ 0x8A3C, "GL_UNIFORM_ARRAY_STRIDE" }, +{ 0x8A3D, "GL_UNIFORM_MATRIX_STRIDE" }, +{ 0x8A3E, "GL_UNIFORM_IS_ROW_MAJOR" }, +{ 0x8A3F, "GL_UNIFORM_BLOCK_BINDING" }, +{ 0x8A40, "GL_UNIFORM_BLOCK_DATA_SIZE" }, +{ 0x8A41, "GL_UNIFORM_BLOCK_NAME_LENGTH" }, +{ 0x8A42, "GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS" }, +{ 0x8A43, "GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES" }, +{ 0x8A44, "GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER" }, +{ 0x8A45, "GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER" }, +{ 0x8A46, "GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER" }, +{ 0x8B30, "GL_FRAGMENT_SHADER_ARB" }, +{ 0x8B30, "GL_FRAGMENT_SHADER" }, +{ 0x8B31, "GL_VERTEX_SHADER_ARB" }, +{ 0x8B31, "GL_VERTEX_SHADER" }, +{ 0x8B40, "GL_PROGRAM_OBJECT_ARB" }, +{ 0x8B48, "GL_SHADER_OBJECT_ARB" }, +{ 0x8B49, "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB" }, +{ 0x8B49, "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS" }, +{ 0x8B4A, "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB" }, +{ 0x8B4A, "GL_MAX_VERTEX_UNIFORM_COMPONENTS" }, +{ 0x8B4B, "GL_MAX_VARYING_COMPONENTS_EXT" }, +{ 0x8B4B, "GL_MAX_VARYING_FLOATS_ARB" }, +{ 0x8B4B, "GL_MAX_VARYING_FLOATS" }, +{ 0x8B4C, "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB" }, +{ 0x8B4C, "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS" }, +{ 0x8B4D, "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB" }, +{ 0x8B4D, "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS" }, +{ 0x8B4E, "GL_OBJECT_TYPE_ARB" }, +{ 0x8B4F, "GL_OBJECT_SUBTYPE_ARB" }, +{ 0x8B4F, "GL_SHADER_TYPE" }, +{ 0x8B50, "GL_FLOAT_VEC2_ARB" }, +{ 0x8B50, "GL_FLOAT_VEC2" }, +{ 0x8B51, "GL_FLOAT_VEC3_ARB" }, +{ 0x8B51, "GL_FLOAT_VEC3" }, +{ 0x8B52, "GL_FLOAT_VEC4_ARB" }, +{ 0x8B52, "GL_FLOAT_VEC4" }, +{ 0x8B53, "GL_INT_VEC2_ARB" }, +{ 0x8B53, "GL_INT_VEC2" }, +{ 0x8B54, "GL_INT_VEC3_ARB" }, +{ 0x8B54, "GL_INT_VEC3" }, +{ 0x8B55, "GL_INT_VEC4_ARB" }, +{ 0x8B55, "GL_INT_VEC4" }, +{ 0x8B56, "GL_BOOL_ARB" }, +{ 0x8B56, "GL_BOOL" }, +{ 0x8B57, "GL_BOOL_VEC2_ARB" }, +{ 0x8B57, "GL_BOOL_VEC2" }, +{ 0x8B58, "GL_BOOL_VEC3_ARB" }, +{ 0x8B58, "GL_BOOL_VEC3" }, +{ 0x8B59, "GL_BOOL_VEC4_ARB" }, +{ 0x8B59, "GL_BOOL_VEC4" }, +{ 0x8B5A, "GL_FLOAT_MAT2_ARB" }, +{ 0x8B5A, "GL_FLOAT_MAT2" }, +{ 0x8B5B, "GL_FLOAT_MAT3_ARB" }, +{ 0x8B5B, "GL_FLOAT_MAT3" }, +{ 0x8B5C, "GL_FLOAT_MAT4_ARB" }, +{ 0x8B5C, "GL_FLOAT_MAT4" }, +{ 0x8B5D, "GL_SAMPLER_1D_ARB" }, +{ 0x8B5D, "GL_SAMPLER_1D" }, +{ 0x8B5E, "GL_SAMPLER_2D_ARB" }, +{ 0x8B5E, "GL_SAMPLER_2D" }, +{ 0x8B5F, "GL_SAMPLER_3D_ARB" }, +{ 0x8B5F, "GL_SAMPLER_3D" }, +{ 0x8B60, "GL_SAMPLER_CUBE_ARB" }, +{ 0x8B60, "GL_SAMPLER_CUBE" }, +{ 0x8B61, "GL_SAMPLER_1D_SHADOW_ARB" }, +{ 0x8B61, "GL_SAMPLER_1D_SHADOW" }, +{ 0x8B62, "GL_SAMPLER_2D_SHADOW_ARB" }, +{ 0x8B62, "GL_SAMPLER_2D_SHADOW" }, +{ 0x8B63, "GL_SAMPLER_2D_RECT_ARB" }, +{ 0x8B64, "GL_SAMPLER_2D_RECT_SHADOW_ARB" }, +{ 0x8B65, "GL_FLOAT_MAT2x3" }, +{ 0x8B66, "GL_FLOAT_MAT2x4" }, +{ 0x8B67, "GL_FLOAT_MAT3x2" }, +{ 0x8B68, "GL_FLOAT_MAT3x4" }, +{ 0x8B69, "GL_FLOAT_MAT4x2" }, +{ 0x8B6A, "GL_FLOAT_MAT4x3" }, +{ 0x8B80, "GL_DELETE_STATUS" }, +{ 0x8B80, "GL_OBJECT_DELETE_STATUS_ARB" }, +{ 0x8B81, "GL_COMPILE_STATUS" }, +{ 0x8B81, "GL_OBJECT_COMPILE_STATUS_ARB" }, +{ 0x8B82, "GL_LINK_STATUS" }, +{ 0x8B82, "GL_OBJECT_LINK_STATUS_ARB" }, +{ 0x8B83, "GL_OBJECT_VALIDATE_STATUS_ARB" }, +{ 0x8B83, "GL_VALIDATE_STATUS" }, +{ 0x8B84, "GL_INFO_LOG_LENGTH" }, +{ 0x8B84, "GL_OBJECT_INFO_LOG_LENGTH_ARB" }, +{ 0x8B85, "GL_ATTACHED_SHADERS" }, +{ 0x8B85, "GL_OBJECT_ATTACHED_OBJECTS_ARB" }, +{ 0x8B86, "GL_ACTIVE_UNIFORMS" }, +{ 0x8B86, "GL_OBJECT_ACTIVE_UNIFORMS_ARB" }, +{ 0x8B87, "GL_ACTIVE_UNIFORM_MAX_LENGTH" }, +{ 0x8B87, "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB" }, +{ 0x8B88, "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB" }, +{ 0x8B88, "GL_SHADER_SOURCE_LENGTH" }, +{ 0x8B89, "GL_ACTIVE_ATTRIBUTES" }, +{ 0x8B89, "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB" }, +{ 0x8B8A, "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH" }, +{ 0x8B8A, "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB" }, +{ 0x8B8B, "GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB" }, +{ 0x8B8B, "GL_FRAGMENT_SHADER_DERIVATIVE_HINT" }, +{ 0x8B8C, "GL_SHADING_LANGUAGE_VERSION_ARB" }, +{ 0x8B8C, "GL_SHADING_LANGUAGE_VERSION" }, +{ 0x8B8D, "GL_CURRENT_PROGRAM" }, +{ 0x8C10, "GL_TEXTURE_RED_TYPE_ARB" }, +{ 0x8C10, "GL_TEXTURE_RED_TYPE" }, +{ 0x8C11, "GL_TEXTURE_GREEN_TYPE_ARB" }, +{ 0x8C11, "GL_TEXTURE_GREEN_TYPE" }, +{ 0x8C12, "GL_TEXTURE_BLUE_TYPE_ARB" }, +{ 0x8C12, "GL_TEXTURE_BLUE_TYPE" }, +{ 0x8C13, "GL_TEXTURE_ALPHA_TYPE_ARB" }, +{ 0x8C13, "GL_TEXTURE_ALPHA_TYPE" }, +{ 0x8C14, "GL_TEXTURE_LUMINANCE_TYPE_ARB" }, +{ 0x8C15, "GL_TEXTURE_INTENSITY_TYPE_ARB" }, +{ 0x8C16, "GL_TEXTURE_DEPTH_TYPE_ARB" }, +{ 0x8C16, "GL_TEXTURE_DEPTH_TYPE" }, +{ 0x8C17, "GL_UNSIGNED_NORMALIZED_ARB" }, +{ 0x8C17, "GL_UNSIGNED_NORMALIZED" }, +{ 0x8C18, "GL_TEXTURE_1D_ARRAY_EXT" }, +{ 0x8C19, "GL_PROXY_TEXTURE_1D_ARRAY_EXT" }, +{ 0x8C1A, "GL_TEXTURE_2D_ARRAY_EXT" }, +{ 0x8C1B, "GL_PROXY_TEXTURE_2D_ARRAY_EXT" }, +{ 0x8C1C, "GL_TEXTURE_BINDING_1D_ARRAY_EXT" }, +{ 0x8C1D, "GL_TEXTURE_BINDING_2D_ARRAY_EXT" }, +{ 0x8C29, "GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT" }, +{ 0x8C3A, "GL_R11F_G11F_B10F_EXT" }, +{ 0x8C3B, "GL_UNSIGNED_INT_10F_11F_11F_REV_EXT" }, +{ 0x8C3C, "GL_RGBA_SIGNED_COMPONENTS_EXT" }, +{ 0x8C3D, "GL_RGB9_E5_EXT" }, +{ 0x8C3E, "GL_UNSIGNED_INT_5_9_9_9_REV_EXT" }, +{ 0x8C3F, "GL_TEXTURE_SHARED_SIZE_EXT" }, +{ 0x8C40, "GL_SRGB_EXT" }, +{ 0x8C40, "GL_SRGB" }, +{ 0x8C41, "GL_SRGB8_EXT" }, +{ 0x8C41, "GL_SRGB8" }, +{ 0x8C42, "GL_SRGB_ALPHA_EXT" }, +{ 0x8C42, "GL_SRGB_ALPHA" }, +{ 0x8C43, "GL_SRGB8_ALPHA8_EXT" }, +{ 0x8C43, "GL_SRGB8_ALPHA8" }, +{ 0x8C44, "GL_SLUMINANCE_ALPHA_EXT" }, +{ 0x8C44, "GL_SLUMINANCE_ALPHA" }, +{ 0x8C45, "GL_SLUMINANCE8_ALPHA8_EXT" }, +{ 0x8C45, "GL_SLUMINANCE8_ALPHA8" }, +{ 0x8C46, "GL_SLUMINANCE_EXT" }, +{ 0x8C46, "GL_SLUMINANCE" }, +{ 0x8C47, "GL_SLUMINANCE8_EXT" }, +{ 0x8C47, "GL_SLUMINANCE8" }, +{ 0x8C48, "GL_COMPRESSED_SRGB_EXT" }, +{ 0x8C48, "GL_COMPRESSED_SRGB" }, +{ 0x8C49, "GL_COMPRESSED_SRGB_ALPHA_EXT" }, +{ 0x8C49, "GL_COMPRESSED_SRGB_ALPHA" }, +{ 0x8C4A, "GL_COMPRESSED_SLUMINANCE_EXT" }, +{ 0x8C4A, "GL_COMPRESSED_SLUMINANCE" }, +{ 0x8C4B, "GL_COMPRESSED_SLUMINANCE_ALPHA_EXT" }, +{ 0x8C4B, "GL_COMPRESSED_SLUMINANCE_ALPHA" }, +{ 0x8C4C, "GL_COMPRESSED_SRGB_S3TC_DXT1_EXT" }, +{ 0x8C4D, "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT" }, +{ 0x8C4E, "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT" }, +{ 0x8C4F, "GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT" }, +{ 0x8C76, "GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT" }, +{ 0x8C7F, "GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT" }, +{ 0x8C80, "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT" }, +{ 0x8C83, "GL_TRANSFORM_FEEDBACK_VARYINGS_EXT" }, +{ 0x8C84, "GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT" }, +{ 0x8C85, "GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT" }, +{ 0x8C87, "GL_PRIMITIVES_GENERATED_EXT" }, +{ 0x8C88, "GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT" }, +{ 0x8C89, "GL_RASTERIZER_DISCARD_EXT" }, +{ 0x8C8A, "GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT" }, +{ 0x8C8B, "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT" }, +{ 0x8C8C, "GL_INTERLEAVED_ATTRIBS_EXT" }, +{ 0x8C8D, "GL_SEPARATE_ATTRIBS_EXT" }, +{ 0x8C8E, "GL_TRANSFORM_FEEDBACK_BUFFER_EXT" }, +{ 0x8C8F, "GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT" }, +{ 0x8CA0, "GL_POINT_SPRITE_COORD_ORIGIN" }, +{ 0x8CA1, "GL_LOWER_LEFT" }, +{ 0x8CA2, "GL_UPPER_LEFT" }, +{ 0x8CA3, "GL_STENCIL_BACK_REF" }, +{ 0x8CA4, "GL_STENCIL_BACK_VALUE_MASK" }, +{ 0x8CA5, "GL_STENCIL_BACK_WRITEMASK" }, +{ 0x8CA6, "GL_DRAW_FRAMEBUFFER_BINDING_EXT" }, +{ 0x8CA6, "GL_FRAMEBUFFER_BINDING_EXT" }, +{ 0x8CA6, "GL_FRAMEBUFFER_BINDING" }, +{ 0x8CA7, "GL_RENDERBUFFER_BINDING_EXT" }, +{ 0x8CA7, "GL_RENDERBUFFER_BINDING" }, +{ 0x8CA8, "GL_READ_FRAMEBUFFER_EXT" }, +{ 0x8CA8, "GL_READ_FRAMEBUFFER" }, +{ 0x8CA9, "GL_DRAW_FRAMEBUFFER_EXT" }, +{ 0x8CA9, "GL_DRAW_FRAMEBUFFER" }, +{ 0x8CAA, "GL_READ_FRAMEBUFFER_BINDING_EXT" }, +{ 0x8CAA, "GL_READ_FRAMEBUFFER_BINDING" }, +{ 0x8CAB, "GL_RENDERBUFFER_SAMPLES_EXT" }, +{ 0x8CAB, "GL_RENDERBUFFER_SAMPLES" }, +{ 0x8CAC, "GL_DEPTH_COMPONENT32F" }, +{ 0x8CAD, "GL_DEPTH32F_STENCIL8" }, +{ 0x8CD0, "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT" }, +{ 0x8CD0, "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE" }, +{ 0x8CD1, "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT" }, +{ 0x8CD1, "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME" }, +{ 0x8CD2, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT" }, +{ 0x8CD2, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL" }, +{ 0x8CD3, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT" }, +{ 0x8CD3, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE" }, +{ 0x8CD4, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT" }, +{ 0x8CD4, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT" }, +{ 0x8CD4, "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER" }, +{ 0x8CD5, "GL_FRAMEBUFFER_COMPLETE_EXT" }, +{ 0x8CD5, "GL_FRAMEBUFFER_COMPLETE" }, +{ 0x8CD6, "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT" }, +{ 0x8CD6, "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT" }, +{ 0x8CD7, "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT" }, +{ 0x8CD7, "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT" }, +{ 0x8CD9, "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT" }, +{ 0x8CDA, "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT" }, +{ 0x8CDB, "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT" }, +{ 0x8CDB, "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER" }, +{ 0x8CDC, "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT" }, +{ 0x8CDC, "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER" }, +{ 0x8CDD, "GL_FRAMEBUFFER_UNSUPPORTED_EXT" }, +{ 0x8CDD, "GL_FRAMEBUFFER_UNSUPPORTED" }, +{ 0x8CDF, "GL_MAX_COLOR_ATTACHMENTS_EXT" }, +{ 0x8CDF, "GL_MAX_COLOR_ATTACHMENTS" }, +{ 0x8CE0, "GL_COLOR_ATTACHMENT0_EXT" }, +{ 0x8CE0, "GL_COLOR_ATTACHMENT0" }, +{ 0x8CE1, "GL_COLOR_ATTACHMENT1_EXT" }, +{ 0x8CE1, "GL_COLOR_ATTACHMENT1" }, +{ 0x8CE2, "GL_COLOR_ATTACHMENT2_EXT" }, +{ 0x8CE2, "GL_COLOR_ATTACHMENT2" }, +{ 0x8CE3, "GL_COLOR_ATTACHMENT3_EXT" }, +{ 0x8CE3, "GL_COLOR_ATTACHMENT3" }, +{ 0x8CE4, "GL_COLOR_ATTACHMENT4_EXT" }, +{ 0x8CE4, "GL_COLOR_ATTACHMENT4" }, +{ 0x8CE5, "GL_COLOR_ATTACHMENT5_EXT" }, +{ 0x8CE5, "GL_COLOR_ATTACHMENT5" }, +{ 0x8CE6, "GL_COLOR_ATTACHMENT6_EXT" }, +{ 0x8CE6, "GL_COLOR_ATTACHMENT6" }, +{ 0x8CE7, "GL_COLOR_ATTACHMENT7_EXT" }, +{ 0x8CE7, "GL_COLOR_ATTACHMENT7" }, +{ 0x8CE8, "GL_COLOR_ATTACHMENT8_EXT" }, +{ 0x8CE8, "GL_COLOR_ATTACHMENT8" }, +{ 0x8CE9, "GL_COLOR_ATTACHMENT9_EXT" }, +{ 0x8CE9, "GL_COLOR_ATTACHMENT9" }, +{ 0x8CEA, "GL_COLOR_ATTACHMENT10_EXT" }, +{ 0x8CEA, "GL_COLOR_ATTACHMENT10" }, +{ 0x8CEB, "GL_COLOR_ATTACHMENT11_EXT" }, +{ 0x8CEB, "GL_COLOR_ATTACHMENT11" }, +{ 0x8CEC, "GL_COLOR_ATTACHMENT12_EXT" }, +{ 0x8CEC, "GL_COLOR_ATTACHMENT12" }, +{ 0x8CED, "GL_COLOR_ATTACHMENT13_EXT" }, +{ 0x8CED, "GL_COLOR_ATTACHMENT13" }, +{ 0x8CEE, "GL_COLOR_ATTACHMENT14_EXT" }, +{ 0x8CEE, "GL_COLOR_ATTACHMENT14" }, +{ 0x8CEF, "GL_COLOR_ATTACHMENT15_EXT" }, +{ 0x8CEF, "GL_COLOR_ATTACHMENT15" }, +{ 0x8D00, "GL_DEPTH_ATTACHMENT_EXT" }, +{ 0x8D00, "GL_DEPTH_ATTACHMENT" }, +{ 0x8D20, "GL_STENCIL_ATTACHMENT_EXT" }, +{ 0x8D20, "GL_STENCIL_ATTACHMENT" }, +{ 0x8D40, "GL_FRAMEBUFFER_EXT" }, +{ 0x8D40, "GL_FRAMEBUFFER" }, +{ 0x8D41, "GL_RENDERBUFFER_EXT" }, +{ 0x8D41, "GL_RENDERBUFFER" }, +{ 0x8D42, "GL_RENDERBUFFER_WIDTH_EXT" }, +{ 0x8D42, "GL_RENDERBUFFER_WIDTH" }, +{ 0x8D43, "GL_RENDERBUFFER_HEIGHT_EXT" }, +{ 0x8D43, "GL_RENDERBUFFER_HEIGHT" }, +{ 0x8D44, "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT" }, +{ 0x8D44, "GL_RENDERBUFFER_INTERNAL_FORMAT" }, +{ 0x8D46, "GL_STENCIL_INDEX1_EXT" }, +{ 0x8D46, "GL_STENCIL_INDEX1" }, +{ 0x8D47, "GL_STENCIL_INDEX4_EXT" }, +{ 0x8D47, "GL_STENCIL_INDEX4" }, +{ 0x8D48, "GL_STENCIL_INDEX8_EXT" }, +{ 0x8D48, "GL_STENCIL_INDEX8" }, +{ 0x8D49, "GL_STENCIL_INDEX16_EXT" }, +{ 0x8D49, "GL_STENCIL_INDEX16" }, +{ 0x8D50, "GL_RENDERBUFFER_RED_SIZE_EXT" }, +{ 0x8D50, "GL_RENDERBUFFER_RED_SIZE" }, +{ 0x8D51, "GL_RENDERBUFFER_GREEN_SIZE_EXT" }, +{ 0x8D51, "GL_RENDERBUFFER_GREEN_SIZE" }, +{ 0x8D52, "GL_RENDERBUFFER_BLUE_SIZE_EXT" }, +{ 0x8D52, "GL_RENDERBUFFER_BLUE_SIZE" }, +{ 0x8D53, "GL_RENDERBUFFER_ALPHA_SIZE_EXT" }, +{ 0x8D53, "GL_RENDERBUFFER_ALPHA_SIZE" }, +{ 0x8D54, "GL_RENDERBUFFER_DEPTH_SIZE_EXT" }, +{ 0x8D54, "GL_RENDERBUFFER_DEPTH_SIZE" }, +{ 0x8D55, "GL_RENDERBUFFER_STENCIL_SIZE_EXT" }, +{ 0x8D55, "GL_RENDERBUFFER_STENCIL_SIZE" }, +{ 0x8D56, "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT" }, +{ 0x8D56, "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE" }, +{ 0x8D57, "GL_MAX_SAMPLES_EXT" }, +{ 0x8D57, "GL_MAX_SAMPLES" }, +{ 0x8D70, "GL_RGBA32UI_EXT" }, +{ 0x8D71, "GL_RGB32UI_EXT" }, +{ 0x8D72, "GL_ALPHA32UI_EXT" }, +{ 0x8D73, "GL_INTENSITY32UI_EXT" }, +{ 0x8D74, "GL_LUMINANCE32UI_EXT" }, +{ 0x8D75, "GL_LUMINANCE_ALPHA32UI_EXT" }, +{ 0x8D76, "GL_RGBA16UI_EXT" }, +{ 0x8D77, "GL_RGB16UI_EXT" }, +{ 0x8D78, "GL_ALPHA16UI_EXT" }, +{ 0x8D79, "GL_INTENSITY16UI_EXT" }, +{ 0x8D7A, "GL_LUMINANCE16UI_EXT" }, +{ 0x8D7B, "GL_LUMINANCE_ALPHA16UI_EXT" }, +{ 0x8D7C, "GL_RGBA8UI_EXT" }, +{ 0x8D7D, "GL_RGB8UI_EXT" }, +{ 0x8D7E, "GL_ALPHA8UI_EXT" }, +{ 0x8D7F, "GL_INTENSITY8UI_EXT" }, +{ 0x8D80, "GL_LUMINANCE8UI_EXT" }, +{ 0x8D81, "GL_LUMINANCE_ALPHA8UI_EXT" }, +{ 0x8D82, "GL_RGBA32I_EXT" }, +{ 0x8D83, "GL_RGB32I_EXT" }, +{ 0x8D84, "GL_ALPHA32I_EXT" }, +{ 0x8D85, "GL_INTENSITY32I_EXT" }, +{ 0x8D86, "GL_LUMINANCE32I_EXT" }, +{ 0x8D87, "GL_LUMINANCE_ALPHA32I_EXT" }, +{ 0x8D88, "GL_RGBA16I_EXT" }, +{ 0x8D89, "GL_RGB16I_EXT" }, +{ 0x8D8A, "GL_ALPHA16I_EXT" }, +{ 0x8D8B, "GL_INTENSITY16I_EXT" }, +{ 0x8D8C, "GL_LUMINANCE16I_EXT" }, +{ 0x8D8D, "GL_LUMINANCE_ALPHA16I_EXT" }, +{ 0x8D8E, "GL_RGBA8I_EXT" }, +{ 0x8D8F, "GL_RGB8I_EXT" }, +{ 0x8D90, "GL_ALPHA8I_EXT" }, +{ 0x8D91, "GL_INTENSITY8I_EXT" }, +{ 0x8D92, "GL_LUMINANCE8I_EXT" }, +{ 0x8D93, "GL_LUMINANCE_ALPHA8I_EXT" }, +{ 0x8D94, "GL_RED_INTEGER_EXT" }, +{ 0x8D95, "GL_GREEN_INTEGER_EXT" }, +{ 0x8D96, "GL_BLUE_INTEGER_EXT" }, +{ 0x8D97, "GL_ALPHA_INTEGER_EXT" }, +{ 0x8D98, "GL_RGB_INTEGER_EXT" }, +{ 0x8D99, "GL_RGBA_INTEGER_EXT" }, +{ 0x8D9A, "GL_BGR_INTEGER_EXT" }, +{ 0x8D9B, "GL_BGRA_INTEGER_EXT" }, +{ 0x8D9C, "GL_LUMINANCE_INTEGER_EXT" }, +{ 0x8D9D, "GL_LUMINANCE_ALPHA_INTEGER_EXT" }, +{ 0x8D9E, "GL_RGBA_INTEGER_MODE_EXT" }, +{ 0x8DA7, "GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT" }, +{ 0x8DA8, "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT" }, +{ 0x8DA9, "GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT" }, +{ 0x8DAD, "GL_FLOAT_32_UNSIGNED_INT_24_8_REV" }, +{ 0x8DB9, "GL_FRAMEBUFFER_SRGB_EXT" }, +{ 0x8DBA, "GL_FRAMEBUFFER_SRGB_CAPABLE_EXT" }, +{ 0x8DBB, "GL_COMPRESSED_RED_RGTC1" }, +{ 0x8DBC, "GL_COMPRESSED_SIGNED_RED_RGTC1" }, +{ 0x8DBD, "GL_COMPRESSED_RG_RGTC2" }, +{ 0x8DBE, "GL_COMPRESSED_SIGNED_RG_RGTC2" }, +{ 0x8DC0, "GL_SAMPLER_1D_ARRAY_EXT" }, +{ 0x8DC1, "GL_SAMPLER_2D_ARRAY_EXT" }, +{ 0x8DC2, "GL_SAMPLER_BUFFER_EXT" }, +{ 0x8DC3, "GL_SAMPLER_1D_ARRAY_SHADOW_EXT" }, +{ 0x8DC4, "GL_SAMPLER_2D_ARRAY_SHADOW_EXT" }, +{ 0x8DC5, "GL_SAMPLER_CUBE_SHADOW_EXT" }, +{ 0x8DC6, "GL_UNSIGNED_INT_VEC2_EXT" }, +{ 0x8DC7, "GL_UNSIGNED_INT_VEC3_EXT" }, +{ 0x8DC8, "GL_UNSIGNED_INT_VEC4_EXT" }, +{ 0x8DC9, "GL_INT_SAMPLER_1D_EXT" }, +{ 0x8DCA, "GL_INT_SAMPLER_2D_EXT" }, +{ 0x8DCB, "GL_INT_SAMPLER_3D_EXT" }, +{ 0x8DCC, "GL_INT_SAMPLER_CUBE_EXT" }, +{ 0x8DCD, "GL_INT_SAMPLER_2D_RECT_EXT" }, +{ 0x8DCE, "GL_INT_SAMPLER_1D_ARRAY_EXT" }, +{ 0x8DCF, "GL_INT_SAMPLER_2D_ARRAY_EXT" }, +{ 0x8DD0, "GL_INT_SAMPLER_BUFFER_EXT" }, +{ 0x8DD1, "GL_UNSIGNED_INT_SAMPLER_1D_EXT" }, +{ 0x8DD2, "GL_UNSIGNED_INT_SAMPLER_2D_EXT" }, +{ 0x8DD3, "GL_UNSIGNED_INT_SAMPLER_3D_EXT" }, +{ 0x8DD4, "GL_UNSIGNED_INT_SAMPLER_CUBE_EXT" }, +{ 0x8DD5, "GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT" }, +{ 0x8DD6, "GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT" }, +{ 0x8DD7, "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT" }, +{ 0x8DD8, "GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT" }, +{ 0x8DD9, "GL_GEOMETRY_SHADER_EXT" }, +{ 0x8DDA, "GL_GEOMETRY_VERTICES_OUT_EXT" }, +{ 0x8DDB, "GL_GEOMETRY_INPUT_TYPE_EXT" }, +{ 0x8DDC, "GL_GEOMETRY_OUTPUT_TYPE_EXT" }, +{ 0x8DDD, "GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT" }, +{ 0x8DDE, "GL_MAX_VERTEX_VARYING_COMPONENTS_EXT" }, +{ 0x8DDF, "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT" }, +{ 0x8DE0, "GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT" }, +{ 0x8DE1, "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT" }, +{ 0x8DE2, "GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT" }, +{ 0x8DE3, "GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT" }, +{ 0x8DE4, "GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT" }, +{ 0x8DED, "GL_MAX_BINDABLE_UNIFORM_SIZE_EXT" }, +{ 0x8DEE, "GL_UNIFORM_BUFFER_EXT" }, +{ 0x8DEF, "GL_UNIFORM_BUFFER_BINDING_EXT" }, +{ 0x8E4C, "GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT" }, +{ 0x8E4D, "GL_FIRST_VERTEX_CONVENTION_EXT" }, +{ 0x8E4E, "GL_LAST_VERTEX_CONVENTION_EXT" }, +{ 0x8E4F, "GL_PROVOKING_VERTEX_EXT" } +}; + +const char *get_enum_str(uint val) +{ + for(int i = 0; i < ARRAYSIZE(g_glEnums); i++) + { + if( g_glEnums[i].value == val ) + return g_glEnums[i].str; + } + + return "UNKNOWN"; +} + +typedef union { + uint16_t bin; + struct { + uint16_t sign:1; + uint16_t exp:5; + uint16_t mant:10; + } x; +} halffloat_t; + +typedef union { + float f; + uint32_t bin; + struct { + uint32_t sign:1; + uint32_t exp:8; + uint32_t mant:23; + } x; +} fullfloat_t; + +static inline float float_h2f(halffloat_t t) +{ + fullfloat_t tmp; + tmp.x.sign = t.x.sign; // copy sign + if(t.x.exp==0 /*&& t.mant==0*/) { + // 0 and denormal? + tmp.x.exp=0; + tmp.x.mant=0; + } else if (t.x.exp==31) { + // Inf / NaN + tmp.x.exp=255; + tmp.x.mant=(t.x.mant<<13); + } else { + tmp.x.mant=(t.x.mant<<13); + tmp.x.exp = t.x.exp+0x38; + } + + return tmp.f; +} + +void TexImage2D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void * data) +{ + if( type == GL_UNSIGNED_INT_8_8_8_8_REV ) + type = GL_UNSIGNED_BYTE; + + if( format == GL_BGR ) + format = GL_RGB; + + if( format == GL_BGRA ) + format = GL_RGBA; + + if( internalformat == GL_SRGB8 && format == GL_RGBA ) + internalformat = GL_SRGB8_ALPHA8; + + if( format == GL_LUMINANCE || format == GL_LUMINANCE_ALPHA ) + internalformat = format; + +#if 0 + if( internalformat == GL_SRGB8 ) + internalformat = GL_RGB; + if( internalformat == GL_SRGB8_ALPHA8 ) + internalformat = GL_RGBA;*/ + + if( data ) + { + if( internalformat == GL_RGBA16F ) + { + uint16_t *_data = (uint16_t*)data; + uint8_t *new_data = (uint8_t*)data; + + for( int i = 0; i < width*height*4; i+=4 ) + { + halffloat_t fl; + fl.bin = _data[i]; new_data[i] = float_h2f(fl)*255; + fl.bin = _data[i+1]; new_data[i+1] = float_h2f(fl)*255; + fl.bin = _data[i+2]; new_data[i+2] = float_h2f(fl)*255; + fl.bin = _data[i+3]; new_data[i+3] = float_h2f(fl)*255; + } + internalformat = GL_RGBA; + type = GL_UNSIGNED_BYTE; + } + else if( internalformat == GL_RGBA16 ) + { + uint16_t *_data = (uint16_t*)data; + uint8_t *new_data = (uint8_t*)data; + + for( int i = 0; i < width*height*4; i+=4 ) + { + new_data[i] = _data[i] >> 8; + new_data[i+1] = _data[i+1] >> 8; + new_data[i+2] = _data[i+2] >> 8; + new_data[i+3] = _data[i+3] >> 8; + } + + data = new_data; + internalformat = GL_RGBA; + type = GL_UNSIGNED_BYTE; + } + } +#endif + + gGL->glTexImage2D(target, level, internalformat, width, height, border, format, type, data); +} + +GLboolean isDXTc(GLenum format) { + switch (format) { + case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: + case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: + return 1; + } + return 0; +} + +GLboolean isDXTcSRGB(GLenum format) { + switch (format) { + case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: + return 1; + } + return 0; +} + +static GLboolean isDXTcAlpha(GLenum format) { + switch (format) { + case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: + return 1; + } + return 0; +} + +GLvoid *uncompressDXTc(GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, int transparent0, int* simpleAlpha, int* complexAlpha, const GLvoid *data) { + // uncompress a DXTc image + // get pixel size of uncompressed image => fixed RGBA + int pixelsize = 4; +/* if (format==COMPRESSED_RGB_S3TC_DXT1_EXT) + pixelsize = 3;*/ + // check with the size of the input data stream if the stream is in fact uncompressed + if (imageSize == width*height*pixelsize || data==NULL) { + // uncompressed stream + return (GLvoid*)data; + } + // alloc memory + GLvoid *pixels = malloc(((width+3)&~3)*((height+3)&~3)*pixelsize); + // uncompress loop + int blocksize; + switch (format) { + case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: + case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: + blocksize = 8; + break; + case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: + case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: + case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: + blocksize = 16; + break; + } + uintptr_t src = (uintptr_t) data; + for (int y=0; yglTexImage2D(target, 0, internalformat, width, height, border, format, type, data); + + TexImage2D( target, level, intformat, width, height, border, format, type, pixels ); +} // TexSubImage should work properly on every driver stack and GPU--enabling by default. ConVar gl_enabletexsubimage( "gl_enabletexsubimage", "1" ); @@ -1373,7 +3664,7 @@ void CGLMTex::WriteTexels( GLMTexLockDesc *desc, bool writeWholeSlice, bool noDa // compressed path // http://www.opengl.org/sdk/docs/man/xhtml/glCompressedTexImage2D.xml - gGL->glCompressedTexImage2D( target, // target + CompressedTexImage2D( target, // target desc->m_req.m_mip, // level intformat, // internalformat - don't use format->m_glIntFormat because we have the SRGB select going on above slice->m_xSize, // width @@ -1440,14 +3731,14 @@ void CGLMTex::WriteTexels( GLMTexLockDesc *desc, bool writeWholeSlice, bool noDa // uncompressed path // http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/teximage2d.html - gGL->glTexImage2D( target, // target + TexImage2D( target, // target desc->m_req.m_mip, // level - glDataFormat, // internalformat - don't use format->m_glIntFormat because we have the SRGB select going on above + intformat, // internalformat - don't use format->m_glIntFormat because we have the SRGB select going on above slice->m_xSize, // width slice->m_ySize, // height 0, // border glDataFormat, // dataformat - glDataType == GL_UNSIGNED_INT_8_8_8_8_REV ? GL_UNSIGNED_BYTE : glDataType, // datatype + glDataType, // datatype noDataWrite ? NULL : sliceAddress ); // data (optionally suppressed in case ResetSRGB desires) if (m_layout->m_key.m_texFlags & kGLMTexMultisampled) diff --git a/togles/linuxwin/decompress.c b/togles/linuxwin/decompress.c new file mode 100644 index 00000000..eabd6893 --- /dev/null +++ b/togles/linuxwin/decompress.c @@ -0,0 +1,341 @@ +#include +#include + +/* +DXT1/DXT3/DXT5 texture decompression + +The original code is from Benjamin Dobell, see below for details. Compared to +the original this one adds DXT3 decompression, is valid C89, and is x64 +compatible as it uses fixed size integers everywhere. It also uses a different +PackRGBA order. + +--- + +Copyright (c) 2012, Matth�us G. "Anteru" Chajdas (http://anteru.net) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- + +Copyright (C) 2009 Benjamin Dobell, Glass Echidna + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- +*/ +static uint32_t PackRGBA (uint8_t r, uint8_t g, uint8_t b, uint8_t a) +{ + return r | (g << 8) | (b << 16) | (a << 24); +} + +static void DecompressBlockDXT1Internal (const uint8_t* block, + uint32_t* output, + uint32_t outputStride, + int transparent0, int* simpleAlpha, int *complexAlpha, + const uint8_t* alphaValues) +{ + uint32_t temp, code; + + uint16_t color0, color1; + uint8_t r0, g0, b0, r1, g1, b1; + + int i, j; + + color0 = *(const uint16_t*)(block); + color1 = *(const uint16_t*)(block + 2); + + temp = (color0 >> 11) * 255 + 16; + r0 = (uint8_t)((temp/32 + temp)/32); + temp = ((color0 & 0x07E0) >> 5) * 255 + 32; + g0 = (uint8_t)((temp/64 + temp)/64); + temp = (color0 & 0x001F) * 255 + 16; + b0 = (uint8_t)((temp/32 + temp)/32); + + temp = (color1 >> 11) * 255 + 16; + r1 = (uint8_t)((temp/32 + temp)/32); + temp = ((color1 & 0x07E0) >> 5) * 255 + 32; + g1 = (uint8_t)((temp/64 + temp)/64); + temp = (color1 & 0x001F) * 255 + 16; + b1 = (uint8_t)((temp/32 + temp)/32); + + code = *(const uint32_t*)(block + 4); + + if (color0 > color1) { + for (j = 0; j < 4; ++j) { + for (i = 0; i < 4; ++i) { + uint32_t finalColor, positionCode; + uint8_t alpha; + + alpha = alphaValues [j*4+i]; + + finalColor = 0; + positionCode = (code >> 2*(4*j+i)) & 0x03; + + switch (positionCode) { + case 0: + finalColor = PackRGBA(r0, g0, b0, alpha); + break; + case 1: + finalColor = PackRGBA(r1, g1, b1, alpha); + break; + case 2: + finalColor = PackRGBA((2*r0+r1)/3, (2*g0+g1)/3, (2*b0+b1)/3, alpha); + break; + case 3: + finalColor = PackRGBA((r0+2*r1)/3, (g0+2*g1)/3, (b0+2*b1)/3, alpha); + break; + } + if(!alpha) + *simpleAlpha = 1; + else if(alpha<0xff) + *complexAlpha = 1; + output [j*outputStride + i] = finalColor; + } + } + } else { + for (j = 0; j < 4; ++j) { + for (i = 0; i < 4; ++i) { + uint32_t finalColor, positionCode; + uint8_t alpha; + + alpha = alphaValues [j*4+i]; + + finalColor = 0; + positionCode = (code >> 2*(4*j+i)) & 0x03; + + switch (positionCode) { + case 0: + finalColor = PackRGBA(r0, g0, b0, alpha); + break; + case 1: + finalColor = PackRGBA(r1, g1, b1, alpha); + break; + case 2: + finalColor = PackRGBA((r0+r1)/2, (g0+g1)/2, (b0+b1)/2, alpha); + break; + case 3: + if(transparent0) alpha=0; + finalColor = PackRGBA(0, 0, 0, alpha); + break; + } + + if(!alpha) + *simpleAlpha = 1; + else if(alpha<0xff) + *complexAlpha = 1; + + output [j*outputStride + i] = finalColor; + } + } + } +} + +/* +void DecompressBlockDXT1(): Decompresses one block of a DXT1 texture and stores the resulting pixels at the appropriate offset in 'image'. + +uint32_t x: x-coordinate of the first pixel in the block. +uint32_t y: y-coordinate of the first pixel in the block. +uint32_t width: width of the texture being decompressed. +const uint8_t *blockStorage: pointer to the block to decompress. +uint32_t *image: pointer to image where the decompressed pixel data should be stored. +*/ +void DecompressBlockDXT1(uint32_t x, uint32_t y, uint32_t width, + const uint8_t* blockStorage, + int transparent0, int* simpleAlpha, int *complexAlpha, + uint32_t* image) +{ + static const uint8_t const_alpha [] = { + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255, + 255, 255, 255, 255 + }; + + DecompressBlockDXT1Internal (blockStorage, + image + x + (y * width), width, transparent0, simpleAlpha, complexAlpha, const_alpha); +} + +/* +void DecompressBlockDXT5(): Decompresses one block of a DXT5 texture and stores the resulting pixels at the appropriate offset in 'image'. + +uint32_t x: x-coordinate of the first pixel in the block. +uint32_t y: y-coordinate of the first pixel in the block. +uint32_t width: width of the texture being decompressed. +const uint8_t *blockStorage: pointer to the block to decompress. +uint32_t *image: pointer to image where the decompressed pixel data should be stored. +*/ +void DecompressBlockDXT5(uint32_t x, uint32_t y, uint32_t width, + const uint8_t* blockStorage, + int transparent0, int* simpleAlpha, int *complexAlpha, + uint32_t* image) +{ + uint8_t alpha0, alpha1; + const uint8_t* bits; + uint32_t alphaCode1; + uint16_t alphaCode2; + + uint16_t color0, color1; + uint8_t r0, g0, b0, r1, g1, b1; + + int i, j; + + uint32_t temp, code; + + alpha0 = *(blockStorage); + alpha1 = *(blockStorage + 1); + + bits = blockStorage + 2; + alphaCode1 = bits[2] | (bits[3] << 8) | (bits[4] << 16) | (bits[5] << 24); + alphaCode2 = bits[0] | (bits[1] << 8); + + color0 = *(const uint16_t*)(blockStorage + 8); + color1 = *(const uint16_t*)(blockStorage + 10); + + temp = (color0 >> 11) * 255 + 16; + r0 = (uint8_t)((temp/32 + temp)/32); + temp = ((color0 & 0x07E0) >> 5) * 255 + 32; + g0 = (uint8_t)((temp/64 + temp)/64); + temp = (color0 & 0x001F) * 255 + 16; + b0 = (uint8_t)((temp/32 + temp)/32); + + temp = (color1 >> 11) * 255 + 16; + r1 = (uint8_t)((temp/32 + temp)/32); + temp = ((color1 & 0x07E0) >> 5) * 255 + 32; + g1 = (uint8_t)((temp/64 + temp)/64); + temp = (color1 & 0x001F) * 255 + 16; + b1 = (uint8_t)((temp/32 + temp)/32); + + code = *(const uint32_t*)(blockStorage + 12); + + for (j = 0; j < 4; j++) { + for (i = 0; i < 4; i++) { + uint8_t finalAlpha; + int alphaCode, alphaCodeIndex; + uint8_t colorCode; + uint32_t finalColor; + + alphaCodeIndex = 3*(4*j+i); + if (alphaCodeIndex <= 12) { + alphaCode = (alphaCode2 >> alphaCodeIndex) & 0x07; + } else if (alphaCodeIndex == 15) { + alphaCode = (alphaCode2 >> 15) | ((alphaCode1 << 1) & 0x06); + } else /* alphaCodeIndex >= 18 && alphaCodeIndex <= 45 */ { + alphaCode = (alphaCode1 >> (alphaCodeIndex - 16)) & 0x07; + } + + if (alphaCode == 0) { + finalAlpha = alpha0; + } else if (alphaCode == 1) { + finalAlpha = alpha1; + } else { + if (alpha0 > alpha1) { + finalAlpha = (uint8_t)(((8-alphaCode)*alpha0 + (alphaCode-1)*alpha1)/7); + } else { + if (alphaCode == 6) { + finalAlpha = 0; + } else if (alphaCode == 7) { + finalAlpha = 255; + } else { + finalAlpha = (uint8_t)(((6-alphaCode)*alpha0 + (alphaCode-1)*alpha1)/5); + } + } + } + + colorCode = (code >> 2*(4*j+i)) & 0x03; + finalColor = 0; + + switch (colorCode) { + case 0: + finalColor = PackRGBA(r0, g0, b0, finalAlpha); + break; + case 1: + finalColor = PackRGBA(r1, g1, b1, finalAlpha); + break; + case 2: + finalColor = PackRGBA((2*r0+r1)/3, (2*g0+g1)/3, (2*b0+b1)/3, finalAlpha); + break; + case 3: + finalColor = PackRGBA((r0+2*r1)/3, (g0+2*g1)/3, (b0+2*b1)/3, finalAlpha); + break; + } + + if(finalAlpha==0) *simpleAlpha = 1; + else if(finalAlpha<0xff) *complexAlpha = 1; + + image [i + x + (width* (y+j))] = finalColor; + } + } +} + +/* +void DecompressBlockDXT3(): Decompresses one block of a DXT3 texture and stores the resulting pixels at the appropriate offset in 'image'. + +uint32_t x: x-coordinate of the first pixel in the block. +uint32_t y: y-coordinate of the first pixel in the block. +uint32_t height: height of the texture being decompressed. +const uint8_t *blockStorage: pointer to the block to decompress. +uint32_t *image: pointer to image where the decompressed pixel data should be stored. +*/ +void DecompressBlockDXT3(uint32_t x, uint32_t y, uint32_t width, + const uint8_t* blockStorage, + int transparent0, int* simpleAlpha, int *complexAlpha, + uint32_t* image) +{ + int i; + + uint8_t alphaValues [16] = { 0 }; + + for (i = 0; i < 4; ++i) { + const uint16_t* alphaData = (const uint16_t*) (blockStorage); + + alphaValues [i*4 + 0] = (((*alphaData) >> 0) & 0xF ) * 17; + alphaValues [i*4 + 1] = (((*alphaData) >> 4) & 0xF ) * 17; + alphaValues [i*4 + 2] = (((*alphaData) >> 8) & 0xF ) * 17; + alphaValues [i*4 + 3] = (((*alphaData) >> 12) & 0xF) * 17; + + blockStorage += 2; + } + + DecompressBlockDXT1Internal (blockStorage, + image + x + (y * width), width, transparent0, simpleAlpha, complexAlpha, alphaValues); +} + +// Texture DXT1 / DXT5 compression +// Using STB "on file" library +// go there https://github.com/nothings/stb +// for more details and other libs + +#define STB_DXT_IMPLEMENTATION +#include "stb_dxt_104.h" diff --git a/togles/linuxwin/decompress.h b/togles/linuxwin/decompress.h new file mode 100644 index 00000000..e9e5da83 --- /dev/null +++ b/togles/linuxwin/decompress.h @@ -0,0 +1,19 @@ +#ifndef _GL4ES_DECOMPRESS_H_ +#define _GL4ES_DECOMPRESS_H_ + +void DecompressBlockDXT1(uint32_t x, uint32_t y, uint32_t width, + const uint8_t* blockStorage, + int transparent0, int* simpleAlpha, int *complexAlpha, + uint32_t* image); + +void DecompressBlockDXT3(uint32_t x, uint32_t y, uint32_t width, + const uint8_t* blockStorage, + int transparent0, int* simpleAlpha, int *complexAlpha, + uint32_t* image); + +void DecompressBlockDXT5(uint32_t x, uint32_t y, uint32_t width, + const uint8_t* blockStorage, + int transparent0, int* simpleAlpha, int *complexAlpha, + uint32_t* image); + +#endif // _GL4ES_DECOMPRESS_H_ diff --git a/togles/linuxwin/decompress.o b/togles/linuxwin/decompress.o new file mode 100644 index 0000000000000000000000000000000000000000..3e88c1046fa3c29e782b4c3fc597b8552ee8b93d GIT binary patch literal 35548 zcmb@t2{={V_W*n^*E}2{bH-cT$P{HNG88funM0<8LWaykS90T)At?$)L`5XCxaN6` z%wvXY%9J_2eR$vB|M&lf=X;*-`EH%F_g-tSwbx#I?X}k4r-Ib9E+dgh#J@izf)w#T zEd(O+(Gf=Kun(uroYR;RbGnFiweC!4ep7ZGckt!S#XyJFWO1EH8{DN4DX% zL3dEYY~wu8v@lgW;Wrs>A7D0dbue4dgxUI|nIp{6%>QBVFMGHf;0=2H%bqaFfLWoM z#}fWC1_3+H1I7R&uz_KxDKTx>ItIXrNQPXA0Kzb1&tk_&v0EfiXb9kn-6HjH#%>{TeI7RmV{A04XjJH+ zheGh~fd@61vr;`NyeK$SJhlpnC6HiuP@aX@S`?{2P*@!b`0k19R;aD4zX9~*U8f?*lvALBhvA))}D`TNJL ztSmh9C0xhmG_D)Z?1Jm)oZp-ViUC;K&N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9asmtogl2.cpp +++ b/togles/linuxwin/dx9asmtogl2.cpp @@ -69,13 +69,13 @@ static char g_szShadow2D[] = "vec2 p2 = suv.xy+vec2(0.0,invSize);\n" "vec2 p3 = suv.xy+vec2(invSize,0.0);\n" "vec2 p4 = suv.xy+vec2(invSize);\n" - "float d = texture2D(u_depthTex,p1).r;\n" + "float d = texture(u_depthTex,p1).r;\n" "float r = float(d>suv.z);\n" - "d = texture2D(u_depthTex,p2).r;\n" + "d = texture(u_depthTex,p2).r;\n" "float r2 = float(d>suv.z);\n" - "d = texture2D(u_depthTex,p3).r;\n" + "d = texture(u_depthTex,p3).r;\n" "float r3 = float(d>suv.z);\n" - "d = texture2D(u_depthTex,p4).r;\n" + "d = texture(u_depthTex,p4).r;\n" "float r4 = float(d>suv.z);\n" "p1*=size;\n" "float a = p1.y-floor(p1.y);\n" @@ -955,7 +955,7 @@ void D3DToGL::PrintUsageAndIndexToString( uint32 dwToken, char* strUsageUsageInd // if ( fSemanticFlags & SEMANTIC_OUTPUT ) // V_snprintf( strUsageUsageIndexName, nBufLen, dwUsageIndex != 0 ? "gl_BackColor" : "gl_FrontColor" ); // else - V_snprintf( strUsageUsageIndexName, nBufLen, dwUsageIndex != 0 ? "_gl_SecondaryColor" : "_gl_Color" ); + V_snprintf( strUsageUsageIndexName, nBufLen, dwUsageIndex != 0 ? "_gl_FrontSecondaryColor" : "_gl_FrontColor" ); break; case D3DDECLUSAGE_FOG: TranslationError(); @@ -1220,7 +1220,7 @@ void D3DToGL::PrintParameterToString ( uint32 dwToken, uint32 dwSourceOrDest, ch } else { - V_snprintf( buff, sizeof( buff ), dwRegNum == 0 ? "_gl_Color" : "_gl_SecondaryColor" ); + V_snprintf( buff, sizeof( buff ), dwRegNum == 0 ? "_gl_FrontColor" : "_gl_FrontSecondaryColor" ); } strcat_s( pRegisterName, nBufLen, buff ); } @@ -1456,7 +1456,6 @@ void D3DToGL::PrintParameterToString ( uint32 dwToken, uint32 dwSourceOrDest, ch m_dwConstIntUsageMask |= 0x00000001 << dwRegNum; // Keep track of the use of this integer constant break; case D3DSPR_COLOROUT: - // TODO(nillerusr): go fck urself if( dwRegNum+1 > m_iFragDataCount ) m_iFragDataCount = dwRegNum+1; @@ -2546,7 +2545,7 @@ void D3DToGL::Handle_TEX( uint32 dwToken, bool bIsTexLDL ) V_snprintf( szExtra, sizeof( szExtra ), ".%c", GetSwizzleComponent( pSrc0Reg, 3 ) ); V_strncat( szLOD, szExtra, sizeof( szLOD ) ); - PrintToBufWithIndents( *m_pBufALUCode, "%s = %s( %s, %s, %s );\n", pDestReg, bIsShadowSampler ? "shadow2DLod" : "texture2DLod", pSrc1Reg, sCoordVar.String(), szLOD ); + PrintToBufWithIndents( *m_pBufALUCode, "%s = %s( %s, %s, %s );\n", pDestReg, bIsShadowSampler ? "shadow2DLod" : "textureLod", pSrc1Reg, sCoordVar.String(), szLOD ); } else if ( bIsShadowSampler ) { @@ -2564,12 +2563,12 @@ void D3DToGL::Handle_TEX( uint32 dwToken, bool bIsTexLDL ) // We use the vec4 variant of texture2DProj() intentionally here, since it lines up well with Direct3D. CUtlString s4DProjCoords = EnsureNumSwizzleComponents( pSrc0Reg, 4 ); // Ensure vec4 variant - PrintToBufWithIndents( *m_pBufALUCode, "%s = texture2DProj( %s, %s );\n", pDestReg, pSrc1Reg, s4DProjCoords.String() ); + PrintToBufWithIndents( *m_pBufALUCode, "%s = textureProj( %s, %s );\n", pDestReg, pSrc1Reg, s4DProjCoords.String() ); } - else + else { CUtlString sCoordVar = EnsureNumSwizzleComponents( pSrc0Reg, bIsShadowSampler ? 3 : 2 ); - PrintToBufWithIndents( *m_pBufALUCode, "%s = texture2D( %s, %s );\n", pDestReg, pSrc1Reg, sCoordVar.String() ); + PrintToBufWithIndents( *m_pBufALUCode, "%s = texture( %s, %s );\n", pDestReg, pSrc1Reg, sCoordVar.String() ); } } else if ( nSamplerType == SAMPLER_TYPE_3D ) @@ -2580,7 +2579,7 @@ void D3DToGL::Handle_TEX( uint32 dwToken, bool bIsTexLDL ) } CUtlString sCoordVar = EnsureNumSwizzleComponents( pSrc0Reg, 3 ); - PrintToBufWithIndents( *m_pBufALUCode, "%s = texture3D( %s, %s );\n", pDestReg, pSrc1Reg, sCoordVar.String() ); + PrintToBufWithIndents( *m_pBufALUCode, "%s = texture( %s, %s );\n", pDestReg, pSrc1Reg, sCoordVar.String() ); } else if ( nSamplerType == SAMPLER_TYPE_CUBE ) { @@ -2590,7 +2589,7 @@ void D3DToGL::Handle_TEX( uint32 dwToken, bool bIsTexLDL ) } CUtlString sCoordVar = EnsureNumSwizzleComponents( pSrc0Reg, 3 ); - PrintToBufWithIndents( *m_pBufALUCode, "%s = textureCube( %s, %s );\n", pDestReg, pSrc1Reg, sCoordVar.String() ); + PrintToBufWithIndents( *m_pBufALUCode, "%s = texture( %s, %s );\n", pDestReg, pSrc1Reg, sCoordVar.String() ); } else { @@ -3049,7 +3048,7 @@ void D3DToGL::WriteGLSLInputVariableAssignments() if ( dwUsage == D3DDECLUSAGE_COLOR ) { - PrintToBufWithIndents( *m_pBufAttribCode, "vec4 oTempT%d = %s;\n", i, dwUsageIndex ? "_gl_SecondaryColor" : "_gl_Color" ); + PrintToBufWithIndents( *m_pBufAttribCode, "vec4 oTempT%d = %s;\n", i, dwUsageIndex ? "_gl_FrontSecondaryColor" : "_gl_FrontColor" ); } else if ( dwUsage == D3DDECLUSAGE_TEXCOORD ) { @@ -3182,6 +3181,10 @@ int D3DToGL::TranslateShader( uint32* code, CUtlBuffer *pBufDisassembledCode, bo m_bPutHexCodesAfterLines = (options & D3DToGL_PutHexCommentsAfterLines) != 0; m_bGeneratingDebugText = (options & D3DToGL_GeneratingDebugText) != 0; m_bGenerateSRGBWriteSuffix = (options & D3DToGL_OptionSRGBWriteSuffix) != 0; +// m_bGenerateSRGBWriteSuffix = true; + + if( debugLabel && ( V_strstr( debugLabel ,"vertexlit_and_unlit_generic_bump_ps") )) + m_bGenerateSRGBWriteSuffix = true; m_NumIndentTabs = 1; // start code indented one tab m_nLoopDepth = 0; @@ -3675,6 +3678,7 @@ int D3DToGL::TranslateShader( uint32* code, CUtlBuffer *pBufDisassembledCode, bo } // Control bit for sRGB Write suffix + if ( m_bGenerateSRGBWriteSuffix ) { // R500 Hookup @@ -3889,33 +3893,38 @@ int D3DToGL::TranslateShader( uint32* code, CUtlBuffer *pBufDisassembledCode, bo { StrcatToHeaderCode( g_szShadow2D ); StrcatToHeaderCode( g_szShadow2DProj ); - } else if( FindSubcode("shadow2D") ) - StrcatToHeaderCode( g_szShadow2D ); - - if( FindSubcode("_gl_Color") ) - StrcatToHeaderCode( "vec4 _gl_Color;\n" ); + StrcatToHeaderCode( g_szShadow2D ); + + if( FindSubcode("_gl_FrontColor") && !m_bFrontColor ) + StrcatToHeaderCode( "in vec4 _gl_FrontColor;\n" ); - if( FindSubcode("_gl_SecondaryColor") ) - StrcatToHeaderCode( "vec4 _gl_SecondaryColor;\n" ); + if( FindSubcode("_gl_FrontSecondaryColor") && !m_bFrontSecondaryColor ) + StrcatToHeaderCode( "in vec4 _gl_FrontSecondaryColor;\n" ); + if( m_iFragDataCount && bVertexShader ) + StrcatToHeaderCode( "\nuniform float alpha_ref;\n" ); + StrcatToHeaderCode( "\nvoid main()\n{\n" ); if ( m_bUsedAtomicTempVar ) { PrintToBufWithIndents( *m_pBufHeaderCode, "vec4 %s;\n\n", g_pAtomicTempVarName ); } - + // sRGB Write suffix if ( m_bGenerateSRGBWriteSuffix ) { - StrcatToALUCode( "vec3 sRGBFragData;\n" ); - StrcatToALUCode( "sRGBFragData.xyz = log( gl_FragData[0].xyz );\n" ); - StrcatToALUCode( "sRGBFragData.xyz = sRGBFragData.xyz * vec3( 0.454545f, 0.454545f, 0.454545f );\n" ); - StrcatToALUCode( "sRGBFragData.xyz = exp( sRGBFragData.xyz );\n" ); - StrcatToALUCode( "gl_FragData[0].xyz = mix( gl_FragData[0].xyz, sRGBFragData, flSRGBWrite );\n" ); + // StrcatToALUCode( "vec3 sRGBFragData;\n" ); + // StrcatToALUCode( "sRGBFragData.xyz = log( gl_FragData[0].xyz );\n" ); + // StrcatToALUCode( "sRGBFragData.xyz = sRGBFragData.xyz * vec3( 0.754545f, 0.754545f, 0.754545f );\n" ); + // StrcatToALUCode( "sRGBFragData.xyz = exp( sRGBFragData.xyz );\n" ); + StrcatToALUCode( "gl_FragData[0].xyz = pow(gl_FragData[0].xyz, vec3(1.0/2.2));\n" ); } + if( m_iFragDataCount && bVertexShader ) + StrcatToALUCode( "if( gl_FragData[0].a < alpha_ref ) { discard; };\n" ); + strcat_s( (char*)m_pBufALUCode->Base(), m_pBufALUCode->Size(), "}\n" ); // Put all of the strings together for final program ( pHeaderCode + pAttribCode + pParamCode + pALUCode ) diff --git a/togles/linuxwin/dxabstract.cpp b/togles/linuxwin/dxabstract.cpp index 0e0fca16..5da2623f 100644 --- a/togles/linuxwin/dxabstract.cpp +++ b/togles/linuxwin/dxabstract.cpp @@ -1201,8 +1201,8 @@ static void FillD3DCaps9( const GLMRendererInfoFields &glmRendererInfo, D3DCAPS9 pCaps->MaxPixelShader30InstructionSlots = 0; #if DX_TO_GL_ABSTRACTION - pCaps->FakeSRGBWrite = !glmRendererInfo.m_hasGammaWrites; - pCaps->CanDoSRGBReadFromRTs = !glmRendererInfo.m_cantAttachSRGB; + pCaps->FakeSRGBWrite = true;//!glmRendererInfo.m_hasGammaWrites; + pCaps->CanDoSRGBReadFromRTs = true;//!glmRendererInfo.m_cantAttachSRGB; pCaps->MixedSizeTargets = glmRendererInfo.m_hasMixedAttachmentSizes; #endif } diff --git a/togles/linuxwin/glentrypoints.cpp b/togles/linuxwin/glentrypoints.cpp index 7349b000..80fec0ee 100644 --- a/togles/linuxwin/glentrypoints.cpp +++ b/togles/linuxwin/glentrypoints.cpp @@ -389,6 +389,14 @@ COpenGLEntryPoints::COpenGLEntryPoints() m_bHave_GL_EXT_framebuffer_blit = true; m_bHave_GL_EXT_framebuffer_multisample = true; m_bHave_GL_ARB_occlusion_query = true; + m_bHave_GL_ARB_map_buffer_range = true; + m_bHave_GL_ARB_vertex_buffer_object = true; + m_bHave_GL_ARB_vertex_array_bgra = true; + m_bHave_GL_EXT_vertex_array_bgra = true; + m_bHave_GL_ARB_debug_output = true; + m_bHave_GL_EXT_direct_state_access = false; + m_bHave_GL_EXT_framebuffer_multisample_blit_scaled = true; + m_bHave_GL_EXT_texture_sRGB_decode = true; glBindFramebuffer.Force(glBindFramebuffer.Pointer()); glBindRenderbuffer.Force(glBindRenderbuffer.Pointer()); @@ -456,12 +464,6 @@ COpenGLEntryPoints::COpenGLEntryPoints() printf( "GL_EXT_buffer_storage: %s\n", m_bHave_GL_EXT_buffer_storage ? "AVAILABLE" : "NOT AVAILABLE" ); printf( "GL_EXT_texture_sRGB_decode: %s\n", m_bHave_GL_EXT_texture_sRGB_decode ? "AVAILABLE" : "NOT AVAILABLE" ); - bool bGLCanDecodeS3TCTextures = m_bHave_GL_EXT_texture_compression_s3tc || ( m_bHave_GL_EXT_texture_compression_dxt1 && m_bHave_GL_ANGLE_texture_compression_dxt3 && m_bHave_GL_ANGLE_texture_compression_dxt5 ); - if ( !bGLCanDecodeS3TCTextures ) - { - Error( "This application requires either the GL_EXT_texture_compression_s3tc, or the GL_EXT_texture_compression_dxt1 + GL_ANGLE_texture_compression_dxt3 + GL_ANGLE_texture_compression_dxt5 OpenGL extensions. Please install S3TC texture support.\n" ); - } - #ifdef OSX if ( CommandLine()->FindParm( "-glmnosrgbdecode" ) ) { diff --git a/togles/linuxwin/glmgr.cpp b/togles/linuxwin/glmgr.cpp index 255aa84d..295d85bb 100644 --- a/togles/linuxwin/glmgr.cpp +++ b/togles/linuxwin/glmgr.cpp @@ -92,11 +92,11 @@ char g_preloadTexVertexProgramText[] = // Гроб гроб кладбище п "precision mediump float;\n" "out vec4 otex;\n" "void main() \n" - "{ \n" + "{\n" "vec4 pos = vec4( 0.1, 0.1, 0.1, 0.1 );\n" "vec4 tex = vec4( 0.0, 0.0, 0.0, 0.0 );\n" - " \n" - "gl_Position = pos; \n" + "\n" + "gl_Position = pos;\n" "otex = tex; \n" "} \n" }; @@ -116,7 +116,7 @@ char g_preload2DTexFragmentProgramText[] = "void main() \n" "{ \n" "vec4 r0; \n" - "r0 = texture2D( sampler15, otex.xy ); \n" + "r0 = texture( sampler15, otex.xy ); \n" "_gl_FragColor = r0; //discard; \n" "} \n" }; @@ -137,7 +137,7 @@ char g_preload3DTexFragmentProgramText[] = "void main() \n" "{ \n" "vec4 r0; \n" - "r0 = texture3D( sampler15, otex.xyz ); \n" + "r0 = texture( sampler15, otex.xyz ); \n" "_gl_FragColor = vec4(0,0,0,0); //discard; \n" "} \n" }; @@ -157,7 +157,7 @@ char g_preloadCubeTexFragmentProgramText[] = "void main() \n" "{ \n" "vec4 r0; \n" - "r0 = textureCube( sampler15, otex.xyz ); \n" + "r0 = texture( sampler15, otex.xyz ); \n" "_gl_FragColor = r0; //discard; \n" "} \n" }; @@ -449,6 +449,20 @@ GLMgr::~GLMgr() { } +extern void CompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, + GLsizei imageSize, const GLvoid *data); + +extern void TexImage2D(GLenum target, + GLint level, + GLint internalformat, + GLsizei width, + GLsizei height, + GLint border, + GLenum format, + GLenum type, + const void * data); + //=============================================================================== GLMContext *GLMgr::NewContext( IDirect3DDevice9 *pDevice, GLMDisplayParams *params ) @@ -953,14 +967,6 @@ void GLMContext::Blit2( CGLMTex *srcTex, GLMRect *srcRect, int srcFace, int srcM bool srcGamma = srcTex && ((srcTex->m_layout->m_key.m_texFlags & kGLMTexSRGB) != 0); bool dstGamma = dstTex && ((dstTex->m_layout->m_key.m_texFlags & kGLMTexSRGB) != 0); - bool doPushPop = (srcGamma != dstGamma) && gl_radar7954721_workaround_mixed.GetInt() && m_caps.m_nv; // workaround for cross gamma blit problems on NV - // ^^ need to re-check this on some post-10.6.3 build on NV to see if it was fixed - - if (doPushPop) - { - gGL->glPushAttrib( 0 ); - } - //----------------------------------------------------------------- figure out the plan bool blitTwoStep = false; // think positive @@ -1052,8 +1058,8 @@ void GLMContext::Blit2( CGLMTex *srcTex, GLMRect *srcRect, int srcFace, int srcM glAttachTex2DtoFBO ( GL_DRAW_FRAMEBUFFER, formatClass, srcTex->m_texName, 0 ); // set read and draw buffers appropriately - gGL->glReadBuffer ( glAttachFromClass[formatClass] ); - gGL->glDrawBuffer ( glAttachFromClass[formatClass] ); + gGL->glReadBuffer( glAttachFromClass[formatClass] ); + gGL->glDrawBuffers( 1, &glAttachFromClass[formatClass] ); // blit#1 - to resolve to scratch // implicitly means no scaling, thus will be done with NEAREST sampling @@ -1117,10 +1123,12 @@ void GLMContext::Blit2( CGLMTex *srcTex, GLMRect *srcRect, int srcFace, int srcM if (blitToBack) { // backbuffer is special - FBO0 is left out (either scrubbed already, or not used) - - BindFBOToCtx ( NULL, GL_DRAW_FRAMEBUFFER ); - gGL->glDrawBuffer ( GL_BACK ); - + + BindFBOToCtx( NULL, GL_DRAW_FRAMEBUFFER ); + + GLenum bufs = GL_BACK; + gGL->glDrawBuffers( 1, &bufs ); + yflip = true; } else @@ -1201,12 +1209,6 @@ void GLMContext::Blit2( CGLMTex *srcTex, GLMRect *srcRect, int srcFace, int srcM // restore GLM drawing FBO BindFBOToCtx( m_drawingFBO, GL_FRAMEBUFFER ); - if (doPushPop) - { - gGL->glPopAttrib( ); - } - - //----------------------------------------------------------------- restore old scissor state if (oldsciss.enable) { @@ -1258,39 +1260,6 @@ void GLMContext::BlitTex( CGLMTex *srcTex, GLMRect *srcRect, int srcFace, int sr GLMPRINTF(( "-D- dst tex layout is %s", dstTex->m_layout->m_layoutSummary )); } - int pushed = 0; - uint pushmask = gl_radar7954721_workaround_maskval.GetInt(); - //GL_COLOR_BUFFER_BIT - //| GL_CURRENT_BIT - //| GL_ENABLE_BIT - //| GL_FOG_BIT - //| GL_PIXEL_MODE_BIT - //| GL_SCISSOR_BIT - //| GL_STENCIL_BUFFER_BIT - //| GL_TEXTURE_BIT - //GL_VIEWPORT_BIT - //; - - if (gl_radar7954721_workaround_all.GetInt()!=0) - { - gGL->glPushAttrib( pushmask ); - pushed++; - } - else - { - bool srcGamma = (srcTex->m_layout->m_key.m_texFlags & kGLMTexSRGB) != 0; - bool dstGamma = (dstTex->m_layout->m_key.m_texFlags & kGLMTexSRGB) != 0; - - if (srcGamma != dstGamma) - { - if (gl_radar7954721_workaround_mixed.GetInt()) - { - gGL->glPushAttrib( pushmask ); - pushed++; - } - } - } - if (useBlitFB) { // state we need to save @@ -1354,8 +1323,7 @@ void GLMContext::BlitTex( CGLMTex *srcTex, GLMRect *srcRect, int srcFace, int sr attparams.m_zslice = 0; m_blitReadFBO->TexAttach( &attparams, attachIndex, GL_READ_FRAMEBUFFER ); - gGL->glReadBuffer( attachIndexGL ); - + gGL->glDrawBuffers( 1, &attachIndexGL ); // set the write fb and buffer, and attach write tex BindFBOToCtx( m_blitDrawFBO, GL_DRAW_FRAMEBUFFER ); @@ -1366,7 +1334,7 @@ void GLMContext::BlitTex( CGLMTex *srcTex, GLMRect *srcRect, int srcFace, int sr attparams.m_zslice = 0; m_blitDrawFBO->TexAttach( &attparams, attachIndex, GL_DRAW_FRAMEBUFFER ); - gGL->glDrawBuffer( attachIndexGL ); + gGL->glDrawBuffers( 1, &attachIndexGL ); // do the blit gGL->glBlitFramebuffer( srcRect->xmin, srcRect->ymin, srcRect->xmax, srcRect->ymax, @@ -1425,8 +1393,8 @@ void GLMContext::BlitTex( CGLMTex *srcTex, GLMRect *srcRect, int srcFace, int sr attparams.m_zslice = 0; m_blitDrawFBO->TexAttach( &attparams, attachIndex, GL_DRAW_FRAMEBUFFER ); - gGL->glDrawBuffer( attachIndexGL ); - + gGL->glDrawBuffers( 1, &attachIndexGL ); + // attempt to just set states directly the way we want them, then use the latched states to repair them afterward. NullProgram(); // out of program mode @@ -1456,25 +1424,24 @@ void GLMContext::BlitTex( CGLMTex *srcTex, GLMRect *srcRect, int srcFace, int sr // immediate mode is fine +#if 0 // Does it needed? const float topv = 1.0; const float botv = 0.0; const float verts[] = {-1.f, -1.f, 1.f, -1.f, 1.f, 1.f, -1.f, 1.f}; - const float verts_tex[] = {0.f, botv, 1.f, botv, 1.f, topv, 0.f, topv}; - - gGL->glEnableClientState(GL_VERTEX_ARRAY); - gGL->glEnableClientState(GL_TEXTURE_COORD_ARRAY); - + const float verts_tex[] = {0.f, botv, 1.f, botv, 1.f, topv, 0.f, topv}; + gGL->glVertexPointer(2, GL_FLOAT, 0, verts); gGL->glTexCoordPointer(2, GL_FLOAT, 0, verts_tex); - glDrawArrays(GL_TRIANGLE_FAN, 0, 4); + gGL->glDrawArrays(GL_TRIANGLE_FAN, 0, 4); gGL->glDisableClientState(GL_VERTEX_ARRAY); gGL->glDisableClientState(GL_TEXTURE_COORD_ARRAY); - +#endif + gGL->glBindTexture( GL_TEXTURE_2D, 0 ); - + gGL->glDisable(GL_TEXTURE_2D); BindTexToTMU( m_samplers[0].m_pBoundTex, 0 ); @@ -1509,12 +1476,6 @@ void GLMContext::BlitTex( CGLMTex *srcTex, GLMRect *srcRect, int srcFace, int sr BindFBOToCtx( m_drawingFBO, GL_FRAMEBUFFER ); } - while(pushed) - { - gGL->glPopAttrib(); - pushed--; - } - RestoreSavedColorMask(); } @@ -1632,7 +1593,7 @@ void GLMContext::ResolveTex( CGLMTex *tex, bool forceDirty ) gGL->glFramebufferTexture2D( GL_DRAW_FRAMEBUFFER, attachIndexGL, GL_TEXTURE_2D, tex->m_texName, 0 ); } - gGL->glDrawBuffer( attachIndexGL ); + gGL->glDrawBuffers( 1, &attachIndexGL ); //----------------------------------------------------------------------------------- @@ -2369,10 +2330,6 @@ void GLMContext::Present( CGLMTex *tex ) tmMessage( TELEMETRY_LEVEL2, TMMF_ICON_EXCLAMATION, "VS Uniform Calls: %u, VS Uniforms: %u|VS Uniform Bone Calls: %u, VS Bone Uniforms: %u|PS Uniform Calls: %u, PS Uniforms: %u", m_nTotalVSUniformCalls, m_nTotalVSUniformsSet, m_nTotalVSUniformBoneCalls, m_nTotalVSUniformsBoneSet, m_nTotalPSUniformCalls, m_nTotalPSUniformsSet ); m_nTotalVSUniformCalls = 0, m_nTotalVSUniformBoneCalls = 0, m_nTotalVSUniformsSet = 0, m_nTotalVSUniformsBoneSet = 0, m_nTotalPSUniformCalls = 0, m_nTotalPSUniformsSet = 0; #endif - -#ifndef OSX - GLMGPUTimestampManagerTick(); -#endif } //=============================================================================== @@ -2845,7 +2802,6 @@ void GLMContext::BindTexToTMU( CGLMTex *pTex, int tmu ) if ( !pTex ) { - gGL->glBindTexture( GL_TEXTURE_1D, 0 ); gGL->glBindTexture( GL_TEXTURE_2D, 0 ); gGL->glBindTexture( GL_TEXTURE_3D, 0 ); gGL->glBindTexture( GL_TEXTURE_CUBE_MAP, 0 ); @@ -2853,7 +2809,6 @@ void GLMContext::BindTexToTMU( CGLMTex *pTex, int tmu ) else { const GLenum texGLTarget = pTex->m_texGLTarget; - if ( texGLTarget != GL_TEXTURE_1D ) gGL->glBindTexture( GL_TEXTURE_1D, 0 ); if ( texGLTarget != GL_TEXTURE_2D ) gGL->glBindTexture( GL_TEXTURE_2D, 0 ); if ( texGLTarget != GL_TEXTURE_3D ) gGL->glBindTexture( GL_TEXTURE_3D, 0 ); if ( texGLTarget != GL_TEXTURE_CUBE_MAP ) gGL->glBindTexture( GL_TEXTURE_CUBE_MAP, 0 ); @@ -3006,11 +2961,11 @@ void GLMContext::CleanupTex( GLenum texBind, GLMTexLayout* pLayout, GLuint tex ) const int dataSize = ( chunks * chunks ) * pLayout->m_format->m_bytesPerSquareChunk; Assert( dataSize <= ( sizeof( uint32) * ARRAYSIZE( g_garbageTextureBits ) ) ); - gGL->glCompressedTexImage2D( texBind, i, pLayout->m_format->m_glIntFormat, mipDim, mipDim, 0, dataSize, 0 ); + CompressedTexImage2D( texBind, i, pLayout->m_format->m_glIntFormat, mipDim, mipDim, 0, dataSize, 0 ); } else { - gGL->glTexImage2D( texBind, i, pLayout->m_format->m_glIntFormat, mipDim, mipDim, 0, pLayout->m_format->m_glDataFormat, pLayout->m_format->m_glDataType, 0 ); + TexImage2D( texBind, i, pLayout->m_format->m_glIntFormat, mipDim, mipDim, 0, pLayout->m_format->m_glDataFormat, pLayout->m_format->m_glDataType, 0 ); } } @@ -4412,8 +4367,7 @@ void GLMContext::DebugHook( GLMDebugHookInfo *info ) break; case 2: - short fakecolor[4] = { 0, 0, 0, 0 }; - gGL->glColor4sv( fakecolor ); // break to OGLP + // What the fuck? break; } // re-flush all GLM states so you can fiddle with them in the debugger. then run the batch again and spin.. @@ -4766,36 +4720,11 @@ void GLMContext::DrawDebugText( float x, float y, float z, float drawCharWidth, gGL->glEnable(GL_TEXTURE_2D); - if (0) - { - gGL->glEnableClientState(GL_VERTEX_ARRAY); - - gGL->glEnableClientState(GL_TEXTURE_COORD_ARRAY); - - gGL->glVertexPointer( 3, GL_FLOAT, sizeof( vtx[0] ), &vtx[0].x ); - - gGL->glClientActiveTexture(GL_TEXTURE0); - - gGL->glTexCoordPointer( 2, GL_FLOAT, sizeof( vtx[0] ), &vtx[0].u ); - } - else - { - SetVertexAttributes( &vertSetup ); - } + SetVertexAttributes( &vertSetup ); gGL->glDrawArrays( GL_QUADS, 0, stringlen * 4 ); - // disable all the input streams - if (0) - { - gGL->glDisableClientState(GL_VERTEX_ARRAY); - - gGL->glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } - else - { - SetVertexAttributes( NULL ); - } + SetVertexAttributes( NULL ); gGL->glDisable(GL_TEXTURE_2D); @@ -5288,7 +5217,7 @@ void GLMTester::StdSetup( void ) gGL->glScissor( 0,0, (GLsizei) m_drawWidth, (GLsizei) m_drawHeight ); CheckGLError("stdsetup scissor"); - gGL->glOrtho( -1,1, -1,1, -1,1 ); + //gGL->glOrtho( -1,1, -1,1, -1,1 ); CheckGLError("stdsetup ortho"); // activate debug font @@ -5331,7 +5260,7 @@ void GLMTester::Clear( void ) gGL->glViewport(0, 0, (GLsizei) m_drawWidth, (GLsizei) m_drawHeight ); gGL->glScissor( 0,0, (GLsizei) m_drawWidth, (GLsizei) m_drawHeight ); - gGL->glOrtho( -1,1, -1,1, -1,1 ); + //gGL->glOrtho( -1,1, -1,1, -1,1 ); CheckGLError("clearing viewport"); // clear to black @@ -6000,7 +5929,9 @@ void GLMTester::Test3( void ) void GLMTriggerDebuggerBreak() { // we call an obscure GL function which we know has been breakpointed in the OGLP function list - static signed short nada[] = { -1,-1,-1,-1 }; - gGL->glColor4sv( nada ); + +// What the fuck is that? +// static signed short nada[] = { -1,-1,-1,-1 }; +// gGL->glColor4sv( nada ); } #endif diff --git a/togles/linuxwin/glmgr_flush.inl b/togles/linuxwin/glmgr_flush.inl index fcddd616..6061dfde 100644 --- a/togles/linuxwin/glmgr_flush.inl +++ b/togles/linuxwin/glmgr_flush.inl @@ -1,5 +1,7 @@ // BE VERY VERY CAREFUL what you do in these function. They are extremely hot, and calling the wrong GL API's in here will crush perf. (especially on NVidia threaded drivers). +#include "togles/linuxwin/glmgr.h" + FORCEINLINE uint32 bitmix32(uint32 a) { a -= (a<<6); @@ -433,7 +435,6 @@ FORCEINLINE void GLMContext::FlushDrawStates( uint nStartIndex, uint nEndIndex, } } - // see if VS uses i0, b0, b1, b2, b3. // use a glUniform1i to set any one of these if active. skip all of them if no dirties reported. // my kingdom for the UBO extension! @@ -478,6 +479,15 @@ FORCEINLINE void GLMContext::FlushDrawStates( uint nStartIndex, uint nEndIndex, } } + + if( m_pBoundPair->m_locAlphaRef ) + { + if( !m_AlphaTestEnable.GetData().enable ) + gGL->glUniform1f( m_pBoundPair->m_locAlphaRef, 0.0 ); + else + gGL->glUniform1f( m_pBoundPair->m_locAlphaRef, m_AlphaTestFunc.GetData().ref ); + } + Assert( ( m_pDevice->m_streams[0].m_vtxBuffer && ( m_pDevice->m_streams[0].m_vtxBuffer->m_vtxBuffer == m_pDevice->m_vtx_buffers[0] ) ) || ( ( !m_pDevice->m_streams[0].m_vtxBuffer ) && ( m_pDevice->m_vtx_buffers[0] == m_pDevice->m_pDummy_vtx_buffer ) ) ); Assert( ( m_pDevice->m_streams[1].m_vtxBuffer && ( m_pDevice->m_streams[1].m_vtxBuffer->m_vtxBuffer == m_pDevice->m_vtx_buffers[1] ) ) || ( ( !m_pDevice->m_streams[1].m_vtxBuffer ) && ( m_pDevice->m_vtx_buffers[1] == m_pDevice->m_pDummy_vtx_buffer ) ) ); Assert( ( m_pDevice->m_streams[2].m_vtxBuffer && ( m_pDevice->m_streams[2].m_vtxBuffer->m_vtxBuffer == m_pDevice->m_vtx_buffers[2] ) ) || ( ( !m_pDevice->m_streams[2].m_vtxBuffer ) && ( m_pDevice->m_vtx_buffers[2] == m_pDevice->m_pDummy_vtx_buffer ) ) ); diff --git a/togles/linuxwin/glmgrbasics.cpp b/togles/linuxwin/glmgrbasics.cpp index ce1584ec..fb408dda 100644 --- a/togles/linuxwin/glmgrbasics.cpp +++ b/togles/linuxwin/glmgrbasics.cpp @@ -3116,624 +3116,13 @@ void GLMSetIndent( int indent ) char sg_pPIXName[128]; -#ifndef OSX -ConVar gl_telemetry_gpu_pipeline_flushing( "gl_telemetry_gpu_pipeline_flushing", "0" ); - -class CGPUTimestampManager -{ - CGPUTimestampManager( const CGPUTimestampManager & ); - CGPUTimestampManager& operator= ( CGPUTimestampManager & ); - -public: - CGPUTimestampManager() : - m_bInitialized( false ), - m_nCurFrame( 0 ), - m_flGPUToCPUOffsetInS( 0 ), - m_flGPUToS( 0 ), - m_flRdtscToS( 0 ), - m_flSToRdtsc( 0 ), - m_nFreeQueryPoolSize( 0 ), - m_nOutstandingQueriesHead( 0 ), - m_nOutstandingQueriesTail( 0 ), - m_nNumOutstandingQueryZones( 0 ), - m_nQueryZoneStackSize( 0 ), - m_nNumFinishedZones( 0 ), - m_nTotalSpanWorkCount( 0 ) - { - memset( m_FreeQueryPool, 0, sizeof( m_FreeQueryPool ) ) ; - memset( m_QueryZoneStack, 0, sizeof( m_QueryZoneStack ) ); - memset( m_OutstandingQueryZones, 0, sizeof( m_OutstandingQueryZones ) ); - memset( m_FinishedZones, 0, sizeof( m_FinishedZones ) ); - } - - ~CGPUTimestampManager() - { - Deinit(); - } - - inline bool IsInitialized() const { return m_bInitialized; } - inline uint GetCurFrame() const { return m_nCurFrame; } - - void Init() - { - Deinit(); - - memset( m_FreeQueryPool, 0, sizeof( m_FreeQueryPool ) ) ; - memset( m_QueryZoneStack, 0, sizeof( m_QueryZoneStack ) ); - memset( m_OutstandingQueryZones, 0, sizeof( m_OutstandingQueryZones ) ); - memset( m_FinishedZones, 0, sizeof( m_FinishedZones ) ); - - InitRdtsc(); - - m_nCurFrame = 0; - - gGL->glGenQueries( cFreeQueryPoolSize, m_FreeQueryPool ); - m_nFreeQueryPoolSize = cFreeQueryPoolSize; - - m_nOutstandingQueriesHead = 0; - m_nOutstandingQueriesTail = 0; - m_nNumOutstandingQueryZones = 0; - - m_nQueryZoneStackSize = 0; - m_nNumFinishedZones = 0; - - m_bInitialized = true; - - m_nTotalSpanWorkCount = 0; - - Calibrate(); - } - - void Calibrate() - { - if ( !m_bInitialized ) - return; - - PipelineFlush(); - - m_flGPUToS = 1.0 / 1000000000.0; - - //0.99997541250006794; - //0.99997530000006662; - // Correction factor to prevent excessive drift, only calibrated on my system, we need a better way of computing/recording this. - double flGPURatio = 0.99997425000007034000; - - const uint NT = 1; - for ( uint nTrial = 0; nTrial < NT; nTrial++ ) - { - const uint R = 16; - double flClockOffsetsInS[R]; - for ( uint q = 0; q < R; q++) - { - uint64 nBestTotalCPUTimestamp = (uint64)-1; - uint64 nBestCPUTimestamp = 0; - GLuint64 nBestGPUTimestamp = 0; - - for ( uint i = 0; i < 10; i++) - { - const uint64 nStartCPUTimestamp = Plat_Rdtsc(); - - gGL->glQueryCounter( m_FreeQueryPool[0], GL_TIMESTAMP); - PipelineFlush(); - - const uint64 nEndCPUTimestamp = Plat_Rdtsc(); - - GLint nAvailable; - do - { - gGL->glGetQueryObjectiv( m_FreeQueryPool[0], GL_QUERY_RESULT_AVAILABLE, &nAvailable ); - } while ( !nAvailable ); - - GLuint64 nGPUTimestamp; - gGL->glGetQueryObjectui64v( m_FreeQueryPool[0], GL_QUERY_RESULT, &nGPUTimestamp ); - - const uint64 nTotalCPUTimestamp = nEndCPUTimestamp - nStartCPUTimestamp; - if ( nTotalCPUTimestamp < nBestTotalCPUTimestamp ) - { - nBestTotalCPUTimestamp = nTotalCPUTimestamp; - nBestCPUTimestamp = nStartCPUTimestamp; - nBestGPUTimestamp = nGPUTimestamp; - } - } - - double flCPUTimestampTimeInSeconds = nBestCPUTimestamp * m_flRdtscToS; - double flGPUTimestampTimeInSeconds = nBestGPUTimestamp * m_flGPUToS * flGPURatio; - - flClockOffsetsInS[q] = flCPUTimestampTimeInSeconds - flGPUTimestampTimeInSeconds; - - ThreadSleep(100); - - DbgPrintf("%f %f %1.20f\n", flCPUTimestampTimeInSeconds, flGPUTimestampTimeInSeconds, flClockOffsetsInS[q] ); - } - - m_flGPUToCPUOffsetInS = 0.0f; - for ( uint i = 0; i < R; i++ ) - m_flGPUToCPUOffsetInS += flClockOffsetsInS[i]; - m_flGPUToCPUOffsetInS /= R; - - if ( NT > 1 ) - { - DbgPrintf("------- Ratio: %2.20f\n", flGPURatio ); - - double flDelta = flClockOffsetsInS[0] - flClockOffsetsInS[R - 1]; - - DbgPrintf("------- %1.20f\n", flDelta ); - -#if 1 - if ( flDelta < 0.0000005f ) - { - flGPURatio += .000000125f; - } - else if ( flDelta > 0.0000005f ) - { - flGPURatio -= .000000125f; - } -#else - if ( flDelta < 0.0000005f ) - { - flGPURatio += .0000000125f; - } - else if ( flDelta > 0.0000005f ) - { - flGPURatio -= .0000000125f; - } -#endif - } - } - - m_flGPUToS *= flGPURatio; - -#if 0 - // dump drift over time to debugger output - double flLatency = 0; - for ( ; ; ) - { - // test - const uint64 nStartCPUTime = Plat_Rdtsc(); - - gGL->glQueryCounter( m_FreeQueryPool[0], GL_TIMESTAMP); - - PipelineFlush(); - - GLint nAvailable; - do - { - gGL->glGetQueryObjectiv( m_FreeQueryPool[0], GL_QUERY_RESULT_AVAILABLE, &nAvailable ); - } while ( !nAvailable ); - - GLuint64 nGPUTime; - gGL->glGetQueryObjectui64v( m_FreeQueryPool[0], GL_QUERY_RESULT, &nGPUTime ); - - double flStartGPUTime = ( ( nGPUTime * m_flGPUToS ) + m_flGPUToCPUOffsetInS ); - - flLatency = flStartGPUTime - nStartCPUTime * m_flRdtscToS; - DbgPrintf("%f\n", flLatency ); - } -#endif - } - - void Deinit() - { - if ( !m_bInitialized ) - return; - - if ( m_nFreeQueryPoolSize ) - { - gGL->glDeleteQueries( m_nFreeQueryPoolSize, m_FreeQueryPool ); - } - m_nFreeQueryPoolSize = 0; - - for ( uint i = 0; i < m_nNumOutstandingQueryZones; i++ ) - { - QueryZone_t &query = m_OutstandingQueryZones[ ( m_nOutstandingQueriesHead + i ) % cMaxQueryZones ]; - if ( query.m_nBeginQuery ) - { - gGL->glDeleteQueries( 1, &query.m_nBeginQuery ); - } - if ( query.m_nEndQuery ) - { - gGL->glDeleteQueries( 1, &query.m_nEndQuery ); - } - } - m_nOutstandingQueriesHead = 0; - m_nOutstandingQueriesTail = 0; - m_nNumOutstandingQueryZones = 0; - - for ( uint i = 0; i < m_nQueryZoneStackSize; i++ ) - { - QueryZone_t &query = m_QueryZoneStack[i]; - if ( query.m_nBeginQuery ) - { - gGL->glDeleteQueries( 1, &query.m_nBeginQuery ); - } - if ( query.m_nEndQuery ) - { - gGL->glDeleteQueries( 1, &query.m_nEndQuery ); - } - } - m_nQueryZoneStackSize = 0; - - m_flGPUToCPUOffsetInS = 0; - m_flGPUToS = 0; - m_flRdtscToS = 0; - m_flSToRdtsc = 0; - - m_bInitialized = false; - } - - // pName is assumed to be a telemetry dynamic string! - void BeginZone( const char *pName ) - { - if ( !m_bInitialized ) - return; - - if ( m_nQueryZoneStackSize >= cMaxQueryZoneStackSize ) - { - Panic( "Increase cMaxQueryZoneStackSize!" ); - } - - QueryZone_t &zone = m_QueryZoneStack[m_nQueryZoneStackSize]; - - zone.m_pName = pName; - - zone.m_nBeginQuery = AllocQueryHandle(); - zone.m_nEndQuery = 0; - zone.m_nStackLevel = m_nQueryZoneStackSize; - - zone.m_nTotalGPUWorkCount = g_nTotalDrawsOrClears; -#if GL_TELEMETRY_GPU_ZONES - zone.m_nTotalGPUWorkCount += g_TelemetryGPUStats.GetTotal(); -#endif - - gGL->glQueryCounter( m_QueryZoneStack[m_nQueryZoneStackSize].m_nBeginQuery, GL_TIMESTAMP ); - - m_nQueryZoneStackSize++; - } - - void EndZone() - { - if ( !m_bInitialized ) - return; - - if ( ( !m_nQueryZoneStackSize ) || ( m_nNumOutstandingQueryZones == cMaxQueryZones ) ) - { - Panic( "Query zone error!" ); - } - - m_nQueryZoneStackSize--; - - uint nCurGPUWorkCount = g_nTotalDrawsOrClears; -#if GL_TELEMETRY_GPU_ZONES - nCurGPUWorkCount += g_TelemetryGPUStats.GetTotal(); -#endif - - uint nTotalDraws = nCurGPUWorkCount - m_QueryZoneStack[m_nQueryZoneStackSize].m_nTotalGPUWorkCount; - - m_QueryZoneStack[m_nQueryZoneStackSize].m_nEndQuery = AllocQueryHandle(); - gGL->glQueryCounter( m_QueryZoneStack[m_nQueryZoneStackSize].m_nEndQuery, GL_TIMESTAMP ); - m_QueryZoneStack[m_nQueryZoneStackSize].m_nTotalGPUWorkCount = nTotalDraws; - - m_OutstandingQueryZones[m_nOutstandingQueriesHead] = m_QueryZoneStack[m_nQueryZoneStackSize]; - m_nOutstandingQueriesHead = ( m_nOutstandingQueriesHead + 1 ) % cMaxQueryZones; - m_nNumOutstandingQueryZones++; - - COMPILE_TIME_ASSERT( ( int )cMaxQueryZones > ( int )cMaxQueryZoneStackSize ); - if ( m_nNumOutstandingQueryZones >= ( cMaxQueryZones - cMaxQueryZoneStackSize ) ) - { - tmMessage( TELEMETRY_LEVEL2, TMMF_ICON_NOTE | TMMF_SEVERITY_WARNING, "CGPUTimestampManager::EndZone: Too many outstanding query zones - forcing a pipeline flush! This is probably expensive." ); - - FlushOutstandingQueries( true ); - } - - if ( gl_telemetry_gpu_pipeline_flushing.GetBool() ) - { - PipelineFlush(); - } - } - - void Tick() - { - m_nCurFrame++; - - if ( !m_bInitialized ) - return; - - if ( m_nQueryZoneStackSize > 0 ) - { - Panic( "Zone stack is not empty!" ); - } - - FlushOutstandingQueries( false ); - - tmMessage( TELEMETRY_LEVEL2, 0, "Total PIX timespan GPU work count: %u", m_nTotalSpanWorkCount ); - - m_nTotalSpanWorkCount = 0; - } - - void FlushOutstandingQueries( bool bForce ) - { - tmZone( TELEMETRY_LEVEL2, 0, "FlushOutstandingQueries: %u", m_nNumOutstandingQueryZones ); - - if ( bForce ) - { - PipelineFlush(); - } - - while ( m_nNumOutstandingQueryZones ) - { - QueryZone_t &zone = m_OutstandingQueryZones[m_nOutstandingQueriesTail]; - - GLint nEndAvailable = 0; - do - { - gGL->glGetQueryObjectiv( zone.m_nEndQuery, GL_QUERY_RESULT_AVAILABLE, &nEndAvailable ); - - } while ( ( bForce ) && ( nEndAvailable == 0 ) ); - - if ( !nEndAvailable ) - { - if ( bForce ) - { - Panic( "Query results not available after a full pipeline flush!" ); - } - break; - } - - GLuint64 nBeginGPUTime, nEndGPUTime; - gGL->glGetQueryObjectui64v( zone.m_nBeginQuery, GL_QUERY_RESULT, &nBeginGPUTime ); - gGL->glGetQueryObjectui64v( zone.m_nEndQuery, GL_QUERY_RESULT, &nEndGPUTime ); - - ReleaseQueryHandle( zone.m_nBeginQuery ); - zone.m_nBeginQuery = 0; - - ReleaseQueryHandle( zone.m_nEndQuery ); - zone.m_nEndQuery = 0; - - if ( m_nNumFinishedZones >= cMaxQueryZones ) - { - Panic( "Too many finished zones!" ); - } - - FinishedQueryZone_t &finishedZone = m_FinishedZones[m_nNumFinishedZones]; - finishedZone.m_pName = zone.m_pName; - finishedZone.m_nBeginGPUTime = nBeginGPUTime; - finishedZone.m_nEndGPUTime = nEndGPUTime; - finishedZone.m_nStackLevel = zone.m_nStackLevel; - finishedZone.m_nTotalGPUWorkCount = zone.m_nTotalGPUWorkCount; - m_nNumFinishedZones++; - - if ( !zone.m_nStackLevel ) - { - std::sort( m_FinishedZones, m_FinishedZones + m_nNumFinishedZones ); - FlushFinishedZones(); - m_nNumFinishedZones = 0; - } - - m_nOutstandingQueriesTail = ( m_nOutstandingQueriesTail + 1 ) % cMaxQueryZones; - m_nNumOutstandingQueryZones--; - } - } - -private: - bool m_bInitialized; - uint m_nCurFrame; - - double m_flGPUToCPUOffsetInS; - double m_flGPUToS; - double m_flRdtscToS; - double m_flSToRdtsc; - - enum { cMaxQueryZones = 4096, cFreeQueryPoolSize = cMaxQueryZones * 2 }; - GLuint m_FreeQueryPool[cFreeQueryPoolSize ]; - uint m_nFreeQueryPoolSize; - - GLuint AllocQueryHandle() - { - if ( !m_nFreeQueryPoolSize ) - { - Panic( "Out of query handles!"); - } - return m_FreeQueryPool[--m_nFreeQueryPoolSize]; - } - - void ReleaseQueryHandle( GLuint nHandle ) - { - if ( m_nFreeQueryPoolSize >= cFreeQueryPoolSize ) - { - Panic( "Query handle error!" ); - } - m_FreeQueryPool[m_nFreeQueryPoolSize++] = nHandle; - } - - struct QueryZone_t - { - const char *m_pName; - GLuint m_nBeginQuery; - GLuint m_nEndQuery; - uint m_nStackLevel; - uint m_nTotalGPUWorkCount; - }; - - QueryZone_t m_OutstandingQueryZones[cMaxQueryZones]; - uint m_nOutstandingQueriesHead; // index of first outstanding query (oldest) - uint m_nOutstandingQueriesTail; // index where next query goes (newest) - uint m_nNumOutstandingQueryZones; - - enum { cMaxQueryZoneStackSize = 256 }; - QueryZone_t m_QueryZoneStack[cMaxQueryZoneStackSize]; - uint m_nQueryZoneStackSize; - - struct FinishedQueryZone_t - { - const char *m_pName; - GLuint64 m_nBeginGPUTime; - GLuint64 m_nEndGPUTime; - uint m_nStackLevel; - uint m_nTotalGPUWorkCount; - - inline bool operator< ( const FinishedQueryZone_t &rhs ) const - { - if ( m_nBeginGPUTime == rhs.m_nBeginGPUTime) - return m_nStackLevel < rhs.m_nStackLevel; - - return m_nBeginGPUTime < rhs.m_nBeginGPUTime; - } - }; - - FinishedQueryZone_t m_FinishedZones[cMaxQueryZones]; - uint m_nNumFinishedZones; - - uint m_nTotalSpanWorkCount; - - void InitRdtsc() - { - m_flRdtscToS = 0.0f; - m_flSToRdtsc = 0.0f; - - for ( uint i = 0; i < 10; i++ ) - { - uint64 t0 = Plat_Rdtsc(); - double d0 = Plat_FloatTime(); - - ThreadSleep( 250 ); - - uint64 t1 = Plat_Rdtsc(); - double d1 = Plat_FloatTime(); - - double flRdtscToS = ( d1 - d0 ) / ( t1 - t0 ); - double flSToRdtsc = ( t1 - t0 ) / ( d1 - d0 ); - if ( flSToRdtsc > m_flSToRdtsc ) - { - m_flRdtscToS = flRdtscToS; - m_flSToRdtsc = flSToRdtsc; - } - } - } - - void PipelineFlush() - { -#ifdef HAVE_GL_ARB_SYNC - GLsync nSyncObj = gGL->glFenceSync( GL_SYNC_GPU_COMMANDS_COMPLETE, 0 ); - if ( nSyncObj ) - { - gGL->glClientWaitSync( nSyncObj, GL_SYNC_FLUSH_COMMANDS_BIT, 300000000000ULL ); - gGL->glDeleteSync( nSyncObj ); - } -#endif - } - - inline void NewTimeSpan( uint64 nStartGPUTime, uint64 nEndGPUTime, const char *pName, uint nTotalDraws ) - { - // apparently we must use level0 for timespans? - tmBeginTimeSpanAt( TELEMETRY_LEVEL0, 1, 0, nStartGPUTime, "%s [C:%u]", pName ? pName : "", nTotalDraws ); - tmEndTimeSpanAt( TELEMETRY_LEVEL0, 1, 0, nEndGPUTime, "%s [C:%u]", pName ? pName : "", nTotalDraws ); - } - - void FlushFinishedZones() - { - for ( uint i = 0; i < m_nNumFinishedZones; i++ ) - { - FinishedQueryZone_t &zone = m_FinishedZones[i]; - if ( !zone.m_nTotalGPUWorkCount ) - continue; - - bool bEmit = false; - if ( i == ( m_nNumFinishedZones - 1 ) ) - bEmit = true; - else - { - FinishedQueryZone_t &nextZone = m_FinishedZones[i + 1]; - bEmit = zone.m_nEndGPUTime <= nextZone.m_nBeginGPUTime; - } - - if ( bEmit ) - { - uint64 nStartGPUTime = ( ( zone.m_nBeginGPUTime * m_flGPUToS ) + m_flGPUToCPUOffsetInS ) * m_flSToRdtsc; - uint64 nEndGPUTime = ( ( zone.m_nEndGPUTime * m_flGPUToS ) + m_flGPUToCPUOffsetInS ) * m_flSToRdtsc; - - NewTimeSpan( nStartGPUTime, nEndGPUTime, zone.m_pName, zone.m_nTotalGPUWorkCount ); - - m_nTotalSpanWorkCount += zone.m_nTotalGPUWorkCount; - } - } - } - - void Panic( const char *pMsg ) - { - DXABSTRACT_BREAK_ON_ERROR(); - Error( "%s", pMsg ); - } - - static void DbgPrintf( const char *pFmt, ... ) - { - va_list vargs; - va_start( vargs, pFmt ); - char buf[1024]; - V_vsnprintf( buf, sizeof( buf ), pFmt, vargs ); - -#ifdef WIN32 - OutputDebugStringA( buf ); -#else - printf( "%s", buf ); -#endif - - va_end( vargs ); - } -}; - - -static CGPUTimestampManager g_GPUTimestampManager; - -void GLMGPUTimestampManagerInit() -{ - g_GPUTimestampManager.Init(); -} - -void GLMGPUTimestampManagerDeinit() -{ - g_GPUTimestampManager.Deinit(); -} - ConVar gl_telemetry_gpu( "gl_telemetry_gpu", "0" ); static bool g_bPrevTelemetryGPU; -void GLMGPUTimestampManagerTick() -{ - if ( g_bPrevTelemetryGPU != gl_telemetry_gpu.GetBool() ) - { - if ( !gl_telemetry_gpu.GetBool() ) - g_GPUTimestampManager.Deinit(); - else - { -#if !PIX_ENABLE || !GL_TELEMETRY_GPU_ZONES - ConMsg( "Must define PIX_ENABLE and GL_TELEMETRY_GPU_ZONES to use this feature" ); -#else - g_GPUTimestampManager.Init(); -#endif - } - - g_bPrevTelemetryGPU = gl_telemetry_gpu.GetBool(); - } - - g_GPUTimestampManager.Tick(); -} - -#endif // !OSX - static uint g_nPIXEventIndex; void GLMBeginPIXEvent( const char *str ) { -#ifndef OSX - char szName[1024]; - V_snprintf( szName, sizeof( szName ), "[ID:%u FR:%u] %s", g_nPIXEventIndex, g_GPUTimestampManager.GetCurFrame(), str ); - const char *p = tmDynamicString( TELEMETRY_LEVEL2, szName ); //p can be null if tm is getting shut down - tmEnter( TELEMETRY_LEVEL2, TMZF_NONE, "PIX %s", p ? p : "" ); - - g_nPIXEventIndex++; - - g_GPUTimestampManager.BeginZone( p ); -#endif // !OSX V_strncpy( sg_pPIXName, str, 128 ); #if defined( OSX ) && defined( CGLPROFILER_ENABLE ) @@ -3748,10 +3137,6 @@ void GLMBeginPIXEvent( const char *str ) void GLMEndPIXEvent( void ) { -#ifndef OSX - g_GPUTimestampManager.EndZone(); -#endif - #if defined( OSX ) && defined( CGLPROFILER_ENABLE ) CGLSetOption( kCGLGOComment, (GLint)sg_pPIXName ); #endif diff --git a/togles/linuxwin/stb_dxt_104.h b/togles/linuxwin/stb_dxt_104.h new file mode 100644 index 00000000..bec72798 --- /dev/null +++ b/togles/linuxwin/stb_dxt_104.h @@ -0,0 +1,624 @@ +// stb_dxt.h - v1.04 - DXT1/DXT5 compressor - public domain +// original by fabian "ryg" giesen - ported to C by stb +// use '#define STB_DXT_IMPLEMENTATION' before including to create the implementation +// +// USAGE: +// call stb_compress_dxt_block() for every block (you must pad) +// source should be a 4x4 block of RGBA data in row-major order; +// A is ignored if you specify alpha=0; you can turn on dithering +// and "high quality" using mode. +// +// version history: +// v1.04 - (ryg) default to no rounding bias for lerped colors (as per S3TC/DX10 spec); +// single color match fix (allow for inexact color interpolation); +// optimal DXT5 index finder; "high quality" mode that runs multiple refinement steps. +// v1.03 - (stb) endianness support +// v1.02 - (stb) fix alpha encoding bug +// v1.01 - (stb) fix bug converting to RGB that messed up quality, thanks ryg & cbloom +// v1.00 - (stb) first release + +#ifndef STB_INCLUDE_STB_DXT_H +#define STB_INCLUDE_STB_DXT_H + +// compression mode (bitflags) +#define STB_DXT_NORMAL 0 +#define STB_DXT_DITHER 1 // use dithering. dubious win. never use for normal maps and the like! +#define STB_DXT_HIGHQUAL 2 // high quality mode, does two refinement steps instead of 1. ~30-40% slower. + +void stb_compress_dxt_block(unsigned char *dest, const unsigned char *src, int alpha, int mode); +#define STB_COMPRESS_DXT_BLOCK + +#ifdef STB_DXT_IMPLEMENTATION + +// configuration options for DXT encoder. set them in the project/makefile or just define +// them at the top. + +// STB_DXT_USE_ROUNDING_BIAS +// use a rounding bias during color interpolation. this is closer to what "ideal" +// interpolation would do but doesn't match the S3TC/DX10 spec. old versions (pre-1.03) +// implicitly had this turned on. +// +// in case you're targeting a specific type of hardware (e.g. console programmers): +// NVidia and Intel GPUs (as of 2010) as well as DX9 ref use DXT decoders that are closer +// to STB_DXT_USE_ROUNDING_BIAS. AMD/ATI, S3 and DX10 ref are closer to rounding with no bias. +// you also see "(a*5 + b*3) / 8" on some old GPU designs. +// #define STB_DXT_USE_ROUNDING_BIAS + +#include +#include +#include // memset + +static unsigned char stb__Expand5[32]; +static unsigned char stb__Expand6[64]; +static unsigned char stb__OMatch5[256][2]; +static unsigned char stb__OMatch6[256][2]; +static unsigned char stb__QuantRBTab[256+16]; +static unsigned char stb__QuantGTab[256+16]; + +static int stb__Mul8Bit(int a, int b) +{ + int t = a*b + 128; + return (t + (t >> 8)) >> 8; +} + +static void stb__From16Bit(unsigned char *out, unsigned short v) +{ + int rv = (v & 0xf800) >> 11; + int gv = (v & 0x07e0) >> 5; + int bv = (v & 0x001f) >> 0; + + out[0] = stb__Expand5[rv]; + out[1] = stb__Expand6[gv]; + out[2] = stb__Expand5[bv]; + out[3] = 0; +} + +static unsigned short stb__As16Bit(int r, int g, int b) +{ + return (stb__Mul8Bit(r,31) << 11) + (stb__Mul8Bit(g,63) << 5) + stb__Mul8Bit(b,31); +} + +// linear interpolation at 1/3 point between a and b, using desired rounding type +static int stb__Lerp13(int a, int b) +{ +#ifdef STB_DXT_USE_ROUNDING_BIAS + // with rounding bias + return a + stb__Mul8Bit(b-a, 0x55); +#else + // without rounding bias + // replace "/ 3" by "* 0xaaab) >> 17" if your compiler sucks or you really need every ounce of speed. + return (2*a + b) / 3; +#endif +} + +// lerp RGB color +static void stb__Lerp13RGB(unsigned char *out, unsigned char *p1, unsigned char *p2) +{ + out[0] = stb__Lerp13(p1[0], p2[0]); + out[1] = stb__Lerp13(p1[1], p2[1]); + out[2] = stb__Lerp13(p1[2], p2[2]); +} + +/****************************************************************************/ + +// compute table to reproduce constant colors as accurately as possible +static void stb__PrepareOptTable(unsigned char *Table,const unsigned char *expand,int size) +{ + int i,mn,mx; + for (i=0;i<256;i++) { + int bestErr = 256; + for (mn=0;mn> 4)]; + ep1[0] = bp[ 0] - dp[ 0]; + dp[ 4] = quant[bp[ 4] + ((7*ep1[0] + 3*ep2[2] + 5*ep2[1] + ep2[0]) >> 4)]; + ep1[1] = bp[ 4] - dp[ 4]; + dp[ 8] = quant[bp[ 8] + ((7*ep1[1] + 3*ep2[3] + 5*ep2[2] + ep2[1]) >> 4)]; + ep1[2] = bp[ 8] - dp[ 8]; + dp[12] = quant[bp[12] + ((7*ep1[2] + 5*ep2[3] + ep2[2]) >> 4)]; + ep1[3] = bp[12] - dp[12]; + bp += 16; + dp += 16; + et = ep1, ep1 = ep2, ep2 = et; // swap + } + } +} + +// The color matching function +static unsigned int stb__MatchColorsBlock(unsigned char *block, unsigned char *color,int dither) +{ + unsigned int mask = 0; + int dirr = color[0*4+0] - color[1*4+0]; + int dirg = color[0*4+1] - color[1*4+1]; + int dirb = color[0*4+2] - color[1*4+2]; + int dots[16]; + int stops[4]; + int i; + int c0Point, halfPoint, c3Point; + + for(i=0;i<16;i++) + dots[i] = block[i*4+0]*dirr + block[i*4+1]*dirg + block[i*4+2]*dirb; + + for(i=0;i<4;i++) + stops[i] = color[i*4+0]*dirr + color[i*4+1]*dirg + color[i*4+2]*dirb; + + // think of the colors as arranged on a line; project point onto that line, then choose + // next color out of available ones. we compute the crossover points for "best color in top + // half"/"best in bottom half" and then the same inside that subinterval. + // + // relying on this 1d approximation isn't always optimal in terms of euclidean distance, + // but it's very close and a lot faster. + // http://cbloomrants.blogspot.com/2008/12/12-08-08-dxtc-summary.html + + c0Point = (stops[1] + stops[3]) >> 1; + halfPoint = (stops[3] + stops[2]) >> 1; + c3Point = (stops[2] + stops[0]) >> 1; + + if(!dither) { + // the version without dithering is straightforward + for (i=15;i>=0;i--) { + int dot = dots[i]; + mask <<= 2; + + if(dot < halfPoint) + mask |= (dot < c0Point) ? 1 : 3; + else + mask |= (dot < c3Point) ? 2 : 0; + } + } else { + // with floyd-steinberg dithering + int err[8],*ep1 = err,*ep2 = err+4; + int *dp = dots, y; + + c0Point <<= 4; + halfPoint <<= 4; + c3Point <<= 4; + for(i=0;i<8;i++) + err[i] = 0; + + for(y=0;y<4;y++) + { + int dot,lmask,step; + + dot = (dp[0] << 4) + (3*ep2[1] + 5*ep2[0]); + if(dot < halfPoint) + step = (dot < c0Point) ? 1 : 3; + else + step = (dot < c3Point) ? 2 : 0; + ep1[0] = dp[0] - stops[step]; + lmask = step; + + dot = (dp[1] << 4) + (7*ep1[0] + 3*ep2[2] + 5*ep2[1] + ep2[0]); + if(dot < halfPoint) + step = (dot < c0Point) ? 1 : 3; + else + step = (dot < c3Point) ? 2 : 0; + ep1[1] = dp[1] - stops[step]; + lmask |= step<<2; + + dot = (dp[2] << 4) + (7*ep1[1] + 3*ep2[3] + 5*ep2[2] + ep2[1]); + if(dot < halfPoint) + step = (dot < c0Point) ? 1 : 3; + else + step = (dot < c3Point) ? 2 : 0; + ep1[2] = dp[2] - stops[step]; + lmask |= step<<4; + + dot = (dp[3] << 4) + (7*ep1[2] + 5*ep2[3] + ep2[2]); + if(dot < halfPoint) + step = (dot < c0Point) ? 1 : 3; + else + step = (dot < c3Point) ? 2 : 0; + ep1[3] = dp[3] - stops[step]; + lmask |= step<<6; + + dp += 4; + mask |= lmask << (y*8); + { int *et = ep1; ep1 = ep2; ep2 = et; } // swap + } + } + + return mask; +} + +// The color optimization function. (Clever code, part 1) +static void stb__OptimizeColorsBlock(unsigned char *block, unsigned short *pmax16, unsigned short *pmin16) +{ + int mind = 0x7fffffff,maxd = -0x7fffffff; + unsigned char *minp, *maxp; + double magn; + int v_r,v_g,v_b; + static const int nIterPower = 4; + float covf[6],vfr,vfg,vfb; + + // determine color distribution + int cov[6]; + int mu[3],min[3],max[3]; + int ch,i,iter; + + for(ch=0;ch<3;ch++) + { + const unsigned char *bp = ((const unsigned char *) block) + ch; + int muv,minv,maxv; + + muv = minv = maxv = bp[0]; + for(i=4;i<64;i+=4) + { + muv += bp[i]; + if (bp[i] < minv) minv = bp[i]; + else if (bp[i] > maxv) maxv = bp[i]; + } + + mu[ch] = (muv + 8) >> 4; + min[ch] = minv; + max[ch] = maxv; + } + + // determine covariance matrix + for (i=0;i<6;i++) + cov[i] = 0; + + for (i=0;i<16;i++) + { + int r = block[i*4+0] - mu[0]; + int g = block[i*4+1] - mu[1]; + int b = block[i*4+2] - mu[2]; + + cov[0] += r*r; + cov[1] += r*g; + cov[2] += r*b; + cov[3] += g*g; + cov[4] += g*b; + cov[5] += b*b; + } + + // convert covariance matrix to float, find principal axis via power iter + for(i=0;i<6;i++) + covf[i] = cov[i] / 255.0f; + + vfr = (float) (max[0] - min[0]); + vfg = (float) (max[1] - min[1]); + vfb = (float) (max[2] - min[2]); + + for(iter=0;iter magn) magn = fabs(vfg); + if (fabs(vfb) > magn) magn = fabs(vfb); + + if(magn < 4.0f) { // too small, default to luminance + v_r = 299; // JPEG YCbCr luma coefs, scaled by 1000. + v_g = 587; + v_b = 114; + } else { + magn = 512.0 / magn; + v_r = (int) (vfr * magn); + v_g = (int) (vfg * magn); + v_b = (int) (vfb * magn); + } + + // Pick colors at extreme points + for(i=0;i<16;i++) + { + int dot = block[i*4+0]*v_r + block[i*4+1]*v_g + block[i*4+2]*v_b; + + if (dot < mind) { + mind = dot; + minp = block+i*4; + } + + if (dot > maxd) { + maxd = dot; + maxp = block+i*4; + } + } + + *pmax16 = stb__As16Bit(maxp[0],maxp[1],maxp[2]); + *pmin16 = stb__As16Bit(minp[0],minp[1],minp[2]); +} + +static int stb__sclamp(float y, int p0, int p1) +{ + int x = (int) y; + if (x < p0) return p0; + if (x > p1) return p1; + return x; +} + +// The refinement function. (Clever code, part 2) +// Tries to optimize colors to suit block contents better. +// (By solving a least squares system via normal equations+Cramer's rule) +static int stb__RefineBlock(unsigned char *block, unsigned short *pmax16, unsigned short *pmin16, unsigned int mask) +{ + static const int w1Tab[4] = { 3,0,2,1 }; + static const int prods[4] = { 0x090000,0x000900,0x040102,0x010402 }; + // ^some magic to save a lot of multiplies in the accumulating loop... + // (precomputed products of weights for least squares system, accumulated inside one 32-bit register) + + float frb,fg; + unsigned short oldMin, oldMax, min16, max16; + int i, akku = 0, xx,xy,yy; + int At1_r,At1_g,At1_b; + int At2_r,At2_g,At2_b; + unsigned int cm = mask; + + oldMin = *pmin16; + oldMax = *pmax16; + + if((mask ^ (mask<<2)) < 4) // all pixels have the same index? + { + // yes, linear system would be singular; solve using optimal + // single-color match on average color + int r = 8, g = 8, b = 8; + for (i=0;i<16;++i) { + r += block[i*4+0]; + g += block[i*4+1]; + b += block[i*4+2]; + } + + r >>= 4; g >>= 4; b >>= 4; + + max16 = (stb__OMatch5[r][0]<<11) | (stb__OMatch6[g][0]<<5) | stb__OMatch5[b][0]; + min16 = (stb__OMatch5[r][1]<<11) | (stb__OMatch6[g][1]<<5) | stb__OMatch5[b][1]; + } else { + At1_r = At1_g = At1_b = 0; + At2_r = At2_g = At2_b = 0; + for (i=0;i<16;++i,cm>>=2) { + int step = cm&3; + int w1 = w1Tab[step]; + int r = block[i*4+0]; + int g = block[i*4+1]; + int b = block[i*4+2]; + + akku += prods[step]; + At1_r += w1*r; + At1_g += w1*g; + At1_b += w1*b; + At2_r += r; + At2_g += g; + At2_b += b; + } + + At2_r = 3*At2_r - At1_r; + At2_g = 3*At2_g - At1_g; + At2_b = 3*At2_b - At1_b; + + // extract solutions and decide solvability + xx = akku >> 16; + yy = (akku >> 8) & 0xff; + xy = (akku >> 0) & 0xff; + + frb = 3.0f * 31.0f / 255.0f / (xx*yy - xy*xy); + fg = frb * 63.0f / 31.0f; + + // solve. + max16 = stb__sclamp((At1_r*yy - At2_r*xy)*frb+0.5f,0,31) << 11; + max16 |= stb__sclamp((At1_g*yy - At2_g*xy)*fg +0.5f,0,63) << 5; + max16 |= stb__sclamp((At1_b*yy - At2_b*xy)*frb+0.5f,0,31) << 0; + + min16 = stb__sclamp((At2_r*xx - At1_r*xy)*frb+0.5f,0,31) << 11; + min16 |= stb__sclamp((At2_g*xx - At1_g*xy)*fg +0.5f,0,63) << 5; + min16 |= stb__sclamp((At2_b*xx - At1_b*xy)*frb+0.5f,0,31) << 0; + } + + *pmin16 = min16; + *pmax16 = max16; + return oldMin != min16 || oldMax != max16; +} + +// Color block compression +static void stb__CompressColorBlock(unsigned char *dest, unsigned char *block, int mode) +{ + unsigned int mask; + int i; + int dither; + int refinecount; + unsigned short max16, min16; + unsigned char dblock[16*4],color[4*4]; + + dither = mode & STB_DXT_DITHER; + refinecount = (mode & STB_DXT_HIGHQUAL) ? 2 : 1; + + // check if block is constant + for (i=1;i<16;i++) + if (((unsigned int *) block)[i] != ((unsigned int *) block)[0]) + break; + + if(i == 16) { // constant color + int r = block[0], g = block[1], b = block[2]; + mask = 0xaaaaaaaa; + max16 = (stb__OMatch5[r][0]<<11) | (stb__OMatch6[g][0]<<5) | stb__OMatch5[b][0]; + min16 = (stb__OMatch5[r][1]<<11) | (stb__OMatch6[g][1]<<5) | stb__OMatch5[b][1]; + } else { + // first step: compute dithered version for PCA if desired + if(dither) + stb__DitherBlock(dblock,block); + + // second step: pca+map along principal axis + stb__OptimizeColorsBlock(dither ? dblock : block,&max16,&min16); + if (max16 != min16) { + stb__EvalColors(color,max16,min16); + mask = stb__MatchColorsBlock(block,color,dither); + } else + mask = 0; + + // third step: refine (multiple times if requested) + for (i=0;i> 8); + dest[2] = (unsigned char) (min16); + dest[3] = (unsigned char) (min16 >> 8); + dest[4] = (unsigned char) (mask); + dest[5] = (unsigned char) (mask >> 8); + dest[6] = (unsigned char) (mask >> 16); + dest[7] = (unsigned char) (mask >> 24); +} + +// Alpha block compression (this is easy for a change) +static void stb__CompressAlphaBlock(unsigned char *dest,unsigned char *src,int mode) +{ + int i,dist,bias,dist4,dist2,bits,mask; + + // find min/max color + int mn,mx; + mn = mx = src[3]; + + for (i=1;i<16;i++) + { + if (src[i*4+3] < mn) mn = src[i*4+3]; + else if (src[i*4+3] > mx) mx = src[i*4+3]; + } + + // encode them + ((unsigned char *)dest)[0] = mx; + ((unsigned char *)dest)[1] = mn; + dest += 2; + + // determine bias and emit color indices + // given the choice of mx/mn, these indices are optimal: + // http://fgiesen.wordpress.com/2009/12/15/dxt5-alpha-block-index-determination/ + dist = mx-mn; + dist4 = dist*4; + dist2 = dist*2; + bias = (dist < 8) ? (dist - 1) : (dist/2 + 2); + bias -= mn * 7; + bits = 0,mask=0; + + for (i=0;i<16;i++) { + int a = src[i*4+3]*7 + bias; + int ind,t; + + // select index. this is a "linear scale" lerp factor between 0 (val=min) and 7 (val=max). + t = (a >= dist4) ? -1 : 0; ind = t & 4; a -= dist4 & t; + t = (a >= dist2) ? -1 : 0; ind += t & 2; a -= dist2 & t; + ind += (a >= dist); + + // turn linear scale into DXT index (0/1 are extremal pts) + ind = -ind & 7; + ind ^= (2 > ind); + + // write index + mask |= ind << bits; + if((bits += 3) >= 8) { + *dest++ = mask; + mask >>= 8; + bits -= 8; + } + } +} + +static void stb__InitDXT() +{ + int i; + for(i=0;i<32;i++) + stb__Expand5[i] = (i<<3)|(i>>2); + + for(i=0;i<64;i++) + stb__Expand6[i] = (i<<2)|(i>>4); + + for(i=0;i<256+16;i++) + { + int v = i-8 < 0 ? 0 : i-8 > 255 ? 255 : i-8; + stb__QuantRBTab[i] = stb__Expand5[stb__Mul8Bit(v,31)]; + stb__QuantGTab[i] = stb__Expand6[stb__Mul8Bit(v,63)]; + } + + stb__PrepareOptTable(&stb__OMatch5[0][0],stb__Expand5,32); + stb__PrepareOptTable(&stb__OMatch6[0][0],stb__Expand6,64); +} + +void stb_compress_dxt_block(unsigned char *dest, const unsigned char *src, int alpha, int mode) +{ + static int init=1; + if (init) { + stb__InitDXT(); + init=0; + } + + if (alpha) { + stb__CompressAlphaBlock(dest,(unsigned char*) src,mode); + dest += 8; + } + + stb__CompressColorBlock(dest,(unsigned char*) src,mode); +} +#endif // STB_DXT_IMPLEMENTATION + +#endif // STB_INCLUDE_STB_DXT_H