diff options
author | marha <marha@users.sourceforge.net> | 2011-04-06 20:33:32 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-06 20:33:32 +0000 |
commit | 704e01fc69ebf6302aa1876906805147248abdaa (patch) | |
tree | 55a4a5ffdf2d39f193d218785155a096966f30a6 /mesalib/src/mesa/main | |
parent | eaedc21febeadad4cf0e370f5d97e7bdb4470870 (diff) | |
download | vcxsrv-704e01fc69ebf6302aa1876906805147248abdaa.tar.gz vcxsrv-704e01fc69ebf6302aa1876906805147248abdaa.tar.bz2 vcxsrv-704e01fc69ebf6302aa1876906805147248abdaa.zip |
xserver libX11 libxcb mesa git update 6 Apr 2011
Diffstat (limited to 'mesalib/src/mesa/main')
23 files changed, 40292 insertions, 39874 deletions
diff --git a/mesalib/src/mesa/main/api_exec.c b/mesalib/src/mesa/main/api_exec.c index f7603705b..4699fcd8e 100644 --- a/mesalib/src/mesa/main/api_exec.c +++ b/mesalib/src/mesa/main/api_exec.c @@ -1,732 +1,735 @@ -/* - * Mesa 3-D graphics library - * Version: 7.1 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - - -/** - * \file api_exec.c - * Initialize dispatch table with the immidiate mode functions. - */ - - -#include "mfeatures.h" -#include "accum.h" -#include "api_loopback.h" -#include "api_exec.h" -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program -#include "arbprogram.h" -#endif -#include "atifragshader.h" -#include "attrib.h" -#include "blend.h" -#if FEATURE_ARB_vertex_buffer_object -#include "bufferobj.h" -#endif -#include "arrayobj.h" -#if FEATURE_draw_read_buffer -#include "buffers.h" -#endif -#include "clear.h" -#include "clip.h" -#include "colortab.h" -#include "condrender.h" -#include "context.h" -#include "convolve.h" -#include "depth.h" -#include "dlist.h" -#include "drawpix.h" -#include "rastpos.h" -#include "enable.h" -#include "eval.h" -#include "get.h" -#include "feedback.h" -#include "fog.h" -#if FEATURE_EXT_framebuffer_object -#include "fbobject.h" -#endif -#include "framebuffer.h" -#include "hint.h" -#include "histogram.h" -#include "imports.h" -#include "light.h" -#include "lines.h" -#include "matrix.h" -#include "multisample.h" -#include "pixel.h" -#include "pixelstore.h" -#include "points.h" -#include "polygon.h" -#include "queryobj.h" -#include "readpix.h" -#include "scissor.h" -#include "stencil.h" -#include "texenv.h" -#include "texgetimage.h" -#include "teximage.h" -#include "texgen.h" -#include "texobj.h" -#include "texparam.h" -#include "texstate.h" -#include "texturebarrier.h" -#include "transformfeedback.h" -#include "mtypes.h" -#include "varray.h" -#include "viewport.h" -#if FEATURE_NV_vertex_program || FEATURE_NV_fragment_program -#include "nvprogram.h" -#endif -#if FEATURE_ARB_shader_objects -#include "shaderapi.h" -#include "uniforms.h" -#endif -#include "syncobj.h" -#include "main/dispatch.h" - - -#if FEATURE_GL - - -/** - * Initialize a dispatch table with pointers to Mesa's immediate-mode - * commands. - * - * Pointers to glBegin()/glEnd() object commands and a few others - * are provided via the GLvertexformat interface. - * - * \param ctx GL context to which \c exec belongs. - * \param exec dispatch table. - */ -struct _glapi_table * -_mesa_create_exec_table(void) -{ - struct _glapi_table *exec; - - exec = _mesa_alloc_dispatch_table(_gloffset_COUNT); - if (exec == NULL) - return NULL; - -#if _HAVE_FULL_GL - _mesa_loopback_init_api_table( exec ); -#endif - - /* load the dispatch slots we understand */ - SET_AlphaFunc(exec, _mesa_AlphaFunc); - SET_BlendFunc(exec, _mesa_BlendFunc); - SET_Clear(exec, _mesa_Clear); - SET_ClearColor(exec, _mesa_ClearColor); - SET_ClearStencil(exec, _mesa_ClearStencil); - SET_ColorMask(exec, _mesa_ColorMask); - SET_CullFace(exec, _mesa_CullFace); - SET_Disable(exec, _mesa_Disable); -#if FEATURE_draw_read_buffer - SET_DrawBuffer(exec, _mesa_DrawBuffer); - SET_ReadBuffer(exec, _mesa_ReadBuffer); -#endif - SET_Enable(exec, _mesa_Enable); - SET_Finish(exec, _mesa_Finish); - SET_Flush(exec, _mesa_Flush); - SET_FrontFace(exec, _mesa_FrontFace); - SET_Frustum(exec, _mesa_Frustum); - SET_GetError(exec, _mesa_GetError); - SET_GetFloatv(exec, _mesa_GetFloatv); - SET_GetString(exec, _mesa_GetString); - SET_LineStipple(exec, _mesa_LineStipple); - SET_LineWidth(exec, _mesa_LineWidth); - SET_LoadIdentity(exec, _mesa_LoadIdentity); - SET_LoadMatrixf(exec, _mesa_LoadMatrixf); - SET_LogicOp(exec, _mesa_LogicOp); - SET_MatrixMode(exec, _mesa_MatrixMode); - SET_MultMatrixf(exec, _mesa_MultMatrixf); - SET_Ortho(exec, _mesa_Ortho); - SET_PixelStorei(exec, _mesa_PixelStorei); - SET_PopMatrix(exec, _mesa_PopMatrix); - SET_PushMatrix(exec, _mesa_PushMatrix); - SET_Rotatef(exec, _mesa_Rotatef); - SET_Scalef(exec, _mesa_Scalef); - SET_Scissor(exec, _mesa_Scissor); - SET_ShadeModel(exec, _mesa_ShadeModel); - SET_StencilFunc(exec, _mesa_StencilFunc); - SET_StencilMask(exec, _mesa_StencilMask); - SET_StencilOp(exec, _mesa_StencilOp); - SET_TexEnvfv(exec, _mesa_TexEnvfv); - SET_TexEnvi(exec, _mesa_TexEnvi); - SET_TexImage2D(exec, _mesa_TexImage2D); - SET_TexParameteri(exec, _mesa_TexParameteri); - SET_Translatef(exec, _mesa_Translatef); - SET_Viewport(exec, _mesa_Viewport); - - _mesa_init_accum_dispatch(exec); - _mesa_init_dlist_dispatch(exec); - - SET_ClearDepth(exec, _mesa_ClearDepth); - SET_ClearIndex(exec, _mesa_ClearIndex); - SET_ClipPlane(exec, _mesa_ClipPlane); - SET_ColorMaterial(exec, _mesa_ColorMaterial); - SET_DepthFunc(exec, _mesa_DepthFunc); - SET_DepthMask(exec, _mesa_DepthMask); - SET_DepthRange(exec, _mesa_DepthRange); - - _mesa_init_drawpix_dispatch(exec); - _mesa_init_feedback_dispatch(exec); - - SET_FogCoordPointerEXT(exec, _mesa_FogCoordPointerEXT); - SET_Fogf(exec, _mesa_Fogf); - SET_Fogfv(exec, _mesa_Fogfv); - SET_Fogi(exec, _mesa_Fogi); - SET_Fogiv(exec, _mesa_Fogiv); - SET_GetClipPlane(exec, _mesa_GetClipPlane); - SET_GetBooleanv(exec, _mesa_GetBooleanv); - SET_GetDoublev(exec, _mesa_GetDoublev); - SET_GetIntegerv(exec, _mesa_GetIntegerv); - SET_GetLightfv(exec, _mesa_GetLightfv); - SET_GetLightiv(exec, _mesa_GetLightiv); - SET_GetMaterialfv(exec, _mesa_GetMaterialfv); - SET_GetMaterialiv(exec, _mesa_GetMaterialiv); - SET_GetPolygonStipple(exec, _mesa_GetPolygonStipple); - SET_GetTexEnvfv(exec, _mesa_GetTexEnvfv); - SET_GetTexEnviv(exec, _mesa_GetTexEnviv); - SET_GetTexLevelParameterfv(exec, _mesa_GetTexLevelParameterfv); - SET_GetTexLevelParameteriv(exec, _mesa_GetTexLevelParameteriv); - SET_GetTexParameterfv(exec, _mesa_GetTexParameterfv); - SET_GetTexParameteriv(exec, _mesa_GetTexParameteriv); - SET_GetTexImage(exec, _mesa_GetTexImage); - SET_Hint(exec, _mesa_Hint); - SET_IndexMask(exec, _mesa_IndexMask); - SET_IsEnabled(exec, _mesa_IsEnabled); - SET_LightModelf(exec, _mesa_LightModelf); - SET_LightModelfv(exec, _mesa_LightModelfv); - SET_LightModeli(exec, _mesa_LightModeli); - SET_LightModeliv(exec, _mesa_LightModeliv); - SET_Lightf(exec, _mesa_Lightf); - SET_Lightfv(exec, _mesa_Lightfv); - SET_Lighti(exec, _mesa_Lighti); - SET_Lightiv(exec, _mesa_Lightiv); - SET_LoadMatrixd(exec, _mesa_LoadMatrixd); - - _mesa_init_eval_dispatch(exec); - - SET_MultMatrixd(exec, _mesa_MultMatrixd); - - _mesa_init_pixel_dispatch(exec); - - SET_PixelStoref(exec, _mesa_PixelStoref); - SET_PointSize(exec, _mesa_PointSize); - SET_PolygonMode(exec, _mesa_PolygonMode); - SET_PolygonOffset(exec, _mesa_PolygonOffset); - SET_PolygonStipple(exec, _mesa_PolygonStipple); - - _mesa_init_attrib_dispatch(exec); - _mesa_init_rastpos_dispatch(exec); - - SET_ReadPixels(exec, _mesa_ReadPixels); - SET_Rotated(exec, _mesa_Rotated); - SET_Scaled(exec, _mesa_Scaled); - SET_SecondaryColorPointerEXT(exec, _mesa_SecondaryColorPointerEXT); - SET_TexEnvf(exec, _mesa_TexEnvf); - SET_TexEnviv(exec, _mesa_TexEnviv); - - _mesa_init_texgen_dispatch(exec); - - SET_TexImage1D(exec, _mesa_TexImage1D); - SET_TexParameterf(exec, _mesa_TexParameterf); - SET_TexParameterfv(exec, _mesa_TexParameterfv); - SET_TexParameteriv(exec, _mesa_TexParameteriv); - SET_Translated(exec, _mesa_Translated); - - /* 1.1 */ - SET_BindTexture(exec, _mesa_BindTexture); - SET_DeleteTextures(exec, _mesa_DeleteTextures); - SET_GenTextures(exec, _mesa_GenTextures); -#if _HAVE_FULL_GL - SET_AreTexturesResident(exec, _mesa_AreTexturesResident); - SET_ColorPointer(exec, _mesa_ColorPointer); - SET_CopyTexImage1D(exec, _mesa_CopyTexImage1D); - SET_CopyTexImage2D(exec, _mesa_CopyTexImage2D); - SET_CopyTexSubImage1D(exec, _mesa_CopyTexSubImage1D); - SET_CopyTexSubImage2D(exec, _mesa_CopyTexSubImage2D); - SET_DisableClientState(exec, _mesa_DisableClientState); - SET_EdgeFlagPointer(exec, _mesa_EdgeFlagPointer); - SET_EnableClientState(exec, _mesa_EnableClientState); - SET_GetPointerv(exec, _mesa_GetPointerv); - SET_IndexPointer(exec, _mesa_IndexPointer); - SET_InterleavedArrays(exec, _mesa_InterleavedArrays); - SET_IsTexture(exec, _mesa_IsTexture); - SET_NormalPointer(exec, _mesa_NormalPointer); - SET_PrioritizeTextures(exec, _mesa_PrioritizeTextures); - SET_TexCoordPointer(exec, _mesa_TexCoordPointer); - SET_TexSubImage1D(exec, _mesa_TexSubImage1D); - SET_TexSubImage2D(exec, _mesa_TexSubImage2D); - SET_VertexPointer(exec, _mesa_VertexPointer); -#endif - - /* 1.2 */ -#if _HAVE_FULL_GL - SET_CopyTexSubImage3D(exec, _mesa_CopyTexSubImage3D); - SET_TexImage3D(exec, _mesa_TexImage3D); - SET_TexSubImage3D(exec, _mesa_TexSubImage3D); -#endif - - /* OpenGL 1.2 GL_ARB_imaging */ - SET_BlendColor(exec, _mesa_BlendColor); - SET_BlendEquation(exec, _mesa_BlendEquation); - SET_BlendEquationSeparateEXT(exec, _mesa_BlendEquationSeparateEXT); - - _mesa_init_colortable_dispatch(exec); - _mesa_init_convolve_dispatch(exec); - _mesa_init_histogram_dispatch(exec); - - /* OpenGL 2.0 */ - SET_StencilFuncSeparate(exec, _mesa_StencilFuncSeparate); - SET_StencilMaskSeparate(exec, _mesa_StencilMaskSeparate); - SET_StencilOpSeparate(exec, _mesa_StencilOpSeparate); - -#if FEATURE_ARB_shader_objects - _mesa_init_shader_dispatch(exec); - _mesa_init_shader_uniform_dispatch(exec); -#endif - - /* 2. GL_EXT_blend_color */ -#if 0 -/* SET_BlendColorEXT(exec, _mesa_BlendColorEXT); */ -#endif - - /* 3. GL_EXT_polygon_offset */ -#if _HAVE_FULL_GL - SET_PolygonOffsetEXT(exec, _mesa_PolygonOffsetEXT); -#endif - - /* 6. GL_EXT_texture3d */ -#if 0 -/* SET_CopyTexSubImage3DEXT(exec, _mesa_CopyTexSubImage3D); */ -/* SET_TexImage3DEXT(exec, _mesa_TexImage3DEXT); */ -/* SET_TexSubImage3DEXT(exec, _mesa_TexSubImage3D); */ -#endif - - /* 11. GL_EXT_histogram */ -#if 0 - SET_GetHistogramEXT(exec, _mesa_GetHistogram); - SET_GetHistogramParameterfvEXT(exec, _mesa_GetHistogramParameterfv); - SET_GetHistogramParameterivEXT(exec, _mesa_GetHistogramParameteriv); - SET_GetMinmaxEXT(exec, _mesa_GetMinmax); - SET_GetMinmaxParameterfvEXT(exec, _mesa_GetMinmaxParameterfv); - SET_GetMinmaxParameterivEXT(exec, _mesa_GetMinmaxParameteriv); -#endif - - /* 14. SGI_color_table */ -#if 0 - SET_ColorTableSGI(exec, _mesa_ColorTable); - SET_ColorSubTableSGI(exec, _mesa_ColorSubTable); - SET_GetColorTableSGI(exec, _mesa_GetColorTable); - SET_GetColorTableParameterfvSGI(exec, _mesa_GetColorTableParameterfv); - SET_GetColorTableParameterivSGI(exec, _mesa_GetColorTableParameteriv); -#endif - - /* 30. GL_EXT_vertex_array */ -#if _HAVE_FULL_GL - SET_ColorPointerEXT(exec, _mesa_ColorPointerEXT); - SET_EdgeFlagPointerEXT(exec, _mesa_EdgeFlagPointerEXT); - SET_IndexPointerEXT(exec, _mesa_IndexPointerEXT); - SET_NormalPointerEXT(exec, _mesa_NormalPointerEXT); - SET_TexCoordPointerEXT(exec, _mesa_TexCoordPointerEXT); - SET_VertexPointerEXT(exec, _mesa_VertexPointerEXT); -#endif - - /* 37. GL_EXT_blend_minmax */ -#if 0 - SET_BlendEquationEXT(exec, _mesa_BlendEquationEXT); -#endif - - /* 54. GL_EXT_point_parameters */ -#if _HAVE_FULL_GL - SET_PointParameterfEXT(exec, _mesa_PointParameterf); - SET_PointParameterfvEXT(exec, _mesa_PointParameterfv); -#endif - - /* 95. GL_ARB_ES2_compatibility */ - SET_ClearDepthf(exec, _mesa_ClearDepthf); - SET_DepthRangef(exec, _mesa_DepthRangef); - - /* 97. GL_EXT_compiled_vertex_array */ -#if _HAVE_FULL_GL - SET_LockArraysEXT(exec, _mesa_LockArraysEXT); - SET_UnlockArraysEXT(exec, _mesa_UnlockArraysEXT); -#endif - - /* 148. GL_EXT_multi_draw_arrays */ -#if _HAVE_FULL_GL - SET_MultiDrawArraysEXT(exec, _mesa_MultiDrawArraysEXT); -#endif - - /* 173. GL_INGR_blend_func_separate */ -#if _HAVE_FULL_GL - SET_BlendFuncSeparateEXT(exec, _mesa_BlendFuncSeparateEXT); -#endif - - /* 196. GL_MESA_resize_buffers */ -#if _HAVE_FULL_GL - SET_ResizeBuffersMESA(exec, _mesa_ResizeBuffersMESA); -#endif - - /* 197. GL_MESA_window_pos */ - /* part of _mesa_init_rastpos_dispatch(exec); */ - - /* 200. GL_IBM_multimode_draw_arrays */ -#if _HAVE_FULL_GL - SET_MultiModeDrawArraysIBM(exec, _mesa_MultiModeDrawArraysIBM); - SET_MultiModeDrawElementsIBM(exec, _mesa_MultiModeDrawElementsIBM); -#endif - - /* 233. GL_NV_vertex_program */ -#if FEATURE_NV_vertex_program - SET_BindProgramNV(exec, _mesa_BindProgram); - SET_DeleteProgramsNV(exec, _mesa_DeletePrograms); - SET_ExecuteProgramNV(exec, _mesa_ExecuteProgramNV); - SET_GenProgramsNV(exec, _mesa_GenPrograms); - SET_AreProgramsResidentNV(exec, _mesa_AreProgramsResidentNV); - SET_RequestResidentProgramsNV(exec, _mesa_RequestResidentProgramsNV); - SET_GetProgramParameterfvNV(exec, _mesa_GetProgramParameterfvNV); - SET_GetProgramParameterdvNV(exec, _mesa_GetProgramParameterdvNV); - SET_GetProgramivNV(exec, _mesa_GetProgramivNV); - SET_GetProgramStringNV(exec, _mesa_GetProgramStringNV); - SET_GetTrackMatrixivNV(exec, _mesa_GetTrackMatrixivNV); - SET_GetVertexAttribdvNV(exec, _mesa_GetVertexAttribdvNV); - SET_GetVertexAttribfvNV(exec, _mesa_GetVertexAttribfvNV); - SET_GetVertexAttribivNV(exec, _mesa_GetVertexAttribivNV); - SET_GetVertexAttribPointervNV(exec, _mesa_GetVertexAttribPointervNV); - SET_IsProgramNV(exec, _mesa_IsProgramARB); - SET_LoadProgramNV(exec, _mesa_LoadProgramNV); - SET_ProgramEnvParameter4dARB(exec, _mesa_ProgramEnvParameter4dARB); /* alias to ProgramParameter4dNV */ - SET_ProgramEnvParameter4dvARB(exec, _mesa_ProgramEnvParameter4dvARB); /* alias to ProgramParameter4dvNV */ - SET_ProgramEnvParameter4fARB(exec, _mesa_ProgramEnvParameter4fARB); /* alias to ProgramParameter4fNV */ - SET_ProgramEnvParameter4fvARB(exec, _mesa_ProgramEnvParameter4fvARB); /* alias to ProgramParameter4fvNV */ - SET_ProgramParameters4dvNV(exec, _mesa_ProgramParameters4dvNV); - SET_ProgramParameters4fvNV(exec, _mesa_ProgramParameters4fvNV); - SET_TrackMatrixNV(exec, _mesa_TrackMatrixNV); - SET_VertexAttribPointerNV(exec, _mesa_VertexAttribPointerNV); - /* glVertexAttrib*NV functions handled in api_loopback.c */ -#endif - - /* 273. GL_APPLE_vertex_array_object */ - SET_BindVertexArrayAPPLE(exec, _mesa_BindVertexArrayAPPLE); - SET_DeleteVertexArraysAPPLE(exec, _mesa_DeleteVertexArraysAPPLE); - SET_GenVertexArraysAPPLE(exec, _mesa_GenVertexArraysAPPLE); - SET_IsVertexArrayAPPLE(exec, _mesa_IsVertexArrayAPPLE); - - /* 282. GL_NV_fragment_program */ -#if FEATURE_NV_fragment_program - SET_ProgramNamedParameter4fNV(exec, _mesa_ProgramNamedParameter4fNV); - SET_ProgramNamedParameter4dNV(exec, _mesa_ProgramNamedParameter4dNV); - SET_ProgramNamedParameter4fvNV(exec, _mesa_ProgramNamedParameter4fvNV); - SET_ProgramNamedParameter4dvNV(exec, _mesa_ProgramNamedParameter4dvNV); - SET_GetProgramNamedParameterfvNV(exec, _mesa_GetProgramNamedParameterfvNV); - SET_GetProgramNamedParameterdvNV(exec, _mesa_GetProgramNamedParameterdvNV); - SET_ProgramLocalParameter4dARB(exec, _mesa_ProgramLocalParameter4dARB); - SET_ProgramLocalParameter4dvARB(exec, _mesa_ProgramLocalParameter4dvARB); - SET_ProgramLocalParameter4fARB(exec, _mesa_ProgramLocalParameter4fARB); - SET_ProgramLocalParameter4fvARB(exec, _mesa_ProgramLocalParameter4fvARB); - SET_GetProgramLocalParameterdvARB(exec, _mesa_GetProgramLocalParameterdvARB); - SET_GetProgramLocalParameterfvARB(exec, _mesa_GetProgramLocalParameterfvARB); -#endif - - /* 262. GL_NV_point_sprite */ -#if _HAVE_FULL_GL - SET_PointParameteriNV(exec, _mesa_PointParameteri); - SET_PointParameterivNV(exec, _mesa_PointParameteriv); -#endif - - /* 268. GL_EXT_stencil_two_side */ -#if _HAVE_FULL_GL - SET_ActiveStencilFaceEXT(exec, _mesa_ActiveStencilFaceEXT); -#endif - - /* 285. GL_NV_primitive_restart */ - SET_PrimitiveRestartIndexNV(exec, _mesa_PrimitiveRestartIndex); - - /* ???. GL_EXT_depth_bounds_test */ - SET_DepthBoundsEXT(exec, _mesa_DepthBoundsEXT); - - /* 352. GL_EXT_transform_feedback */ - _mesa_init_transform_feedback_dispatch(exec); - - /* 364. GL_EXT_provoking_vertex */ - SET_ProvokingVertexEXT(exec, _mesa_ProvokingVertexEXT); - - /* ARB 1. GL_ARB_multitexture */ -#if _HAVE_FULL_GL - SET_ActiveTextureARB(exec, _mesa_ActiveTextureARB); - SET_ClientActiveTextureARB(exec, _mesa_ClientActiveTextureARB); -#endif - - /* ARB 3. GL_ARB_transpose_matrix */ -#if _HAVE_FULL_GL - SET_LoadTransposeMatrixdARB(exec, _mesa_LoadTransposeMatrixdARB); - SET_LoadTransposeMatrixfARB(exec, _mesa_LoadTransposeMatrixfARB); - SET_MultTransposeMatrixdARB(exec, _mesa_MultTransposeMatrixdARB); - SET_MultTransposeMatrixfARB(exec, _mesa_MultTransposeMatrixfARB); -#endif - - /* ARB 5. GL_ARB_multisample */ -#if _HAVE_FULL_GL - SET_SampleCoverageARB(exec, _mesa_SampleCoverageARB); -#endif - - /* ARB 12. GL_ARB_texture_compression */ -#if _HAVE_FULL_GL - SET_CompressedTexImage3DARB(exec, _mesa_CompressedTexImage3DARB); - SET_CompressedTexImage2DARB(exec, _mesa_CompressedTexImage2DARB); - SET_CompressedTexImage1DARB(exec, _mesa_CompressedTexImage1DARB); - SET_CompressedTexSubImage3DARB(exec, _mesa_CompressedTexSubImage3DARB); - SET_CompressedTexSubImage2DARB(exec, _mesa_CompressedTexSubImage2DARB); - SET_CompressedTexSubImage1DARB(exec, _mesa_CompressedTexSubImage1DARB); - SET_GetCompressedTexImageARB(exec, _mesa_GetCompressedTexImageARB); -#endif - - /* ARB 14. GL_ARB_point_parameters */ - /* reuse EXT_point_parameters functions */ - - /* ARB 26. GL_ARB_vertex_program */ - /* ARB 27. GL_ARB_fragment_program */ -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program - /* glVertexAttrib1sARB aliases glVertexAttrib1sNV */ - /* glVertexAttrib1fARB aliases glVertexAttrib1fNV */ - /* glVertexAttrib1dARB aliases glVertexAttrib1dNV */ - /* glVertexAttrib2sARB aliases glVertexAttrib2sNV */ - /* glVertexAttrib2fARB aliases glVertexAttrib2fNV */ - /* glVertexAttrib2dARB aliases glVertexAttrib2dNV */ - /* glVertexAttrib3sARB aliases glVertexAttrib3sNV */ - /* glVertexAttrib3fARB aliases glVertexAttrib3fNV */ - /* glVertexAttrib3dARB aliases glVertexAttrib3dNV */ - /* glVertexAttrib4sARB aliases glVertexAttrib4sNV */ - /* glVertexAttrib4fARB aliases glVertexAttrib4fNV */ - /* glVertexAttrib4dARB aliases glVertexAttrib4dNV */ - /* glVertexAttrib4NubARB aliases glVertexAttrib4NubNV */ - /* glVertexAttrib1svARB aliases glVertexAttrib1svNV */ - /* glVertexAttrib1fvARB aliases glVertexAttrib1fvNV */ - /* glVertexAttrib1dvARB aliases glVertexAttrib1dvNV */ - /* glVertexAttrib2svARB aliases glVertexAttrib2svNV */ - /* glVertexAttrib2fvARB aliases glVertexAttrib2fvNV */ - /* glVertexAttrib2dvARB aliases glVertexAttrib2dvNV */ - /* glVertexAttrib3svARB aliases glVertexAttrib3svNV */ - /* glVertexAttrib3fvARB aliases glVertexAttrib3fvNV */ - /* glVertexAttrib3dvARB aliases glVertexAttrib3dvNV */ - /* glVertexAttrib4svARB aliases glVertexAttrib4svNV */ - /* glVertexAttrib4fvARB aliases glVertexAttrib4fvNV */ - /* glVertexAttrib4dvARB aliases glVertexAttrib4dvNV */ - /* glVertexAttrib4NubvARB aliases glVertexAttrib4NubvNV */ - /* glVertexAttrib4bvARB handled in api_loopback.c */ - /* glVertexAttrib4ivARB handled in api_loopback.c */ - /* glVertexAttrib4ubvARB handled in api_loopback.c */ - /* glVertexAttrib4usvARB handled in api_loopback.c */ - /* glVertexAttrib4uivARB handled in api_loopback.c */ - /* glVertexAttrib4NbvARB handled in api_loopback.c */ - /* glVertexAttrib4NsvARB handled in api_loopback.c */ - /* glVertexAttrib4NivARB handled in api_loopback.c */ - /* glVertexAttrib4NusvARB handled in api_loopback.c */ - /* glVertexAttrib4NuivARB handled in api_loopback.c */ - SET_VertexAttribPointerARB(exec, _mesa_VertexAttribPointerARB); - SET_EnableVertexAttribArrayARB(exec, _mesa_EnableVertexAttribArrayARB); - SET_DisableVertexAttribArrayARB(exec, _mesa_DisableVertexAttribArrayARB); - SET_ProgramStringARB(exec, _mesa_ProgramStringARB); - /* glBindProgramARB aliases glBindProgramNV */ - /* glDeleteProgramsARB aliases glDeleteProgramsNV */ - /* glGenProgramsARB aliases glGenProgramsNV */ - /* glIsProgramARB aliases glIsProgramNV */ - SET_GetVertexAttribdvARB(exec, _mesa_GetVertexAttribdvARB); - SET_GetVertexAttribfvARB(exec, _mesa_GetVertexAttribfvARB); - SET_GetVertexAttribivARB(exec, _mesa_GetVertexAttribivARB); - /* glGetVertexAttribPointervARB aliases glGetVertexAttribPointervNV */ - SET_ProgramEnvParameter4dARB(exec, _mesa_ProgramEnvParameter4dARB); - SET_ProgramEnvParameter4dvARB(exec, _mesa_ProgramEnvParameter4dvARB); - SET_ProgramEnvParameter4fARB(exec, _mesa_ProgramEnvParameter4fARB); - SET_ProgramEnvParameter4fvARB(exec, _mesa_ProgramEnvParameter4fvARB); - SET_ProgramLocalParameter4dARB(exec, _mesa_ProgramLocalParameter4dARB); - SET_ProgramLocalParameter4dvARB(exec, _mesa_ProgramLocalParameter4dvARB); - SET_ProgramLocalParameter4fARB(exec, _mesa_ProgramLocalParameter4fARB); - SET_ProgramLocalParameter4fvARB(exec, _mesa_ProgramLocalParameter4fvARB); - SET_GetProgramEnvParameterdvARB(exec, _mesa_GetProgramEnvParameterdvARB); - SET_GetProgramEnvParameterfvARB(exec, _mesa_GetProgramEnvParameterfvARB); - SET_GetProgramLocalParameterdvARB(exec, _mesa_GetProgramLocalParameterdvARB); - SET_GetProgramLocalParameterfvARB(exec, _mesa_GetProgramLocalParameterfvARB); - SET_GetProgramivARB(exec, _mesa_GetProgramivARB); - SET_GetProgramStringARB(exec, _mesa_GetProgramStringARB); -#endif - - /* ARB 28. GL_ARB_vertex_buffer_object */ -#if FEATURE_ARB_vertex_buffer_object - SET_BindBufferARB(exec, _mesa_BindBufferARB); - SET_BufferDataARB(exec, _mesa_BufferDataARB); - SET_BufferSubDataARB(exec, _mesa_BufferSubDataARB); - SET_DeleteBuffersARB(exec, _mesa_DeleteBuffersARB); - SET_GenBuffersARB(exec, _mesa_GenBuffersARB); - SET_GetBufferParameterivARB(exec, _mesa_GetBufferParameterivARB); - SET_GetBufferPointervARB(exec, _mesa_GetBufferPointervARB); - SET_GetBufferSubDataARB(exec, _mesa_GetBufferSubDataARB); - SET_IsBufferARB(exec, _mesa_IsBufferARB); - SET_MapBufferARB(exec, _mesa_MapBufferARB); - SET_UnmapBufferARB(exec, _mesa_UnmapBufferARB); -#endif - - /* ARB 29. GL_ARB_occlusion_query */ - _mesa_init_queryobj_dispatch(exec); - - /* ARB 37. GL_ARB_draw_buffers */ -#if FEATURE_draw_read_buffer - SET_DrawBuffersARB(exec, _mesa_DrawBuffersARB); -#endif - - /* GL_ARB_sync */ - _mesa_init_sync_dispatch(exec); - - /* GL_ATI_fragment_shader */ - _mesa_init_ati_fragment_shader_dispatch(exec); - - /* GL_ATI_envmap_bumpmap */ - SET_GetTexBumpParameterivATI(exec, _mesa_GetTexBumpParameterivATI); - SET_GetTexBumpParameterfvATI(exec, _mesa_GetTexBumpParameterfvATI); - SET_TexBumpParameterivATI(exec, _mesa_TexBumpParameterivATI); - SET_TexBumpParameterfvATI(exec, _mesa_TexBumpParameterfvATI); - -#if FEATURE_EXT_framebuffer_object - SET_IsRenderbufferEXT(exec, _mesa_IsRenderbufferEXT); - SET_BindRenderbufferEXT(exec, _mesa_BindRenderbufferEXT); - SET_DeleteRenderbuffersEXT(exec, _mesa_DeleteRenderbuffersEXT); - SET_GenRenderbuffersEXT(exec, _mesa_GenRenderbuffersEXT); - SET_RenderbufferStorageEXT(exec, _mesa_RenderbufferStorageEXT); - SET_GetRenderbufferParameterivEXT(exec, _mesa_GetRenderbufferParameterivEXT); - SET_IsFramebufferEXT(exec, _mesa_IsFramebufferEXT); - SET_BindFramebufferEXT(exec, _mesa_BindFramebufferEXT); - SET_DeleteFramebuffersEXT(exec, _mesa_DeleteFramebuffersEXT); - SET_GenFramebuffersEXT(exec, _mesa_GenFramebuffersEXT); - SET_CheckFramebufferStatusEXT(exec, _mesa_CheckFramebufferStatusEXT); - SET_FramebufferTexture1DEXT(exec, _mesa_FramebufferTexture1DEXT); - SET_FramebufferTexture2DEXT(exec, _mesa_FramebufferTexture2DEXT); - SET_FramebufferTexture3DEXT(exec, _mesa_FramebufferTexture3DEXT); - SET_FramebufferRenderbufferEXT(exec, _mesa_FramebufferRenderbufferEXT); - SET_GetFramebufferAttachmentParameterivEXT(exec, _mesa_GetFramebufferAttachmentParameterivEXT); - SET_GenerateMipmapEXT(exec, _mesa_GenerateMipmapEXT); -#endif - -#if FEATURE_EXT_framebuffer_blit - SET_BlitFramebufferEXT(exec, _mesa_BlitFramebufferEXT); -#endif - - /* GL_EXT_gpu_program_parameters */ -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program - SET_ProgramEnvParameters4fvEXT(exec, _mesa_ProgramEnvParameters4fvEXT); - SET_ProgramLocalParameters4fvEXT(exec, _mesa_ProgramLocalParameters4fvEXT); -#endif - - /* GL_MESA_texture_array / GL_EXT_texture_array */ -#if FEATURE_EXT_framebuffer_object - SET_FramebufferTextureLayerEXT(exec, _mesa_FramebufferTextureLayerEXT); -#endif - - /* GL_ATI_separate_stencil */ - SET_StencilFuncSeparateATI(exec, _mesa_StencilFuncSeparateATI); - -#if FEATURE_ARB_framebuffer_object - /* The ARB_fbo functions are the union of - * GL_EXT_fbo, GL_EXT_framebuffer_blit, GL_EXT_texture_array - */ - SET_RenderbufferStorageMultisample(exec, _mesa_RenderbufferStorageMultisample); -#endif - -#if FEATURE_ARB_map_buffer_range - SET_MapBufferRange(exec, _mesa_MapBufferRange); - SET_FlushMappedBufferRange(exec, _mesa_FlushMappedBufferRange); -#endif - - /* GL_ARB_copy_buffer */ - SET_CopyBufferSubData(exec, _mesa_CopyBufferSubData); - - /* GL_ARB_vertex_array_object */ - SET_BindVertexArray(exec, _mesa_BindVertexArray); - SET_GenVertexArrays(exec, _mesa_GenVertexArrays); - - /* GL_EXT_draw_buffers2 */ - SET_ColorMaskIndexedEXT(exec, _mesa_ColorMaskIndexed); - SET_GetBooleanIndexedvEXT(exec, _mesa_GetBooleanIndexedv); - SET_GetIntegerIndexedvEXT(exec, _mesa_GetIntegerIndexedv); - SET_EnableIndexedEXT(exec, _mesa_EnableIndexed); - SET_DisableIndexedEXT(exec, _mesa_DisableIndexed); - SET_IsEnabledIndexedEXT(exec, _mesa_IsEnabledIndexed); - - /* GL_NV_conditional_render */ - SET_BeginConditionalRenderNV(exec, _mesa_BeginConditionalRender); - SET_EndConditionalRenderNV(exec, _mesa_EndConditionalRender); - -#if FEATURE_OES_EGL_image - SET_EGLImageTargetTexture2DOES(exec, _mesa_EGLImageTargetTexture2DOES); - SET_EGLImageTargetRenderbufferStorageOES(exec, _mesa_EGLImageTargetRenderbufferStorageOES); -#endif - -#if FEATURE_APPLE_object_purgeable - SET_ObjectPurgeableAPPLE(exec, _mesa_ObjectPurgeableAPPLE); - SET_ObjectUnpurgeableAPPLE(exec, _mesa_ObjectUnpurgeableAPPLE); - SET_GetObjectParameterivAPPLE(exec, _mesa_GetObjectParameterivAPPLE); -#endif - -#if FEATURE_ARB_geometry_shader4 - SET_FramebufferTextureARB(exec, _mesa_FramebufferTextureARB); - SET_FramebufferTextureFaceARB(exec, _mesa_FramebufferTextureFaceARB); -#endif - - SET_ClampColorARB(exec, _mesa_ClampColorARB); - - /* GL_EXT_texture_integer */ - SET_ClearColorIiEXT(exec, _mesa_ClearColorIiEXT); - SET_ClearColorIuiEXT(exec, _mesa_ClearColorIuiEXT); - SET_GetTexParameterIivEXT(exec, _mesa_GetTexParameterIiv); - SET_GetTexParameterIuivEXT(exec, _mesa_GetTexParameterIuiv); - SET_TexParameterIivEXT(exec, _mesa_TexParameterIiv); - SET_TexParameterIuivEXT(exec, _mesa_TexParameterIuiv); - - /* GL_EXT_gpu_shader4 / OpenGL 3.0 */ - SET_GetVertexAttribIivEXT(exec, _mesa_GetVertexAttribIiv); - SET_GetVertexAttribIuivEXT(exec, _mesa_GetVertexAttribIuiv); - SET_VertexAttribIPointerEXT(exec, _mesa_VertexAttribIPointer); - - /* GL 3.0 (functions not covered by other extensions) */ - SET_ClearBufferiv(exec, _mesa_ClearBufferiv); - SET_ClearBufferuiv(exec, _mesa_ClearBufferuiv); - SET_ClearBufferfv(exec, _mesa_ClearBufferfv); - SET_ClearBufferfi(exec, _mesa_ClearBufferfi); - SET_GetStringi(exec, _mesa_GetStringi); - SET_ClampColor(exec, _mesa_ClampColorARB); - - /* GL_ARB_instanced_arrays */ - SET_VertexAttribDivisorARB(exec, _mesa_VertexAttribDivisor); - - /* GL_ARB_draw_buffer_blend */ - SET_BlendFunciARB(exec, _mesa_BlendFunci); - SET_BlendFuncSeparateiARB(exec, _mesa_BlendFuncSeparatei); - SET_BlendEquationiARB(exec, _mesa_BlendEquationi); - SET_BlendEquationSeparateiARB(exec, _mesa_BlendEquationSeparatei); - - /* GL_NV_texture_barrier */ - SET_TextureBarrierNV(exec, _mesa_TextureBarrierNV); - - return exec; -} - -#endif /* FEATURE_GL */ +/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ *
+ * 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
+ * BRIAN PAUL 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.
+ */
+
+
+/**
+ * \file api_exec.c
+ * Initialize dispatch table with the immidiate mode functions.
+ */
+
+
+#include "mfeatures.h"
+#include "accum.h"
+#include "api_loopback.h"
+#include "api_exec.h"
+#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
+#include "arbprogram.h"
+#endif
+#include "atifragshader.h"
+#include "attrib.h"
+#include "blend.h"
+#if FEATURE_ARB_vertex_buffer_object
+#include "bufferobj.h"
+#endif
+#include "arrayobj.h"
+#if FEATURE_draw_read_buffer
+#include "buffers.h"
+#endif
+#include "clear.h"
+#include "clip.h"
+#include "colortab.h"
+#include "condrender.h"
+#include "context.h"
+#include "convolve.h"
+#include "depth.h"
+#include "dlist.h"
+#include "drawpix.h"
+#include "rastpos.h"
+#include "enable.h"
+#include "eval.h"
+#include "get.h"
+#include "feedback.h"
+#include "fog.h"
+#if FEATURE_EXT_framebuffer_object
+#include "fbobject.h"
+#endif
+#include "framebuffer.h"
+#include "hint.h"
+#include "histogram.h"
+#include "imports.h"
+#include "light.h"
+#include "lines.h"
+#include "matrix.h"
+#include "multisample.h"
+#include "pixel.h"
+#include "pixelstore.h"
+#include "points.h"
+#include "polygon.h"
+#include "queryobj.h"
+#include "readpix.h"
+#include "scissor.h"
+#include "stencil.h"
+#include "texenv.h"
+#include "texgetimage.h"
+#include "teximage.h"
+#include "texgen.h"
+#include "texobj.h"
+#include "texparam.h"
+#include "texstate.h"
+#include "texturebarrier.h"
+#include "transformfeedback.h"
+#include "mtypes.h"
+#include "varray.h"
+#include "viewport.h"
+#if FEATURE_NV_vertex_program || FEATURE_NV_fragment_program
+#include "nvprogram.h"
+#endif
+#if FEATURE_ARB_shader_objects
+#include "shaderapi.h"
+#include "uniforms.h"
+#endif
+#include "syncobj.h"
+#include "main/dispatch.h"
+
+
+#if FEATURE_GL
+
+
+/**
+ * Initialize a dispatch table with pointers to Mesa's immediate-mode
+ * commands.
+ *
+ * Pointers to glBegin()/glEnd() object commands and a few others
+ * are provided via the GLvertexformat interface.
+ *
+ * \param ctx GL context to which \c exec belongs.
+ * \param exec dispatch table.
+ */
+struct _glapi_table *
+_mesa_create_exec_table(void)
+{
+ struct _glapi_table *exec;
+
+ exec = _mesa_alloc_dispatch_table(_gloffset_COUNT);
+ if (exec == NULL)
+ return NULL;
+
+#if _HAVE_FULL_GL
+ _mesa_loopback_init_api_table( exec );
+#endif
+
+ /* load the dispatch slots we understand */
+ SET_AlphaFunc(exec, _mesa_AlphaFunc);
+ SET_BlendFunc(exec, _mesa_BlendFunc);
+ SET_Clear(exec, _mesa_Clear);
+ SET_ClearColor(exec, _mesa_ClearColor);
+ SET_ClearStencil(exec, _mesa_ClearStencil);
+ SET_ColorMask(exec, _mesa_ColorMask);
+ SET_CullFace(exec, _mesa_CullFace);
+ SET_Disable(exec, _mesa_Disable);
+#if FEATURE_draw_read_buffer
+ SET_DrawBuffer(exec, _mesa_DrawBuffer);
+ SET_ReadBuffer(exec, _mesa_ReadBuffer);
+#endif
+ SET_Enable(exec, _mesa_Enable);
+ SET_Finish(exec, _mesa_Finish);
+ SET_Flush(exec, _mesa_Flush);
+ SET_FrontFace(exec, _mesa_FrontFace);
+ SET_Frustum(exec, _mesa_Frustum);
+ SET_GetError(exec, _mesa_GetError);
+ SET_GetFloatv(exec, _mesa_GetFloatv);
+ SET_GetString(exec, _mesa_GetString);
+ SET_LineStipple(exec, _mesa_LineStipple);
+ SET_LineWidth(exec, _mesa_LineWidth);
+ SET_LoadIdentity(exec, _mesa_LoadIdentity);
+ SET_LoadMatrixf(exec, _mesa_LoadMatrixf);
+ SET_LogicOp(exec, _mesa_LogicOp);
+ SET_MatrixMode(exec, _mesa_MatrixMode);
+ SET_MultMatrixf(exec, _mesa_MultMatrixf);
+ SET_Ortho(exec, _mesa_Ortho);
+ SET_PixelStorei(exec, _mesa_PixelStorei);
+ SET_PopMatrix(exec, _mesa_PopMatrix);
+ SET_PushMatrix(exec, _mesa_PushMatrix);
+ SET_Rotatef(exec, _mesa_Rotatef);
+ SET_Scalef(exec, _mesa_Scalef);
+ SET_Scissor(exec, _mesa_Scissor);
+ SET_ShadeModel(exec, _mesa_ShadeModel);
+ SET_StencilFunc(exec, _mesa_StencilFunc);
+ SET_StencilMask(exec, _mesa_StencilMask);
+ SET_StencilOp(exec, _mesa_StencilOp);
+ SET_TexEnvfv(exec, _mesa_TexEnvfv);
+ SET_TexEnvi(exec, _mesa_TexEnvi);
+ SET_TexImage2D(exec, _mesa_TexImage2D);
+ SET_TexParameteri(exec, _mesa_TexParameteri);
+ SET_Translatef(exec, _mesa_Translatef);
+ SET_Viewport(exec, _mesa_Viewport);
+
+ _mesa_init_accum_dispatch(exec);
+ _mesa_init_dlist_dispatch(exec);
+
+ SET_ClearDepth(exec, _mesa_ClearDepth);
+ SET_ClearIndex(exec, _mesa_ClearIndex);
+ SET_ClipPlane(exec, _mesa_ClipPlane);
+ SET_ColorMaterial(exec, _mesa_ColorMaterial);
+ SET_DepthFunc(exec, _mesa_DepthFunc);
+ SET_DepthMask(exec, _mesa_DepthMask);
+ SET_DepthRange(exec, _mesa_DepthRange);
+
+ _mesa_init_drawpix_dispatch(exec);
+ _mesa_init_feedback_dispatch(exec);
+
+ SET_FogCoordPointerEXT(exec, _mesa_FogCoordPointerEXT);
+ SET_Fogf(exec, _mesa_Fogf);
+ SET_Fogfv(exec, _mesa_Fogfv);
+ SET_Fogi(exec, _mesa_Fogi);
+ SET_Fogiv(exec, _mesa_Fogiv);
+ SET_GetClipPlane(exec, _mesa_GetClipPlane);
+ SET_GetBooleanv(exec, _mesa_GetBooleanv);
+ SET_GetDoublev(exec, _mesa_GetDoublev);
+ SET_GetIntegerv(exec, _mesa_GetIntegerv);
+ SET_GetLightfv(exec, _mesa_GetLightfv);
+ SET_GetLightiv(exec, _mesa_GetLightiv);
+ SET_GetMaterialfv(exec, _mesa_GetMaterialfv);
+ SET_GetMaterialiv(exec, _mesa_GetMaterialiv);
+ SET_GetPolygonStipple(exec, _mesa_GetPolygonStipple);
+ SET_GetTexEnvfv(exec, _mesa_GetTexEnvfv);
+ SET_GetTexEnviv(exec, _mesa_GetTexEnviv);
+ SET_GetTexLevelParameterfv(exec, _mesa_GetTexLevelParameterfv);
+ SET_GetTexLevelParameteriv(exec, _mesa_GetTexLevelParameteriv);
+ SET_GetTexParameterfv(exec, _mesa_GetTexParameterfv);
+ SET_GetTexParameteriv(exec, _mesa_GetTexParameteriv);
+ SET_GetTexImage(exec, _mesa_GetTexImage);
+ SET_Hint(exec, _mesa_Hint);
+ SET_IndexMask(exec, _mesa_IndexMask);
+ SET_IsEnabled(exec, _mesa_IsEnabled);
+ SET_LightModelf(exec, _mesa_LightModelf);
+ SET_LightModelfv(exec, _mesa_LightModelfv);
+ SET_LightModeli(exec, _mesa_LightModeli);
+ SET_LightModeliv(exec, _mesa_LightModeliv);
+ SET_Lightf(exec, _mesa_Lightf);
+ SET_Lightfv(exec, _mesa_Lightfv);
+ SET_Lighti(exec, _mesa_Lighti);
+ SET_Lightiv(exec, _mesa_Lightiv);
+ SET_LoadMatrixd(exec, _mesa_LoadMatrixd);
+
+ _mesa_init_eval_dispatch(exec);
+
+ SET_MultMatrixd(exec, _mesa_MultMatrixd);
+
+ _mesa_init_pixel_dispatch(exec);
+
+ SET_PixelStoref(exec, _mesa_PixelStoref);
+ SET_PointSize(exec, _mesa_PointSize);
+ SET_PolygonMode(exec, _mesa_PolygonMode);
+ SET_PolygonOffset(exec, _mesa_PolygonOffset);
+ SET_PolygonStipple(exec, _mesa_PolygonStipple);
+
+ _mesa_init_attrib_dispatch(exec);
+ _mesa_init_rastpos_dispatch(exec);
+
+ SET_ReadPixels(exec, _mesa_ReadPixels);
+ SET_Rotated(exec, _mesa_Rotated);
+ SET_Scaled(exec, _mesa_Scaled);
+ SET_SecondaryColorPointerEXT(exec, _mesa_SecondaryColorPointerEXT);
+ SET_TexEnvf(exec, _mesa_TexEnvf);
+ SET_TexEnviv(exec, _mesa_TexEnviv);
+
+ _mesa_init_texgen_dispatch(exec);
+
+ SET_TexImage1D(exec, _mesa_TexImage1D);
+ SET_TexParameterf(exec, _mesa_TexParameterf);
+ SET_TexParameterfv(exec, _mesa_TexParameterfv);
+ SET_TexParameteriv(exec, _mesa_TexParameteriv);
+ SET_Translated(exec, _mesa_Translated);
+
+ /* 1.1 */
+ SET_BindTexture(exec, _mesa_BindTexture);
+ SET_DeleteTextures(exec, _mesa_DeleteTextures);
+ SET_GenTextures(exec, _mesa_GenTextures);
+#if _HAVE_FULL_GL
+ SET_AreTexturesResident(exec, _mesa_AreTexturesResident);
+ SET_ColorPointer(exec, _mesa_ColorPointer);
+ SET_CopyTexImage1D(exec, _mesa_CopyTexImage1D);
+ SET_CopyTexImage2D(exec, _mesa_CopyTexImage2D);
+ SET_CopyTexSubImage1D(exec, _mesa_CopyTexSubImage1D);
+ SET_CopyTexSubImage2D(exec, _mesa_CopyTexSubImage2D);
+ SET_DisableClientState(exec, _mesa_DisableClientState);
+ SET_EdgeFlagPointer(exec, _mesa_EdgeFlagPointer);
+ SET_EnableClientState(exec, _mesa_EnableClientState);
+ SET_GetPointerv(exec, _mesa_GetPointerv);
+ SET_IndexPointer(exec, _mesa_IndexPointer);
+ SET_InterleavedArrays(exec, _mesa_InterleavedArrays);
+ SET_IsTexture(exec, _mesa_IsTexture);
+ SET_NormalPointer(exec, _mesa_NormalPointer);
+ SET_PrioritizeTextures(exec, _mesa_PrioritizeTextures);
+ SET_TexCoordPointer(exec, _mesa_TexCoordPointer);
+ SET_TexSubImage1D(exec, _mesa_TexSubImage1D);
+ SET_TexSubImage2D(exec, _mesa_TexSubImage2D);
+ SET_VertexPointer(exec, _mesa_VertexPointer);
+#endif
+
+ /* 1.2 */
+#if _HAVE_FULL_GL
+ SET_CopyTexSubImage3D(exec, _mesa_CopyTexSubImage3D);
+ SET_TexImage3D(exec, _mesa_TexImage3D);
+ SET_TexSubImage3D(exec, _mesa_TexSubImage3D);
+#endif
+
+ /* OpenGL 1.2 GL_ARB_imaging */
+ SET_BlendColor(exec, _mesa_BlendColor);
+ SET_BlendEquation(exec, _mesa_BlendEquation);
+ SET_BlendEquationSeparateEXT(exec, _mesa_BlendEquationSeparateEXT);
+
+ _mesa_init_colortable_dispatch(exec);
+ _mesa_init_convolve_dispatch(exec);
+ _mesa_init_histogram_dispatch(exec);
+
+ /* OpenGL 2.0 */
+ SET_StencilFuncSeparate(exec, _mesa_StencilFuncSeparate);
+ SET_StencilMaskSeparate(exec, _mesa_StencilMaskSeparate);
+ SET_StencilOpSeparate(exec, _mesa_StencilOpSeparate);
+
+#if FEATURE_ARB_shader_objects
+ _mesa_init_shader_dispatch(exec);
+ _mesa_init_shader_uniform_dispatch(exec);
+#endif
+
+ /* 2. GL_EXT_blend_color */
+#if 0
+/* SET_BlendColorEXT(exec, _mesa_BlendColorEXT); */
+#endif
+
+ /* 3. GL_EXT_polygon_offset */
+#if _HAVE_FULL_GL
+ SET_PolygonOffsetEXT(exec, _mesa_PolygonOffsetEXT);
+#endif
+
+ /* 6. GL_EXT_texture3d */
+#if 0
+/* SET_CopyTexSubImage3DEXT(exec, _mesa_CopyTexSubImage3D); */
+/* SET_TexImage3DEXT(exec, _mesa_TexImage3DEXT); */
+/* SET_TexSubImage3DEXT(exec, _mesa_TexSubImage3D); */
+#endif
+
+ /* 11. GL_EXT_histogram */
+#if 0
+ SET_GetHistogramEXT(exec, _mesa_GetHistogram);
+ SET_GetHistogramParameterfvEXT(exec, _mesa_GetHistogramParameterfv);
+ SET_GetHistogramParameterivEXT(exec, _mesa_GetHistogramParameteriv);
+ SET_GetMinmaxEXT(exec, _mesa_GetMinmax);
+ SET_GetMinmaxParameterfvEXT(exec, _mesa_GetMinmaxParameterfv);
+ SET_GetMinmaxParameterivEXT(exec, _mesa_GetMinmaxParameteriv);
+#endif
+
+ /* 14. SGI_color_table */
+#if 0
+ SET_ColorTableSGI(exec, _mesa_ColorTable);
+ SET_ColorSubTableSGI(exec, _mesa_ColorSubTable);
+ SET_GetColorTableSGI(exec, _mesa_GetColorTable);
+ SET_GetColorTableParameterfvSGI(exec, _mesa_GetColorTableParameterfv);
+ SET_GetColorTableParameterivSGI(exec, _mesa_GetColorTableParameteriv);
+#endif
+
+ /* 30. GL_EXT_vertex_array */
+#if _HAVE_FULL_GL
+ SET_ColorPointerEXT(exec, _mesa_ColorPointerEXT);
+ SET_EdgeFlagPointerEXT(exec, _mesa_EdgeFlagPointerEXT);
+ SET_IndexPointerEXT(exec, _mesa_IndexPointerEXT);
+ SET_NormalPointerEXT(exec, _mesa_NormalPointerEXT);
+ SET_TexCoordPointerEXT(exec, _mesa_TexCoordPointerEXT);
+ SET_VertexPointerEXT(exec, _mesa_VertexPointerEXT);
+#endif
+
+ /* 37. GL_EXT_blend_minmax */
+#if 0
+ SET_BlendEquationEXT(exec, _mesa_BlendEquationEXT);
+#endif
+
+ /* 54. GL_EXT_point_parameters */
+#if _HAVE_FULL_GL
+ SET_PointParameterfEXT(exec, _mesa_PointParameterf);
+ SET_PointParameterfvEXT(exec, _mesa_PointParameterfv);
+#endif
+
+ /* 95. GL_ARB_ES2_compatibility */
+ SET_ClearDepthf(exec, _mesa_ClearDepthf);
+ SET_DepthRangef(exec, _mesa_DepthRangef);
+
+ /* 97. GL_EXT_compiled_vertex_array */
+#if _HAVE_FULL_GL
+ SET_LockArraysEXT(exec, _mesa_LockArraysEXT);
+ SET_UnlockArraysEXT(exec, _mesa_UnlockArraysEXT);
+#endif
+
+ /* 148. GL_EXT_multi_draw_arrays */
+#if _HAVE_FULL_GL
+ SET_MultiDrawArraysEXT(exec, _mesa_MultiDrawArraysEXT);
+#endif
+
+ /* 173. GL_INGR_blend_func_separate */
+#if _HAVE_FULL_GL
+ SET_BlendFuncSeparateEXT(exec, _mesa_BlendFuncSeparateEXT);
+#endif
+
+ /* 196. GL_MESA_resize_buffers */
+#if _HAVE_FULL_GL
+ SET_ResizeBuffersMESA(exec, _mesa_ResizeBuffersMESA);
+#endif
+
+ /* 197. GL_MESA_window_pos */
+ /* part of _mesa_init_rastpos_dispatch(exec); */
+
+ /* 200. GL_IBM_multimode_draw_arrays */
+#if _HAVE_FULL_GL
+ SET_MultiModeDrawArraysIBM(exec, _mesa_MultiModeDrawArraysIBM);
+ SET_MultiModeDrawElementsIBM(exec, _mesa_MultiModeDrawElementsIBM);
+#endif
+
+ /* 233. GL_NV_vertex_program */
+#if FEATURE_NV_vertex_program
+ SET_BindProgramNV(exec, _mesa_BindProgram);
+ SET_DeleteProgramsNV(exec, _mesa_DeletePrograms);
+ SET_ExecuteProgramNV(exec, _mesa_ExecuteProgramNV);
+ SET_GenProgramsNV(exec, _mesa_GenPrograms);
+ SET_AreProgramsResidentNV(exec, _mesa_AreProgramsResidentNV);
+ SET_RequestResidentProgramsNV(exec, _mesa_RequestResidentProgramsNV);
+ SET_GetProgramParameterfvNV(exec, _mesa_GetProgramParameterfvNV);
+ SET_GetProgramParameterdvNV(exec, _mesa_GetProgramParameterdvNV);
+ SET_GetProgramivNV(exec, _mesa_GetProgramivNV);
+ SET_GetProgramStringNV(exec, _mesa_GetProgramStringNV);
+ SET_GetTrackMatrixivNV(exec, _mesa_GetTrackMatrixivNV);
+ SET_GetVertexAttribdvNV(exec, _mesa_GetVertexAttribdvNV);
+ SET_GetVertexAttribfvNV(exec, _mesa_GetVertexAttribfvNV);
+ SET_GetVertexAttribivNV(exec, _mesa_GetVertexAttribivNV);
+ SET_GetVertexAttribPointervNV(exec, _mesa_GetVertexAttribPointervNV);
+ SET_IsProgramNV(exec, _mesa_IsProgramARB);
+ SET_LoadProgramNV(exec, _mesa_LoadProgramNV);
+ SET_ProgramEnvParameter4dARB(exec, _mesa_ProgramEnvParameter4dARB); /* alias to ProgramParameter4dNV */
+ SET_ProgramEnvParameter4dvARB(exec, _mesa_ProgramEnvParameter4dvARB); /* alias to ProgramParameter4dvNV */
+ SET_ProgramEnvParameter4fARB(exec, _mesa_ProgramEnvParameter4fARB); /* alias to ProgramParameter4fNV */
+ SET_ProgramEnvParameter4fvARB(exec, _mesa_ProgramEnvParameter4fvARB); /* alias to ProgramParameter4fvNV */
+ SET_ProgramParameters4dvNV(exec, _mesa_ProgramParameters4dvNV);
+ SET_ProgramParameters4fvNV(exec, _mesa_ProgramParameters4fvNV);
+ SET_TrackMatrixNV(exec, _mesa_TrackMatrixNV);
+ SET_VertexAttribPointerNV(exec, _mesa_VertexAttribPointerNV);
+ /* glVertexAttrib*NV functions handled in api_loopback.c */
+#endif
+
+ /* 273. GL_APPLE_vertex_array_object */
+ SET_BindVertexArrayAPPLE(exec, _mesa_BindVertexArrayAPPLE);
+ SET_DeleteVertexArraysAPPLE(exec, _mesa_DeleteVertexArraysAPPLE);
+ SET_GenVertexArraysAPPLE(exec, _mesa_GenVertexArraysAPPLE);
+ SET_IsVertexArrayAPPLE(exec, _mesa_IsVertexArrayAPPLE);
+
+ /* 282. GL_NV_fragment_program */
+#if FEATURE_NV_fragment_program
+ SET_ProgramNamedParameter4fNV(exec, _mesa_ProgramNamedParameter4fNV);
+ SET_ProgramNamedParameter4dNV(exec, _mesa_ProgramNamedParameter4dNV);
+ SET_ProgramNamedParameter4fvNV(exec, _mesa_ProgramNamedParameter4fvNV);
+ SET_ProgramNamedParameter4dvNV(exec, _mesa_ProgramNamedParameter4dvNV);
+ SET_GetProgramNamedParameterfvNV(exec, _mesa_GetProgramNamedParameterfvNV);
+ SET_GetProgramNamedParameterdvNV(exec, _mesa_GetProgramNamedParameterdvNV);
+ SET_ProgramLocalParameter4dARB(exec, _mesa_ProgramLocalParameter4dARB);
+ SET_ProgramLocalParameter4dvARB(exec, _mesa_ProgramLocalParameter4dvARB);
+ SET_ProgramLocalParameter4fARB(exec, _mesa_ProgramLocalParameter4fARB);
+ SET_ProgramLocalParameter4fvARB(exec, _mesa_ProgramLocalParameter4fvARB);
+ SET_GetProgramLocalParameterdvARB(exec, _mesa_GetProgramLocalParameterdvARB);
+ SET_GetProgramLocalParameterfvARB(exec, _mesa_GetProgramLocalParameterfvARB);
+#endif
+
+ /* 262. GL_NV_point_sprite */
+#if _HAVE_FULL_GL
+ SET_PointParameteriNV(exec, _mesa_PointParameteri);
+ SET_PointParameterivNV(exec, _mesa_PointParameteriv);
+#endif
+
+ /* 268. GL_EXT_stencil_two_side */
+#if _HAVE_FULL_GL
+ SET_ActiveStencilFaceEXT(exec, _mesa_ActiveStencilFaceEXT);
+#endif
+
+ /* 285. GL_NV_primitive_restart */
+ SET_PrimitiveRestartIndexNV(exec, _mesa_PrimitiveRestartIndex);
+
+ /* ???. GL_EXT_depth_bounds_test */
+ SET_DepthBoundsEXT(exec, _mesa_DepthBoundsEXT);
+
+ /* 352. GL_EXT_transform_feedback */
+ _mesa_init_transform_feedback_dispatch(exec);
+
+ /* 364. GL_EXT_provoking_vertex */
+ SET_ProvokingVertexEXT(exec, _mesa_ProvokingVertexEXT);
+
+ /* ARB 1. GL_ARB_multitexture */
+#if _HAVE_FULL_GL
+ SET_ActiveTextureARB(exec, _mesa_ActiveTextureARB);
+ SET_ClientActiveTextureARB(exec, _mesa_ClientActiveTextureARB);
+#endif
+
+ /* ARB 3. GL_ARB_transpose_matrix */
+#if _HAVE_FULL_GL
+ SET_LoadTransposeMatrixdARB(exec, _mesa_LoadTransposeMatrixdARB);
+ SET_LoadTransposeMatrixfARB(exec, _mesa_LoadTransposeMatrixfARB);
+ SET_MultTransposeMatrixdARB(exec, _mesa_MultTransposeMatrixdARB);
+ SET_MultTransposeMatrixfARB(exec, _mesa_MultTransposeMatrixfARB);
+#endif
+
+ /* ARB 5. GL_ARB_multisample */
+#if _HAVE_FULL_GL
+ SET_SampleCoverageARB(exec, _mesa_SampleCoverageARB);
+#endif
+
+ /* ARB 12. GL_ARB_texture_compression */
+#if _HAVE_FULL_GL
+ SET_CompressedTexImage3DARB(exec, _mesa_CompressedTexImage3DARB);
+ SET_CompressedTexImage2DARB(exec, _mesa_CompressedTexImage2DARB);
+ SET_CompressedTexImage1DARB(exec, _mesa_CompressedTexImage1DARB);
+ SET_CompressedTexSubImage3DARB(exec, _mesa_CompressedTexSubImage3DARB);
+ SET_CompressedTexSubImage2DARB(exec, _mesa_CompressedTexSubImage2DARB);
+ SET_CompressedTexSubImage1DARB(exec, _mesa_CompressedTexSubImage1DARB);
+ SET_GetCompressedTexImageARB(exec, _mesa_GetCompressedTexImageARB);
+#endif
+
+ /* ARB 14. GL_ARB_point_parameters */
+ /* reuse EXT_point_parameters functions */
+
+ /* ARB 26. GL_ARB_vertex_program */
+ /* ARB 27. GL_ARB_fragment_program */
+#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
+ /* glVertexAttrib1sARB aliases glVertexAttrib1sNV */
+ /* glVertexAttrib1fARB aliases glVertexAttrib1fNV */
+ /* glVertexAttrib1dARB aliases glVertexAttrib1dNV */
+ /* glVertexAttrib2sARB aliases glVertexAttrib2sNV */
+ /* glVertexAttrib2fARB aliases glVertexAttrib2fNV */
+ /* glVertexAttrib2dARB aliases glVertexAttrib2dNV */
+ /* glVertexAttrib3sARB aliases glVertexAttrib3sNV */
+ /* glVertexAttrib3fARB aliases glVertexAttrib3fNV */
+ /* glVertexAttrib3dARB aliases glVertexAttrib3dNV */
+ /* glVertexAttrib4sARB aliases glVertexAttrib4sNV */
+ /* glVertexAttrib4fARB aliases glVertexAttrib4fNV */
+ /* glVertexAttrib4dARB aliases glVertexAttrib4dNV */
+ /* glVertexAttrib4NubARB aliases glVertexAttrib4NubNV */
+ /* glVertexAttrib1svARB aliases glVertexAttrib1svNV */
+ /* glVertexAttrib1fvARB aliases glVertexAttrib1fvNV */
+ /* glVertexAttrib1dvARB aliases glVertexAttrib1dvNV */
+ /* glVertexAttrib2svARB aliases glVertexAttrib2svNV */
+ /* glVertexAttrib2fvARB aliases glVertexAttrib2fvNV */
+ /* glVertexAttrib2dvARB aliases glVertexAttrib2dvNV */
+ /* glVertexAttrib3svARB aliases glVertexAttrib3svNV */
+ /* glVertexAttrib3fvARB aliases glVertexAttrib3fvNV */
+ /* glVertexAttrib3dvARB aliases glVertexAttrib3dvNV */
+ /* glVertexAttrib4svARB aliases glVertexAttrib4svNV */
+ /* glVertexAttrib4fvARB aliases glVertexAttrib4fvNV */
+ /* glVertexAttrib4dvARB aliases glVertexAttrib4dvNV */
+ /* glVertexAttrib4NubvARB aliases glVertexAttrib4NubvNV */
+ /* glVertexAttrib4bvARB handled in api_loopback.c */
+ /* glVertexAttrib4ivARB handled in api_loopback.c */
+ /* glVertexAttrib4ubvARB handled in api_loopback.c */
+ /* glVertexAttrib4usvARB handled in api_loopback.c */
+ /* glVertexAttrib4uivARB handled in api_loopback.c */
+ /* glVertexAttrib4NbvARB handled in api_loopback.c */
+ /* glVertexAttrib4NsvARB handled in api_loopback.c */
+ /* glVertexAttrib4NivARB handled in api_loopback.c */
+ /* glVertexAttrib4NusvARB handled in api_loopback.c */
+ /* glVertexAttrib4NuivARB handled in api_loopback.c */
+ SET_VertexAttribPointerARB(exec, _mesa_VertexAttribPointerARB);
+ SET_EnableVertexAttribArrayARB(exec, _mesa_EnableVertexAttribArrayARB);
+ SET_DisableVertexAttribArrayARB(exec, _mesa_DisableVertexAttribArrayARB);
+ SET_ProgramStringARB(exec, _mesa_ProgramStringARB);
+ /* glBindProgramARB aliases glBindProgramNV */
+ /* glDeleteProgramsARB aliases glDeleteProgramsNV */
+ /* glGenProgramsARB aliases glGenProgramsNV */
+ /* glIsProgramARB aliases glIsProgramNV */
+ SET_GetVertexAttribdvARB(exec, _mesa_GetVertexAttribdvARB);
+ SET_GetVertexAttribfvARB(exec, _mesa_GetVertexAttribfvARB);
+ SET_GetVertexAttribivARB(exec, _mesa_GetVertexAttribivARB);
+ /* glGetVertexAttribPointervARB aliases glGetVertexAttribPointervNV */
+ SET_ProgramEnvParameter4dARB(exec, _mesa_ProgramEnvParameter4dARB);
+ SET_ProgramEnvParameter4dvARB(exec, _mesa_ProgramEnvParameter4dvARB);
+ SET_ProgramEnvParameter4fARB(exec, _mesa_ProgramEnvParameter4fARB);
+ SET_ProgramEnvParameter4fvARB(exec, _mesa_ProgramEnvParameter4fvARB);
+ SET_ProgramLocalParameter4dARB(exec, _mesa_ProgramLocalParameter4dARB);
+ SET_ProgramLocalParameter4dvARB(exec, _mesa_ProgramLocalParameter4dvARB);
+ SET_ProgramLocalParameter4fARB(exec, _mesa_ProgramLocalParameter4fARB);
+ SET_ProgramLocalParameter4fvARB(exec, _mesa_ProgramLocalParameter4fvARB);
+ SET_GetProgramEnvParameterdvARB(exec, _mesa_GetProgramEnvParameterdvARB);
+ SET_GetProgramEnvParameterfvARB(exec, _mesa_GetProgramEnvParameterfvARB);
+ SET_GetProgramLocalParameterdvARB(exec, _mesa_GetProgramLocalParameterdvARB);
+ SET_GetProgramLocalParameterfvARB(exec, _mesa_GetProgramLocalParameterfvARB);
+ SET_GetProgramivARB(exec, _mesa_GetProgramivARB);
+ SET_GetProgramStringARB(exec, _mesa_GetProgramStringARB);
+#endif
+
+ /* ARB 28. GL_ARB_vertex_buffer_object */
+#if FEATURE_ARB_vertex_buffer_object
+ SET_BindBufferARB(exec, _mesa_BindBufferARB);
+ SET_BufferDataARB(exec, _mesa_BufferDataARB);
+ SET_BufferSubDataARB(exec, _mesa_BufferSubDataARB);
+ SET_DeleteBuffersARB(exec, _mesa_DeleteBuffersARB);
+ SET_GenBuffersARB(exec, _mesa_GenBuffersARB);
+ SET_GetBufferParameterivARB(exec, _mesa_GetBufferParameterivARB);
+ SET_GetBufferPointervARB(exec, _mesa_GetBufferPointervARB);
+ SET_GetBufferSubDataARB(exec, _mesa_GetBufferSubDataARB);
+ SET_IsBufferARB(exec, _mesa_IsBufferARB);
+ SET_MapBufferARB(exec, _mesa_MapBufferARB);
+ SET_UnmapBufferARB(exec, _mesa_UnmapBufferARB);
+#endif
+
+ /* ARB 29. GL_ARB_occlusion_query */
+ _mesa_init_queryobj_dispatch(exec);
+
+ /* ARB 37. GL_ARB_draw_buffers */
+#if FEATURE_draw_read_buffer
+ SET_DrawBuffersARB(exec, _mesa_DrawBuffersARB);
+#endif
+
+ /* GL_ARB_sync */
+ _mesa_init_sync_dispatch(exec);
+
+ /* GL_ATI_fragment_shader */
+ _mesa_init_ati_fragment_shader_dispatch(exec);
+
+ /* GL_ATI_envmap_bumpmap */
+ SET_GetTexBumpParameterivATI(exec, _mesa_GetTexBumpParameterivATI);
+ SET_GetTexBumpParameterfvATI(exec, _mesa_GetTexBumpParameterfvATI);
+ SET_TexBumpParameterivATI(exec, _mesa_TexBumpParameterivATI);
+ SET_TexBumpParameterfvATI(exec, _mesa_TexBumpParameterfvATI);
+
+#if FEATURE_EXT_framebuffer_object
+ SET_IsRenderbufferEXT(exec, _mesa_IsRenderbufferEXT);
+ SET_BindRenderbufferEXT(exec, _mesa_BindRenderbufferEXT);
+ SET_DeleteRenderbuffersEXT(exec, _mesa_DeleteRenderbuffersEXT);
+ SET_GenRenderbuffersEXT(exec, _mesa_GenRenderbuffersEXT);
+ SET_RenderbufferStorageEXT(exec, _mesa_RenderbufferStorageEXT);
+ SET_GetRenderbufferParameterivEXT(exec, _mesa_GetRenderbufferParameterivEXT);
+ SET_IsFramebufferEXT(exec, _mesa_IsFramebufferEXT);
+ SET_BindFramebufferEXT(exec, _mesa_BindFramebufferEXT);
+ SET_DeleteFramebuffersEXT(exec, _mesa_DeleteFramebuffersEXT);
+ SET_GenFramebuffersEXT(exec, _mesa_GenFramebuffersEXT);
+ SET_CheckFramebufferStatusEXT(exec, _mesa_CheckFramebufferStatusEXT);
+ SET_FramebufferTexture1DEXT(exec, _mesa_FramebufferTexture1DEXT);
+ SET_FramebufferTexture2DEXT(exec, _mesa_FramebufferTexture2DEXT);
+ SET_FramebufferTexture3DEXT(exec, _mesa_FramebufferTexture3DEXT);
+ SET_FramebufferRenderbufferEXT(exec, _mesa_FramebufferRenderbufferEXT);
+ SET_GetFramebufferAttachmentParameterivEXT(exec, _mesa_GetFramebufferAttachmentParameterivEXT);
+ SET_GenerateMipmapEXT(exec, _mesa_GenerateMipmapEXT);
+#endif
+
+#if FEATURE_EXT_framebuffer_blit
+ SET_BlitFramebufferEXT(exec, _mesa_BlitFramebufferEXT);
+#endif
+
+ /* GL_EXT_gpu_program_parameters */
+#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
+ SET_ProgramEnvParameters4fvEXT(exec, _mesa_ProgramEnvParameters4fvEXT);
+ SET_ProgramLocalParameters4fvEXT(exec, _mesa_ProgramLocalParameters4fvEXT);
+#endif
+
+ /* GL_MESA_texture_array / GL_EXT_texture_array */
+#if FEATURE_EXT_framebuffer_object
+ SET_FramebufferTextureLayerEXT(exec, _mesa_FramebufferTextureLayerEXT);
+#endif
+
+ /* GL_ATI_separate_stencil */
+ SET_StencilFuncSeparateATI(exec, _mesa_StencilFuncSeparateATI);
+
+#if FEATURE_ARB_framebuffer_object
+ /* The ARB_fbo functions are the union of
+ * GL_EXT_fbo, GL_EXT_framebuffer_blit, GL_EXT_texture_array
+ */
+ SET_RenderbufferStorageMultisample(exec, _mesa_RenderbufferStorageMultisample);
+#endif
+
+#if FEATURE_ARB_map_buffer_range
+ SET_MapBufferRange(exec, _mesa_MapBufferRange);
+ SET_FlushMappedBufferRange(exec, _mesa_FlushMappedBufferRange);
+#endif
+
+ /* GL_ARB_copy_buffer */
+ SET_CopyBufferSubData(exec, _mesa_CopyBufferSubData);
+
+ /* GL_ARB_vertex_array_object */
+ SET_BindVertexArray(exec, _mesa_BindVertexArray);
+ SET_GenVertexArrays(exec, _mesa_GenVertexArrays);
+
+ /* GL_EXT_draw_buffers2 */
+ SET_ColorMaskIndexedEXT(exec, _mesa_ColorMaskIndexed);
+ SET_GetBooleanIndexedvEXT(exec, _mesa_GetBooleanIndexedv);
+ SET_GetIntegerIndexedvEXT(exec, _mesa_GetIntegerIndexedv);
+ SET_EnableIndexedEXT(exec, _mesa_EnableIndexed);
+ SET_DisableIndexedEXT(exec, _mesa_DisableIndexed);
+ SET_IsEnabledIndexedEXT(exec, _mesa_IsEnabledIndexed);
+
+ /* GL_NV_conditional_render */
+ SET_BeginConditionalRenderNV(exec, _mesa_BeginConditionalRender);
+ SET_EndConditionalRenderNV(exec, _mesa_EndConditionalRender);
+
+#if FEATURE_OES_EGL_image
+ SET_EGLImageTargetTexture2DOES(exec, _mesa_EGLImageTargetTexture2DOES);
+ SET_EGLImageTargetRenderbufferStorageOES(exec, _mesa_EGLImageTargetRenderbufferStorageOES);
+#endif
+
+#if FEATURE_APPLE_object_purgeable
+ SET_ObjectPurgeableAPPLE(exec, _mesa_ObjectPurgeableAPPLE);
+ SET_ObjectUnpurgeableAPPLE(exec, _mesa_ObjectUnpurgeableAPPLE);
+ SET_GetObjectParameterivAPPLE(exec, _mesa_GetObjectParameterivAPPLE);
+#endif
+
+#if FEATURE_ARB_geometry_shader4
+ SET_FramebufferTextureARB(exec, _mesa_FramebufferTextureARB);
+ SET_FramebufferTextureFaceARB(exec, _mesa_FramebufferTextureFaceARB);
+#endif
+
+ SET_ClampColorARB(exec, _mesa_ClampColorARB);
+
+ /* GL_EXT_texture_integer */
+ SET_ClearColorIiEXT(exec, _mesa_ClearColorIiEXT);
+ SET_ClearColorIuiEXT(exec, _mesa_ClearColorIuiEXT);
+ SET_GetTexParameterIivEXT(exec, _mesa_GetTexParameterIiv);
+ SET_GetTexParameterIuivEXT(exec, _mesa_GetTexParameterIuiv);
+ SET_TexParameterIivEXT(exec, _mesa_TexParameterIiv);
+ SET_TexParameterIuivEXT(exec, _mesa_TexParameterIuiv);
+
+ /* GL_EXT_gpu_shader4 / OpenGL 3.0 */
+ SET_GetVertexAttribIivEXT(exec, _mesa_GetVertexAttribIiv);
+ SET_GetVertexAttribIuivEXT(exec, _mesa_GetVertexAttribIuiv);
+ SET_VertexAttribIPointerEXT(exec, _mesa_VertexAttribIPointer);
+
+ /* GL 3.0 (functions not covered by other extensions) */
+ SET_ClearBufferiv(exec, _mesa_ClearBufferiv);
+ SET_ClearBufferuiv(exec, _mesa_ClearBufferuiv);
+ SET_ClearBufferfv(exec, _mesa_ClearBufferfv);
+ SET_ClearBufferfi(exec, _mesa_ClearBufferfi);
+ SET_GetStringi(exec, _mesa_GetStringi);
+ SET_ClampColor(exec, _mesa_ClampColorARB);
+
+ /* GL_ARB_instanced_arrays */
+ SET_VertexAttribDivisorARB(exec, _mesa_VertexAttribDivisor);
+
+ /* GL_ARB_draw_buffer_blend */
+ SET_BlendFunciARB(exec, _mesa_BlendFunci);
+ SET_BlendFuncSeparateiARB(exec, _mesa_BlendFuncSeparatei);
+ SET_BlendEquationiARB(exec, _mesa_BlendEquationi);
+ SET_BlendEquationSeparateiARB(exec, _mesa_BlendEquationSeparatei);
+
+ /* GL_NV_texture_barrier */
+ SET_TextureBarrierNV(exec, _mesa_TextureBarrierNV);
+
+ /* GL_ARB_texture_buffer_object */
+ SET_TexBufferARB(exec, _mesa_TexBuffer);
+
+ return exec;
+}
+
+#endif /* FEATURE_GL */
diff --git a/mesalib/src/mesa/main/attrib.c b/mesalib/src/mesa/main/attrib.c index 340c06c97..34cee5e32 100644 --- a/mesalib/src/mesa/main/attrib.c +++ b/mesalib/src/mesa/main/attrib.c @@ -1,1558 +1,1560 @@ -/* - * Mesa 3-D graphics library - * Version: 7.6 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -#include "glheader.h" -#include "imports.h" -#include "accum.h" -#include "arrayobj.h" -#include "attrib.h" -#include "blend.h" -#include "buffers.h" -#include "bufferobj.h" -#include "clear.h" -#include "colormac.h" -#include "context.h" -#include "depth.h" -#include "enable.h" -#include "enums.h" -#include "fog.h" -#include "hint.h" -#include "light.h" -#include "lines.h" -#include "macros.h" -#include "matrix.h" -#include "mfeatures.h" -#include "multisample.h" -#include "points.h" -#include "polygon.h" -#include "scissor.h" -#include "stencil.h" -#include "texenv.h" -#include "texgen.h" -#include "texobj.h" -#include "texparam.h" -#include "texstate.h" -#include "varray.h" -#include "viewport.h" -#include "mtypes.h" -#include "main/dispatch.h" - - -/** - * glEnable()/glDisable() attribute group (GL_ENABLE_BIT). - */ -struct gl_enable_attrib -{ - GLboolean AlphaTest; - GLboolean AutoNormal; - GLboolean Blend; - GLbitfield ClipPlanes; - GLboolean ColorMaterial; - GLboolean CullFace; - GLboolean DepthClamp; - GLboolean DepthTest; - GLboolean Dither; - GLboolean Fog; - GLboolean Light[MAX_LIGHTS]; - GLboolean Lighting; - GLboolean LineSmooth; - GLboolean LineStipple; - GLboolean IndexLogicOp; - GLboolean ColorLogicOp; - - GLboolean Map1Color4; - GLboolean Map1Index; - GLboolean Map1Normal; - GLboolean Map1TextureCoord1; - GLboolean Map1TextureCoord2; - GLboolean Map1TextureCoord3; - GLboolean Map1TextureCoord4; - GLboolean Map1Vertex3; - GLboolean Map1Vertex4; - GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */ - GLboolean Map2Color4; - GLboolean Map2Index; - GLboolean Map2Normal; - GLboolean Map2TextureCoord1; - GLboolean Map2TextureCoord2; - GLboolean Map2TextureCoord3; - GLboolean Map2TextureCoord4; - GLboolean Map2Vertex3; - GLboolean Map2Vertex4; - GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */ - - GLboolean Normalize; - GLboolean PixelTexture; - GLboolean PointSmooth; - GLboolean PolygonOffsetPoint; - GLboolean PolygonOffsetLine; - GLboolean PolygonOffsetFill; - GLboolean PolygonSmooth; - GLboolean PolygonStipple; - GLboolean RescaleNormals; - GLboolean Scissor; - GLboolean Stencil; - GLboolean StencilTwoSide; /* GL_EXT_stencil_two_side */ - GLboolean MultisampleEnabled; /* GL_ARB_multisample */ - GLboolean SampleAlphaToCoverage; /* GL_ARB_multisample */ - GLboolean SampleAlphaToOne; /* GL_ARB_multisample */ - GLboolean SampleCoverage; /* GL_ARB_multisample */ - GLboolean SampleCoverageInvert; /* GL_ARB_multisample */ - GLboolean RasterPositionUnclipped; /* GL_IBM_rasterpos_clip */ - - GLbitfield Texture[MAX_TEXTURE_UNITS]; - GLbitfield TexGen[MAX_TEXTURE_UNITS]; - - /* GL_ARB_vertex_program / GL_NV_vertex_program */ - GLboolean VertexProgram; - GLboolean VertexProgramPointSize; - GLboolean VertexProgramTwoSide; - - /* GL_ARB_point_sprite / GL_NV_point_sprite */ - GLboolean PointSprite; - GLboolean FragmentShaderATI; -}; - - -/** - * Node for the attribute stack. - */ -struct gl_attrib_node -{ - GLbitfield kind; - void *data; - struct gl_attrib_node *next; -}; - - - -/** - * Special struct for saving/restoring texture state (GL_TEXTURE_BIT) - */ -struct texture_state -{ - struct gl_texture_attrib Texture; /**< The usual context state */ - - /** to save per texture object state (wrap modes, filters, etc): */ - struct gl_texture_object SavedObj[MAX_TEXTURE_UNITS][NUM_TEXTURE_TARGETS]; - - /** - * To save references to texture objects (so they don't get accidentally - * deleted while saved in the attribute stack). - */ - struct gl_texture_object *SavedTexRef[MAX_TEXTURE_UNITS][NUM_TEXTURE_TARGETS]; -}; - - -#if FEATURE_attrib_stack - - -/** - * Allocate new attribute node of given type/kind. Attach payload data. - * Insert it into the linked list named by 'head'. - */ -static void -save_attrib_data(struct gl_attrib_node **head, - GLbitfield kind, void *payload) -{ - struct gl_attrib_node *n = MALLOC_STRUCT(gl_attrib_node); - if (n) { - n->kind = kind; - n->data = payload; - /* insert at head */ - n->next = *head; - *head = n; - } - else { - /* out of memory! */ - } -} - - -void GLAPIENTRY -_mesa_PushAttrib(GLbitfield mask) -{ - struct gl_attrib_node *head; - - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glPushAttrib %x\n", (int) mask); - - if (ctx->AttribStackDepth >= MAX_ATTRIB_STACK_DEPTH) { - _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushAttrib" ); - return; - } - - /* Build linked list of attribute nodes which save all attribute */ - /* groups specified by the mask. */ - head = NULL; - - if (mask & GL_ACCUM_BUFFER_BIT) { - struct gl_accum_attrib *attr; - attr = MALLOC_STRUCT( gl_accum_attrib ); - memcpy( attr, &ctx->Accum, sizeof(struct gl_accum_attrib) ); - save_attrib_data(&head, GL_ACCUM_BUFFER_BIT, attr); - } - - if (mask & GL_COLOR_BUFFER_BIT) { - GLuint i; - struct gl_colorbuffer_attrib *attr; - attr = MALLOC_STRUCT( gl_colorbuffer_attrib ); - memcpy( attr, &ctx->Color, sizeof(struct gl_colorbuffer_attrib) ); - /* push the Draw FBO's DrawBuffer[] state, not ctx->Color.DrawBuffer[] */ - for (i = 0; i < ctx->Const.MaxDrawBuffers; i ++) - attr->DrawBuffer[i] = ctx->DrawBuffer->ColorDrawBuffer[i]; - save_attrib_data(&head, GL_COLOR_BUFFER_BIT, attr); - } - - if (mask & GL_CURRENT_BIT) { - struct gl_current_attrib *attr; - FLUSH_CURRENT( ctx, 0 ); - attr = MALLOC_STRUCT( gl_current_attrib ); - memcpy( attr, &ctx->Current, sizeof(struct gl_current_attrib) ); - save_attrib_data(&head, GL_CURRENT_BIT, attr); - } - - if (mask & GL_DEPTH_BUFFER_BIT) { - struct gl_depthbuffer_attrib *attr; - attr = MALLOC_STRUCT( gl_depthbuffer_attrib ); - memcpy( attr, &ctx->Depth, sizeof(struct gl_depthbuffer_attrib) ); - save_attrib_data(&head, GL_DEPTH_BUFFER_BIT, attr); - } - - if (mask & GL_ENABLE_BIT) { - struct gl_enable_attrib *attr; - GLuint i; - attr = MALLOC_STRUCT( gl_enable_attrib ); - /* Copy enable flags from all other attributes into the enable struct. */ - attr->AlphaTest = ctx->Color.AlphaEnabled; - attr->AutoNormal = ctx->Eval.AutoNormal; - attr->Blend = ctx->Color.BlendEnabled; - attr->ClipPlanes = ctx->Transform.ClipPlanesEnabled; - attr->ColorMaterial = ctx->Light.ColorMaterialEnabled; - attr->CullFace = ctx->Polygon.CullFlag; - attr->DepthClamp = ctx->Transform.DepthClamp; - attr->DepthTest = ctx->Depth.Test; - attr->Dither = ctx->Color.DitherFlag; - attr->Fog = ctx->Fog.Enabled; - for (i = 0; i < ctx->Const.MaxLights; i++) { - attr->Light[i] = ctx->Light.Light[i].Enabled; - } - attr->Lighting = ctx->Light.Enabled; - attr->LineSmooth = ctx->Line.SmoothFlag; - attr->LineStipple = ctx->Line.StippleFlag; - attr->IndexLogicOp = ctx->Color.IndexLogicOpEnabled; - attr->ColorLogicOp = ctx->Color.ColorLogicOpEnabled; - attr->Map1Color4 = ctx->Eval.Map1Color4; - attr->Map1Index = ctx->Eval.Map1Index; - attr->Map1Normal = ctx->Eval.Map1Normal; - attr->Map1TextureCoord1 = ctx->Eval.Map1TextureCoord1; - attr->Map1TextureCoord2 = ctx->Eval.Map1TextureCoord2; - attr->Map1TextureCoord3 = ctx->Eval.Map1TextureCoord3; - attr->Map1TextureCoord4 = ctx->Eval.Map1TextureCoord4; - attr->Map1Vertex3 = ctx->Eval.Map1Vertex3; - attr->Map1Vertex4 = ctx->Eval.Map1Vertex4; - memcpy(attr->Map1Attrib, ctx->Eval.Map1Attrib, sizeof(ctx->Eval.Map1Attrib)); - attr->Map2Color4 = ctx->Eval.Map2Color4; - attr->Map2Index = ctx->Eval.Map2Index; - attr->Map2Normal = ctx->Eval.Map2Normal; - attr->Map2TextureCoord1 = ctx->Eval.Map2TextureCoord1; - attr->Map2TextureCoord2 = ctx->Eval.Map2TextureCoord2; - attr->Map2TextureCoord3 = ctx->Eval.Map2TextureCoord3; - attr->Map2TextureCoord4 = ctx->Eval.Map2TextureCoord4; - attr->Map2Vertex3 = ctx->Eval.Map2Vertex3; - attr->Map2Vertex4 = ctx->Eval.Map2Vertex4; - memcpy(attr->Map2Attrib, ctx->Eval.Map2Attrib, sizeof(ctx->Eval.Map2Attrib)); - attr->Normalize = ctx->Transform.Normalize; - attr->RasterPositionUnclipped = ctx->Transform.RasterPositionUnclipped; - attr->PointSmooth = ctx->Point.SmoothFlag; - attr->PointSprite = ctx->Point.PointSprite; - attr->PolygonOffsetPoint = ctx->Polygon.OffsetPoint; - attr->PolygonOffsetLine = ctx->Polygon.OffsetLine; - attr->PolygonOffsetFill = ctx->Polygon.OffsetFill; - attr->PolygonSmooth = ctx->Polygon.SmoothFlag; - attr->PolygonStipple = ctx->Polygon.StippleFlag; - attr->RescaleNormals = ctx->Transform.RescaleNormals; - attr->Scissor = ctx->Scissor.Enabled; - attr->Stencil = ctx->Stencil.Enabled; - attr->StencilTwoSide = ctx->Stencil.TestTwoSide; - attr->MultisampleEnabled = ctx->Multisample.Enabled; - attr->SampleAlphaToCoverage = ctx->Multisample.SampleAlphaToCoverage; - attr->SampleAlphaToOne = ctx->Multisample.SampleAlphaToOne; - attr->SampleCoverage = ctx->Multisample.SampleCoverage; - attr->SampleCoverageInvert = ctx->Multisample.SampleCoverageInvert; - for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { - attr->Texture[i] = ctx->Texture.Unit[i].Enabled; - attr->TexGen[i] = ctx->Texture.Unit[i].TexGenEnabled; - } - /* GL_NV_vertex_program */ - attr->VertexProgram = ctx->VertexProgram.Enabled; - attr->VertexProgramPointSize = ctx->VertexProgram.PointSizeEnabled; - attr->VertexProgramTwoSide = ctx->VertexProgram.TwoSideEnabled; - save_attrib_data(&head, GL_ENABLE_BIT, attr); - } - - if (mask & GL_EVAL_BIT) { - struct gl_eval_attrib *attr; - attr = MALLOC_STRUCT( gl_eval_attrib ); - memcpy( attr, &ctx->Eval, sizeof(struct gl_eval_attrib) ); - save_attrib_data(&head, GL_EVAL_BIT, attr); - } - - if (mask & GL_FOG_BIT) { - struct gl_fog_attrib *attr; - attr = MALLOC_STRUCT( gl_fog_attrib ); - memcpy( attr, &ctx->Fog, sizeof(struct gl_fog_attrib) ); - save_attrib_data(&head, GL_FOG_BIT, attr); - } - - if (mask & GL_HINT_BIT) { - struct gl_hint_attrib *attr; - attr = MALLOC_STRUCT( gl_hint_attrib ); - memcpy( attr, &ctx->Hint, sizeof(struct gl_hint_attrib) ); - save_attrib_data(&head, GL_HINT_BIT, attr); - } - - if (mask & GL_LIGHTING_BIT) { - struct gl_light_attrib *attr; - FLUSH_CURRENT(ctx, 0); /* flush material changes */ - attr = MALLOC_STRUCT( gl_light_attrib ); - memcpy( attr, &ctx->Light, sizeof(struct gl_light_attrib) ); - save_attrib_data(&head, GL_LIGHTING_BIT, attr); - } - - if (mask & GL_LINE_BIT) { - struct gl_line_attrib *attr; - attr = MALLOC_STRUCT( gl_line_attrib ); - memcpy( attr, &ctx->Line, sizeof(struct gl_line_attrib) ); - save_attrib_data(&head, GL_LINE_BIT, attr); - } - - if (mask & GL_LIST_BIT) { - struct gl_list_attrib *attr; - attr = MALLOC_STRUCT( gl_list_attrib ); - memcpy( attr, &ctx->List, sizeof(struct gl_list_attrib) ); - save_attrib_data(&head, GL_LIST_BIT, attr); - } - - if (mask & GL_PIXEL_MODE_BIT) { - struct gl_pixel_attrib *attr; - attr = MALLOC_STRUCT( gl_pixel_attrib ); - memcpy( attr, &ctx->Pixel, sizeof(struct gl_pixel_attrib) ); - /* push the Read FBO's ReadBuffer state, not ctx->Pixel.ReadBuffer */ - attr->ReadBuffer = ctx->ReadBuffer->ColorReadBuffer; - save_attrib_data(&head, GL_PIXEL_MODE_BIT, attr); - } - - if (mask & GL_POINT_BIT) { - struct gl_point_attrib *attr; - attr = MALLOC_STRUCT( gl_point_attrib ); - memcpy( attr, &ctx->Point, sizeof(struct gl_point_attrib) ); - save_attrib_data(&head, GL_POINT_BIT, attr); - } - - if (mask & GL_POLYGON_BIT) { - struct gl_polygon_attrib *attr; - attr = MALLOC_STRUCT( gl_polygon_attrib ); - memcpy( attr, &ctx->Polygon, sizeof(struct gl_polygon_attrib) ); - save_attrib_data(&head, GL_POLYGON_BIT, attr); - } - - if (mask & GL_POLYGON_STIPPLE_BIT) { - GLuint *stipple; - stipple = (GLuint *) MALLOC( 32*sizeof(GLuint) ); - memcpy( stipple, ctx->PolygonStipple, 32*sizeof(GLuint) ); - save_attrib_data(&head, GL_POLYGON_STIPPLE_BIT, stipple); - } - - if (mask & GL_SCISSOR_BIT) { - struct gl_scissor_attrib *attr; - attr = MALLOC_STRUCT( gl_scissor_attrib ); - memcpy( attr, &ctx->Scissor, sizeof(struct gl_scissor_attrib) ); - save_attrib_data(&head, GL_SCISSOR_BIT, attr); - } - - if (mask & GL_STENCIL_BUFFER_BIT) { - struct gl_stencil_attrib *attr; - attr = MALLOC_STRUCT( gl_stencil_attrib ); - memcpy( attr, &ctx->Stencil, sizeof(struct gl_stencil_attrib) ); - save_attrib_data(&head, GL_STENCIL_BUFFER_BIT, attr); - } - - if (mask & GL_TEXTURE_BIT) { - struct texture_state *texstate = CALLOC_STRUCT(texture_state); - GLuint u, tex; - - if (!texstate) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib(GL_TEXTURE_BIT)"); - goto end; - } - - _mesa_lock_context_textures(ctx); - - /* copy/save the bulk of texture state here */ - memcpy(&texstate->Texture, &ctx->Texture, sizeof(ctx->Texture)); - - /* Save references to the currently bound texture objects so they don't - * accidentally get deleted while referenced in the attribute stack. - */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { - _mesa_reference_texobj(&texstate->SavedTexRef[u][tex], - ctx->Texture.Unit[u].CurrentTex[tex]); - } - } - - /* copy state/contents of the currently bound texture objects */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { - _mesa_copy_texture_object(&texstate->SavedObj[u][tex], - ctx->Texture.Unit[u].CurrentTex[tex]); - } - } - - _mesa_unlock_context_textures(ctx); - - save_attrib_data(&head, GL_TEXTURE_BIT, texstate); - } - - if (mask & GL_TRANSFORM_BIT) { - struct gl_transform_attrib *attr; - attr = MALLOC_STRUCT( gl_transform_attrib ); - memcpy( attr, &ctx->Transform, sizeof(struct gl_transform_attrib) ); - save_attrib_data(&head, GL_TRANSFORM_BIT, attr); - } - - if (mask & GL_VIEWPORT_BIT) { - struct gl_viewport_attrib *attr; - attr = MALLOC_STRUCT( gl_viewport_attrib ); - memcpy( attr, &ctx->Viewport, sizeof(struct gl_viewport_attrib) ); - save_attrib_data(&head, GL_VIEWPORT_BIT, attr); - } - - /* GL_ARB_multisample */ - if (mask & GL_MULTISAMPLE_BIT_ARB) { - struct gl_multisample_attrib *attr; - attr = MALLOC_STRUCT( gl_multisample_attrib ); - memcpy( attr, &ctx->Multisample, sizeof(struct gl_multisample_attrib) ); - save_attrib_data(&head, GL_MULTISAMPLE_BIT_ARB, attr); - } - -end: - ctx->AttribStack[ctx->AttribStackDepth] = head; - ctx->AttribStackDepth++; -} - - - -static void -pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable) -{ - const GLuint curTexUnitSave = ctx->Texture.CurrentUnit; - GLuint i; - -#define TEST_AND_UPDATE(VALUE, NEWVALUE, ENUM) \ - if ((VALUE) != (NEWVALUE)) { \ - _mesa_set_enable( ctx, ENUM, (NEWVALUE) ); \ - } - - TEST_AND_UPDATE(ctx->Color.AlphaEnabled, enable->AlphaTest, GL_ALPHA_TEST); - if (ctx->Color.BlendEnabled != enable->Blend) { - if (ctx->Extensions.EXT_draw_buffers2) { - GLuint i; - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - _mesa_set_enablei(ctx, GL_BLEND, i, (enable->Blend >> i) & 1); - } - } - else { - _mesa_set_enable(ctx, GL_BLEND, (enable->Blend & 1)); - } - } - - for (i=0;i<MAX_CLIP_PLANES;i++) { - const GLuint mask = 1 << i; - if ((ctx->Transform.ClipPlanesEnabled & mask) != (enable->ClipPlanes & mask)) - _mesa_set_enable(ctx, (GLenum) (GL_CLIP_PLANE0 + i), - (GLboolean) ((enable->ClipPlanes & mask) ? GL_TRUE : GL_FALSE)); - } - - TEST_AND_UPDATE(ctx->Light.ColorMaterialEnabled, enable->ColorMaterial, - GL_COLOR_MATERIAL); - TEST_AND_UPDATE(ctx->Polygon.CullFlag, enable->CullFace, GL_CULL_FACE); - TEST_AND_UPDATE(ctx->Transform.DepthClamp, enable->DepthClamp, - GL_DEPTH_CLAMP); - TEST_AND_UPDATE(ctx->Depth.Test, enable->DepthTest, GL_DEPTH_TEST); - TEST_AND_UPDATE(ctx->Color.DitherFlag, enable->Dither, GL_DITHER); - TEST_AND_UPDATE(ctx->Fog.Enabled, enable->Fog, GL_FOG); - TEST_AND_UPDATE(ctx->Light.Enabled, enable->Lighting, GL_LIGHTING); - TEST_AND_UPDATE(ctx->Line.SmoothFlag, enable->LineSmooth, GL_LINE_SMOOTH); - TEST_AND_UPDATE(ctx->Line.StippleFlag, enable->LineStipple, - GL_LINE_STIPPLE); - TEST_AND_UPDATE(ctx->Color.IndexLogicOpEnabled, enable->IndexLogicOp, - GL_INDEX_LOGIC_OP); - TEST_AND_UPDATE(ctx->Color.ColorLogicOpEnabled, enable->ColorLogicOp, - GL_COLOR_LOGIC_OP); - - TEST_AND_UPDATE(ctx->Eval.Map1Color4, enable->Map1Color4, GL_MAP1_COLOR_4); - TEST_AND_UPDATE(ctx->Eval.Map1Index, enable->Map1Index, GL_MAP1_INDEX); - TEST_AND_UPDATE(ctx->Eval.Map1Normal, enable->Map1Normal, GL_MAP1_NORMAL); - TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord1, enable->Map1TextureCoord1, - GL_MAP1_TEXTURE_COORD_1); - TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord2, enable->Map1TextureCoord2, - GL_MAP1_TEXTURE_COORD_2); - TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord3, enable->Map1TextureCoord3, - GL_MAP1_TEXTURE_COORD_3); - TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord4, enable->Map1TextureCoord4, - GL_MAP1_TEXTURE_COORD_4); - TEST_AND_UPDATE(ctx->Eval.Map1Vertex3, enable->Map1Vertex3, - GL_MAP1_VERTEX_3); - TEST_AND_UPDATE(ctx->Eval.Map1Vertex4, enable->Map1Vertex4, - GL_MAP1_VERTEX_4); - for (i = 0; i < 16; i++) { - TEST_AND_UPDATE(ctx->Eval.Map1Attrib[i], enable->Map1Attrib[i], - GL_MAP1_VERTEX_ATTRIB0_4_NV + i); - } - - TEST_AND_UPDATE(ctx->Eval.Map2Color4, enable->Map2Color4, GL_MAP2_COLOR_4); - TEST_AND_UPDATE(ctx->Eval.Map2Index, enable->Map2Index, GL_MAP2_INDEX); - TEST_AND_UPDATE(ctx->Eval.Map2Normal, enable->Map2Normal, GL_MAP2_NORMAL); - TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord1, enable->Map2TextureCoord1, - GL_MAP2_TEXTURE_COORD_1); - TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord2, enable->Map2TextureCoord2, - GL_MAP2_TEXTURE_COORD_2); - TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord3, enable->Map2TextureCoord3, - GL_MAP2_TEXTURE_COORD_3); - TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord4, enable->Map2TextureCoord4, - GL_MAP2_TEXTURE_COORD_4); - TEST_AND_UPDATE(ctx->Eval.Map2Vertex3, enable->Map2Vertex3, - GL_MAP2_VERTEX_3); - TEST_AND_UPDATE(ctx->Eval.Map2Vertex4, enable->Map2Vertex4, - GL_MAP2_VERTEX_4); - for (i = 0; i < 16; i++) { - TEST_AND_UPDATE(ctx->Eval.Map2Attrib[i], enable->Map2Attrib[i], - GL_MAP2_VERTEX_ATTRIB0_4_NV + i); - } - - TEST_AND_UPDATE(ctx->Eval.AutoNormal, enable->AutoNormal, GL_AUTO_NORMAL); - TEST_AND_UPDATE(ctx->Transform.Normalize, enable->Normalize, GL_NORMALIZE); - TEST_AND_UPDATE(ctx->Transform.RescaleNormals, enable->RescaleNormals, - GL_RESCALE_NORMAL_EXT); - TEST_AND_UPDATE(ctx->Transform.RasterPositionUnclipped, - enable->RasterPositionUnclipped, - GL_RASTER_POSITION_UNCLIPPED_IBM); - TEST_AND_UPDATE(ctx->Point.SmoothFlag, enable->PointSmooth, - GL_POINT_SMOOTH); - if (ctx->Extensions.NV_point_sprite || ctx->Extensions.ARB_point_sprite) { - TEST_AND_UPDATE(ctx->Point.PointSprite, enable->PointSprite, - GL_POINT_SPRITE_NV); - } - TEST_AND_UPDATE(ctx->Polygon.OffsetPoint, enable->PolygonOffsetPoint, - GL_POLYGON_OFFSET_POINT); - TEST_AND_UPDATE(ctx->Polygon.OffsetLine, enable->PolygonOffsetLine, - GL_POLYGON_OFFSET_LINE); - TEST_AND_UPDATE(ctx->Polygon.OffsetFill, enable->PolygonOffsetFill, - GL_POLYGON_OFFSET_FILL); - TEST_AND_UPDATE(ctx->Polygon.SmoothFlag, enable->PolygonSmooth, - GL_POLYGON_SMOOTH); - TEST_AND_UPDATE(ctx->Polygon.StippleFlag, enable->PolygonStipple, - GL_POLYGON_STIPPLE); - TEST_AND_UPDATE(ctx->Scissor.Enabled, enable->Scissor, GL_SCISSOR_TEST); - TEST_AND_UPDATE(ctx->Stencil.Enabled, enable->Stencil, GL_STENCIL_TEST); - if (ctx->Extensions.EXT_stencil_two_side) { - TEST_AND_UPDATE(ctx->Stencil.TestTwoSide, enable->StencilTwoSide, GL_STENCIL_TEST_TWO_SIDE_EXT); - } - TEST_AND_UPDATE(ctx->Multisample.Enabled, enable->MultisampleEnabled, - GL_MULTISAMPLE_ARB); - TEST_AND_UPDATE(ctx->Multisample.SampleAlphaToCoverage, - enable->SampleAlphaToCoverage, - GL_SAMPLE_ALPHA_TO_COVERAGE_ARB); - TEST_AND_UPDATE(ctx->Multisample.SampleAlphaToOne, - enable->SampleAlphaToOne, - GL_SAMPLE_ALPHA_TO_ONE_ARB); - TEST_AND_UPDATE(ctx->Multisample.SampleCoverage, - enable->SampleCoverage, - GL_SAMPLE_COVERAGE_ARB); - TEST_AND_UPDATE(ctx->Multisample.SampleCoverageInvert, - enable->SampleCoverageInvert, - GL_SAMPLE_COVERAGE_INVERT_ARB); - /* GL_ARB_vertex_program, GL_NV_vertex_program */ - TEST_AND_UPDATE(ctx->VertexProgram.Enabled, - enable->VertexProgram, - GL_VERTEX_PROGRAM_ARB); - TEST_AND_UPDATE(ctx->VertexProgram.PointSizeEnabled, - enable->VertexProgramPointSize, - GL_VERTEX_PROGRAM_POINT_SIZE_ARB); - TEST_AND_UPDATE(ctx->VertexProgram.TwoSideEnabled, - enable->VertexProgramTwoSide, - GL_VERTEX_PROGRAM_TWO_SIDE_ARB); - -#undef TEST_AND_UPDATE - - /* texture unit enables */ - for (i = 0; i < ctx->Const.MaxTextureUnits; i++) { - const GLbitfield enabled = enable->Texture[i]; - const GLbitfield genEnabled = enable->TexGen[i]; - - if (ctx->Texture.Unit[i].Enabled != enabled) { - _mesa_ActiveTextureARB(GL_TEXTURE0 + i); - - _mesa_set_enable(ctx, GL_TEXTURE_1D, - (enabled & TEXTURE_1D_BIT) ? GL_TRUE : GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_2D, - (enabled & TEXTURE_2D_BIT) ? GL_TRUE : GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_3D, - (enabled & TEXTURE_3D_BIT) ? GL_TRUE : GL_FALSE); - if (ctx->Extensions.NV_texture_rectangle) { - _mesa_set_enable(ctx, GL_TEXTURE_RECTANGLE_ARB, - (enabled & TEXTURE_RECT_BIT) ? GL_TRUE : GL_FALSE); - } - if (ctx->Extensions.ARB_texture_cube_map) { - _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP, - (enabled & TEXTURE_CUBE_BIT) ? GL_TRUE : GL_FALSE); - } - if (ctx->Extensions.MESA_texture_array) { - _mesa_set_enable(ctx, GL_TEXTURE_1D_ARRAY_EXT, - (enabled & TEXTURE_1D_ARRAY_BIT) ? GL_TRUE : GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_2D_ARRAY_EXT, - (enabled & TEXTURE_2D_ARRAY_BIT) ? GL_TRUE : GL_FALSE); - } - } - - if (ctx->Texture.Unit[i].TexGenEnabled != genEnabled) { - _mesa_ActiveTextureARB(GL_TEXTURE0 + i); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_S, - (genEnabled & S_BIT) ? GL_TRUE : GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_T, - (genEnabled & T_BIT) ? GL_TRUE : GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_R, - (genEnabled & R_BIT) ? GL_TRUE : GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_Q, - (genEnabled & Q_BIT) ? GL_TRUE : GL_FALSE); - } - } - - _mesa_ActiveTextureARB(GL_TEXTURE0 + curTexUnitSave); -} - - -/** - * Pop/restore texture attribute/group state. - */ -static void -pop_texture_group(struct gl_context *ctx, struct texture_state *texstate) -{ - GLuint u; - - _mesa_lock_context_textures(ctx); - - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - const struct gl_texture_unit *unit = &texstate->Texture.Unit[u]; - GLuint tgt; - - _mesa_ActiveTextureARB(GL_TEXTURE0_ARB + u); - _mesa_set_enable(ctx, GL_TEXTURE_1D, - (unit->Enabled & TEXTURE_1D_BIT) ? GL_TRUE : GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_2D, - (unit->Enabled & TEXTURE_2D_BIT) ? GL_TRUE : GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_3D, - (unit->Enabled & TEXTURE_3D_BIT) ? GL_TRUE : GL_FALSE); - if (ctx->Extensions.ARB_texture_cube_map) { - _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP_ARB, - (unit->Enabled & TEXTURE_CUBE_BIT) ? GL_TRUE : GL_FALSE); - } - if (ctx->Extensions.NV_texture_rectangle) { - _mesa_set_enable(ctx, GL_TEXTURE_RECTANGLE_NV, - (unit->Enabled & TEXTURE_RECT_BIT) ? GL_TRUE : GL_FALSE); - } - if (ctx->Extensions.MESA_texture_array) { - _mesa_set_enable(ctx, GL_TEXTURE_1D_ARRAY_EXT, - (unit->Enabled & TEXTURE_1D_ARRAY_BIT) ? GL_TRUE : GL_FALSE); - _mesa_set_enable(ctx, GL_TEXTURE_2D_ARRAY_EXT, - (unit->Enabled & TEXTURE_2D_ARRAY_BIT) ? GL_TRUE : GL_FALSE); - } - - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, unit->EnvMode); - _mesa_TexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, unit->EnvColor); - _mesa_TexGeni(GL_S, GL_TEXTURE_GEN_MODE, unit->GenS.Mode); - _mesa_TexGeni(GL_T, GL_TEXTURE_GEN_MODE, unit->GenT.Mode); - _mesa_TexGeni(GL_R, GL_TEXTURE_GEN_MODE, unit->GenR.Mode); - _mesa_TexGeni(GL_Q, GL_TEXTURE_GEN_MODE, unit->GenQ.Mode); - _mesa_TexGenfv(GL_S, GL_OBJECT_PLANE, unit->GenS.ObjectPlane); - _mesa_TexGenfv(GL_T, GL_OBJECT_PLANE, unit->GenT.ObjectPlane); - _mesa_TexGenfv(GL_R, GL_OBJECT_PLANE, unit->GenR.ObjectPlane); - _mesa_TexGenfv(GL_Q, GL_OBJECT_PLANE, unit->GenQ.ObjectPlane); - /* Eye plane done differently to avoid re-transformation */ - { - struct gl_texture_unit *destUnit = &ctx->Texture.Unit[u]; - COPY_4FV(destUnit->GenS.EyePlane, unit->GenS.EyePlane); - COPY_4FV(destUnit->GenT.EyePlane, unit->GenT.EyePlane); - COPY_4FV(destUnit->GenR.EyePlane, unit->GenR.EyePlane); - COPY_4FV(destUnit->GenQ.EyePlane, unit->GenQ.EyePlane); - if (ctx->Driver.TexGen) { - ctx->Driver.TexGen(ctx, GL_S, GL_EYE_PLANE, unit->GenS.EyePlane); - ctx->Driver.TexGen(ctx, GL_T, GL_EYE_PLANE, unit->GenT.EyePlane); - ctx->Driver.TexGen(ctx, GL_R, GL_EYE_PLANE, unit->GenR.EyePlane); - ctx->Driver.TexGen(ctx, GL_Q, GL_EYE_PLANE, unit->GenQ.EyePlane); - } - } - _mesa_set_enable(ctx, GL_TEXTURE_GEN_S, - ((unit->TexGenEnabled & S_BIT) ? GL_TRUE : GL_FALSE)); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_T, - ((unit->TexGenEnabled & T_BIT) ? GL_TRUE : GL_FALSE)); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_R, - ((unit->TexGenEnabled & R_BIT) ? GL_TRUE : GL_FALSE)); - _mesa_set_enable(ctx, GL_TEXTURE_GEN_Q, - ((unit->TexGenEnabled & Q_BIT) ? GL_TRUE : GL_FALSE)); - if (ctx->Extensions.EXT_texture_lod_bias) { - _mesa_TexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT, - GL_TEXTURE_LOD_BIAS_EXT, unit->LodBias); - } - if (ctx->Extensions.EXT_texture_env_combine || - ctx->Extensions.ARB_texture_env_combine) { - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, - unit->Combine.ModeRGB); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA, - unit->Combine.ModeA); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB, - unit->Combine.SourceRGB[0]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB, - unit->Combine.SourceRGB[1]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB, - unit->Combine.SourceRGB[2]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA, - unit->Combine.SourceA[0]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA, - unit->Combine.SourceA[1]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_ALPHA, - unit->Combine.SourceA[2]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB, - unit->Combine.OperandRGB[0]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB, - unit->Combine.OperandRGB[1]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB, - unit->Combine.OperandRGB[2]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA, - unit->Combine.OperandA[0]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA, - unit->Combine.OperandA[1]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_ALPHA, - unit->Combine.OperandA[2]); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE, - 1 << unit->Combine.ScaleShiftRGB); - _mesa_TexEnvi(GL_TEXTURE_ENV, GL_ALPHA_SCALE, - 1 << unit->Combine.ScaleShiftA); - } - - /* Restore texture object state for each target */ - for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { - const struct gl_texture_object *obj = NULL; - GLenum target; - - obj = &texstate->SavedObj[u][tgt]; - - /* don't restore state for unsupported targets to prevent - * raising GL errors. - */ - if (obj->Target == GL_TEXTURE_CUBE_MAP_ARB && - !ctx->Extensions.ARB_texture_cube_map) { - continue; - } - else if (obj->Target == GL_TEXTURE_RECTANGLE_NV && - !ctx->Extensions.NV_texture_rectangle) { - continue; - } - else if ((obj->Target == GL_TEXTURE_1D_ARRAY_EXT || - obj->Target == GL_TEXTURE_2D_ARRAY_EXT) && - !ctx->Extensions.MESA_texture_array) { - continue; - } - - target = obj->Target; - - _mesa_BindTexture(target, obj->Name); - - _mesa_TexParameterfv(target, GL_TEXTURE_BORDER_COLOR, obj->BorderColor.f); - _mesa_TexParameterf(target, GL_TEXTURE_PRIORITY, obj->Priority); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, obj->WrapS); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, obj->WrapT); - _mesa_TexParameteri(target, GL_TEXTURE_WRAP_R, obj->WrapR); - _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, obj->MinFilter); - _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, obj->MagFilter); - _mesa_TexParameterf(target, GL_TEXTURE_MIN_LOD, obj->MinLod); - _mesa_TexParameterf(target, GL_TEXTURE_MAX_LOD, obj->MaxLod); - _mesa_TexParameterf(target, GL_TEXTURE_LOD_BIAS, obj->LodBias); - _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, obj->BaseLevel); - if (target != GL_TEXTURE_RECTANGLE_ARB) - _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, obj->MaxLevel); - if (ctx->Extensions.EXT_texture_filter_anisotropic) { - _mesa_TexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, - obj->MaxAnisotropy); - } - if (ctx->Extensions.ARB_shadow_ambient) { - _mesa_TexParameterf(target, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB, - obj->CompareFailValue); - } - } - - /* remove saved references to the texture objects */ - for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { - _mesa_reference_texobj(&texstate->SavedTexRef[u][tgt], NULL); - } - } - - _mesa_ActiveTextureARB(GL_TEXTURE0_ARB + texstate->Texture.CurrentUnit); - - _mesa_unlock_context_textures(ctx); -} - - -/* - * This function is kind of long just because we have to call a lot - * of device driver functions to update device driver state. - * - * XXX As it is now, most of the pop-code calls immediate-mode Mesa functions - * in order to restore GL state. This isn't terribly efficient but it - * ensures that dirty flags and any derived state gets updated correctly. - * We could at least check if the value to restore equals the current value - * and then skip the Mesa call. - */ -void GLAPIENTRY -_mesa_PopAttrib(void) -{ - struct gl_attrib_node *attr, *next; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->AttribStackDepth == 0) { - _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopAttrib" ); - return; - } - - ctx->AttribStackDepth--; - attr = ctx->AttribStack[ctx->AttribStackDepth]; - - while (attr) { - - if (MESA_VERBOSE & VERBOSE_API) { - _mesa_debug(ctx, "glPopAttrib %s\n", - _mesa_lookup_enum_by_nr(attr->kind)); - } - - switch (attr->kind) { - case GL_ACCUM_BUFFER_BIT: - { - const struct gl_accum_attrib *accum; - accum = (const struct gl_accum_attrib *) attr->data; - _mesa_ClearAccum(accum->ClearColor[0], - accum->ClearColor[1], - accum->ClearColor[2], - accum->ClearColor[3]); - } - break; - case GL_COLOR_BUFFER_BIT: - { - const struct gl_colorbuffer_attrib *color; - - color = (const struct gl_colorbuffer_attrib *) attr->data; - _mesa_ClearIndex((GLfloat) color->ClearIndex); - _mesa_ClearColor(color->ClearColorUnclamped[0], - color->ClearColorUnclamped[1], - color->ClearColorUnclamped[2], - color->ClearColorUnclamped[3]); - _mesa_IndexMask(color->IndexMask); - if (!ctx->Extensions.EXT_draw_buffers2) { - _mesa_ColorMask((GLboolean) (color->ColorMask[0][0] != 0), - (GLboolean) (color->ColorMask[0][1] != 0), - (GLboolean) (color->ColorMask[0][2] != 0), - (GLboolean) (color->ColorMask[0][3] != 0)); - } - else { - GLuint i; - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - _mesa_ColorMaskIndexed(i, - (GLboolean) (color->ColorMask[i][0] != 0), - (GLboolean) (color->ColorMask[i][1] != 0), - (GLboolean) (color->ColorMask[i][2] != 0), - (GLboolean) (color->ColorMask[i][3] != 0)); - } - } - { - /* Need to determine if more than one color output is - * specified. If so, call glDrawBuffersARB, else call - * glDrawBuffer(). This is a subtle, but essential point - * since GL_FRONT (for example) is illegal for the former - * function, but legal for the later. - */ - GLboolean multipleBuffers = GL_FALSE; - GLuint i; - - for (i = 1; i < ctx->Const.MaxDrawBuffers; i++) { - if (color->DrawBuffer[i] != GL_NONE) { - multipleBuffers = GL_TRUE; - break; - } - } - /* Call the API_level functions, not _mesa_drawbuffers() - * since we need to do error checking on the pop'd - * GL_DRAW_BUFFER. - * Ex: if GL_FRONT were pushed, but we're popping with a - * user FBO bound, GL_FRONT will be illegal and we'll need - * to record that error. Per OpenGL ARB decision. - */ - if (multipleBuffers) - _mesa_DrawBuffersARB(ctx->Const.MaxDrawBuffers, - color->DrawBuffer); - else - _mesa_DrawBuffer(color->DrawBuffer[0]); - } - _mesa_set_enable(ctx, GL_ALPHA_TEST, color->AlphaEnabled); - _mesa_AlphaFunc(color->AlphaFunc, color->AlphaRefUnclamped); - if (ctx->Color.BlendEnabled != color->BlendEnabled) { - if (ctx->Extensions.EXT_draw_buffers2) { - GLuint i; - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - _mesa_set_enablei(ctx, GL_BLEND, i, - (color->BlendEnabled >> i) & 1); - } - } - else { - _mesa_set_enable(ctx, GL_BLEND, (color->BlendEnabled & 1)); - } - } - if (ctx->Color._BlendFuncPerBuffer || - ctx->Color._BlendEquationPerBuffer) { - /* set blend per buffer */ - GLuint buf; - for (buf = 0; buf < ctx->Const.MaxDrawBuffers; buf++) { - _mesa_BlendFuncSeparatei(buf, color->Blend[buf].SrcRGB, - color->Blend[buf].DstRGB, - color->Blend[buf].SrcA, - color->Blend[buf].DstA); - _mesa_BlendEquationSeparatei(buf, - color->Blend[buf].EquationRGB, - color->Blend[buf].EquationA); - } - } - else { - /* set same blend modes for all buffers */ - _mesa_BlendFuncSeparateEXT(color->Blend[0].SrcRGB, - color->Blend[0].DstRGB, - color->Blend[0].SrcA, - color->Blend[0].DstA); - /* This special case is because glBlendEquationSeparateEXT - * cannot take GL_LOGIC_OP as a parameter. - */ - if (color->Blend[0].EquationRGB == - color->Blend[0].EquationA) { - _mesa_BlendEquation(color->Blend[0].EquationRGB); - } - else { - _mesa_BlendEquationSeparateEXT( - color->Blend[0].EquationRGB, - color->Blend[0].EquationA); - } - } - _mesa_BlendColor(color->BlendColorUnclamped[0], - color->BlendColorUnclamped[1], - color->BlendColorUnclamped[2], - color->BlendColorUnclamped[3]); - _mesa_LogicOp(color->LogicOp); - _mesa_set_enable(ctx, GL_COLOR_LOGIC_OP, - color->ColorLogicOpEnabled); - _mesa_set_enable(ctx, GL_INDEX_LOGIC_OP, - color->IndexLogicOpEnabled); - _mesa_set_enable(ctx, GL_DITHER, color->DitherFlag); - _mesa_ClampColorARB(GL_CLAMP_FRAGMENT_COLOR_ARB, color->ClampFragmentColor); - _mesa_ClampColorARB(GL_CLAMP_READ_COLOR_ARB, color->ClampReadColor); - } - break; - case GL_CURRENT_BIT: - FLUSH_CURRENT( ctx, 0 ); - memcpy( &ctx->Current, attr->data, - sizeof(struct gl_current_attrib) ); - break; - case GL_DEPTH_BUFFER_BIT: - { - const struct gl_depthbuffer_attrib *depth; - depth = (const struct gl_depthbuffer_attrib *) attr->data; - _mesa_DepthFunc(depth->Func); - _mesa_ClearDepth(depth->Clear); - _mesa_set_enable(ctx, GL_DEPTH_TEST, depth->Test); - _mesa_DepthMask(depth->Mask); - } - break; - case GL_ENABLE_BIT: - { - const struct gl_enable_attrib *enable; - enable = (const struct gl_enable_attrib *) attr->data; - pop_enable_group(ctx, enable); - ctx->NewState |= _NEW_ALL; - } - break; - case GL_EVAL_BIT: - memcpy( &ctx->Eval, attr->data, sizeof(struct gl_eval_attrib) ); - ctx->NewState |= _NEW_EVAL; - break; - case GL_FOG_BIT: - { - const struct gl_fog_attrib *fog; - fog = (const struct gl_fog_attrib *) attr->data; - _mesa_set_enable(ctx, GL_FOG, fog->Enabled); - _mesa_Fogfv(GL_FOG_COLOR, fog->Color); - _mesa_Fogf(GL_FOG_DENSITY, fog->Density); - _mesa_Fogf(GL_FOG_START, fog->Start); - _mesa_Fogf(GL_FOG_END, fog->End); - _mesa_Fogf(GL_FOG_INDEX, fog->Index); - _mesa_Fogi(GL_FOG_MODE, fog->Mode); - } - break; - case GL_HINT_BIT: - { - const struct gl_hint_attrib *hint; - hint = (const struct gl_hint_attrib *) attr->data; - _mesa_Hint(GL_PERSPECTIVE_CORRECTION_HINT, - hint->PerspectiveCorrection ); - _mesa_Hint(GL_POINT_SMOOTH_HINT, hint->PointSmooth); - _mesa_Hint(GL_LINE_SMOOTH_HINT, hint->LineSmooth); - _mesa_Hint(GL_POLYGON_SMOOTH_HINT, hint->PolygonSmooth); - _mesa_Hint(GL_FOG_HINT, hint->Fog); - _mesa_Hint(GL_CLIP_VOLUME_CLIPPING_HINT_EXT, - hint->ClipVolumeClipping); - _mesa_Hint(GL_TEXTURE_COMPRESSION_HINT_ARB, - hint->TextureCompression); - } - break; - case GL_LIGHTING_BIT: - { - GLuint i; - const struct gl_light_attrib *light; - light = (const struct gl_light_attrib *) attr->data; - /* lighting enable */ - _mesa_set_enable(ctx, GL_LIGHTING, light->Enabled); - /* per-light state */ - if (_math_matrix_is_dirty(ctx->ModelviewMatrixStack.Top)) - _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); - - for (i = 0; i < ctx->Const.MaxLights; i++) { - const struct gl_light *l = &light->Light[i]; - _mesa_set_enable(ctx, GL_LIGHT0 + i, l->Enabled); - _mesa_light(ctx, i, GL_AMBIENT, l->Ambient); - _mesa_light(ctx, i, GL_DIFFUSE, l->Diffuse); - _mesa_light(ctx, i, GL_SPECULAR, l->Specular ); - _mesa_light(ctx, i, GL_POSITION, l->EyePosition); - _mesa_light(ctx, i, GL_SPOT_DIRECTION, l->SpotDirection); - { - GLfloat p[4] = { 0 }; - p[0] = l->SpotExponent; - _mesa_light(ctx, i, GL_SPOT_EXPONENT, p); - } - { - GLfloat p[4] = { 0 }; - p[0] = l->SpotCutoff; - _mesa_light(ctx, i, GL_SPOT_CUTOFF, p); - } - { - GLfloat p[4] = { 0 }; - p[0] = l->ConstantAttenuation; - _mesa_light(ctx, i, GL_CONSTANT_ATTENUATION, p); - } - { - GLfloat p[4] = { 0 }; - p[0] = l->LinearAttenuation; - _mesa_light(ctx, i, GL_LINEAR_ATTENUATION, p); - } - { - GLfloat p[4] = { 0 }; - p[0] = l->QuadraticAttenuation; - _mesa_light(ctx, i, GL_QUADRATIC_ATTENUATION, p); - } - } - /* light model */ - _mesa_LightModelfv(GL_LIGHT_MODEL_AMBIENT, - light->Model.Ambient); - _mesa_LightModelf(GL_LIGHT_MODEL_LOCAL_VIEWER, - (GLfloat) light->Model.LocalViewer); - _mesa_LightModelf(GL_LIGHT_MODEL_TWO_SIDE, - (GLfloat) light->Model.TwoSide); - _mesa_LightModelf(GL_LIGHT_MODEL_COLOR_CONTROL, - (GLfloat) light->Model.ColorControl); - /* shade model */ - _mesa_ShadeModel(light->ShadeModel); - /* color material */ - _mesa_ColorMaterial(light->ColorMaterialFace, - light->ColorMaterialMode); - _mesa_set_enable(ctx, GL_COLOR_MATERIAL, - light->ColorMaterialEnabled); - /* materials */ - memcpy(&ctx->Light.Material, &light->Material, - sizeof(struct gl_material)); - _mesa_ClampColorARB(GL_CLAMP_VERTEX_COLOR_ARB, light->ClampVertexColor); - } - break; - case GL_LINE_BIT: - { - const struct gl_line_attrib *line; - line = (const struct gl_line_attrib *) attr->data; - _mesa_set_enable(ctx, GL_LINE_SMOOTH, line->SmoothFlag); - _mesa_set_enable(ctx, GL_LINE_STIPPLE, line->StippleFlag); - _mesa_LineStipple(line->StippleFactor, line->StipplePattern); - _mesa_LineWidth(line->Width); - } - break; - case GL_LIST_BIT: - memcpy( &ctx->List, attr->data, sizeof(struct gl_list_attrib) ); - break; - case GL_PIXEL_MODE_BIT: - memcpy( &ctx->Pixel, attr->data, sizeof(struct gl_pixel_attrib) ); - /* XXX what other pixel state needs to be set by function calls? */ - _mesa_ReadBuffer(ctx->Pixel.ReadBuffer); - ctx->NewState |= _NEW_PIXEL; - break; - case GL_POINT_BIT: - { - const struct gl_point_attrib *point; - point = (const struct gl_point_attrib *) attr->data; - _mesa_PointSize(point->Size); - _mesa_set_enable(ctx, GL_POINT_SMOOTH, point->SmoothFlag); - if (ctx->Extensions.EXT_point_parameters) { - _mesa_PointParameterfv(GL_DISTANCE_ATTENUATION_EXT, - point->Params); - _mesa_PointParameterf(GL_POINT_SIZE_MIN_EXT, - point->MinSize); - _mesa_PointParameterf(GL_POINT_SIZE_MAX_EXT, - point->MaxSize); - _mesa_PointParameterf(GL_POINT_FADE_THRESHOLD_SIZE_EXT, - point->Threshold); - } - if (ctx->Extensions.NV_point_sprite - || ctx->Extensions.ARB_point_sprite) { - GLuint u; - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - _mesa_TexEnvi(GL_POINT_SPRITE_NV, GL_COORD_REPLACE_NV, - (GLint) point->CoordReplace[u]); - } - _mesa_set_enable(ctx, GL_POINT_SPRITE_NV,point->PointSprite); - if (ctx->Extensions.NV_point_sprite) - _mesa_PointParameteri(GL_POINT_SPRITE_R_MODE_NV, - ctx->Point.SpriteRMode); - _mesa_PointParameterf(GL_POINT_SPRITE_COORD_ORIGIN, - (GLfloat)ctx->Point.SpriteOrigin); - } - } - break; - case GL_POLYGON_BIT: - { - const struct gl_polygon_attrib *polygon; - polygon = (const struct gl_polygon_attrib *) attr->data; - _mesa_CullFace(polygon->CullFaceMode); - _mesa_FrontFace(polygon->FrontFace); - _mesa_PolygonMode(GL_FRONT, polygon->FrontMode); - _mesa_PolygonMode(GL_BACK, polygon->BackMode); - _mesa_PolygonOffset(polygon->OffsetFactor, - polygon->OffsetUnits); - _mesa_set_enable(ctx, GL_POLYGON_SMOOTH, polygon->SmoothFlag); - _mesa_set_enable(ctx, GL_POLYGON_STIPPLE, polygon->StippleFlag); - _mesa_set_enable(ctx, GL_CULL_FACE, polygon->CullFlag); - _mesa_set_enable(ctx, GL_POLYGON_OFFSET_POINT, - polygon->OffsetPoint); - _mesa_set_enable(ctx, GL_POLYGON_OFFSET_LINE, - polygon->OffsetLine); - _mesa_set_enable(ctx, GL_POLYGON_OFFSET_FILL, - polygon->OffsetFill); - } - break; - case GL_POLYGON_STIPPLE_BIT: - memcpy( ctx->PolygonStipple, attr->data, 32*sizeof(GLuint) ); - ctx->NewState |= _NEW_POLYGONSTIPPLE; - if (ctx->Driver.PolygonStipple) - ctx->Driver.PolygonStipple( ctx, (const GLubyte *) attr->data ); - break; - case GL_SCISSOR_BIT: - { - const struct gl_scissor_attrib *scissor; - scissor = (const struct gl_scissor_attrib *) attr->data; - _mesa_Scissor(scissor->X, scissor->Y, - scissor->Width, scissor->Height); - _mesa_set_enable(ctx, GL_SCISSOR_TEST, scissor->Enabled); - } - break; - case GL_STENCIL_BUFFER_BIT: - { - const struct gl_stencil_attrib *stencil; - stencil = (const struct gl_stencil_attrib *) attr->data; - _mesa_set_enable(ctx, GL_STENCIL_TEST, stencil->Enabled); - _mesa_ClearStencil(stencil->Clear); - if (ctx->Extensions.EXT_stencil_two_side) { - _mesa_set_enable(ctx, GL_STENCIL_TEST_TWO_SIDE_EXT, - stencil->TestTwoSide); - _mesa_ActiveStencilFaceEXT(stencil->ActiveFace - ? GL_BACK : GL_FRONT); - } - /* front state */ - _mesa_StencilFuncSeparate(GL_FRONT, - stencil->Function[0], - stencil->Ref[0], - stencil->ValueMask[0]); - _mesa_StencilMaskSeparate(GL_FRONT, stencil->WriteMask[0]); - _mesa_StencilOpSeparate(GL_FRONT, stencil->FailFunc[0], - stencil->ZFailFunc[0], - stencil->ZPassFunc[0]); - /* back state */ - _mesa_StencilFuncSeparate(GL_BACK, - stencil->Function[1], - stencil->Ref[1], - stencil->ValueMask[1]); - _mesa_StencilMaskSeparate(GL_BACK, stencil->WriteMask[1]); - _mesa_StencilOpSeparate(GL_BACK, stencil->FailFunc[1], - stencil->ZFailFunc[1], - stencil->ZPassFunc[1]); - } - break; - case GL_TRANSFORM_BIT: - { - GLuint i; - const struct gl_transform_attrib *xform; - xform = (const struct gl_transform_attrib *) attr->data; - _mesa_MatrixMode(xform->MatrixMode); - if (_math_matrix_is_dirty(ctx->ProjectionMatrixStack.Top)) - _math_matrix_analyse( ctx->ProjectionMatrixStack.Top ); - - /* restore clip planes */ - for (i = 0; i < MAX_CLIP_PLANES; i++) { - const GLuint mask = 1 << i; - const GLfloat *eyePlane = xform->EyeUserPlane[i]; - COPY_4V(ctx->Transform.EyeUserPlane[i], eyePlane); - if (xform->ClipPlanesEnabled & mask) { - _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, GL_TRUE); - } - else { - _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, GL_FALSE); - } - if (ctx->Driver.ClipPlane) - ctx->Driver.ClipPlane( ctx, GL_CLIP_PLANE0 + i, eyePlane ); - } - - /* normalize/rescale */ - if (xform->Normalize != ctx->Transform.Normalize) - _mesa_set_enable(ctx, GL_NORMALIZE,ctx->Transform.Normalize); - if (xform->RescaleNormals != ctx->Transform.RescaleNormals) - _mesa_set_enable(ctx, GL_RESCALE_NORMAL_EXT, - ctx->Transform.RescaleNormals); - if (xform->DepthClamp != ctx->Transform.DepthClamp) - _mesa_set_enable(ctx, GL_DEPTH_CLAMP, - ctx->Transform.DepthClamp); - } - break; - case GL_TEXTURE_BIT: - /* Take care of texture object reference counters */ - { - struct texture_state *texstate - = (struct texture_state *) attr->data; - pop_texture_group(ctx, texstate); - ctx->NewState |= _NEW_TEXTURE; - } - break; - case GL_VIEWPORT_BIT: - { - const struct gl_viewport_attrib *vp; - vp = (const struct gl_viewport_attrib *) attr->data; - _mesa_Viewport(vp->X, vp->Y, vp->Width, vp->Height); - _mesa_DepthRange(vp->Near, vp->Far); - } - break; - case GL_MULTISAMPLE_BIT_ARB: - { - const struct gl_multisample_attrib *ms; - ms = (const struct gl_multisample_attrib *) attr->data; - _mesa_SampleCoverageARB(ms->SampleCoverageValue, - ms->SampleCoverageInvert); - } - break; - - default: - _mesa_problem( ctx, "Bad attrib flag in PopAttrib"); - break; - } - - next = attr->next; - FREE( attr->data ); - FREE( attr ); - attr = next; - } -} - - -/** - * Helper for incrementing/decrementing vertex buffer object reference - * counts when pushing/popping the GL_CLIENT_VERTEX_ARRAY_BIT attribute group. - */ -static void -adjust_buffer_object_ref_counts(struct gl_array_object *arrayObj, GLint step) -{ - GLuint i; - - arrayObj->Vertex.BufferObj->RefCount += step; - arrayObj->Weight.BufferObj->RefCount += step; - arrayObj->Normal.BufferObj->RefCount += step; - arrayObj->Color.BufferObj->RefCount += step; - arrayObj->SecondaryColor.BufferObj->RefCount += step; - arrayObj->FogCoord.BufferObj->RefCount += step; - arrayObj->Index.BufferObj->RefCount += step; - arrayObj->EdgeFlag.BufferObj->RefCount += step; - for (i = 0; i < Elements(arrayObj->TexCoord); i++) - arrayObj->TexCoord[i].BufferObj->RefCount += step; - for (i = 0; i < Elements(arrayObj->VertexAttrib); i++) - arrayObj->VertexAttrib[i].BufferObj->RefCount += step; -} - - -/** - * Copy gl_pixelstore_attrib from src to dst, updating buffer - * object refcounts. - */ -static void -copy_pixelstore(struct gl_context *ctx, - struct gl_pixelstore_attrib *dst, - const struct gl_pixelstore_attrib *src) -{ - dst->Alignment = src->Alignment; - dst->RowLength = src->RowLength; - dst->SkipPixels = src->SkipPixels; - dst->SkipRows = src->SkipRows; - dst->ImageHeight = src->ImageHeight; - dst->SkipImages = src->SkipImages; - dst->SwapBytes = src->SwapBytes; - dst->LsbFirst = src->LsbFirst; - dst->ClientStorage = src->ClientStorage; - dst->Invert = src->Invert; - _mesa_reference_buffer_object(ctx, &dst->BufferObj, src->BufferObj); -} - - -#define GL_CLIENT_PACK_BIT (1<<20) -#define GL_CLIENT_UNPACK_BIT (1<<21) - - -void GLAPIENTRY -_mesa_PushClientAttrib(GLbitfield mask) -{ - struct gl_attrib_node *head; - - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->ClientAttribStackDepth >= MAX_CLIENT_ATTRIB_STACK_DEPTH) { - _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushClientAttrib" ); - return; - } - - /* Build linked list of attribute nodes which save all attribute - * groups specified by the mask. - */ - head = NULL; - - if (mask & GL_CLIENT_PIXEL_STORE_BIT) { - struct gl_pixelstore_attrib *attr; - /* packing attribs */ - attr = CALLOC_STRUCT( gl_pixelstore_attrib ); - copy_pixelstore(ctx, attr, &ctx->Pack); - save_attrib_data(&head, GL_CLIENT_PACK_BIT, attr); - /* unpacking attribs */ - attr = CALLOC_STRUCT( gl_pixelstore_attrib ); - copy_pixelstore(ctx, attr, &ctx->Unpack); - save_attrib_data(&head, GL_CLIENT_UNPACK_BIT, attr); - } - - if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) { - struct gl_array_attrib *attr; - struct gl_array_object *obj; - - attr = MALLOC_STRUCT( gl_array_attrib ); - obj = MALLOC_STRUCT( gl_array_object ); - -#if FEATURE_ARB_vertex_buffer_object - /* increment ref counts since we're copying pointers to these objects */ - ctx->Array.ArrayBufferObj->RefCount++; - ctx->Array.ElementArrayBufferObj->RefCount++; -#endif - - memcpy( attr, &ctx->Array, sizeof(struct gl_array_attrib) ); - memcpy( obj, ctx->Array.ArrayObj, sizeof(struct gl_array_object) ); - - attr->ArrayObj = obj; - - save_attrib_data(&head, GL_CLIENT_VERTEX_ARRAY_BIT, attr); - - /* bump reference counts on buffer objects */ - adjust_buffer_object_ref_counts(ctx->Array.ArrayObj, 1); - } - - ctx->ClientAttribStack[ctx->ClientAttribStackDepth] = head; - ctx->ClientAttribStackDepth++; -} - - - - -void GLAPIENTRY -_mesa_PopClientAttrib(void) -{ - struct gl_attrib_node *node, *next; - - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (ctx->ClientAttribStackDepth == 0) { - _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopClientAttrib" ); - return; - } - - ctx->ClientAttribStackDepth--; - node = ctx->ClientAttribStack[ctx->ClientAttribStackDepth]; - - while (node) { - switch (node->kind) { - case GL_CLIENT_PACK_BIT: - { - struct gl_pixelstore_attrib *store = - (struct gl_pixelstore_attrib *) node->data; - copy_pixelstore(ctx, &ctx->Pack, store); - _mesa_reference_buffer_object(ctx, &store->BufferObj, NULL); - } - ctx->NewState |= _NEW_PACKUNPACK; - break; - case GL_CLIENT_UNPACK_BIT: - { - struct gl_pixelstore_attrib *store = - (struct gl_pixelstore_attrib *) node->data; - copy_pixelstore(ctx, &ctx->Unpack, store); - _mesa_reference_buffer_object(ctx, &store->BufferObj, NULL); - } - ctx->NewState |= _NEW_PACKUNPACK; - break; - case GL_CLIENT_VERTEX_ARRAY_BIT: { - struct gl_array_attrib * data = - (struct gl_array_attrib *) node->data; - - adjust_buffer_object_ref_counts(ctx->Array.ArrayObj, -1); - - ctx->Array.ActiveTexture = data->ActiveTexture; - if (data->LockCount != 0) - _mesa_LockArraysEXT(data->LockFirst, data->LockCount); - else if (ctx->Array.LockCount) - _mesa_UnlockArraysEXT(); - - _mesa_BindVertexArrayAPPLE( data->ArrayObj->Name ); - -#if FEATURE_ARB_vertex_buffer_object - _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB, - data->ArrayBufferObj->Name); - _mesa_BindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, - data->ElementArrayBufferObj->Name); -#endif - - memcpy( ctx->Array.ArrayObj, data->ArrayObj, - sizeof( struct gl_array_object ) ); - - FREE( data->ArrayObj ); - - /* FIXME: Should some bits in ctx->Array->NewState also be set - * FIXME: here? It seems like it should be set to inclusive-or - * FIXME: of the old ArrayObj->_Enabled and the new _Enabled. - */ - - ctx->NewState |= _NEW_ARRAY; - break; - } - default: - _mesa_problem( ctx, "Bad attrib flag in PopClientAttrib"); - break; - } - - next = node->next; - FREE( node->data ); - FREE( node ); - node = next; - } -} - - -void -_mesa_init_attrib_dispatch(struct _glapi_table *disp) -{ - SET_PopAttrib(disp, _mesa_PopAttrib); - SET_PushAttrib(disp, _mesa_PushAttrib); - SET_PopClientAttrib(disp, _mesa_PopClientAttrib); - SET_PushClientAttrib(disp, _mesa_PushClientAttrib); -} - - -#endif /* FEATURE_attrib_stack */ - - -/** - * Free any attribute state data that might be attached to the context. - */ -void -_mesa_free_attrib_data(struct gl_context *ctx) -{ - while (ctx->AttribStackDepth > 0) { - struct gl_attrib_node *attr, *next; - - ctx->AttribStackDepth--; - attr = ctx->AttribStack[ctx->AttribStackDepth]; - - while (attr) { - if (attr->kind == GL_TEXTURE_BIT) { - struct texture_state *texstate = (struct texture_state*)attr->data; - GLuint u, tgt; - /* clear references to the saved texture objects */ - for (u = 0; u < ctx->Const.MaxTextureUnits; u++) { - for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { - _mesa_reference_texobj(&texstate->SavedTexRef[u][tgt], NULL); - } - } - } - else { - /* any other chunks of state that requires special handling? */ - } - - next = attr->next; - free(attr->data); - free(attr); - attr = next; - } - } -} - - -void _mesa_init_attrib( struct gl_context *ctx ) -{ - /* Renderer and client attribute stacks */ - ctx->AttribStackDepth = 0; - ctx->ClientAttribStackDepth = 0; -} +/*
+ * Mesa 3-D graphics library
+ * Version: 7.6
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
+ *
+ * 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
+ * BRIAN PAUL 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.
+ */
+
+#include "glheader.h"
+#include "imports.h"
+#include "accum.h"
+#include "arrayobj.h"
+#include "attrib.h"
+#include "blend.h"
+#include "buffers.h"
+#include "bufferobj.h"
+#include "clear.h"
+#include "colormac.h"
+#include "context.h"
+#include "depth.h"
+#include "enable.h"
+#include "enums.h"
+#include "fog.h"
+#include "hint.h"
+#include "light.h"
+#include "lines.h"
+#include "macros.h"
+#include "matrix.h"
+#include "mfeatures.h"
+#include "multisample.h"
+#include "points.h"
+#include "polygon.h"
+#include "scissor.h"
+#include "stencil.h"
+#include "texenv.h"
+#include "texgen.h"
+#include "texobj.h"
+#include "texparam.h"
+#include "texstate.h"
+#include "varray.h"
+#include "viewport.h"
+#include "mtypes.h"
+#include "main/dispatch.h"
+
+
+/**
+ * glEnable()/glDisable() attribute group (GL_ENABLE_BIT).
+ */
+struct gl_enable_attrib
+{
+ GLboolean AlphaTest;
+ GLboolean AutoNormal;
+ GLboolean Blend;
+ GLbitfield ClipPlanes;
+ GLboolean ColorMaterial;
+ GLboolean CullFace;
+ GLboolean DepthClamp;
+ GLboolean DepthTest;
+ GLboolean Dither;
+ GLboolean Fog;
+ GLboolean Light[MAX_LIGHTS];
+ GLboolean Lighting;
+ GLboolean LineSmooth;
+ GLboolean LineStipple;
+ GLboolean IndexLogicOp;
+ GLboolean ColorLogicOp;
+
+ GLboolean Map1Color4;
+ GLboolean Map1Index;
+ GLboolean Map1Normal;
+ GLboolean Map1TextureCoord1;
+ GLboolean Map1TextureCoord2;
+ GLboolean Map1TextureCoord3;
+ GLboolean Map1TextureCoord4;
+ GLboolean Map1Vertex3;
+ GLboolean Map1Vertex4;
+ GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */
+ GLboolean Map2Color4;
+ GLboolean Map2Index;
+ GLboolean Map2Normal;
+ GLboolean Map2TextureCoord1;
+ GLboolean Map2TextureCoord2;
+ GLboolean Map2TextureCoord3;
+ GLboolean Map2TextureCoord4;
+ GLboolean Map2Vertex3;
+ GLboolean Map2Vertex4;
+ GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */
+
+ GLboolean Normalize;
+ GLboolean PixelTexture;
+ GLboolean PointSmooth;
+ GLboolean PolygonOffsetPoint;
+ GLboolean PolygonOffsetLine;
+ GLboolean PolygonOffsetFill;
+ GLboolean PolygonSmooth;
+ GLboolean PolygonStipple;
+ GLboolean RescaleNormals;
+ GLboolean Scissor;
+ GLboolean Stencil;
+ GLboolean StencilTwoSide; /* GL_EXT_stencil_two_side */
+ GLboolean MultisampleEnabled; /* GL_ARB_multisample */
+ GLboolean SampleAlphaToCoverage; /* GL_ARB_multisample */
+ GLboolean SampleAlphaToOne; /* GL_ARB_multisample */
+ GLboolean SampleCoverage; /* GL_ARB_multisample */
+ GLboolean SampleCoverageInvert; /* GL_ARB_multisample */
+ GLboolean RasterPositionUnclipped; /* GL_IBM_rasterpos_clip */
+
+ GLbitfield Texture[MAX_TEXTURE_UNITS];
+ GLbitfield TexGen[MAX_TEXTURE_UNITS];
+
+ /* GL_ARB_vertex_program / GL_NV_vertex_program */
+ GLboolean VertexProgram;
+ GLboolean VertexProgramPointSize;
+ GLboolean VertexProgramTwoSide;
+
+ /* GL_ARB_point_sprite / GL_NV_point_sprite */
+ GLboolean PointSprite;
+ GLboolean FragmentShaderATI;
+};
+
+
+/**
+ * Node for the attribute stack.
+ */
+struct gl_attrib_node
+{
+ GLbitfield kind;
+ void *data;
+ struct gl_attrib_node *next;
+};
+
+
+
+/**
+ * Special struct for saving/restoring texture state (GL_TEXTURE_BIT)
+ */
+struct texture_state
+{
+ struct gl_texture_attrib Texture; /**< The usual context state */
+
+ /** to save per texture object state (wrap modes, filters, etc): */
+ struct gl_texture_object SavedObj[MAX_TEXTURE_UNITS][NUM_TEXTURE_TARGETS];
+
+ /**
+ * To save references to texture objects (so they don't get accidentally
+ * deleted while saved in the attribute stack).
+ */
+ struct gl_texture_object *SavedTexRef[MAX_TEXTURE_UNITS][NUM_TEXTURE_TARGETS];
+};
+
+
+#if FEATURE_attrib_stack
+
+
+/**
+ * Allocate new attribute node of given type/kind. Attach payload data.
+ * Insert it into the linked list named by 'head'.
+ */
+static void
+save_attrib_data(struct gl_attrib_node **head,
+ GLbitfield kind, void *payload)
+{
+ struct gl_attrib_node *n = MALLOC_STRUCT(gl_attrib_node);
+ if (n) {
+ n->kind = kind;
+ n->data = payload;
+ /* insert at head */
+ n->next = *head;
+ *head = n;
+ }
+ else {
+ /* out of memory! */
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_PushAttrib(GLbitfield mask)
+{
+ struct gl_attrib_node *head;
+
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx, "glPushAttrib %x\n", (int) mask);
+
+ if (ctx->AttribStackDepth >= MAX_ATTRIB_STACK_DEPTH) {
+ _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushAttrib" );
+ return;
+ }
+
+ /* Build linked list of attribute nodes which save all attribute */
+ /* groups specified by the mask. */
+ head = NULL;
+
+ if (mask & GL_ACCUM_BUFFER_BIT) {
+ struct gl_accum_attrib *attr;
+ attr = MALLOC_STRUCT( gl_accum_attrib );
+ memcpy( attr, &ctx->Accum, sizeof(struct gl_accum_attrib) );
+ save_attrib_data(&head, GL_ACCUM_BUFFER_BIT, attr);
+ }
+
+ if (mask & GL_COLOR_BUFFER_BIT) {
+ GLuint i;
+ struct gl_colorbuffer_attrib *attr;
+ attr = MALLOC_STRUCT( gl_colorbuffer_attrib );
+ memcpy( attr, &ctx->Color, sizeof(struct gl_colorbuffer_attrib) );
+ /* push the Draw FBO's DrawBuffer[] state, not ctx->Color.DrawBuffer[] */
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i ++)
+ attr->DrawBuffer[i] = ctx->DrawBuffer->ColorDrawBuffer[i];
+ save_attrib_data(&head, GL_COLOR_BUFFER_BIT, attr);
+ }
+
+ if (mask & GL_CURRENT_BIT) {
+ struct gl_current_attrib *attr;
+ FLUSH_CURRENT( ctx, 0 );
+ attr = MALLOC_STRUCT( gl_current_attrib );
+ memcpy( attr, &ctx->Current, sizeof(struct gl_current_attrib) );
+ save_attrib_data(&head, GL_CURRENT_BIT, attr);
+ }
+
+ if (mask & GL_DEPTH_BUFFER_BIT) {
+ struct gl_depthbuffer_attrib *attr;
+ attr = MALLOC_STRUCT( gl_depthbuffer_attrib );
+ memcpy( attr, &ctx->Depth, sizeof(struct gl_depthbuffer_attrib) );
+ save_attrib_data(&head, GL_DEPTH_BUFFER_BIT, attr);
+ }
+
+ if (mask & GL_ENABLE_BIT) {
+ struct gl_enable_attrib *attr;
+ GLuint i;
+ attr = MALLOC_STRUCT( gl_enable_attrib );
+ /* Copy enable flags from all other attributes into the enable struct. */
+ attr->AlphaTest = ctx->Color.AlphaEnabled;
+ attr->AutoNormal = ctx->Eval.AutoNormal;
+ attr->Blend = ctx->Color.BlendEnabled;
+ attr->ClipPlanes = ctx->Transform.ClipPlanesEnabled;
+ attr->ColorMaterial = ctx->Light.ColorMaterialEnabled;
+ attr->CullFace = ctx->Polygon.CullFlag;
+ attr->DepthClamp = ctx->Transform.DepthClamp;
+ attr->DepthTest = ctx->Depth.Test;
+ attr->Dither = ctx->Color.DitherFlag;
+ attr->Fog = ctx->Fog.Enabled;
+ for (i = 0; i < ctx->Const.MaxLights; i++) {
+ attr->Light[i] = ctx->Light.Light[i].Enabled;
+ }
+ attr->Lighting = ctx->Light.Enabled;
+ attr->LineSmooth = ctx->Line.SmoothFlag;
+ attr->LineStipple = ctx->Line.StippleFlag;
+ attr->IndexLogicOp = ctx->Color.IndexLogicOpEnabled;
+ attr->ColorLogicOp = ctx->Color.ColorLogicOpEnabled;
+ attr->Map1Color4 = ctx->Eval.Map1Color4;
+ attr->Map1Index = ctx->Eval.Map1Index;
+ attr->Map1Normal = ctx->Eval.Map1Normal;
+ attr->Map1TextureCoord1 = ctx->Eval.Map1TextureCoord1;
+ attr->Map1TextureCoord2 = ctx->Eval.Map1TextureCoord2;
+ attr->Map1TextureCoord3 = ctx->Eval.Map1TextureCoord3;
+ attr->Map1TextureCoord4 = ctx->Eval.Map1TextureCoord4;
+ attr->Map1Vertex3 = ctx->Eval.Map1Vertex3;
+ attr->Map1Vertex4 = ctx->Eval.Map1Vertex4;
+ memcpy(attr->Map1Attrib, ctx->Eval.Map1Attrib, sizeof(ctx->Eval.Map1Attrib));
+ attr->Map2Color4 = ctx->Eval.Map2Color4;
+ attr->Map2Index = ctx->Eval.Map2Index;
+ attr->Map2Normal = ctx->Eval.Map2Normal;
+ attr->Map2TextureCoord1 = ctx->Eval.Map2TextureCoord1;
+ attr->Map2TextureCoord2 = ctx->Eval.Map2TextureCoord2;
+ attr->Map2TextureCoord3 = ctx->Eval.Map2TextureCoord3;
+ attr->Map2TextureCoord4 = ctx->Eval.Map2TextureCoord4;
+ attr->Map2Vertex3 = ctx->Eval.Map2Vertex3;
+ attr->Map2Vertex4 = ctx->Eval.Map2Vertex4;
+ memcpy(attr->Map2Attrib, ctx->Eval.Map2Attrib, sizeof(ctx->Eval.Map2Attrib));
+ attr->Normalize = ctx->Transform.Normalize;
+ attr->RasterPositionUnclipped = ctx->Transform.RasterPositionUnclipped;
+ attr->PointSmooth = ctx->Point.SmoothFlag;
+ attr->PointSprite = ctx->Point.PointSprite;
+ attr->PolygonOffsetPoint = ctx->Polygon.OffsetPoint;
+ attr->PolygonOffsetLine = ctx->Polygon.OffsetLine;
+ attr->PolygonOffsetFill = ctx->Polygon.OffsetFill;
+ attr->PolygonSmooth = ctx->Polygon.SmoothFlag;
+ attr->PolygonStipple = ctx->Polygon.StippleFlag;
+ attr->RescaleNormals = ctx->Transform.RescaleNormals;
+ attr->Scissor = ctx->Scissor.Enabled;
+ attr->Stencil = ctx->Stencil.Enabled;
+ attr->StencilTwoSide = ctx->Stencil.TestTwoSide;
+ attr->MultisampleEnabled = ctx->Multisample.Enabled;
+ attr->SampleAlphaToCoverage = ctx->Multisample.SampleAlphaToCoverage;
+ attr->SampleAlphaToOne = ctx->Multisample.SampleAlphaToOne;
+ attr->SampleCoverage = ctx->Multisample.SampleCoverage;
+ attr->SampleCoverageInvert = ctx->Multisample.SampleCoverageInvert;
+ for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
+ attr->Texture[i] = ctx->Texture.Unit[i].Enabled;
+ attr->TexGen[i] = ctx->Texture.Unit[i].TexGenEnabled;
+ }
+ /* GL_NV_vertex_program */
+ attr->VertexProgram = ctx->VertexProgram.Enabled;
+ attr->VertexProgramPointSize = ctx->VertexProgram.PointSizeEnabled;
+ attr->VertexProgramTwoSide = ctx->VertexProgram.TwoSideEnabled;
+ save_attrib_data(&head, GL_ENABLE_BIT, attr);
+ }
+
+ if (mask & GL_EVAL_BIT) {
+ struct gl_eval_attrib *attr;
+ attr = MALLOC_STRUCT( gl_eval_attrib );
+ memcpy( attr, &ctx->Eval, sizeof(struct gl_eval_attrib) );
+ save_attrib_data(&head, GL_EVAL_BIT, attr);
+ }
+
+ if (mask & GL_FOG_BIT) {
+ struct gl_fog_attrib *attr;
+ attr = MALLOC_STRUCT( gl_fog_attrib );
+ memcpy( attr, &ctx->Fog, sizeof(struct gl_fog_attrib) );
+ save_attrib_data(&head, GL_FOG_BIT, attr);
+ }
+
+ if (mask & GL_HINT_BIT) {
+ struct gl_hint_attrib *attr;
+ attr = MALLOC_STRUCT( gl_hint_attrib );
+ memcpy( attr, &ctx->Hint, sizeof(struct gl_hint_attrib) );
+ save_attrib_data(&head, GL_HINT_BIT, attr);
+ }
+
+ if (mask & GL_LIGHTING_BIT) {
+ struct gl_light_attrib *attr;
+ FLUSH_CURRENT(ctx, 0); /* flush material changes */
+ attr = MALLOC_STRUCT( gl_light_attrib );
+ memcpy( attr, &ctx->Light, sizeof(struct gl_light_attrib) );
+ save_attrib_data(&head, GL_LIGHTING_BIT, attr);
+ }
+
+ if (mask & GL_LINE_BIT) {
+ struct gl_line_attrib *attr;
+ attr = MALLOC_STRUCT( gl_line_attrib );
+ memcpy( attr, &ctx->Line, sizeof(struct gl_line_attrib) );
+ save_attrib_data(&head, GL_LINE_BIT, attr);
+ }
+
+ if (mask & GL_LIST_BIT) {
+ struct gl_list_attrib *attr;
+ attr = MALLOC_STRUCT( gl_list_attrib );
+ memcpy( attr, &ctx->List, sizeof(struct gl_list_attrib) );
+ save_attrib_data(&head, GL_LIST_BIT, attr);
+ }
+
+ if (mask & GL_PIXEL_MODE_BIT) {
+ struct gl_pixel_attrib *attr;
+ attr = MALLOC_STRUCT( gl_pixel_attrib );
+ memcpy( attr, &ctx->Pixel, sizeof(struct gl_pixel_attrib) );
+ /* push the Read FBO's ReadBuffer state, not ctx->Pixel.ReadBuffer */
+ attr->ReadBuffer = ctx->ReadBuffer->ColorReadBuffer;
+ save_attrib_data(&head, GL_PIXEL_MODE_BIT, attr);
+ }
+
+ if (mask & GL_POINT_BIT) {
+ struct gl_point_attrib *attr;
+ attr = MALLOC_STRUCT( gl_point_attrib );
+ memcpy( attr, &ctx->Point, sizeof(struct gl_point_attrib) );
+ save_attrib_data(&head, GL_POINT_BIT, attr);
+ }
+
+ if (mask & GL_POLYGON_BIT) {
+ struct gl_polygon_attrib *attr;
+ attr = MALLOC_STRUCT( gl_polygon_attrib );
+ memcpy( attr, &ctx->Polygon, sizeof(struct gl_polygon_attrib) );
+ save_attrib_data(&head, GL_POLYGON_BIT, attr);
+ }
+
+ if (mask & GL_POLYGON_STIPPLE_BIT) {
+ GLuint *stipple;
+ stipple = (GLuint *) MALLOC( 32*sizeof(GLuint) );
+ memcpy( stipple, ctx->PolygonStipple, 32*sizeof(GLuint) );
+ save_attrib_data(&head, GL_POLYGON_STIPPLE_BIT, stipple);
+ }
+
+ if (mask & GL_SCISSOR_BIT) {
+ struct gl_scissor_attrib *attr;
+ attr = MALLOC_STRUCT( gl_scissor_attrib );
+ memcpy( attr, &ctx->Scissor, sizeof(struct gl_scissor_attrib) );
+ save_attrib_data(&head, GL_SCISSOR_BIT, attr);
+ }
+
+ if (mask & GL_STENCIL_BUFFER_BIT) {
+ struct gl_stencil_attrib *attr;
+ attr = MALLOC_STRUCT( gl_stencil_attrib );
+ memcpy( attr, &ctx->Stencil, sizeof(struct gl_stencil_attrib) );
+ save_attrib_data(&head, GL_STENCIL_BUFFER_BIT, attr);
+ }
+
+ if (mask & GL_TEXTURE_BIT) {
+ struct texture_state *texstate = CALLOC_STRUCT(texture_state);
+ GLuint u, tex;
+
+ if (!texstate) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glPushAttrib(GL_TEXTURE_BIT)");
+ goto end;
+ }
+
+ _mesa_lock_context_textures(ctx);
+
+ /* copy/save the bulk of texture state here */
+ memcpy(&texstate->Texture, &ctx->Texture, sizeof(ctx->Texture));
+
+ /* Save references to the currently bound texture objects so they don't
+ * accidentally get deleted while referenced in the attribute stack.
+ */
+ for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
+ for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
+ _mesa_reference_texobj(&texstate->SavedTexRef[u][tex],
+ ctx->Texture.Unit[u].CurrentTex[tex]);
+ }
+ }
+
+ /* copy state/contents of the currently bound texture objects */
+ for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
+ for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
+ _mesa_copy_texture_object(&texstate->SavedObj[u][tex],
+ ctx->Texture.Unit[u].CurrentTex[tex]);
+ }
+ }
+
+ _mesa_unlock_context_textures(ctx);
+
+ save_attrib_data(&head, GL_TEXTURE_BIT, texstate);
+ }
+
+ if (mask & GL_TRANSFORM_BIT) {
+ struct gl_transform_attrib *attr;
+ attr = MALLOC_STRUCT( gl_transform_attrib );
+ memcpy( attr, &ctx->Transform, sizeof(struct gl_transform_attrib) );
+ save_attrib_data(&head, GL_TRANSFORM_BIT, attr);
+ }
+
+ if (mask & GL_VIEWPORT_BIT) {
+ struct gl_viewport_attrib *attr;
+ attr = MALLOC_STRUCT( gl_viewport_attrib );
+ memcpy( attr, &ctx->Viewport, sizeof(struct gl_viewport_attrib) );
+ save_attrib_data(&head, GL_VIEWPORT_BIT, attr);
+ }
+
+ /* GL_ARB_multisample */
+ if (mask & GL_MULTISAMPLE_BIT_ARB) {
+ struct gl_multisample_attrib *attr;
+ attr = MALLOC_STRUCT( gl_multisample_attrib );
+ memcpy( attr, &ctx->Multisample, sizeof(struct gl_multisample_attrib) );
+ save_attrib_data(&head, GL_MULTISAMPLE_BIT_ARB, attr);
+ }
+
+end:
+ ctx->AttribStack[ctx->AttribStackDepth] = head;
+ ctx->AttribStackDepth++;
+}
+
+
+
+static void
+pop_enable_group(struct gl_context *ctx, const struct gl_enable_attrib *enable)
+{
+ const GLuint curTexUnitSave = ctx->Texture.CurrentUnit;
+ GLuint i;
+
+#define TEST_AND_UPDATE(VALUE, NEWVALUE, ENUM) \
+ if ((VALUE) != (NEWVALUE)) { \
+ _mesa_set_enable( ctx, ENUM, (NEWVALUE) ); \
+ }
+
+ TEST_AND_UPDATE(ctx->Color.AlphaEnabled, enable->AlphaTest, GL_ALPHA_TEST);
+ if (ctx->Color.BlendEnabled != enable->Blend) {
+ if (ctx->Extensions.EXT_draw_buffers2) {
+ GLuint i;
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ _mesa_set_enablei(ctx, GL_BLEND, i, (enable->Blend >> i) & 1);
+ }
+ }
+ else {
+ _mesa_set_enable(ctx, GL_BLEND, (enable->Blend & 1));
+ }
+ }
+
+ for (i=0;i<MAX_CLIP_PLANES;i++) {
+ const GLuint mask = 1 << i;
+ if ((ctx->Transform.ClipPlanesEnabled & mask) != (enable->ClipPlanes & mask))
+ _mesa_set_enable(ctx, (GLenum) (GL_CLIP_PLANE0 + i),
+ (GLboolean) ((enable->ClipPlanes & mask) ? GL_TRUE : GL_FALSE));
+ }
+
+ TEST_AND_UPDATE(ctx->Light.ColorMaterialEnabled, enable->ColorMaterial,
+ GL_COLOR_MATERIAL);
+ TEST_AND_UPDATE(ctx->Polygon.CullFlag, enable->CullFace, GL_CULL_FACE);
+ TEST_AND_UPDATE(ctx->Transform.DepthClamp, enable->DepthClamp,
+ GL_DEPTH_CLAMP);
+ TEST_AND_UPDATE(ctx->Depth.Test, enable->DepthTest, GL_DEPTH_TEST);
+ TEST_AND_UPDATE(ctx->Color.DitherFlag, enable->Dither, GL_DITHER);
+ TEST_AND_UPDATE(ctx->Fog.Enabled, enable->Fog, GL_FOG);
+ TEST_AND_UPDATE(ctx->Light.Enabled, enable->Lighting, GL_LIGHTING);
+ TEST_AND_UPDATE(ctx->Line.SmoothFlag, enable->LineSmooth, GL_LINE_SMOOTH);
+ TEST_AND_UPDATE(ctx->Line.StippleFlag, enable->LineStipple,
+ GL_LINE_STIPPLE);
+ TEST_AND_UPDATE(ctx->Color.IndexLogicOpEnabled, enable->IndexLogicOp,
+ GL_INDEX_LOGIC_OP);
+ TEST_AND_UPDATE(ctx->Color.ColorLogicOpEnabled, enable->ColorLogicOp,
+ GL_COLOR_LOGIC_OP);
+
+ TEST_AND_UPDATE(ctx->Eval.Map1Color4, enable->Map1Color4, GL_MAP1_COLOR_4);
+ TEST_AND_UPDATE(ctx->Eval.Map1Index, enable->Map1Index, GL_MAP1_INDEX);
+ TEST_AND_UPDATE(ctx->Eval.Map1Normal, enable->Map1Normal, GL_MAP1_NORMAL);
+ TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord1, enable->Map1TextureCoord1,
+ GL_MAP1_TEXTURE_COORD_1);
+ TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord2, enable->Map1TextureCoord2,
+ GL_MAP1_TEXTURE_COORD_2);
+ TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord3, enable->Map1TextureCoord3,
+ GL_MAP1_TEXTURE_COORD_3);
+ TEST_AND_UPDATE(ctx->Eval.Map1TextureCoord4, enable->Map1TextureCoord4,
+ GL_MAP1_TEXTURE_COORD_4);
+ TEST_AND_UPDATE(ctx->Eval.Map1Vertex3, enable->Map1Vertex3,
+ GL_MAP1_VERTEX_3);
+ TEST_AND_UPDATE(ctx->Eval.Map1Vertex4, enable->Map1Vertex4,
+ GL_MAP1_VERTEX_4);
+ for (i = 0; i < 16; i++) {
+ TEST_AND_UPDATE(ctx->Eval.Map1Attrib[i], enable->Map1Attrib[i],
+ GL_MAP1_VERTEX_ATTRIB0_4_NV + i);
+ }
+
+ TEST_AND_UPDATE(ctx->Eval.Map2Color4, enable->Map2Color4, GL_MAP2_COLOR_4);
+ TEST_AND_UPDATE(ctx->Eval.Map2Index, enable->Map2Index, GL_MAP2_INDEX);
+ TEST_AND_UPDATE(ctx->Eval.Map2Normal, enable->Map2Normal, GL_MAP2_NORMAL);
+ TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord1, enable->Map2TextureCoord1,
+ GL_MAP2_TEXTURE_COORD_1);
+ TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord2, enable->Map2TextureCoord2,
+ GL_MAP2_TEXTURE_COORD_2);
+ TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord3, enable->Map2TextureCoord3,
+ GL_MAP2_TEXTURE_COORD_3);
+ TEST_AND_UPDATE(ctx->Eval.Map2TextureCoord4, enable->Map2TextureCoord4,
+ GL_MAP2_TEXTURE_COORD_4);
+ TEST_AND_UPDATE(ctx->Eval.Map2Vertex3, enable->Map2Vertex3,
+ GL_MAP2_VERTEX_3);
+ TEST_AND_UPDATE(ctx->Eval.Map2Vertex4, enable->Map2Vertex4,
+ GL_MAP2_VERTEX_4);
+ for (i = 0; i < 16; i++) {
+ TEST_AND_UPDATE(ctx->Eval.Map2Attrib[i], enable->Map2Attrib[i],
+ GL_MAP2_VERTEX_ATTRIB0_4_NV + i);
+ }
+
+ TEST_AND_UPDATE(ctx->Eval.AutoNormal, enable->AutoNormal, GL_AUTO_NORMAL);
+ TEST_AND_UPDATE(ctx->Transform.Normalize, enable->Normalize, GL_NORMALIZE);
+ TEST_AND_UPDATE(ctx->Transform.RescaleNormals, enable->RescaleNormals,
+ GL_RESCALE_NORMAL_EXT);
+ TEST_AND_UPDATE(ctx->Transform.RasterPositionUnclipped,
+ enable->RasterPositionUnclipped,
+ GL_RASTER_POSITION_UNCLIPPED_IBM);
+ TEST_AND_UPDATE(ctx->Point.SmoothFlag, enable->PointSmooth,
+ GL_POINT_SMOOTH);
+ if (ctx->Extensions.NV_point_sprite || ctx->Extensions.ARB_point_sprite) {
+ TEST_AND_UPDATE(ctx->Point.PointSprite, enable->PointSprite,
+ GL_POINT_SPRITE_NV);
+ }
+ TEST_AND_UPDATE(ctx->Polygon.OffsetPoint, enable->PolygonOffsetPoint,
+ GL_POLYGON_OFFSET_POINT);
+ TEST_AND_UPDATE(ctx->Polygon.OffsetLine, enable->PolygonOffsetLine,
+ GL_POLYGON_OFFSET_LINE);
+ TEST_AND_UPDATE(ctx->Polygon.OffsetFill, enable->PolygonOffsetFill,
+ GL_POLYGON_OFFSET_FILL);
+ TEST_AND_UPDATE(ctx->Polygon.SmoothFlag, enable->PolygonSmooth,
+ GL_POLYGON_SMOOTH);
+ TEST_AND_UPDATE(ctx->Polygon.StippleFlag, enable->PolygonStipple,
+ GL_POLYGON_STIPPLE);
+ TEST_AND_UPDATE(ctx->Scissor.Enabled, enable->Scissor, GL_SCISSOR_TEST);
+ TEST_AND_UPDATE(ctx->Stencil.Enabled, enable->Stencil, GL_STENCIL_TEST);
+ if (ctx->Extensions.EXT_stencil_two_side) {
+ TEST_AND_UPDATE(ctx->Stencil.TestTwoSide, enable->StencilTwoSide, GL_STENCIL_TEST_TWO_SIDE_EXT);
+ }
+ TEST_AND_UPDATE(ctx->Multisample.Enabled, enable->MultisampleEnabled,
+ GL_MULTISAMPLE_ARB);
+ TEST_AND_UPDATE(ctx->Multisample.SampleAlphaToCoverage,
+ enable->SampleAlphaToCoverage,
+ GL_SAMPLE_ALPHA_TO_COVERAGE_ARB);
+ TEST_AND_UPDATE(ctx->Multisample.SampleAlphaToOne,
+ enable->SampleAlphaToOne,
+ GL_SAMPLE_ALPHA_TO_ONE_ARB);
+ TEST_AND_UPDATE(ctx->Multisample.SampleCoverage,
+ enable->SampleCoverage,
+ GL_SAMPLE_COVERAGE_ARB);
+ TEST_AND_UPDATE(ctx->Multisample.SampleCoverageInvert,
+ enable->SampleCoverageInvert,
+ GL_SAMPLE_COVERAGE_INVERT_ARB);
+ /* GL_ARB_vertex_program, GL_NV_vertex_program */
+ TEST_AND_UPDATE(ctx->VertexProgram.Enabled,
+ enable->VertexProgram,
+ GL_VERTEX_PROGRAM_ARB);
+ TEST_AND_UPDATE(ctx->VertexProgram.PointSizeEnabled,
+ enable->VertexProgramPointSize,
+ GL_VERTEX_PROGRAM_POINT_SIZE_ARB);
+ TEST_AND_UPDATE(ctx->VertexProgram.TwoSideEnabled,
+ enable->VertexProgramTwoSide,
+ GL_VERTEX_PROGRAM_TWO_SIDE_ARB);
+
+#undef TEST_AND_UPDATE
+
+ /* texture unit enables */
+ for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
+ const GLbitfield enabled = enable->Texture[i];
+ const GLbitfield genEnabled = enable->TexGen[i];
+
+ if (ctx->Texture.Unit[i].Enabled != enabled) {
+ _mesa_ActiveTextureARB(GL_TEXTURE0 + i);
+
+ _mesa_set_enable(ctx, GL_TEXTURE_1D,
+ (enabled & TEXTURE_1D_BIT) ? GL_TRUE : GL_FALSE);
+ _mesa_set_enable(ctx, GL_TEXTURE_2D,
+ (enabled & TEXTURE_2D_BIT) ? GL_TRUE : GL_FALSE);
+ _mesa_set_enable(ctx, GL_TEXTURE_3D,
+ (enabled & TEXTURE_3D_BIT) ? GL_TRUE : GL_FALSE);
+ if (ctx->Extensions.NV_texture_rectangle) {
+ _mesa_set_enable(ctx, GL_TEXTURE_RECTANGLE_ARB,
+ (enabled & TEXTURE_RECT_BIT) ? GL_TRUE : GL_FALSE);
+ }
+ if (ctx->Extensions.ARB_texture_cube_map) {
+ _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP,
+ (enabled & TEXTURE_CUBE_BIT) ? GL_TRUE : GL_FALSE);
+ }
+ if (ctx->Extensions.MESA_texture_array) {
+ _mesa_set_enable(ctx, GL_TEXTURE_1D_ARRAY_EXT,
+ (enabled & TEXTURE_1D_ARRAY_BIT) ? GL_TRUE : GL_FALSE);
+ _mesa_set_enable(ctx, GL_TEXTURE_2D_ARRAY_EXT,
+ (enabled & TEXTURE_2D_ARRAY_BIT) ? GL_TRUE : GL_FALSE);
+ }
+ }
+
+ if (ctx->Texture.Unit[i].TexGenEnabled != genEnabled) {
+ _mesa_ActiveTextureARB(GL_TEXTURE0 + i);
+ _mesa_set_enable(ctx, GL_TEXTURE_GEN_S,
+ (genEnabled & S_BIT) ? GL_TRUE : GL_FALSE);
+ _mesa_set_enable(ctx, GL_TEXTURE_GEN_T,
+ (genEnabled & T_BIT) ? GL_TRUE : GL_FALSE);
+ _mesa_set_enable(ctx, GL_TEXTURE_GEN_R,
+ (genEnabled & R_BIT) ? GL_TRUE : GL_FALSE);
+ _mesa_set_enable(ctx, GL_TEXTURE_GEN_Q,
+ (genEnabled & Q_BIT) ? GL_TRUE : GL_FALSE);
+ }
+ }
+
+ _mesa_ActiveTextureARB(GL_TEXTURE0 + curTexUnitSave);
+}
+
+
+/**
+ * Pop/restore texture attribute/group state.
+ */
+static void
+pop_texture_group(struct gl_context *ctx, struct texture_state *texstate)
+{
+ GLuint u;
+
+ _mesa_lock_context_textures(ctx);
+
+ for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
+ const struct gl_texture_unit *unit = &texstate->Texture.Unit[u];
+ GLuint tgt;
+
+ _mesa_ActiveTextureARB(GL_TEXTURE0_ARB + u);
+ _mesa_set_enable(ctx, GL_TEXTURE_1D,
+ (unit->Enabled & TEXTURE_1D_BIT) ? GL_TRUE : GL_FALSE);
+ _mesa_set_enable(ctx, GL_TEXTURE_2D,
+ (unit->Enabled & TEXTURE_2D_BIT) ? GL_TRUE : GL_FALSE);
+ _mesa_set_enable(ctx, GL_TEXTURE_3D,
+ (unit->Enabled & TEXTURE_3D_BIT) ? GL_TRUE : GL_FALSE);
+ if (ctx->Extensions.ARB_texture_cube_map) {
+ _mesa_set_enable(ctx, GL_TEXTURE_CUBE_MAP_ARB,
+ (unit->Enabled & TEXTURE_CUBE_BIT) ? GL_TRUE : GL_FALSE);
+ }
+ if (ctx->Extensions.NV_texture_rectangle) {
+ _mesa_set_enable(ctx, GL_TEXTURE_RECTANGLE_NV,
+ (unit->Enabled & TEXTURE_RECT_BIT) ? GL_TRUE : GL_FALSE);
+ }
+ if (ctx->Extensions.MESA_texture_array) {
+ _mesa_set_enable(ctx, GL_TEXTURE_1D_ARRAY_EXT,
+ (unit->Enabled & TEXTURE_1D_ARRAY_BIT) ? GL_TRUE : GL_FALSE);
+ _mesa_set_enable(ctx, GL_TEXTURE_2D_ARRAY_EXT,
+ (unit->Enabled & TEXTURE_2D_ARRAY_BIT) ? GL_TRUE : GL_FALSE);
+ }
+
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, unit->EnvMode);
+ _mesa_TexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, unit->EnvColor);
+ _mesa_TexGeni(GL_S, GL_TEXTURE_GEN_MODE, unit->GenS.Mode);
+ _mesa_TexGeni(GL_T, GL_TEXTURE_GEN_MODE, unit->GenT.Mode);
+ _mesa_TexGeni(GL_R, GL_TEXTURE_GEN_MODE, unit->GenR.Mode);
+ _mesa_TexGeni(GL_Q, GL_TEXTURE_GEN_MODE, unit->GenQ.Mode);
+ _mesa_TexGenfv(GL_S, GL_OBJECT_PLANE, unit->GenS.ObjectPlane);
+ _mesa_TexGenfv(GL_T, GL_OBJECT_PLANE, unit->GenT.ObjectPlane);
+ _mesa_TexGenfv(GL_R, GL_OBJECT_PLANE, unit->GenR.ObjectPlane);
+ _mesa_TexGenfv(GL_Q, GL_OBJECT_PLANE, unit->GenQ.ObjectPlane);
+ /* Eye plane done differently to avoid re-transformation */
+ {
+ struct gl_texture_unit *destUnit = &ctx->Texture.Unit[u];
+ COPY_4FV(destUnit->GenS.EyePlane, unit->GenS.EyePlane);
+ COPY_4FV(destUnit->GenT.EyePlane, unit->GenT.EyePlane);
+ COPY_4FV(destUnit->GenR.EyePlane, unit->GenR.EyePlane);
+ COPY_4FV(destUnit->GenQ.EyePlane, unit->GenQ.EyePlane);
+ if (ctx->Driver.TexGen) {
+ ctx->Driver.TexGen(ctx, GL_S, GL_EYE_PLANE, unit->GenS.EyePlane);
+ ctx->Driver.TexGen(ctx, GL_T, GL_EYE_PLANE, unit->GenT.EyePlane);
+ ctx->Driver.TexGen(ctx, GL_R, GL_EYE_PLANE, unit->GenR.EyePlane);
+ ctx->Driver.TexGen(ctx, GL_Q, GL_EYE_PLANE, unit->GenQ.EyePlane);
+ }
+ }
+ _mesa_set_enable(ctx, GL_TEXTURE_GEN_S,
+ ((unit->TexGenEnabled & S_BIT) ? GL_TRUE : GL_FALSE));
+ _mesa_set_enable(ctx, GL_TEXTURE_GEN_T,
+ ((unit->TexGenEnabled & T_BIT) ? GL_TRUE : GL_FALSE));
+ _mesa_set_enable(ctx, GL_TEXTURE_GEN_R,
+ ((unit->TexGenEnabled & R_BIT) ? GL_TRUE : GL_FALSE));
+ _mesa_set_enable(ctx, GL_TEXTURE_GEN_Q,
+ ((unit->TexGenEnabled & Q_BIT) ? GL_TRUE : GL_FALSE));
+ if (ctx->Extensions.EXT_texture_lod_bias) {
+ _mesa_TexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT,
+ GL_TEXTURE_LOD_BIAS_EXT, unit->LodBias);
+ }
+ if (ctx->Extensions.EXT_texture_env_combine ||
+ ctx->Extensions.ARB_texture_env_combine) {
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB,
+ unit->Combine.ModeRGB);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA,
+ unit->Combine.ModeA);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB,
+ unit->Combine.SourceRGB[0]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB,
+ unit->Combine.SourceRGB[1]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_RGB,
+ unit->Combine.SourceRGB[2]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA,
+ unit->Combine.SourceA[0]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA,
+ unit->Combine.SourceA[1]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_SOURCE2_ALPHA,
+ unit->Combine.SourceA[2]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB,
+ unit->Combine.OperandRGB[0]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_RGB,
+ unit->Combine.OperandRGB[1]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_RGB,
+ unit->Combine.OperandRGB[2]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_ALPHA,
+ unit->Combine.OperandA[0]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND1_ALPHA,
+ unit->Combine.OperandA[1]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_OPERAND2_ALPHA,
+ unit->Combine.OperandA[2]);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE,
+ 1 << unit->Combine.ScaleShiftRGB);
+ _mesa_TexEnvi(GL_TEXTURE_ENV, GL_ALPHA_SCALE,
+ 1 << unit->Combine.ScaleShiftA);
+ }
+
+ /* Restore texture object state for each target */
+ for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
+ const struct gl_texture_object *obj = NULL;
+ GLenum target;
+
+ obj = &texstate->SavedObj[u][tgt];
+
+ /* don't restore state for unsupported targets to prevent
+ * raising GL errors.
+ */
+ if (obj->Target == GL_TEXTURE_CUBE_MAP_ARB &&
+ !ctx->Extensions.ARB_texture_cube_map) {
+ continue;
+ }
+ else if (obj->Target == GL_TEXTURE_RECTANGLE_NV &&
+ !ctx->Extensions.NV_texture_rectangle) {
+ continue;
+ }
+ else if ((obj->Target == GL_TEXTURE_1D_ARRAY_EXT ||
+ obj->Target == GL_TEXTURE_2D_ARRAY_EXT) &&
+ !ctx->Extensions.MESA_texture_array) {
+ continue;
+ }
+ else if (obj->Target == GL_TEXTURE_BUFFER)
+ continue;
+
+ target = obj->Target;
+
+ _mesa_BindTexture(target, obj->Name);
+
+ _mesa_TexParameterfv(target, GL_TEXTURE_BORDER_COLOR, obj->BorderColor.f);
+ _mesa_TexParameterf(target, GL_TEXTURE_PRIORITY, obj->Priority);
+ _mesa_TexParameteri(target, GL_TEXTURE_WRAP_S, obj->WrapS);
+ _mesa_TexParameteri(target, GL_TEXTURE_WRAP_T, obj->WrapT);
+ _mesa_TexParameteri(target, GL_TEXTURE_WRAP_R, obj->WrapR);
+ _mesa_TexParameteri(target, GL_TEXTURE_MIN_FILTER, obj->MinFilter);
+ _mesa_TexParameteri(target, GL_TEXTURE_MAG_FILTER, obj->MagFilter);
+ _mesa_TexParameterf(target, GL_TEXTURE_MIN_LOD, obj->MinLod);
+ _mesa_TexParameterf(target, GL_TEXTURE_MAX_LOD, obj->MaxLod);
+ _mesa_TexParameterf(target, GL_TEXTURE_LOD_BIAS, obj->LodBias);
+ _mesa_TexParameteri(target, GL_TEXTURE_BASE_LEVEL, obj->BaseLevel);
+ if (target != GL_TEXTURE_RECTANGLE_ARB)
+ _mesa_TexParameteri(target, GL_TEXTURE_MAX_LEVEL, obj->MaxLevel);
+ if (ctx->Extensions.EXT_texture_filter_anisotropic) {
+ _mesa_TexParameterf(target, GL_TEXTURE_MAX_ANISOTROPY_EXT,
+ obj->MaxAnisotropy);
+ }
+ if (ctx->Extensions.ARB_shadow_ambient) {
+ _mesa_TexParameterf(target, GL_TEXTURE_COMPARE_FAIL_VALUE_ARB,
+ obj->CompareFailValue);
+ }
+ }
+
+ /* remove saved references to the texture objects */
+ for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
+ _mesa_reference_texobj(&texstate->SavedTexRef[u][tgt], NULL);
+ }
+ }
+
+ _mesa_ActiveTextureARB(GL_TEXTURE0_ARB + texstate->Texture.CurrentUnit);
+
+ _mesa_unlock_context_textures(ctx);
+}
+
+
+/*
+ * This function is kind of long just because we have to call a lot
+ * of device driver functions to update device driver state.
+ *
+ * XXX As it is now, most of the pop-code calls immediate-mode Mesa functions
+ * in order to restore GL state. This isn't terribly efficient but it
+ * ensures that dirty flags and any derived state gets updated correctly.
+ * We could at least check if the value to restore equals the current value
+ * and then skip the Mesa call.
+ */
+void GLAPIENTRY
+_mesa_PopAttrib(void)
+{
+ struct gl_attrib_node *attr, *next;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ if (ctx->AttribStackDepth == 0) {
+ _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopAttrib" );
+ return;
+ }
+
+ ctx->AttribStackDepth--;
+ attr = ctx->AttribStack[ctx->AttribStackDepth];
+
+ while (attr) {
+
+ if (MESA_VERBOSE & VERBOSE_API) {
+ _mesa_debug(ctx, "glPopAttrib %s\n",
+ _mesa_lookup_enum_by_nr(attr->kind));
+ }
+
+ switch (attr->kind) {
+ case GL_ACCUM_BUFFER_BIT:
+ {
+ const struct gl_accum_attrib *accum;
+ accum = (const struct gl_accum_attrib *) attr->data;
+ _mesa_ClearAccum(accum->ClearColor[0],
+ accum->ClearColor[1],
+ accum->ClearColor[2],
+ accum->ClearColor[3]);
+ }
+ break;
+ case GL_COLOR_BUFFER_BIT:
+ {
+ const struct gl_colorbuffer_attrib *color;
+
+ color = (const struct gl_colorbuffer_attrib *) attr->data;
+ _mesa_ClearIndex((GLfloat) color->ClearIndex);
+ _mesa_ClearColor(color->ClearColorUnclamped[0],
+ color->ClearColorUnclamped[1],
+ color->ClearColorUnclamped[2],
+ color->ClearColorUnclamped[3]);
+ _mesa_IndexMask(color->IndexMask);
+ if (!ctx->Extensions.EXT_draw_buffers2) {
+ _mesa_ColorMask((GLboolean) (color->ColorMask[0][0] != 0),
+ (GLboolean) (color->ColorMask[0][1] != 0),
+ (GLboolean) (color->ColorMask[0][2] != 0),
+ (GLboolean) (color->ColorMask[0][3] != 0));
+ }
+ else {
+ GLuint i;
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ _mesa_ColorMaskIndexed(i,
+ (GLboolean) (color->ColorMask[i][0] != 0),
+ (GLboolean) (color->ColorMask[i][1] != 0),
+ (GLboolean) (color->ColorMask[i][2] != 0),
+ (GLboolean) (color->ColorMask[i][3] != 0));
+ }
+ }
+ {
+ /* Need to determine if more than one color output is
+ * specified. If so, call glDrawBuffersARB, else call
+ * glDrawBuffer(). This is a subtle, but essential point
+ * since GL_FRONT (for example) is illegal for the former
+ * function, but legal for the later.
+ */
+ GLboolean multipleBuffers = GL_FALSE;
+ GLuint i;
+
+ for (i = 1; i < ctx->Const.MaxDrawBuffers; i++) {
+ if (color->DrawBuffer[i] != GL_NONE) {
+ multipleBuffers = GL_TRUE;
+ break;
+ }
+ }
+ /* Call the API_level functions, not _mesa_drawbuffers()
+ * since we need to do error checking on the pop'd
+ * GL_DRAW_BUFFER.
+ * Ex: if GL_FRONT were pushed, but we're popping with a
+ * user FBO bound, GL_FRONT will be illegal and we'll need
+ * to record that error. Per OpenGL ARB decision.
+ */
+ if (multipleBuffers)
+ _mesa_DrawBuffersARB(ctx->Const.MaxDrawBuffers,
+ color->DrawBuffer);
+ else
+ _mesa_DrawBuffer(color->DrawBuffer[0]);
+ }
+ _mesa_set_enable(ctx, GL_ALPHA_TEST, color->AlphaEnabled);
+ _mesa_AlphaFunc(color->AlphaFunc, color->AlphaRefUnclamped);
+ if (ctx->Color.BlendEnabled != color->BlendEnabled) {
+ if (ctx->Extensions.EXT_draw_buffers2) {
+ GLuint i;
+ for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) {
+ _mesa_set_enablei(ctx, GL_BLEND, i,
+ (color->BlendEnabled >> i) & 1);
+ }
+ }
+ else {
+ _mesa_set_enable(ctx, GL_BLEND, (color->BlendEnabled & 1));
+ }
+ }
+ if (ctx->Color._BlendFuncPerBuffer ||
+ ctx->Color._BlendEquationPerBuffer) {
+ /* set blend per buffer */
+ GLuint buf;
+ for (buf = 0; buf < ctx->Const.MaxDrawBuffers; buf++) {
+ _mesa_BlendFuncSeparatei(buf, color->Blend[buf].SrcRGB,
+ color->Blend[buf].DstRGB,
+ color->Blend[buf].SrcA,
+ color->Blend[buf].DstA);
+ _mesa_BlendEquationSeparatei(buf,
+ color->Blend[buf].EquationRGB,
+ color->Blend[buf].EquationA);
+ }
+ }
+ else {
+ /* set same blend modes for all buffers */
+ _mesa_BlendFuncSeparateEXT(color->Blend[0].SrcRGB,
+ color->Blend[0].DstRGB,
+ color->Blend[0].SrcA,
+ color->Blend[0].DstA);
+ /* This special case is because glBlendEquationSeparateEXT
+ * cannot take GL_LOGIC_OP as a parameter.
+ */
+ if (color->Blend[0].EquationRGB ==
+ color->Blend[0].EquationA) {
+ _mesa_BlendEquation(color->Blend[0].EquationRGB);
+ }
+ else {
+ _mesa_BlendEquationSeparateEXT(
+ color->Blend[0].EquationRGB,
+ color->Blend[0].EquationA);
+ }
+ }
+ _mesa_BlendColor(color->BlendColorUnclamped[0],
+ color->BlendColorUnclamped[1],
+ color->BlendColorUnclamped[2],
+ color->BlendColorUnclamped[3]);
+ _mesa_LogicOp(color->LogicOp);
+ _mesa_set_enable(ctx, GL_COLOR_LOGIC_OP,
+ color->ColorLogicOpEnabled);
+ _mesa_set_enable(ctx, GL_INDEX_LOGIC_OP,
+ color->IndexLogicOpEnabled);
+ _mesa_set_enable(ctx, GL_DITHER, color->DitherFlag);
+ _mesa_ClampColorARB(GL_CLAMP_FRAGMENT_COLOR_ARB, color->ClampFragmentColor);
+ _mesa_ClampColorARB(GL_CLAMP_READ_COLOR_ARB, color->ClampReadColor);
+ }
+ break;
+ case GL_CURRENT_BIT:
+ FLUSH_CURRENT( ctx, 0 );
+ memcpy( &ctx->Current, attr->data,
+ sizeof(struct gl_current_attrib) );
+ break;
+ case GL_DEPTH_BUFFER_BIT:
+ {
+ const struct gl_depthbuffer_attrib *depth;
+ depth = (const struct gl_depthbuffer_attrib *) attr->data;
+ _mesa_DepthFunc(depth->Func);
+ _mesa_ClearDepth(depth->Clear);
+ _mesa_set_enable(ctx, GL_DEPTH_TEST, depth->Test);
+ _mesa_DepthMask(depth->Mask);
+ }
+ break;
+ case GL_ENABLE_BIT:
+ {
+ const struct gl_enable_attrib *enable;
+ enable = (const struct gl_enable_attrib *) attr->data;
+ pop_enable_group(ctx, enable);
+ ctx->NewState |= _NEW_ALL;
+ }
+ break;
+ case GL_EVAL_BIT:
+ memcpy( &ctx->Eval, attr->data, sizeof(struct gl_eval_attrib) );
+ ctx->NewState |= _NEW_EVAL;
+ break;
+ case GL_FOG_BIT:
+ {
+ const struct gl_fog_attrib *fog;
+ fog = (const struct gl_fog_attrib *) attr->data;
+ _mesa_set_enable(ctx, GL_FOG, fog->Enabled);
+ _mesa_Fogfv(GL_FOG_COLOR, fog->Color);
+ _mesa_Fogf(GL_FOG_DENSITY, fog->Density);
+ _mesa_Fogf(GL_FOG_START, fog->Start);
+ _mesa_Fogf(GL_FOG_END, fog->End);
+ _mesa_Fogf(GL_FOG_INDEX, fog->Index);
+ _mesa_Fogi(GL_FOG_MODE, fog->Mode);
+ }
+ break;
+ case GL_HINT_BIT:
+ {
+ const struct gl_hint_attrib *hint;
+ hint = (const struct gl_hint_attrib *) attr->data;
+ _mesa_Hint(GL_PERSPECTIVE_CORRECTION_HINT,
+ hint->PerspectiveCorrection );
+ _mesa_Hint(GL_POINT_SMOOTH_HINT, hint->PointSmooth);
+ _mesa_Hint(GL_LINE_SMOOTH_HINT, hint->LineSmooth);
+ _mesa_Hint(GL_POLYGON_SMOOTH_HINT, hint->PolygonSmooth);
+ _mesa_Hint(GL_FOG_HINT, hint->Fog);
+ _mesa_Hint(GL_CLIP_VOLUME_CLIPPING_HINT_EXT,
+ hint->ClipVolumeClipping);
+ _mesa_Hint(GL_TEXTURE_COMPRESSION_HINT_ARB,
+ hint->TextureCompression);
+ }
+ break;
+ case GL_LIGHTING_BIT:
+ {
+ GLuint i;
+ const struct gl_light_attrib *light;
+ light = (const struct gl_light_attrib *) attr->data;
+ /* lighting enable */
+ _mesa_set_enable(ctx, GL_LIGHTING, light->Enabled);
+ /* per-light state */
+ if (_math_matrix_is_dirty(ctx->ModelviewMatrixStack.Top))
+ _math_matrix_analyse( ctx->ModelviewMatrixStack.Top );
+
+ for (i = 0; i < ctx->Const.MaxLights; i++) {
+ const struct gl_light *l = &light->Light[i];
+ _mesa_set_enable(ctx, GL_LIGHT0 + i, l->Enabled);
+ _mesa_light(ctx, i, GL_AMBIENT, l->Ambient);
+ _mesa_light(ctx, i, GL_DIFFUSE, l->Diffuse);
+ _mesa_light(ctx, i, GL_SPECULAR, l->Specular );
+ _mesa_light(ctx, i, GL_POSITION, l->EyePosition);
+ _mesa_light(ctx, i, GL_SPOT_DIRECTION, l->SpotDirection);
+ {
+ GLfloat p[4] = { 0 };
+ p[0] = l->SpotExponent;
+ _mesa_light(ctx, i, GL_SPOT_EXPONENT, p);
+ }
+ {
+ GLfloat p[4] = { 0 };
+ p[0] = l->SpotCutoff;
+ _mesa_light(ctx, i, GL_SPOT_CUTOFF, p);
+ }
+ {
+ GLfloat p[4] = { 0 };
+ p[0] = l->ConstantAttenuation;
+ _mesa_light(ctx, i, GL_CONSTANT_ATTENUATION, p);
+ }
+ {
+ GLfloat p[4] = { 0 };
+ p[0] = l->LinearAttenuation;
+ _mesa_light(ctx, i, GL_LINEAR_ATTENUATION, p);
+ }
+ {
+ GLfloat p[4] = { 0 };
+ p[0] = l->QuadraticAttenuation;
+ _mesa_light(ctx, i, GL_QUADRATIC_ATTENUATION, p);
+ }
+ }
+ /* light model */
+ _mesa_LightModelfv(GL_LIGHT_MODEL_AMBIENT,
+ light->Model.Ambient);
+ _mesa_LightModelf(GL_LIGHT_MODEL_LOCAL_VIEWER,
+ (GLfloat) light->Model.LocalViewer);
+ _mesa_LightModelf(GL_LIGHT_MODEL_TWO_SIDE,
+ (GLfloat) light->Model.TwoSide);
+ _mesa_LightModelf(GL_LIGHT_MODEL_COLOR_CONTROL,
+ (GLfloat) light->Model.ColorControl);
+ /* shade model */
+ _mesa_ShadeModel(light->ShadeModel);
+ /* color material */
+ _mesa_ColorMaterial(light->ColorMaterialFace,
+ light->ColorMaterialMode);
+ _mesa_set_enable(ctx, GL_COLOR_MATERIAL,
+ light->ColorMaterialEnabled);
+ /* materials */
+ memcpy(&ctx->Light.Material, &light->Material,
+ sizeof(struct gl_material));
+ _mesa_ClampColorARB(GL_CLAMP_VERTEX_COLOR_ARB, light->ClampVertexColor);
+ }
+ break;
+ case GL_LINE_BIT:
+ {
+ const struct gl_line_attrib *line;
+ line = (const struct gl_line_attrib *) attr->data;
+ _mesa_set_enable(ctx, GL_LINE_SMOOTH, line->SmoothFlag);
+ _mesa_set_enable(ctx, GL_LINE_STIPPLE, line->StippleFlag);
+ _mesa_LineStipple(line->StippleFactor, line->StipplePattern);
+ _mesa_LineWidth(line->Width);
+ }
+ break;
+ case GL_LIST_BIT:
+ memcpy( &ctx->List, attr->data, sizeof(struct gl_list_attrib) );
+ break;
+ case GL_PIXEL_MODE_BIT:
+ memcpy( &ctx->Pixel, attr->data, sizeof(struct gl_pixel_attrib) );
+ /* XXX what other pixel state needs to be set by function calls? */
+ _mesa_ReadBuffer(ctx->Pixel.ReadBuffer);
+ ctx->NewState |= _NEW_PIXEL;
+ break;
+ case GL_POINT_BIT:
+ {
+ const struct gl_point_attrib *point;
+ point = (const struct gl_point_attrib *) attr->data;
+ _mesa_PointSize(point->Size);
+ _mesa_set_enable(ctx, GL_POINT_SMOOTH, point->SmoothFlag);
+ if (ctx->Extensions.EXT_point_parameters) {
+ _mesa_PointParameterfv(GL_DISTANCE_ATTENUATION_EXT,
+ point->Params);
+ _mesa_PointParameterf(GL_POINT_SIZE_MIN_EXT,
+ point->MinSize);
+ _mesa_PointParameterf(GL_POINT_SIZE_MAX_EXT,
+ point->MaxSize);
+ _mesa_PointParameterf(GL_POINT_FADE_THRESHOLD_SIZE_EXT,
+ point->Threshold);
+ }
+ if (ctx->Extensions.NV_point_sprite
+ || ctx->Extensions.ARB_point_sprite) {
+ GLuint u;
+ for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
+ _mesa_TexEnvi(GL_POINT_SPRITE_NV, GL_COORD_REPLACE_NV,
+ (GLint) point->CoordReplace[u]);
+ }
+ _mesa_set_enable(ctx, GL_POINT_SPRITE_NV,point->PointSprite);
+ if (ctx->Extensions.NV_point_sprite)
+ _mesa_PointParameteri(GL_POINT_SPRITE_R_MODE_NV,
+ ctx->Point.SpriteRMode);
+ _mesa_PointParameterf(GL_POINT_SPRITE_COORD_ORIGIN,
+ (GLfloat)ctx->Point.SpriteOrigin);
+ }
+ }
+ break;
+ case GL_POLYGON_BIT:
+ {
+ const struct gl_polygon_attrib *polygon;
+ polygon = (const struct gl_polygon_attrib *) attr->data;
+ _mesa_CullFace(polygon->CullFaceMode);
+ _mesa_FrontFace(polygon->FrontFace);
+ _mesa_PolygonMode(GL_FRONT, polygon->FrontMode);
+ _mesa_PolygonMode(GL_BACK, polygon->BackMode);
+ _mesa_PolygonOffset(polygon->OffsetFactor,
+ polygon->OffsetUnits);
+ _mesa_set_enable(ctx, GL_POLYGON_SMOOTH, polygon->SmoothFlag);
+ _mesa_set_enable(ctx, GL_POLYGON_STIPPLE, polygon->StippleFlag);
+ _mesa_set_enable(ctx, GL_CULL_FACE, polygon->CullFlag);
+ _mesa_set_enable(ctx, GL_POLYGON_OFFSET_POINT,
+ polygon->OffsetPoint);
+ _mesa_set_enable(ctx, GL_POLYGON_OFFSET_LINE,
+ polygon->OffsetLine);
+ _mesa_set_enable(ctx, GL_POLYGON_OFFSET_FILL,
+ polygon->OffsetFill);
+ }
+ break;
+ case GL_POLYGON_STIPPLE_BIT:
+ memcpy( ctx->PolygonStipple, attr->data, 32*sizeof(GLuint) );
+ ctx->NewState |= _NEW_POLYGONSTIPPLE;
+ if (ctx->Driver.PolygonStipple)
+ ctx->Driver.PolygonStipple( ctx, (const GLubyte *) attr->data );
+ break;
+ case GL_SCISSOR_BIT:
+ {
+ const struct gl_scissor_attrib *scissor;
+ scissor = (const struct gl_scissor_attrib *) attr->data;
+ _mesa_Scissor(scissor->X, scissor->Y,
+ scissor->Width, scissor->Height);
+ _mesa_set_enable(ctx, GL_SCISSOR_TEST, scissor->Enabled);
+ }
+ break;
+ case GL_STENCIL_BUFFER_BIT:
+ {
+ const struct gl_stencil_attrib *stencil;
+ stencil = (const struct gl_stencil_attrib *) attr->data;
+ _mesa_set_enable(ctx, GL_STENCIL_TEST, stencil->Enabled);
+ _mesa_ClearStencil(stencil->Clear);
+ if (ctx->Extensions.EXT_stencil_two_side) {
+ _mesa_set_enable(ctx, GL_STENCIL_TEST_TWO_SIDE_EXT,
+ stencil->TestTwoSide);
+ _mesa_ActiveStencilFaceEXT(stencil->ActiveFace
+ ? GL_BACK : GL_FRONT);
+ }
+ /* front state */
+ _mesa_StencilFuncSeparate(GL_FRONT,
+ stencil->Function[0],
+ stencil->Ref[0],
+ stencil->ValueMask[0]);
+ _mesa_StencilMaskSeparate(GL_FRONT, stencil->WriteMask[0]);
+ _mesa_StencilOpSeparate(GL_FRONT, stencil->FailFunc[0],
+ stencil->ZFailFunc[0],
+ stencil->ZPassFunc[0]);
+ /* back state */
+ _mesa_StencilFuncSeparate(GL_BACK,
+ stencil->Function[1],
+ stencil->Ref[1],
+ stencil->ValueMask[1]);
+ _mesa_StencilMaskSeparate(GL_BACK, stencil->WriteMask[1]);
+ _mesa_StencilOpSeparate(GL_BACK, stencil->FailFunc[1],
+ stencil->ZFailFunc[1],
+ stencil->ZPassFunc[1]);
+ }
+ break;
+ case GL_TRANSFORM_BIT:
+ {
+ GLuint i;
+ const struct gl_transform_attrib *xform;
+ xform = (const struct gl_transform_attrib *) attr->data;
+ _mesa_MatrixMode(xform->MatrixMode);
+ if (_math_matrix_is_dirty(ctx->ProjectionMatrixStack.Top))
+ _math_matrix_analyse( ctx->ProjectionMatrixStack.Top );
+
+ /* restore clip planes */
+ for (i = 0; i < MAX_CLIP_PLANES; i++) {
+ const GLuint mask = 1 << i;
+ const GLfloat *eyePlane = xform->EyeUserPlane[i];
+ COPY_4V(ctx->Transform.EyeUserPlane[i], eyePlane);
+ if (xform->ClipPlanesEnabled & mask) {
+ _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, GL_TRUE);
+ }
+ else {
+ _mesa_set_enable(ctx, GL_CLIP_PLANE0 + i, GL_FALSE);
+ }
+ if (ctx->Driver.ClipPlane)
+ ctx->Driver.ClipPlane( ctx, GL_CLIP_PLANE0 + i, eyePlane );
+ }
+
+ /* normalize/rescale */
+ if (xform->Normalize != ctx->Transform.Normalize)
+ _mesa_set_enable(ctx, GL_NORMALIZE,ctx->Transform.Normalize);
+ if (xform->RescaleNormals != ctx->Transform.RescaleNormals)
+ _mesa_set_enable(ctx, GL_RESCALE_NORMAL_EXT,
+ ctx->Transform.RescaleNormals);
+ if (xform->DepthClamp != ctx->Transform.DepthClamp)
+ _mesa_set_enable(ctx, GL_DEPTH_CLAMP,
+ ctx->Transform.DepthClamp);
+ }
+ break;
+ case GL_TEXTURE_BIT:
+ /* Take care of texture object reference counters */
+ {
+ struct texture_state *texstate
+ = (struct texture_state *) attr->data;
+ pop_texture_group(ctx, texstate);
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ break;
+ case GL_VIEWPORT_BIT:
+ {
+ const struct gl_viewport_attrib *vp;
+ vp = (const struct gl_viewport_attrib *) attr->data;
+ _mesa_Viewport(vp->X, vp->Y, vp->Width, vp->Height);
+ _mesa_DepthRange(vp->Near, vp->Far);
+ }
+ break;
+ case GL_MULTISAMPLE_BIT_ARB:
+ {
+ const struct gl_multisample_attrib *ms;
+ ms = (const struct gl_multisample_attrib *) attr->data;
+ _mesa_SampleCoverageARB(ms->SampleCoverageValue,
+ ms->SampleCoverageInvert);
+ }
+ break;
+
+ default:
+ _mesa_problem( ctx, "Bad attrib flag in PopAttrib");
+ break;
+ }
+
+ next = attr->next;
+ FREE( attr->data );
+ FREE( attr );
+ attr = next;
+ }
+}
+
+
+/**
+ * Helper for incrementing/decrementing vertex buffer object reference
+ * counts when pushing/popping the GL_CLIENT_VERTEX_ARRAY_BIT attribute group.
+ */
+static void
+adjust_buffer_object_ref_counts(struct gl_array_object *arrayObj, GLint step)
+{
+ GLuint i;
+
+ arrayObj->Vertex.BufferObj->RefCount += step;
+ arrayObj->Weight.BufferObj->RefCount += step;
+ arrayObj->Normal.BufferObj->RefCount += step;
+ arrayObj->Color.BufferObj->RefCount += step;
+ arrayObj->SecondaryColor.BufferObj->RefCount += step;
+ arrayObj->FogCoord.BufferObj->RefCount += step;
+ arrayObj->Index.BufferObj->RefCount += step;
+ arrayObj->EdgeFlag.BufferObj->RefCount += step;
+ for (i = 0; i < Elements(arrayObj->TexCoord); i++)
+ arrayObj->TexCoord[i].BufferObj->RefCount += step;
+ for (i = 0; i < Elements(arrayObj->VertexAttrib); i++)
+ arrayObj->VertexAttrib[i].BufferObj->RefCount += step;
+}
+
+
+/**
+ * Copy gl_pixelstore_attrib from src to dst, updating buffer
+ * object refcounts.
+ */
+static void
+copy_pixelstore(struct gl_context *ctx,
+ struct gl_pixelstore_attrib *dst,
+ const struct gl_pixelstore_attrib *src)
+{
+ dst->Alignment = src->Alignment;
+ dst->RowLength = src->RowLength;
+ dst->SkipPixels = src->SkipPixels;
+ dst->SkipRows = src->SkipRows;
+ dst->ImageHeight = src->ImageHeight;
+ dst->SkipImages = src->SkipImages;
+ dst->SwapBytes = src->SwapBytes;
+ dst->LsbFirst = src->LsbFirst;
+ dst->ClientStorage = src->ClientStorage;
+ dst->Invert = src->Invert;
+ _mesa_reference_buffer_object(ctx, &dst->BufferObj, src->BufferObj);
+}
+
+
+#define GL_CLIENT_PACK_BIT (1<<20)
+#define GL_CLIENT_UNPACK_BIT (1<<21)
+
+
+void GLAPIENTRY
+_mesa_PushClientAttrib(GLbitfield mask)
+{
+ struct gl_attrib_node *head;
+
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (ctx->ClientAttribStackDepth >= MAX_CLIENT_ATTRIB_STACK_DEPTH) {
+ _mesa_error( ctx, GL_STACK_OVERFLOW, "glPushClientAttrib" );
+ return;
+ }
+
+ /* Build linked list of attribute nodes which save all attribute
+ * groups specified by the mask.
+ */
+ head = NULL;
+
+ if (mask & GL_CLIENT_PIXEL_STORE_BIT) {
+ struct gl_pixelstore_attrib *attr;
+ /* packing attribs */
+ attr = CALLOC_STRUCT( gl_pixelstore_attrib );
+ copy_pixelstore(ctx, attr, &ctx->Pack);
+ save_attrib_data(&head, GL_CLIENT_PACK_BIT, attr);
+ /* unpacking attribs */
+ attr = CALLOC_STRUCT( gl_pixelstore_attrib );
+ copy_pixelstore(ctx, attr, &ctx->Unpack);
+ save_attrib_data(&head, GL_CLIENT_UNPACK_BIT, attr);
+ }
+
+ if (mask & GL_CLIENT_VERTEX_ARRAY_BIT) {
+ struct gl_array_attrib *attr;
+ struct gl_array_object *obj;
+
+ attr = MALLOC_STRUCT( gl_array_attrib );
+ obj = MALLOC_STRUCT( gl_array_object );
+
+#if FEATURE_ARB_vertex_buffer_object
+ /* increment ref counts since we're copying pointers to these objects */
+ ctx->Array.ArrayBufferObj->RefCount++;
+ ctx->Array.ElementArrayBufferObj->RefCount++;
+#endif
+
+ memcpy( attr, &ctx->Array, sizeof(struct gl_array_attrib) );
+ memcpy( obj, ctx->Array.ArrayObj, sizeof(struct gl_array_object) );
+
+ attr->ArrayObj = obj;
+
+ save_attrib_data(&head, GL_CLIENT_VERTEX_ARRAY_BIT, attr);
+
+ /* bump reference counts on buffer objects */
+ adjust_buffer_object_ref_counts(ctx->Array.ArrayObj, 1);
+ }
+
+ ctx->ClientAttribStack[ctx->ClientAttribStackDepth] = head;
+ ctx->ClientAttribStackDepth++;
+}
+
+
+
+
+void GLAPIENTRY
+_mesa_PopClientAttrib(void)
+{
+ struct gl_attrib_node *node, *next;
+
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ if (ctx->ClientAttribStackDepth == 0) {
+ _mesa_error( ctx, GL_STACK_UNDERFLOW, "glPopClientAttrib" );
+ return;
+ }
+
+ ctx->ClientAttribStackDepth--;
+ node = ctx->ClientAttribStack[ctx->ClientAttribStackDepth];
+
+ while (node) {
+ switch (node->kind) {
+ case GL_CLIENT_PACK_BIT:
+ {
+ struct gl_pixelstore_attrib *store =
+ (struct gl_pixelstore_attrib *) node->data;
+ copy_pixelstore(ctx, &ctx->Pack, store);
+ _mesa_reference_buffer_object(ctx, &store->BufferObj, NULL);
+ }
+ ctx->NewState |= _NEW_PACKUNPACK;
+ break;
+ case GL_CLIENT_UNPACK_BIT:
+ {
+ struct gl_pixelstore_attrib *store =
+ (struct gl_pixelstore_attrib *) node->data;
+ copy_pixelstore(ctx, &ctx->Unpack, store);
+ _mesa_reference_buffer_object(ctx, &store->BufferObj, NULL);
+ }
+ ctx->NewState |= _NEW_PACKUNPACK;
+ break;
+ case GL_CLIENT_VERTEX_ARRAY_BIT: {
+ struct gl_array_attrib * data =
+ (struct gl_array_attrib *) node->data;
+
+ adjust_buffer_object_ref_counts(ctx->Array.ArrayObj, -1);
+
+ ctx->Array.ActiveTexture = data->ActiveTexture;
+ if (data->LockCount != 0)
+ _mesa_LockArraysEXT(data->LockFirst, data->LockCount);
+ else if (ctx->Array.LockCount)
+ _mesa_UnlockArraysEXT();
+
+ _mesa_BindVertexArrayAPPLE( data->ArrayObj->Name );
+
+#if FEATURE_ARB_vertex_buffer_object
+ _mesa_BindBufferARB(GL_ARRAY_BUFFER_ARB,
+ data->ArrayBufferObj->Name);
+ _mesa_BindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB,
+ data->ElementArrayBufferObj->Name);
+#endif
+
+ memcpy( ctx->Array.ArrayObj, data->ArrayObj,
+ sizeof( struct gl_array_object ) );
+
+ FREE( data->ArrayObj );
+
+ /* FIXME: Should some bits in ctx->Array->NewState also be set
+ * FIXME: here? It seems like it should be set to inclusive-or
+ * FIXME: of the old ArrayObj->_Enabled and the new _Enabled.
+ */
+
+ ctx->NewState |= _NEW_ARRAY;
+ break;
+ }
+ default:
+ _mesa_problem( ctx, "Bad attrib flag in PopClientAttrib");
+ break;
+ }
+
+ next = node->next;
+ FREE( node->data );
+ FREE( node );
+ node = next;
+ }
+}
+
+
+void
+_mesa_init_attrib_dispatch(struct _glapi_table *disp)
+{
+ SET_PopAttrib(disp, _mesa_PopAttrib);
+ SET_PushAttrib(disp, _mesa_PushAttrib);
+ SET_PopClientAttrib(disp, _mesa_PopClientAttrib);
+ SET_PushClientAttrib(disp, _mesa_PushClientAttrib);
+}
+
+
+#endif /* FEATURE_attrib_stack */
+
+
+/**
+ * Free any attribute state data that might be attached to the context.
+ */
+void
+_mesa_free_attrib_data(struct gl_context *ctx)
+{
+ while (ctx->AttribStackDepth > 0) {
+ struct gl_attrib_node *attr, *next;
+
+ ctx->AttribStackDepth--;
+ attr = ctx->AttribStack[ctx->AttribStackDepth];
+
+ while (attr) {
+ if (attr->kind == GL_TEXTURE_BIT) {
+ struct texture_state *texstate = (struct texture_state*)attr->data;
+ GLuint u, tgt;
+ /* clear references to the saved texture objects */
+ for (u = 0; u < ctx->Const.MaxTextureUnits; u++) {
+ for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
+ _mesa_reference_texobj(&texstate->SavedTexRef[u][tgt], NULL);
+ }
+ }
+ }
+ else {
+ /* any other chunks of state that requires special handling? */
+ }
+
+ next = attr->next;
+ free(attr->data);
+ free(attr);
+ attr = next;
+ }
+ }
+}
+
+
+void _mesa_init_attrib( struct gl_context *ctx )
+{
+ /* Renderer and client attribute stacks */
+ ctx->AttribStackDepth = 0;
+ ctx->ClientAttribStackDepth = 0;
+}
diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c index f67c04f7a..c49437cf5 100644 --- a/mesalib/src/mesa/main/bufferobj.c +++ b/mesalib/src/mesa/main/bufferobj.c @@ -93,6 +93,11 @@ get_buffer_target(struct gl_context *ctx, GLenum target) }
break;
#endif
+ case GL_TEXTURE_BUFFER:
+ if (ctx->Extensions.ARB_texture_buffer_object) {
+ return &ctx->Texture.BufferObject;
+ }
+ break;
default:
return NULL;
}
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c index d5baf4a29..4f6712a10 100644 --- a/mesalib/src/mesa/main/context.c +++ b/mesalib/src/mesa/main/context.c @@ -567,6 +567,7 @@ _mesa_init_constants(struct gl_context *ctx) ctx->Const.MaxTextureImageUnits);
ctx->Const.MaxTextureMaxAnisotropy = MAX_TEXTURE_MAX_ANISOTROPY;
ctx->Const.MaxTextureLodBias = MAX_TEXTURE_LOD_BIAS;
+ ctx->Const.MaxTextureBufferSize = 65536;
ctx->Const.MaxArrayLockSize = MAX_ARRAY_LOCK_SIZE;
ctx->Const.SubPixelBits = SUB_PIXEL_BITS;
ctx->Const.MinPointSize = MIN_POINT_SIZE;
diff --git a/mesalib/src/mesa/main/debug.c b/mesalib/src/mesa/main/debug.c index 2a8fd0880..99030ac8e 100644 --- a/mesalib/src/mesa/main/debug.c +++ b/mesalib/src/mesa/main/debug.c @@ -1,634 +1,634 @@ -/* - * Mesa 3-D graphics library - * Version: 6.5 - * - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -#include "mtypes.h" -#include "attrib.h" -#include "colormac.h" -#include "enums.h" -#include "formats.h" -#include "hash.h" -#include "imports.h" -#include "debug.h" -#include "get.h" -#include "pixelstore.h" -#include "readpix.h" -#include "texobj.h" - - -static const char * -tex_target_name(GLenum tgt) -{ - static const struct { - GLenum target; - const char *name; - } tex_targets[] = { - { GL_TEXTURE_1D, "GL_TEXTURE_1D" }, - { GL_TEXTURE_2D, "GL_TEXTURE_2D" }, - { GL_TEXTURE_3D, "GL_TEXTURE_3D" }, - { GL_TEXTURE_CUBE_MAP, "GL_TEXTURE_CUBE_MAP" }, - { GL_TEXTURE_RECTANGLE, "GL_TEXTURE_RECTANGLE" }, - { GL_TEXTURE_1D_ARRAY_EXT, "GL_TEXTURE_1D_ARRAY" }, - { GL_TEXTURE_2D_ARRAY_EXT, "GL_TEXTURE_2D_ARRAY" } - }; - GLuint i; - for (i = 0; i < Elements(tex_targets); i++) { - if (tex_targets[i].target == tgt) - return tex_targets[i].name; - } - return "UNKNOWN TEX TARGET"; -} - - -void -_mesa_print_state( const char *msg, GLuint state ) -{ - _mesa_debug(NULL, - "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", - msg, - state, - (state & _NEW_MODELVIEW) ? "ctx->ModelView, " : "", - (state & _NEW_PROJECTION) ? "ctx->Projection, " : "", - (state & _NEW_TEXTURE_MATRIX) ? "ctx->TextureMatrix, " : "", - (state & _NEW_COLOR) ? "ctx->Color, " : "", - (state & _NEW_DEPTH) ? "ctx->Depth, " : "", - (state & _NEW_EVAL) ? "ctx->Eval/EvalMap, " : "", - (state & _NEW_FOG) ? "ctx->Fog, " : "", - (state & _NEW_HINT) ? "ctx->Hint, " : "", - (state & _NEW_LIGHT) ? "ctx->Light, " : "", - (state & _NEW_LINE) ? "ctx->Line, " : "", - (state & _NEW_PIXEL) ? "ctx->Pixel, " : "", - (state & _NEW_POINT) ? "ctx->Point, " : "", - (state & _NEW_POLYGON) ? "ctx->Polygon, " : "", - (state & _NEW_POLYGONSTIPPLE) ? "ctx->PolygonStipple, " : "", - (state & _NEW_SCISSOR) ? "ctx->Scissor, " : "", - (state & _NEW_STENCIL) ? "ctx->Stencil, " : "", - (state & _NEW_TEXTURE) ? "ctx->Texture, " : "", - (state & _NEW_TRANSFORM) ? "ctx->Transform, " : "", - (state & _NEW_VIEWPORT) ? "ctx->Viewport, " : "", - (state & _NEW_PACKUNPACK) ? "ctx->Pack/Unpack, " : "", - (state & _NEW_ARRAY) ? "ctx->Array, " : "", - (state & _NEW_RENDERMODE) ? "ctx->RenderMode, " : "", - (state & _NEW_BUFFERS) ? "ctx->Visual, ctx->DrawBuffer,, " : ""); -} - - - -void -_mesa_print_tri_caps( const char *name, GLuint flags ) -{ - _mesa_debug(NULL, - "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s\n", - name, - flags, - (flags & DD_FLATSHADE) ? "flat-shade, " : "", - (flags & DD_SEPARATE_SPECULAR) ? "separate-specular, " : "", - (flags & DD_TRI_LIGHT_TWOSIDE) ? "tri-light-twoside, " : "", - (flags & DD_TRI_TWOSTENCIL) ? "tri-twostencil, " : "", - (flags & DD_TRI_UNFILLED) ? "tri-unfilled, " : "", - (flags & DD_TRI_STIPPLE) ? "tri-stipple, " : "", - (flags & DD_TRI_OFFSET) ? "tri-offset, " : "", - (flags & DD_TRI_SMOOTH) ? "tri-smooth, " : "", - (flags & DD_LINE_SMOOTH) ? "line-smooth, " : "", - (flags & DD_LINE_STIPPLE) ? "line-stipple, " : "", - (flags & DD_POINT_SMOOTH) ? "point-smooth, " : "", - (flags & DD_POINT_ATTEN) ? "point-atten, " : "", - (flags & DD_TRI_CULL_FRONT_BACK) ? "cull-all, " : "" - ); -} - - -/** - * Print information about this Mesa version and build options. - */ -void _mesa_print_info( void ) -{ - _mesa_debug(NULL, "Mesa GL_VERSION = %s\n", - (char *) _mesa_GetString(GL_VERSION)); - _mesa_debug(NULL, "Mesa GL_RENDERER = %s\n", - (char *) _mesa_GetString(GL_RENDERER)); - _mesa_debug(NULL, "Mesa GL_VENDOR = %s\n", - (char *) _mesa_GetString(GL_VENDOR)); - _mesa_debug(NULL, "Mesa GL_EXTENSIONS = %s\n", - (char *) _mesa_GetString(GL_EXTENSIONS)); -#if defined(THREADS) - _mesa_debug(NULL, "Mesa thread-safe: YES\n"); -#else - _mesa_debug(NULL, "Mesa thread-safe: NO\n"); -#endif -#if defined(USE_X86_ASM) - _mesa_debug(NULL, "Mesa x86-optimized: YES\n"); -#else - _mesa_debug(NULL, "Mesa x86-optimized: NO\n"); -#endif -#if defined(USE_SPARC_ASM) - _mesa_debug(NULL, "Mesa sparc-optimized: YES\n"); -#else - _mesa_debug(NULL, "Mesa sparc-optimized: NO\n"); -#endif -} - - -/** - * Set the debugging flags. - * - * \param debug debug string - * - * If compiled with debugging support then search for keywords in \p debug and - * enables the verbose debug output of the respective feature. - */ -static void add_debug_flags( const char *debug ) -{ -#ifdef DEBUG - struct debug_option { - const char *name; - GLbitfield flag; - }; - static const struct debug_option debug_opt[] = { - { "varray", VERBOSE_VARRAY }, - { "tex", VERBOSE_TEXTURE }, - { "mat", VERBOSE_MATERIAL }, - { "pipe", VERBOSE_PIPELINE }, - { "driver", VERBOSE_DRIVER }, - { "state", VERBOSE_STATE }, - { "api", VERBOSE_API }, - { "list", VERBOSE_DISPLAY_LIST }, - { "lighting", VERBOSE_LIGHTING }, - { "disassem", VERBOSE_DISASSEM }, - { "draw", VERBOSE_DRAW }, - { "swap", VERBOSE_SWAPBUFFERS } - }; - GLuint i; - - MESA_VERBOSE = 0x0; - for (i = 0; i < Elements(debug_opt); i++) { - if (strstr(debug, debug_opt[i].name)) - MESA_VERBOSE |= debug_opt[i].flag; - } - - /* Debug flag: - */ - if (strstr(debug, "flush")) - MESA_DEBUG_FLAGS |= DEBUG_ALWAYS_FLUSH; - -#if defined(_FPU_GETCW) && defined(_FPU_SETCW) - if (strstr(debug, "fpexceptions")) { - /* raise FP exceptions */ - fpu_control_t mask; - _FPU_GETCW(mask); - mask &= ~(_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM - | _FPU_MASK_OM | _FPU_MASK_UM); - _FPU_SETCW(mask); - } -#endif - -#else - (void) debug; -#endif -} - - -void -_mesa_init_debug( struct gl_context *ctx ) -{ - char *c; - c = _mesa_getenv("MESA_DEBUG"); - if (c) - add_debug_flags(c); - - c = _mesa_getenv("MESA_VERBOSE"); - if (c) - add_debug_flags(c); -} - - -/* - * Write ppm file - */ -static void -write_ppm(const char *filename, const GLubyte *buffer, int width, int height, - int comps, int rcomp, int gcomp, int bcomp, GLboolean invert) -{ - FILE *f = fopen( filename, "w" ); - if (f) { - int x, y; - const GLubyte *ptr = buffer; - fprintf(f,"P6\n"); - fprintf(f,"# ppm-file created by osdemo.c\n"); - fprintf(f,"%i %i\n", width,height); - fprintf(f,"255\n"); - fclose(f); - f = fopen( filename, "ab" ); /* reopen in binary append mode */ - for (y=0; y < height; y++) { - for (x = 0; x < width; x++) { - int yy = invert ? (height - 1 - y) : y; - int i = (yy * width + x) * comps; - fputc(ptr[i+rcomp], f); /* write red */ - fputc(ptr[i+gcomp], f); /* write green */ - fputc(ptr[i+bcomp], f); /* write blue */ - } - } - fclose(f); - } - else { - fprintf(stderr, "Unable to create %s in write_ppm()\n", filename); - } -} - - -/** - * Write a texture image to a ppm file. - * \param face cube face in [0,5] - * \param level mipmap level - */ -static void -write_texture_image(struct gl_texture_object *texObj, - GLuint face, GLuint level) -{ - struct gl_texture_image *img = texObj->Image[face][level]; - if (img) { - GET_CURRENT_CONTEXT(ctx); - struct gl_pixelstore_attrib store; - GLubyte *buffer; - char s[100]; - - buffer = (GLubyte *) malloc(img->Width * img->Height - * img->Depth * 4); - - store = ctx->Pack; /* save */ - ctx->Pack = ctx->DefaultPacking; - - ctx->Driver.GetTexImage(ctx, texObj->Target, level, - GL_RGBA, GL_UNSIGNED_BYTE, - buffer, texObj, img); - - /* make filename */ - _mesa_snprintf(s, sizeof(s), "/tmp/tex%u.l%u.f%u.ppm", texObj->Name, level, face); - - printf(" Writing image level %u to %s\n", level, s); - write_ppm(s, buffer, img->Width, img->Height, 4, 0, 1, 2, GL_FALSE); - - ctx->Pack = store; /* restore */ - - free(buffer); - } -} - - -/** - * Write renderbuffer image to a ppm file. - */ -void -_mesa_write_renderbuffer_image(const struct gl_renderbuffer *rb) -{ - GET_CURRENT_CONTEXT(ctx); - GLubyte *buffer; - char s[100]; - GLenum format, type; - - if (rb->_BaseFormat == GL_RGB || - rb->_BaseFormat == GL_RGBA) { - format = GL_RGBA; - type = GL_UNSIGNED_BYTE; - } - else if (rb->_BaseFormat == GL_DEPTH_STENCIL) { - format = GL_DEPTH_STENCIL; - type = GL_UNSIGNED_INT_24_8; - } - else { - _mesa_debug(NULL, - "Unsupported BaseFormat 0x%x in " - "_mesa_write_renderbuffer_image()\n", - rb->_BaseFormat); - return; - } - - buffer = (GLubyte *) malloc(rb->Width * rb->Height * 4); - - ctx->Driver.ReadPixels(ctx, 0, 0, rb->Width, rb->Height, - format, type, &ctx->DefaultPacking, buffer); - - /* make filename */ - _mesa_snprintf(s, sizeof(s), "/tmp/renderbuffer%u.ppm", rb->Name); - _mesa_snprintf(s, sizeof(s), "C:\\renderbuffer%u.ppm", rb->Name); - - printf(" Writing renderbuffer image to %s\n", s); - - _mesa_debug(NULL, " Writing renderbuffer image to %s\n", s); - - write_ppm(s, buffer, rb->Width, rb->Height, 4, 0, 1, 2, GL_TRUE); - - free(buffer); -} - - -/** How many texture images (mipmap levels, faces) to write to files */ -#define WRITE_NONE 0 -#define WRITE_ONE 1 -#define WRITE_ALL 2 - -static GLuint WriteImages; - - -static void -dump_texture(struct gl_texture_object *texObj, GLuint writeImages) -{ - const GLuint numFaces = texObj->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1; - GLboolean written = GL_FALSE; - GLuint i, j; - - printf("Texture %u\n", texObj->Name); - printf(" Target %s\n", tex_target_name(texObj->Target)); - for (i = 0; i < MAX_TEXTURE_LEVELS; i++) { - for (j = 0; j < numFaces; j++) { - struct gl_texture_image *texImg = texObj->Image[j][i]; - if (texImg) { - printf(" Face %u level %u: %d x %d x %d, format %s at %p\n", - j, i, - texImg->Width, texImg->Height, texImg->Depth, - _mesa_get_format_name(texImg->TexFormat), - texImg->Data); - if (writeImages == WRITE_ALL || - (writeImages == WRITE_ONE && !written)) { - write_texture_image(texObj, j, i); - written = GL_TRUE; - } - } - } - } -} - - -/** - * Dump a single texture. - */ -void -_mesa_dump_texture(GLuint texture, GLuint writeImages) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_texture_object *texObj = _mesa_lookup_texture(ctx, texture); - if (texObj) { - dump_texture(texObj, writeImages); - } -} - - -static void -dump_texture_cb(GLuint id, void *data, void *userData) -{ - struct gl_texture_object *texObj = (struct gl_texture_object *) data; - (void) userData; - dump_texture(texObj, WriteImages); -} - - -/** - * Print basic info about all texture objext to stdout. - * If dumpImages is true, write PPM of level[0] image to a file. - */ -void -_mesa_dump_textures(GLuint writeImages) -{ - GET_CURRENT_CONTEXT(ctx); - WriteImages = writeImages; - _mesa_HashWalk(ctx->Shared->TexObjects, dump_texture_cb, ctx); -} - - -static void -dump_renderbuffer(const struct gl_renderbuffer *rb, GLboolean writeImage) -{ - printf("Renderbuffer %u: %u x %u IntFormat = %s\n", - rb->Name, rb->Width, rb->Height, - _mesa_lookup_enum_by_nr(rb->InternalFormat)); - if (writeImage) { - _mesa_write_renderbuffer_image(rb); - } -} - - -static void -dump_renderbuffer_cb(GLuint id, void *data, void *userData) -{ - const struct gl_renderbuffer *rb = (const struct gl_renderbuffer *) data; - (void) userData; - dump_renderbuffer(rb, WriteImages); -} - - -/** - * Print basic info about all renderbuffers to stdout. - * If dumpImages is true, write PPM of level[0] image to a file. - */ -void -_mesa_dump_renderbuffers(GLboolean writeImages) -{ - GET_CURRENT_CONTEXT(ctx); - WriteImages = writeImages; - _mesa_HashWalk(ctx->Shared->RenderBuffers, dump_renderbuffer_cb, ctx); -} - - - -void -_mesa_dump_color_buffer(const char *filename) -{ - GET_CURRENT_CONTEXT(ctx); - const GLuint w = ctx->DrawBuffer->Width; - const GLuint h = ctx->DrawBuffer->Height; - GLubyte *buf; - - buf = (GLubyte *) malloc(w * h * 4); - - _mesa_PushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); - _mesa_PixelStorei(GL_PACK_ALIGNMENT, 1); - _mesa_PixelStorei(GL_PACK_INVERT_MESA, GL_TRUE); - - _mesa_ReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, buf); - - printf("ReadBuffer %p 0x%x DrawBuffer %p 0x%x\n", - (void *) ctx->ReadBuffer->_ColorReadBuffer, - ctx->ReadBuffer->ColorReadBuffer, - (void *) ctx->DrawBuffer->_ColorDrawBuffers[0], - ctx->DrawBuffer->ColorDrawBuffer[0]); - printf("Writing %d x %d color buffer to %s\n", w, h, filename); - write_ppm(filename, buf, w, h, 4, 0, 1, 2, GL_TRUE); - - _mesa_PopClientAttrib(); - - free(buf); -} - - -void -_mesa_dump_depth_buffer(const char *filename) -{ - GET_CURRENT_CONTEXT(ctx); - const GLuint w = ctx->DrawBuffer->Width; - const GLuint h = ctx->DrawBuffer->Height; - GLuint *buf; - GLubyte *buf2; - GLuint i; - - buf = (GLuint *) malloc(w * h * 4); /* 4 bpp */ - buf2 = (GLubyte *) malloc(w * h * 3); /* 3 bpp */ - - _mesa_PushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); - _mesa_PixelStorei(GL_PACK_ALIGNMENT, 1); - _mesa_PixelStorei(GL_PACK_INVERT_MESA, GL_TRUE); - - _mesa_ReadPixels(0, 0, w, h, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, buf); - - /* spread 24 bits of Z across R, G, B */ - for (i = 0; i < w * h; i++) { - buf2[i*3+0] = (buf[i] >> 24) & 0xff; - buf2[i*3+1] = (buf[i] >> 16) & 0xff; - buf2[i*3+2] = (buf[i] >> 8) & 0xff; - } - - printf("Writing %d x %d depth buffer to %s\n", w, h, filename); - write_ppm(filename, buf2, w, h, 3, 0, 1, 2, GL_TRUE); - - _mesa_PopClientAttrib(); - - free(buf); - free(buf2); -} - - -void -_mesa_dump_stencil_buffer(const char *filename) -{ - GET_CURRENT_CONTEXT(ctx); - const GLuint w = ctx->DrawBuffer->Width; - const GLuint h = ctx->DrawBuffer->Height; - GLubyte *buf; - GLubyte *buf2; - GLuint i; - - buf = (GLubyte *) malloc(w * h); /* 1 bpp */ - buf2 = (GLubyte *) malloc(w * h * 3); /* 3 bpp */ - - _mesa_PushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT); - _mesa_PixelStorei(GL_PACK_ALIGNMENT, 1); - _mesa_PixelStorei(GL_PACK_INVERT_MESA, GL_TRUE); - - _mesa_ReadPixels(0, 0, w, h, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, buf); - - for (i = 0; i < w * h; i++) { - buf2[i*3+0] = buf[i]; - buf2[i*3+1] = (buf[i] & 127) * 2; - buf2[i*3+2] = (buf[i] - 128) * 2; - } - - printf("Writing %d x %d stencil buffer to %s\n", w, h, filename); - write_ppm(filename, buf2, w, h, 3, 0, 1, 2, GL_TRUE); - - _mesa_PopClientAttrib(); - - free(buf); - free(buf2); -} - - -void -_mesa_dump_image(const char *filename, const void *image, GLuint w, GLuint h, - GLenum format, GLenum type) -{ - GLboolean invert = GL_TRUE; - - if (format == GL_RGBA && type == GL_UNSIGNED_BYTE) { - write_ppm(filename, image, w, h, 4, 0, 1, 2, invert); - } - else if (format == GL_BGRA && type == GL_UNSIGNED_BYTE) { - write_ppm(filename, image, w, h, 4, 2, 1, 0, invert); - } - else if (format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_BYTE) { - write_ppm(filename, image, w, h, 2, 1, 0, 0, invert); - } - else { - _mesa_problem(NULL, "Unsupported format/type in _mesa_dump_image()"); - } -} - - -/** - * Quick and dirty function to "print" a texture to stdout. - */ -void -_mesa_print_texture(struct gl_context *ctx, const struct gl_texture_image *img) -{ -#if CHAN_TYPE != GL_UNSIGNED_BYTE - _mesa_problem(NULL, "PrintTexture not supported"); -#else - GLuint i, j, c; - const GLubyte *data = (const GLubyte *) img->Data; - - if (!data) { - printf("No texture data\n"); - return; - } - - /* XXX add more formats or make into a new format utility function */ - switch (img->TexFormat) { - case MESA_FORMAT_A8: - case MESA_FORMAT_L8: - case MESA_FORMAT_I8: - case MESA_FORMAT_CI8: - c = 1; - break; - case MESA_FORMAT_AL88: - case MESA_FORMAT_AL88_REV: - c = 2; - break; - case MESA_FORMAT_RGB888: - case MESA_FORMAT_BGR888: - c = 3; - break; - case MESA_FORMAT_RGBA8888: - case MESA_FORMAT_ARGB8888: - c = 4; - break; - default: - _mesa_problem(NULL, "error in PrintTexture\n"); - return; - } - - for (i = 0; i < img->Height; i++) { - for (j = 0; j < img->Width; j++) { - if (c==1) - printf("%02x ", data[0]); - else if (c==2) - printf("%02x%02x ", data[0], data[1]); - else if (c==3) - printf("%02x%02x%02x ", data[0], data[1], data[2]); - else if (c==4) - printf("%02x%02x%02x%02x ", data[0], data[1], data[2], data[3]); - data += (img->RowStride - img->Width) * c; - } - /* XXX use img->ImageStride here */ - printf("\n"); - } -#endif -} +/*
+ * Mesa 3-D graphics library
+ * Version: 6.5
+ *
+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
+ *
+ * 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
+ * BRIAN PAUL 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.
+ */
+
+#include "mtypes.h"
+#include "attrib.h"
+#include "colormac.h"
+#include "enums.h"
+#include "formats.h"
+#include "hash.h"
+#include "imports.h"
+#include "debug.h"
+#include "get.h"
+#include "pixelstore.h"
+#include "readpix.h"
+#include "texobj.h"
+
+
+static const char *
+tex_target_name(GLenum tgt)
+{
+ static const struct {
+ GLenum target;
+ const char *name;
+ } tex_targets[] = {
+ { GL_TEXTURE_1D, "GL_TEXTURE_1D" },
+ { GL_TEXTURE_2D, "GL_TEXTURE_2D" },
+ { GL_TEXTURE_3D, "GL_TEXTURE_3D" },
+ { GL_TEXTURE_CUBE_MAP, "GL_TEXTURE_CUBE_MAP" },
+ { GL_TEXTURE_RECTANGLE, "GL_TEXTURE_RECTANGLE" },
+ { GL_TEXTURE_1D_ARRAY_EXT, "GL_TEXTURE_1D_ARRAY" },
+ { GL_TEXTURE_2D_ARRAY_EXT, "GL_TEXTURE_2D_ARRAY" }
+ };
+ GLuint i;
+ for (i = 0; i < Elements(tex_targets); i++) {
+ if (tex_targets[i].target == tgt)
+ return tex_targets[i].name;
+ }
+ return "UNKNOWN TEX TARGET";
+}
+
+
+void
+_mesa_print_state( const char *msg, GLuint state )
+{
+ _mesa_debug(NULL,
+ "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n",
+ msg,
+ state,
+ (state & _NEW_MODELVIEW) ? "ctx->ModelView, " : "",
+ (state & _NEW_PROJECTION) ? "ctx->Projection, " : "",
+ (state & _NEW_TEXTURE_MATRIX) ? "ctx->TextureMatrix, " : "",
+ (state & _NEW_COLOR) ? "ctx->Color, " : "",
+ (state & _NEW_DEPTH) ? "ctx->Depth, " : "",
+ (state & _NEW_EVAL) ? "ctx->Eval/EvalMap, " : "",
+ (state & _NEW_FOG) ? "ctx->Fog, " : "",
+ (state & _NEW_HINT) ? "ctx->Hint, " : "",
+ (state & _NEW_LIGHT) ? "ctx->Light, " : "",
+ (state & _NEW_LINE) ? "ctx->Line, " : "",
+ (state & _NEW_PIXEL) ? "ctx->Pixel, " : "",
+ (state & _NEW_POINT) ? "ctx->Point, " : "",
+ (state & _NEW_POLYGON) ? "ctx->Polygon, " : "",
+ (state & _NEW_POLYGONSTIPPLE) ? "ctx->PolygonStipple, " : "",
+ (state & _NEW_SCISSOR) ? "ctx->Scissor, " : "",
+ (state & _NEW_STENCIL) ? "ctx->Stencil, " : "",
+ (state & _NEW_TEXTURE) ? "ctx->Texture, " : "",
+ (state & _NEW_TRANSFORM) ? "ctx->Transform, " : "",
+ (state & _NEW_VIEWPORT) ? "ctx->Viewport, " : "",
+ (state & _NEW_PACKUNPACK) ? "ctx->Pack/Unpack, " : "",
+ (state & _NEW_ARRAY) ? "ctx->Array, " : "",
+ (state & _NEW_RENDERMODE) ? "ctx->RenderMode, " : "",
+ (state & _NEW_BUFFERS) ? "ctx->Visual, ctx->DrawBuffer,, " : "");
+}
+
+
+
+void
+_mesa_print_tri_caps( const char *name, GLuint flags )
+{
+ _mesa_debug(NULL,
+ "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s\n",
+ name,
+ flags,
+ (flags & DD_FLATSHADE) ? "flat-shade, " : "",
+ (flags & DD_SEPARATE_SPECULAR) ? "separate-specular, " : "",
+ (flags & DD_TRI_LIGHT_TWOSIDE) ? "tri-light-twoside, " : "",
+ (flags & DD_TRI_TWOSTENCIL) ? "tri-twostencil, " : "",
+ (flags & DD_TRI_UNFILLED) ? "tri-unfilled, " : "",
+ (flags & DD_TRI_STIPPLE) ? "tri-stipple, " : "",
+ (flags & DD_TRI_OFFSET) ? "tri-offset, " : "",
+ (flags & DD_TRI_SMOOTH) ? "tri-smooth, " : "",
+ (flags & DD_LINE_SMOOTH) ? "line-smooth, " : "",
+ (flags & DD_LINE_STIPPLE) ? "line-stipple, " : "",
+ (flags & DD_POINT_SMOOTH) ? "point-smooth, " : "",
+ (flags & DD_POINT_ATTEN) ? "point-atten, " : "",
+ (flags & DD_TRI_CULL_FRONT_BACK) ? "cull-all, " : ""
+ );
+}
+
+
+/**
+ * Print information about this Mesa version and build options.
+ */
+void _mesa_print_info( void )
+{
+ _mesa_debug(NULL, "Mesa GL_VERSION = %s\n",
+ (char *) _mesa_GetString(GL_VERSION));
+ _mesa_debug(NULL, "Mesa GL_RENDERER = %s\n",
+ (char *) _mesa_GetString(GL_RENDERER));
+ _mesa_debug(NULL, "Mesa GL_VENDOR = %s\n",
+ (char *) _mesa_GetString(GL_VENDOR));
+ _mesa_debug(NULL, "Mesa GL_EXTENSIONS = %s\n",
+ (char *) _mesa_GetString(GL_EXTENSIONS));
+#if defined(THREADS)
+ _mesa_debug(NULL, "Mesa thread-safe: YES\n");
+#else
+ _mesa_debug(NULL, "Mesa thread-safe: NO\n");
+#endif
+#if defined(USE_X86_ASM)
+ _mesa_debug(NULL, "Mesa x86-optimized: YES\n");
+#else
+ _mesa_debug(NULL, "Mesa x86-optimized: NO\n");
+#endif
+#if defined(USE_SPARC_ASM)
+ _mesa_debug(NULL, "Mesa sparc-optimized: YES\n");
+#else
+ _mesa_debug(NULL, "Mesa sparc-optimized: NO\n");
+#endif
+}
+
+
+/**
+ * Set the debugging flags.
+ *
+ * \param debug debug string
+ *
+ * If compiled with debugging support then search for keywords in \p debug and
+ * enables the verbose debug output of the respective feature.
+ */
+static void add_debug_flags( const char *debug )
+{
+#ifdef DEBUG
+ struct debug_option {
+ const char *name;
+ GLbitfield flag;
+ };
+ static const struct debug_option debug_opt[] = {
+ { "varray", VERBOSE_VARRAY },
+ { "tex", VERBOSE_TEXTURE },
+ { "mat", VERBOSE_MATERIAL },
+ { "pipe", VERBOSE_PIPELINE },
+ { "driver", VERBOSE_DRIVER },
+ { "state", VERBOSE_STATE },
+ { "api", VERBOSE_API },
+ { "list", VERBOSE_DISPLAY_LIST },
+ { "lighting", VERBOSE_LIGHTING },
+ { "disassem", VERBOSE_DISASSEM },
+ { "draw", VERBOSE_DRAW },
+ { "swap", VERBOSE_SWAPBUFFERS }
+ };
+ GLuint i;
+
+ MESA_VERBOSE = 0x0;
+ for (i = 0; i < Elements(debug_opt); i++) {
+ if (strstr(debug, debug_opt[i].name) || strcmp(debug, "all") == 0)
+ MESA_VERBOSE |= debug_opt[i].flag;
+ }
+
+ /* Debug flag:
+ */
+ if (strstr(debug, "flush"))
+ MESA_DEBUG_FLAGS |= DEBUG_ALWAYS_FLUSH;
+
+#if defined(_FPU_GETCW) && defined(_FPU_SETCW)
+ if (strstr(debug, "fpexceptions")) {
+ /* raise FP exceptions */
+ fpu_control_t mask;
+ _FPU_GETCW(mask);
+ mask &= ~(_FPU_MASK_IM | _FPU_MASK_DM | _FPU_MASK_ZM
+ | _FPU_MASK_OM | _FPU_MASK_UM);
+ _FPU_SETCW(mask);
+ }
+#endif
+
+#else
+ (void) debug;
+#endif
+}
+
+
+void
+_mesa_init_debug( struct gl_context *ctx )
+{
+ char *c;
+ c = _mesa_getenv("MESA_DEBUG");
+ if (c)
+ add_debug_flags(c);
+
+ c = _mesa_getenv("MESA_VERBOSE");
+ if (c)
+ add_debug_flags(c);
+}
+
+
+/*
+ * Write ppm file
+ */
+static void
+write_ppm(const char *filename, const GLubyte *buffer, int width, int height,
+ int comps, int rcomp, int gcomp, int bcomp, GLboolean invert)
+{
+ FILE *f = fopen( filename, "w" );
+ if (f) {
+ int x, y;
+ const GLubyte *ptr = buffer;
+ fprintf(f,"P6\n");
+ fprintf(f,"# ppm-file created by osdemo.c\n");
+ fprintf(f,"%i %i\n", width,height);
+ fprintf(f,"255\n");
+ fclose(f);
+ f = fopen( filename, "ab" ); /* reopen in binary append mode */
+ for (y=0; y < height; y++) {
+ for (x = 0; x < width; x++) {
+ int yy = invert ? (height - 1 - y) : y;
+ int i = (yy * width + x) * comps;
+ fputc(ptr[i+rcomp], f); /* write red */
+ fputc(ptr[i+gcomp], f); /* write green */
+ fputc(ptr[i+bcomp], f); /* write blue */
+ }
+ }
+ fclose(f);
+ }
+ else {
+ fprintf(stderr, "Unable to create %s in write_ppm()\n", filename);
+ }
+}
+
+
+/**
+ * Write a texture image to a ppm file.
+ * \param face cube face in [0,5]
+ * \param level mipmap level
+ */
+static void
+write_texture_image(struct gl_texture_object *texObj,
+ GLuint face, GLuint level)
+{
+ struct gl_texture_image *img = texObj->Image[face][level];
+ if (img) {
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_pixelstore_attrib store;
+ GLubyte *buffer;
+ char s[100];
+
+ buffer = (GLubyte *) malloc(img->Width * img->Height
+ * img->Depth * 4);
+
+ store = ctx->Pack; /* save */
+ ctx->Pack = ctx->DefaultPacking;
+
+ ctx->Driver.GetTexImage(ctx, texObj->Target, level,
+ GL_RGBA, GL_UNSIGNED_BYTE,
+ buffer, texObj, img);
+
+ /* make filename */
+ _mesa_snprintf(s, sizeof(s), "/tmp/tex%u.l%u.f%u.ppm", texObj->Name, level, face);
+
+ printf(" Writing image level %u to %s\n", level, s);
+ write_ppm(s, buffer, img->Width, img->Height, 4, 0, 1, 2, GL_FALSE);
+
+ ctx->Pack = store; /* restore */
+
+ free(buffer);
+ }
+}
+
+
+/**
+ * Write renderbuffer image to a ppm file.
+ */
+void
+_mesa_write_renderbuffer_image(const struct gl_renderbuffer *rb)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLubyte *buffer;
+ char s[100];
+ GLenum format, type;
+
+ if (rb->_BaseFormat == GL_RGB ||
+ rb->_BaseFormat == GL_RGBA) {
+ format = GL_RGBA;
+ type = GL_UNSIGNED_BYTE;
+ }
+ else if (rb->_BaseFormat == GL_DEPTH_STENCIL) {
+ format = GL_DEPTH_STENCIL;
+ type = GL_UNSIGNED_INT_24_8;
+ }
+ else {
+ _mesa_debug(NULL,
+ "Unsupported BaseFormat 0x%x in "
+ "_mesa_write_renderbuffer_image()\n",
+ rb->_BaseFormat);
+ return;
+ }
+
+ buffer = (GLubyte *) malloc(rb->Width * rb->Height * 4);
+
+ ctx->Driver.ReadPixels(ctx, 0, 0, rb->Width, rb->Height,
+ format, type, &ctx->DefaultPacking, buffer);
+
+ /* make filename */
+ _mesa_snprintf(s, sizeof(s), "/tmp/renderbuffer%u.ppm", rb->Name);
+ _mesa_snprintf(s, sizeof(s), "C:\\renderbuffer%u.ppm", rb->Name);
+
+ printf(" Writing renderbuffer image to %s\n", s);
+
+ _mesa_debug(NULL, " Writing renderbuffer image to %s\n", s);
+
+ write_ppm(s, buffer, rb->Width, rb->Height, 4, 0, 1, 2, GL_TRUE);
+
+ free(buffer);
+}
+
+
+/** How many texture images (mipmap levels, faces) to write to files */
+#define WRITE_NONE 0
+#define WRITE_ONE 1
+#define WRITE_ALL 2
+
+static GLuint WriteImages;
+
+
+static void
+dump_texture(struct gl_texture_object *texObj, GLuint writeImages)
+{
+ const GLuint numFaces = texObj->Target == GL_TEXTURE_CUBE_MAP ? 6 : 1;
+ GLboolean written = GL_FALSE;
+ GLuint i, j;
+
+ printf("Texture %u\n", texObj->Name);
+ printf(" Target %s\n", tex_target_name(texObj->Target));
+ for (i = 0; i < MAX_TEXTURE_LEVELS; i++) {
+ for (j = 0; j < numFaces; j++) {
+ struct gl_texture_image *texImg = texObj->Image[j][i];
+ if (texImg) {
+ printf(" Face %u level %u: %d x %d x %d, format %s at %p\n",
+ j, i,
+ texImg->Width, texImg->Height, texImg->Depth,
+ _mesa_get_format_name(texImg->TexFormat),
+ texImg->Data);
+ if (writeImages == WRITE_ALL ||
+ (writeImages == WRITE_ONE && !written)) {
+ write_texture_image(texObj, j, i);
+ written = GL_TRUE;
+ }
+ }
+ }
+ }
+}
+
+
+/**
+ * Dump a single texture.
+ */
+void
+_mesa_dump_texture(GLuint texture, GLuint writeImages)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_texture_object *texObj = _mesa_lookup_texture(ctx, texture);
+ if (texObj) {
+ dump_texture(texObj, writeImages);
+ }
+}
+
+
+static void
+dump_texture_cb(GLuint id, void *data, void *userData)
+{
+ struct gl_texture_object *texObj = (struct gl_texture_object *) data;
+ (void) userData;
+ dump_texture(texObj, WriteImages);
+}
+
+
+/**
+ * Print basic info about all texture objext to stdout.
+ * If dumpImages is true, write PPM of level[0] image to a file.
+ */
+void
+_mesa_dump_textures(GLuint writeImages)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ WriteImages = writeImages;
+ _mesa_HashWalk(ctx->Shared->TexObjects, dump_texture_cb, ctx);
+}
+
+
+static void
+dump_renderbuffer(const struct gl_renderbuffer *rb, GLboolean writeImage)
+{
+ printf("Renderbuffer %u: %u x %u IntFormat = %s\n",
+ rb->Name, rb->Width, rb->Height,
+ _mesa_lookup_enum_by_nr(rb->InternalFormat));
+ if (writeImage) {
+ _mesa_write_renderbuffer_image(rb);
+ }
+}
+
+
+static void
+dump_renderbuffer_cb(GLuint id, void *data, void *userData)
+{
+ const struct gl_renderbuffer *rb = (const struct gl_renderbuffer *) data;
+ (void) userData;
+ dump_renderbuffer(rb, WriteImages);
+}
+
+
+/**
+ * Print basic info about all renderbuffers to stdout.
+ * If dumpImages is true, write PPM of level[0] image to a file.
+ */
+void
+_mesa_dump_renderbuffers(GLboolean writeImages)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ WriteImages = writeImages;
+ _mesa_HashWalk(ctx->Shared->RenderBuffers, dump_renderbuffer_cb, ctx);
+}
+
+
+
+void
+_mesa_dump_color_buffer(const char *filename)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ const GLuint w = ctx->DrawBuffer->Width;
+ const GLuint h = ctx->DrawBuffer->Height;
+ GLubyte *buf;
+
+ buf = (GLubyte *) malloc(w * h * 4);
+
+ _mesa_PushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
+ _mesa_PixelStorei(GL_PACK_ALIGNMENT, 1);
+ _mesa_PixelStorei(GL_PACK_INVERT_MESA, GL_TRUE);
+
+ _mesa_ReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, buf);
+
+ printf("ReadBuffer %p 0x%x DrawBuffer %p 0x%x\n",
+ (void *) ctx->ReadBuffer->_ColorReadBuffer,
+ ctx->ReadBuffer->ColorReadBuffer,
+ (void *) ctx->DrawBuffer->_ColorDrawBuffers[0],
+ ctx->DrawBuffer->ColorDrawBuffer[0]);
+ printf("Writing %d x %d color buffer to %s\n", w, h, filename);
+ write_ppm(filename, buf, w, h, 4, 0, 1, 2, GL_TRUE);
+
+ _mesa_PopClientAttrib();
+
+ free(buf);
+}
+
+
+void
+_mesa_dump_depth_buffer(const char *filename)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ const GLuint w = ctx->DrawBuffer->Width;
+ const GLuint h = ctx->DrawBuffer->Height;
+ GLuint *buf;
+ GLubyte *buf2;
+ GLuint i;
+
+ buf = (GLuint *) malloc(w * h * 4); /* 4 bpp */
+ buf2 = (GLubyte *) malloc(w * h * 3); /* 3 bpp */
+
+ _mesa_PushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
+ _mesa_PixelStorei(GL_PACK_ALIGNMENT, 1);
+ _mesa_PixelStorei(GL_PACK_INVERT_MESA, GL_TRUE);
+
+ _mesa_ReadPixels(0, 0, w, h, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, buf);
+
+ /* spread 24 bits of Z across R, G, B */
+ for (i = 0; i < w * h; i++) {
+ buf2[i*3+0] = (buf[i] >> 24) & 0xff;
+ buf2[i*3+1] = (buf[i] >> 16) & 0xff;
+ buf2[i*3+2] = (buf[i] >> 8) & 0xff;
+ }
+
+ printf("Writing %d x %d depth buffer to %s\n", w, h, filename);
+ write_ppm(filename, buf2, w, h, 3, 0, 1, 2, GL_TRUE);
+
+ _mesa_PopClientAttrib();
+
+ free(buf);
+ free(buf2);
+}
+
+
+void
+_mesa_dump_stencil_buffer(const char *filename)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ const GLuint w = ctx->DrawBuffer->Width;
+ const GLuint h = ctx->DrawBuffer->Height;
+ GLubyte *buf;
+ GLubyte *buf2;
+ GLuint i;
+
+ buf = (GLubyte *) malloc(w * h); /* 1 bpp */
+ buf2 = (GLubyte *) malloc(w * h * 3); /* 3 bpp */
+
+ _mesa_PushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
+ _mesa_PixelStorei(GL_PACK_ALIGNMENT, 1);
+ _mesa_PixelStorei(GL_PACK_INVERT_MESA, GL_TRUE);
+
+ _mesa_ReadPixels(0, 0, w, h, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, buf);
+
+ for (i = 0; i < w * h; i++) {
+ buf2[i*3+0] = buf[i];
+ buf2[i*3+1] = (buf[i] & 127) * 2;
+ buf2[i*3+2] = (buf[i] - 128) * 2;
+ }
+
+ printf("Writing %d x %d stencil buffer to %s\n", w, h, filename);
+ write_ppm(filename, buf2, w, h, 3, 0, 1, 2, GL_TRUE);
+
+ _mesa_PopClientAttrib();
+
+ free(buf);
+ free(buf2);
+}
+
+
+void
+_mesa_dump_image(const char *filename, const void *image, GLuint w, GLuint h,
+ GLenum format, GLenum type)
+{
+ GLboolean invert = GL_TRUE;
+
+ if (format == GL_RGBA && type == GL_UNSIGNED_BYTE) {
+ write_ppm(filename, image, w, h, 4, 0, 1, 2, invert);
+ }
+ else if (format == GL_BGRA && type == GL_UNSIGNED_BYTE) {
+ write_ppm(filename, image, w, h, 4, 2, 1, 0, invert);
+ }
+ else if (format == GL_LUMINANCE_ALPHA && type == GL_UNSIGNED_BYTE) {
+ write_ppm(filename, image, w, h, 2, 1, 0, 0, invert);
+ }
+ else {
+ _mesa_problem(NULL, "Unsupported format/type in _mesa_dump_image()");
+ }
+}
+
+
+/**
+ * Quick and dirty function to "print" a texture to stdout.
+ */
+void
+_mesa_print_texture(struct gl_context *ctx, const struct gl_texture_image *img)
+{
+#if CHAN_TYPE != GL_UNSIGNED_BYTE
+ _mesa_problem(NULL, "PrintTexture not supported");
+#else
+ GLuint i, j, c;
+ const GLubyte *data = (const GLubyte *) img->Data;
+
+ if (!data) {
+ printf("No texture data\n");
+ return;
+ }
+
+ /* XXX add more formats or make into a new format utility function */
+ switch (img->TexFormat) {
+ case MESA_FORMAT_A8:
+ case MESA_FORMAT_L8:
+ case MESA_FORMAT_I8:
+ case MESA_FORMAT_CI8:
+ c = 1;
+ break;
+ case MESA_FORMAT_AL88:
+ case MESA_FORMAT_AL88_REV:
+ c = 2;
+ break;
+ case MESA_FORMAT_RGB888:
+ case MESA_FORMAT_BGR888:
+ c = 3;
+ break;
+ case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_ARGB8888:
+ c = 4;
+ break;
+ default:
+ _mesa_problem(NULL, "error in PrintTexture\n");
+ return;
+ }
+
+ for (i = 0; i < img->Height; i++) {
+ for (j = 0; j < img->Width; j++) {
+ if (c==1)
+ printf("%02x ", data[0]);
+ else if (c==2)
+ printf("%02x%02x ", data[0], data[1]);
+ else if (c==3)
+ printf("%02x%02x%02x ", data[0], data[1], data[2]);
+ else if (c==4)
+ printf("%02x%02x%02x%02x ", data[0], data[1], data[2], data[3]);
+ data += (img->RowStride - img->Width) * c;
+ }
+ /* XXX use img->ImageStride here */
+ printf("\n");
+ }
+#endif
+}
diff --git a/mesalib/src/mesa/main/enums.c b/mesalib/src/mesa/main/enums.c index 14be3ff44..c4d8e4d40 100644 --- a/mesalib/src/mesa/main/enums.c +++ b/mesalib/src/mesa/main/enums.c @@ -1,6307 +1,6317 @@ -/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */ - -/* - * Copyright (C) 1999-2005 Brian Paul All Rights Reserved. - * All Rights Reserved. - * - * 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, sub license, - * 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 (including the next - * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL, - * AND/OR THEIR SUPPLIERS 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. - */ - -#include "main/glheader.h" -#include "main/mfeatures.h" -#include "main/enums.h" -#include "main/imports.h" -#include "main/mtypes.h" - -typedef struct { - size_t offset; - int n; -} enum_elt; - -LONGSTRING static const char enum_string_table[] = - "GL_2D\0" - "GL_2_BYTES\0" - "GL_3D\0" - "GL_3D_COLOR\0" - "GL_3D_COLOR_TEXTURE\0" - "GL_3_BYTES\0" - "GL_4D_COLOR_TEXTURE\0" - "GL_4_BYTES\0" - "GL_ACCUM\0" - "GL_ACCUM_ALPHA_BITS\0" - "GL_ACCUM_BLUE_BITS\0" - "GL_ACCUM_BUFFER_BIT\0" - "GL_ACCUM_CLEAR_VALUE\0" - "GL_ACCUM_GREEN_BITS\0" - "GL_ACCUM_RED_BITS\0" - "GL_ACTIVE_ATTRIBUTES\0" - "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0" - "GL_ACTIVE_PROGRAM_EXT\0" - "GL_ACTIVE_STENCIL_FACE_EXT\0" - "GL_ACTIVE_TEXTURE\0" - "GL_ACTIVE_TEXTURE_ARB\0" - "GL_ACTIVE_UNIFORMS\0" - "GL_ACTIVE_UNIFORM_MAX_LENGTH\0" - "GL_ACTIVE_VERTEX_UNITS_ARB\0" - "GL_ADD\0" - "GL_ADD_SIGNED\0" - "GL_ADD_SIGNED_ARB\0" - "GL_ADD_SIGNED_EXT\0" - "GL_ALIASED_LINE_WIDTH_RANGE\0" - "GL_ALIASED_POINT_SIZE_RANGE\0" - "GL_ALL_ATTRIB_BITS\0" - "GL_ALL_CLIENT_ATTRIB_BITS\0" - "GL_ALPHA\0" - "GL_ALPHA12\0" - "GL_ALPHA12_EXT\0" - "GL_ALPHA16\0" - "GL_ALPHA16I_EXT\0" - "GL_ALPHA16UI_EXT\0" - "GL_ALPHA16_EXT\0" - "GL_ALPHA32I_EXT\0" - "GL_ALPHA32UI_EXT\0" - "GL_ALPHA4\0" - "GL_ALPHA4_EXT\0" - "GL_ALPHA8\0" - "GL_ALPHA8I_EXT\0" - "GL_ALPHA8UI_EXT\0" - "GL_ALPHA8_EXT\0" - "GL_ALPHA_BIAS\0" - "GL_ALPHA_BITS\0" - "GL_ALPHA_INTEGER_EXT\0" - "GL_ALPHA_SCALE\0" - "GL_ALPHA_TEST\0" - "GL_ALPHA_TEST_FUNC\0" - "GL_ALPHA_TEST_REF\0" - "GL_ALREADY_SIGNALED\0" - "GL_ALWAYS\0" - "GL_AMBIENT\0" - "GL_AMBIENT_AND_DIFFUSE\0" - "GL_AND\0" - "GL_AND_INVERTED\0" - "GL_AND_REVERSE\0" - "GL_ARRAY_BUFFER\0" - "GL_ARRAY_BUFFER_BINDING\0" - "GL_ARRAY_BUFFER_BINDING_ARB\0" - "GL_ATTACHED_SHADERS\0" - "GL_ATTRIB_ARRAY_POINTER_NV\0" - "GL_ATTRIB_ARRAY_SIZE_NV\0" - "GL_ATTRIB_ARRAY_STRIDE_NV\0" - "GL_ATTRIB_ARRAY_TYPE_NV\0" - "GL_ATTRIB_STACK_DEPTH\0" - "GL_AUTO_NORMAL\0" - "GL_AUX0\0" - "GL_AUX1\0" - "GL_AUX2\0" - "GL_AUX3\0" - "GL_AUX_BUFFERS\0" - "GL_BACK\0" - "GL_BACK_LEFT\0" - "GL_BACK_RIGHT\0" - "GL_BGR\0" - "GL_BGRA\0" - "GL_BGRA_EXT\0" - "GL_BGRA_INTEGER\0" - "GL_BGRA_INTEGER_EXT\0" - "GL_BGR_INTEGER\0" - "GL_BGR_INTEGER_EXT\0" - "GL_BITMAP\0" - "GL_BITMAP_TOKEN\0" - "GL_BLEND\0" - "GL_BLEND_COLOR\0" - "GL_BLEND_COLOR_EXT\0" - "GL_BLEND_DST\0" - "GL_BLEND_DST_ALPHA\0" - "GL_BLEND_DST_ALPHA_OES\0" - "GL_BLEND_DST_RGB\0" - "GL_BLEND_DST_RGB_OES\0" - "GL_BLEND_EQUATION\0" - "GL_BLEND_EQUATION_ALPHA\0" - "GL_BLEND_EQUATION_ALPHA_EXT\0" - "GL_BLEND_EQUATION_ALPHA_OES\0" - "GL_BLEND_EQUATION_EXT\0" - "GL_BLEND_EQUATION_OES\0" - "GL_BLEND_EQUATION_RGB\0" - "GL_BLEND_EQUATION_RGB_EXT\0" - "GL_BLEND_EQUATION_RGB_OES\0" - "GL_BLEND_SRC\0" - "GL_BLEND_SRC_ALPHA\0" - "GL_BLEND_SRC_ALPHA_OES\0" - "GL_BLEND_SRC_RGB\0" - "GL_BLEND_SRC_RGB_OES\0" - "GL_BLUE\0" - "GL_BLUE_BIAS\0" - "GL_BLUE_BITS\0" - "GL_BLUE_INTEGER\0" - "GL_BLUE_INTEGER_EXT\0" - "GL_BLUE_SCALE\0" - "GL_BOOL\0" - "GL_BOOL_ARB\0" - "GL_BOOL_VEC2\0" - "GL_BOOL_VEC2_ARB\0" - "GL_BOOL_VEC3\0" - "GL_BOOL_VEC3_ARB\0" - "GL_BOOL_VEC4\0" - "GL_BOOL_VEC4_ARB\0" - "GL_BUFFER_ACCESS\0" - "GL_BUFFER_ACCESS_ARB\0" - "GL_BUFFER_ACCESS_FLAGS\0" - "GL_BUFFER_ACCESS_OES\0" - "GL_BUFFER_FLUSHING_UNMAP_APPLE\0" - "GL_BUFFER_MAPPED\0" - "GL_BUFFER_MAPPED_ARB\0" - "GL_BUFFER_MAPPED_OES\0" - "GL_BUFFER_MAP_LENGTH\0" - "GL_BUFFER_MAP_OFFSET\0" - "GL_BUFFER_MAP_POINTER\0" - "GL_BUFFER_MAP_POINTER_ARB\0" - "GL_BUFFER_MAP_POINTER_OES\0" - "GL_BUFFER_OBJECT_APPLE\0" - "GL_BUFFER_SERIALIZED_MODIFY_APPLE\0" - "GL_BUFFER_SIZE\0" - "GL_BUFFER_SIZE_ARB\0" - "GL_BUFFER_USAGE\0" - "GL_BUFFER_USAGE_ARB\0" - "GL_BUMP_ENVMAP_ATI\0" - "GL_BUMP_NUM_TEX_UNITS_ATI\0" - "GL_BUMP_ROT_MATRIX_ATI\0" - "GL_BUMP_ROT_MATRIX_SIZE_ATI\0" - "GL_BUMP_TARGET_ATI\0" - "GL_BUMP_TEX_UNITS_ATI\0" - "GL_BYTE\0" - "GL_C3F_V3F\0" - "GL_C4F_N3F_V3F\0" - "GL_C4UB_V2F\0" - "GL_C4UB_V3F\0" - "GL_CCW\0" - "GL_CLAMP\0" - "GL_CLAMP_FRAGMENT_COLOR_ARB\0" - "GL_CLAMP_READ_COLOR\0" - "GL_CLAMP_READ_COLOR_ARB\0" - "GL_CLAMP_TO_BORDER\0" - "GL_CLAMP_TO_BORDER_ARB\0" - "GL_CLAMP_TO_BORDER_SGIS\0" - "GL_CLAMP_TO_EDGE\0" - "GL_CLAMP_TO_EDGE_SGIS\0" - "GL_CLAMP_VERTEX_COLOR_ARB\0" - "GL_CLEAR\0" - "GL_CLIENT_ACTIVE_TEXTURE\0" - "GL_CLIENT_ACTIVE_TEXTURE_ARB\0" - "GL_CLIENT_ALL_ATTRIB_BITS\0" - "GL_CLIENT_ATTRIB_STACK_DEPTH\0" - "GL_CLIENT_PIXEL_STORE_BIT\0" - "GL_CLIENT_VERTEX_ARRAY_BIT\0" - "GL_CLIP_DISTANCE0\0" - "GL_CLIP_DISTANCE1\0" - "GL_CLIP_DISTANCE2\0" - "GL_CLIP_DISTANCE3\0" - "GL_CLIP_DISTANCE4\0" - "GL_CLIP_DISTANCE5\0" - "GL_CLIP_DISTANCE6\0" - "GL_CLIP_DISTANCE7\0" - "GL_CLIP_PLANE0\0" - "GL_CLIP_PLANE1\0" - "GL_CLIP_PLANE2\0" - "GL_CLIP_PLANE3\0" - "GL_CLIP_PLANE4\0" - "GL_CLIP_PLANE5\0" - "GL_CLIP_VOLUME_CLIPPING_HINT_EXT\0" - "GL_COEFF\0" - "GL_COLOR\0" - "GL_COLOR_ARRAY\0" - "GL_COLOR_ARRAY_BUFFER_BINDING\0" - "GL_COLOR_ARRAY_BUFFER_BINDING_ARB\0" - "GL_COLOR_ARRAY_POINTER\0" - "GL_COLOR_ARRAY_SIZE\0" - "GL_COLOR_ARRAY_STRIDE\0" - "GL_COLOR_ARRAY_TYPE\0" - "GL_COLOR_ATTACHMENT0\0" - "GL_COLOR_ATTACHMENT0_EXT\0" - "GL_COLOR_ATTACHMENT0_OES\0" - "GL_COLOR_ATTACHMENT1\0" - "GL_COLOR_ATTACHMENT10\0" - "GL_COLOR_ATTACHMENT10_EXT\0" - "GL_COLOR_ATTACHMENT11\0" - "GL_COLOR_ATTACHMENT11_EXT\0" - "GL_COLOR_ATTACHMENT12\0" - "GL_COLOR_ATTACHMENT12_EXT\0" - "GL_COLOR_ATTACHMENT13\0" - "GL_COLOR_ATTACHMENT13_EXT\0" - "GL_COLOR_ATTACHMENT14\0" - "GL_COLOR_ATTACHMENT14_EXT\0" - "GL_COLOR_ATTACHMENT15\0" - "GL_COLOR_ATTACHMENT15_EXT\0" - "GL_COLOR_ATTACHMENT1_EXT\0" - "GL_COLOR_ATTACHMENT2\0" - "GL_COLOR_ATTACHMENT2_EXT\0" - "GL_COLOR_ATTACHMENT3\0" - "GL_COLOR_ATTACHMENT3_EXT\0" - "GL_COLOR_ATTACHMENT4\0" - "GL_COLOR_ATTACHMENT4_EXT\0" - "GL_COLOR_ATTACHMENT5\0" - "GL_COLOR_ATTACHMENT5_EXT\0" - "GL_COLOR_ATTACHMENT6\0" - "GL_COLOR_ATTACHMENT6_EXT\0" - "GL_COLOR_ATTACHMENT7\0" - "GL_COLOR_ATTACHMENT7_EXT\0" - "GL_COLOR_ATTACHMENT8\0" - "GL_COLOR_ATTACHMENT8_EXT\0" - "GL_COLOR_ATTACHMENT9\0" - "GL_COLOR_ATTACHMENT9_EXT\0" - "GL_COLOR_BUFFER_BIT\0" - "GL_COLOR_CLEAR_VALUE\0" - "GL_COLOR_INDEX\0" - "GL_COLOR_INDEXES\0" - "GL_COLOR_LOGIC_OP\0" - "GL_COLOR_MATERIAL\0" - "GL_COLOR_MATERIAL_FACE\0" - "GL_COLOR_MATERIAL_PARAMETER\0" - "GL_COLOR_MATRIX\0" - "GL_COLOR_MATRIX_SGI\0" - "GL_COLOR_MATRIX_STACK_DEPTH\0" - "GL_COLOR_MATRIX_STACK_DEPTH_SGI\0" - "GL_COLOR_SUM\0" - "GL_COLOR_SUM_ARB\0" - "GL_COLOR_TABLE\0" - "GL_COLOR_TABLE_ALPHA_SIZE\0" - "GL_COLOR_TABLE_ALPHA_SIZE_EXT\0" - "GL_COLOR_TABLE_ALPHA_SIZE_SGI\0" - "GL_COLOR_TABLE_BIAS\0" - "GL_COLOR_TABLE_BIAS_SGI\0" - "GL_COLOR_TABLE_BLUE_SIZE\0" - "GL_COLOR_TABLE_BLUE_SIZE_EXT\0" - "GL_COLOR_TABLE_BLUE_SIZE_SGI\0" - "GL_COLOR_TABLE_FORMAT\0" - "GL_COLOR_TABLE_FORMAT_EXT\0" - "GL_COLOR_TABLE_FORMAT_SGI\0" - "GL_COLOR_TABLE_GREEN_SIZE\0" - "GL_COLOR_TABLE_GREEN_SIZE_EXT\0" - "GL_COLOR_TABLE_GREEN_SIZE_SGI\0" - "GL_COLOR_TABLE_INTENSITY_SIZE\0" - "GL_COLOR_TABLE_INTENSITY_SIZE_EXT\0" - "GL_COLOR_TABLE_INTENSITY_SIZE_SGI\0" - "GL_COLOR_TABLE_LUMINANCE_SIZE\0" - "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT\0" - "GL_COLOR_TABLE_LUMINANCE_SIZE_SGI\0" - "GL_COLOR_TABLE_RED_SIZE\0" - "GL_COLOR_TABLE_RED_SIZE_EXT\0" - "GL_COLOR_TABLE_RED_SIZE_SGI\0" - "GL_COLOR_TABLE_SCALE\0" - "GL_COLOR_TABLE_SCALE_SGI\0" - "GL_COLOR_TABLE_WIDTH\0" - "GL_COLOR_TABLE_WIDTH_EXT\0" - "GL_COLOR_TABLE_WIDTH_SGI\0" - "GL_COLOR_WRITEMASK\0" - "GL_COMBINE\0" - "GL_COMBINE4\0" - "GL_COMBINE_ALPHA\0" - "GL_COMBINE_ALPHA_ARB\0" - "GL_COMBINE_ALPHA_EXT\0" - "GL_COMBINE_ARB\0" - "GL_COMBINE_EXT\0" - "GL_COMBINE_RGB\0" - "GL_COMBINE_RGB_ARB\0" - "GL_COMBINE_RGB_EXT\0" - "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0" - "GL_COMPARE_REF_TO_TEXTURE\0" - "GL_COMPARE_R_TO_TEXTURE\0" - "GL_COMPARE_R_TO_TEXTURE_ARB\0" - "GL_COMPILE\0" - "GL_COMPILE_AND_EXECUTE\0" - "GL_COMPILE_STATUS\0" - "GL_COMPRESSED_ALPHA\0" - "GL_COMPRESSED_ALPHA_ARB\0" - "GL_COMPRESSED_INTENSITY\0" - "GL_COMPRESSED_INTENSITY_ARB\0" - "GL_COMPRESSED_LUMINANCE\0" - "GL_COMPRESSED_LUMINANCE_ALPHA\0" - "GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0" - "GL_COMPRESSED_LUMINANCE_ARB\0" - "GL_COMPRESSED_RED\0" - "GL_COMPRESSED_RG\0" - "GL_COMPRESSED_RGB\0" - "GL_COMPRESSED_RGBA\0" - "GL_COMPRESSED_RGBA_ARB\0" - "GL_COMPRESSED_RGBA_FXT1_3DFX\0" - "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\0" - "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\0" - "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\0" - "GL_COMPRESSED_RGB_ARB\0" - "GL_COMPRESSED_RGB_FXT1_3DFX\0" - "GL_COMPRESSED_RGB_S3TC_DXT1_EXT\0" - "GL_COMPRESSED_SLUMINANCE\0" - "GL_COMPRESSED_SLUMINANCE_ALPHA\0" - "GL_COMPRESSED_SRGB\0" - "GL_COMPRESSED_SRGB_ALPHA\0" - "GL_COMPRESSED_TEXTURE_FORMATS\0" - "GL_CONDITION_SATISFIED\0" - "GL_CONSTANT\0" - "GL_CONSTANT_ALPHA\0" - "GL_CONSTANT_ALPHA_EXT\0" - "GL_CONSTANT_ARB\0" - "GL_CONSTANT_ATTENUATION\0" - "GL_CONSTANT_BORDER_HP\0" - "GL_CONSTANT_COLOR\0" - "GL_CONSTANT_COLOR_EXT\0" - "GL_CONSTANT_EXT\0" - "GL_CONTEXT_COMPATIBILITY_PROFILE_BIT\0" - "GL_CONTEXT_CORE_PROFILE_BIT\0" - "GL_CONTEXT_FLAGS\0" - "GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT\0" - "GL_CONTEXT_PROFILE_MASK\0" - "GL_CONVOLUTION_1D\0" - "GL_CONVOLUTION_2D\0" - "GL_CONVOLUTION_BORDER_COLOR\0" - "GL_CONVOLUTION_BORDER_COLOR_HP\0" - "GL_CONVOLUTION_BORDER_MODE\0" - "GL_CONVOLUTION_BORDER_MODE_EXT\0" - "GL_CONVOLUTION_FILTER_BIAS\0" - "GL_CONVOLUTION_FILTER_BIAS_EXT\0" - "GL_CONVOLUTION_FILTER_SCALE\0" - "GL_CONVOLUTION_FILTER_SCALE_EXT\0" - "GL_CONVOLUTION_FORMAT\0" - "GL_CONVOLUTION_FORMAT_EXT\0" - "GL_CONVOLUTION_HEIGHT\0" - "GL_CONVOLUTION_HEIGHT_EXT\0" - "GL_CONVOLUTION_WIDTH\0" - "GL_CONVOLUTION_WIDTH_EXT\0" - "GL_COORD_REPLACE\0" - "GL_COORD_REPLACE_ARB\0" - "GL_COORD_REPLACE_NV\0" - "GL_COORD_REPLACE_OES\0" - "GL_COPY\0" - "GL_COPY_INVERTED\0" - "GL_COPY_PIXEL_TOKEN\0" - "GL_COPY_READ_BUFFER\0" - "GL_COPY_WRITE_BUFFER\0" - "GL_CULL_FACE\0" - "GL_CULL_FACE_MODE\0" - "GL_CULL_VERTEX_EXT\0" - "GL_CULL_VERTEX_EYE_POSITION_EXT\0" - "GL_CULL_VERTEX_OBJECT_POSITION_EXT\0" - "GL_CURRENT_ATTRIB_NV\0" - "GL_CURRENT_BIT\0" - "GL_CURRENT_COLOR\0" - "GL_CURRENT_FOG_COORD\0" - "GL_CURRENT_FOG_COORDINATE\0" - "GL_CURRENT_INDEX\0" - "GL_CURRENT_MATRIX_ARB\0" - "GL_CURRENT_MATRIX_INDEX_ARB\0" - "GL_CURRENT_MATRIX_NV\0" - "GL_CURRENT_MATRIX_STACK_DEPTH_ARB\0" - "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0" - "GL_CURRENT_NORMAL\0" - "GL_CURRENT_PALETTE_MATRIX_ARB\0" - "GL_CURRENT_PALETTE_MATRIX_OES\0" - "GL_CURRENT_PROGRAM\0" - "GL_CURRENT_QUERY\0" - "GL_CURRENT_QUERY_ARB\0" - "GL_CURRENT_RASTER_COLOR\0" - "GL_CURRENT_RASTER_DISTANCE\0" - "GL_CURRENT_RASTER_INDEX\0" - "GL_CURRENT_RASTER_POSITION\0" - "GL_CURRENT_RASTER_POSITION_VALID\0" - "GL_CURRENT_RASTER_SECONDARY_COLOR\0" - "GL_CURRENT_RASTER_TEXTURE_COORDS\0" - "GL_CURRENT_SECONDARY_COLOR\0" - "GL_CURRENT_TEXTURE_COORDS\0" - "GL_CURRENT_VERTEX_ATTRIB\0" - "GL_CURRENT_VERTEX_ATTRIB_ARB\0" - "GL_CURRENT_WEIGHT_ARB\0" - "GL_CW\0" - "GL_DEBUG_ASSERT_MESA\0" - "GL_DEBUG_OBJECT_MESA\0" - "GL_DEBUG_PRINT_MESA\0" - "GL_DECAL\0" - "GL_DECR\0" - "GL_DECR_WRAP\0" - "GL_DECR_WRAP_EXT\0" - "GL_DELETE_STATUS\0" - "GL_DEPTH\0" - "GL_DEPTH24_STENCIL8\0" - "GL_DEPTH24_STENCIL8_EXT\0" - "GL_DEPTH24_STENCIL8_OES\0" - "GL_DEPTH_ATTACHMENT\0" - "GL_DEPTH_ATTACHMENT_EXT\0" - "GL_DEPTH_ATTACHMENT_OES\0" - "GL_DEPTH_BIAS\0" - "GL_DEPTH_BITS\0" - "GL_DEPTH_BOUNDS_EXT\0" - "GL_DEPTH_BOUNDS_TEST_EXT\0" - "GL_DEPTH_BUFFER\0" - "GL_DEPTH_BUFFER_BIT\0" - "GL_DEPTH_CLAMP\0" - "GL_DEPTH_CLAMP_NV\0" - "GL_DEPTH_CLEAR_VALUE\0" - "GL_DEPTH_COMPONENT\0" - "GL_DEPTH_COMPONENT16\0" - "GL_DEPTH_COMPONENT16_ARB\0" - "GL_DEPTH_COMPONENT16_OES\0" - "GL_DEPTH_COMPONENT16_SGIX\0" - "GL_DEPTH_COMPONENT24\0" - "GL_DEPTH_COMPONENT24_ARB\0" - "GL_DEPTH_COMPONENT24_OES\0" - "GL_DEPTH_COMPONENT24_SGIX\0" - "GL_DEPTH_COMPONENT32\0" - "GL_DEPTH_COMPONENT32_ARB\0" - "GL_DEPTH_COMPONENT32_OES\0" - "GL_DEPTH_COMPONENT32_SGIX\0" - "GL_DEPTH_FUNC\0" - "GL_DEPTH_RANGE\0" - "GL_DEPTH_SCALE\0" - "GL_DEPTH_STENCIL\0" - "GL_DEPTH_STENCIL_ATTACHMENT\0" - "GL_DEPTH_STENCIL_EXT\0" - "GL_DEPTH_STENCIL_NV\0" - "GL_DEPTH_STENCIL_OES\0" - "GL_DEPTH_STENCIL_TO_BGRA_NV\0" - "GL_DEPTH_STENCIL_TO_RGBA_NV\0" - "GL_DEPTH_TEST\0" - "GL_DEPTH_TEXTURE_MODE\0" - "GL_DEPTH_TEXTURE_MODE_ARB\0" - "GL_DEPTH_WRITEMASK\0" - "GL_DIFFUSE\0" - "GL_DITHER\0" - "GL_DOMAIN\0" - "GL_DONT_CARE\0" - "GL_DOT3_RGB\0" - "GL_DOT3_RGBA\0" - "GL_DOT3_RGBA_ARB\0" - "GL_DOT3_RGBA_EXT\0" - "GL_DOT3_RGB_ARB\0" - "GL_DOT3_RGB_EXT\0" - "GL_DOUBLE\0" - "GL_DOUBLEBUFFER\0" - "GL_DRAW_BUFFER\0" - "GL_DRAW_BUFFER0\0" - "GL_DRAW_BUFFER0_ARB\0" - "GL_DRAW_BUFFER0_ATI\0" - "GL_DRAW_BUFFER1\0" - "GL_DRAW_BUFFER10\0" - "GL_DRAW_BUFFER10_ARB\0" - "GL_DRAW_BUFFER10_ATI\0" - "GL_DRAW_BUFFER11\0" - "GL_DRAW_BUFFER11_ARB\0" - "GL_DRAW_BUFFER11_ATI\0" - "GL_DRAW_BUFFER12\0" - "GL_DRAW_BUFFER12_ARB\0" - "GL_DRAW_BUFFER12_ATI\0" - "GL_DRAW_BUFFER13\0" - "GL_DRAW_BUFFER13_ARB\0" - "GL_DRAW_BUFFER13_ATI\0" - "GL_DRAW_BUFFER14\0" - "GL_DRAW_BUFFER14_ARB\0" - "GL_DRAW_BUFFER14_ATI\0" - "GL_DRAW_BUFFER15\0" - "GL_DRAW_BUFFER15_ARB\0" - "GL_DRAW_BUFFER15_ATI\0" - "GL_DRAW_BUFFER1_ARB\0" - "GL_DRAW_BUFFER1_ATI\0" - "GL_DRAW_BUFFER2\0" - "GL_DRAW_BUFFER2_ARB\0" - "GL_DRAW_BUFFER2_ATI\0" - "GL_DRAW_BUFFER3\0" - "GL_DRAW_BUFFER3_ARB\0" - "GL_DRAW_BUFFER3_ATI\0" - "GL_DRAW_BUFFER4\0" - "GL_DRAW_BUFFER4_ARB\0" - "GL_DRAW_BUFFER4_ATI\0" - "GL_DRAW_BUFFER5\0" - "GL_DRAW_BUFFER5_ARB\0" - "GL_DRAW_BUFFER5_ATI\0" - "GL_DRAW_BUFFER6\0" - "GL_DRAW_BUFFER6_ARB\0" - "GL_DRAW_BUFFER6_ATI\0" - "GL_DRAW_BUFFER7\0" - "GL_DRAW_BUFFER7_ARB\0" - "GL_DRAW_BUFFER7_ATI\0" - "GL_DRAW_BUFFER8\0" - "GL_DRAW_BUFFER8_ARB\0" - "GL_DRAW_BUFFER8_ATI\0" - "GL_DRAW_BUFFER9\0" - "GL_DRAW_BUFFER9_ARB\0" - "GL_DRAW_BUFFER9_ATI\0" - "GL_DRAW_FRAMEBUFFER\0" - "GL_DRAW_FRAMEBUFFER_BINDING\0" - "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0" - "GL_DRAW_FRAMEBUFFER_EXT\0" - "GL_DRAW_PIXEL_TOKEN\0" - "GL_DST_ALPHA\0" - "GL_DST_COLOR\0" - "GL_DU8DV8_ATI\0" - "GL_DUDV_ATI\0" - "GL_DYNAMIC_COPY\0" - "GL_DYNAMIC_COPY_ARB\0" - "GL_DYNAMIC_DRAW\0" - "GL_DYNAMIC_DRAW_ARB\0" - "GL_DYNAMIC_READ\0" - "GL_DYNAMIC_READ_ARB\0" - "GL_EDGE_FLAG\0" - "GL_EDGE_FLAG_ARRAY\0" - "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING\0" - "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB\0" - "GL_EDGE_FLAG_ARRAY_POINTER\0" - "GL_EDGE_FLAG_ARRAY_STRIDE\0" - "GL_ELEMENT_ARRAY_BUFFER\0" - "GL_ELEMENT_ARRAY_BUFFER_BINDING\0" - "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB\0" - "GL_EMISSION\0" - "GL_ENABLE_BIT\0" - "GL_EQUAL\0" - "GL_EQUIV\0" - "GL_EVAL_BIT\0" - "GL_EXP\0" - "GL_EXP2\0" - "GL_EXTENSIONS\0" - "GL_EYE_LINEAR\0" - "GL_EYE_PLANE\0" - "GL_EYE_PLANE_ABSOLUTE_NV\0" - "GL_EYE_RADIAL_NV\0" - "GL_FALSE\0" - "GL_FASTEST\0" - "GL_FEEDBACK\0" - "GL_FEEDBACK_BUFFER_POINTER\0" - "GL_FEEDBACK_BUFFER_SIZE\0" - "GL_FEEDBACK_BUFFER_TYPE\0" - "GL_FILL\0" - "GL_FIRST_VERTEX_CONVENTION\0" - "GL_FIRST_VERTEX_CONVENTION_EXT\0" - "GL_FIXED\0" - "GL_FIXED_OES\0" - "GL_FIXED_ONLY\0" - "GL_FIXED_ONLY_ARB\0" - "GL_FLAT\0" - "GL_FLOAT\0" - "GL_FLOAT_MAT2\0" - "GL_FLOAT_MAT2_ARB\0" - "GL_FLOAT_MAT2x3\0" - "GL_FLOAT_MAT2x4\0" - "GL_FLOAT_MAT3\0" - "GL_FLOAT_MAT3_ARB\0" - "GL_FLOAT_MAT3x2\0" - "GL_FLOAT_MAT3x4\0" - "GL_FLOAT_MAT4\0" - "GL_FLOAT_MAT4_ARB\0" - "GL_FLOAT_MAT4x2\0" - "GL_FLOAT_MAT4x3\0" - "GL_FLOAT_VEC2\0" - "GL_FLOAT_VEC2_ARB\0" - "GL_FLOAT_VEC3\0" - "GL_FLOAT_VEC3_ARB\0" - "GL_FLOAT_VEC4\0" - "GL_FLOAT_VEC4_ARB\0" - "GL_FOG\0" - "GL_FOG_BIT\0" - "GL_FOG_COLOR\0" - "GL_FOG_COORD\0" - "GL_FOG_COORDINATE\0" - "GL_FOG_COORDINATE_ARRAY\0" - "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING\0" - "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB\0" - "GL_FOG_COORDINATE_ARRAY_POINTER\0" - "GL_FOG_COORDINATE_ARRAY_STRIDE\0" - "GL_FOG_COORDINATE_ARRAY_TYPE\0" - "GL_FOG_COORDINATE_SOURCE\0" - "GL_FOG_COORD_ARRAY\0" - "GL_FOG_COORD_ARRAY_BUFFER_BINDING\0" - "GL_FOG_COORD_ARRAY_POINTER\0" - "GL_FOG_COORD_ARRAY_STRIDE\0" - "GL_FOG_COORD_ARRAY_TYPE\0" - "GL_FOG_COORD_SRC\0" - "GL_FOG_DENSITY\0" - "GL_FOG_DISTANCE_MODE_NV\0" - "GL_FOG_END\0" - "GL_FOG_HINT\0" - "GL_FOG_INDEX\0" - "GL_FOG_MODE\0" - "GL_FOG_OFFSET_SGIX\0" - "GL_FOG_OFFSET_VALUE_SGIX\0" - "GL_FOG_START\0" - "GL_FRAGMENT_DEPTH\0" - "GL_FRAGMENT_PROGRAM_ARB\0" - "GL_FRAGMENT_SHADER\0" - "GL_FRAGMENT_SHADER_ARB\0" - "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0" - "GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES\0" - "GL_FRAMEBUFFER\0" - "GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE\0" - "GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE\0" - "GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING\0" - "GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE\0" - "GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE\0" - "GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE\0" - "GL_FRAMEBUFFER_ATTACHMENT_LAYERED\0" - "GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB\0" - "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\0" - "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0" - "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES\0" - "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\0" - "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0" - "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES\0" - "GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE\0" - "GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE\0" - "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0" - "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES\0" - "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\0" - "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0" - "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES\0" - "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER\0" - "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0" - "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\0" - "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0" - "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES\0" - "GL_FRAMEBUFFER_BINDING\0" - "GL_FRAMEBUFFER_BINDING_EXT\0" - "GL_FRAMEBUFFER_BINDING_OES\0" - "GL_FRAMEBUFFER_COMPLETE\0" - "GL_FRAMEBUFFER_COMPLETE_EXT\0" - "GL_FRAMEBUFFER_COMPLETE_OES\0" - "GL_FRAMEBUFFER_DEFAULT\0" - "GL_FRAMEBUFFER_EXT\0" - "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT\0" - "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0" - "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES\0" - "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS\0" - "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0" - "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES\0" - "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER\0" - "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0" - "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES\0" - "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0" - "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0" - "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES\0" - "GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB\0" - "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS\0" - "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB\0" - "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\0" - "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0" - "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES\0" - "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE\0" - "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT\0" - "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER\0" - "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0" - "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES\0" - "GL_FRAMEBUFFER_OES\0" - "GL_FRAMEBUFFER_STATUS_ERROR_EXT\0" - "GL_FRAMEBUFFER_UNDEFINED\0" - "GL_FRAMEBUFFER_UNSUPPORTED\0" - "GL_FRAMEBUFFER_UNSUPPORTED_EXT\0" - "GL_FRAMEBUFFER_UNSUPPORTED_OES\0" - "GL_FRONT\0" - "GL_FRONT_AND_BACK\0" - "GL_FRONT_FACE\0" - "GL_FRONT_LEFT\0" - "GL_FRONT_RIGHT\0" - "GL_FUNC_ADD\0" - "GL_FUNC_ADD_EXT\0" - "GL_FUNC_ADD_OES\0" - "GL_FUNC_REVERSE_SUBTRACT\0" - "GL_FUNC_REVERSE_SUBTRACT_EXT\0" - "GL_FUNC_REVERSE_SUBTRACT_OES\0" - "GL_FUNC_SUBTRACT\0" - "GL_FUNC_SUBTRACT_EXT\0" - "GL_FUNC_SUBTRACT_OES\0" - "GL_GENERATE_MIPMAP\0" - "GL_GENERATE_MIPMAP_HINT\0" - "GL_GENERATE_MIPMAP_HINT_SGIS\0" - "GL_GENERATE_MIPMAP_SGIS\0" - "GL_GEOMETRY_INPUT_TYPE\0" - "GL_GEOMETRY_INPUT_TYPE_ARB\0" - "GL_GEOMETRY_OUTPUT_TYPE\0" - "GL_GEOMETRY_OUTPUT_TYPE_ARB\0" - "GL_GEOMETRY_SHADER\0" - "GL_GEOMETRY_SHADER_ARB\0" - "GL_GEOMETRY_VERTICES_OUT\0" - "GL_GEOMETRY_VERTICES_OUT_ARB\0" - "GL_GEQUAL\0" - "GL_GREATER\0" - "GL_GREEN\0" - "GL_GREEN_BIAS\0" - "GL_GREEN_BITS\0" - "GL_GREEN_INTEGER\0" - "GL_GREEN_INTEGER_EXT\0" - "GL_GREEN_SCALE\0" - "GL_HALF_FLOAT\0" - "GL_HALF_FLOAT_OES\0" - "GL_HIGH_FLOAT\0" - "GL_HIGH_INT\0" - "GL_HINT_BIT\0" - "GL_HISTOGRAM\0" - "GL_HISTOGRAM_ALPHA_SIZE\0" - "GL_HISTOGRAM_ALPHA_SIZE_EXT\0" - "GL_HISTOGRAM_BLUE_SIZE\0" - "GL_HISTOGRAM_BLUE_SIZE_EXT\0" - "GL_HISTOGRAM_EXT\0" - "GL_HISTOGRAM_FORMAT\0" - "GL_HISTOGRAM_FORMAT_EXT\0" - "GL_HISTOGRAM_GREEN_SIZE\0" - "GL_HISTOGRAM_GREEN_SIZE_EXT\0" - "GL_HISTOGRAM_LUMINANCE_SIZE\0" - "GL_HISTOGRAM_LUMINANCE_SIZE_EXT\0" - "GL_HISTOGRAM_RED_SIZE\0" - "GL_HISTOGRAM_RED_SIZE_EXT\0" - "GL_HISTOGRAM_SINK\0" - "GL_HISTOGRAM_SINK_EXT\0" - "GL_HISTOGRAM_WIDTH\0" - "GL_HISTOGRAM_WIDTH_EXT\0" - "GL_IDENTITY_NV\0" - "GL_IGNORE_BORDER_HP\0" - "GL_IMPLEMENTATION_COLOR_READ_FORMAT\0" - "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0" - "GL_IMPLEMENTATION_COLOR_READ_TYPE\0" - "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0" - "GL_INCR\0" - "GL_INCR_WRAP\0" - "GL_INCR_WRAP_EXT\0" - "GL_INDEX\0" - "GL_INDEX_ARRAY\0" - "GL_INDEX_ARRAY_BUFFER_BINDING\0" - "GL_INDEX_ARRAY_BUFFER_BINDING_ARB\0" - "GL_INDEX_ARRAY_POINTER\0" - "GL_INDEX_ARRAY_STRIDE\0" - "GL_INDEX_ARRAY_TYPE\0" - "GL_INDEX_BITS\0" - "GL_INDEX_CLEAR_VALUE\0" - "GL_INDEX_LOGIC_OP\0" - "GL_INDEX_MODE\0" - "GL_INDEX_OFFSET\0" - "GL_INDEX_SHIFT\0" - "GL_INDEX_WRITEMASK\0" - "GL_INFO_LOG_LENGTH\0" - "GL_INT\0" - "GL_INTENSITY\0" - "GL_INTENSITY12\0" - "GL_INTENSITY12_EXT\0" - "GL_INTENSITY16\0" - "GL_INTENSITY16I_EXT\0" - "GL_INTENSITY16UI_EXT\0" - "GL_INTENSITY16_EXT\0" - "GL_INTENSITY32I_EXT\0" - "GL_INTENSITY32UI_EXT\0" - "GL_INTENSITY4\0" - "GL_INTENSITY4_EXT\0" - "GL_INTENSITY8\0" - "GL_INTENSITY8I_EXT\0" - "GL_INTENSITY8UI_EXT\0" - "GL_INTENSITY8_EXT\0" - "GL_INTENSITY_EXT\0" - "GL_INTERLEAVED_ATTRIBS\0" - "GL_INTERLEAVED_ATTRIBS_EXT\0" - "GL_INTERPOLATE\0" - "GL_INTERPOLATE_ARB\0" - "GL_INTERPOLATE_EXT\0" - "GL_INT_10_10_10_2_OES\0" - "GL_INT_SAMPLER_1D\0" - "GL_INT_SAMPLER_1D_ARRAY\0" - "GL_INT_SAMPLER_1D_ARRAY_EXT\0" - "GL_INT_SAMPLER_1D_EXT\0" - "GL_INT_SAMPLER_2D\0" - "GL_INT_SAMPLER_2D_ARRAY\0" - "GL_INT_SAMPLER_2D_ARRAY_EXT\0" - "GL_INT_SAMPLER_2D_EXT\0" - "GL_INT_SAMPLER_2D_RECT\0" - "GL_INT_SAMPLER_2D_RECT_EXT\0" - "GL_INT_SAMPLER_3D\0" - "GL_INT_SAMPLER_3D_EXT\0" - "GL_INT_SAMPLER_BUFFER\0" - "GL_INT_SAMPLER_BUFFER_EXT\0" - "GL_INT_SAMPLER_CUBE\0" - "GL_INT_SAMPLER_CUBE_EXT\0" - "GL_INT_VEC2\0" - "GL_INT_VEC2_ARB\0" - "GL_INT_VEC3\0" - "GL_INT_VEC3_ARB\0" - "GL_INT_VEC4\0" - "GL_INT_VEC4_ARB\0" - "GL_INVALID_ENUM\0" - "GL_INVALID_FRAMEBUFFER_OPERATION\0" - "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0" - "GL_INVALID_FRAMEBUFFER_OPERATION_OES\0" - "GL_INVALID_OPERATION\0" - "GL_INVALID_VALUE\0" - "GL_INVERSE_NV\0" - "GL_INVERSE_TRANSPOSE_NV\0" - "GL_INVERT\0" - "GL_KEEP\0" - "GL_LAST_VERTEX_CONVENTION\0" - "GL_LAST_VERTEX_CONVENTION_EXT\0" - "GL_LEFT\0" - "GL_LEQUAL\0" - "GL_LESS\0" - "GL_LIGHT0\0" - "GL_LIGHT1\0" - "GL_LIGHT2\0" - "GL_LIGHT3\0" - "GL_LIGHT4\0" - "GL_LIGHT5\0" - "GL_LIGHT6\0" - "GL_LIGHT7\0" - "GL_LIGHTING\0" - "GL_LIGHTING_BIT\0" - "GL_LIGHT_MODEL_AMBIENT\0" - "GL_LIGHT_MODEL_COLOR_CONTROL\0" - "GL_LIGHT_MODEL_COLOR_CONTROL_EXT\0" - "GL_LIGHT_MODEL_LOCAL_VIEWER\0" - "GL_LIGHT_MODEL_TWO_SIDE\0" - "GL_LINE\0" - "GL_LINEAR\0" - "GL_LINEAR_ATTENUATION\0" - "GL_LINEAR_CLIPMAP_LINEAR_SGIX\0" - "GL_LINEAR_CLIPMAP_NEAREST_SGIX\0" - "GL_LINEAR_MIPMAP_LINEAR\0" - "GL_LINEAR_MIPMAP_NEAREST\0" - "GL_LINES\0" - "GL_LINES_ADJACENCY\0" - "GL_LINES_ADJACENCY_ARB\0" - "GL_LINE_BIT\0" - "GL_LINE_LOOP\0" - "GL_LINE_RESET_TOKEN\0" - "GL_LINE_SMOOTH\0" - "GL_LINE_SMOOTH_HINT\0" - "GL_LINE_STIPPLE\0" - "GL_LINE_STIPPLE_PATTERN\0" - "GL_LINE_STIPPLE_REPEAT\0" - "GL_LINE_STRIP\0" - "GL_LINE_STRIP_ADJACENCY\0" - "GL_LINE_STRIP_ADJACENCY_ARB\0" - "GL_LINE_TOKEN\0" - "GL_LINE_WIDTH\0" - "GL_LINE_WIDTH_GRANULARITY\0" - "GL_LINE_WIDTH_RANGE\0" - "GL_LINK_STATUS\0" - "GL_LIST_BASE\0" - "GL_LIST_BIT\0" - "GL_LIST_INDEX\0" - "GL_LIST_MODE\0" - "GL_LOAD\0" - "GL_LOGIC_OP\0" - "GL_LOGIC_OP_MODE\0" - "GL_LOWER_LEFT\0" - "GL_LOW_FLOAT\0" - "GL_LOW_INT\0" - "GL_LUMINANCE\0" - "GL_LUMINANCE12\0" - "GL_LUMINANCE12_ALPHA12\0" - "GL_LUMINANCE12_ALPHA12_EXT\0" - "GL_LUMINANCE12_ALPHA4\0" - "GL_LUMINANCE12_ALPHA4_EXT\0" - "GL_LUMINANCE12_EXT\0" - "GL_LUMINANCE16\0" - "GL_LUMINANCE16I_EXT\0" - "GL_LUMINANCE16UI_EXT\0" - "GL_LUMINANCE16_ALPHA16\0" - "GL_LUMINANCE16_ALPHA16_EXT\0" - "GL_LUMINANCE16_EXT\0" - "GL_LUMINANCE32I_EXT\0" - "GL_LUMINANCE32UI_EXT\0" - "GL_LUMINANCE4\0" - "GL_LUMINANCE4_ALPHA4\0" - "GL_LUMINANCE4_ALPHA4_EXT\0" - "GL_LUMINANCE4_EXT\0" - "GL_LUMINANCE6_ALPHA2\0" - "GL_LUMINANCE6_ALPHA2_EXT\0" - "GL_LUMINANCE8\0" - "GL_LUMINANCE8I_EXT\0" - "GL_LUMINANCE8UI_EXT\0" - "GL_LUMINANCE8_ALPHA8\0" - "GL_LUMINANCE8_ALPHA8_EXT\0" - "GL_LUMINANCE8_EXT\0" - "GL_LUMINANCE_ALPHA\0" - "GL_LUMINANCE_ALPHA16I_EXT\0" - "GL_LUMINANCE_ALPHA16UI_EXT\0" - "GL_LUMINANCE_ALPHA32I_EXT\0" - "GL_LUMINANCE_ALPHA32UI_EXT\0" - "GL_LUMINANCE_ALPHA8I_EXT\0" - "GL_LUMINANCE_ALPHA8UI_EXT\0" - "GL_LUMINANCE_ALPHA_INTEGER_EXT\0" - "GL_LUMINANCE_INTEGER_EXT\0" - "GL_MAJOR_VERSION\0" - "GL_MAP1_COLOR_4\0" - "GL_MAP1_GRID_DOMAIN\0" - "GL_MAP1_GRID_SEGMENTS\0" - "GL_MAP1_INDEX\0" - "GL_MAP1_NORMAL\0" - "GL_MAP1_TEXTURE_COORD_1\0" - "GL_MAP1_TEXTURE_COORD_2\0" - "GL_MAP1_TEXTURE_COORD_3\0" - "GL_MAP1_TEXTURE_COORD_4\0" - "GL_MAP1_VERTEX_3\0" - "GL_MAP1_VERTEX_4\0" - "GL_MAP1_VERTEX_ATTRIB0_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB10_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB11_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB12_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB13_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB14_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB15_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB1_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB2_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB3_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB4_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB5_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB6_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB7_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB8_4_NV\0" - "GL_MAP1_VERTEX_ATTRIB9_4_NV\0" - "GL_MAP2_COLOR_4\0" - "GL_MAP2_GRID_DOMAIN\0" - "GL_MAP2_GRID_SEGMENTS\0" - "GL_MAP2_INDEX\0" - "GL_MAP2_NORMAL\0" - "GL_MAP2_TEXTURE_COORD_1\0" - "GL_MAP2_TEXTURE_COORD_2\0" - "GL_MAP2_TEXTURE_COORD_3\0" - "GL_MAP2_TEXTURE_COORD_4\0" - "GL_MAP2_VERTEX_3\0" - "GL_MAP2_VERTEX_4\0" - "GL_MAP2_VERTEX_ATTRIB0_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB10_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB11_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB12_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB13_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB14_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB15_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB1_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB2_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB3_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB4_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB5_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB6_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB7_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB8_4_NV\0" - "GL_MAP2_VERTEX_ATTRIB9_4_NV\0" - "GL_MAP_COLOR\0" - "GL_MAP_FLUSH_EXPLICIT_BIT\0" - "GL_MAP_INVALIDATE_BUFFER_BIT\0" - "GL_MAP_INVALIDATE_RANGE_BIT\0" - "GL_MAP_READ_BIT\0" - "GL_MAP_STENCIL\0" - "GL_MAP_UNSYNCHRONIZED_BIT\0" - "GL_MAP_WRITE_BIT\0" - "GL_MATRIX0_ARB\0" - "GL_MATRIX0_NV\0" - "GL_MATRIX10_ARB\0" - "GL_MATRIX11_ARB\0" - "GL_MATRIX12_ARB\0" - "GL_MATRIX13_ARB\0" - "GL_MATRIX14_ARB\0" - "GL_MATRIX15_ARB\0" - "GL_MATRIX16_ARB\0" - "GL_MATRIX17_ARB\0" - "GL_MATRIX18_ARB\0" - "GL_MATRIX19_ARB\0" - "GL_MATRIX1_ARB\0" - "GL_MATRIX1_NV\0" - "GL_MATRIX20_ARB\0" - "GL_MATRIX21_ARB\0" - "GL_MATRIX22_ARB\0" - "GL_MATRIX23_ARB\0" - "GL_MATRIX24_ARB\0" - "GL_MATRIX25_ARB\0" - "GL_MATRIX26_ARB\0" - "GL_MATRIX27_ARB\0" - "GL_MATRIX28_ARB\0" - "GL_MATRIX29_ARB\0" - "GL_MATRIX2_ARB\0" - "GL_MATRIX2_NV\0" - "GL_MATRIX30_ARB\0" - "GL_MATRIX31_ARB\0" - "GL_MATRIX3_ARB\0" - "GL_MATRIX3_NV\0" - "GL_MATRIX4_ARB\0" - "GL_MATRIX4_NV\0" - "GL_MATRIX5_ARB\0" - "GL_MATRIX5_NV\0" - "GL_MATRIX6_ARB\0" - "GL_MATRIX6_NV\0" - "GL_MATRIX7_ARB\0" - "GL_MATRIX7_NV\0" - "GL_MATRIX8_ARB\0" - "GL_MATRIX9_ARB\0" - "GL_MATRIX_INDEX_ARRAY_ARB\0" - "GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES\0" - "GL_MATRIX_INDEX_ARRAY_OES\0" - "GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0" - "GL_MATRIX_INDEX_ARRAY_POINTER_OES\0" - "GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0" - "GL_MATRIX_INDEX_ARRAY_SIZE_OES\0" - "GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0" - "GL_MATRIX_INDEX_ARRAY_STRIDE_OES\0" - "GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0" - "GL_MATRIX_INDEX_ARRAY_TYPE_OES\0" - "GL_MATRIX_MODE\0" - "GL_MATRIX_PALETTE_ARB\0" - "GL_MATRIX_PALETTE_OES\0" - "GL_MAX\0" - "GL_MAX_3D_TEXTURE_SIZE\0" - "GL_MAX_3D_TEXTURE_SIZE_OES\0" - "GL_MAX_ARRAY_TEXTURE_LAYERS\0" - "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0" - "GL_MAX_ATTRIB_STACK_DEPTH\0" - "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0" - "GL_MAX_CLIPMAP_DEPTH_SGIX\0" - "GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0" - "GL_MAX_CLIP_DISTANCES\0" - "GL_MAX_CLIP_PLANES\0" - "GL_MAX_COLOR_ATTACHMENTS\0" - "GL_MAX_COLOR_ATTACHMENTS_EXT\0" - "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0" - "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0" - "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0" - "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0" - "GL_MAX_CONVOLUTION_HEIGHT\0" - "GL_MAX_CONVOLUTION_HEIGHT_EXT\0" - "GL_MAX_CONVOLUTION_WIDTH\0" - "GL_MAX_CONVOLUTION_WIDTH_EXT\0" - "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0" - "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0" - "GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES\0" - "GL_MAX_DRAW_BUFFERS\0" - "GL_MAX_DRAW_BUFFERS_ARB\0" - "GL_MAX_DRAW_BUFFERS_ATI\0" - "GL_MAX_ELEMENTS_INDICES\0" - "GL_MAX_ELEMENTS_VERTICES\0" - "GL_MAX_EVAL_ORDER\0" - "GL_MAX_EXT\0" - "GL_MAX_FRAGMENT_INPUT_COMPONENTS\0" - "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0" - "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0" - "GL_MAX_FRAGMENT_UNIFORM_VECTORS\0" - "GL_MAX_GEOMETRY_INPUT_COMPONENTS\0" - "GL_MAX_GEOMETRY_OUTPUT_COMPONENTS\0" - "GL_MAX_GEOMETRY_OUTPUT_VERTICES\0" - "GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB\0" - "GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS\0" - "GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB\0" - "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS\0" - "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB\0" - "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS\0" - "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB\0" - "GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB\0" - "GL_MAX_LIGHTS\0" - "GL_MAX_LIST_NESTING\0" - "GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0" - "GL_MAX_MODELVIEW_STACK_DEPTH\0" - "GL_MAX_NAME_STACK_DEPTH\0" - "GL_MAX_PALETTE_MATRICES_ARB\0" - "GL_MAX_PALETTE_MATRICES_OES\0" - "GL_MAX_PIXEL_MAP_TABLE\0" - "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0" - "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0" - "GL_MAX_PROGRAM_ATTRIBS_ARB\0" - "GL_MAX_PROGRAM_CALL_DEPTH_NV\0" - "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB\0" - "GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV\0" - "GL_MAX_PROGRAM_IF_DEPTH_NV\0" - "GL_MAX_PROGRAM_INSTRUCTIONS_ARB\0" - "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB\0" - "GL_MAX_PROGRAM_LOOP_COUNT_NV\0" - "GL_MAX_PROGRAM_LOOP_DEPTH_NV\0" - "GL_MAX_PROGRAM_MATRICES_ARB\0" - "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB\0" - "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0" - "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0" - "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB\0" - "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0" - "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB\0" - "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB\0" - "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0" - "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0" - "GL_MAX_PROGRAM_PARAMETERS_ARB\0" - "GL_MAX_PROGRAM_TEMPORARIES_ARB\0" - "GL_MAX_PROGRAM_TEXEL_OFFSET\0" - "GL_MAX_PROGRAM_TEXEL_OFFSET_EXT\0" - "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0" - "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0" - "GL_MAX_PROJECTION_STACK_DEPTH\0" - "GL_MAX_RECTANGLE_TEXTURE_SIZE\0" - "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0" - "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0" - "GL_MAX_RENDERBUFFER_SIZE\0" - "GL_MAX_RENDERBUFFER_SIZE_EXT\0" - "GL_MAX_RENDERBUFFER_SIZE_OES\0" - "GL_MAX_SAMPLES\0" - "GL_MAX_SAMPLES_EXT\0" - "GL_MAX_SERVER_WAIT_TIMEOUT\0" - "GL_MAX_SHININESS_NV\0" - "GL_MAX_SPOT_EXPONENT_NV\0" - "GL_MAX_TEXTURE_BUFFER_SIZE\0" - "GL_MAX_TEXTURE_COORDS\0" - "GL_MAX_TEXTURE_COORDS_ARB\0" - "GL_MAX_TEXTURE_IMAGE_UNITS\0" - "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0" - "GL_MAX_TEXTURE_LOD_BIAS\0" - "GL_MAX_TEXTURE_LOD_BIAS_EXT\0" - "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0" - "GL_MAX_TEXTURE_SIZE\0" - "GL_MAX_TEXTURE_STACK_DEPTH\0" - "GL_MAX_TEXTURE_UNITS\0" - "GL_MAX_TEXTURE_UNITS_ARB\0" - "GL_MAX_TRACK_MATRICES_NV\0" - "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0" - "GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS\0" - "GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT\0" - "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS\0" - "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT\0" - "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS\0" - "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT\0" - "GL_MAX_VARYING_COMPONENTS\0" - "GL_MAX_VARYING_FLOATS\0" - "GL_MAX_VARYING_FLOATS_ARB\0" - "GL_MAX_VARYING_VECTORS\0" - "GL_MAX_VERTEX_ATTRIBS\0" - "GL_MAX_VERTEX_ATTRIBS_ARB\0" - "GL_MAX_VERTEX_OUTPUT_COMPONENTS\0" - "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0" - "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0" - "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0" - "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0" - "GL_MAX_VERTEX_UNIFORM_VECTORS\0" - "GL_MAX_VERTEX_UNITS_ARB\0" - "GL_MAX_VERTEX_UNITS_OES\0" - "GL_MAX_VERTEX_VARYING_COMPONENTS_ARB\0" - "GL_MAX_VIEWPORT_DIMS\0" - "GL_MEDIUM_FLOAT\0" - "GL_MEDIUM_INT\0" - "GL_MIN\0" - "GL_MINMAX\0" - "GL_MINMAX_EXT\0" - "GL_MINMAX_FORMAT\0" - "GL_MINMAX_FORMAT_EXT\0" - "GL_MINMAX_SINK\0" - "GL_MINMAX_SINK_EXT\0" - "GL_MINOR_VERSION\0" - "GL_MIN_EXT\0" - "GL_MIN_PROGRAM_TEXEL_OFFSET\0" - "GL_MIN_PROGRAM_TEXEL_OFFSET_EXT\0" - "GL_MIRRORED_REPEAT\0" - "GL_MIRRORED_REPEAT_ARB\0" - "GL_MIRRORED_REPEAT_IBM\0" - "GL_MIRROR_CLAMP_ATI\0" - "GL_MIRROR_CLAMP_EXT\0" - "GL_MIRROR_CLAMP_TO_BORDER_EXT\0" - "GL_MIRROR_CLAMP_TO_EDGE_ATI\0" - "GL_MIRROR_CLAMP_TO_EDGE_EXT\0" - "GL_MODELVIEW\0" - "GL_MODELVIEW0_ARB\0" - "GL_MODELVIEW10_ARB\0" - "GL_MODELVIEW11_ARB\0" - "GL_MODELVIEW12_ARB\0" - "GL_MODELVIEW13_ARB\0" - "GL_MODELVIEW14_ARB\0" - "GL_MODELVIEW15_ARB\0" - "GL_MODELVIEW16_ARB\0" - "GL_MODELVIEW17_ARB\0" - "GL_MODELVIEW18_ARB\0" - "GL_MODELVIEW19_ARB\0" - "GL_MODELVIEW1_ARB\0" - "GL_MODELVIEW20_ARB\0" - "GL_MODELVIEW21_ARB\0" - "GL_MODELVIEW22_ARB\0" - "GL_MODELVIEW23_ARB\0" - "GL_MODELVIEW24_ARB\0" - "GL_MODELVIEW25_ARB\0" - "GL_MODELVIEW26_ARB\0" - "GL_MODELVIEW27_ARB\0" - "GL_MODELVIEW28_ARB\0" - "GL_MODELVIEW29_ARB\0" - "GL_MODELVIEW2_ARB\0" - "GL_MODELVIEW30_ARB\0" - "GL_MODELVIEW31_ARB\0" - "GL_MODELVIEW3_ARB\0" - "GL_MODELVIEW4_ARB\0" - "GL_MODELVIEW5_ARB\0" - "GL_MODELVIEW6_ARB\0" - "GL_MODELVIEW7_ARB\0" - "GL_MODELVIEW8_ARB\0" - "GL_MODELVIEW9_ARB\0" - "GL_MODELVIEW_MATRIX\0" - "GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES\0" - "GL_MODELVIEW_PROJECTION_NV\0" - "GL_MODELVIEW_STACK_DEPTH\0" - "GL_MODULATE\0" - "GL_MODULATE_ADD_ATI\0" - "GL_MODULATE_SIGNED_ADD_ATI\0" - "GL_MODULATE_SUBTRACT_ATI\0" - "GL_MULT\0" - "GL_MULTISAMPLE\0" - "GL_MULTISAMPLE_3DFX\0" - "GL_MULTISAMPLE_ARB\0" - "GL_MULTISAMPLE_BIT\0" - "GL_MULTISAMPLE_BIT_3DFX\0" - "GL_MULTISAMPLE_BIT_ARB\0" - "GL_MULTISAMPLE_FILTER_HINT_NV\0" - "GL_N3F_V3F\0" - "GL_NAME_STACK_DEPTH\0" - "GL_NAND\0" - "GL_NEAREST\0" - "GL_NEAREST_CLIPMAP_LINEAR_SGIX\0" - "GL_NEAREST_CLIPMAP_NEAREST_SGIX\0" - "GL_NEAREST_MIPMAP_LINEAR\0" - "GL_NEAREST_MIPMAP_NEAREST\0" - "GL_NEVER\0" - "GL_NICEST\0" - "GL_NONE\0" - "GL_NONE_OES\0" - "GL_NOOP\0" - "GL_NOR\0" - "GL_NORMALIZE\0" - "GL_NORMAL_ARRAY\0" - "GL_NORMAL_ARRAY_BUFFER_BINDING\0" - "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB\0" - "GL_NORMAL_ARRAY_POINTER\0" - "GL_NORMAL_ARRAY_STRIDE\0" - "GL_NORMAL_ARRAY_TYPE\0" - "GL_NORMAL_MAP\0" - "GL_NORMAL_MAP_ARB\0" - "GL_NORMAL_MAP_NV\0" - "GL_NORMAL_MAP_OES\0" - "GL_NOTEQUAL\0" - "GL_NO_ERROR\0" - "GL_NUM_COMPRESSED_TEXTURE_FORMATS\0" - "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0" - "GL_NUM_EXTENSIONS\0" - "GL_NUM_PROGRAM_BINARY_FORMATS_OES\0" - "GL_NUM_SHADER_BINARY_FORMATS\0" - "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0" - "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0" - "GL_OBJECT_ACTIVE_UNIFORMS_ARB\0" - "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB\0" - "GL_OBJECT_ATTACHED_OBJECTS_ARB\0" - "GL_OBJECT_COMPILE_STATUS_ARB\0" - "GL_OBJECT_DELETE_STATUS_ARB\0" - "GL_OBJECT_INFO_LOG_LENGTH_ARB\0" - "GL_OBJECT_LINEAR\0" - "GL_OBJECT_LINK_STATUS_ARB\0" - "GL_OBJECT_PLANE\0" - "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB\0" - "GL_OBJECT_SUBTYPE_ARB\0" - "GL_OBJECT_TYPE\0" - "GL_OBJECT_TYPE_ARB\0" - "GL_OBJECT_VALIDATE_STATUS_ARB\0" - "GL_OCCLUSION_TEST_HP\0" - "GL_OCCLUSION_TEST_RESULT_HP\0" - "GL_ONE\0" - "GL_ONE_MINUS_CONSTANT_ALPHA\0" - "GL_ONE_MINUS_CONSTANT_ALPHA_EXT\0" - "GL_ONE_MINUS_CONSTANT_COLOR\0" - "GL_ONE_MINUS_CONSTANT_COLOR_EXT\0" - "GL_ONE_MINUS_DST_ALPHA\0" - "GL_ONE_MINUS_DST_COLOR\0" - "GL_ONE_MINUS_SRC_ALPHA\0" - "GL_ONE_MINUS_SRC_COLOR\0" - "GL_OPERAND0_ALPHA\0" - "GL_OPERAND0_ALPHA_ARB\0" - "GL_OPERAND0_ALPHA_EXT\0" - "GL_OPERAND0_RGB\0" - "GL_OPERAND0_RGB_ARB\0" - "GL_OPERAND0_RGB_EXT\0" - "GL_OPERAND1_ALPHA\0" - "GL_OPERAND1_ALPHA_ARB\0" - "GL_OPERAND1_ALPHA_EXT\0" - "GL_OPERAND1_RGB\0" - "GL_OPERAND1_RGB_ARB\0" - "GL_OPERAND1_RGB_EXT\0" - "GL_OPERAND2_ALPHA\0" - "GL_OPERAND2_ALPHA_ARB\0" - "GL_OPERAND2_ALPHA_EXT\0" - "GL_OPERAND2_RGB\0" - "GL_OPERAND2_RGB_ARB\0" - "GL_OPERAND2_RGB_EXT\0" - "GL_OPERAND3_ALPHA_NV\0" - "GL_OPERAND3_RGB_NV\0" - "GL_OR\0" - "GL_ORDER\0" - "GL_OR_INVERTED\0" - "GL_OR_REVERSE\0" - "GL_OUT_OF_MEMORY\0" - "GL_PACK_ALIGNMENT\0" - "GL_PACK_IMAGE_HEIGHT\0" - "GL_PACK_INVERT_MESA\0" - "GL_PACK_LSB_FIRST\0" - "GL_PACK_ROW_LENGTH\0" - "GL_PACK_SKIP_IMAGES\0" - "GL_PACK_SKIP_PIXELS\0" - "GL_PACK_SKIP_ROWS\0" - "GL_PACK_SWAP_BYTES\0" - "GL_PALETTE4_R5_G6_B5_OES\0" - "GL_PALETTE4_RGB5_A1_OES\0" - "GL_PALETTE4_RGB8_OES\0" - "GL_PALETTE4_RGBA4_OES\0" - "GL_PALETTE4_RGBA8_OES\0" - "GL_PALETTE8_R5_G6_B5_OES\0" - "GL_PALETTE8_RGB5_A1_OES\0" - "GL_PALETTE8_RGB8_OES\0" - "GL_PALETTE8_RGBA4_OES\0" - "GL_PALETTE8_RGBA8_OES\0" - "GL_PASS_THROUGH_TOKEN\0" - "GL_PERSPECTIVE_CORRECTION_HINT\0" - "GL_PIXEL_MAP_A_TO_A\0" - "GL_PIXEL_MAP_A_TO_A_SIZE\0" - "GL_PIXEL_MAP_B_TO_B\0" - "GL_PIXEL_MAP_B_TO_B_SIZE\0" - "GL_PIXEL_MAP_G_TO_G\0" - "GL_PIXEL_MAP_G_TO_G_SIZE\0" - "GL_PIXEL_MAP_I_TO_A\0" - "GL_PIXEL_MAP_I_TO_A_SIZE\0" - "GL_PIXEL_MAP_I_TO_B\0" - "GL_PIXEL_MAP_I_TO_B_SIZE\0" - "GL_PIXEL_MAP_I_TO_G\0" - "GL_PIXEL_MAP_I_TO_G_SIZE\0" - "GL_PIXEL_MAP_I_TO_I\0" - "GL_PIXEL_MAP_I_TO_I_SIZE\0" - "GL_PIXEL_MAP_I_TO_R\0" - "GL_PIXEL_MAP_I_TO_R_SIZE\0" - "GL_PIXEL_MAP_R_TO_R\0" - "GL_PIXEL_MAP_R_TO_R_SIZE\0" - "GL_PIXEL_MAP_S_TO_S\0" - "GL_PIXEL_MAP_S_TO_S_SIZE\0" - "GL_PIXEL_MODE_BIT\0" - "GL_PIXEL_PACK_BUFFER\0" - "GL_PIXEL_PACK_BUFFER_BINDING\0" - "GL_PIXEL_PACK_BUFFER_BINDING_EXT\0" - "GL_PIXEL_PACK_BUFFER_EXT\0" - "GL_PIXEL_UNPACK_BUFFER\0" - "GL_PIXEL_UNPACK_BUFFER_BINDING\0" - "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT\0" - "GL_PIXEL_UNPACK_BUFFER_EXT\0" - "GL_POINT\0" - "GL_POINTS\0" - "GL_POINT_BIT\0" - "GL_POINT_DISTANCE_ATTENUATION\0" - "GL_POINT_DISTANCE_ATTENUATION_ARB\0" - "GL_POINT_DISTANCE_ATTENUATION_EXT\0" - "GL_POINT_DISTANCE_ATTENUATION_SGIS\0" - "GL_POINT_FADE_THRESHOLD_SIZE\0" - "GL_POINT_FADE_THRESHOLD_SIZE_ARB\0" - "GL_POINT_FADE_THRESHOLD_SIZE_EXT\0" - "GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0" - "GL_POINT_SIZE\0" - "GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES\0" - "GL_POINT_SIZE_ARRAY_OES\0" - "GL_POINT_SIZE_ARRAY_POINTER_OES\0" - "GL_POINT_SIZE_ARRAY_STRIDE_OES\0" - "GL_POINT_SIZE_ARRAY_TYPE_OES\0" - "GL_POINT_SIZE_GRANULARITY\0" - "GL_POINT_SIZE_MAX\0" - "GL_POINT_SIZE_MAX_ARB\0" - "GL_POINT_SIZE_MAX_EXT\0" - "GL_POINT_SIZE_MAX_SGIS\0" - "GL_POINT_SIZE_MIN\0" - "GL_POINT_SIZE_MIN_ARB\0" - "GL_POINT_SIZE_MIN_EXT\0" - "GL_POINT_SIZE_MIN_SGIS\0" - "GL_POINT_SIZE_RANGE\0" - "GL_POINT_SMOOTH\0" - "GL_POINT_SMOOTH_HINT\0" - "GL_POINT_SPRITE\0" - "GL_POINT_SPRITE_ARB\0" - "GL_POINT_SPRITE_COORD_ORIGIN\0" - "GL_POINT_SPRITE_NV\0" - "GL_POINT_SPRITE_OES\0" - "GL_POINT_SPRITE_R_MODE_NV\0" - "GL_POINT_TOKEN\0" - "GL_POLYGON\0" - "GL_POLYGON_BIT\0" - "GL_POLYGON_MODE\0" - "GL_POLYGON_OFFSET_BIAS\0" - "GL_POLYGON_OFFSET_FACTOR\0" - "GL_POLYGON_OFFSET_FILL\0" - "GL_POLYGON_OFFSET_LINE\0" - "GL_POLYGON_OFFSET_POINT\0" - "GL_POLYGON_OFFSET_UNITS\0" - "GL_POLYGON_SMOOTH\0" - "GL_POLYGON_SMOOTH_HINT\0" - "GL_POLYGON_STIPPLE\0" - "GL_POLYGON_STIPPLE_BIT\0" - "GL_POLYGON_TOKEN\0" - "GL_POSITION\0" - "GL_POST_COLOR_MATRIX_ALPHA_BIAS\0" - "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI\0" - "GL_POST_COLOR_MATRIX_ALPHA_SCALE\0" - "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI\0" - "GL_POST_COLOR_MATRIX_BLUE_BIAS\0" - "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI\0" - "GL_POST_COLOR_MATRIX_BLUE_SCALE\0" - "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI\0" - "GL_POST_COLOR_MATRIX_COLOR_TABLE\0" - "GL_POST_COLOR_MATRIX_GREEN_BIAS\0" - "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI\0" - "GL_POST_COLOR_MATRIX_GREEN_SCALE\0" - "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI\0" - "GL_POST_COLOR_MATRIX_RED_BIAS\0" - "GL_POST_COLOR_MATRIX_RED_BIAS_SGI\0" - "GL_POST_COLOR_MATRIX_RED_SCALE\0" - "GL_POST_COLOR_MATRIX_RED_SCALE_SGI\0" - "GL_POST_CONVOLUTION_ALPHA_BIAS\0" - "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT\0" - "GL_POST_CONVOLUTION_ALPHA_SCALE\0" - "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT\0" - "GL_POST_CONVOLUTION_BLUE_BIAS\0" - "GL_POST_CONVOLUTION_BLUE_BIAS_EXT\0" - "GL_POST_CONVOLUTION_BLUE_SCALE\0" - "GL_POST_CONVOLUTION_BLUE_SCALE_EXT\0" - "GL_POST_CONVOLUTION_COLOR_TABLE\0" - "GL_POST_CONVOLUTION_GREEN_BIAS\0" - "GL_POST_CONVOLUTION_GREEN_BIAS_EXT\0" - "GL_POST_CONVOLUTION_GREEN_SCALE\0" - "GL_POST_CONVOLUTION_GREEN_SCALE_EXT\0" - "GL_POST_CONVOLUTION_RED_BIAS\0" - "GL_POST_CONVOLUTION_RED_BIAS_EXT\0" - "GL_POST_CONVOLUTION_RED_SCALE\0" - "GL_POST_CONVOLUTION_RED_SCALE_EXT\0" - "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX\0" - "GL_POST_TEXTURE_FILTER_BIAS_SGIX\0" - "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX\0" - "GL_POST_TEXTURE_FILTER_SCALE_SGIX\0" - "GL_PREVIOUS\0" - "GL_PREVIOUS_ARB\0" - "GL_PREVIOUS_EXT\0" - "GL_PRIMARY_COLOR\0" - "GL_PRIMARY_COLOR_ARB\0" - "GL_PRIMARY_COLOR_EXT\0" - "GL_PRIMITIVES_GENERATED\0" - "GL_PRIMITIVES_GENERATED_EXT\0" - "GL_PRIMITIVE_RESTART\0" - "GL_PRIMITIVE_RESTART_INDEX\0" - "GL_PRIMITIVE_RESTART_INDEX_NV\0" - "GL_PRIMITIVE_RESTART_NV\0" - "GL_PROGRAM_ADDRESS_REGISTERS_ARB\0" - "GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0" - "GL_PROGRAM_ATTRIBS_ARB\0" - "GL_PROGRAM_BINARY_FORMATS_OES\0" - "GL_PROGRAM_BINARY_LENGTH_OES\0" - "GL_PROGRAM_BINDING_ARB\0" - "GL_PROGRAM_ERROR_POSITION_ARB\0" - "GL_PROGRAM_ERROR_POSITION_NV\0" - "GL_PROGRAM_ERROR_STRING_ARB\0" - "GL_PROGRAM_FORMAT_ARB\0" - "GL_PROGRAM_FORMAT_ASCII_ARB\0" - "GL_PROGRAM_INSTRUCTIONS_ARB\0" - "GL_PROGRAM_LENGTH_ARB\0" - "GL_PROGRAM_LENGTH_NV\0" - "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0" - "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0" - "GL_PROGRAM_NATIVE_ATTRIBS_ARB\0" - "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0" - "GL_PROGRAM_NATIVE_PARAMETERS_ARB\0" - "GL_PROGRAM_NATIVE_TEMPORARIES_ARB\0" - "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0" - "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0" - "GL_PROGRAM_OBJECT_ARB\0" - "GL_PROGRAM_PARAMETERS_ARB\0" - "GL_PROGRAM_PARAMETER_NV\0" - "GL_PROGRAM_POINT_SIZE\0" - "GL_PROGRAM_POINT_SIZE_ARB\0" - "GL_PROGRAM_RESIDENT_NV\0" - "GL_PROGRAM_STRING_ARB\0" - "GL_PROGRAM_STRING_NV\0" - "GL_PROGRAM_TARGET_NV\0" - "GL_PROGRAM_TEMPORARIES_ARB\0" - "GL_PROGRAM_TEX_INDIRECTIONS_ARB\0" - "GL_PROGRAM_TEX_INSTRUCTIONS_ARB\0" - "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0" - "GL_PROJECTION\0" - "GL_PROJECTION_MATRIX\0" - "GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES\0" - "GL_PROJECTION_STACK_DEPTH\0" - "GL_PROVOKING_VERTEX\0" - "GL_PROVOKING_VERTEX_EXT\0" - "GL_PROXY_COLOR_TABLE\0" - "GL_PROXY_HISTOGRAM\0" - "GL_PROXY_HISTOGRAM_EXT\0" - "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0" - "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0" - "GL_PROXY_TEXTURE_1D\0" - "GL_PROXY_TEXTURE_1D_ARRAY\0" - "GL_PROXY_TEXTURE_1D_ARRAY_EXT\0" - "GL_PROXY_TEXTURE_1D_EXT\0" - "GL_PROXY_TEXTURE_2D\0" - "GL_PROXY_TEXTURE_2D_ARRAY\0" - "GL_PROXY_TEXTURE_2D_ARRAY_EXT\0" - "GL_PROXY_TEXTURE_2D_EXT\0" - "GL_PROXY_TEXTURE_3D\0" - "GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0" - "GL_PROXY_TEXTURE_CUBE_MAP\0" - "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0" - "GL_PROXY_TEXTURE_RECTANGLE\0" - "GL_PROXY_TEXTURE_RECTANGLE_ARB\0" - "GL_PROXY_TEXTURE_RECTANGLE_NV\0" - "GL_PURGEABLE_APPLE\0" - "GL_Q\0" - "GL_QUADRATIC_ATTENUATION\0" - "GL_QUADS\0" - "GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION\0" - "GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT\0" - "GL_QUAD_MESH_SUN\0" - "GL_QUAD_STRIP\0" - "GL_QUERY_BY_REGION_NO_WAIT\0" - "GL_QUERY_BY_REGION_NO_WAIT_NV\0" - "GL_QUERY_BY_REGION_WAIT\0" - "GL_QUERY_BY_REGION_WAIT_NV\0" - "GL_QUERY_COUNTER_BITS\0" - "GL_QUERY_COUNTER_BITS_ARB\0" - "GL_QUERY_NO_WAIT\0" - "GL_QUERY_NO_WAIT_NV\0" - "GL_QUERY_RESULT\0" - "GL_QUERY_RESULT_ARB\0" - "GL_QUERY_RESULT_AVAILABLE\0" - "GL_QUERY_RESULT_AVAILABLE_ARB\0" - "GL_QUERY_WAIT\0" - "GL_QUERY_WAIT_NV\0" - "GL_R\0" - "GL_R11F_G11F_B10F\0" - "GL_R16_SNORM\0" - "GL_R3_G3_B2\0" - "GL_R8_SNORM\0" - "GL_RASTERIZER_DISCARD\0" - "GL_RASTERIZER_DISCARD_EXT\0" - "GL_RASTER_POSITION_UNCLIPPED_IBM\0" - "GL_READ_BUFFER\0" - "GL_READ_FRAMEBUFFER\0" - "GL_READ_FRAMEBUFFER_BINDING\0" - "GL_READ_FRAMEBUFFER_BINDING_EXT\0" - "GL_READ_FRAMEBUFFER_EXT\0" - "GL_READ_ONLY\0" - "GL_READ_ONLY_ARB\0" - "GL_READ_WRITE\0" - "GL_READ_WRITE_ARB\0" - "GL_RED\0" - "GL_REDUCE\0" - "GL_REDUCE_EXT\0" - "GL_RED_BIAS\0" - "GL_RED_BITS\0" - "GL_RED_INTEGER\0" - "GL_RED_INTEGER_EXT\0" - "GL_RED_SCALE\0" - "GL_RED_SNORM\0" - "GL_REFLECTION_MAP\0" - "GL_REFLECTION_MAP_ARB\0" - "GL_REFLECTION_MAP_NV\0" - "GL_REFLECTION_MAP_OES\0" - "GL_RELEASED_APPLE\0" - "GL_RENDER\0" - "GL_RENDERBUFFER\0" - "GL_RENDERBUFFER_ALPHA_SIZE\0" - "GL_RENDERBUFFER_ALPHA_SIZE_OES\0" - "GL_RENDERBUFFER_BINDING\0" - "GL_RENDERBUFFER_BINDING_EXT\0" - "GL_RENDERBUFFER_BINDING_OES\0" - "GL_RENDERBUFFER_BLUE_SIZE\0" - "GL_RENDERBUFFER_BLUE_SIZE_OES\0" - "GL_RENDERBUFFER_DEPTH_SIZE\0" - "GL_RENDERBUFFER_DEPTH_SIZE_OES\0" - "GL_RENDERBUFFER_EXT\0" - "GL_RENDERBUFFER_GREEN_SIZE\0" - "GL_RENDERBUFFER_GREEN_SIZE_OES\0" - "GL_RENDERBUFFER_HEIGHT\0" - "GL_RENDERBUFFER_HEIGHT_EXT\0" - "GL_RENDERBUFFER_HEIGHT_OES\0" - "GL_RENDERBUFFER_INTERNAL_FORMAT\0" - "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0" - "GL_RENDERBUFFER_INTERNAL_FORMAT_OES\0" - "GL_RENDERBUFFER_OES\0" - "GL_RENDERBUFFER_RED_SIZE\0" - "GL_RENDERBUFFER_RED_SIZE_OES\0" - "GL_RENDERBUFFER_SAMPLES\0" - "GL_RENDERBUFFER_SAMPLES_EXT\0" - "GL_RENDERBUFFER_STENCIL_SIZE\0" - "GL_RENDERBUFFER_STENCIL_SIZE_OES\0" - "GL_RENDERBUFFER_WIDTH\0" - "GL_RENDERBUFFER_WIDTH_EXT\0" - "GL_RENDERBUFFER_WIDTH_OES\0" - "GL_RENDERER\0" - "GL_RENDER_MODE\0" - "GL_REPEAT\0" - "GL_REPLACE\0" - "GL_REPLACE_EXT\0" - "GL_REPLICATE_BORDER_HP\0" - "GL_RESCALE_NORMAL\0" - "GL_RESCALE_NORMAL_EXT\0" - "GL_RETAINED_APPLE\0" - "GL_RETURN\0" - "GL_RG16_SNORM\0" - "GL_RG8_SNORM\0" - "GL_RGB\0" - "GL_RGB10\0" - "GL_RGB10_A2\0" - "GL_RGB10_A2_EXT\0" - "GL_RGB10_EXT\0" - "GL_RGB12\0" - "GL_RGB12_EXT\0" - "GL_RGB16\0" - "GL_RGB16F\0" - "GL_RGB16I\0" - "GL_RGB16I_EXT\0" - "GL_RGB16UI\0" - "GL_RGB16UI_EXT\0" - "GL_RGB16_EXT\0" - "GL_RGB16_SNORM\0" - "GL_RGB2_EXT\0" - "GL_RGB32F\0" - "GL_RGB32I\0" - "GL_RGB32I_EXT\0" - "GL_RGB32UI\0" - "GL_RGB32UI_EXT\0" - "GL_RGB4\0" - "GL_RGB4_EXT\0" - "GL_RGB4_S3TC\0" - "GL_RGB5\0" - "GL_RGB565\0" - "GL_RGB565_OES\0" - "GL_RGB5_A1\0" - "GL_RGB5_A1_EXT\0" - "GL_RGB5_A1_OES\0" - "GL_RGB5_EXT\0" - "GL_RGB8\0" - "GL_RGB8I\0" - "GL_RGB8I_EXT\0" - "GL_RGB8UI\0" - "GL_RGB8UI_EXT\0" - "GL_RGB8_EXT\0" - "GL_RGB8_OES\0" - "GL_RGB8_SNORM\0" - "GL_RGB9_E5\0" - "GL_RGBA\0" - "GL_RGBA12\0" - "GL_RGBA12_EXT\0" - "GL_RGBA16\0" - "GL_RGBA16F\0" - "GL_RGBA16I\0" - "GL_RGBA16I_EXT\0" - "GL_RGBA16UI\0" - "GL_RGBA16UI_EXT\0" - "GL_RGBA16_EXT\0" - "GL_RGBA16_SNORM\0" - "GL_RGBA2\0" - "GL_RGBA2_EXT\0" - "GL_RGBA32F\0" - "GL_RGBA32I\0" - "GL_RGBA32I_EXT\0" - "GL_RGBA32UI\0" - "GL_RGBA32UI_EXT\0" - "GL_RGBA4\0" - "GL_RGBA4_DXT5_S3TC\0" - "GL_RGBA4_EXT\0" - "GL_RGBA4_OES\0" - "GL_RGBA4_S3TC\0" - "GL_RGBA8\0" - "GL_RGBA8I\0" - "GL_RGBA8I_EXT\0" - "GL_RGBA8UI\0" - "GL_RGBA8UI_EXT\0" - "GL_RGBA8_EXT\0" - "GL_RGBA8_OES\0" - "GL_RGBA8_SNORM\0" - "GL_RGBA_DXT5_S3TC\0" - "GL_RGBA_FLOAT_MODE_ARB\0" - "GL_RGBA_INTEGER\0" - "GL_RGBA_INTEGER_EXT\0" - "GL_RGBA_INTEGER_MODE_EXT\0" - "GL_RGBA_MODE\0" - "GL_RGBA_S3TC\0" - "GL_RGBA_SNORM\0" - "GL_RGB_INTEGER\0" - "GL_RGB_INTEGER_EXT\0" - "GL_RGB_S3TC\0" - "GL_RGB_SCALE\0" - "GL_RGB_SCALE_ARB\0" - "GL_RGB_SCALE_EXT\0" - "GL_RGB_SNORM\0" - "GL_RG_SNORM\0" - "GL_RIGHT\0" - "GL_S\0" - "GL_SAMPLER_1D\0" - "GL_SAMPLER_1D_ARRAY\0" - "GL_SAMPLER_1D_ARRAY_EXT\0" - "GL_SAMPLER_1D_ARRAY_SHADOW\0" - "GL_SAMPLER_1D_ARRAY_SHADOW_EXT\0" - "GL_SAMPLER_1D_SHADOW\0" - "GL_SAMPLER_2D\0" - "GL_SAMPLER_2D_ARRAY\0" - "GL_SAMPLER_2D_ARRAY_EXT\0" - "GL_SAMPLER_2D_ARRAY_SHADOW\0" - "GL_SAMPLER_2D_ARRAY_SHADOW_EXT\0" - "GL_SAMPLER_2D_RECT\0" - "GL_SAMPLER_2D_RECT_SHADOW\0" - "GL_SAMPLER_2D_SHADOW\0" - "GL_SAMPLER_3D\0" - "GL_SAMPLER_3D_OES\0" - "GL_SAMPLER_BUFFER\0" - "GL_SAMPLER_BUFFER_EXT\0" - "GL_SAMPLER_CUBE\0" - "GL_SAMPLER_CUBE_SHADOW\0" - "GL_SAMPLER_CUBE_SHADOW_EXT\0" - "GL_SAMPLES\0" - "GL_SAMPLES_3DFX\0" - "GL_SAMPLES_ARB\0" - "GL_SAMPLES_PASSED\0" - "GL_SAMPLES_PASSED_ARB\0" - "GL_SAMPLE_ALPHA_TO_COVERAGE\0" - "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB\0" - "GL_SAMPLE_ALPHA_TO_ONE\0" - "GL_SAMPLE_ALPHA_TO_ONE_ARB\0" - "GL_SAMPLE_BUFFERS\0" - "GL_SAMPLE_BUFFERS_3DFX\0" - "GL_SAMPLE_BUFFERS_ARB\0" - "GL_SAMPLE_COVERAGE\0" - "GL_SAMPLE_COVERAGE_ARB\0" - "GL_SAMPLE_COVERAGE_INVERT\0" - "GL_SAMPLE_COVERAGE_INVERT_ARB\0" - "GL_SAMPLE_COVERAGE_VALUE\0" - "GL_SAMPLE_COVERAGE_VALUE_ARB\0" - "GL_SCISSOR_BIT\0" - "GL_SCISSOR_BOX\0" - "GL_SCISSOR_TEST\0" - "GL_SECONDARY_COLOR_ARRAY\0" - "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING\0" - "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB\0" - "GL_SECONDARY_COLOR_ARRAY_POINTER\0" - "GL_SECONDARY_COLOR_ARRAY_SIZE\0" - "GL_SECONDARY_COLOR_ARRAY_STRIDE\0" - "GL_SECONDARY_COLOR_ARRAY_TYPE\0" - "GL_SELECT\0" - "GL_SELECTION_BUFFER_POINTER\0" - "GL_SELECTION_BUFFER_SIZE\0" - "GL_SEPARABLE_2D\0" - "GL_SEPARATE_ATTRIBS\0" - "GL_SEPARATE_ATTRIBS_EXT\0" - "GL_SEPARATE_SPECULAR_COLOR\0" - "GL_SEPARATE_SPECULAR_COLOR_EXT\0" - "GL_SET\0" - "GL_SHADER_BINARY_FORMATS\0" - "GL_SHADER_COMPILER\0" - "GL_SHADER_OBJECT_ARB\0" - "GL_SHADER_SOURCE_LENGTH\0" - "GL_SHADER_TYPE\0" - "GL_SHADE_MODEL\0" - "GL_SHADING_LANGUAGE_VERSION\0" - "GL_SHADOW_AMBIENT_SGIX\0" - "GL_SHARED_TEXTURE_PALETTE_EXT\0" - "GL_SHININESS\0" - "GL_SHORT\0" - "GL_SIGNALED\0" - "GL_SIGNED_NORMALIZED\0" - "GL_SINGLE_COLOR\0" - "GL_SINGLE_COLOR_EXT\0" - "GL_SLICE_ACCUM_SUN\0" - "GL_SLUMINANCE\0" - "GL_SLUMINANCE8\0" - "GL_SLUMINANCE8_ALPHA8\0" - "GL_SLUMINANCE_ALPHA\0" - "GL_SMOOTH\0" - "GL_SMOOTH_LINE_WIDTH_GRANULARITY\0" - "GL_SMOOTH_LINE_WIDTH_RANGE\0" - "GL_SMOOTH_POINT_SIZE_GRANULARITY\0" - "GL_SMOOTH_POINT_SIZE_RANGE\0" - "GL_SOURCE0_ALPHA\0" - "GL_SOURCE0_ALPHA_ARB\0" - "GL_SOURCE0_ALPHA_EXT\0" - "GL_SOURCE0_RGB\0" - "GL_SOURCE0_RGB_ARB\0" - "GL_SOURCE0_RGB_EXT\0" - "GL_SOURCE1_ALPHA\0" - "GL_SOURCE1_ALPHA_ARB\0" - "GL_SOURCE1_ALPHA_EXT\0" - "GL_SOURCE1_RGB\0" - "GL_SOURCE1_RGB_ARB\0" - "GL_SOURCE1_RGB_EXT\0" - "GL_SOURCE2_ALPHA\0" - "GL_SOURCE2_ALPHA_ARB\0" - "GL_SOURCE2_ALPHA_EXT\0" - "GL_SOURCE2_RGB\0" - "GL_SOURCE2_RGB_ARB\0" - "GL_SOURCE2_RGB_EXT\0" - "GL_SOURCE3_ALPHA_NV\0" - "GL_SOURCE3_RGB_NV\0" - "GL_SPECULAR\0" - "GL_SPHERE_MAP\0" - "GL_SPOT_CUTOFF\0" - "GL_SPOT_DIRECTION\0" - "GL_SPOT_EXPONENT\0" - "GL_SRC0_ALPHA\0" - "GL_SRC0_RGB\0" - "GL_SRC1_ALPHA\0" - "GL_SRC1_RGB\0" - "GL_SRC2_ALPHA\0" - "GL_SRC2_RGB\0" - "GL_SRC_ALPHA\0" - "GL_SRC_ALPHA_SATURATE\0" - "GL_SRC_COLOR\0" - "GL_SRGB\0" - "GL_SRGB8\0" - "GL_SRGB8_ALPHA8\0" - "GL_SRGB_ALPHA\0" - "GL_STACK_OVERFLOW\0" - "GL_STACK_UNDERFLOW\0" - "GL_STATIC_COPY\0" - "GL_STATIC_COPY_ARB\0" - "GL_STATIC_DRAW\0" - "GL_STATIC_DRAW_ARB\0" - "GL_STATIC_READ\0" - "GL_STATIC_READ_ARB\0" - "GL_STENCIL\0" - "GL_STENCIL_ATTACHMENT\0" - "GL_STENCIL_ATTACHMENT_EXT\0" - "GL_STENCIL_ATTACHMENT_OES\0" - "GL_STENCIL_BACK_FAIL\0" - "GL_STENCIL_BACK_FAIL_ATI\0" - "GL_STENCIL_BACK_FUNC\0" - "GL_STENCIL_BACK_FUNC_ATI\0" - "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0" - "GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI\0" - "GL_STENCIL_BACK_PASS_DEPTH_PASS\0" - "GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI\0" - "GL_STENCIL_BACK_REF\0" - "GL_STENCIL_BACK_VALUE_MASK\0" - "GL_STENCIL_BACK_WRITEMASK\0" - "GL_STENCIL_BITS\0" - "GL_STENCIL_BUFFER\0" - "GL_STENCIL_BUFFER_BIT\0" - "GL_STENCIL_CLEAR_VALUE\0" - "GL_STENCIL_FAIL\0" - "GL_STENCIL_FUNC\0" - "GL_STENCIL_INDEX\0" - "GL_STENCIL_INDEX1\0" - "GL_STENCIL_INDEX16\0" - "GL_STENCIL_INDEX16_EXT\0" - "GL_STENCIL_INDEX1_EXT\0" - "GL_STENCIL_INDEX1_OES\0" - "GL_STENCIL_INDEX4\0" - "GL_STENCIL_INDEX4_EXT\0" - "GL_STENCIL_INDEX4_OES\0" - "GL_STENCIL_INDEX8\0" - "GL_STENCIL_INDEX8_EXT\0" - "GL_STENCIL_INDEX8_OES\0" - "GL_STENCIL_INDEX_EXT\0" - "GL_STENCIL_PASS_DEPTH_FAIL\0" - "GL_STENCIL_PASS_DEPTH_PASS\0" - "GL_STENCIL_REF\0" - "GL_STENCIL_TEST\0" - "GL_STENCIL_TEST_TWO_SIDE_EXT\0" - "GL_STENCIL_VALUE_MASK\0" - "GL_STENCIL_WRITEMASK\0" - "GL_STEREO\0" - "GL_STORAGE_CACHED_APPLE\0" - "GL_STORAGE_PRIVATE_APPLE\0" - "GL_STORAGE_SHARED_APPLE\0" - "GL_STREAM_COPY\0" - "GL_STREAM_COPY_ARB\0" - "GL_STREAM_DRAW\0" - "GL_STREAM_DRAW_ARB\0" - "GL_STREAM_READ\0" - "GL_STREAM_READ_ARB\0" - "GL_SUBPIXEL_BITS\0" - "GL_SUBTRACT\0" - "GL_SUBTRACT_ARB\0" - "GL_SYNC_CONDITION\0" - "GL_SYNC_FENCE\0" - "GL_SYNC_FLAGS\0" - "GL_SYNC_FLUSH_COMMANDS_BIT\0" - "GL_SYNC_GPU_COMMANDS_COMPLETE\0" - "GL_SYNC_STATUS\0" - "GL_T\0" - "GL_T2F_C3F_V3F\0" - "GL_T2F_C4F_N3F_V3F\0" - "GL_T2F_C4UB_V3F\0" - "GL_T2F_N3F_V3F\0" - "GL_T2F_V3F\0" - "GL_T4F_C4F_N3F_V4F\0" - "GL_T4F_V4F\0" - "GL_TABLE_TOO_LARGE_EXT\0" - "GL_TEXTURE\0" - "GL_TEXTURE0\0" - "GL_TEXTURE0_ARB\0" - "GL_TEXTURE1\0" - "GL_TEXTURE10\0" - "GL_TEXTURE10_ARB\0" - "GL_TEXTURE11\0" - "GL_TEXTURE11_ARB\0" - "GL_TEXTURE12\0" - "GL_TEXTURE12_ARB\0" - "GL_TEXTURE13\0" - "GL_TEXTURE13_ARB\0" - "GL_TEXTURE14\0" - "GL_TEXTURE14_ARB\0" - "GL_TEXTURE15\0" - "GL_TEXTURE15_ARB\0" - "GL_TEXTURE16\0" - "GL_TEXTURE16_ARB\0" - "GL_TEXTURE17\0" - "GL_TEXTURE17_ARB\0" - "GL_TEXTURE18\0" - "GL_TEXTURE18_ARB\0" - "GL_TEXTURE19\0" - "GL_TEXTURE19_ARB\0" - "GL_TEXTURE1_ARB\0" - "GL_TEXTURE2\0" - "GL_TEXTURE20\0" - "GL_TEXTURE20_ARB\0" - "GL_TEXTURE21\0" - "GL_TEXTURE21_ARB\0" - "GL_TEXTURE22\0" - "GL_TEXTURE22_ARB\0" - "GL_TEXTURE23\0" - "GL_TEXTURE23_ARB\0" - "GL_TEXTURE24\0" - "GL_TEXTURE24_ARB\0" - "GL_TEXTURE25\0" - "GL_TEXTURE25_ARB\0" - "GL_TEXTURE26\0" - "GL_TEXTURE26_ARB\0" - "GL_TEXTURE27\0" - "GL_TEXTURE27_ARB\0" - "GL_TEXTURE28\0" - "GL_TEXTURE28_ARB\0" - "GL_TEXTURE29\0" - "GL_TEXTURE29_ARB\0" - "GL_TEXTURE2_ARB\0" - "GL_TEXTURE3\0" - "GL_TEXTURE30\0" - "GL_TEXTURE30_ARB\0" - "GL_TEXTURE31\0" - "GL_TEXTURE31_ARB\0" - "GL_TEXTURE3_ARB\0" - "GL_TEXTURE4\0" - "GL_TEXTURE4_ARB\0" - "GL_TEXTURE5\0" - "GL_TEXTURE5_ARB\0" - "GL_TEXTURE6\0" - "GL_TEXTURE6_ARB\0" - "GL_TEXTURE7\0" - "GL_TEXTURE7_ARB\0" - "GL_TEXTURE8\0" - "GL_TEXTURE8_ARB\0" - "GL_TEXTURE9\0" - "GL_TEXTURE9_ARB\0" - "GL_TEXTURE_1D\0" - "GL_TEXTURE_1D_ARRAY\0" - "GL_TEXTURE_1D_ARRAY_EXT\0" - "GL_TEXTURE_2D\0" - "GL_TEXTURE_2D_ARRAY\0" - "GL_TEXTURE_2D_ARRAY_EXT\0" - "GL_TEXTURE_3D\0" - "GL_TEXTURE_3D_OES\0" - "GL_TEXTURE_ALPHA_SIZE\0" - "GL_TEXTURE_ALPHA_SIZE_EXT\0" - "GL_TEXTURE_BASE_LEVEL\0" - "GL_TEXTURE_BINDING_1D\0" - "GL_TEXTURE_BINDING_1D_ARRAY\0" - "GL_TEXTURE_BINDING_1D_ARRAY_EXT\0" - "GL_TEXTURE_BINDING_2D\0" - "GL_TEXTURE_BINDING_2D_ARRAY\0" - "GL_TEXTURE_BINDING_2D_ARRAY_EXT\0" - "GL_TEXTURE_BINDING_3D\0" - "GL_TEXTURE_BINDING_3D_OES\0" - "GL_TEXTURE_BINDING_BUFFER\0" - "GL_TEXTURE_BINDING_CUBE_MAP\0" - "GL_TEXTURE_BINDING_CUBE_MAP_ARB\0" - "GL_TEXTURE_BINDING_CUBE_MAP_OES\0" - "GL_TEXTURE_BINDING_RECTANGLE\0" - "GL_TEXTURE_BINDING_RECTANGLE_ARB\0" - "GL_TEXTURE_BINDING_RECTANGLE_NV\0" - "GL_TEXTURE_BIT\0" - "GL_TEXTURE_BLUE_SIZE\0" - "GL_TEXTURE_BLUE_SIZE_EXT\0" - "GL_TEXTURE_BORDER\0" - "GL_TEXTURE_BORDER_COLOR\0" - "GL_TEXTURE_BUFFER\0" - "GL_TEXTURE_BUFFER_DATA_STORE_BINDING\0" - "GL_TEXTURE_BUFFER_FORMAT\0" - "GL_TEXTURE_CLIPMAP_CENTER_SGIX\0" - "GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0" - "GL_TEXTURE_CLIPMAP_FRAME_SGIX\0" - "GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX\0" - "GL_TEXTURE_CLIPMAP_OFFSET_SGIX\0" - "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX\0" - "GL_TEXTURE_COLOR_TABLE_SGI\0" - "GL_TEXTURE_COLOR_WRITEMASK_SGIS\0" - "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB\0" - "GL_TEXTURE_COMPARE_FUNC\0" - "GL_TEXTURE_COMPARE_FUNC_ARB\0" - "GL_TEXTURE_COMPARE_MODE\0" - "GL_TEXTURE_COMPARE_MODE_ARB\0" - "GL_TEXTURE_COMPARE_OPERATOR_SGIX\0" - "GL_TEXTURE_COMPARE_SGIX\0" - "GL_TEXTURE_COMPONENTS\0" - "GL_TEXTURE_COMPRESSED\0" - "GL_TEXTURE_COMPRESSED_ARB\0" - "GL_TEXTURE_COMPRESSED_FORMATS_ARB\0" - "GL_TEXTURE_COMPRESSED_IMAGE_SIZE\0" - "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB\0" - "GL_TEXTURE_COMPRESSION_HINT\0" - "GL_TEXTURE_COMPRESSION_HINT_ARB\0" - "GL_TEXTURE_COORD_ARRAY\0" - "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING\0" - "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB\0" - "GL_TEXTURE_COORD_ARRAY_POINTER\0" - "GL_TEXTURE_COORD_ARRAY_SIZE\0" - "GL_TEXTURE_COORD_ARRAY_STRIDE\0" - "GL_TEXTURE_COORD_ARRAY_TYPE\0" - "GL_TEXTURE_CROP_RECT_OES\0" - "GL_TEXTURE_CUBE_MAP\0" - "GL_TEXTURE_CUBE_MAP_ARB\0" - "GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0" - "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0" - "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES\0" - "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0" - "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0" - "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES\0" - "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0" - "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0" - "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES\0" - "GL_TEXTURE_CUBE_MAP_OES\0" - "GL_TEXTURE_CUBE_MAP_POSITIVE_X\0" - "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0" - "GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES\0" - "GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0" - "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0" - "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES\0" - "GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0" - "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0" - "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES\0" - "GL_TEXTURE_CUBE_MAP_SEAMLESS\0" - "GL_TEXTURE_DEPTH\0" - "GL_TEXTURE_DEPTH_SIZE\0" - "GL_TEXTURE_DEPTH_SIZE_ARB\0" - "GL_TEXTURE_ENV\0" - "GL_TEXTURE_ENV_COLOR\0" - "GL_TEXTURE_ENV_MODE\0" - "GL_TEXTURE_FILTER_CONTROL\0" - "GL_TEXTURE_FILTER_CONTROL_EXT\0" - "GL_TEXTURE_GEN_MODE\0" - "GL_TEXTURE_GEN_MODE_OES\0" - "GL_TEXTURE_GEN_Q\0" - "GL_TEXTURE_GEN_R\0" - "GL_TEXTURE_GEN_S\0" - "GL_TEXTURE_GEN_STR_OES\0" - "GL_TEXTURE_GEN_T\0" - "GL_TEXTURE_GEQUAL_R_SGIX\0" - "GL_TEXTURE_GREEN_SIZE\0" - "GL_TEXTURE_GREEN_SIZE_EXT\0" - "GL_TEXTURE_HEIGHT\0" - "GL_TEXTURE_INDEX_SIZE_EXT\0" - "GL_TEXTURE_INTENSITY_SIZE\0" - "GL_TEXTURE_INTENSITY_SIZE_EXT\0" - "GL_TEXTURE_INTERNAL_FORMAT\0" - "GL_TEXTURE_LEQUAL_R_SGIX\0" - "GL_TEXTURE_LOD_BIAS\0" - "GL_TEXTURE_LOD_BIAS_EXT\0" - "GL_TEXTURE_LOD_BIAS_R_SGIX\0" - "GL_TEXTURE_LOD_BIAS_S_SGIX\0" - "GL_TEXTURE_LOD_BIAS_T_SGIX\0" - "GL_TEXTURE_LUMINANCE_SIZE\0" - "GL_TEXTURE_LUMINANCE_SIZE_EXT\0" - "GL_TEXTURE_MAG_FILTER\0" - "GL_TEXTURE_MATRIX\0" - "GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES\0" - "GL_TEXTURE_MAX_ANISOTROPY_EXT\0" - "GL_TEXTURE_MAX_CLAMP_R_SGIX\0" - "GL_TEXTURE_MAX_CLAMP_S_SGIX\0" - "GL_TEXTURE_MAX_CLAMP_T_SGIX\0" - "GL_TEXTURE_MAX_LEVEL\0" - "GL_TEXTURE_MAX_LOD\0" - "GL_TEXTURE_MIN_FILTER\0" - "GL_TEXTURE_MIN_LOD\0" - "GL_TEXTURE_PRIORITY\0" - "GL_TEXTURE_RANGE_LENGTH_APPLE\0" - "GL_TEXTURE_RANGE_POINTER_APPLE\0" - "GL_TEXTURE_RECTANGLE\0" - "GL_TEXTURE_RECTANGLE_ARB\0" - "GL_TEXTURE_RECTANGLE_NV\0" - "GL_TEXTURE_RED_SIZE\0" - "GL_TEXTURE_RED_SIZE_EXT\0" - "GL_TEXTURE_RESIDENT\0" - "GL_TEXTURE_SHARED_SIZE\0" - "GL_TEXTURE_STACK_DEPTH\0" - "GL_TEXTURE_STENCIL_SIZE\0" - "GL_TEXTURE_STENCIL_SIZE_EXT\0" - "GL_TEXTURE_STORAGE_HINT_APPLE\0" - "GL_TEXTURE_TOO_LARGE_EXT\0" - "GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0" - "GL_TEXTURE_WIDTH\0" - "GL_TEXTURE_WRAP_R\0" - "GL_TEXTURE_WRAP_R_OES\0" - "GL_TEXTURE_WRAP_S\0" - "GL_TEXTURE_WRAP_T\0" - "GL_TIMEOUT_EXPIRED\0" - "GL_TIME_ELAPSED_EXT\0" - "GL_TRACK_MATRIX_NV\0" - "GL_TRACK_MATRIX_TRANSFORM_NV\0" - "GL_TRANSFORM_BIT\0" - "GL_TRANSFORM_FEEDBACK\0" - "GL_TRANSFORM_FEEDBACK_BINDING\0" - "GL_TRANSFORM_FEEDBACK_BUFFER\0" - "GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE\0" - "GL_TRANSFORM_FEEDBACK_BUFFER_BINDING\0" - "GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT\0" - "GL_TRANSFORM_FEEDBACK_BUFFER_EXT\0" - "GL_TRANSFORM_FEEDBACK_BUFFER_MODE\0" - "GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT\0" - "GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED\0" - "GL_TRANSFORM_FEEDBACK_BUFFER_SIZE\0" - "GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT\0" - "GL_TRANSFORM_FEEDBACK_BUFFER_START\0" - "GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT\0" - "GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN\0" - "GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT\0" - "GL_TRANSFORM_FEEDBACK_VARYINGS\0" - "GL_TRANSFORM_FEEDBACK_VARYINGS_EXT\0" - "GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH\0" - "GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT\0" - "GL_TRANSPOSE_COLOR_MATRIX\0" - "GL_TRANSPOSE_COLOR_MATRIX_ARB\0" - "GL_TRANSPOSE_CURRENT_MATRIX_ARB\0" - "GL_TRANSPOSE_MODELVIEW_MATRIX\0" - "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB\0" - "GL_TRANSPOSE_NV\0" - "GL_TRANSPOSE_PROJECTION_MATRIX\0" - "GL_TRANSPOSE_PROJECTION_MATRIX_ARB\0" - "GL_TRANSPOSE_TEXTURE_MATRIX\0" - "GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0" - "GL_TRIANGLES\0" - "GL_TRIANGLES_ADJACENCY\0" - "GL_TRIANGLES_ADJACENCY_ARB\0" - "GL_TRIANGLE_FAN\0" - "GL_TRIANGLE_MESH_SUN\0" - "GL_TRIANGLE_STRIP\0" - "GL_TRIANGLE_STRIP_ADJACENCY\0" - "GL_TRIANGLE_STRIP_ADJACENCY_ARB\0" - "GL_TRUE\0" - "GL_UNDEFINED_APPLE\0" - "GL_UNPACK_ALIGNMENT\0" - "GL_UNPACK_IMAGE_HEIGHT\0" - "GL_UNPACK_LSB_FIRST\0" - "GL_UNPACK_ROW_LENGTH\0" - "GL_UNPACK_SKIP_IMAGES\0" - "GL_UNPACK_SKIP_PIXELS\0" - "GL_UNPACK_SKIP_ROWS\0" - "GL_UNPACK_SWAP_BYTES\0" - "GL_UNSIGNALED\0" - "GL_UNSIGNED_BYTE\0" - "GL_UNSIGNED_BYTE_2_3_3_REV\0" - "GL_UNSIGNED_BYTE_3_3_2\0" - "GL_UNSIGNED_INT\0" - "GL_UNSIGNED_INT_10F_11F_11F_REV\0" - "GL_UNSIGNED_INT_10_10_10_2\0" - "GL_UNSIGNED_INT_10_10_10_2_OES\0" - "GL_UNSIGNED_INT_24_8\0" - "GL_UNSIGNED_INT_24_8_EXT\0" - "GL_UNSIGNED_INT_24_8_NV\0" - "GL_UNSIGNED_INT_24_8_OES\0" - "GL_UNSIGNED_INT_2_10_10_10_REV\0" - "GL_UNSIGNED_INT_2_10_10_10_REV_EXT\0" - "GL_UNSIGNED_INT_5_9_9_9_REV\0" - "GL_UNSIGNED_INT_8_8_8_8\0" - "GL_UNSIGNED_INT_8_8_8_8_REV\0" - "GL_UNSIGNED_INT_SAMPLER_1D\0" - "GL_UNSIGNED_INT_SAMPLER_1D_ARRAY\0" - "GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT\0" - "GL_UNSIGNED_INT_SAMPLER_1D_EXT\0" - "GL_UNSIGNED_INT_SAMPLER_2D\0" - "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY\0" - "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT\0" - "GL_UNSIGNED_INT_SAMPLER_2D_EXT\0" - "GL_UNSIGNED_INT_SAMPLER_2D_RECT\0" - "GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT\0" - "GL_UNSIGNED_INT_SAMPLER_3D\0" - "GL_UNSIGNED_INT_SAMPLER_3D_EXT\0" - "GL_UNSIGNED_INT_SAMPLER_BUFFER\0" - "GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT\0" - "GL_UNSIGNED_INT_SAMPLER_CUBE\0" - "GL_UNSIGNED_INT_SAMPLER_CUBE_EXT\0" - "GL_UNSIGNED_INT_VEC2\0" - "GL_UNSIGNED_INT_VEC2_EXT\0" - "GL_UNSIGNED_INT_VEC3\0" - "GL_UNSIGNED_INT_VEC3_EXT\0" - "GL_UNSIGNED_INT_VEC4\0" - "GL_UNSIGNED_INT_VEC4_EXT\0" - "GL_UNSIGNED_NORMALIZED\0" - "GL_UNSIGNED_SHORT\0" - "GL_UNSIGNED_SHORT_1_5_5_5_REV\0" - "GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT\0" - "GL_UNSIGNED_SHORT_4_4_4_4\0" - "GL_UNSIGNED_SHORT_4_4_4_4_REV\0" - "GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT\0" - "GL_UNSIGNED_SHORT_5_5_5_1\0" - "GL_UNSIGNED_SHORT_5_6_5\0" - "GL_UNSIGNED_SHORT_5_6_5_REV\0" - "GL_UNSIGNED_SHORT_8_8_APPLE\0" - "GL_UNSIGNED_SHORT_8_8_MESA\0" - "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0" - "GL_UNSIGNED_SHORT_8_8_REV_MESA\0" - "GL_UPPER_LEFT\0" - "GL_V2F\0" - "GL_V3F\0" - "GL_VALIDATE_STATUS\0" - "GL_VENDOR\0" - "GL_VERSION\0" - "GL_VERTEX_ARRAY\0" - "GL_VERTEX_ARRAY_BINDING\0" - "GL_VERTEX_ARRAY_BINDING_APPLE\0" - "GL_VERTEX_ARRAY_BUFFER_BINDING\0" - "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0" - "GL_VERTEX_ARRAY_POINTER\0" - "GL_VERTEX_ARRAY_SIZE\0" - "GL_VERTEX_ARRAY_STRIDE\0" - "GL_VERTEX_ARRAY_TYPE\0" - "GL_VERTEX_ATTRIB_ARRAY0_NV\0" - "GL_VERTEX_ATTRIB_ARRAY10_NV\0" - "GL_VERTEX_ATTRIB_ARRAY11_NV\0" - "GL_VERTEX_ATTRIB_ARRAY12_NV\0" - "GL_VERTEX_ATTRIB_ARRAY13_NV\0" - "GL_VERTEX_ATTRIB_ARRAY14_NV\0" - "GL_VERTEX_ATTRIB_ARRAY15_NV\0" - "GL_VERTEX_ATTRIB_ARRAY1_NV\0" - "GL_VERTEX_ATTRIB_ARRAY2_NV\0" - "GL_VERTEX_ATTRIB_ARRAY3_NV\0" - "GL_VERTEX_ATTRIB_ARRAY4_NV\0" - "GL_VERTEX_ATTRIB_ARRAY5_NV\0" - "GL_VERTEX_ATTRIB_ARRAY6_NV\0" - "GL_VERTEX_ATTRIB_ARRAY7_NV\0" - "GL_VERTEX_ATTRIB_ARRAY8_NV\0" - "GL_VERTEX_ATTRIB_ARRAY9_NV\0" - "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0" - "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0" - "GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB\0" - "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0" - "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0" - "GL_VERTEX_ATTRIB_ARRAY_INTEGER\0" - "GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT\0" - "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0" - "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0" - "GL_VERTEX_ATTRIB_ARRAY_POINTER\0" - "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0" - "GL_VERTEX_ATTRIB_ARRAY_SIZE\0" - "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0" - "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0" - "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0" - "GL_VERTEX_ATTRIB_ARRAY_TYPE\0" - "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0" - "GL_VERTEX_BLEND_ARB\0" - "GL_VERTEX_PROGRAM_ARB\0" - "GL_VERTEX_PROGRAM_BINDING_NV\0" - "GL_VERTEX_PROGRAM_NV\0" - "GL_VERTEX_PROGRAM_POINT_SIZE\0" - "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0" - "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0" - "GL_VERTEX_PROGRAM_TWO_SIDE\0" - "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0" - "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0" - "GL_VERTEX_SHADER\0" - "GL_VERTEX_SHADER_ARB\0" - "GL_VERTEX_STATE_PROGRAM_NV\0" - "GL_VIEWPORT\0" - "GL_VIEWPORT_BIT\0" - "GL_VOLATILE_APPLE\0" - "GL_WAIT_FAILED\0" - "GL_WEIGHT_ARRAY_ARB\0" - "GL_WEIGHT_ARRAY_BUFFER_BINDING\0" - "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0" - "GL_WEIGHT_ARRAY_BUFFER_BINDING_OES\0" - "GL_WEIGHT_ARRAY_OES\0" - "GL_WEIGHT_ARRAY_POINTER_ARB\0" - "GL_WEIGHT_ARRAY_POINTER_OES\0" - "GL_WEIGHT_ARRAY_SIZE_ARB\0" - "GL_WEIGHT_ARRAY_SIZE_OES\0" - "GL_WEIGHT_ARRAY_STRIDE_ARB\0" - "GL_WEIGHT_ARRAY_STRIDE_OES\0" - "GL_WEIGHT_ARRAY_TYPE_ARB\0" - "GL_WEIGHT_ARRAY_TYPE_OES\0" - "GL_WEIGHT_SUM_UNITY_ARB\0" - "GL_WRAP_BORDER_SUN\0" - "GL_WRITE_ONLY\0" - "GL_WRITE_ONLY_ARB\0" - "GL_WRITE_ONLY_OES\0" - "GL_XOR\0" - "GL_YCBCR_422_APPLE\0" - "GL_YCBCR_MESA\0" - "GL_ZERO\0" - "GL_ZOOM_X\0" - "GL_ZOOM_Y\0" - ; - -static const enum_elt all_enums[2300] = -{ - { 0, 0x00000600 }, /* GL_2D */ - { 6, 0x00001407 }, /* GL_2_BYTES */ - { 17, 0x00000601 }, /* GL_3D */ - { 23, 0x00000602 }, /* GL_3D_COLOR */ - { 35, 0x00000603 }, /* GL_3D_COLOR_TEXTURE */ - { 55, 0x00001408 }, /* GL_3_BYTES */ - { 66, 0x00000604 }, /* GL_4D_COLOR_TEXTURE */ - { 86, 0x00001409 }, /* GL_4_BYTES */ - { 97, 0x00000100 }, /* GL_ACCUM */ - { 106, 0x00000D5B }, /* GL_ACCUM_ALPHA_BITS */ - { 126, 0x00000D5A }, /* GL_ACCUM_BLUE_BITS */ - { 145, 0x00000200 }, /* GL_ACCUM_BUFFER_BIT */ - { 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */ - { 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */ - { 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */ - { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */ - { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */ - { 276, 0x00008B8D }, /* GL_ACTIVE_PROGRAM_EXT */ - { 298, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */ - { 325, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */ - { 343, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */ - { 365, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */ - { 384, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */ - { 413, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */ - { 440, 0x00000104 }, /* GL_ADD */ - { 447, 0x00008574 }, /* GL_ADD_SIGNED */ - { 461, 0x00008574 }, /* GL_ADD_SIGNED_ARB */ - { 479, 0x00008574 }, /* GL_ADD_SIGNED_EXT */ - { 497, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */ - { 525, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */ - { 553, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */ - { 572, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */ - { 598, 0x00001906 }, /* GL_ALPHA */ - { 607, 0x0000803D }, /* GL_ALPHA12 */ - { 618, 0x0000803D }, /* GL_ALPHA12_EXT */ - { 633, 0x0000803E }, /* GL_ALPHA16 */ - { 644, 0x00008D8A }, /* GL_ALPHA16I_EXT */ - { 660, 0x00008D78 }, /* GL_ALPHA16UI_EXT */ - { 677, 0x0000803E }, /* GL_ALPHA16_EXT */ - { 692, 0x00008D84 }, /* GL_ALPHA32I_EXT */ - { 708, 0x00008D72 }, /* GL_ALPHA32UI_EXT */ - { 725, 0x0000803B }, /* GL_ALPHA4 */ - { 735, 0x0000803B }, /* GL_ALPHA4_EXT */ - { 749, 0x0000803C }, /* GL_ALPHA8 */ - { 759, 0x00008D90 }, /* GL_ALPHA8I_EXT */ - { 774, 0x00008D7E }, /* GL_ALPHA8UI_EXT */ - { 790, 0x0000803C }, /* GL_ALPHA8_EXT */ - { 804, 0x00000D1D }, /* GL_ALPHA_BIAS */ - { 818, 0x00000D55 }, /* GL_ALPHA_BITS */ - { 832, 0x00008D97 }, /* GL_ALPHA_INTEGER_EXT */ - { 853, 0x00000D1C }, /* GL_ALPHA_SCALE */ - { 868, 0x00000BC0 }, /* GL_ALPHA_TEST */ - { 882, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */ - { 901, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */ - { 919, 0x0000911A }, /* GL_ALREADY_SIGNALED */ - { 939, 0x00000207 }, /* GL_ALWAYS */ - { 949, 0x00001200 }, /* GL_AMBIENT */ - { 960, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */ - { 983, 0x00001501 }, /* GL_AND */ - { 990, 0x00001504 }, /* GL_AND_INVERTED */ - { 1006, 0x00001502 }, /* GL_AND_REVERSE */ - { 1021, 0x00008892 }, /* GL_ARRAY_BUFFER */ - { 1037, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */ - { 1061, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */ - { 1089, 0x00008B85 }, /* GL_ATTACHED_SHADERS */ - { 1109, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */ - { 1136, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */ - { 1160, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */ - { 1186, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */ - { 1210, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */ - { 1232, 0x00000D80 }, /* GL_AUTO_NORMAL */ - { 1247, 0x00000409 }, /* GL_AUX0 */ - { 1255, 0x0000040A }, /* GL_AUX1 */ - { 1263, 0x0000040B }, /* GL_AUX2 */ - { 1271, 0x0000040C }, /* GL_AUX3 */ - { 1279, 0x00000C00 }, /* GL_AUX_BUFFERS */ - { 1294, 0x00000405 }, /* GL_BACK */ - { 1302, 0x00000402 }, /* GL_BACK_LEFT */ - { 1315, 0x00000403 }, /* GL_BACK_RIGHT */ - { 1329, 0x000080E0 }, /* GL_BGR */ - { 1336, 0x000080E1 }, /* GL_BGRA */ - { 1344, 0x000080E1 }, /* GL_BGRA_EXT */ - { 1356, 0x00008D9B }, /* GL_BGRA_INTEGER */ - { 1372, 0x00008D9B }, /* GL_BGRA_INTEGER_EXT */ - { 1392, 0x00008D9A }, /* GL_BGR_INTEGER */ - { 1407, 0x00008D9A }, /* GL_BGR_INTEGER_EXT */ - { 1426, 0x00001A00 }, /* GL_BITMAP */ - { 1436, 0x00000704 }, /* GL_BITMAP_TOKEN */ - { 1452, 0x00000BE2 }, /* GL_BLEND */ - { 1461, 0x00008005 }, /* GL_BLEND_COLOR */ - { 1476, 0x00008005 }, /* GL_BLEND_COLOR_EXT */ - { 1495, 0x00000BE0 }, /* GL_BLEND_DST */ - { 1508, 0x000080CA }, /* GL_BLEND_DST_ALPHA */ - { 1527, 0x000080CA }, /* GL_BLEND_DST_ALPHA_OES */ - { 1550, 0x000080C8 }, /* GL_BLEND_DST_RGB */ - { 1567, 0x000080C8 }, /* GL_BLEND_DST_RGB_OES */ - { 1588, 0x00008009 }, /* GL_BLEND_EQUATION */ - { 1606, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */ - { 1630, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */ - { 1658, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_OES */ - { 1686, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */ - { 1708, 0x00008009 }, /* GL_BLEND_EQUATION_OES */ - { 1730, 0x00008009 }, /* GL_BLEND_EQUATION_RGB */ - { 1752, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */ - { 1778, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_OES */ - { 1804, 0x00000BE1 }, /* GL_BLEND_SRC */ - { 1817, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */ - { 1836, 0x000080CB }, /* GL_BLEND_SRC_ALPHA_OES */ - { 1859, 0x000080C9 }, /* GL_BLEND_SRC_RGB */ - { 1876, 0x000080C9 }, /* GL_BLEND_SRC_RGB_OES */ - { 1897, 0x00001905 }, /* GL_BLUE */ - { 1905, 0x00000D1B }, /* GL_BLUE_BIAS */ - { 1918, 0x00000D54 }, /* GL_BLUE_BITS */ - { 1931, 0x00008D96 }, /* GL_BLUE_INTEGER */ - { 1947, 0x00008D96 }, /* GL_BLUE_INTEGER_EXT */ - { 1967, 0x00000D1A }, /* GL_BLUE_SCALE */ - { 1981, 0x00008B56 }, /* GL_BOOL */ - { 1989, 0x00008B56 }, /* GL_BOOL_ARB */ - { 2001, 0x00008B57 }, /* GL_BOOL_VEC2 */ - { 2014, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */ - { 2031, 0x00008B58 }, /* GL_BOOL_VEC3 */ - { 2044, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */ - { 2061, 0x00008B59 }, /* GL_BOOL_VEC4 */ - { 2074, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */ - { 2091, 0x000088BB }, /* GL_BUFFER_ACCESS */ - { 2108, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */ - { 2129, 0x0000911F }, /* GL_BUFFER_ACCESS_FLAGS */ - { 2152, 0x000088BB }, /* GL_BUFFER_ACCESS_OES */ - { 2173, 0x00008A13 }, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */ - { 2204, 0x000088BC }, /* GL_BUFFER_MAPPED */ - { 2221, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */ - { 2242, 0x000088BC }, /* GL_BUFFER_MAPPED_OES */ - { 2263, 0x00009120 }, /* GL_BUFFER_MAP_LENGTH */ - { 2284, 0x00009121 }, /* GL_BUFFER_MAP_OFFSET */ - { 2305, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */ - { 2327, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */ - { 2353, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_OES */ - { 2379, 0x000085B3 }, /* GL_BUFFER_OBJECT_APPLE */ - { 2402, 0x00008A12 }, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */ - { 2436, 0x00008764 }, /* GL_BUFFER_SIZE */ - { 2451, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */ - { 2470, 0x00008765 }, /* GL_BUFFER_USAGE */ - { 2486, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */ - { 2506, 0x0000877B }, /* GL_BUMP_ENVMAP_ATI */ - { 2525, 0x00008777 }, /* GL_BUMP_NUM_TEX_UNITS_ATI */ - { 2551, 0x00008775 }, /* GL_BUMP_ROT_MATRIX_ATI */ - { 2574, 0x00008776 }, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */ - { 2602, 0x0000877C }, /* GL_BUMP_TARGET_ATI */ - { 2621, 0x00008778 }, /* GL_BUMP_TEX_UNITS_ATI */ - { 2643, 0x00001400 }, /* GL_BYTE */ - { 2651, 0x00002A24 }, /* GL_C3F_V3F */ - { 2662, 0x00002A26 }, /* GL_C4F_N3F_V3F */ - { 2677, 0x00002A22 }, /* GL_C4UB_V2F */ - { 2689, 0x00002A23 }, /* GL_C4UB_V3F */ - { 2701, 0x00000901 }, /* GL_CCW */ - { 2708, 0x00002900 }, /* GL_CLAMP */ - { 2717, 0x0000891B }, /* GL_CLAMP_FRAGMENT_COLOR_ARB */ - { 2745, 0x0000891C }, /* GL_CLAMP_READ_COLOR */ - { 2765, 0x0000891C }, /* GL_CLAMP_READ_COLOR_ARB */ - { 2789, 0x0000812D }, /* GL_CLAMP_TO_BORDER */ - { 2808, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */ - { 2831, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */ - { 2855, 0x0000812F }, /* GL_CLAMP_TO_EDGE */ - { 2872, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */ - { 2894, 0x0000891A }, /* GL_CLAMP_VERTEX_COLOR_ARB */ - { 2920, 0x00001500 }, /* GL_CLEAR */ - { 2929, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */ - { 2954, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */ - { 2983, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */ - { 3009, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */ - { 3038, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */ - { 3064, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */ - { 3091, 0x00003000 }, /* GL_CLIP_DISTANCE0 */ - { 3109, 0x00003001 }, /* GL_CLIP_DISTANCE1 */ - { 3127, 0x00003002 }, /* GL_CLIP_DISTANCE2 */ - { 3145, 0x00003003 }, /* GL_CLIP_DISTANCE3 */ - { 3163, 0x00003004 }, /* GL_CLIP_DISTANCE4 */ - { 3181, 0x00003005 }, /* GL_CLIP_DISTANCE5 */ - { 3199, 0x00003006 }, /* GL_CLIP_DISTANCE6 */ - { 3217, 0x00003007 }, /* GL_CLIP_DISTANCE7 */ - { 3235, 0x00003000 }, /* GL_CLIP_PLANE0 */ - { 3250, 0x00003001 }, /* GL_CLIP_PLANE1 */ - { 3265, 0x00003002 }, /* GL_CLIP_PLANE2 */ - { 3280, 0x00003003 }, /* GL_CLIP_PLANE3 */ - { 3295, 0x00003004 }, /* GL_CLIP_PLANE4 */ - { 3310, 0x00003005 }, /* GL_CLIP_PLANE5 */ - { 3325, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */ - { 3358, 0x00000A00 }, /* GL_COEFF */ - { 3367, 0x00001800 }, /* GL_COLOR */ - { 3376, 0x00008076 }, /* GL_COLOR_ARRAY */ - { 3391, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */ - { 3421, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */ - { 3455, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */ - { 3478, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */ - { 3498, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */ - { 3520, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */ - { 3540, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0 */ - { 3561, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */ - { 3586, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_OES */ - { 3611, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1 */ - { 3632, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10 */ - { 3654, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */ - { 3680, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11 */ - { 3702, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */ - { 3728, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12 */ - { 3750, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */ - { 3776, 0x00008CED }, /* GL_COLOR_ATTACHMENT13 */ - { 3798, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */ - { 3824, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14 */ - { 3846, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */ - { 3872, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15 */ - { 3894, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */ - { 3920, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */ - { 3945, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2 */ - { 3966, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */ - { 3991, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3 */ - { 4012, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */ - { 4037, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4 */ - { 4058, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */ - { 4083, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5 */ - { 4104, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */ - { 4129, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6 */ - { 4150, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */ - { 4175, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7 */ - { 4196, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */ - { 4221, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8 */ - { 4242, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */ - { 4267, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9 */ - { 4288, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */ - { 4313, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */ - { 4333, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */ - { 4354, 0x00001900 }, /* GL_COLOR_INDEX */ - { 4369, 0x00001603 }, /* GL_COLOR_INDEXES */ - { 4386, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */ - { 4404, 0x00000B57 }, /* GL_COLOR_MATERIAL */ - { 4422, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */ - { 4445, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */ - { 4473, 0x000080B1 }, /* GL_COLOR_MATRIX */ - { 4489, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */ - { 4509, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */ - { 4537, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */ - { 4569, 0x00008458 }, /* GL_COLOR_SUM */ - { 4582, 0x00008458 }, /* GL_COLOR_SUM_ARB */ - { 4599, 0x000080D0 }, /* GL_COLOR_TABLE */ - { 4614, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */ - { 4640, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */ - { 4670, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */ - { 4700, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */ - { 4720, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */ - { 4744, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */ - { 4769, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */ - { 4798, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */ - { 4827, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */ - { 4849, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */ - { 4875, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */ - { 4901, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */ - { 4927, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */ - { 4957, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */ - { 4987, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */ - { 5017, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */ - { 5051, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */ - { 5085, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */ - { 5115, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */ - { 5149, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */ - { 5183, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */ - { 5207, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */ - { 5235, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */ - { 5263, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */ - { 5284, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */ - { 5309, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */ - { 5330, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */ - { 5355, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */ - { 5380, 0x00000C23 }, /* GL_COLOR_WRITEMASK */ - { 5399, 0x00008570 }, /* GL_COMBINE */ - { 5410, 0x00008503 }, /* GL_COMBINE4 */ - { 5422, 0x00008572 }, /* GL_COMBINE_ALPHA */ - { 5439, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */ - { 5460, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */ - { 5481, 0x00008570 }, /* GL_COMBINE_ARB */ - { 5496, 0x00008570 }, /* GL_COMBINE_EXT */ - { 5511, 0x00008571 }, /* GL_COMBINE_RGB */ - { 5526, 0x00008571 }, /* GL_COMBINE_RGB_ARB */ - { 5545, 0x00008571 }, /* GL_COMBINE_RGB_EXT */ - { 5564, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */ - { 5600, 0x0000884E }, /* GL_COMPARE_REF_TO_TEXTURE */ - { 5626, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */ - { 5650, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */ - { 5678, 0x00001300 }, /* GL_COMPILE */ - { 5689, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */ - { 5712, 0x00008B81 }, /* GL_COMPILE_STATUS */ - { 5730, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */ - { 5750, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */ - { 5774, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */ - { 5798, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */ - { 5826, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */ - { 5850, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */ - { 5880, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */ - { 5914, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */ - { 5942, 0x00008225 }, /* GL_COMPRESSED_RED */ - { 5960, 0x00008226 }, /* GL_COMPRESSED_RG */ - { 5977, 0x000084ED }, /* GL_COMPRESSED_RGB */ - { 5995, 0x000084EE }, /* GL_COMPRESSED_RGBA */ - { 6014, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */ - { 6037, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */ - { 6066, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */ - { 6099, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */ - { 6132, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */ - { 6165, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */ - { 6187, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */ - { 6215, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */ - { 6247, 0x00008C4A }, /* GL_COMPRESSED_SLUMINANCE */ - { 6272, 0x00008C4B }, /* GL_COMPRESSED_SLUMINANCE_ALPHA */ - { 6303, 0x00008C48 }, /* GL_COMPRESSED_SRGB */ - { 6322, 0x00008C49 }, /* GL_COMPRESSED_SRGB_ALPHA */ - { 6347, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */ - { 6377, 0x0000911C }, /* GL_CONDITION_SATISFIED */ - { 6400, 0x00008576 }, /* GL_CONSTANT */ - { 6412, 0x00008003 }, /* GL_CONSTANT_ALPHA */ - { 6430, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */ - { 6452, 0x00008576 }, /* GL_CONSTANT_ARB */ - { 6468, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */ - { 6492, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */ - { 6514, 0x00008001 }, /* GL_CONSTANT_COLOR */ - { 6532, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */ - { 6554, 0x00008576 }, /* GL_CONSTANT_EXT */ - { 6570, 0x00000002 }, /* GL_CONTEXT_COMPATIBILITY_PROFILE_BIT */ - { 6607, 0x00000001 }, /* GL_CONTEXT_CORE_PROFILE_BIT */ - { 6635, 0x0000821E }, /* GL_CONTEXT_FLAGS */ - { 6652, 0x00000001 }, /* GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT */ - { 6691, 0x00009126 }, /* GL_CONTEXT_PROFILE_MASK */ - { 6715, 0x00008010 }, /* GL_CONVOLUTION_1D */ - { 6733, 0x00008011 }, /* GL_CONVOLUTION_2D */ - { 6751, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */ - { 6779, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */ - { 6810, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */ - { 6837, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */ - { 6868, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */ - { 6895, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */ - { 6926, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */ - { 6954, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */ - { 6986, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */ - { 7008, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */ - { 7034, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */ - { 7056, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */ - { 7082, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */ - { 7103, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */ - { 7128, 0x00008862 }, /* GL_COORD_REPLACE */ - { 7145, 0x00008862 }, /* GL_COORD_REPLACE_ARB */ - { 7166, 0x00008862 }, /* GL_COORD_REPLACE_NV */ - { 7186, 0x00008862 }, /* GL_COORD_REPLACE_OES */ - { 7207, 0x00001503 }, /* GL_COPY */ - { 7215, 0x0000150C }, /* GL_COPY_INVERTED */ - { 7232, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */ - { 7252, 0x00008F36 }, /* GL_COPY_READ_BUFFER */ - { 7272, 0x00008F37 }, /* GL_COPY_WRITE_BUFFER */ - { 7293, 0x00000B44 }, /* GL_CULL_FACE */ - { 7306, 0x00000B45 }, /* GL_CULL_FACE_MODE */ - { 7324, 0x000081AA }, /* GL_CULL_VERTEX_EXT */ - { 7343, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */ - { 7375, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */ - { 7410, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */ - { 7431, 0x00000001 }, /* GL_CURRENT_BIT */ - { 7446, 0x00000B00 }, /* GL_CURRENT_COLOR */ - { 7463, 0x00008453 }, /* GL_CURRENT_FOG_COORD */ - { 7484, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */ - { 7510, 0x00000B01 }, /* GL_CURRENT_INDEX */ - { 7527, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */ - { 7549, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */ - { 7577, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */ - { 7598, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */ - { 7632, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */ - { 7665, 0x00000B02 }, /* GL_CURRENT_NORMAL */ - { 7683, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */ - { 7713, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_OES */ - { 7743, 0x00008B8D }, /* GL_CURRENT_PROGRAM */ - { 7762, 0x00008865 }, /* GL_CURRENT_QUERY */ - { 7779, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */ - { 7800, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */ - { 7824, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */ - { 7851, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */ - { 7875, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */ - { 7902, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */ - { 7935, 0x0000845F }, /* GL_CURRENT_RASTER_SECONDARY_COLOR */ - { 7969, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */ - { 8002, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */ - { 8029, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */ - { 8055, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */ - { 8080, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */ - { 8109, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */ - { 8131, 0x00000900 }, /* GL_CW */ - { 8137, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */ - { 8158, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */ - { 8179, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */ - { 8199, 0x00002101 }, /* GL_DECAL */ - { 8208, 0x00001E03 }, /* GL_DECR */ - { 8216, 0x00008508 }, /* GL_DECR_WRAP */ - { 8229, 0x00008508 }, /* GL_DECR_WRAP_EXT */ - { 8246, 0x00008B80 }, /* GL_DELETE_STATUS */ - { 8263, 0x00001801 }, /* GL_DEPTH */ - { 8272, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */ - { 8292, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */ - { 8316, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_OES */ - { 8340, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */ - { 8360, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */ - { 8384, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_OES */ - { 8408, 0x00000D1F }, /* GL_DEPTH_BIAS */ - { 8422, 0x00000D56 }, /* GL_DEPTH_BITS */ - { 8436, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */ - { 8456, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */ - { 8481, 0x00008223 }, /* GL_DEPTH_BUFFER */ - { 8497, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */ - { 8517, 0x0000864F }, /* GL_DEPTH_CLAMP */ - { 8532, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */ - { 8550, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */ - { 8571, 0x00001902 }, /* GL_DEPTH_COMPONENT */ - { 8590, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */ - { 8611, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */ - { 8636, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_OES */ - { 8661, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */ - { 8687, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */ - { 8708, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */ - { 8733, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_OES */ - { 8758, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */ - { 8784, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */ - { 8805, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */ - { 8830, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_OES */ - { 8855, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */ - { 8881, 0x00000B74 }, /* GL_DEPTH_FUNC */ - { 8895, 0x00000B70 }, /* GL_DEPTH_RANGE */ - { 8910, 0x00000D1E }, /* GL_DEPTH_SCALE */ - { 8925, 0x000084F9 }, /* GL_DEPTH_STENCIL */ - { 8942, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */ - { 8970, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */ - { 8991, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */ - { 9011, 0x000084F9 }, /* GL_DEPTH_STENCIL_OES */ - { 9032, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */ - { 9060, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */ - { 9088, 0x00000B71 }, /* GL_DEPTH_TEST */ - { 9102, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */ - { 9124, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */ - { 9150, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */ - { 9169, 0x00001201 }, /* GL_DIFFUSE */ - { 9180, 0x00000BD0 }, /* GL_DITHER */ - { 9190, 0x00000A02 }, /* GL_DOMAIN */ - { 9200, 0x00001100 }, /* GL_DONT_CARE */ - { 9213, 0x000086AE }, /* GL_DOT3_RGB */ - { 9225, 0x000086AF }, /* GL_DOT3_RGBA */ - { 9238, 0x000086AF }, /* GL_DOT3_RGBA_ARB */ - { 9255, 0x00008741 }, /* GL_DOT3_RGBA_EXT */ - { 9272, 0x000086AE }, /* GL_DOT3_RGB_ARB */ - { 9288, 0x00008740 }, /* GL_DOT3_RGB_EXT */ - { 9304, 0x0000140A }, /* GL_DOUBLE */ - { 9314, 0x00000C32 }, /* GL_DOUBLEBUFFER */ - { 9330, 0x00000C01 }, /* GL_DRAW_BUFFER */ - { 9345, 0x00008825 }, /* GL_DRAW_BUFFER0 */ - { 9361, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */ - { 9381, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */ - { 9401, 0x00008826 }, /* GL_DRAW_BUFFER1 */ - { 9417, 0x0000882F }, /* GL_DRAW_BUFFER10 */ - { 9434, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */ - { 9455, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */ - { 9476, 0x00008830 }, /* GL_DRAW_BUFFER11 */ - { 9493, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */ - { 9514, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */ - { 9535, 0x00008831 }, /* GL_DRAW_BUFFER12 */ - { 9552, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */ - { 9573, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */ - { 9594, 0x00008832 }, /* GL_DRAW_BUFFER13 */ - { 9611, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */ - { 9632, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */ - { 9653, 0x00008833 }, /* GL_DRAW_BUFFER14 */ - { 9670, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */ - { 9691, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */ - { 9712, 0x00008834 }, /* GL_DRAW_BUFFER15 */ - { 9729, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */ - { 9750, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */ - { 9771, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */ - { 9791, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */ - { 9811, 0x00008827 }, /* GL_DRAW_BUFFER2 */ - { 9827, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */ - { 9847, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */ - { 9867, 0x00008828 }, /* GL_DRAW_BUFFER3 */ - { 9883, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */ - { 9903, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */ - { 9923, 0x00008829 }, /* GL_DRAW_BUFFER4 */ - { 9939, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */ - { 9959, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */ - { 9979, 0x0000882A }, /* GL_DRAW_BUFFER5 */ - { 9995, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */ - { 10015, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */ - { 10035, 0x0000882B }, /* GL_DRAW_BUFFER6 */ - { 10051, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */ - { 10071, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */ - { 10091, 0x0000882C }, /* GL_DRAW_BUFFER7 */ - { 10107, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */ - { 10127, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */ - { 10147, 0x0000882D }, /* GL_DRAW_BUFFER8 */ - { 10163, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */ - { 10183, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */ - { 10203, 0x0000882E }, /* GL_DRAW_BUFFER9 */ - { 10219, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */ - { 10239, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */ - { 10259, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */ - { 10279, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */ - { 10307, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */ - { 10339, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */ - { 10363, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */ - { 10383, 0x00000304 }, /* GL_DST_ALPHA */ - { 10396, 0x00000306 }, /* GL_DST_COLOR */ - { 10409, 0x0000877A }, /* GL_DU8DV8_ATI */ - { 10423, 0x00008779 }, /* GL_DUDV_ATI */ - { 10435, 0x000088EA }, /* GL_DYNAMIC_COPY */ - { 10451, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */ - { 10471, 0x000088E8 }, /* GL_DYNAMIC_DRAW */ - { 10487, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */ - { 10507, 0x000088E9 }, /* GL_DYNAMIC_READ */ - { 10523, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */ - { 10543, 0x00000B43 }, /* GL_EDGE_FLAG */ - { 10556, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */ - { 10575, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */ - { 10609, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */ - { 10647, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */ - { 10674, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */ - { 10700, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */ - { 10724, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */ - { 10756, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */ - { 10792, 0x00001600 }, /* GL_EMISSION */ - { 10804, 0x00002000 }, /* GL_ENABLE_BIT */ - { 10818, 0x00000202 }, /* GL_EQUAL */ - { 10827, 0x00001509 }, /* GL_EQUIV */ - { 10836, 0x00010000 }, /* GL_EVAL_BIT */ - { 10848, 0x00000800 }, /* GL_EXP */ - { 10855, 0x00000801 }, /* GL_EXP2 */ - { 10863, 0x00001F03 }, /* GL_EXTENSIONS */ - { 10877, 0x00002400 }, /* GL_EYE_LINEAR */ - { 10891, 0x00002502 }, /* GL_EYE_PLANE */ - { 10904, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */ - { 10929, 0x0000855B }, /* GL_EYE_RADIAL_NV */ - { 10946, 0x00000000 }, /* GL_FALSE */ - { 10955, 0x00001101 }, /* GL_FASTEST */ - { 10966, 0x00001C01 }, /* GL_FEEDBACK */ - { 10978, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */ - { 11005, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */ - { 11029, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */ - { 11053, 0x00001B02 }, /* GL_FILL */ - { 11061, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */ - { 11088, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */ - { 11119, 0x0000140C }, /* GL_FIXED */ - { 11128, 0x0000140C }, /* GL_FIXED_OES */ - { 11141, 0x0000891D }, /* GL_FIXED_ONLY */ - { 11155, 0x0000891D }, /* GL_FIXED_ONLY_ARB */ - { 11173, 0x00001D00 }, /* GL_FLAT */ - { 11181, 0x00001406 }, /* GL_FLOAT */ - { 11190, 0x00008B5A }, /* GL_FLOAT_MAT2 */ - { 11204, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */ - { 11222, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */ - { 11238, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */ - { 11254, 0x00008B5B }, /* GL_FLOAT_MAT3 */ - { 11268, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */ - { 11286, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */ - { 11302, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */ - { 11318, 0x00008B5C }, /* GL_FLOAT_MAT4 */ - { 11332, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */ - { 11350, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */ - { 11366, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */ - { 11382, 0x00008B50 }, /* GL_FLOAT_VEC2 */ - { 11396, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */ - { 11414, 0x00008B51 }, /* GL_FLOAT_VEC3 */ - { 11428, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */ - { 11446, 0x00008B52 }, /* GL_FLOAT_VEC4 */ - { 11460, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */ - { 11478, 0x00000B60 }, /* GL_FOG */ - { 11485, 0x00000080 }, /* GL_FOG_BIT */ - { 11496, 0x00000B66 }, /* GL_FOG_COLOR */ - { 11509, 0x00008451 }, /* GL_FOG_COORD */ - { 11522, 0x00008451 }, /* GL_FOG_COORDINATE */ - { 11540, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */ - { 11564, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */ - { 11603, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */ - { 11646, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */ - { 11678, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */ - { 11709, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */ - { 11738, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */ - { 11763, 0x00008457 }, /* GL_FOG_COORD_ARRAY */ - { 11782, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */ - { 11816, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */ - { 11843, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */ - { 11869, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */ - { 11893, 0x00008450 }, /* GL_FOG_COORD_SRC */ - { 11910, 0x00000B62 }, /* GL_FOG_DENSITY */ - { 11925, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */ - { 11949, 0x00000B64 }, /* GL_FOG_END */ - { 11960, 0x00000C54 }, /* GL_FOG_HINT */ - { 11972, 0x00000B61 }, /* GL_FOG_INDEX */ - { 11985, 0x00000B65 }, /* GL_FOG_MODE */ - { 11997, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */ - { 12016, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */ - { 12041, 0x00000B63 }, /* GL_FOG_START */ - { 12054, 0x00008452 }, /* GL_FRAGMENT_DEPTH */ - { 12072, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */ - { 12096, 0x00008B30 }, /* GL_FRAGMENT_SHADER */ - { 12115, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */ - { 12138, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */ - { 12173, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES */ - { 12212, 0x00008D40 }, /* GL_FRAMEBUFFER */ - { 12227, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ - { 12264, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ - { 12300, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ - { 12341, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ - { 12382, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ - { 12419, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ - { 12456, 0x00008DA7 }, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED */ - { 12490, 0x00008DA7 }, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB */ - { 12528, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ - { 12566, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */ - { 12608, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES */ - { 12650, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ - { 12688, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */ - { 12730, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES */ - { 12772, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ - { 12807, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ - { 12846, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */ - { 12895, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES */ - { 12944, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ - { 12992, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */ - { 13044, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES */ - { 13096, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ - { 13136, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */ - { 13180, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ - { 13220, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */ - { 13264, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES */ - { 13308, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */ - { 13331, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */ - { 13358, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_OES */ - { 13385, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */ - { 13409, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */ - { 13437, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_OES */ - { 13465, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */ - { 13488, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */ - { 13507, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ - { 13544, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */ - { 13585, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES */ - { 13626, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS */ - { 13663, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */ - { 13704, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES */ - { 13745, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ - { 13783, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */ - { 13825, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES */ - { 13867, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */ - { 13918, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */ - { 13956, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES */ - { 13994, 0x00008DA9 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */ - { 14036, 0x00008DA8 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS */ - { 14076, 0x00008DA8 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB */ - { 14120, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ - { 14165, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */ - { 14214, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES */ - { 14263, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ - { 14301, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */ - { 14343, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ - { 14381, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */ - { 14423, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES */ - { 14465, 0x00008D40 }, /* GL_FRAMEBUFFER_OES */ - { 14484, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */ - { 14516, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */ - { 14541, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */ - { 14568, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */ - { 14599, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_OES */ - { 14630, 0x00000404 }, /* GL_FRONT */ - { 14639, 0x00000408 }, /* GL_FRONT_AND_BACK */ - { 14657, 0x00000B46 }, /* GL_FRONT_FACE */ - { 14671, 0x00000400 }, /* GL_FRONT_LEFT */ - { 14685, 0x00000401 }, /* GL_FRONT_RIGHT */ - { 14700, 0x00008006 }, /* GL_FUNC_ADD */ - { 14712, 0x00008006 }, /* GL_FUNC_ADD_EXT */ - { 14728, 0x00008006 }, /* GL_FUNC_ADD_OES */ - { 14744, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */ - { 14769, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */ - { 14798, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_OES */ - { 14827, 0x0000800A }, /* GL_FUNC_SUBTRACT */ - { 14844, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */ - { 14865, 0x0000800A }, /* GL_FUNC_SUBTRACT_OES */ - { 14886, 0x00008191 }, /* GL_GENERATE_MIPMAP */ - { 14905, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */ - { 14929, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */ - { 14958, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */ - { 14982, 0x00008917 }, /* GL_GEOMETRY_INPUT_TYPE */ - { 15005, 0x00008DDB }, /* GL_GEOMETRY_INPUT_TYPE_ARB */ - { 15032, 0x00008918 }, /* GL_GEOMETRY_OUTPUT_TYPE */ - { 15056, 0x00008DDC }, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */ - { 15084, 0x00008DD9 }, /* GL_GEOMETRY_SHADER */ - { 15103, 0x00008DD9 }, /* GL_GEOMETRY_SHADER_ARB */ - { 15126, 0x00008916 }, /* GL_GEOMETRY_VERTICES_OUT */ - { 15151, 0x00008DDA }, /* GL_GEOMETRY_VERTICES_OUT_ARB */ - { 15180, 0x00000206 }, /* GL_GEQUAL */ - { 15190, 0x00000204 }, /* GL_GREATER */ - { 15201, 0x00001904 }, /* GL_GREEN */ - { 15210, 0x00000D19 }, /* GL_GREEN_BIAS */ - { 15224, 0x00000D53 }, /* GL_GREEN_BITS */ - { 15238, 0x00008D95 }, /* GL_GREEN_INTEGER */ - { 15255, 0x00008D95 }, /* GL_GREEN_INTEGER_EXT */ - { 15276, 0x00000D18 }, /* GL_GREEN_SCALE */ - { 15291, 0x0000140B }, /* GL_HALF_FLOAT */ - { 15305, 0x00008D61 }, /* GL_HALF_FLOAT_OES */ - { 15323, 0x00008DF2 }, /* GL_HIGH_FLOAT */ - { 15337, 0x00008DF5 }, /* GL_HIGH_INT */ - { 15349, 0x00008000 }, /* GL_HINT_BIT */ - { 15361, 0x00008024 }, /* GL_HISTOGRAM */ - { 15374, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */ - { 15398, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */ - { 15426, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */ - { 15449, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */ - { 15476, 0x00008024 }, /* GL_HISTOGRAM_EXT */ - { 15493, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */ - { 15513, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */ - { 15537, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */ - { 15561, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */ - { 15589, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */ - { 15617, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */ - { 15649, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */ - { 15671, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */ - { 15697, 0x0000802D }, /* GL_HISTOGRAM_SINK */ - { 15715, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */ - { 15737, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */ - { 15756, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */ - { 15779, 0x0000862A }, /* GL_IDENTITY_NV */ - { 15794, 0x00008150 }, /* GL_IGNORE_BORDER_HP */ - { 15814, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT */ - { 15850, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ - { 15890, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE */ - { 15924, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ - { 15962, 0x00001E02 }, /* GL_INCR */ - { 15970, 0x00008507 }, /* GL_INCR_WRAP */ - { 15983, 0x00008507 }, /* GL_INCR_WRAP_EXT */ - { 16000, 0x00008222 }, /* GL_INDEX */ - { 16009, 0x00008077 }, /* GL_INDEX_ARRAY */ - { 16024, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */ - { 16054, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */ - { 16088, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */ - { 16111, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */ - { 16133, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */ - { 16153, 0x00000D51 }, /* GL_INDEX_BITS */ - { 16167, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */ - { 16188, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */ - { 16206, 0x00000C30 }, /* GL_INDEX_MODE */ - { 16220, 0x00000D13 }, /* GL_INDEX_OFFSET */ - { 16236, 0x00000D12 }, /* GL_INDEX_SHIFT */ - { 16251, 0x00000C21 }, /* GL_INDEX_WRITEMASK */ - { 16270, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */ - { 16289, 0x00001404 }, /* GL_INT */ - { 16296, 0x00008049 }, /* GL_INTENSITY */ - { 16309, 0x0000804C }, /* GL_INTENSITY12 */ - { 16324, 0x0000804C }, /* GL_INTENSITY12_EXT */ - { 16343, 0x0000804D }, /* GL_INTENSITY16 */ - { 16358, 0x00008D8B }, /* GL_INTENSITY16I_EXT */ - { 16378, 0x00008D79 }, /* GL_INTENSITY16UI_EXT */ - { 16399, 0x0000804D }, /* GL_INTENSITY16_EXT */ - { 16418, 0x00008D85 }, /* GL_INTENSITY32I_EXT */ - { 16438, 0x00008D73 }, /* GL_INTENSITY32UI_EXT */ - { 16459, 0x0000804A }, /* GL_INTENSITY4 */ - { 16473, 0x0000804A }, /* GL_INTENSITY4_EXT */ - { 16491, 0x0000804B }, /* GL_INTENSITY8 */ - { 16505, 0x00008D91 }, /* GL_INTENSITY8I_EXT */ - { 16524, 0x00008D7F }, /* GL_INTENSITY8UI_EXT */ - { 16544, 0x0000804B }, /* GL_INTENSITY8_EXT */ - { 16562, 0x00008049 }, /* GL_INTENSITY_EXT */ - { 16579, 0x00008C8C }, /* GL_INTERLEAVED_ATTRIBS */ - { 16602, 0x00008C8C }, /* GL_INTERLEAVED_ATTRIBS_EXT */ - { 16629, 0x00008575 }, /* GL_INTERPOLATE */ - { 16644, 0x00008575 }, /* GL_INTERPOLATE_ARB */ - { 16663, 0x00008575 }, /* GL_INTERPOLATE_EXT */ - { 16682, 0x00008DF7 }, /* GL_INT_10_10_10_2_OES */ - { 16704, 0x00008DC9 }, /* GL_INT_SAMPLER_1D */ - { 16722, 0x00008DCE }, /* GL_INT_SAMPLER_1D_ARRAY */ - { 16746, 0x00008DCE }, /* GL_INT_SAMPLER_1D_ARRAY_EXT */ - { 16774, 0x00008DC9 }, /* GL_INT_SAMPLER_1D_EXT */ - { 16796, 0x00008DCA }, /* GL_INT_SAMPLER_2D */ - { 16814, 0x00008DCF }, /* GL_INT_SAMPLER_2D_ARRAY */ - { 16838, 0x00008DCF }, /* GL_INT_SAMPLER_2D_ARRAY_EXT */ - { 16866, 0x00008DCA }, /* GL_INT_SAMPLER_2D_EXT */ - { 16888, 0x00008DCD }, /* GL_INT_SAMPLER_2D_RECT */ - { 16911, 0x00008DCD }, /* GL_INT_SAMPLER_2D_RECT_EXT */ - { 16938, 0x00008DCB }, /* GL_INT_SAMPLER_3D */ - { 16956, 0x00008DCB }, /* GL_INT_SAMPLER_3D_EXT */ - { 16978, 0x00008DD0 }, /* GL_INT_SAMPLER_BUFFER */ - { 17000, 0x00008DD0 }, /* GL_INT_SAMPLER_BUFFER_EXT */ - { 17026, 0x00008DCC }, /* GL_INT_SAMPLER_CUBE */ - { 17046, 0x00008DCC }, /* GL_INT_SAMPLER_CUBE_EXT */ - { 17070, 0x00008B53 }, /* GL_INT_VEC2 */ - { 17082, 0x00008B53 }, /* GL_INT_VEC2_ARB */ - { 17098, 0x00008B54 }, /* GL_INT_VEC3 */ - { 17110, 0x00008B54 }, /* GL_INT_VEC3_ARB */ - { 17126, 0x00008B55 }, /* GL_INT_VEC4 */ - { 17138, 0x00008B55 }, /* GL_INT_VEC4_ARB */ - { 17154, 0x00000500 }, /* GL_INVALID_ENUM */ - { 17170, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */ - { 17203, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */ - { 17240, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_OES */ - { 17277, 0x00000502 }, /* GL_INVALID_OPERATION */ - { 17298, 0x00000501 }, /* GL_INVALID_VALUE */ - { 17315, 0x0000862B }, /* GL_INVERSE_NV */ - { 17329, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */ - { 17353, 0x0000150A }, /* GL_INVERT */ - { 17363, 0x00001E00 }, /* GL_KEEP */ - { 17371, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */ - { 17397, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */ - { 17427, 0x00000406 }, /* GL_LEFT */ - { 17435, 0x00000203 }, /* GL_LEQUAL */ - { 17445, 0x00000201 }, /* GL_LESS */ - { 17453, 0x00004000 }, /* GL_LIGHT0 */ - { 17463, 0x00004001 }, /* GL_LIGHT1 */ - { 17473, 0x00004002 }, /* GL_LIGHT2 */ - { 17483, 0x00004003 }, /* GL_LIGHT3 */ - { 17493, 0x00004004 }, /* GL_LIGHT4 */ - { 17503, 0x00004005 }, /* GL_LIGHT5 */ - { 17513, 0x00004006 }, /* GL_LIGHT6 */ - { 17523, 0x00004007 }, /* GL_LIGHT7 */ - { 17533, 0x00000B50 }, /* GL_LIGHTING */ - { 17545, 0x00000040 }, /* GL_LIGHTING_BIT */ - { 17561, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */ - { 17584, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */ - { 17613, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */ - { 17646, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ - { 17674, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */ - { 17698, 0x00001B01 }, /* GL_LINE */ - { 17706, 0x00002601 }, /* GL_LINEAR */ - { 17716, 0x00001208 }, /* GL_LINEAR_ATTENUATION */ - { 17738, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ - { 17768, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ - { 17799, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */ - { 17823, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */ - { 17848, 0x00000001 }, /* GL_LINES */ - { 17857, 0x0000000A }, /* GL_LINES_ADJACENCY */ - { 17876, 0x0000000A }, /* GL_LINES_ADJACENCY_ARB */ - { 17899, 0x00000004 }, /* GL_LINE_BIT */ - { 17911, 0x00000002 }, /* GL_LINE_LOOP */ - { 17924, 0x00000707 }, /* GL_LINE_RESET_TOKEN */ - { 17944, 0x00000B20 }, /* GL_LINE_SMOOTH */ - { 17959, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */ - { 17979, 0x00000B24 }, /* GL_LINE_STIPPLE */ - { 17995, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */ - { 18019, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */ - { 18042, 0x00000003 }, /* GL_LINE_STRIP */ - { 18056, 0x0000000B }, /* GL_LINE_STRIP_ADJACENCY */ - { 18080, 0x0000000B }, /* GL_LINE_STRIP_ADJACENCY_ARB */ - { 18108, 0x00000702 }, /* GL_LINE_TOKEN */ - { 18122, 0x00000B21 }, /* GL_LINE_WIDTH */ - { 18136, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */ - { 18162, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */ - { 18182, 0x00008B82 }, /* GL_LINK_STATUS */ - { 18197, 0x00000B32 }, /* GL_LIST_BASE */ - { 18210, 0x00020000 }, /* GL_LIST_BIT */ - { 18222, 0x00000B33 }, /* GL_LIST_INDEX */ - { 18236, 0x00000B30 }, /* GL_LIST_MODE */ - { 18249, 0x00000101 }, /* GL_LOAD */ - { 18257, 0x00000BF1 }, /* GL_LOGIC_OP */ - { 18269, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */ - { 18286, 0x00008CA1 }, /* GL_LOWER_LEFT */ - { 18300, 0x00008DF0 }, /* GL_LOW_FLOAT */ - { 18313, 0x00008DF3 }, /* GL_LOW_INT */ - { 18324, 0x00001909 }, /* GL_LUMINANCE */ - { 18337, 0x00008041 }, /* GL_LUMINANCE12 */ - { 18352, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */ - { 18375, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */ - { 18402, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */ - { 18424, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */ - { 18450, 0x00008041 }, /* GL_LUMINANCE12_EXT */ - { 18469, 0x00008042 }, /* GL_LUMINANCE16 */ - { 18484, 0x00008D8C }, /* GL_LUMINANCE16I_EXT */ - { 18504, 0x00008D7A }, /* GL_LUMINANCE16UI_EXT */ - { 18525, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */ - { 18548, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */ - { 18575, 0x00008042 }, /* GL_LUMINANCE16_EXT */ - { 18594, 0x00008D86 }, /* GL_LUMINANCE32I_EXT */ - { 18614, 0x00008D74 }, /* GL_LUMINANCE32UI_EXT */ - { 18635, 0x0000803F }, /* GL_LUMINANCE4 */ - { 18649, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */ - { 18670, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */ - { 18695, 0x0000803F }, /* GL_LUMINANCE4_EXT */ - { 18713, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */ - { 18734, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */ - { 18759, 0x00008040 }, /* GL_LUMINANCE8 */ - { 18773, 0x00008D92 }, /* GL_LUMINANCE8I_EXT */ - { 18792, 0x00008D80 }, /* GL_LUMINANCE8UI_EXT */ - { 18812, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */ - { 18833, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */ - { 18858, 0x00008040 }, /* GL_LUMINANCE8_EXT */ - { 18876, 0x0000190A }, /* GL_LUMINANCE_ALPHA */ - { 18895, 0x00008D8D }, /* GL_LUMINANCE_ALPHA16I_EXT */ - { 18921, 0x00008D7B }, /* GL_LUMINANCE_ALPHA16UI_EXT */ - { 18948, 0x00008D87 }, /* GL_LUMINANCE_ALPHA32I_EXT */ - { 18974, 0x00008D75 }, /* GL_LUMINANCE_ALPHA32UI_EXT */ - { 19001, 0x00008D93 }, /* GL_LUMINANCE_ALPHA8I_EXT */ - { 19026, 0x00008D81 }, /* GL_LUMINANCE_ALPHA8UI_EXT */ - { 19052, 0x00008D9D }, /* GL_LUMINANCE_ALPHA_INTEGER_EXT */ - { 19083, 0x00008D9C }, /* GL_LUMINANCE_INTEGER_EXT */ - { 19108, 0x0000821B }, /* GL_MAJOR_VERSION */ - { 19125, 0x00000D90 }, /* GL_MAP1_COLOR_4 */ - { 19141, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */ - { 19161, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */ - { 19183, 0x00000D91 }, /* GL_MAP1_INDEX */ - { 19197, 0x00000D92 }, /* GL_MAP1_NORMAL */ - { 19212, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */ - { 19236, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */ - { 19260, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */ - { 19284, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */ - { 19308, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */ - { 19325, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */ - { 19342, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ - { 19370, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ - { 19399, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ - { 19428, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ - { 19457, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ - { 19486, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ - { 19515, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ - { 19544, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ - { 19572, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ - { 19600, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ - { 19628, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ - { 19656, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ - { 19684, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ - { 19712, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ - { 19740, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ - { 19768, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ - { 19796, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */ - { 19812, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */ - { 19832, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */ - { 19854, 0x00000DB1 }, /* GL_MAP2_INDEX */ - { 19868, 0x00000DB2 }, /* GL_MAP2_NORMAL */ - { 19883, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */ - { 19907, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */ - { 19931, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */ - { 19955, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */ - { 19979, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */ - { 19996, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */ - { 20013, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ - { 20041, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ - { 20070, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ - { 20099, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ - { 20128, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ - { 20157, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ - { 20186, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ - { 20215, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ - { 20243, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ - { 20271, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ - { 20299, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ - { 20327, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ - { 20355, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ - { 20383, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */ - { 20411, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ - { 20439, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ - { 20467, 0x00000D10 }, /* GL_MAP_COLOR */ - { 20480, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */ - { 20506, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */ - { 20535, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */ - { 20563, 0x00000001 }, /* GL_MAP_READ_BIT */ - { 20579, 0x00000D11 }, /* GL_MAP_STENCIL */ - { 20594, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */ - { 20620, 0x00000002 }, /* GL_MAP_WRITE_BIT */ - { 20637, 0x000088C0 }, /* GL_MATRIX0_ARB */ - { 20652, 0x00008630 }, /* GL_MATRIX0_NV */ - { 20666, 0x000088CA }, /* GL_MATRIX10_ARB */ - { 20682, 0x000088CB }, /* GL_MATRIX11_ARB */ - { 20698, 0x000088CC }, /* GL_MATRIX12_ARB */ - { 20714, 0x000088CD }, /* GL_MATRIX13_ARB */ - { 20730, 0x000088CE }, /* GL_MATRIX14_ARB */ - { 20746, 0x000088CF }, /* GL_MATRIX15_ARB */ - { 20762, 0x000088D0 }, /* GL_MATRIX16_ARB */ - { 20778, 0x000088D1 }, /* GL_MATRIX17_ARB */ - { 20794, 0x000088D2 }, /* GL_MATRIX18_ARB */ - { 20810, 0x000088D3 }, /* GL_MATRIX19_ARB */ - { 20826, 0x000088C1 }, /* GL_MATRIX1_ARB */ - { 20841, 0x00008631 }, /* GL_MATRIX1_NV */ - { 20855, 0x000088D4 }, /* GL_MATRIX20_ARB */ - { 20871, 0x000088D5 }, /* GL_MATRIX21_ARB */ - { 20887, 0x000088D6 }, /* GL_MATRIX22_ARB */ - { 20903, 0x000088D7 }, /* GL_MATRIX23_ARB */ - { 20919, 0x000088D8 }, /* GL_MATRIX24_ARB */ - { 20935, 0x000088D9 }, /* GL_MATRIX25_ARB */ - { 20951, 0x000088DA }, /* GL_MATRIX26_ARB */ - { 20967, 0x000088DB }, /* GL_MATRIX27_ARB */ - { 20983, 0x000088DC }, /* GL_MATRIX28_ARB */ - { 20999, 0x000088DD }, /* GL_MATRIX29_ARB */ - { 21015, 0x000088C2 }, /* GL_MATRIX2_ARB */ - { 21030, 0x00008632 }, /* GL_MATRIX2_NV */ - { 21044, 0x000088DE }, /* GL_MATRIX30_ARB */ - { 21060, 0x000088DF }, /* GL_MATRIX31_ARB */ - { 21076, 0x000088C3 }, /* GL_MATRIX3_ARB */ - { 21091, 0x00008633 }, /* GL_MATRIX3_NV */ - { 21105, 0x000088C4 }, /* GL_MATRIX4_ARB */ - { 21120, 0x00008634 }, /* GL_MATRIX4_NV */ - { 21134, 0x000088C5 }, /* GL_MATRIX5_ARB */ - { 21149, 0x00008635 }, /* GL_MATRIX5_NV */ - { 21163, 0x000088C6 }, /* GL_MATRIX6_ARB */ - { 21178, 0x00008636 }, /* GL_MATRIX6_NV */ - { 21192, 0x000088C7 }, /* GL_MATRIX7_ARB */ - { 21207, 0x00008637 }, /* GL_MATRIX7_NV */ - { 21221, 0x000088C8 }, /* GL_MATRIX8_ARB */ - { 21236, 0x000088C9 }, /* GL_MATRIX9_ARB */ - { 21251, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */ - { 21277, 0x00008B9E }, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */ - { 21318, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_OES */ - { 21344, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ - { 21378, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_OES */ - { 21412, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ - { 21443, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_OES */ - { 21474, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ - { 21507, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_OES */ - { 21540, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ - { 21571, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_OES */ - { 21602, 0x00000BA0 }, /* GL_MATRIX_MODE */ - { 21617, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */ - { 21639, 0x00008840 }, /* GL_MATRIX_PALETTE_OES */ - { 21661, 0x00008008 }, /* GL_MAX */ - { 21668, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */ - { 21691, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE_OES */ - { 21718, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS */ - { 21746, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */ - { 21778, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */ - { 21804, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ - { 21837, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ - { 21863, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - { 21897, 0x00000D32 }, /* GL_MAX_CLIP_DISTANCES */ - { 21919, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */ - { 21938, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */ - { 21963, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */ - { 21992, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ - { 22024, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */ - { 22060, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ - { 22096, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */ - { 22136, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */ - { 22162, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */ - { 22192, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */ - { 22217, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */ - { 22246, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ - { 22275, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */ - { 22308, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES */ - { 22341, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */ - { 22361, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */ - { 22385, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */ - { 22409, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */ - { 22433, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */ - { 22458, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */ - { 22476, 0x00008008 }, /* GL_MAX_EXT */ - { 22487, 0x00009125 }, /* GL_MAX_FRAGMENT_INPUT_COMPONENTS */ - { 22520, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */ - { 22555, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */ - { 22594, 0x00008DFD }, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */ - { 22626, 0x00009123 }, /* GL_MAX_GEOMETRY_INPUT_COMPONENTS */ - { 22659, 0x00009124 }, /* GL_MAX_GEOMETRY_OUTPUT_COMPONENTS */ - { 22693, 0x00008DE0 }, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES */ - { 22725, 0x00008DE0 }, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB */ - { 22761, 0x00008C29 }, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS */ - { 22797, 0x00008C29 }, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB */ - { 22837, 0x00008DE1 }, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS */ - { 22877, 0x00008DE1 }, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB */ - { 22921, 0x00008DDF }, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS */ - { 22956, 0x00008DDF }, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB */ - { 22995, 0x00008DDD }, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */ - { 23034, 0x00000D31 }, /* GL_MAX_LIGHTS */ - { 23048, 0x00000B31 }, /* GL_MAX_LIST_NESTING */ - { 23068, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ - { 23106, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */ - { 23135, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */ - { 23159, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */ - { 23187, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_OES */ - { 23215, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */ - { 23238, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ - { 23275, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ - { 23311, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ - { 23338, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ - { 23367, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ - { 23401, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */ - { 23437, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ - { 23464, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ - { 23496, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ - { 23532, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ - { 23561, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ - { 23590, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */ - { 23618, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ - { 23656, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - { 23700, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - { 23743, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ - { 23777, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - { 23816, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ - { 23853, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ - { 23891, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - { 23934, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - { 23977, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ - { 24007, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ - { 24038, 0x00008905 }, /* GL_MAX_PROGRAM_TEXEL_OFFSET */ - { 24066, 0x00008905 }, /* GL_MAX_PROGRAM_TEXEL_OFFSET_EXT */ - { 24098, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ - { 24134, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ - { 24170, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */ - { 24200, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE */ - { 24230, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ - { 24264, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */ - { 24297, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */ - { 24322, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */ - { 24351, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_OES */ - { 24380, 0x00008D57 }, /* GL_MAX_SAMPLES */ - { 24395, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */ - { 24414, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */ - { 24441, 0x00008504 }, /* GL_MAX_SHININESS_NV */ - { 24461, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */ - { 24485, 0x00008C2B }, /* GL_MAX_TEXTURE_BUFFER_SIZE */ - { 24512, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */ - { 24534, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */ - { 24560, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */ - { 24587, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */ - { 24618, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */ - { 24642, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS_EXT */ - { 24670, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ - { 24704, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */ - { 24724, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */ - { 24751, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */ - { 24772, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */ - { 24797, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */ - { 24822, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */ - { 24857, 0x00008C8A }, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS */ - { 24906, 0x00008C8A }, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT */ - { 24959, 0x00008C8B }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS */ - { 25002, 0x00008C8B }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT */ - { 25049, 0x00008C80 }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS */ - { 25095, 0x00008C80 }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT */ - { 25145, 0x00008B4B }, /* GL_MAX_VARYING_COMPONENTS */ - { 25171, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */ - { 25193, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */ - { 25219, 0x00008DFC }, /* GL_MAX_VARYING_VECTORS */ - { 25242, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */ - { 25264, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */ - { 25290, 0x00009122 }, /* GL_MAX_VERTEX_OUTPUT_COMPONENTS */ - { 25322, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */ - { 25356, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */ - { 25394, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */ - { 25427, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */ - { 25464, 0x00008DFB }, /* GL_MAX_VERTEX_UNIFORM_VECTORS */ - { 25494, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */ - { 25518, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_OES */ - { 25542, 0x00008DDE }, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */ - { 25579, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */ - { 25600, 0x00008DF1 }, /* GL_MEDIUM_FLOAT */ - { 25616, 0x00008DF4 }, /* GL_MEDIUM_INT */ - { 25630, 0x00008007 }, /* GL_MIN */ - { 25637, 0x0000802E }, /* GL_MINMAX */ - { 25647, 0x0000802E }, /* GL_MINMAX_EXT */ - { 25661, 0x0000802F }, /* GL_MINMAX_FORMAT */ - { 25678, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */ - { 25699, 0x00008030 }, /* GL_MINMAX_SINK */ - { 25714, 0x00008030 }, /* GL_MINMAX_SINK_EXT */ - { 25733, 0x0000821C }, /* GL_MINOR_VERSION */ - { 25750, 0x00008007 }, /* GL_MIN_EXT */ - { 25761, 0x00008904 }, /* GL_MIN_PROGRAM_TEXEL_OFFSET */ - { 25789, 0x00008904 }, /* GL_MIN_PROGRAM_TEXEL_OFFSET_EXT */ - { 25821, 0x00008370 }, /* GL_MIRRORED_REPEAT */ - { 25840, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */ - { 25863, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */ - { 25886, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */ - { 25906, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */ - { 25926, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ - { 25956, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */ - { 25984, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ - { 26012, 0x00001700 }, /* GL_MODELVIEW */ - { 26025, 0x00001700 }, /* GL_MODELVIEW0_ARB */ - { 26043, 0x0000872A }, /* GL_MODELVIEW10_ARB */ - { 26062, 0x0000872B }, /* GL_MODELVIEW11_ARB */ - { 26081, 0x0000872C }, /* GL_MODELVIEW12_ARB */ - { 26100, 0x0000872D }, /* GL_MODELVIEW13_ARB */ - { 26119, 0x0000872E }, /* GL_MODELVIEW14_ARB */ - { 26138, 0x0000872F }, /* GL_MODELVIEW15_ARB */ - { 26157, 0x00008730 }, /* GL_MODELVIEW16_ARB */ - { 26176, 0x00008731 }, /* GL_MODELVIEW17_ARB */ - { 26195, 0x00008732 }, /* GL_MODELVIEW18_ARB */ - { 26214, 0x00008733 }, /* GL_MODELVIEW19_ARB */ - { 26233, 0x0000850A }, /* GL_MODELVIEW1_ARB */ - { 26251, 0x00008734 }, /* GL_MODELVIEW20_ARB */ - { 26270, 0x00008735 }, /* GL_MODELVIEW21_ARB */ - { 26289, 0x00008736 }, /* GL_MODELVIEW22_ARB */ - { 26308, 0x00008737 }, /* GL_MODELVIEW23_ARB */ - { 26327, 0x00008738 }, /* GL_MODELVIEW24_ARB */ - { 26346, 0x00008739 }, /* GL_MODELVIEW25_ARB */ - { 26365, 0x0000873A }, /* GL_MODELVIEW26_ARB */ - { 26384, 0x0000873B }, /* GL_MODELVIEW27_ARB */ - { 26403, 0x0000873C }, /* GL_MODELVIEW28_ARB */ - { 26422, 0x0000873D }, /* GL_MODELVIEW29_ARB */ - { 26441, 0x00008722 }, /* GL_MODELVIEW2_ARB */ - { 26459, 0x0000873E }, /* GL_MODELVIEW30_ARB */ - { 26478, 0x0000873F }, /* GL_MODELVIEW31_ARB */ - { 26497, 0x00008723 }, /* GL_MODELVIEW3_ARB */ - { 26515, 0x00008724 }, /* GL_MODELVIEW4_ARB */ - { 26533, 0x00008725 }, /* GL_MODELVIEW5_ARB */ - { 26551, 0x00008726 }, /* GL_MODELVIEW6_ARB */ - { 26569, 0x00008727 }, /* GL_MODELVIEW7_ARB */ - { 26587, 0x00008728 }, /* GL_MODELVIEW8_ARB */ - { 26605, 0x00008729 }, /* GL_MODELVIEW9_ARB */ - { 26623, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */ - { 26643, 0x0000898D }, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */ - { 26685, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */ - { 26712, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */ - { 26737, 0x00002100 }, /* GL_MODULATE */ - { 26749, 0x00008744 }, /* GL_MODULATE_ADD_ATI */ - { 26769, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */ - { 26796, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */ - { 26821, 0x00000103 }, /* GL_MULT */ - { 26829, 0x0000809D }, /* GL_MULTISAMPLE */ - { 26844, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */ - { 26864, 0x0000809D }, /* GL_MULTISAMPLE_ARB */ - { 26883, 0x20000000 }, /* GL_MULTISAMPLE_BIT */ - { 26902, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */ - { 26926, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */ - { 26949, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */ - { 26979, 0x00002A25 }, /* GL_N3F_V3F */ - { 26990, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */ - { 27010, 0x0000150E }, /* GL_NAND */ - { 27018, 0x00002600 }, /* GL_NEAREST */ - { 27029, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ - { 27060, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ - { 27092, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */ - { 27117, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */ - { 27143, 0x00000200 }, /* GL_NEVER */ - { 27152, 0x00001102 }, /* GL_NICEST */ - { 27162, 0x00000000 }, /* GL_NONE */ - { 27170, 0x00000000 }, /* GL_NONE_OES */ - { 27182, 0x00001505 }, /* GL_NOOP */ - { 27190, 0x00001508 }, /* GL_NOR */ - { 27197, 0x00000BA1 }, /* GL_NORMALIZE */ - { 27210, 0x00008075 }, /* GL_NORMAL_ARRAY */ - { 27226, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ - { 27257, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */ - { 27292, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */ - { 27316, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */ - { 27339, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */ - { 27360, 0x00008511 }, /* GL_NORMAL_MAP */ - { 27374, 0x00008511 }, /* GL_NORMAL_MAP_ARB */ - { 27392, 0x00008511 }, /* GL_NORMAL_MAP_NV */ - { 27409, 0x00008511 }, /* GL_NORMAL_MAP_OES */ - { 27427, 0x00000205 }, /* GL_NOTEQUAL */ - { 27439, 0x00000000 }, /* GL_NO_ERROR */ - { 27451, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ - { 27485, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */ - { 27523, 0x0000821D }, /* GL_NUM_EXTENSIONS */ - { 27541, 0x000087FE }, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */ - { 27575, 0x00008DF9 }, /* GL_NUM_SHADER_BINARY_FORMATS */ - { 27604, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */ - { 27636, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */ - { 27678, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */ - { 27708, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */ - { 27748, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */ - { 27779, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */ - { 27808, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */ - { 27836, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */ - { 27866, 0x00002401 }, /* GL_OBJECT_LINEAR */ - { 27883, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */ - { 27909, 0x00002501 }, /* GL_OBJECT_PLANE */ - { 27925, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */ - { 27960, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */ - { 27982, 0x00009112 }, /* GL_OBJECT_TYPE */ - { 27997, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */ - { 28016, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */ - { 28046, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */ - { 28067, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */ - { 28095, 0x00000001 }, /* GL_ONE */ - { 28102, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */ - { 28130, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */ - { 28162, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */ - { 28190, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */ - { 28222, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */ - { 28245, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */ - { 28268, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */ - { 28291, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */ - { 28314, 0x00008598 }, /* GL_OPERAND0_ALPHA */ - { 28332, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */ - { 28354, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */ - { 28376, 0x00008590 }, /* GL_OPERAND0_RGB */ - { 28392, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */ - { 28412, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */ - { 28432, 0x00008599 }, /* GL_OPERAND1_ALPHA */ - { 28450, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */ - { 28472, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */ - { 28494, 0x00008591 }, /* GL_OPERAND1_RGB */ - { 28510, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */ - { 28530, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */ - { 28550, 0x0000859A }, /* GL_OPERAND2_ALPHA */ - { 28568, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */ - { 28590, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */ - { 28612, 0x00008592 }, /* GL_OPERAND2_RGB */ - { 28628, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */ - { 28648, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */ - { 28668, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */ - { 28689, 0x00008593 }, /* GL_OPERAND3_RGB_NV */ - { 28708, 0x00001507 }, /* GL_OR */ - { 28714, 0x00000A01 }, /* GL_ORDER */ - { 28723, 0x0000150D }, /* GL_OR_INVERTED */ - { 28738, 0x0000150B }, /* GL_OR_REVERSE */ - { 28752, 0x00000505 }, /* GL_OUT_OF_MEMORY */ - { 28769, 0x00000D05 }, /* GL_PACK_ALIGNMENT */ - { 28787, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */ - { 28808, 0x00008758 }, /* GL_PACK_INVERT_MESA */ - { 28828, 0x00000D01 }, /* GL_PACK_LSB_FIRST */ - { 28846, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */ - { 28865, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */ - { 28885, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */ - { 28905, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */ - { 28923, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */ - { 28942, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */ - { 28967, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */ - { 28991, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */ - { 29012, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */ - { 29034, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */ - { 29056, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */ - { 29081, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */ - { 29105, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */ - { 29126, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */ - { 29148, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */ - { 29170, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */ - { 29192, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */ - { 29223, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */ - { 29243, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */ - { 29268, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */ - { 29288, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */ - { 29313, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */ - { 29333, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */ - { 29358, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */ - { 29378, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */ - { 29403, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */ - { 29423, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */ - { 29448, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */ - { 29468, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */ - { 29493, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */ - { 29513, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */ - { 29538, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */ - { 29558, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */ - { 29583, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */ - { 29603, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */ - { 29628, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */ - { 29648, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */ - { 29673, 0x00000020 }, /* GL_PIXEL_MODE_BIT */ - { 29691, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */ - { 29712, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */ - { 29741, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */ - { 29774, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */ - { 29799, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */ - { 29822, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */ - { 29853, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */ - { 29888, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */ - { 29915, 0x00001B00 }, /* GL_POINT */ - { 29924, 0x00000000 }, /* GL_POINTS */ - { 29934, 0x00000002 }, /* GL_POINT_BIT */ - { 29947, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */ - { 29977, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */ - { 30011, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */ - { 30045, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */ - { 30080, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */ - { 30109, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */ - { 30142, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */ - { 30175, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */ - { 30209, 0x00000B11 }, /* GL_POINT_SIZE */ - { 30223, 0x00008B9F }, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */ - { 30262, 0x00008B9C }, /* GL_POINT_SIZE_ARRAY_OES */ - { 30286, 0x0000898C }, /* GL_POINT_SIZE_ARRAY_POINTER_OES */ - { 30318, 0x0000898B }, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */ - { 30349, 0x0000898A }, /* GL_POINT_SIZE_ARRAY_TYPE_OES */ - { 30378, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */ - { 30404, 0x00008127 }, /* GL_POINT_SIZE_MAX */ - { 30422, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */ - { 30444, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */ - { 30466, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */ - { 30489, 0x00008126 }, /* GL_POINT_SIZE_MIN */ - { 30507, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */ - { 30529, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */ - { 30551, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */ - { 30574, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */ - { 30594, 0x00000B10 }, /* GL_POINT_SMOOTH */ - { 30610, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */ - { 30631, 0x00008861 }, /* GL_POINT_SPRITE */ - { 30647, 0x00008861 }, /* GL_POINT_SPRITE_ARB */ - { 30667, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */ - { 30696, 0x00008861 }, /* GL_POINT_SPRITE_NV */ - { 30715, 0x00008861 }, /* GL_POINT_SPRITE_OES */ - { 30735, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */ - { 30761, 0x00000701 }, /* GL_POINT_TOKEN */ - { 30776, 0x00000009 }, /* GL_POLYGON */ - { 30787, 0x00000008 }, /* GL_POLYGON_BIT */ - { 30802, 0x00000B40 }, /* GL_POLYGON_MODE */ - { 30818, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */ - { 30841, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */ - { 30866, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */ - { 30889, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */ - { 30912, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */ - { 30936, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */ - { 30960, 0x00000B41 }, /* GL_POLYGON_SMOOTH */ - { 30978, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */ - { 31001, 0x00000B42 }, /* GL_POLYGON_STIPPLE */ - { 31020, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */ - { 31043, 0x00000703 }, /* GL_POLYGON_TOKEN */ - { 31060, 0x00001203 }, /* GL_POSITION */ - { 31072, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ - { 31104, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */ - { 31140, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ - { 31173, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */ - { 31210, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ - { 31241, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */ - { 31276, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ - { 31308, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */ - { 31344, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ - { 31377, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ - { 31409, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */ - { 31445, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ - { 31478, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */ - { 31515, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */ - { 31545, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */ - { 31579, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */ - { 31610, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */ - { 31645, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ - { 31676, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */ - { 31711, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ - { 31743, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */ - { 31779, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */ - { 31809, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */ - { 31843, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */ - { 31874, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */ - { 31909, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */ - { 31941, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */ - { 31972, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */ - { 32007, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */ - { 32039, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */ - { 32075, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */ - { 32104, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */ - { 32137, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */ - { 32167, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */ - { 32201, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ - { 32240, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ - { 32273, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ - { 32313, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ - { 32347, 0x00008578 }, /* GL_PREVIOUS */ - { 32359, 0x00008578 }, /* GL_PREVIOUS_ARB */ - { 32375, 0x00008578 }, /* GL_PREVIOUS_EXT */ - { 32391, 0x00008577 }, /* GL_PRIMARY_COLOR */ - { 32408, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */ - { 32429, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */ - { 32450, 0x00008C87 }, /* GL_PRIMITIVES_GENERATED */ - { 32474, 0x00008C87 }, /* GL_PRIMITIVES_GENERATED_EXT */ - { 32502, 0x00008F9D }, /* GL_PRIMITIVE_RESTART */ - { 32523, 0x00008F9E }, /* GL_PRIMITIVE_RESTART_INDEX */ - { 32550, 0x00008559 }, /* GL_PRIMITIVE_RESTART_INDEX_NV */ - { 32580, 0x00008558 }, /* GL_PRIMITIVE_RESTART_NV */ - { 32604, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ - { 32637, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ - { 32669, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */ - { 32692, 0x000087FF }, /* GL_PROGRAM_BINARY_FORMATS_OES */ - { 32722, 0x00008741 }, /* GL_PROGRAM_BINARY_LENGTH_OES */ - { 32751, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */ - { 32774, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */ - { 32804, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */ - { 32833, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */ - { 32861, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */ - { 32883, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */ - { 32911, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */ - { 32939, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */ - { 32961, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */ - { 32982, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - { 33022, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - { 33061, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ - { 33091, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - { 33126, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ - { 33159, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ - { 33193, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - { 33232, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - { 33271, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */ - { 33293, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */ - { 33319, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */ - { 33343, 0x00008642 }, /* GL_PROGRAM_POINT_SIZE */ - { 33365, 0x00008642 }, /* GL_PROGRAM_POINT_SIZE_ARB */ - { 33391, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */ - { 33414, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */ - { 33436, 0x00008628 }, /* GL_PROGRAM_STRING_NV */ - { 33457, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */ - { 33478, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */ - { 33505, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ - { 33537, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ - { 33569, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ - { 33604, 0x00001701 }, /* GL_PROJECTION */ - { 33618, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */ - { 33639, 0x0000898E }, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */ - { 33682, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */ - { 33708, 0x00008E4F }, /* GL_PROVOKING_VERTEX */ - { 33728, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */ - { 33752, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */ - { 33773, 0x00008025 }, /* GL_PROXY_HISTOGRAM */ - { 33792, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */ - { 33815, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ - { 33854, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ - { 33892, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */ - { 33912, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY */ - { 33938, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */ - { 33968, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */ - { 33992, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */ - { 34012, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY */ - { 34038, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */ - { 34068, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */ - { 34092, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */ - { 34112, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ - { 34145, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */ - { 34171, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */ - { 34201, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE */ - { 34228, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ - { 34259, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */ - { 34289, 0x00008A1D }, /* GL_PURGEABLE_APPLE */ - { 34308, 0x00002003 }, /* GL_Q */ - { 34313, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */ - { 34338, 0x00000007 }, /* GL_QUADS */ - { 34347, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */ - { 34391, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */ - { 34439, 0x00008614 }, /* GL_QUAD_MESH_SUN */ - { 34456, 0x00000008 }, /* GL_QUAD_STRIP */ - { 34470, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT */ - { 34497, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT_NV */ - { 34527, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT */ - { 34551, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT_NV */ - { 34578, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */ - { 34600, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */ - { 34626, 0x00008E14 }, /* GL_QUERY_NO_WAIT */ - { 34643, 0x00008E14 }, /* GL_QUERY_NO_WAIT_NV */ - { 34663, 0x00008866 }, /* GL_QUERY_RESULT */ - { 34679, 0x00008866 }, /* GL_QUERY_RESULT_ARB */ - { 34699, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */ - { 34725, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */ - { 34755, 0x00008E13 }, /* GL_QUERY_WAIT */ - { 34769, 0x00008E13 }, /* GL_QUERY_WAIT_NV */ - { 34786, 0x00002002 }, /* GL_R */ - { 34791, 0x00008C3A }, /* GL_R11F_G11F_B10F */ - { 34809, 0x00008F98 }, /* GL_R16_SNORM */ - { 34822, 0x00002A10 }, /* GL_R3_G3_B2 */ - { 34834, 0x00008F94 }, /* GL_R8_SNORM */ - { 34846, 0x00008C89 }, /* GL_RASTERIZER_DISCARD */ - { 34868, 0x00008C89 }, /* GL_RASTERIZER_DISCARD_EXT */ - { 34894, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ - { 34927, 0x00000C02 }, /* GL_READ_BUFFER */ - { 34942, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */ - { 34962, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */ - { 34990, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */ - { 35022, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */ - { 35046, 0x000088B8 }, /* GL_READ_ONLY */ - { 35059, 0x000088B8 }, /* GL_READ_ONLY_ARB */ - { 35076, 0x000088BA }, /* GL_READ_WRITE */ - { 35090, 0x000088BA }, /* GL_READ_WRITE_ARB */ - { 35108, 0x00001903 }, /* GL_RED */ - { 35115, 0x00008016 }, /* GL_REDUCE */ - { 35125, 0x00008016 }, /* GL_REDUCE_EXT */ - { 35139, 0x00000D15 }, /* GL_RED_BIAS */ - { 35151, 0x00000D52 }, /* GL_RED_BITS */ - { 35163, 0x00008D94 }, /* GL_RED_INTEGER */ - { 35178, 0x00008D94 }, /* GL_RED_INTEGER_EXT */ - { 35197, 0x00000D14 }, /* GL_RED_SCALE */ - { 35210, 0x00008F90 }, /* GL_RED_SNORM */ - { 35223, 0x00008512 }, /* GL_REFLECTION_MAP */ - { 35241, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */ - { 35263, 0x00008512 }, /* GL_REFLECTION_MAP_NV */ - { 35284, 0x00008512 }, /* GL_REFLECTION_MAP_OES */ - { 35306, 0x00008A19 }, /* GL_RELEASED_APPLE */ - { 35324, 0x00001C00 }, /* GL_RENDER */ - { 35334, 0x00008D41 }, /* GL_RENDERBUFFER */ - { 35350, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */ - { 35377, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE_OES */ - { 35408, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */ - { 35432, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */ - { 35460, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_OES */ - { 35488, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */ - { 35514, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE_OES */ - { 35544, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */ - { 35571, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE_OES */ - { 35602, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */ - { 35622, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */ - { 35649, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE_OES */ - { 35680, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */ - { 35703, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */ - { 35730, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_OES */ - { 35757, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */ - { 35789, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */ - { 35825, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_OES */ - { 35861, 0x00008D41 }, /* GL_RENDERBUFFER_OES */ - { 35881, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */ - { 35906, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE_OES */ - { 35935, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */ - { 35959, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */ - { 35987, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */ - { 36016, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE_OES */ - { 36049, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */ - { 36071, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */ - { 36097, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_OES */ - { 36123, 0x00001F01 }, /* GL_RENDERER */ - { 36135, 0x00000C40 }, /* GL_RENDER_MODE */ - { 36150, 0x00002901 }, /* GL_REPEAT */ - { 36160, 0x00001E01 }, /* GL_REPLACE */ - { 36171, 0x00008062 }, /* GL_REPLACE_EXT */ - { 36186, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */ - { 36209, 0x0000803A }, /* GL_RESCALE_NORMAL */ - { 36227, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */ - { 36249, 0x00008A1B }, /* GL_RETAINED_APPLE */ - { 36267, 0x00000102 }, /* GL_RETURN */ - { 36277, 0x00008F99 }, /* GL_RG16_SNORM */ - { 36291, 0x00008F95 }, /* GL_RG8_SNORM */ - { 36304, 0x00001907 }, /* GL_RGB */ - { 36311, 0x00008052 }, /* GL_RGB10 */ - { 36320, 0x00008059 }, /* GL_RGB10_A2 */ - { 36332, 0x00008059 }, /* GL_RGB10_A2_EXT */ - { 36348, 0x00008052 }, /* GL_RGB10_EXT */ - { 36361, 0x00008053 }, /* GL_RGB12 */ - { 36370, 0x00008053 }, /* GL_RGB12_EXT */ - { 36383, 0x00008054 }, /* GL_RGB16 */ - { 36392, 0x0000881B }, /* GL_RGB16F */ - { 36402, 0x00008D89 }, /* GL_RGB16I */ - { 36412, 0x00008D89 }, /* GL_RGB16I_EXT */ - { 36426, 0x00008D77 }, /* GL_RGB16UI */ - { 36437, 0x00008D77 }, /* GL_RGB16UI_EXT */ - { 36452, 0x00008054 }, /* GL_RGB16_EXT */ - { 36465, 0x00008F9A }, /* GL_RGB16_SNORM */ - { 36480, 0x0000804E }, /* GL_RGB2_EXT */ - { 36492, 0x00008815 }, /* GL_RGB32F */ - { 36502, 0x00008D83 }, /* GL_RGB32I */ - { 36512, 0x00008D83 }, /* GL_RGB32I_EXT */ - { 36526, 0x00008D71 }, /* GL_RGB32UI */ - { 36537, 0x00008D71 }, /* GL_RGB32UI_EXT */ - { 36552, 0x0000804F }, /* GL_RGB4 */ - { 36560, 0x0000804F }, /* GL_RGB4_EXT */ - { 36572, 0x000083A1 }, /* GL_RGB4_S3TC */ - { 36585, 0x00008050 }, /* GL_RGB5 */ - { 36593, 0x00008D62 }, /* GL_RGB565 */ - { 36603, 0x00008D62 }, /* GL_RGB565_OES */ - { 36617, 0x00008057 }, /* GL_RGB5_A1 */ - { 36628, 0x00008057 }, /* GL_RGB5_A1_EXT */ - { 36643, 0x00008057 }, /* GL_RGB5_A1_OES */ - { 36658, 0x00008050 }, /* GL_RGB5_EXT */ - { 36670, 0x00008051 }, /* GL_RGB8 */ - { 36678, 0x00008D8F }, /* GL_RGB8I */ - { 36687, 0x00008D8F }, /* GL_RGB8I_EXT */ - { 36700, 0x00008D7D }, /* GL_RGB8UI */ - { 36710, 0x00008D7D }, /* GL_RGB8UI_EXT */ - { 36724, 0x00008051 }, /* GL_RGB8_EXT */ - { 36736, 0x00008051 }, /* GL_RGB8_OES */ - { 36748, 0x00008F96 }, /* GL_RGB8_SNORM */ - { 36762, 0x00008C3D }, /* GL_RGB9_E5 */ - { 36773, 0x00001908 }, /* GL_RGBA */ - { 36781, 0x0000805A }, /* GL_RGBA12 */ - { 36791, 0x0000805A }, /* GL_RGBA12_EXT */ - { 36805, 0x0000805B }, /* GL_RGBA16 */ - { 36815, 0x0000881A }, /* GL_RGBA16F */ - { 36826, 0x00008D88 }, /* GL_RGBA16I */ - { 36837, 0x00008D88 }, /* GL_RGBA16I_EXT */ - { 36852, 0x00008D76 }, /* GL_RGBA16UI */ - { 36864, 0x00008D76 }, /* GL_RGBA16UI_EXT */ - { 36880, 0x0000805B }, /* GL_RGBA16_EXT */ - { 36894, 0x00008F9B }, /* GL_RGBA16_SNORM */ - { 36910, 0x00008055 }, /* GL_RGBA2 */ - { 36919, 0x00008055 }, /* GL_RGBA2_EXT */ - { 36932, 0x00008814 }, /* GL_RGBA32F */ - { 36943, 0x00008D82 }, /* GL_RGBA32I */ - { 36954, 0x00008D82 }, /* GL_RGBA32I_EXT */ - { 36969, 0x00008D70 }, /* GL_RGBA32UI */ - { 36981, 0x00008D70 }, /* GL_RGBA32UI_EXT */ - { 36997, 0x00008056 }, /* GL_RGBA4 */ - { 37006, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */ - { 37025, 0x00008056 }, /* GL_RGBA4_EXT */ - { 37038, 0x00008056 }, /* GL_RGBA4_OES */ - { 37051, 0x000083A3 }, /* GL_RGBA4_S3TC */ - { 37065, 0x00008058 }, /* GL_RGBA8 */ - { 37074, 0x00008D8E }, /* GL_RGBA8I */ - { 37084, 0x00008D8E }, /* GL_RGBA8I_EXT */ - { 37098, 0x00008D7C }, /* GL_RGBA8UI */ - { 37109, 0x00008D7C }, /* GL_RGBA8UI_EXT */ - { 37124, 0x00008058 }, /* GL_RGBA8_EXT */ - { 37137, 0x00008058 }, /* GL_RGBA8_OES */ - { 37150, 0x00008F97 }, /* GL_RGBA8_SNORM */ - { 37165, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */ - { 37183, 0x00008820 }, /* GL_RGBA_FLOAT_MODE_ARB */ - { 37206, 0x00008D99 }, /* GL_RGBA_INTEGER */ - { 37222, 0x00008D99 }, /* GL_RGBA_INTEGER_EXT */ - { 37242, 0x00008D9E }, /* GL_RGBA_INTEGER_MODE_EXT */ - { 37267, 0x00000C31 }, /* GL_RGBA_MODE */ - { 37280, 0x000083A2 }, /* GL_RGBA_S3TC */ - { 37293, 0x00008F93 }, /* GL_RGBA_SNORM */ - { 37307, 0x00008D98 }, /* GL_RGB_INTEGER */ - { 37322, 0x00008D98 }, /* GL_RGB_INTEGER_EXT */ - { 37341, 0x000083A0 }, /* GL_RGB_S3TC */ - { 37353, 0x00008573 }, /* GL_RGB_SCALE */ - { 37366, 0x00008573 }, /* GL_RGB_SCALE_ARB */ - { 37383, 0x00008573 }, /* GL_RGB_SCALE_EXT */ - { 37400, 0x00008F92 }, /* GL_RGB_SNORM */ - { 37413, 0x00008F91 }, /* GL_RG_SNORM */ - { 37425, 0x00000407 }, /* GL_RIGHT */ - { 37434, 0x00002000 }, /* GL_S */ - { 37439, 0x00008B5D }, /* GL_SAMPLER_1D */ - { 37453, 0x00008DC0 }, /* GL_SAMPLER_1D_ARRAY */ - { 37473, 0x00008DC0 }, /* GL_SAMPLER_1D_ARRAY_EXT */ - { 37497, 0x00008DC3 }, /* GL_SAMPLER_1D_ARRAY_SHADOW */ - { 37524, 0x00008DC3 }, /* GL_SAMPLER_1D_ARRAY_SHADOW_EXT */ - { 37555, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */ - { 37576, 0x00008B5E }, /* GL_SAMPLER_2D */ - { 37590, 0x00008DC1 }, /* GL_SAMPLER_2D_ARRAY */ - { 37610, 0x00008DC1 }, /* GL_SAMPLER_2D_ARRAY_EXT */ - { 37634, 0x00008DC4 }, /* GL_SAMPLER_2D_ARRAY_SHADOW */ - { 37661, 0x00008DC4 }, /* GL_SAMPLER_2D_ARRAY_SHADOW_EXT */ - { 37692, 0x00008B63 }, /* GL_SAMPLER_2D_RECT */ - { 37711, 0x00008B64 }, /* GL_SAMPLER_2D_RECT_SHADOW */ - { 37737, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */ - { 37758, 0x00008B5F }, /* GL_SAMPLER_3D */ - { 37772, 0x00008B5F }, /* GL_SAMPLER_3D_OES */ - { 37790, 0x00008DC2 }, /* GL_SAMPLER_BUFFER */ - { 37808, 0x00008DC2 }, /* GL_SAMPLER_BUFFER_EXT */ - { 37830, 0x00008B60 }, /* GL_SAMPLER_CUBE */ - { 37846, 0x00008DC5 }, /* GL_SAMPLER_CUBE_SHADOW */ - { 37869, 0x00008DC5 }, /* GL_SAMPLER_CUBE_SHADOW_EXT */ - { 37896, 0x000080A9 }, /* GL_SAMPLES */ - { 37907, 0x000086B4 }, /* GL_SAMPLES_3DFX */ - { 37923, 0x000080A9 }, /* GL_SAMPLES_ARB */ - { 37938, 0x00008914 }, /* GL_SAMPLES_PASSED */ - { 37956, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */ - { 37978, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ - { 38006, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */ - { 38038, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */ - { 38061, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */ - { 38088, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */ - { 38106, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */ - { 38129, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */ - { 38151, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */ - { 38170, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */ - { 38193, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */ - { 38219, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */ - { 38249, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */ - { 38274, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */ - { 38303, 0x00080000 }, /* GL_SCISSOR_BIT */ - { 38318, 0x00000C10 }, /* GL_SCISSOR_BOX */ - { 38333, 0x00000C11 }, /* GL_SCISSOR_TEST */ - { 38349, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */ - { 38374, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ - { 38414, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */ - { 38458, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ - { 38491, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ - { 38521, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ - { 38553, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ - { 38583, 0x00001C02 }, /* GL_SELECT */ - { 38593, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */ - { 38621, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */ - { 38646, 0x00008012 }, /* GL_SEPARABLE_2D */ - { 38662, 0x00008C8D }, /* GL_SEPARATE_ATTRIBS */ - { 38682, 0x00008C8D }, /* GL_SEPARATE_ATTRIBS_EXT */ - { 38706, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */ - { 38733, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */ - { 38764, 0x0000150F }, /* GL_SET */ - { 38771, 0x00008DF8 }, /* GL_SHADER_BINARY_FORMATS */ - { 38796, 0x00008DFA }, /* GL_SHADER_COMPILER */ - { 38815, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */ - { 38836, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */ - { 38860, 0x00008B4F }, /* GL_SHADER_TYPE */ - { 38875, 0x00000B54 }, /* GL_SHADE_MODEL */ - { 38890, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */ - { 38918, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */ - { 38941, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */ - { 38971, 0x00001601 }, /* GL_SHININESS */ - { 38984, 0x00001402 }, /* GL_SHORT */ - { 38993, 0x00009119 }, /* GL_SIGNALED */ - { 39005, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */ - { 39026, 0x000081F9 }, /* GL_SINGLE_COLOR */ - { 39042, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */ - { 39062, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */ - { 39081, 0x00008C46 }, /* GL_SLUMINANCE */ - { 39095, 0x00008C47 }, /* GL_SLUMINANCE8 */ - { 39110, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */ - { 39132, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */ - { 39152, 0x00001D01 }, /* GL_SMOOTH */ - { 39162, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */ - { 39195, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */ - { 39222, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */ - { 39255, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */ - { 39282, 0x00008588 }, /* GL_SOURCE0_ALPHA */ - { 39299, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */ - { 39320, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */ - { 39341, 0x00008580 }, /* GL_SOURCE0_RGB */ - { 39356, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */ - { 39375, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */ - { 39394, 0x00008589 }, /* GL_SOURCE1_ALPHA */ - { 39411, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */ - { 39432, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */ - { 39453, 0x00008581 }, /* GL_SOURCE1_RGB */ - { 39468, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */ - { 39487, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */ - { 39506, 0x0000858A }, /* GL_SOURCE2_ALPHA */ - { 39523, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */ - { 39544, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */ - { 39565, 0x00008582 }, /* GL_SOURCE2_RGB */ - { 39580, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */ - { 39599, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */ - { 39618, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */ - { 39638, 0x00008583 }, /* GL_SOURCE3_RGB_NV */ - { 39656, 0x00001202 }, /* GL_SPECULAR */ - { 39668, 0x00002402 }, /* GL_SPHERE_MAP */ - { 39682, 0x00001206 }, /* GL_SPOT_CUTOFF */ - { 39697, 0x00001204 }, /* GL_SPOT_DIRECTION */ - { 39715, 0x00001205 }, /* GL_SPOT_EXPONENT */ - { 39732, 0x00008588 }, /* GL_SRC0_ALPHA */ - { 39746, 0x00008580 }, /* GL_SRC0_RGB */ - { 39758, 0x00008589 }, /* GL_SRC1_ALPHA */ - { 39772, 0x00008581 }, /* GL_SRC1_RGB */ - { 39784, 0x0000858A }, /* GL_SRC2_ALPHA */ - { 39798, 0x00008582 }, /* GL_SRC2_RGB */ - { 39810, 0x00000302 }, /* GL_SRC_ALPHA */ - { 39823, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */ - { 39845, 0x00000300 }, /* GL_SRC_COLOR */ - { 39858, 0x00008C40 }, /* GL_SRGB */ - { 39866, 0x00008C41 }, /* GL_SRGB8 */ - { 39875, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */ - { 39891, 0x00008C42 }, /* GL_SRGB_ALPHA */ - { 39905, 0x00000503 }, /* GL_STACK_OVERFLOW */ - { 39923, 0x00000504 }, /* GL_STACK_UNDERFLOW */ - { 39942, 0x000088E6 }, /* GL_STATIC_COPY */ - { 39957, 0x000088E6 }, /* GL_STATIC_COPY_ARB */ - { 39976, 0x000088E4 }, /* GL_STATIC_DRAW */ - { 39991, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */ - { 40010, 0x000088E5 }, /* GL_STATIC_READ */ - { 40025, 0x000088E5 }, /* GL_STATIC_READ_ARB */ - { 40044, 0x00001802 }, /* GL_STENCIL */ - { 40055, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */ - { 40077, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */ - { 40103, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_OES */ - { 40129, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */ - { 40150, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */ - { 40175, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */ - { 40196, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */ - { 40221, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */ - { 40253, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */ - { 40289, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */ - { 40321, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */ - { 40357, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */ - { 40377, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */ - { 40404, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */ - { 40430, 0x00000D57 }, /* GL_STENCIL_BITS */ - { 40446, 0x00008224 }, /* GL_STENCIL_BUFFER */ - { 40464, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */ - { 40486, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */ - { 40509, 0x00000B94 }, /* GL_STENCIL_FAIL */ - { 40525, 0x00000B92 }, /* GL_STENCIL_FUNC */ - { 40541, 0x00001901 }, /* GL_STENCIL_INDEX */ - { 40558, 0x00008D46 }, /* GL_STENCIL_INDEX1 */ - { 40576, 0x00008D49 }, /* GL_STENCIL_INDEX16 */ - { 40595, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */ - { 40618, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */ - { 40640, 0x00008D46 }, /* GL_STENCIL_INDEX1_OES */ - { 40662, 0x00008D47 }, /* GL_STENCIL_INDEX4 */ - { 40680, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */ - { 40702, 0x00008D47 }, /* GL_STENCIL_INDEX4_OES */ - { 40724, 0x00008D48 }, /* GL_STENCIL_INDEX8 */ - { 40742, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */ - { 40764, 0x00008D48 }, /* GL_STENCIL_INDEX8_OES */ - { 40786, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */ - { 40807, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */ - { 40834, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */ - { 40861, 0x00000B97 }, /* GL_STENCIL_REF */ - { 40876, 0x00000B90 }, /* GL_STENCIL_TEST */ - { 40892, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ - { 40921, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */ - { 40943, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */ - { 40964, 0x00000C33 }, /* GL_STEREO */ - { 40974, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */ - { 40998, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */ - { 41023, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */ - { 41047, 0x000088E2 }, /* GL_STREAM_COPY */ - { 41062, 0x000088E2 }, /* GL_STREAM_COPY_ARB */ - { 41081, 0x000088E0 }, /* GL_STREAM_DRAW */ - { 41096, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */ - { 41115, 0x000088E1 }, /* GL_STREAM_READ */ - { 41130, 0x000088E1 }, /* GL_STREAM_READ_ARB */ - { 41149, 0x00000D50 }, /* GL_SUBPIXEL_BITS */ - { 41166, 0x000084E7 }, /* GL_SUBTRACT */ - { 41178, 0x000084E7 }, /* GL_SUBTRACT_ARB */ - { 41194, 0x00009113 }, /* GL_SYNC_CONDITION */ - { 41212, 0x00009116 }, /* GL_SYNC_FENCE */ - { 41226, 0x00009115 }, /* GL_SYNC_FLAGS */ - { 41240, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */ - { 41267, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */ - { 41297, 0x00009114 }, /* GL_SYNC_STATUS */ - { 41312, 0x00002001 }, /* GL_T */ - { 41317, 0x00002A2A }, /* GL_T2F_C3F_V3F */ - { 41332, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */ - { 41351, 0x00002A29 }, /* GL_T2F_C4UB_V3F */ - { 41367, 0x00002A2B }, /* GL_T2F_N3F_V3F */ - { 41382, 0x00002A27 }, /* GL_T2F_V3F */ - { 41393, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */ - { 41412, 0x00002A28 }, /* GL_T4F_V4F */ - { 41423, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */ - { 41446, 0x00001702 }, /* GL_TEXTURE */ - { 41457, 0x000084C0 }, /* GL_TEXTURE0 */ - { 41469, 0x000084C0 }, /* GL_TEXTURE0_ARB */ - { 41485, 0x000084C1 }, /* GL_TEXTURE1 */ - { 41497, 0x000084CA }, /* GL_TEXTURE10 */ - { 41510, 0x000084CA }, /* GL_TEXTURE10_ARB */ - { 41527, 0x000084CB }, /* GL_TEXTURE11 */ - { 41540, 0x000084CB }, /* GL_TEXTURE11_ARB */ - { 41557, 0x000084CC }, /* GL_TEXTURE12 */ - { 41570, 0x000084CC }, /* GL_TEXTURE12_ARB */ - { 41587, 0x000084CD }, /* GL_TEXTURE13 */ - { 41600, 0x000084CD }, /* GL_TEXTURE13_ARB */ - { 41617, 0x000084CE }, /* GL_TEXTURE14 */ - { 41630, 0x000084CE }, /* GL_TEXTURE14_ARB */ - { 41647, 0x000084CF }, /* GL_TEXTURE15 */ - { 41660, 0x000084CF }, /* GL_TEXTURE15_ARB */ - { 41677, 0x000084D0 }, /* GL_TEXTURE16 */ - { 41690, 0x000084D0 }, /* GL_TEXTURE16_ARB */ - { 41707, 0x000084D1 }, /* GL_TEXTURE17 */ - { 41720, 0x000084D1 }, /* GL_TEXTURE17_ARB */ - { 41737, 0x000084D2 }, /* GL_TEXTURE18 */ - { 41750, 0x000084D2 }, /* GL_TEXTURE18_ARB */ - { 41767, 0x000084D3 }, /* GL_TEXTURE19 */ - { 41780, 0x000084D3 }, /* GL_TEXTURE19_ARB */ - { 41797, 0x000084C1 }, /* GL_TEXTURE1_ARB */ - { 41813, 0x000084C2 }, /* GL_TEXTURE2 */ - { 41825, 0x000084D4 }, /* GL_TEXTURE20 */ - { 41838, 0x000084D4 }, /* GL_TEXTURE20_ARB */ - { 41855, 0x000084D5 }, /* GL_TEXTURE21 */ - { 41868, 0x000084D5 }, /* GL_TEXTURE21_ARB */ - { 41885, 0x000084D6 }, /* GL_TEXTURE22 */ - { 41898, 0x000084D6 }, /* GL_TEXTURE22_ARB */ - { 41915, 0x000084D7 }, /* GL_TEXTURE23 */ - { 41928, 0x000084D7 }, /* GL_TEXTURE23_ARB */ - { 41945, 0x000084D8 }, /* GL_TEXTURE24 */ - { 41958, 0x000084D8 }, /* GL_TEXTURE24_ARB */ - { 41975, 0x000084D9 }, /* GL_TEXTURE25 */ - { 41988, 0x000084D9 }, /* GL_TEXTURE25_ARB */ - { 42005, 0x000084DA }, /* GL_TEXTURE26 */ - { 42018, 0x000084DA }, /* GL_TEXTURE26_ARB */ - { 42035, 0x000084DB }, /* GL_TEXTURE27 */ - { 42048, 0x000084DB }, /* GL_TEXTURE27_ARB */ - { 42065, 0x000084DC }, /* GL_TEXTURE28 */ - { 42078, 0x000084DC }, /* GL_TEXTURE28_ARB */ - { 42095, 0x000084DD }, /* GL_TEXTURE29 */ - { 42108, 0x000084DD }, /* GL_TEXTURE29_ARB */ - { 42125, 0x000084C2 }, /* GL_TEXTURE2_ARB */ - { 42141, 0x000084C3 }, /* GL_TEXTURE3 */ - { 42153, 0x000084DE }, /* GL_TEXTURE30 */ - { 42166, 0x000084DE }, /* GL_TEXTURE30_ARB */ - { 42183, 0x000084DF }, /* GL_TEXTURE31 */ - { 42196, 0x000084DF }, /* GL_TEXTURE31_ARB */ - { 42213, 0x000084C3 }, /* GL_TEXTURE3_ARB */ - { 42229, 0x000084C4 }, /* GL_TEXTURE4 */ - { 42241, 0x000084C4 }, /* GL_TEXTURE4_ARB */ - { 42257, 0x000084C5 }, /* GL_TEXTURE5 */ - { 42269, 0x000084C5 }, /* GL_TEXTURE5_ARB */ - { 42285, 0x000084C6 }, /* GL_TEXTURE6 */ - { 42297, 0x000084C6 }, /* GL_TEXTURE6_ARB */ - { 42313, 0x000084C7 }, /* GL_TEXTURE7 */ - { 42325, 0x000084C7 }, /* GL_TEXTURE7_ARB */ - { 42341, 0x000084C8 }, /* GL_TEXTURE8 */ - { 42353, 0x000084C8 }, /* GL_TEXTURE8_ARB */ - { 42369, 0x000084C9 }, /* GL_TEXTURE9 */ - { 42381, 0x000084C9 }, /* GL_TEXTURE9_ARB */ - { 42397, 0x00000DE0 }, /* GL_TEXTURE_1D */ - { 42411, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY */ - { 42431, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */ - { 42455, 0x00000DE1 }, /* GL_TEXTURE_2D */ - { 42469, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY */ - { 42489, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */ - { 42513, 0x0000806F }, /* GL_TEXTURE_3D */ - { 42527, 0x0000806F }, /* GL_TEXTURE_3D_OES */ - { 42545, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */ - { 42567, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */ - { 42593, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */ - { 42615, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */ - { 42637, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY */ - { 42665, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */ - { 42697, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */ - { 42719, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY */ - { 42747, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */ - { 42779, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */ - { 42801, 0x0000806A }, /* GL_TEXTURE_BINDING_3D_OES */ - { 42827, 0x00008C2C }, /* GL_TEXTURE_BINDING_BUFFER */ - { 42853, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */ - { 42881, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */ - { 42913, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_OES */ - { 42945, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE */ - { 42974, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */ - { 43007, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */ - { 43039, 0x00040000 }, /* GL_TEXTURE_BIT */ - { 43054, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */ - { 43075, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */ - { 43100, 0x00001005 }, /* GL_TEXTURE_BORDER */ - { 43118, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */ - { 43142, 0x00008C2A }, /* GL_TEXTURE_BUFFER */ - { 43160, 0x00008C2D }, /* GL_TEXTURE_BUFFER_DATA_STORE_BINDING */ - { 43197, 0x00008C2E }, /* GL_TEXTURE_BUFFER_FORMAT */ - { 43222, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ - { 43253, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ - { 43283, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ - { 43313, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ - { 43348, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ - { 43379, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - { 43417, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */ - { 43444, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ - { 43476, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ - { 43510, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */ - { 43534, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */ - { 43562, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */ - { 43586, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */ - { 43614, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ - { 43647, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */ - { 43671, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */ - { 43693, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */ - { 43715, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */ - { 43741, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */ - { 43775, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ - { 43808, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */ - { 43845, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */ - { 43873, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */ - { 43905, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */ - { 43928, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ - { 43966, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */ - { 44008, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */ - { 44039, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */ - { 44067, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ - { 44097, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */ - { 44125, 0x00008B9D }, /* GL_TEXTURE_CROP_RECT_OES */ - { 44150, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */ - { 44170, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */ - { 44194, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ - { 44225, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */ - { 44260, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES */ - { 44295, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ - { 44326, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */ - { 44361, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES */ - { 44396, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ - { 44427, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */ - { 44462, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES */ - { 44497, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_OES */ - { 44521, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ - { 44552, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */ - { 44587, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES */ - { 44622, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ - { 44653, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */ - { 44688, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES */ - { 44723, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ - { 44754, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */ - { 44789, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES */ - { 44824, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */ - { 44853, 0x00008071 }, /* GL_TEXTURE_DEPTH */ - { 44870, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */ - { 44892, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */ - { 44918, 0x00002300 }, /* GL_TEXTURE_ENV */ - { 44933, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */ - { 44954, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */ - { 44974, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */ - { 45000, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL_EXT */ - { 45030, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */ - { 45050, 0x00002500 }, /* GL_TEXTURE_GEN_MODE_OES */ - { 45074, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */ - { 45091, 0x00000C62 }, /* GL_TEXTURE_GEN_R */ - { 45108, 0x00000C60 }, /* GL_TEXTURE_GEN_S */ - { 45125, 0x00008D60 }, /* GL_TEXTURE_GEN_STR_OES */ - { 45148, 0x00000C61 }, /* GL_TEXTURE_GEN_T */ - { 45165, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */ - { 45190, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */ - { 45212, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */ - { 45238, 0x00001001 }, /* GL_TEXTURE_HEIGHT */ - { 45256, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */ - { 45282, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */ - { 45308, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */ - { 45338, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */ - { 45365, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */ - { 45390, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */ - { 45410, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */ - { 45434, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ - { 45461, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ - { 45488, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ - { 45515, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */ - { 45541, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */ - { 45571, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */ - { 45593, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */ - { 45611, 0x0000898F }, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */ - { 45651, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ - { 45681, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ - { 45709, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ - { 45737, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ - { 45765, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */ - { 45786, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */ - { 45805, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */ - { 45827, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */ - { 45846, 0x00008066 }, /* GL_TEXTURE_PRIORITY */ - { 45866, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */ - { 45896, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */ - { 45927, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE */ - { 45948, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */ - { 45973, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */ - { 45997, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */ - { 46017, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */ - { 46041, 0x00008067 }, /* GL_TEXTURE_RESIDENT */ - { 46061, 0x00008C3F }, /* GL_TEXTURE_SHARED_SIZE */ - { 46084, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */ - { 46107, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */ - { 46131, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */ - { 46159, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */ - { 46189, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */ - { 46214, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ - { 46248, 0x00001000 }, /* GL_TEXTURE_WIDTH */ - { 46265, 0x00008072 }, /* GL_TEXTURE_WRAP_R */ - { 46283, 0x00008072 }, /* GL_TEXTURE_WRAP_R_OES */ - { 46305, 0x00002802 }, /* GL_TEXTURE_WRAP_S */ - { 46323, 0x00002803 }, /* GL_TEXTURE_WRAP_T */ - { 46341, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */ - { 46360, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */ - { 46380, 0x00008648 }, /* GL_TRACK_MATRIX_NV */ - { 46399, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */ - { 46428, 0x00001000 }, /* GL_TRANSFORM_BIT */ - { 46445, 0x00008E22 }, /* GL_TRANSFORM_FEEDBACK */ - { 46467, 0x00008E25 }, /* GL_TRANSFORM_FEEDBACK_BINDING */ - { 46497, 0x00008C8E }, /* GL_TRANSFORM_FEEDBACK_BUFFER */ - { 46526, 0x00008E24 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */ - { 46562, 0x00008C8F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING */ - { 46599, 0x00008C8F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT */ - { 46640, 0x00008C8E }, /* GL_TRANSFORM_FEEDBACK_BUFFER_EXT */ - { 46673, 0x00008C7F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE */ - { 46707, 0x00008C7F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT */ - { 46745, 0x00008E23 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */ - { 46781, 0x00008C85 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE */ - { 46815, 0x00008C85 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT */ - { 46853, 0x00008C84 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_START */ - { 46888, 0x00008C84 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT */ - { 46927, 0x00008C88 }, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN */ - { 46968, 0x00008C88 }, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT */ - { 47013, 0x00008C83 }, /* GL_TRANSFORM_FEEDBACK_VARYINGS */ - { 47044, 0x00008C83 }, /* GL_TRANSFORM_FEEDBACK_VARYINGS_EXT */ - { 47079, 0x00008C76 }, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH */ - { 47120, 0x00008C76 }, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT */ - { 47165, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */ - { 47191, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */ - { 47221, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ - { 47253, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ - { 47283, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */ - { 47317, 0x0000862C }, /* GL_TRANSPOSE_NV */ - { 47333, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */ - { 47364, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */ - { 47399, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */ - { 47427, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */ - { 47459, 0x00000004 }, /* GL_TRIANGLES */ - { 47472, 0x0000000C }, /* GL_TRIANGLES_ADJACENCY */ - { 47495, 0x0000000C }, /* GL_TRIANGLES_ADJACENCY_ARB */ - { 47522, 0x00000006 }, /* GL_TRIANGLE_FAN */ - { 47538, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */ - { 47559, 0x00000005 }, /* GL_TRIANGLE_STRIP */ - { 47577, 0x0000000D }, /* GL_TRIANGLE_STRIP_ADJACENCY */ - { 47605, 0x0000000D }, /* GL_TRIANGLE_STRIP_ADJACENCY_ARB */ - { 47637, 0x00000001 }, /* GL_TRUE */ - { 47645, 0x00008A1C }, /* GL_UNDEFINED_APPLE */ - { 47664, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */ - { 47684, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */ - { 47707, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */ - { 47727, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */ - { 47748, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */ - { 47770, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */ - { 47792, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */ - { 47812, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */ - { 47833, 0x00009118 }, /* GL_UNSIGNALED */ - { 47847, 0x00001401 }, /* GL_UNSIGNED_BYTE */ - { 47864, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */ - { 47891, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */ - { 47914, 0x00001405 }, /* GL_UNSIGNED_INT */ - { 47930, 0x00008C3B }, /* GL_UNSIGNED_INT_10F_11F_11F_REV */ - { 47962, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */ - { 47989, 0x00008DF6 }, /* GL_UNSIGNED_INT_10_10_10_2_OES */ - { 48020, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */ - { 48041, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */ - { 48066, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */ - { 48090, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_OES */ - { 48115, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */ - { 48146, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV_EXT */ - { 48181, 0x00008C3E }, /* GL_UNSIGNED_INT_5_9_9_9_REV */ - { 48209, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */ - { 48233, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */ - { 48261, 0x00008DD1 }, /* GL_UNSIGNED_INT_SAMPLER_1D */ - { 48288, 0x00008DD6 }, /* GL_UNSIGNED_INT_SAMPLER_1D_ARRAY */ - { 48321, 0x00008DD6 }, /* GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT */ - { 48358, 0x00008DD1 }, /* GL_UNSIGNED_INT_SAMPLER_1D_EXT */ - { 48389, 0x00008DD2 }, /* GL_UNSIGNED_INT_SAMPLER_2D */ - { 48416, 0x00008DD7 }, /* GL_UNSIGNED_INT_SAMPLER_2D_ARRAY */ - { 48449, 0x00008DD7 }, /* GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT */ - { 48486, 0x00008DD2 }, /* GL_UNSIGNED_INT_SAMPLER_2D_EXT */ - { 48517, 0x00008DD5 }, /* GL_UNSIGNED_INT_SAMPLER_2D_RECT */ - { 48549, 0x00008DD5 }, /* GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT */ - { 48585, 0x00008DD3 }, /* GL_UNSIGNED_INT_SAMPLER_3D */ - { 48612, 0x00008DD3 }, /* GL_UNSIGNED_INT_SAMPLER_3D_EXT */ - { 48643, 0x00008DD8 }, /* GL_UNSIGNED_INT_SAMPLER_BUFFER */ - { 48674, 0x00008DD8 }, /* GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT */ - { 48709, 0x00008DD4 }, /* GL_UNSIGNED_INT_SAMPLER_CUBE */ - { 48738, 0x00008DD4 }, /* GL_UNSIGNED_INT_SAMPLER_CUBE_EXT */ - { 48771, 0x00008DC6 }, /* GL_UNSIGNED_INT_VEC2 */ - { 48792, 0x00008DC6 }, /* GL_UNSIGNED_INT_VEC2_EXT */ - { 48817, 0x00008DC7 }, /* GL_UNSIGNED_INT_VEC3 */ - { 48838, 0x00008DC7 }, /* GL_UNSIGNED_INT_VEC3_EXT */ - { 48863, 0x00008DC8 }, /* GL_UNSIGNED_INT_VEC4 */ - { 48884, 0x00008DC8 }, /* GL_UNSIGNED_INT_VEC4_EXT */ - { 48909, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */ - { 48932, 0x00001403 }, /* GL_UNSIGNED_SHORT */ - { 48950, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ - { 48980, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT */ - { 49014, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */ - { 49040, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ - { 49070, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT */ - { 49104, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */ - { 49130, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */ - { 49154, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */ - { 49182, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */ - { 49210, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */ - { 49237, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ - { 49269, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */ - { 49300, 0x00008CA2 }, /* GL_UPPER_LEFT */ - { 49314, 0x00002A20 }, /* GL_V2F */ - { 49321, 0x00002A21 }, /* GL_V3F */ - { 49328, 0x00008B83 }, /* GL_VALIDATE_STATUS */ - { 49347, 0x00001F00 }, /* GL_VENDOR */ - { 49357, 0x00001F02 }, /* GL_VERSION */ - { 49368, 0x00008074 }, /* GL_VERTEX_ARRAY */ - { 49384, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */ - { 49408, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */ - { 49438, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ - { 49469, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */ - { 49504, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */ - { 49528, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */ - { 49549, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */ - { 49572, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */ - { 49593, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ - { 49620, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ - { 49648, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ - { 49676, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ - { 49704, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ - { 49732, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ - { 49760, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ - { 49788, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ - { 49815, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ - { 49842, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ - { 49869, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ - { 49896, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ - { 49923, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ - { 49950, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ - { 49977, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ - { 50004, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ - { 50031, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ - { 50069, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */ - { 50111, 0x000088FE }, /* GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB */ - { 50146, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ - { 50177, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */ - { 50212, 0x000088FD }, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER */ - { 50243, 0x000088FD }, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT */ - { 50278, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ - { 50312, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */ - { 50350, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ - { 50381, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */ - { 50416, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ - { 50444, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */ - { 50476, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ - { 50506, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */ - { 50540, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ - { 50568, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */ - { 50600, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */ - { 50620, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */ - { 50642, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */ - { 50671, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */ - { 50692, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */ - { 50721, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */ - { 50754, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */ - { 50786, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */ - { 50813, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */ - { 50844, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */ - { 50874, 0x00008B31 }, /* GL_VERTEX_SHADER */ - { 50891, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */ - { 50912, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */ - { 50939, 0x00000BA2 }, /* GL_VIEWPORT */ - { 50951, 0x00000800 }, /* GL_VIEWPORT_BIT */ - { 50967, 0x00008A1A }, /* GL_VOLATILE_APPLE */ - { 50985, 0x0000911D }, /* GL_WAIT_FAILED */ - { 51000, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */ - { 51020, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ - { 51051, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */ - { 51086, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_OES */ - { 51121, 0x000086AD }, /* GL_WEIGHT_ARRAY_OES */ - { 51141, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */ - { 51169, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_OES */ - { 51197, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */ - { 51222, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_OES */ - { 51247, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ - { 51274, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_OES */ - { 51301, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */ - { 51326, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_OES */ - { 51351, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */ - { 51375, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */ - { 51394, 0x000088B9 }, /* GL_WRITE_ONLY */ - { 51408, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */ - { 51426, 0x000088B9 }, /* GL_WRITE_ONLY_OES */ - { 51444, 0x00001506 }, /* GL_XOR */ - { 51451, 0x000085B9 }, /* GL_YCBCR_422_APPLE */ - { 51470, 0x00008757 }, /* GL_YCBCR_MESA */ - { 51484, 0x00000000 }, /* GL_ZERO */ - { 51492, 0x00000D16 }, /* GL_ZOOM_X */ - { 51502, 0x00000D17 }, /* GL_ZOOM_Y */ -}; - -static const unsigned reduced_enums[1555] = -{ - 538, /* GL_FALSE */ - 831, /* GL_LINES */ - 835, /* GL_LINE_LOOP */ - 842, /* GL_LINE_STRIP */ - 2140, /* GL_TRIANGLES */ - 2145, /* GL_TRIANGLE_STRIP */ - 2143, /* GL_TRIANGLE_FAN */ - 1511, /* GL_QUADS */ - 1515, /* GL_QUAD_STRIP */ - 1382, /* GL_POLYGON */ - 832, /* GL_LINES_ADJACENCY */ - 843, /* GL_LINE_STRIP_ADJACENCY */ - 2141, /* GL_TRIANGLES_ADJACENCY */ - 2146, /* GL_TRIANGLE_STRIP_ADJACENCY */ - 1394, /* GL_POLYGON_STIPPLE_BIT */ - 1337, /* GL_PIXEL_MODE_BIT */ - 818, /* GL_LIGHTING_BIT */ - 572, /* GL_FOG_BIT */ - 8, /* GL_ACCUM */ - 854, /* GL_LOAD */ - 1600, /* GL_RETURN */ - 1204, /* GL_MULT */ - 24, /* GL_ADD */ - 1220, /* GL_NEVER */ - 808, /* GL_LESS */ - 528, /* GL_EQUAL */ - 807, /* GL_LEQUAL */ - 695, /* GL_GREATER */ - 1237, /* GL_NOTEQUAL */ - 694, /* GL_GEQUAL */ - 55, /* GL_ALWAYS */ - 1808, /* GL_SRC_COLOR */ - 1270, /* GL_ONE_MINUS_SRC_COLOR */ - 1806, /* GL_SRC_ALPHA */ - 1269, /* GL_ONE_MINUS_SRC_ALPHA */ - 507, /* GL_DST_ALPHA */ - 1267, /* GL_ONE_MINUS_DST_ALPHA */ - 508, /* GL_DST_COLOR */ - 1268, /* GL_ONE_MINUS_DST_COLOR */ - 1807, /* GL_SRC_ALPHA_SATURATE */ - 671, /* GL_FRONT_LEFT */ - 672, /* GL_FRONT_RIGHT */ - 77, /* GL_BACK_LEFT */ - 78, /* GL_BACK_RIGHT */ - 668, /* GL_FRONT */ - 76, /* GL_BACK */ - 806, /* GL_LEFT */ - 1690, /* GL_RIGHT */ - 669, /* GL_FRONT_AND_BACK */ - 71, /* GL_AUX0 */ - 72, /* GL_AUX1 */ - 73, /* GL_AUX2 */ - 74, /* GL_AUX3 */ - 794, /* GL_INVALID_ENUM */ - 799, /* GL_INVALID_VALUE */ - 798, /* GL_INVALID_OPERATION */ - 1813, /* GL_STACK_OVERFLOW */ - 1814, /* GL_STACK_UNDERFLOW */ - 1295, /* GL_OUT_OF_MEMORY */ - 795, /* GL_INVALID_FRAMEBUFFER_OPERATION */ - 0, /* GL_2D */ - 2, /* GL_3D */ - 3, /* GL_3D_COLOR */ - 4, /* GL_3D_COLOR_TEXTURE */ - 6, /* GL_4D_COLOR_TEXTURE */ - 1315, /* GL_PASS_THROUGH_TOKEN */ - 1381, /* GL_POINT_TOKEN */ - 845, /* GL_LINE_TOKEN */ - 1395, /* GL_POLYGON_TOKEN */ - 87, /* GL_BITMAP_TOKEN */ - 506, /* GL_DRAW_PIXEL_TOKEN */ - 352, /* GL_COPY_PIXEL_TOKEN */ - 836, /* GL_LINE_RESET_TOKEN */ - 531, /* GL_EXP */ - 532, /* GL_EXP2 */ - 389, /* GL_CW */ - 154, /* GL_CCW */ - 187, /* GL_COEFF */ - 1292, /* GL_ORDER */ - 443, /* GL_DOMAIN */ - 362, /* GL_CURRENT_COLOR */ - 365, /* GL_CURRENT_INDEX */ - 371, /* GL_CURRENT_NORMAL */ - 385, /* GL_CURRENT_TEXTURE_COORDS */ - 377, /* GL_CURRENT_RASTER_COLOR */ - 379, /* GL_CURRENT_RASTER_INDEX */ - 383, /* GL_CURRENT_RASTER_TEXTURE_COORDS */ - 380, /* GL_CURRENT_RASTER_POSITION */ - 381, /* GL_CURRENT_RASTER_POSITION_VALID */ - 378, /* GL_CURRENT_RASTER_DISTANCE */ - 1373, /* GL_POINT_SMOOTH */ - 1357, /* GL_POINT_SIZE */ - 1372, /* GL_POINT_SIZE_RANGE */ - 1363, /* GL_POINT_SIZE_GRANULARITY */ - 837, /* GL_LINE_SMOOTH */ - 846, /* GL_LINE_WIDTH */ - 848, /* GL_LINE_WIDTH_RANGE */ - 847, /* GL_LINE_WIDTH_GRANULARITY */ - 839, /* GL_LINE_STIPPLE */ - 840, /* GL_LINE_STIPPLE_PATTERN */ - 841, /* GL_LINE_STIPPLE_REPEAT */ - 853, /* GL_LIST_MODE */ - 1060, /* GL_MAX_LIST_NESTING */ - 850, /* GL_LIST_BASE */ - 852, /* GL_LIST_INDEX */ - 1384, /* GL_POLYGON_MODE */ - 1391, /* GL_POLYGON_SMOOTH */ - 1393, /* GL_POLYGON_STIPPLE */ - 517, /* GL_EDGE_FLAG */ - 355, /* GL_CULL_FACE */ - 356, /* GL_CULL_FACE_MODE */ - 670, /* GL_FRONT_FACE */ - 817, /* GL_LIGHTING */ - 822, /* GL_LIGHT_MODEL_LOCAL_VIEWER */ - 823, /* GL_LIGHT_MODEL_TWO_SIDE */ - 819, /* GL_LIGHT_MODEL_AMBIENT */ - 1755, /* GL_SHADE_MODEL */ - 235, /* GL_COLOR_MATERIAL_FACE */ - 236, /* GL_COLOR_MATERIAL_PARAMETER */ - 234, /* GL_COLOR_MATERIAL */ - 571, /* GL_FOG */ - 593, /* GL_FOG_INDEX */ - 589, /* GL_FOG_DENSITY */ - 597, /* GL_FOG_START */ - 591, /* GL_FOG_END */ - 594, /* GL_FOG_MODE */ - 573, /* GL_FOG_COLOR */ - 428, /* GL_DEPTH_RANGE */ - 437, /* GL_DEPTH_TEST */ - 440, /* GL_DEPTH_WRITEMASK */ - 413, /* GL_DEPTH_CLEAR_VALUE */ - 427, /* GL_DEPTH_FUNC */ - 12, /* GL_ACCUM_CLEAR_VALUE */ - 1858, /* GL_STENCIL_TEST */ - 1839, /* GL_STENCIL_CLEAR_VALUE */ - 1841, /* GL_STENCIL_FUNC */ - 1860, /* GL_STENCIL_VALUE_MASK */ - 1840, /* GL_STENCIL_FAIL */ - 1855, /* GL_STENCIL_PASS_DEPTH_FAIL */ - 1856, /* GL_STENCIL_PASS_DEPTH_PASS */ - 1857, /* GL_STENCIL_REF */ - 1861, /* GL_STENCIL_WRITEMASK */ - 1010, /* GL_MATRIX_MODE */ - 1226, /* GL_NORMALIZE */ - 2272, /* GL_VIEWPORT */ - 1199, /* GL_MODELVIEW_STACK_DEPTH */ - 1485, /* GL_PROJECTION_STACK_DEPTH */ - 2094, /* GL_TEXTURE_STACK_DEPTH */ - 1196, /* GL_MODELVIEW_MATRIX */ - 1483, /* GL_PROJECTION_MATRIX */ - 2074, /* GL_TEXTURE_MATRIX */ - 69, /* GL_ATTRIB_STACK_DEPTH */ - 169, /* GL_CLIENT_ATTRIB_STACK_DEPTH */ - 51, /* GL_ALPHA_TEST */ - 52, /* GL_ALPHA_TEST_FUNC */ - 53, /* GL_ALPHA_TEST_REF */ - 442, /* GL_DITHER */ - 91, /* GL_BLEND_DST */ - 105, /* GL_BLEND_SRC */ - 88, /* GL_BLEND */ - 856, /* GL_LOGIC_OP_MODE */ - 743, /* GL_INDEX_LOGIC_OP */ - 233, /* GL_COLOR_LOGIC_OP */ - 75, /* GL_AUX_BUFFERS */ - 453, /* GL_DRAW_BUFFER */ - 1538, /* GL_READ_BUFFER */ - 1732, /* GL_SCISSOR_BOX */ - 1733, /* GL_SCISSOR_TEST */ - 742, /* GL_INDEX_CLEAR_VALUE */ - 747, /* GL_INDEX_WRITEMASK */ - 230, /* GL_COLOR_CLEAR_VALUE */ - 272, /* GL_COLOR_WRITEMASK */ - 744, /* GL_INDEX_MODE */ - 1679, /* GL_RGBA_MODE */ - 452, /* GL_DOUBLEBUFFER */ - 1862, /* GL_STEREO */ - 1592, /* GL_RENDER_MODE */ - 1316, /* GL_PERSPECTIVE_CORRECTION_HINT */ - 1374, /* GL_POINT_SMOOTH_HINT */ - 838, /* GL_LINE_SMOOTH_HINT */ - 1392, /* GL_POLYGON_SMOOTH_HINT */ - 592, /* GL_FOG_HINT */ - 2054, /* GL_TEXTURE_GEN_S */ - 2056, /* GL_TEXTURE_GEN_T */ - 2053, /* GL_TEXTURE_GEN_R */ - 2052, /* GL_TEXTURE_GEN_Q */ - 1329, /* GL_PIXEL_MAP_I_TO_I */ - 1335, /* GL_PIXEL_MAP_S_TO_S */ - 1331, /* GL_PIXEL_MAP_I_TO_R */ - 1327, /* GL_PIXEL_MAP_I_TO_G */ - 1325, /* GL_PIXEL_MAP_I_TO_B */ - 1323, /* GL_PIXEL_MAP_I_TO_A */ - 1333, /* GL_PIXEL_MAP_R_TO_R */ - 1321, /* GL_PIXEL_MAP_G_TO_G */ - 1319, /* GL_PIXEL_MAP_B_TO_B */ - 1317, /* GL_PIXEL_MAP_A_TO_A */ - 1330, /* GL_PIXEL_MAP_I_TO_I_SIZE */ - 1336, /* GL_PIXEL_MAP_S_TO_S_SIZE */ - 1332, /* GL_PIXEL_MAP_I_TO_R_SIZE */ - 1328, /* GL_PIXEL_MAP_I_TO_G_SIZE */ - 1326, /* GL_PIXEL_MAP_I_TO_B_SIZE */ - 1324, /* GL_PIXEL_MAP_I_TO_A_SIZE */ - 1334, /* GL_PIXEL_MAP_R_TO_R_SIZE */ - 1322, /* GL_PIXEL_MAP_G_TO_G_SIZE */ - 1320, /* GL_PIXEL_MAP_B_TO_B_SIZE */ - 1318, /* GL_PIXEL_MAP_A_TO_A_SIZE */ - 2157, /* GL_UNPACK_SWAP_BYTES */ - 2152, /* GL_UNPACK_LSB_FIRST */ - 2153, /* GL_UNPACK_ROW_LENGTH */ - 2156, /* GL_UNPACK_SKIP_ROWS */ - 2155, /* GL_UNPACK_SKIP_PIXELS */ - 2150, /* GL_UNPACK_ALIGNMENT */ - 1304, /* GL_PACK_SWAP_BYTES */ - 1299, /* GL_PACK_LSB_FIRST */ - 1300, /* GL_PACK_ROW_LENGTH */ - 1303, /* GL_PACK_SKIP_ROWS */ - 1302, /* GL_PACK_SKIP_PIXELS */ - 1296, /* GL_PACK_ALIGNMENT */ - 951, /* GL_MAP_COLOR */ - 956, /* GL_MAP_STENCIL */ - 746, /* GL_INDEX_SHIFT */ - 745, /* GL_INDEX_OFFSET */ - 1554, /* GL_RED_SCALE */ - 1550, /* GL_RED_BIAS */ - 2298, /* GL_ZOOM_X */ - 2299, /* GL_ZOOM_Y */ - 701, /* GL_GREEN_SCALE */ - 697, /* GL_GREEN_BIAS */ - 115, /* GL_BLUE_SCALE */ - 111, /* GL_BLUE_BIAS */ - 50, /* GL_ALPHA_SCALE */ - 47, /* GL_ALPHA_BIAS */ - 429, /* GL_DEPTH_SCALE */ - 405, /* GL_DEPTH_BIAS */ - 1042, /* GL_MAX_EVAL_ORDER */ - 1059, /* GL_MAX_LIGHTS */ - 1022, /* GL_MAX_CLIP_DISTANCES */ - 1114, /* GL_MAX_TEXTURE_SIZE */ - 1066, /* GL_MAX_PIXEL_MAP_TABLE */ - 1018, /* GL_MAX_ATTRIB_STACK_DEPTH */ - 1062, /* GL_MAX_MODELVIEW_STACK_DEPTH */ - 1063, /* GL_MAX_NAME_STACK_DEPTH */ - 1094, /* GL_MAX_PROJECTION_STACK_DEPTH */ - 1115, /* GL_MAX_TEXTURE_STACK_DEPTH */ - 1141, /* GL_MAX_VIEWPORT_DIMS */ - 1019, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */ - 1872, /* GL_SUBPIXEL_BITS */ - 741, /* GL_INDEX_BITS */ - 1551, /* GL_RED_BITS */ - 698, /* GL_GREEN_BITS */ - 112, /* GL_BLUE_BITS */ - 48, /* GL_ALPHA_BITS */ - 406, /* GL_DEPTH_BITS */ - 1836, /* GL_STENCIL_BITS */ - 14, /* GL_ACCUM_RED_BITS */ - 13, /* GL_ACCUM_GREEN_BITS */ - 10, /* GL_ACCUM_BLUE_BITS */ - 9, /* GL_ACCUM_ALPHA_BITS */ - 1213, /* GL_NAME_STACK_DEPTH */ - 70, /* GL_AUTO_NORMAL */ - 897, /* GL_MAP1_COLOR_4 */ - 900, /* GL_MAP1_INDEX */ - 901, /* GL_MAP1_NORMAL */ - 902, /* GL_MAP1_TEXTURE_COORD_1 */ - 903, /* GL_MAP1_TEXTURE_COORD_2 */ - 904, /* GL_MAP1_TEXTURE_COORD_3 */ - 905, /* GL_MAP1_TEXTURE_COORD_4 */ - 906, /* GL_MAP1_VERTEX_3 */ - 907, /* GL_MAP1_VERTEX_4 */ - 924, /* GL_MAP2_COLOR_4 */ - 927, /* GL_MAP2_INDEX */ - 928, /* GL_MAP2_NORMAL */ - 929, /* GL_MAP2_TEXTURE_COORD_1 */ - 930, /* GL_MAP2_TEXTURE_COORD_2 */ - 931, /* GL_MAP2_TEXTURE_COORD_3 */ - 932, /* GL_MAP2_TEXTURE_COORD_4 */ - 933, /* GL_MAP2_VERTEX_3 */ - 934, /* GL_MAP2_VERTEX_4 */ - 898, /* GL_MAP1_GRID_DOMAIN */ - 899, /* GL_MAP1_GRID_SEGMENTS */ - 925, /* GL_MAP2_GRID_DOMAIN */ - 926, /* GL_MAP2_GRID_SEGMENTS */ - 1955, /* GL_TEXTURE_1D */ - 1958, /* GL_TEXTURE_2D */ - 541, /* GL_FEEDBACK_BUFFER_POINTER */ - 542, /* GL_FEEDBACK_BUFFER_SIZE */ - 543, /* GL_FEEDBACK_BUFFER_TYPE */ - 1742, /* GL_SELECTION_BUFFER_POINTER */ - 1743, /* GL_SELECTION_BUFFER_SIZE */ - 2100, /* GL_TEXTURE_WIDTH */ - 2060, /* GL_TEXTURE_HEIGHT */ - 2004, /* GL_TEXTURE_COMPONENTS */ - 1985, /* GL_TEXTURE_BORDER_COLOR */ - 1984, /* GL_TEXTURE_BORDER */ - 444, /* GL_DONT_CARE */ - 539, /* GL_FASTEST */ - 1221, /* GL_NICEST */ - 56, /* GL_AMBIENT */ - 441, /* GL_DIFFUSE */ - 1795, /* GL_SPECULAR */ - 1396, /* GL_POSITION */ - 1798, /* GL_SPOT_DIRECTION */ - 1799, /* GL_SPOT_EXPONENT */ - 1797, /* GL_SPOT_CUTOFF */ - 320, /* GL_CONSTANT_ATTENUATION */ - 826, /* GL_LINEAR_ATTENUATION */ - 1510, /* GL_QUADRATIC_ATTENUATION */ - 287, /* GL_COMPILE */ - 288, /* GL_COMPILE_AND_EXECUTE */ - 149, /* GL_BYTE */ - 2159, /* GL_UNSIGNED_BYTE */ - 1760, /* GL_SHORT */ - 2198, /* GL_UNSIGNED_SHORT */ - 749, /* GL_INT */ - 2162, /* GL_UNSIGNED_INT */ - 552, /* GL_FLOAT */ - 1, /* GL_2_BYTES */ - 5, /* GL_3_BYTES */ - 7, /* GL_4_BYTES */ - 451, /* GL_DOUBLE */ - 702, /* GL_HALF_FLOAT */ - 547, /* GL_FIXED */ - 165, /* GL_CLEAR */ - 58, /* GL_AND */ - 60, /* GL_AND_REVERSE */ - 350, /* GL_COPY */ - 59, /* GL_AND_INVERTED */ - 1224, /* GL_NOOP */ - 2294, /* GL_XOR */ - 1291, /* GL_OR */ - 1225, /* GL_NOR */ - 529, /* GL_EQUIV */ - 802, /* GL_INVERT */ - 1294, /* GL_OR_REVERSE */ - 351, /* GL_COPY_INVERTED */ - 1293, /* GL_OR_INVERTED */ - 1214, /* GL_NAND */ - 1749, /* GL_SET */ - 526, /* GL_EMISSION */ - 1759, /* GL_SHININESS */ - 57, /* GL_AMBIENT_AND_DIFFUSE */ - 232, /* GL_COLOR_INDEXES */ - 1163, /* GL_MODELVIEW */ - 1482, /* GL_PROJECTION */ - 1890, /* GL_TEXTURE */ - 188, /* GL_COLOR */ - 398, /* GL_DEPTH */ - 1821, /* GL_STENCIL */ - 231, /* GL_COLOR_INDEX */ - 1842, /* GL_STENCIL_INDEX */ - 414, /* GL_DEPTH_COMPONENT */ - 1547, /* GL_RED */ - 696, /* GL_GREEN */ - 110, /* GL_BLUE */ - 32, /* GL_ALPHA */ - 1603, /* GL_RGB */ - 1643, /* GL_RGBA */ - 860, /* GL_LUMINANCE */ - 887, /* GL_LUMINANCE_ALPHA */ - 86, /* GL_BITMAP */ - 1346, /* GL_POINT */ - 824, /* GL_LINE */ - 544, /* GL_FILL */ - 1561, /* GL_RENDER */ - 540, /* GL_FEEDBACK */ - 1741, /* GL_SELECT */ - 551, /* GL_FLAT */ - 1770, /* GL_SMOOTH */ - 803, /* GL_KEEP */ - 1594, /* GL_REPLACE */ - 731, /* GL_INCR */ - 394, /* GL_DECR */ - 2215, /* GL_VENDOR */ - 1591, /* GL_RENDERER */ - 2216, /* GL_VERSION */ - 533, /* GL_EXTENSIONS */ - 1691, /* GL_S */ - 1881, /* GL_T */ - 1530, /* GL_R */ - 1509, /* GL_Q */ - 1200, /* GL_MODULATE */ - 393, /* GL_DECAL */ - 2047, /* GL_TEXTURE_ENV_MODE */ - 2046, /* GL_TEXTURE_ENV_COLOR */ - 2045, /* GL_TEXTURE_ENV */ - 534, /* GL_EYE_LINEAR */ - 1252, /* GL_OBJECT_LINEAR */ - 1796, /* GL_SPHERE_MAP */ - 2050, /* GL_TEXTURE_GEN_MODE */ - 1254, /* GL_OBJECT_PLANE */ - 535, /* GL_EYE_PLANE */ - 1215, /* GL_NEAREST */ - 825, /* GL_LINEAR */ - 1219, /* GL_NEAREST_MIPMAP_NEAREST */ - 830, /* GL_LINEAR_MIPMAP_NEAREST */ - 1218, /* GL_NEAREST_MIPMAP_LINEAR */ - 829, /* GL_LINEAR_MIPMAP_LINEAR */ - 2073, /* GL_TEXTURE_MAG_FILTER */ - 2082, /* GL_TEXTURE_MIN_FILTER */ - 2103, /* GL_TEXTURE_WRAP_S */ - 2104, /* GL_TEXTURE_WRAP_T */ - 155, /* GL_CLAMP */ - 1593, /* GL_REPEAT */ - 1390, /* GL_POLYGON_OFFSET_UNITS */ - 1389, /* GL_POLYGON_OFFSET_POINT */ - 1388, /* GL_POLYGON_OFFSET_LINE */ - 1533, /* GL_R3_G3_B2 */ - 2212, /* GL_V2F */ - 2213, /* GL_V3F */ - 152, /* GL_C4UB_V2F */ - 153, /* GL_C4UB_V3F */ - 150, /* GL_C3F_V3F */ - 1212, /* GL_N3F_V3F */ - 151, /* GL_C4F_N3F_V3F */ - 1886, /* GL_T2F_V3F */ - 1888, /* GL_T4F_V4F */ - 1884, /* GL_T2F_C4UB_V3F */ - 1882, /* GL_T2F_C3F_V3F */ - 1885, /* GL_T2F_N3F_V3F */ - 1883, /* GL_T2F_C4F_N3F_V3F */ - 1887, /* GL_T4F_C4F_N3F_V4F */ - 172, /* GL_CLIP_DISTANCE0 */ - 173, /* GL_CLIP_DISTANCE1 */ - 174, /* GL_CLIP_DISTANCE2 */ - 175, /* GL_CLIP_DISTANCE3 */ - 176, /* GL_CLIP_DISTANCE4 */ - 177, /* GL_CLIP_DISTANCE5 */ - 178, /* GL_CLIP_DISTANCE6 */ - 179, /* GL_CLIP_DISTANCE7 */ - 809, /* GL_LIGHT0 */ - 810, /* GL_LIGHT1 */ - 811, /* GL_LIGHT2 */ - 812, /* GL_LIGHT3 */ - 813, /* GL_LIGHT4 */ - 814, /* GL_LIGHT5 */ - 815, /* GL_LIGHT6 */ - 816, /* GL_LIGHT7 */ - 706, /* GL_HINT_BIT */ - 322, /* GL_CONSTANT_COLOR */ - 1265, /* GL_ONE_MINUS_CONSTANT_COLOR */ - 317, /* GL_CONSTANT_ALPHA */ - 1263, /* GL_ONE_MINUS_CONSTANT_ALPHA */ - 89, /* GL_BLEND_COLOR */ - 673, /* GL_FUNC_ADD */ - 1144, /* GL_MIN */ - 1013, /* GL_MAX */ - 96, /* GL_BLEND_EQUATION */ - 679, /* GL_FUNC_SUBTRACT */ - 676, /* GL_FUNC_REVERSE_SUBTRACT */ - 330, /* GL_CONVOLUTION_1D */ - 331, /* GL_CONVOLUTION_2D */ - 1744, /* GL_SEPARABLE_2D */ - 334, /* GL_CONVOLUTION_BORDER_MODE */ - 338, /* GL_CONVOLUTION_FILTER_SCALE */ - 336, /* GL_CONVOLUTION_FILTER_BIAS */ - 1548, /* GL_REDUCE */ - 340, /* GL_CONVOLUTION_FORMAT */ - 344, /* GL_CONVOLUTION_WIDTH */ - 342, /* GL_CONVOLUTION_HEIGHT */ - 1032, /* GL_MAX_CONVOLUTION_WIDTH */ - 1030, /* GL_MAX_CONVOLUTION_HEIGHT */ - 1429, /* GL_POST_CONVOLUTION_RED_SCALE */ - 1425, /* GL_POST_CONVOLUTION_GREEN_SCALE */ - 1420, /* GL_POST_CONVOLUTION_BLUE_SCALE */ - 1416, /* GL_POST_CONVOLUTION_ALPHA_SCALE */ - 1427, /* GL_POST_CONVOLUTION_RED_BIAS */ - 1423, /* GL_POST_CONVOLUTION_GREEN_BIAS */ - 1418, /* GL_POST_CONVOLUTION_BLUE_BIAS */ - 1414, /* GL_POST_CONVOLUTION_ALPHA_BIAS */ - 707, /* GL_HISTOGRAM */ - 1489, /* GL_PROXY_HISTOGRAM */ - 723, /* GL_HISTOGRAM_WIDTH */ - 713, /* GL_HISTOGRAM_FORMAT */ - 719, /* GL_HISTOGRAM_RED_SIZE */ - 715, /* GL_HISTOGRAM_GREEN_SIZE */ - 710, /* GL_HISTOGRAM_BLUE_SIZE */ - 708, /* GL_HISTOGRAM_ALPHA_SIZE */ - 717, /* GL_HISTOGRAM_LUMINANCE_SIZE */ - 721, /* GL_HISTOGRAM_SINK */ - 1145, /* GL_MINMAX */ - 1147, /* GL_MINMAX_FORMAT */ - 1149, /* GL_MINMAX_SINK */ - 1889, /* GL_TABLE_TOO_LARGE_EXT */ - 2161, /* GL_UNSIGNED_BYTE_3_3_2 */ - 2201, /* GL_UNSIGNED_SHORT_4_4_4_4 */ - 2204, /* GL_UNSIGNED_SHORT_5_5_5_1 */ - 2173, /* GL_UNSIGNED_INT_8_8_8_8 */ - 2164, /* GL_UNSIGNED_INT_10_10_10_2 */ - 1387, /* GL_POLYGON_OFFSET_FILL */ - 1386, /* GL_POLYGON_OFFSET_FACTOR */ - 1385, /* GL_POLYGON_OFFSET_BIAS */ - 1597, /* GL_RESCALE_NORMAL */ - 41, /* GL_ALPHA4 */ - 43, /* GL_ALPHA8 */ - 33, /* GL_ALPHA12 */ - 35, /* GL_ALPHA16 */ - 875, /* GL_LUMINANCE4 */ - 881, /* GL_LUMINANCE8 */ - 861, /* GL_LUMINANCE12 */ - 867, /* GL_LUMINANCE16 */ - 876, /* GL_LUMINANCE4_ALPHA4 */ - 879, /* GL_LUMINANCE6_ALPHA2 */ - 884, /* GL_LUMINANCE8_ALPHA8 */ - 864, /* GL_LUMINANCE12_ALPHA4 */ - 862, /* GL_LUMINANCE12_ALPHA12 */ - 870, /* GL_LUMINANCE16_ALPHA16 */ - 750, /* GL_INTENSITY */ - 759, /* GL_INTENSITY4 */ - 761, /* GL_INTENSITY8 */ - 751, /* GL_INTENSITY12 */ - 753, /* GL_INTENSITY16 */ - 1618, /* GL_RGB2_EXT */ - 1624, /* GL_RGB4 */ - 1627, /* GL_RGB5 */ - 1634, /* GL_RGB8 */ - 1604, /* GL_RGB10 */ - 1608, /* GL_RGB12 */ - 1610, /* GL_RGB16 */ - 1654, /* GL_RGBA2 */ - 1661, /* GL_RGBA4 */ - 1630, /* GL_RGB5_A1 */ - 1666, /* GL_RGBA8 */ - 1605, /* GL_RGB10_A2 */ - 1644, /* GL_RGBA12 */ - 1646, /* GL_RGBA16 */ - 2090, /* GL_TEXTURE_RED_SIZE */ - 2058, /* GL_TEXTURE_GREEN_SIZE */ - 1982, /* GL_TEXTURE_BLUE_SIZE */ - 1963, /* GL_TEXTURE_ALPHA_SIZE */ - 2071, /* GL_TEXTURE_LUMINANCE_SIZE */ - 2062, /* GL_TEXTURE_INTENSITY_SIZE */ - 1595, /* GL_REPLACE_EXT */ - 1493, /* GL_PROXY_TEXTURE_1D */ - 1497, /* GL_PROXY_TEXTURE_2D */ - 2098, /* GL_TEXTURE_TOO_LARGE_EXT */ - 2084, /* GL_TEXTURE_PRIORITY */ - 2092, /* GL_TEXTURE_RESIDENT */ - 1966, /* GL_TEXTURE_BINDING_1D */ - 1969, /* GL_TEXTURE_BINDING_2D */ - 1972, /* GL_TEXTURE_BINDING_3D */ - 1301, /* GL_PACK_SKIP_IMAGES */ - 1297, /* GL_PACK_IMAGE_HEIGHT */ - 2154, /* GL_UNPACK_SKIP_IMAGES */ - 2151, /* GL_UNPACK_IMAGE_HEIGHT */ - 1961, /* GL_TEXTURE_3D */ - 1501, /* GL_PROXY_TEXTURE_3D */ - 2042, /* GL_TEXTURE_DEPTH */ - 2101, /* GL_TEXTURE_WRAP_R */ - 1014, /* GL_MAX_3D_TEXTURE_SIZE */ - 2217, /* GL_VERTEX_ARRAY */ - 1227, /* GL_NORMAL_ARRAY */ - 189, /* GL_COLOR_ARRAY */ - 735, /* GL_INDEX_ARRAY */ - 2012, /* GL_TEXTURE_COORD_ARRAY */ - 518, /* GL_EDGE_FLAG_ARRAY */ - 2223, /* GL_VERTEX_ARRAY_SIZE */ - 2225, /* GL_VERTEX_ARRAY_TYPE */ - 2224, /* GL_VERTEX_ARRAY_STRIDE */ - 1232, /* GL_NORMAL_ARRAY_TYPE */ - 1231, /* GL_NORMAL_ARRAY_STRIDE */ - 193, /* GL_COLOR_ARRAY_SIZE */ - 195, /* GL_COLOR_ARRAY_TYPE */ - 194, /* GL_COLOR_ARRAY_STRIDE */ - 740, /* GL_INDEX_ARRAY_TYPE */ - 739, /* GL_INDEX_ARRAY_STRIDE */ - 2016, /* GL_TEXTURE_COORD_ARRAY_SIZE */ - 2018, /* GL_TEXTURE_COORD_ARRAY_TYPE */ - 2017, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ - 522, /* GL_EDGE_FLAG_ARRAY_STRIDE */ - 2222, /* GL_VERTEX_ARRAY_POINTER */ - 1230, /* GL_NORMAL_ARRAY_POINTER */ - 192, /* GL_COLOR_ARRAY_POINTER */ - 738, /* GL_INDEX_ARRAY_POINTER */ - 2015, /* GL_TEXTURE_COORD_ARRAY_POINTER */ - 521, /* GL_EDGE_FLAG_ARRAY_POINTER */ - 1205, /* GL_MULTISAMPLE */ - 1718, /* GL_SAMPLE_ALPHA_TO_COVERAGE */ - 1720, /* GL_SAMPLE_ALPHA_TO_ONE */ - 1725, /* GL_SAMPLE_COVERAGE */ - 1722, /* GL_SAMPLE_BUFFERS */ - 1713, /* GL_SAMPLES */ - 1729, /* GL_SAMPLE_COVERAGE_VALUE */ - 1727, /* GL_SAMPLE_COVERAGE_INVERT */ - 237, /* GL_COLOR_MATRIX */ - 239, /* GL_COLOR_MATRIX_STACK_DEPTH */ - 1026, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */ - 1412, /* GL_POST_COLOR_MATRIX_RED_SCALE */ - 1408, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */ - 1403, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */ - 1399, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */ - 1410, /* GL_POST_COLOR_MATRIX_RED_BIAS */ - 1406, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */ - 1401, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */ - 1397, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */ - 1995, /* GL_TEXTURE_COLOR_TABLE_SGI */ - 1502, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */ - 1997, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */ - 94, /* GL_BLEND_DST_RGB */ - 108, /* GL_BLEND_SRC_RGB */ - 92, /* GL_BLEND_DST_ALPHA */ - 106, /* GL_BLEND_SRC_ALPHA */ - 243, /* GL_COLOR_TABLE */ - 1422, /* GL_POST_CONVOLUTION_COLOR_TABLE */ - 1405, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */ - 1488, /* GL_PROXY_COLOR_TABLE */ - 1492, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */ - 1491, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */ - 267, /* GL_COLOR_TABLE_SCALE */ - 247, /* GL_COLOR_TABLE_BIAS */ - 252, /* GL_COLOR_TABLE_FORMAT */ - 269, /* GL_COLOR_TABLE_WIDTH */ - 264, /* GL_COLOR_TABLE_RED_SIZE */ - 255, /* GL_COLOR_TABLE_GREEN_SIZE */ - 249, /* GL_COLOR_TABLE_BLUE_SIZE */ - 244, /* GL_COLOR_TABLE_ALPHA_SIZE */ - 261, /* GL_COLOR_TABLE_LUMINANCE_SIZE */ - 258, /* GL_COLOR_TABLE_INTENSITY_SIZE */ - 79, /* GL_BGR */ - 80, /* GL_BGRA */ - 1041, /* GL_MAX_ELEMENTS_VERTICES */ - 1040, /* GL_MAX_ELEMENTS_INDICES */ - 2061, /* GL_TEXTURE_INDEX_SIZE_EXT */ - 186, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */ - 1368, /* GL_POINT_SIZE_MIN */ - 1364, /* GL_POINT_SIZE_MAX */ - 1353, /* GL_POINT_FADE_THRESHOLD_SIZE */ - 1349, /* GL_POINT_DISTANCE_ATTENUATION */ - 159, /* GL_CLAMP_TO_BORDER */ - 162, /* GL_CLAMP_TO_EDGE */ - 2083, /* GL_TEXTURE_MIN_LOD */ - 2081, /* GL_TEXTURE_MAX_LOD */ - 1965, /* GL_TEXTURE_BASE_LEVEL */ - 2080, /* GL_TEXTURE_MAX_LEVEL */ - 726, /* GL_IGNORE_BORDER_HP */ - 321, /* GL_CONSTANT_BORDER_HP */ - 1596, /* GL_REPLICATE_BORDER_HP */ - 332, /* GL_CONVOLUTION_BORDER_COLOR */ - 1260, /* GL_OCCLUSION_TEST_HP */ - 1261, /* GL_OCCLUSION_TEST_RESULT_HP */ - 827, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */ - 1989, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */ - 1991, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */ - 1993, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */ - 1994, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - 1992, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */ - 1990, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */ - 1020, /* GL_MAX_CLIPMAP_DEPTH_SGIX */ - 1021, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */ - 1432, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */ - 1434, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */ - 1431, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */ - 1433, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */ - 2069, /* GL_TEXTURE_LOD_BIAS_S_SGIX */ - 2070, /* GL_TEXTURE_LOD_BIAS_T_SGIX */ - 2068, /* GL_TEXTURE_LOD_BIAS_R_SGIX */ - 682, /* GL_GENERATE_MIPMAP */ - 683, /* GL_GENERATE_MIPMAP_HINT */ - 595, /* GL_FOG_OFFSET_SGIX */ - 596, /* GL_FOG_OFFSET_VALUE_SGIX */ - 2003, /* GL_TEXTURE_COMPARE_SGIX */ - 2002, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */ - 2065, /* GL_TEXTURE_LEQUAL_R_SGIX */ - 2057, /* GL_TEXTURE_GEQUAL_R_SGIX */ - 415, /* GL_DEPTH_COMPONENT16 */ - 419, /* GL_DEPTH_COMPONENT24 */ - 423, /* GL_DEPTH_COMPONENT32 */ - 357, /* GL_CULL_VERTEX_EXT */ - 359, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */ - 358, /* GL_CULL_VERTEX_EYE_POSITION_EXT */ - 2290, /* GL_WRAP_BORDER_SUN */ - 1996, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ - 820, /* GL_LIGHT_MODEL_COLOR_CONTROL */ - 1763, /* GL_SINGLE_COLOR */ - 1747, /* GL_SEPARATE_SPECULAR_COLOR */ - 1758, /* GL_SHARED_TEXTURE_PALETTE_EXT */ - 607, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ - 608, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ - 619, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ - 610, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ - 606, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ - 605, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ - 609, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ - 620, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ - 637, /* GL_FRAMEBUFFER_DEFAULT */ - 664, /* GL_FRAMEBUFFER_UNDEFINED */ - 431, /* GL_DEPTH_STENCIL_ATTACHMENT */ - 896, /* GL_MAJOR_VERSION */ - 1151, /* GL_MINOR_VERSION */ - 1241, /* GL_NUM_EXTENSIONS */ - 327, /* GL_CONTEXT_FLAGS */ - 734, /* GL_INDEX */ - 409, /* GL_DEPTH_BUFFER */ - 1837, /* GL_STENCIL_BUFFER */ - 298, /* GL_COMPRESSED_RED */ - 299, /* GL_COMPRESSED_RG */ - 2160, /* GL_UNSIGNED_BYTE_2_3_3_REV */ - 2205, /* GL_UNSIGNED_SHORT_5_6_5 */ - 2206, /* GL_UNSIGNED_SHORT_5_6_5_REV */ - 2202, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ - 2199, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ - 2174, /* GL_UNSIGNED_INT_8_8_8_8_REV */ - 2170, /* GL_UNSIGNED_INT_2_10_10_10_REV */ - 2078, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ - 2079, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ - 2077, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ - 1155, /* GL_MIRRORED_REPEAT */ - 1684, /* GL_RGB_S3TC */ - 1626, /* GL_RGB4_S3TC */ - 1680, /* GL_RGBA_S3TC */ - 1665, /* GL_RGBA4_S3TC */ - 1674, /* GL_RGBA_DXT5_S3TC */ - 1662, /* GL_RGBA4_DXT5_S3TC */ - 309, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */ - 304, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */ - 305, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */ - 306, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */ - 1217, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */ - 1216, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */ - 828, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */ - 582, /* GL_FOG_COORDINATE_SOURCE */ - 574, /* GL_FOG_COORD */ - 598, /* GL_FRAGMENT_DEPTH */ - 363, /* GL_CURRENT_FOG_COORD */ - 581, /* GL_FOG_COORDINATE_ARRAY_TYPE */ - 580, /* GL_FOG_COORDINATE_ARRAY_STRIDE */ - 579, /* GL_FOG_COORDINATE_ARRAY_POINTER */ - 576, /* GL_FOG_COORDINATE_ARRAY */ - 241, /* GL_COLOR_SUM */ - 384, /* GL_CURRENT_SECONDARY_COLOR */ - 1738, /* GL_SECONDARY_COLOR_ARRAY_SIZE */ - 1740, /* GL_SECONDARY_COLOR_ARRAY_TYPE */ - 1739, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */ - 1737, /* GL_SECONDARY_COLOR_ARRAY_POINTER */ - 1734, /* GL_SECONDARY_COLOR_ARRAY */ - 382, /* GL_CURRENT_RASTER_SECONDARY_COLOR */ - 29, /* GL_ALIASED_POINT_SIZE_RANGE */ - 28, /* GL_ALIASED_LINE_WIDTH_RANGE */ - 1891, /* GL_TEXTURE0 */ - 1893, /* GL_TEXTURE1 */ - 1915, /* GL_TEXTURE2 */ - 1937, /* GL_TEXTURE3 */ - 1943, /* GL_TEXTURE4 */ - 1945, /* GL_TEXTURE5 */ - 1947, /* GL_TEXTURE6 */ - 1949, /* GL_TEXTURE7 */ - 1951, /* GL_TEXTURE8 */ - 1953, /* GL_TEXTURE9 */ - 1894, /* GL_TEXTURE10 */ - 1896, /* GL_TEXTURE11 */ - 1898, /* GL_TEXTURE12 */ - 1900, /* GL_TEXTURE13 */ - 1902, /* GL_TEXTURE14 */ - 1904, /* GL_TEXTURE15 */ - 1906, /* GL_TEXTURE16 */ - 1908, /* GL_TEXTURE17 */ - 1910, /* GL_TEXTURE18 */ - 1912, /* GL_TEXTURE19 */ - 1916, /* GL_TEXTURE20 */ - 1918, /* GL_TEXTURE21 */ - 1920, /* GL_TEXTURE22 */ - 1922, /* GL_TEXTURE23 */ - 1924, /* GL_TEXTURE24 */ - 1926, /* GL_TEXTURE25 */ - 1928, /* GL_TEXTURE26 */ - 1930, /* GL_TEXTURE27 */ - 1932, /* GL_TEXTURE28 */ - 1934, /* GL_TEXTURE29 */ - 1938, /* GL_TEXTURE30 */ - 1940, /* GL_TEXTURE31 */ - 19, /* GL_ACTIVE_TEXTURE */ - 166, /* GL_CLIENT_ACTIVE_TEXTURE */ - 1116, /* GL_MAX_TEXTURE_UNITS */ - 2133, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ - 2136, /* GL_TRANSPOSE_PROJECTION_MATRIX */ - 2138, /* GL_TRANSPOSE_TEXTURE_MATRIX */ - 2130, /* GL_TRANSPOSE_COLOR_MATRIX */ - 1873, /* GL_SUBTRACT */ - 1098, /* GL_MAX_RENDERBUFFER_SIZE */ - 290, /* GL_COMPRESSED_ALPHA */ - 294, /* GL_COMPRESSED_LUMINANCE */ - 295, /* GL_COMPRESSED_LUMINANCE_ALPHA */ - 292, /* GL_COMPRESSED_INTENSITY */ - 300, /* GL_COMPRESSED_RGB */ - 301, /* GL_COMPRESSED_RGBA */ - 2010, /* GL_TEXTURE_COMPRESSION_HINT */ - 2087, /* GL_TEXTURE_RECTANGLE */ - 1978, /* GL_TEXTURE_BINDING_RECTANGLE */ - 1505, /* GL_PROXY_TEXTURE_RECTANGLE */ - 1095, /* GL_MAX_RECTANGLE_TEXTURE_SIZE */ - 430, /* GL_DEPTH_STENCIL */ - 2166, /* GL_UNSIGNED_INT_24_8 */ - 1111, /* GL_MAX_TEXTURE_LOD_BIAS */ - 2076, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ - 1113, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ - 2048, /* GL_TEXTURE_FILTER_CONTROL */ - 2066, /* GL_TEXTURE_LOD_BIAS */ - 274, /* GL_COMBINE4 */ - 1104, /* GL_MAX_SHININESS_NV */ - 1105, /* GL_MAX_SPOT_EXPONENT_NV */ - 732, /* GL_INCR_WRAP */ - 395, /* GL_DECR_WRAP */ - 1175, /* GL_MODELVIEW1_ARB */ - 1233, /* GL_NORMAL_MAP */ - 1556, /* GL_REFLECTION_MAP */ - 2020, /* GL_TEXTURE_CUBE_MAP */ - 1975, /* GL_TEXTURE_BINDING_CUBE_MAP */ - 2032, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */ - 2022, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */ - 2035, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */ - 2025, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */ - 2038, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */ - 2028, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */ - 1503, /* GL_PROXY_TEXTURE_CUBE_MAP */ - 1034, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */ - 1211, /* GL_MULTISAMPLE_FILTER_HINT_NV */ - 1446, /* GL_PRIMITIVE_RESTART_NV */ - 1445, /* GL_PRIMITIVE_RESTART_INDEX_NV */ - 590, /* GL_FOG_DISTANCE_MODE_NV */ - 537, /* GL_EYE_RADIAL_NV */ - 536, /* GL_EYE_PLANE_ABSOLUTE_NV */ - 273, /* GL_COMBINE */ - 280, /* GL_COMBINE_RGB */ - 275, /* GL_COMBINE_ALPHA */ - 1685, /* GL_RGB_SCALE */ - 25, /* GL_ADD_SIGNED */ - 768, /* GL_INTERPOLATE */ - 316, /* GL_CONSTANT */ - 1438, /* GL_PRIMARY_COLOR */ - 1435, /* GL_PREVIOUS */ - 1778, /* GL_SOURCE0_RGB */ - 1784, /* GL_SOURCE1_RGB */ - 1790, /* GL_SOURCE2_RGB */ - 1794, /* GL_SOURCE3_RGB_NV */ - 1775, /* GL_SOURCE0_ALPHA */ - 1781, /* GL_SOURCE1_ALPHA */ - 1787, /* GL_SOURCE2_ALPHA */ - 1793, /* GL_SOURCE3_ALPHA_NV */ - 1274, /* GL_OPERAND0_RGB */ - 1280, /* GL_OPERAND1_RGB */ - 1286, /* GL_OPERAND2_RGB */ - 1290, /* GL_OPERAND3_RGB_NV */ - 1271, /* GL_OPERAND0_ALPHA */ - 1277, /* GL_OPERAND1_ALPHA */ - 1283, /* GL_OPERAND2_ALPHA */ - 1289, /* GL_OPERAND3_ALPHA_NV */ - 137, /* GL_BUFFER_OBJECT_APPLE */ - 2218, /* GL_VERTEX_ARRAY_BINDING */ - 2085, /* GL_TEXTURE_RANGE_LENGTH_APPLE */ - 2086, /* GL_TEXTURE_RANGE_POINTER_APPLE */ - 2295, /* GL_YCBCR_422_APPLE */ - 2207, /* GL_UNSIGNED_SHORT_8_8_APPLE */ - 2209, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ - 2097, /* GL_TEXTURE_STORAGE_HINT_APPLE */ - 1864, /* GL_STORAGE_PRIVATE_APPLE */ - 1863, /* GL_STORAGE_CACHED_APPLE */ - 1865, /* GL_STORAGE_SHARED_APPLE */ - 1765, /* GL_SLICE_ACCUM_SUN */ - 1514, /* GL_QUAD_MESH_SUN */ - 2144, /* GL_TRIANGLE_MESH_SUN */ - 2260, /* GL_VERTEX_PROGRAM_ARB */ - 2271, /* GL_VERTEX_STATE_PROGRAM_NV */ - 2245, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ - 2253, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ - 2255, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ - 2257, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ - 386, /* GL_CURRENT_VERTEX_ATTRIB */ - 1459, /* GL_PROGRAM_LENGTH_ARB */ - 1475, /* GL_PROGRAM_STRING_ARB */ - 1198, /* GL_MODELVIEW_PROJECTION_NV */ - 725, /* GL_IDENTITY_NV */ - 800, /* GL_INVERSE_NV */ - 2135, /* GL_TRANSPOSE_NV */ - 801, /* GL_INVERSE_TRANSPOSE_NV */ - 1079, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ - 1078, /* GL_MAX_PROGRAM_MATRICES_ARB */ - 960, /* GL_MATRIX0_NV */ - 972, /* GL_MATRIX1_NV */ - 984, /* GL_MATRIX2_NV */ - 988, /* GL_MATRIX3_NV */ - 990, /* GL_MATRIX4_NV */ - 992, /* GL_MATRIX5_NV */ - 994, /* GL_MATRIX6_NV */ - 996, /* GL_MATRIX7_NV */ - 369, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */ - 366, /* GL_CURRENT_MATRIX_ARB */ - 1472, /* GL_PROGRAM_POINT_SIZE */ - 2266, /* GL_VERTEX_PROGRAM_TWO_SIDE */ - 1471, /* GL_PROGRAM_PARAMETER_NV */ - 2251, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ - 1477, /* GL_PROGRAM_TARGET_NV */ - 1474, /* GL_PROGRAM_RESIDENT_NV */ - 2107, /* GL_TRACK_MATRIX_NV */ - 2108, /* GL_TRACK_MATRIX_TRANSFORM_NV */ - 2261, /* GL_VERTEX_PROGRAM_BINDING_NV */ - 1453, /* GL_PROGRAM_ERROR_POSITION_ARB */ - 411, /* GL_DEPTH_CLAMP */ - 2226, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ - 2233, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ - 2234, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ - 2235, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ - 2236, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ - 2237, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ - 2238, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ - 2239, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ - 2240, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ - 2241, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ - 2227, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ - 2228, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ - 2229, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ - 2230, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ - 2231, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ - 2232, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ - 908, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ - 915, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ - 916, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ - 917, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */ - 918, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */ - 919, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */ - 920, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */ - 921, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */ - 922, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */ - 923, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */ - 909, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */ - 910, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */ - 911, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */ - 912, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */ - 913, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */ - 914, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */ - 935, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */ - 942, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */ - 943, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */ - 944, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */ - 945, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */ - 946, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */ - 947, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */ - 1452, /* GL_PROGRAM_BINDING_ARB */ - 949, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */ - 950, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */ - 936, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */ - 937, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */ - 938, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */ - 939, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */ - 940, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */ - 941, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */ - 2008, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */ - 2005, /* GL_TEXTURE_COMPRESSED */ - 1239, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */ - 314, /* GL_COMPRESSED_TEXTURE_FORMATS */ - 1138, /* GL_MAX_VERTEX_UNITS_ARB */ - 23, /* GL_ACTIVE_VERTEX_UNITS_ARB */ - 2289, /* GL_WEIGHT_SUM_UNITY_ARB */ - 2259, /* GL_VERTEX_BLEND_ARB */ - 388, /* GL_CURRENT_WEIGHT_ARB */ - 2287, /* GL_WEIGHT_ARRAY_TYPE_ARB */ - 2285, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ - 2283, /* GL_WEIGHT_ARRAY_SIZE_ARB */ - 2281, /* GL_WEIGHT_ARRAY_POINTER_ARB */ - 2276, /* GL_WEIGHT_ARRAY_ARB */ - 445, /* GL_DOT3_RGB */ - 446, /* GL_DOT3_RGBA */ - 308, /* GL_COMPRESSED_RGB_FXT1_3DFX */ - 303, /* GL_COMPRESSED_RGBA_FXT1_3DFX */ - 1206, /* GL_MULTISAMPLE_3DFX */ - 1723, /* GL_SAMPLE_BUFFERS_3DFX */ - 1714, /* GL_SAMPLES_3DFX */ - 1186, /* GL_MODELVIEW2_ARB */ - 1189, /* GL_MODELVIEW3_ARB */ - 1190, /* GL_MODELVIEW4_ARB */ - 1191, /* GL_MODELVIEW5_ARB */ - 1192, /* GL_MODELVIEW6_ARB */ - 1193, /* GL_MODELVIEW7_ARB */ - 1194, /* GL_MODELVIEW8_ARB */ - 1195, /* GL_MODELVIEW9_ARB */ - 1165, /* GL_MODELVIEW10_ARB */ - 1166, /* GL_MODELVIEW11_ARB */ - 1167, /* GL_MODELVIEW12_ARB */ - 1168, /* GL_MODELVIEW13_ARB */ - 1169, /* GL_MODELVIEW14_ARB */ - 1170, /* GL_MODELVIEW15_ARB */ - 1171, /* GL_MODELVIEW16_ARB */ - 1172, /* GL_MODELVIEW17_ARB */ - 1173, /* GL_MODELVIEW18_ARB */ - 1174, /* GL_MODELVIEW19_ARB */ - 1176, /* GL_MODELVIEW20_ARB */ - 1177, /* GL_MODELVIEW21_ARB */ - 1178, /* GL_MODELVIEW22_ARB */ - 1179, /* GL_MODELVIEW23_ARB */ - 1180, /* GL_MODELVIEW24_ARB */ - 1181, /* GL_MODELVIEW25_ARB */ - 1182, /* GL_MODELVIEW26_ARB */ - 1183, /* GL_MODELVIEW27_ARB */ - 1184, /* GL_MODELVIEW28_ARB */ - 1185, /* GL_MODELVIEW29_ARB */ - 1187, /* GL_MODELVIEW30_ARB */ - 1188, /* GL_MODELVIEW31_ARB */ - 450, /* GL_DOT3_RGB_EXT */ - 448, /* GL_DOT3_RGBA_EXT */ - 1159, /* GL_MIRROR_CLAMP_EXT */ - 1162, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */ - 1201, /* GL_MODULATE_ADD_ATI */ - 1202, /* GL_MODULATE_SIGNED_ADD_ATI */ - 1203, /* GL_MODULATE_SUBTRACT_ATI */ - 2296, /* GL_YCBCR_MESA */ - 1298, /* GL_PACK_INVERT_MESA */ - 391, /* GL_DEBUG_OBJECT_MESA */ - 392, /* GL_DEBUG_PRINT_MESA */ - 390, /* GL_DEBUG_ASSERT_MESA */ - 139, /* GL_BUFFER_SIZE */ - 141, /* GL_BUFFER_USAGE */ - 145, /* GL_BUMP_ROT_MATRIX_ATI */ - 146, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */ - 144, /* GL_BUMP_NUM_TEX_UNITS_ATI */ - 148, /* GL_BUMP_TEX_UNITS_ATI */ - 510, /* GL_DUDV_ATI */ - 509, /* GL_DU8DV8_ATI */ - 143, /* GL_BUMP_ENVMAP_ATI */ - 147, /* GL_BUMP_TARGET_ATI */ - 1242, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */ - 1450, /* GL_PROGRAM_BINARY_FORMATS_OES */ - 1827, /* GL_STENCIL_BACK_FUNC */ - 1825, /* GL_STENCIL_BACK_FAIL */ - 1829, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */ - 1831, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */ - 599, /* GL_FRAGMENT_PROGRAM_ARB */ - 1448, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */ - 1480, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */ - 1479, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */ - 1462, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - 1468, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - 1467, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - 1068, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */ - 1093, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */ - 1092, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */ - 1081, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */ - 1087, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */ - 1086, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */ - 1656, /* GL_RGBA32F */ - 1619, /* GL_RGB32F */ - 1647, /* GL_RGBA16F */ - 1611, /* GL_RGB16F */ - 1675, /* GL_RGBA_FLOAT_MODE_ARB */ - 1037, /* GL_MAX_DRAW_BUFFERS */ - 454, /* GL_DRAW_BUFFER0 */ - 457, /* GL_DRAW_BUFFER1 */ - 478, /* GL_DRAW_BUFFER2 */ - 481, /* GL_DRAW_BUFFER3 */ - 484, /* GL_DRAW_BUFFER4 */ - 487, /* GL_DRAW_BUFFER5 */ - 490, /* GL_DRAW_BUFFER6 */ - 493, /* GL_DRAW_BUFFER7 */ - 496, /* GL_DRAW_BUFFER8 */ - 499, /* GL_DRAW_BUFFER9 */ - 458, /* GL_DRAW_BUFFER10 */ - 461, /* GL_DRAW_BUFFER11 */ - 464, /* GL_DRAW_BUFFER12 */ - 467, /* GL_DRAW_BUFFER13 */ - 470, /* GL_DRAW_BUFFER14 */ - 473, /* GL_DRAW_BUFFER15 */ - 97, /* GL_BLEND_EQUATION_ALPHA */ - 1011, /* GL_MATRIX_PALETTE_ARB */ - 1061, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */ - 1064, /* GL_MAX_PALETTE_MATRICES_ARB */ - 372, /* GL_CURRENT_PALETTE_MATRIX_ARB */ - 999, /* GL_MATRIX_INDEX_ARRAY_ARB */ - 367, /* GL_CURRENT_MATRIX_INDEX_ARB */ - 1004, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */ - 1008, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */ - 1006, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */ - 1002, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */ - 2043, /* GL_TEXTURE_DEPTH_SIZE */ - 438, /* GL_DEPTH_TEXTURE_MODE */ - 2000, /* GL_TEXTURE_COMPARE_MODE */ - 1998, /* GL_TEXTURE_COMPARE_FUNC */ - 284, /* GL_COMPARE_REF_TO_TEXTURE */ - 1375, /* GL_POINT_SPRITE */ - 346, /* GL_COORD_REPLACE */ - 1380, /* GL_POINT_SPRITE_R_MODE_NV */ - 1520, /* GL_QUERY_COUNTER_BITS */ - 375, /* GL_CURRENT_QUERY */ - 1524, /* GL_QUERY_RESULT */ - 1526, /* GL_QUERY_RESULT_AVAILABLE */ - 1130, /* GL_MAX_VERTEX_ATTRIBS */ - 2249, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ - 436, /* GL_DEPTH_STENCIL_TO_RGBA_NV */ - 435, /* GL_DEPTH_STENCIL_TO_BGRA_NV */ - 1107, /* GL_MAX_TEXTURE_COORDS */ - 1109, /* GL_MAX_TEXTURE_IMAGE_UNITS */ - 1455, /* GL_PROGRAM_ERROR_STRING_ARB */ - 1457, /* GL_PROGRAM_FORMAT_ASCII_ARB */ - 1456, /* GL_PROGRAM_FORMAT_ARB */ - 2099, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */ - 408, /* GL_DEPTH_BOUNDS_TEST_EXT */ - 407, /* GL_DEPTH_BOUNDS_EXT */ - 61, /* GL_ARRAY_BUFFER */ - 523, /* GL_ELEMENT_ARRAY_BUFFER */ - 62, /* GL_ARRAY_BUFFER_BINDING */ - 524, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */ - 2220, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ - 1228, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ - 190, /* GL_COLOR_ARRAY_BUFFER_BINDING */ - 736, /* GL_INDEX_ARRAY_BUFFER_BINDING */ - 2013, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */ - 519, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */ - 1735, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ - 577, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */ - 2277, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ - 2242, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ - 1458, /* GL_PROGRAM_INSTRUCTIONS_ARB */ - 1074, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ - 1464, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - 1083, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ - 1478, /* GL_PROGRAM_TEMPORARIES_ARB */ - 1089, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */ - 1466, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */ - 1085, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */ - 1470, /* GL_PROGRAM_PARAMETERS_ARB */ - 1088, /* GL_MAX_PROGRAM_PARAMETERS_ARB */ - 1465, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */ - 1084, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */ - 1449, /* GL_PROGRAM_ATTRIBS_ARB */ - 1069, /* GL_MAX_PROGRAM_ATTRIBS_ARB */ - 1463, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */ - 1082, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */ - 1447, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */ - 1067, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */ - 1461, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - 1080, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */ - 1075, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ - 1071, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ - 1481, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ - 2132, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ - 1543, /* GL_READ_ONLY */ - 2291, /* GL_WRITE_ONLY */ - 1545, /* GL_READ_WRITE */ - 124, /* GL_BUFFER_ACCESS */ - 129, /* GL_BUFFER_MAPPED */ - 134, /* GL_BUFFER_MAP_POINTER */ - 2106, /* GL_TIME_ELAPSED_EXT */ - 959, /* GL_MATRIX0_ARB */ - 971, /* GL_MATRIX1_ARB */ - 983, /* GL_MATRIX2_ARB */ - 987, /* GL_MATRIX3_ARB */ - 989, /* GL_MATRIX4_ARB */ - 991, /* GL_MATRIX5_ARB */ - 993, /* GL_MATRIX6_ARB */ - 995, /* GL_MATRIX7_ARB */ - 997, /* GL_MATRIX8_ARB */ - 998, /* GL_MATRIX9_ARB */ - 961, /* GL_MATRIX10_ARB */ - 962, /* GL_MATRIX11_ARB */ - 963, /* GL_MATRIX12_ARB */ - 964, /* GL_MATRIX13_ARB */ - 965, /* GL_MATRIX14_ARB */ - 966, /* GL_MATRIX15_ARB */ - 967, /* GL_MATRIX16_ARB */ - 968, /* GL_MATRIX17_ARB */ - 969, /* GL_MATRIX18_ARB */ - 970, /* GL_MATRIX19_ARB */ - 973, /* GL_MATRIX20_ARB */ - 974, /* GL_MATRIX21_ARB */ - 975, /* GL_MATRIX22_ARB */ - 976, /* GL_MATRIX23_ARB */ - 977, /* GL_MATRIX24_ARB */ - 978, /* GL_MATRIX25_ARB */ - 979, /* GL_MATRIX26_ARB */ - 980, /* GL_MATRIX27_ARB */ - 981, /* GL_MATRIX28_ARB */ - 982, /* GL_MATRIX29_ARB */ - 985, /* GL_MATRIX30_ARB */ - 986, /* GL_MATRIX31_ARB */ - 1868, /* GL_STREAM_DRAW */ - 1870, /* GL_STREAM_READ */ - 1866, /* GL_STREAM_COPY */ - 1817, /* GL_STATIC_DRAW */ - 1819, /* GL_STATIC_READ */ - 1815, /* GL_STATIC_COPY */ - 513, /* GL_DYNAMIC_DRAW */ - 515, /* GL_DYNAMIC_READ */ - 511, /* GL_DYNAMIC_COPY */ - 1338, /* GL_PIXEL_PACK_BUFFER */ - 1342, /* GL_PIXEL_UNPACK_BUFFER */ - 1339, /* GL_PIXEL_PACK_BUFFER_BINDING */ - 1343, /* GL_PIXEL_UNPACK_BUFFER_BINDING */ - 399, /* GL_DEPTH24_STENCIL8 */ - 2095, /* GL_TEXTURE_STENCIL_SIZE */ - 2041, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */ - 1070, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */ - 1073, /* GL_MAX_PROGRAM_IF_DEPTH_NV */ - 1077, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */ - 1076, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */ - 2247, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER */ - 2244, /* GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB */ - 1016, /* GL_MAX_ARRAY_TEXTURE_LAYERS */ - 1153, /* GL_MIN_PROGRAM_TEXEL_OFFSET */ - 1090, /* GL_MAX_PROGRAM_TEXEL_OFFSET */ - 1859, /* GL_STENCIL_TEST_TWO_SIDE_EXT */ - 18, /* GL_ACTIVE_STENCIL_FACE_EXT */ - 1160, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */ - 1716, /* GL_SAMPLES_PASSED */ - 692, /* GL_GEOMETRY_VERTICES_OUT */ - 686, /* GL_GEOMETRY_INPUT_TYPE */ - 688, /* GL_GEOMETRY_OUTPUT_TYPE */ - 164, /* GL_CLAMP_VERTEX_COLOR_ARB */ - 156, /* GL_CLAMP_FRAGMENT_COLOR_ARB */ - 157, /* GL_CLAMP_READ_COLOR */ - 549, /* GL_FIXED_ONLY */ - 1362, /* GL_POINT_SIZE_ARRAY_TYPE_OES */ - 1361, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */ - 1360, /* GL_POINT_SIZE_ARRAY_POINTER_OES */ - 1197, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */ - 1484, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */ - 2075, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */ - 138, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */ - 128, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */ - 1560, /* GL_RELEASED_APPLE */ - 2274, /* GL_VOLATILE_APPLE */ - 1599, /* GL_RETAINED_APPLE */ - 2149, /* GL_UNDEFINED_APPLE */ - 1508, /* GL_PURGEABLE_APPLE */ - 600, /* GL_FRAGMENT_SHADER */ - 2269, /* GL_VERTEX_SHADER */ - 1469, /* GL_PROGRAM_OBJECT_ARB */ - 1752, /* GL_SHADER_OBJECT_ARB */ - 1045, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */ - 1135, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */ - 1126, /* GL_MAX_VARYING_COMPONENTS */ - 1133, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */ - 1028, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */ - 1258, /* GL_OBJECT_TYPE_ARB */ - 1754, /* GL_SHADER_TYPE */ - 565, /* GL_FLOAT_VEC2 */ - 567, /* GL_FLOAT_VEC3 */ - 569, /* GL_FLOAT_VEC4 */ - 788, /* GL_INT_VEC2 */ - 790, /* GL_INT_VEC3 */ - 792, /* GL_INT_VEC4 */ - 116, /* GL_BOOL */ - 118, /* GL_BOOL_VEC2 */ - 120, /* GL_BOOL_VEC3 */ - 122, /* GL_BOOL_VEC4 */ - 553, /* GL_FLOAT_MAT2 */ - 557, /* GL_FLOAT_MAT3 */ - 561, /* GL_FLOAT_MAT4 */ - 1692, /* GL_SAMPLER_1D */ - 1698, /* GL_SAMPLER_2D */ - 1706, /* GL_SAMPLER_3D */ - 1710, /* GL_SAMPLER_CUBE */ - 1697, /* GL_SAMPLER_1D_SHADOW */ - 1705, /* GL_SAMPLER_2D_SHADOW */ - 1703, /* GL_SAMPLER_2D_RECT */ - 1704, /* GL_SAMPLER_2D_RECT_SHADOW */ - 555, /* GL_FLOAT_MAT2x3 */ - 556, /* GL_FLOAT_MAT2x4 */ - 559, /* GL_FLOAT_MAT3x2 */ - 560, /* GL_FLOAT_MAT3x4 */ - 563, /* GL_FLOAT_MAT4x2 */ - 564, /* GL_FLOAT_MAT4x3 */ - 397, /* GL_DELETE_STATUS */ - 289, /* GL_COMPILE_STATUS */ - 849, /* GL_LINK_STATUS */ - 2214, /* GL_VALIDATE_STATUS */ - 748, /* GL_INFO_LOG_LENGTH */ - 64, /* GL_ATTACHED_SHADERS */ - 21, /* GL_ACTIVE_UNIFORMS */ - 22, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */ - 1753, /* GL_SHADER_SOURCE_LENGTH */ - 15, /* GL_ACTIVE_ATTRIBUTES */ - 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */ - 602, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */ - 1756, /* GL_SHADING_LANGUAGE_VERSION */ - 374, /* GL_CURRENT_PROGRAM */ - 1307, /* GL_PALETTE4_RGB8_OES */ - 1309, /* GL_PALETTE4_RGBA8_OES */ - 1305, /* GL_PALETTE4_R5_G6_B5_OES */ - 1308, /* GL_PALETTE4_RGBA4_OES */ - 1306, /* GL_PALETTE4_RGB5_A1_OES */ - 1312, /* GL_PALETTE8_RGB8_OES */ - 1314, /* GL_PALETTE8_RGBA8_OES */ - 1310, /* GL_PALETTE8_R5_G6_B5_OES */ - 1313, /* GL_PALETTE8_RGBA4_OES */ - 1311, /* GL_PALETTE8_RGB5_A1_OES */ - 729, /* GL_IMPLEMENTATION_COLOR_READ_TYPE */ - 727, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT */ - 1359, /* GL_POINT_SIZE_ARRAY_OES */ - 2019, /* GL_TEXTURE_CROP_RECT_OES */ - 1000, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */ - 1358, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */ - 2197, /* GL_UNSIGNED_NORMALIZED */ - 1956, /* GL_TEXTURE_1D_ARRAY */ - 1494, /* GL_PROXY_TEXTURE_1D_ARRAY */ - 1959, /* GL_TEXTURE_2D_ARRAY */ - 1498, /* GL_PROXY_TEXTURE_2D_ARRAY */ - 1967, /* GL_TEXTURE_BINDING_1D_ARRAY */ - 1970, /* GL_TEXTURE_BINDING_2D_ARRAY */ - 1052, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS */ - 1986, /* GL_TEXTURE_BUFFER */ - 1106, /* GL_MAX_TEXTURE_BUFFER_SIZE */ - 1974, /* GL_TEXTURE_BINDING_BUFFER */ - 1987, /* GL_TEXTURE_BUFFER_DATA_STORE_BINDING */ - 1988, /* GL_TEXTURE_BUFFER_FORMAT */ - 1531, /* GL_R11F_G11F_B10F */ - 2163, /* GL_UNSIGNED_INT_10F_11F_11F_REV */ - 1642, /* GL_RGB9_E5 */ - 2172, /* GL_UNSIGNED_INT_5_9_9_9_REV */ - 2093, /* GL_TEXTURE_SHARED_SIZE */ - 1809, /* GL_SRGB */ - 1810, /* GL_SRGB8 */ - 1812, /* GL_SRGB_ALPHA */ - 1811, /* GL_SRGB8_ALPHA8 */ - 1769, /* GL_SLUMINANCE_ALPHA */ - 1768, /* GL_SLUMINANCE8_ALPHA8 */ - 1766, /* GL_SLUMINANCE */ - 1767, /* GL_SLUMINANCE8 */ - 312, /* GL_COMPRESSED_SRGB */ - 313, /* GL_COMPRESSED_SRGB_ALPHA */ - 310, /* GL_COMPRESSED_SLUMINANCE */ - 311, /* GL_COMPRESSED_SLUMINANCE_ALPHA */ - 2128, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH */ - 2117, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE */ - 1124, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS */ - 2126, /* GL_TRANSFORM_FEEDBACK_VARYINGS */ - 2122, /* GL_TRANSFORM_FEEDBACK_BUFFER_START */ - 2120, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE */ - 1441, /* GL_PRIMITIVES_GENERATED */ - 2124, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN */ - 1535, /* GL_RASTERIZER_DISCARD */ - 1120, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS */ - 1122, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS */ - 766, /* GL_INTERLEAVED_ATTRIBS */ - 1745, /* GL_SEPARATE_ATTRIBS */ - 2112, /* GL_TRANSFORM_FEEDBACK_BUFFER */ - 2114, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING */ - 1377, /* GL_POINT_SPRITE_COORD_ORIGIN */ - 857, /* GL_LOWER_LEFT */ - 2211, /* GL_UPPER_LEFT */ - 1833, /* GL_STENCIL_BACK_REF */ - 1834, /* GL_STENCIL_BACK_VALUE_MASK */ - 1835, /* GL_STENCIL_BACK_WRITEMASK */ - 503, /* GL_DRAW_FRAMEBUFFER_BINDING */ - 1565, /* GL_RENDERBUFFER_BINDING */ - 1539, /* GL_READ_FRAMEBUFFER */ - 502, /* GL_DRAW_FRAMEBUFFER */ - 1540, /* GL_READ_FRAMEBUFFER_BINDING */ - 1584, /* GL_RENDERBUFFER_SAMPLES */ - 616, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ - 613, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ - 628, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ - 623, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ - 626, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ - 634, /* GL_FRAMEBUFFER_COMPLETE */ - 639, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ - 654, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ - 648, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */ - 643, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */ - 649, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */ - 645, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ - 659, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ - 665, /* GL_FRAMEBUFFER_UNSUPPORTED */ - 663, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */ - 1024, /* GL_MAX_COLOR_ATTACHMENTS */ - 196, /* GL_COLOR_ATTACHMENT0 */ - 199, /* GL_COLOR_ATTACHMENT1 */ - 213, /* GL_COLOR_ATTACHMENT2 */ - 215, /* GL_COLOR_ATTACHMENT3 */ - 217, /* GL_COLOR_ATTACHMENT4 */ - 219, /* GL_COLOR_ATTACHMENT5 */ - 221, /* GL_COLOR_ATTACHMENT6 */ - 223, /* GL_COLOR_ATTACHMENT7 */ - 225, /* GL_COLOR_ATTACHMENT8 */ - 227, /* GL_COLOR_ATTACHMENT9 */ - 200, /* GL_COLOR_ATTACHMENT10 */ - 202, /* GL_COLOR_ATTACHMENT11 */ - 204, /* GL_COLOR_ATTACHMENT12 */ - 206, /* GL_COLOR_ATTACHMENT13 */ - 208, /* GL_COLOR_ATTACHMENT14 */ - 210, /* GL_COLOR_ATTACHMENT15 */ - 402, /* GL_DEPTH_ATTACHMENT */ - 1822, /* GL_STENCIL_ATTACHMENT */ - 604, /* GL_FRAMEBUFFER */ - 1562, /* GL_RENDERBUFFER */ - 1588, /* GL_RENDERBUFFER_WIDTH */ - 1575, /* GL_RENDERBUFFER_HEIGHT */ - 1578, /* GL_RENDERBUFFER_INTERNAL_FORMAT */ - 1854, /* GL_STENCIL_INDEX_EXT */ - 1843, /* GL_STENCIL_INDEX1 */ - 1848, /* GL_STENCIL_INDEX4 */ - 1851, /* GL_STENCIL_INDEX8 */ - 1844, /* GL_STENCIL_INDEX16 */ - 1582, /* GL_RENDERBUFFER_RED_SIZE */ - 1573, /* GL_RENDERBUFFER_GREEN_SIZE */ - 1568, /* GL_RENDERBUFFER_BLUE_SIZE */ - 1563, /* GL_RENDERBUFFER_ALPHA_SIZE */ - 1570, /* GL_RENDERBUFFER_DEPTH_SIZE */ - 1586, /* GL_RENDERBUFFER_STENCIL_SIZE */ - 657, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ - 1101, /* GL_MAX_SAMPLES */ - 2055, /* GL_TEXTURE_GEN_STR_OES */ - 703, /* GL_HALF_FLOAT_OES */ - 1629, /* GL_RGB565_OES */ - 1659, /* GL_RGBA32UI */ - 1622, /* GL_RGB32UI */ - 40, /* GL_ALPHA32UI_EXT */ - 758, /* GL_INTENSITY32UI_EXT */ - 874, /* GL_LUMINANCE32UI_EXT */ - 891, /* GL_LUMINANCE_ALPHA32UI_EXT */ - 1650, /* GL_RGBA16UI */ - 1614, /* GL_RGB16UI */ - 37, /* GL_ALPHA16UI_EXT */ - 755, /* GL_INTENSITY16UI_EXT */ - 869, /* GL_LUMINANCE16UI_EXT */ - 889, /* GL_LUMINANCE_ALPHA16UI_EXT */ - 1669, /* GL_RGBA8UI */ - 1637, /* GL_RGB8UI */ - 45, /* GL_ALPHA8UI_EXT */ - 763, /* GL_INTENSITY8UI_EXT */ - 883, /* GL_LUMINANCE8UI_EXT */ - 893, /* GL_LUMINANCE_ALPHA8UI_EXT */ - 1657, /* GL_RGBA32I */ - 1620, /* GL_RGB32I */ - 39, /* GL_ALPHA32I_EXT */ - 757, /* GL_INTENSITY32I_EXT */ - 873, /* GL_LUMINANCE32I_EXT */ - 890, /* GL_LUMINANCE_ALPHA32I_EXT */ - 1648, /* GL_RGBA16I */ - 1612, /* GL_RGB16I */ - 36, /* GL_ALPHA16I_EXT */ - 754, /* GL_INTENSITY16I_EXT */ - 868, /* GL_LUMINANCE16I_EXT */ - 888, /* GL_LUMINANCE_ALPHA16I_EXT */ - 1667, /* GL_RGBA8I */ - 1635, /* GL_RGB8I */ - 44, /* GL_ALPHA8I_EXT */ - 762, /* GL_INTENSITY8I_EXT */ - 882, /* GL_LUMINANCE8I_EXT */ - 892, /* GL_LUMINANCE_ALPHA8I_EXT */ - 1552, /* GL_RED_INTEGER */ - 699, /* GL_GREEN_INTEGER */ - 113, /* GL_BLUE_INTEGER */ - 49, /* GL_ALPHA_INTEGER_EXT */ - 1682, /* GL_RGB_INTEGER */ - 1676, /* GL_RGBA_INTEGER */ - 84, /* GL_BGR_INTEGER */ - 82, /* GL_BGRA_INTEGER */ - 895, /* GL_LUMINANCE_INTEGER_EXT */ - 894, /* GL_LUMINANCE_ALPHA_INTEGER_EXT */ - 1678, /* GL_RGBA_INTEGER_MODE_EXT */ - 611, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED */ - 652, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS */ - 651, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */ - 1693, /* GL_SAMPLER_1D_ARRAY */ - 1699, /* GL_SAMPLER_2D_ARRAY */ - 1708, /* GL_SAMPLER_BUFFER */ - 1695, /* GL_SAMPLER_1D_ARRAY_SHADOW */ - 1701, /* GL_SAMPLER_2D_ARRAY_SHADOW */ - 1711, /* GL_SAMPLER_CUBE_SHADOW */ - 2191, /* GL_UNSIGNED_INT_VEC2 */ - 2193, /* GL_UNSIGNED_INT_VEC3 */ - 2195, /* GL_UNSIGNED_INT_VEC4 */ - 772, /* GL_INT_SAMPLER_1D */ - 776, /* GL_INT_SAMPLER_2D */ - 782, /* GL_INT_SAMPLER_3D */ - 786, /* GL_INT_SAMPLER_CUBE */ - 780, /* GL_INT_SAMPLER_2D_RECT */ - 773, /* GL_INT_SAMPLER_1D_ARRAY */ - 777, /* GL_INT_SAMPLER_2D_ARRAY */ - 784, /* GL_INT_SAMPLER_BUFFER */ - 2175, /* GL_UNSIGNED_INT_SAMPLER_1D */ - 2179, /* GL_UNSIGNED_INT_SAMPLER_2D */ - 2185, /* GL_UNSIGNED_INT_SAMPLER_3D */ - 2189, /* GL_UNSIGNED_INT_SAMPLER_CUBE */ - 2183, /* GL_UNSIGNED_INT_SAMPLER_2D_RECT */ - 2176, /* GL_UNSIGNED_INT_SAMPLER_1D_ARRAY */ - 2180, /* GL_UNSIGNED_INT_SAMPLER_2D_ARRAY */ - 2187, /* GL_UNSIGNED_INT_SAMPLER_BUFFER */ - 690, /* GL_GEOMETRY_SHADER */ - 693, /* GL_GEOMETRY_VERTICES_OUT_ARB */ - 687, /* GL_GEOMETRY_INPUT_TYPE_ARB */ - 689, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */ - 1058, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */ - 1140, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */ - 1056, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS */ - 1050, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES */ - 1054, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS */ - 858, /* GL_LOW_FLOAT */ - 1142, /* GL_MEDIUM_FLOAT */ - 704, /* GL_HIGH_FLOAT */ - 859, /* GL_LOW_INT */ - 1143, /* GL_MEDIUM_INT */ - 705, /* GL_HIGH_INT */ - 2165, /* GL_UNSIGNED_INT_10_10_10_2_OES */ - 771, /* GL_INT_10_10_10_2_OES */ - 1750, /* GL_SHADER_BINARY_FORMATS */ - 1243, /* GL_NUM_SHADER_BINARY_FORMATS */ - 1751, /* GL_SHADER_COMPILER */ - 1137, /* GL_MAX_VERTEX_UNIFORM_VECTORS */ - 1129, /* GL_MAX_VARYING_VECTORS */ - 1047, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */ - 1528, /* GL_QUERY_WAIT */ - 1522, /* GL_QUERY_NO_WAIT */ - 1518, /* GL_QUERY_BY_REGION_WAIT */ - 1516, /* GL_QUERY_BY_REGION_NO_WAIT */ - 2110, /* GL_TRANSFORM_FEEDBACK */ - 2119, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */ - 2113, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */ - 2111, /* GL_TRANSFORM_FEEDBACK_BINDING */ - 1512, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */ - 545, /* GL_FIRST_VERTEX_CONVENTION */ - 804, /* GL_LAST_VERTEX_CONVENTION */ - 1486, /* GL_PROVOKING_VERTEX */ - 353, /* GL_COPY_READ_BUFFER */ - 354, /* GL_COPY_WRITE_BUFFER */ - 1555, /* GL_RED_SNORM */ - 1689, /* GL_RG_SNORM */ - 1688, /* GL_RGB_SNORM */ - 1681, /* GL_RGBA_SNORM */ - 1534, /* GL_R8_SNORM */ - 1602, /* GL_RG8_SNORM */ - 1641, /* GL_RGB8_SNORM */ - 1673, /* GL_RGBA8_SNORM */ - 1532, /* GL_R16_SNORM */ - 1601, /* GL_RG16_SNORM */ - 1617, /* GL_RGB16_SNORM */ - 1653, /* GL_RGBA16_SNORM */ - 1762, /* GL_SIGNED_NORMALIZED */ - 1443, /* GL_PRIMITIVE_RESTART */ - 1444, /* GL_PRIMITIVE_RESTART_INDEX */ - 1103, /* GL_MAX_SERVER_WAIT_TIMEOUT */ - 1257, /* GL_OBJECT_TYPE */ - 1875, /* GL_SYNC_CONDITION */ - 1880, /* GL_SYNC_STATUS */ - 1877, /* GL_SYNC_FLAGS */ - 1876, /* GL_SYNC_FENCE */ - 1879, /* GL_SYNC_GPU_COMMANDS_COMPLETE */ - 2158, /* GL_UNSIGNALED */ - 1761, /* GL_SIGNALED */ - 54, /* GL_ALREADY_SIGNALED */ - 2105, /* GL_TIMEOUT_EXPIRED */ - 315, /* GL_CONDITION_SATISFIED */ - 2275, /* GL_WAIT_FAILED */ - 126, /* GL_BUFFER_ACCESS_FLAGS */ - 132, /* GL_BUFFER_MAP_LENGTH */ - 133, /* GL_BUFFER_MAP_OFFSET */ - 1132, /* GL_MAX_VERTEX_OUTPUT_COMPONENTS */ - 1048, /* GL_MAX_GEOMETRY_INPUT_COMPONENTS */ - 1049, /* GL_MAX_GEOMETRY_OUTPUT_COMPONENTS */ - 1044, /* GL_MAX_FRAGMENT_INPUT_COMPONENTS */ - 329, /* GL_CONTEXT_PROFILE_MASK */ - 530, /* GL_EVAL_BIT */ - 1537, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ - 851, /* GL_LIST_BIT */ - 1981, /* GL_TEXTURE_BIT */ - 1731, /* GL_SCISSOR_BIT */ - 30, /* GL_ALL_ATTRIB_BITS */ - 1208, /* GL_MULTISAMPLE_BIT */ - 31, /* GL_ALL_CLIENT_ATTRIB_BITS */ -}; - -typedef int (*cfunc)(const void *, const void *); - -/** - * Compare a key name to an element in the \c all_enums array. - * - * \c bsearch always passes the key as the first parameter and the pointer - * to the array element as the second parameter. We can elimiate some - * extra work by taking advantage of that fact. - * - * \param a Pointer to the desired enum name. - * \param b Pointer to an element of the \c all_enums array. - */ -static int compar_name( const char *a, const enum_elt *b ) -{ - return strcmp( a, & enum_string_table[ b->offset ] ); -} - -/** - * Compare a key enum value to an element in the \c all_enums array. - * - * \c bsearch always passes the key as the first parameter and the pointer - * to the array element as the second parameter. We can elimiate some - * extra work by taking advantage of that fact. - * - * \param a Pointer to the desired enum name. - * \param b Pointer to an index into the \c all_enums array. - */ -static int compar_nr( const int *a, const unsigned *b ) -{ - return a[0] - all_enums[*b].n; -} - - -static char token_tmp[20]; - -const char *_mesa_lookup_enum_by_nr( int nr ) -{ - unsigned * i; - - i = (unsigned *) _mesa_bsearch(& nr, reduced_enums, - Elements(reduced_enums), - sizeof(reduced_enums[0]), - (cfunc) compar_nr); - - if ( i != NULL ) { - return & enum_string_table[ all_enums[ *i ].offset ]; - } - else { - /* this is not re-entrant safe, no big deal here */ - _mesa_snprintf(token_tmp, sizeof(token_tmp) - 1, "0x%x", nr); - token_tmp[sizeof(token_tmp) - 1] = '\0'; - return token_tmp; - } -} - -/** - * Primitive names - */ -static const char *prim_names[PRIM_UNKNOWN + 1] = { - "GL_POINTS", - "GL_LINES", - "GL_LINE_LOOP", - "GL_LINE_STRIP", - "GL_TRIANGLES", - "GL_TRIANGLE_STRIP", - "GL_TRIANGLE_FAN", - "GL_QUADS", - "GL_QUAD_STRIP", - "GL_POLYGON", - "outside begin/end", - "inside unknown primitive", - "unknown state" -}; - - -/* Get the name of an enum given that it is a primitive type. Avoids - * GL_FALSE/GL_POINTS ambiguity and others. - */ -const char * -_mesa_lookup_prim_by_nr(GLuint nr) -{ - if (nr < Elements(prim_names)) - return prim_names[nr]; - else - return "invalid mode"; -} - - -int _mesa_lookup_enum_by_name( const char *symbol ) -{ - enum_elt * f = NULL; - - if ( symbol != NULL ) { - f = (enum_elt *) _mesa_bsearch(symbol, all_enums, - Elements(all_enums), - sizeof( enum_elt ), - (cfunc) compar_name); - } - - return (f != NULL) ? f->n : -1; -} - - +/* DO NOT EDIT - This file generated automatically by gl_enums.py (from Mesa) script */
+
+/*
+ * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * All Rights Reserved.
+ *
+ * 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, sub license,
+ * 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 (including the next
+ * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL,
+ * AND/OR THEIR SUPPLIERS 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.
+ */
+
+#include "main/glheader.h"
+#include "main/mfeatures.h"
+#include "main/enums.h"
+#include "main/imports.h"
+#include "main/mtypes.h"
+
+typedef struct {
+ size_t offset;
+ int n;
+} enum_elt;
+
+LONGSTRING static const char enum_string_table[] =
+ "GL_2D\0"
+ "GL_2_BYTES\0"
+ "GL_3D\0"
+ "GL_3D_COLOR\0"
+ "GL_3D_COLOR_TEXTURE\0"
+ "GL_3_BYTES\0"
+ "GL_4D_COLOR_TEXTURE\0"
+ "GL_4_BYTES\0"
+ "GL_ACCUM\0"
+ "GL_ACCUM_ALPHA_BITS\0"
+ "GL_ACCUM_BLUE_BITS\0"
+ "GL_ACCUM_BUFFER_BIT\0"
+ "GL_ACCUM_CLEAR_VALUE\0"
+ "GL_ACCUM_GREEN_BITS\0"
+ "GL_ACCUM_RED_BITS\0"
+ "GL_ACTIVE_ATTRIBUTES\0"
+ "GL_ACTIVE_ATTRIBUTE_MAX_LENGTH\0"
+ "GL_ACTIVE_PROGRAM_EXT\0"
+ "GL_ACTIVE_STENCIL_FACE_EXT\0"
+ "GL_ACTIVE_TEXTURE\0"
+ "GL_ACTIVE_TEXTURE_ARB\0"
+ "GL_ACTIVE_UNIFORMS\0"
+ "GL_ACTIVE_UNIFORM_MAX_LENGTH\0"
+ "GL_ACTIVE_VERTEX_UNITS_ARB\0"
+ "GL_ADD\0"
+ "GL_ADD_SIGNED\0"
+ "GL_ADD_SIGNED_ARB\0"
+ "GL_ADD_SIGNED_EXT\0"
+ "GL_ALIASED_LINE_WIDTH_RANGE\0"
+ "GL_ALIASED_POINT_SIZE_RANGE\0"
+ "GL_ALL_ATTRIB_BITS\0"
+ "GL_ALL_CLIENT_ATTRIB_BITS\0"
+ "GL_ALPHA\0"
+ "GL_ALPHA12\0"
+ "GL_ALPHA12_EXT\0"
+ "GL_ALPHA16\0"
+ "GL_ALPHA16I_EXT\0"
+ "GL_ALPHA16UI_EXT\0"
+ "GL_ALPHA16_EXT\0"
+ "GL_ALPHA32I_EXT\0"
+ "GL_ALPHA32UI_EXT\0"
+ "GL_ALPHA4\0"
+ "GL_ALPHA4_EXT\0"
+ "GL_ALPHA8\0"
+ "GL_ALPHA8I_EXT\0"
+ "GL_ALPHA8UI_EXT\0"
+ "GL_ALPHA8_EXT\0"
+ "GL_ALPHA_BIAS\0"
+ "GL_ALPHA_BITS\0"
+ "GL_ALPHA_INTEGER_EXT\0"
+ "GL_ALPHA_SCALE\0"
+ "GL_ALPHA_TEST\0"
+ "GL_ALPHA_TEST_FUNC\0"
+ "GL_ALPHA_TEST_REF\0"
+ "GL_ALREADY_SIGNALED\0"
+ "GL_ALWAYS\0"
+ "GL_AMBIENT\0"
+ "GL_AMBIENT_AND_DIFFUSE\0"
+ "GL_AND\0"
+ "GL_AND_INVERTED\0"
+ "GL_AND_REVERSE\0"
+ "GL_ARRAY_BUFFER\0"
+ "GL_ARRAY_BUFFER_BINDING\0"
+ "GL_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_ATTACHED_SHADERS\0"
+ "GL_ATTRIB_ARRAY_POINTER_NV\0"
+ "GL_ATTRIB_ARRAY_SIZE_NV\0"
+ "GL_ATTRIB_ARRAY_STRIDE_NV\0"
+ "GL_ATTRIB_ARRAY_TYPE_NV\0"
+ "GL_ATTRIB_STACK_DEPTH\0"
+ "GL_AUTO_NORMAL\0"
+ "GL_AUX0\0"
+ "GL_AUX1\0"
+ "GL_AUX2\0"
+ "GL_AUX3\0"
+ "GL_AUX_BUFFERS\0"
+ "GL_BACK\0"
+ "GL_BACK_LEFT\0"
+ "GL_BACK_RIGHT\0"
+ "GL_BGR\0"
+ "GL_BGRA\0"
+ "GL_BGRA_EXT\0"
+ "GL_BGRA_INTEGER\0"
+ "GL_BGRA_INTEGER_EXT\0"
+ "GL_BGR_INTEGER\0"
+ "GL_BGR_INTEGER_EXT\0"
+ "GL_BITMAP\0"
+ "GL_BITMAP_TOKEN\0"
+ "GL_BLEND\0"
+ "GL_BLEND_COLOR\0"
+ "GL_BLEND_COLOR_EXT\0"
+ "GL_BLEND_DST\0"
+ "GL_BLEND_DST_ALPHA\0"
+ "GL_BLEND_DST_ALPHA_OES\0"
+ "GL_BLEND_DST_RGB\0"
+ "GL_BLEND_DST_RGB_OES\0"
+ "GL_BLEND_EQUATION\0"
+ "GL_BLEND_EQUATION_ALPHA\0"
+ "GL_BLEND_EQUATION_ALPHA_EXT\0"
+ "GL_BLEND_EQUATION_ALPHA_OES\0"
+ "GL_BLEND_EQUATION_EXT\0"
+ "GL_BLEND_EQUATION_OES\0"
+ "GL_BLEND_EQUATION_RGB\0"
+ "GL_BLEND_EQUATION_RGB_EXT\0"
+ "GL_BLEND_EQUATION_RGB_OES\0"
+ "GL_BLEND_SRC\0"
+ "GL_BLEND_SRC_ALPHA\0"
+ "GL_BLEND_SRC_ALPHA_OES\0"
+ "GL_BLEND_SRC_RGB\0"
+ "GL_BLEND_SRC_RGB_OES\0"
+ "GL_BLUE\0"
+ "GL_BLUE_BIAS\0"
+ "GL_BLUE_BITS\0"
+ "GL_BLUE_INTEGER\0"
+ "GL_BLUE_INTEGER_EXT\0"
+ "GL_BLUE_SCALE\0"
+ "GL_BOOL\0"
+ "GL_BOOL_ARB\0"
+ "GL_BOOL_VEC2\0"
+ "GL_BOOL_VEC2_ARB\0"
+ "GL_BOOL_VEC3\0"
+ "GL_BOOL_VEC3_ARB\0"
+ "GL_BOOL_VEC4\0"
+ "GL_BOOL_VEC4_ARB\0"
+ "GL_BUFFER_ACCESS\0"
+ "GL_BUFFER_ACCESS_ARB\0"
+ "GL_BUFFER_ACCESS_FLAGS\0"
+ "GL_BUFFER_ACCESS_OES\0"
+ "GL_BUFFER_FLUSHING_UNMAP_APPLE\0"
+ "GL_BUFFER_MAPPED\0"
+ "GL_BUFFER_MAPPED_ARB\0"
+ "GL_BUFFER_MAPPED_OES\0"
+ "GL_BUFFER_MAP_LENGTH\0"
+ "GL_BUFFER_MAP_OFFSET\0"
+ "GL_BUFFER_MAP_POINTER\0"
+ "GL_BUFFER_MAP_POINTER_ARB\0"
+ "GL_BUFFER_MAP_POINTER_OES\0"
+ "GL_BUFFER_OBJECT_APPLE\0"
+ "GL_BUFFER_SERIALIZED_MODIFY_APPLE\0"
+ "GL_BUFFER_SIZE\0"
+ "GL_BUFFER_SIZE_ARB\0"
+ "GL_BUFFER_USAGE\0"
+ "GL_BUFFER_USAGE_ARB\0"
+ "GL_BUMP_ENVMAP_ATI\0"
+ "GL_BUMP_NUM_TEX_UNITS_ATI\0"
+ "GL_BUMP_ROT_MATRIX_ATI\0"
+ "GL_BUMP_ROT_MATRIX_SIZE_ATI\0"
+ "GL_BUMP_TARGET_ATI\0"
+ "GL_BUMP_TEX_UNITS_ATI\0"
+ "GL_BYTE\0"
+ "GL_C3F_V3F\0"
+ "GL_C4F_N3F_V3F\0"
+ "GL_C4UB_V2F\0"
+ "GL_C4UB_V3F\0"
+ "GL_CCW\0"
+ "GL_CLAMP\0"
+ "GL_CLAMP_FRAGMENT_COLOR_ARB\0"
+ "GL_CLAMP_READ_COLOR\0"
+ "GL_CLAMP_READ_COLOR_ARB\0"
+ "GL_CLAMP_TO_BORDER\0"
+ "GL_CLAMP_TO_BORDER_ARB\0"
+ "GL_CLAMP_TO_BORDER_SGIS\0"
+ "GL_CLAMP_TO_EDGE\0"
+ "GL_CLAMP_TO_EDGE_SGIS\0"
+ "GL_CLAMP_VERTEX_COLOR_ARB\0"
+ "GL_CLEAR\0"
+ "GL_CLIENT_ACTIVE_TEXTURE\0"
+ "GL_CLIENT_ACTIVE_TEXTURE_ARB\0"
+ "GL_CLIENT_ALL_ATTRIB_BITS\0"
+ "GL_CLIENT_ATTRIB_STACK_DEPTH\0"
+ "GL_CLIENT_PIXEL_STORE_BIT\0"
+ "GL_CLIENT_VERTEX_ARRAY_BIT\0"
+ "GL_CLIP_DISTANCE0\0"
+ "GL_CLIP_DISTANCE1\0"
+ "GL_CLIP_DISTANCE2\0"
+ "GL_CLIP_DISTANCE3\0"
+ "GL_CLIP_DISTANCE4\0"
+ "GL_CLIP_DISTANCE5\0"
+ "GL_CLIP_DISTANCE6\0"
+ "GL_CLIP_DISTANCE7\0"
+ "GL_CLIP_PLANE0\0"
+ "GL_CLIP_PLANE1\0"
+ "GL_CLIP_PLANE2\0"
+ "GL_CLIP_PLANE3\0"
+ "GL_CLIP_PLANE4\0"
+ "GL_CLIP_PLANE5\0"
+ "GL_CLIP_VOLUME_CLIPPING_HINT_EXT\0"
+ "GL_COEFF\0"
+ "GL_COLOR\0"
+ "GL_COLOR_ARRAY\0"
+ "GL_COLOR_ARRAY_BUFFER_BINDING\0"
+ "GL_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_COLOR_ARRAY_POINTER\0"
+ "GL_COLOR_ARRAY_SIZE\0"
+ "GL_COLOR_ARRAY_STRIDE\0"
+ "GL_COLOR_ARRAY_TYPE\0"
+ "GL_COLOR_ATTACHMENT0\0"
+ "GL_COLOR_ATTACHMENT0_EXT\0"
+ "GL_COLOR_ATTACHMENT0_OES\0"
+ "GL_COLOR_ATTACHMENT1\0"
+ "GL_COLOR_ATTACHMENT10\0"
+ "GL_COLOR_ATTACHMENT10_EXT\0"
+ "GL_COLOR_ATTACHMENT11\0"
+ "GL_COLOR_ATTACHMENT11_EXT\0"
+ "GL_COLOR_ATTACHMENT12\0"
+ "GL_COLOR_ATTACHMENT12_EXT\0"
+ "GL_COLOR_ATTACHMENT13\0"
+ "GL_COLOR_ATTACHMENT13_EXT\0"
+ "GL_COLOR_ATTACHMENT14\0"
+ "GL_COLOR_ATTACHMENT14_EXT\0"
+ "GL_COLOR_ATTACHMENT15\0"
+ "GL_COLOR_ATTACHMENT15_EXT\0"
+ "GL_COLOR_ATTACHMENT1_EXT\0"
+ "GL_COLOR_ATTACHMENT2\0"
+ "GL_COLOR_ATTACHMENT2_EXT\0"
+ "GL_COLOR_ATTACHMENT3\0"
+ "GL_COLOR_ATTACHMENT3_EXT\0"
+ "GL_COLOR_ATTACHMENT4\0"
+ "GL_COLOR_ATTACHMENT4_EXT\0"
+ "GL_COLOR_ATTACHMENT5\0"
+ "GL_COLOR_ATTACHMENT5_EXT\0"
+ "GL_COLOR_ATTACHMENT6\0"
+ "GL_COLOR_ATTACHMENT6_EXT\0"
+ "GL_COLOR_ATTACHMENT7\0"
+ "GL_COLOR_ATTACHMENT7_EXT\0"
+ "GL_COLOR_ATTACHMENT8\0"
+ "GL_COLOR_ATTACHMENT8_EXT\0"
+ "GL_COLOR_ATTACHMENT9\0"
+ "GL_COLOR_ATTACHMENT9_EXT\0"
+ "GL_COLOR_BUFFER_BIT\0"
+ "GL_COLOR_CLEAR_VALUE\0"
+ "GL_COLOR_INDEX\0"
+ "GL_COLOR_INDEXES\0"
+ "GL_COLOR_LOGIC_OP\0"
+ "GL_COLOR_MATERIAL\0"
+ "GL_COLOR_MATERIAL_FACE\0"
+ "GL_COLOR_MATERIAL_PARAMETER\0"
+ "GL_COLOR_MATRIX\0"
+ "GL_COLOR_MATRIX_SGI\0"
+ "GL_COLOR_MATRIX_STACK_DEPTH\0"
+ "GL_COLOR_MATRIX_STACK_DEPTH_SGI\0"
+ "GL_COLOR_SUM\0"
+ "GL_COLOR_SUM_ARB\0"
+ "GL_COLOR_TABLE\0"
+ "GL_COLOR_TABLE_ALPHA_SIZE\0"
+ "GL_COLOR_TABLE_ALPHA_SIZE_EXT\0"
+ "GL_COLOR_TABLE_ALPHA_SIZE_SGI\0"
+ "GL_COLOR_TABLE_BIAS\0"
+ "GL_COLOR_TABLE_BIAS_SGI\0"
+ "GL_COLOR_TABLE_BLUE_SIZE\0"
+ "GL_COLOR_TABLE_BLUE_SIZE_EXT\0"
+ "GL_COLOR_TABLE_BLUE_SIZE_SGI\0"
+ "GL_COLOR_TABLE_FORMAT\0"
+ "GL_COLOR_TABLE_FORMAT_EXT\0"
+ "GL_COLOR_TABLE_FORMAT_SGI\0"
+ "GL_COLOR_TABLE_GREEN_SIZE\0"
+ "GL_COLOR_TABLE_GREEN_SIZE_EXT\0"
+ "GL_COLOR_TABLE_GREEN_SIZE_SGI\0"
+ "GL_COLOR_TABLE_INTENSITY_SIZE\0"
+ "GL_COLOR_TABLE_INTENSITY_SIZE_EXT\0"
+ "GL_COLOR_TABLE_INTENSITY_SIZE_SGI\0"
+ "GL_COLOR_TABLE_LUMINANCE_SIZE\0"
+ "GL_COLOR_TABLE_LUMINANCE_SIZE_EXT\0"
+ "GL_COLOR_TABLE_LUMINANCE_SIZE_SGI\0"
+ "GL_COLOR_TABLE_RED_SIZE\0"
+ "GL_COLOR_TABLE_RED_SIZE_EXT\0"
+ "GL_COLOR_TABLE_RED_SIZE_SGI\0"
+ "GL_COLOR_TABLE_SCALE\0"
+ "GL_COLOR_TABLE_SCALE_SGI\0"
+ "GL_COLOR_TABLE_WIDTH\0"
+ "GL_COLOR_TABLE_WIDTH_EXT\0"
+ "GL_COLOR_TABLE_WIDTH_SGI\0"
+ "GL_COLOR_WRITEMASK\0"
+ "GL_COMBINE\0"
+ "GL_COMBINE4\0"
+ "GL_COMBINE_ALPHA\0"
+ "GL_COMBINE_ALPHA_ARB\0"
+ "GL_COMBINE_ALPHA_EXT\0"
+ "GL_COMBINE_ARB\0"
+ "GL_COMBINE_EXT\0"
+ "GL_COMBINE_RGB\0"
+ "GL_COMBINE_RGB_ARB\0"
+ "GL_COMBINE_RGB_EXT\0"
+ "GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT\0"
+ "GL_COMPARE_REF_TO_TEXTURE\0"
+ "GL_COMPARE_R_TO_TEXTURE\0"
+ "GL_COMPARE_R_TO_TEXTURE_ARB\0"
+ "GL_COMPILE\0"
+ "GL_COMPILE_AND_EXECUTE\0"
+ "GL_COMPILE_STATUS\0"
+ "GL_COMPRESSED_ALPHA\0"
+ "GL_COMPRESSED_ALPHA_ARB\0"
+ "GL_COMPRESSED_INTENSITY\0"
+ "GL_COMPRESSED_INTENSITY_ARB\0"
+ "GL_COMPRESSED_LUMINANCE\0"
+ "GL_COMPRESSED_LUMINANCE_ALPHA\0"
+ "GL_COMPRESSED_LUMINANCE_ALPHA_ARB\0"
+ "GL_COMPRESSED_LUMINANCE_ARB\0"
+ "GL_COMPRESSED_RED\0"
+ "GL_COMPRESSED_RG\0"
+ "GL_COMPRESSED_RGB\0"
+ "GL_COMPRESSED_RGBA\0"
+ "GL_COMPRESSED_RGBA_ARB\0"
+ "GL_COMPRESSED_RGBA_FXT1_3DFX\0"
+ "GL_COMPRESSED_RGBA_S3TC_DXT1_EXT\0"
+ "GL_COMPRESSED_RGBA_S3TC_DXT3_EXT\0"
+ "GL_COMPRESSED_RGBA_S3TC_DXT5_EXT\0"
+ "GL_COMPRESSED_RGB_ARB\0"
+ "GL_COMPRESSED_RGB_FXT1_3DFX\0"
+ "GL_COMPRESSED_RGB_S3TC_DXT1_EXT\0"
+ "GL_COMPRESSED_SLUMINANCE\0"
+ "GL_COMPRESSED_SLUMINANCE_ALPHA\0"
+ "GL_COMPRESSED_SRGB\0"
+ "GL_COMPRESSED_SRGB_ALPHA\0"
+ "GL_COMPRESSED_TEXTURE_FORMATS\0"
+ "GL_CONDITION_SATISFIED\0"
+ "GL_CONSTANT\0"
+ "GL_CONSTANT_ALPHA\0"
+ "GL_CONSTANT_ALPHA_EXT\0"
+ "GL_CONSTANT_ARB\0"
+ "GL_CONSTANT_ATTENUATION\0"
+ "GL_CONSTANT_BORDER_HP\0"
+ "GL_CONSTANT_COLOR\0"
+ "GL_CONSTANT_COLOR_EXT\0"
+ "GL_CONSTANT_EXT\0"
+ "GL_CONTEXT_COMPATIBILITY_PROFILE_BIT\0"
+ "GL_CONTEXT_CORE_PROFILE_BIT\0"
+ "GL_CONTEXT_FLAGS\0"
+ "GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT\0"
+ "GL_CONTEXT_PROFILE_MASK\0"
+ "GL_CONVOLUTION_1D\0"
+ "GL_CONVOLUTION_2D\0"
+ "GL_CONVOLUTION_BORDER_COLOR\0"
+ "GL_CONVOLUTION_BORDER_COLOR_HP\0"
+ "GL_CONVOLUTION_BORDER_MODE\0"
+ "GL_CONVOLUTION_BORDER_MODE_EXT\0"
+ "GL_CONVOLUTION_FILTER_BIAS\0"
+ "GL_CONVOLUTION_FILTER_BIAS_EXT\0"
+ "GL_CONVOLUTION_FILTER_SCALE\0"
+ "GL_CONVOLUTION_FILTER_SCALE_EXT\0"
+ "GL_CONVOLUTION_FORMAT\0"
+ "GL_CONVOLUTION_FORMAT_EXT\0"
+ "GL_CONVOLUTION_HEIGHT\0"
+ "GL_CONVOLUTION_HEIGHT_EXT\0"
+ "GL_CONVOLUTION_WIDTH\0"
+ "GL_CONVOLUTION_WIDTH_EXT\0"
+ "GL_COORD_REPLACE\0"
+ "GL_COORD_REPLACE_ARB\0"
+ "GL_COORD_REPLACE_NV\0"
+ "GL_COORD_REPLACE_OES\0"
+ "GL_COPY\0"
+ "GL_COPY_INVERTED\0"
+ "GL_COPY_PIXEL_TOKEN\0"
+ "GL_COPY_READ_BUFFER\0"
+ "GL_COPY_WRITE_BUFFER\0"
+ "GL_CULL_FACE\0"
+ "GL_CULL_FACE_MODE\0"
+ "GL_CULL_VERTEX_EXT\0"
+ "GL_CULL_VERTEX_EYE_POSITION_EXT\0"
+ "GL_CULL_VERTEX_OBJECT_POSITION_EXT\0"
+ "GL_CURRENT_ATTRIB_NV\0"
+ "GL_CURRENT_BIT\0"
+ "GL_CURRENT_COLOR\0"
+ "GL_CURRENT_FOG_COORD\0"
+ "GL_CURRENT_FOG_COORDINATE\0"
+ "GL_CURRENT_INDEX\0"
+ "GL_CURRENT_MATRIX_ARB\0"
+ "GL_CURRENT_MATRIX_INDEX_ARB\0"
+ "GL_CURRENT_MATRIX_NV\0"
+ "GL_CURRENT_MATRIX_STACK_DEPTH_ARB\0"
+ "GL_CURRENT_MATRIX_STACK_DEPTH_NV\0"
+ "GL_CURRENT_NORMAL\0"
+ "GL_CURRENT_PALETTE_MATRIX_ARB\0"
+ "GL_CURRENT_PALETTE_MATRIX_OES\0"
+ "GL_CURRENT_PROGRAM\0"
+ "GL_CURRENT_QUERY\0"
+ "GL_CURRENT_QUERY_ARB\0"
+ "GL_CURRENT_RASTER_COLOR\0"
+ "GL_CURRENT_RASTER_DISTANCE\0"
+ "GL_CURRENT_RASTER_INDEX\0"
+ "GL_CURRENT_RASTER_POSITION\0"
+ "GL_CURRENT_RASTER_POSITION_VALID\0"
+ "GL_CURRENT_RASTER_SECONDARY_COLOR\0"
+ "GL_CURRENT_RASTER_TEXTURE_COORDS\0"
+ "GL_CURRENT_SECONDARY_COLOR\0"
+ "GL_CURRENT_TEXTURE_COORDS\0"
+ "GL_CURRENT_VERTEX_ATTRIB\0"
+ "GL_CURRENT_VERTEX_ATTRIB_ARB\0"
+ "GL_CURRENT_WEIGHT_ARB\0"
+ "GL_CW\0"
+ "GL_DEBUG_ASSERT_MESA\0"
+ "GL_DEBUG_OBJECT_MESA\0"
+ "GL_DEBUG_PRINT_MESA\0"
+ "GL_DECAL\0"
+ "GL_DECR\0"
+ "GL_DECR_WRAP\0"
+ "GL_DECR_WRAP_EXT\0"
+ "GL_DELETE_STATUS\0"
+ "GL_DEPTH\0"
+ "GL_DEPTH24_STENCIL8\0"
+ "GL_DEPTH24_STENCIL8_EXT\0"
+ "GL_DEPTH24_STENCIL8_OES\0"
+ "GL_DEPTH_ATTACHMENT\0"
+ "GL_DEPTH_ATTACHMENT_EXT\0"
+ "GL_DEPTH_ATTACHMENT_OES\0"
+ "GL_DEPTH_BIAS\0"
+ "GL_DEPTH_BITS\0"
+ "GL_DEPTH_BOUNDS_EXT\0"
+ "GL_DEPTH_BOUNDS_TEST_EXT\0"
+ "GL_DEPTH_BUFFER\0"
+ "GL_DEPTH_BUFFER_BIT\0"
+ "GL_DEPTH_CLAMP\0"
+ "GL_DEPTH_CLAMP_NV\0"
+ "GL_DEPTH_CLEAR_VALUE\0"
+ "GL_DEPTH_COMPONENT\0"
+ "GL_DEPTH_COMPONENT16\0"
+ "GL_DEPTH_COMPONENT16_ARB\0"
+ "GL_DEPTH_COMPONENT16_OES\0"
+ "GL_DEPTH_COMPONENT16_SGIX\0"
+ "GL_DEPTH_COMPONENT24\0"
+ "GL_DEPTH_COMPONENT24_ARB\0"
+ "GL_DEPTH_COMPONENT24_OES\0"
+ "GL_DEPTH_COMPONENT24_SGIX\0"
+ "GL_DEPTH_COMPONENT32\0"
+ "GL_DEPTH_COMPONENT32_ARB\0"
+ "GL_DEPTH_COMPONENT32_OES\0"
+ "GL_DEPTH_COMPONENT32_SGIX\0"
+ "GL_DEPTH_FUNC\0"
+ "GL_DEPTH_RANGE\0"
+ "GL_DEPTH_SCALE\0"
+ "GL_DEPTH_STENCIL\0"
+ "GL_DEPTH_STENCIL_ATTACHMENT\0"
+ "GL_DEPTH_STENCIL_EXT\0"
+ "GL_DEPTH_STENCIL_NV\0"
+ "GL_DEPTH_STENCIL_OES\0"
+ "GL_DEPTH_STENCIL_TO_BGRA_NV\0"
+ "GL_DEPTH_STENCIL_TO_RGBA_NV\0"
+ "GL_DEPTH_TEST\0"
+ "GL_DEPTH_TEXTURE_MODE\0"
+ "GL_DEPTH_TEXTURE_MODE_ARB\0"
+ "GL_DEPTH_WRITEMASK\0"
+ "GL_DIFFUSE\0"
+ "GL_DITHER\0"
+ "GL_DOMAIN\0"
+ "GL_DONT_CARE\0"
+ "GL_DOT3_RGB\0"
+ "GL_DOT3_RGBA\0"
+ "GL_DOT3_RGBA_ARB\0"
+ "GL_DOT3_RGBA_EXT\0"
+ "GL_DOT3_RGB_ARB\0"
+ "GL_DOT3_RGB_EXT\0"
+ "GL_DOUBLE\0"
+ "GL_DOUBLEBUFFER\0"
+ "GL_DRAW_BUFFER\0"
+ "GL_DRAW_BUFFER0\0"
+ "GL_DRAW_BUFFER0_ARB\0"
+ "GL_DRAW_BUFFER0_ATI\0"
+ "GL_DRAW_BUFFER1\0"
+ "GL_DRAW_BUFFER10\0"
+ "GL_DRAW_BUFFER10_ARB\0"
+ "GL_DRAW_BUFFER10_ATI\0"
+ "GL_DRAW_BUFFER11\0"
+ "GL_DRAW_BUFFER11_ARB\0"
+ "GL_DRAW_BUFFER11_ATI\0"
+ "GL_DRAW_BUFFER12\0"
+ "GL_DRAW_BUFFER12_ARB\0"
+ "GL_DRAW_BUFFER12_ATI\0"
+ "GL_DRAW_BUFFER13\0"
+ "GL_DRAW_BUFFER13_ARB\0"
+ "GL_DRAW_BUFFER13_ATI\0"
+ "GL_DRAW_BUFFER14\0"
+ "GL_DRAW_BUFFER14_ARB\0"
+ "GL_DRAW_BUFFER14_ATI\0"
+ "GL_DRAW_BUFFER15\0"
+ "GL_DRAW_BUFFER15_ARB\0"
+ "GL_DRAW_BUFFER15_ATI\0"
+ "GL_DRAW_BUFFER1_ARB\0"
+ "GL_DRAW_BUFFER1_ATI\0"
+ "GL_DRAW_BUFFER2\0"
+ "GL_DRAW_BUFFER2_ARB\0"
+ "GL_DRAW_BUFFER2_ATI\0"
+ "GL_DRAW_BUFFER3\0"
+ "GL_DRAW_BUFFER3_ARB\0"
+ "GL_DRAW_BUFFER3_ATI\0"
+ "GL_DRAW_BUFFER4\0"
+ "GL_DRAW_BUFFER4_ARB\0"
+ "GL_DRAW_BUFFER4_ATI\0"
+ "GL_DRAW_BUFFER5\0"
+ "GL_DRAW_BUFFER5_ARB\0"
+ "GL_DRAW_BUFFER5_ATI\0"
+ "GL_DRAW_BUFFER6\0"
+ "GL_DRAW_BUFFER6_ARB\0"
+ "GL_DRAW_BUFFER6_ATI\0"
+ "GL_DRAW_BUFFER7\0"
+ "GL_DRAW_BUFFER7_ARB\0"
+ "GL_DRAW_BUFFER7_ATI\0"
+ "GL_DRAW_BUFFER8\0"
+ "GL_DRAW_BUFFER8_ARB\0"
+ "GL_DRAW_BUFFER8_ATI\0"
+ "GL_DRAW_BUFFER9\0"
+ "GL_DRAW_BUFFER9_ARB\0"
+ "GL_DRAW_BUFFER9_ATI\0"
+ "GL_DRAW_FRAMEBUFFER\0"
+ "GL_DRAW_FRAMEBUFFER_BINDING\0"
+ "GL_DRAW_FRAMEBUFFER_BINDING_EXT\0"
+ "GL_DRAW_FRAMEBUFFER_EXT\0"
+ "GL_DRAW_PIXEL_TOKEN\0"
+ "GL_DST_ALPHA\0"
+ "GL_DST_COLOR\0"
+ "GL_DU8DV8_ATI\0"
+ "GL_DUDV_ATI\0"
+ "GL_DYNAMIC_COPY\0"
+ "GL_DYNAMIC_COPY_ARB\0"
+ "GL_DYNAMIC_DRAW\0"
+ "GL_DYNAMIC_DRAW_ARB\0"
+ "GL_DYNAMIC_READ\0"
+ "GL_DYNAMIC_READ_ARB\0"
+ "GL_EDGE_FLAG\0"
+ "GL_EDGE_FLAG_ARRAY\0"
+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING\0"
+ "GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_EDGE_FLAG_ARRAY_POINTER\0"
+ "GL_EDGE_FLAG_ARRAY_STRIDE\0"
+ "GL_ELEMENT_ARRAY_BUFFER\0"
+ "GL_ELEMENT_ARRAY_BUFFER_BINDING\0"
+ "GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_EMISSION\0"
+ "GL_ENABLE_BIT\0"
+ "GL_EQUAL\0"
+ "GL_EQUIV\0"
+ "GL_EVAL_BIT\0"
+ "GL_EXP\0"
+ "GL_EXP2\0"
+ "GL_EXTENSIONS\0"
+ "GL_EYE_LINEAR\0"
+ "GL_EYE_PLANE\0"
+ "GL_EYE_PLANE_ABSOLUTE_NV\0"
+ "GL_EYE_RADIAL_NV\0"
+ "GL_FALSE\0"
+ "GL_FASTEST\0"
+ "GL_FEEDBACK\0"
+ "GL_FEEDBACK_BUFFER_POINTER\0"
+ "GL_FEEDBACK_BUFFER_SIZE\0"
+ "GL_FEEDBACK_BUFFER_TYPE\0"
+ "GL_FILL\0"
+ "GL_FIRST_VERTEX_CONVENTION\0"
+ "GL_FIRST_VERTEX_CONVENTION_EXT\0"
+ "GL_FIXED\0"
+ "GL_FIXED_OES\0"
+ "GL_FIXED_ONLY\0"
+ "GL_FIXED_ONLY_ARB\0"
+ "GL_FLAT\0"
+ "GL_FLOAT\0"
+ "GL_FLOAT_MAT2\0"
+ "GL_FLOAT_MAT2_ARB\0"
+ "GL_FLOAT_MAT2x3\0"
+ "GL_FLOAT_MAT2x4\0"
+ "GL_FLOAT_MAT3\0"
+ "GL_FLOAT_MAT3_ARB\0"
+ "GL_FLOAT_MAT3x2\0"
+ "GL_FLOAT_MAT3x4\0"
+ "GL_FLOAT_MAT4\0"
+ "GL_FLOAT_MAT4_ARB\0"
+ "GL_FLOAT_MAT4x2\0"
+ "GL_FLOAT_MAT4x3\0"
+ "GL_FLOAT_VEC2\0"
+ "GL_FLOAT_VEC2_ARB\0"
+ "GL_FLOAT_VEC3\0"
+ "GL_FLOAT_VEC3_ARB\0"
+ "GL_FLOAT_VEC4\0"
+ "GL_FLOAT_VEC4_ARB\0"
+ "GL_FOG\0"
+ "GL_FOG_BIT\0"
+ "GL_FOG_COLOR\0"
+ "GL_FOG_COORD\0"
+ "GL_FOG_COORDINATE\0"
+ "GL_FOG_COORDINATE_ARRAY\0"
+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING\0"
+ "GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_FOG_COORDINATE_ARRAY_POINTER\0"
+ "GL_FOG_COORDINATE_ARRAY_STRIDE\0"
+ "GL_FOG_COORDINATE_ARRAY_TYPE\0"
+ "GL_FOG_COORDINATE_SOURCE\0"
+ "GL_FOG_COORD_ARRAY\0"
+ "GL_FOG_COORD_ARRAY_BUFFER_BINDING\0"
+ "GL_FOG_COORD_ARRAY_POINTER\0"
+ "GL_FOG_COORD_ARRAY_STRIDE\0"
+ "GL_FOG_COORD_ARRAY_TYPE\0"
+ "GL_FOG_COORD_SRC\0"
+ "GL_FOG_DENSITY\0"
+ "GL_FOG_DISTANCE_MODE_NV\0"
+ "GL_FOG_END\0"
+ "GL_FOG_HINT\0"
+ "GL_FOG_INDEX\0"
+ "GL_FOG_MODE\0"
+ "GL_FOG_OFFSET_SGIX\0"
+ "GL_FOG_OFFSET_VALUE_SGIX\0"
+ "GL_FOG_START\0"
+ "GL_FRAGMENT_DEPTH\0"
+ "GL_FRAGMENT_PROGRAM_ARB\0"
+ "GL_FRAGMENT_SHADER\0"
+ "GL_FRAGMENT_SHADER_ARB\0"
+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT\0"
+ "GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES\0"
+ "GL_FRAMEBUFFER\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_LAYERED\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT\0"
+ "GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES\0"
+ "GL_FRAMEBUFFER_BINDING\0"
+ "GL_FRAMEBUFFER_BINDING_EXT\0"
+ "GL_FRAMEBUFFER_BINDING_OES\0"
+ "GL_FRAMEBUFFER_COMPLETE\0"
+ "GL_FRAMEBUFFER_COMPLETE_EXT\0"
+ "GL_FRAMEBUFFER_COMPLETE_OES\0"
+ "GL_FRAMEBUFFER_DEFAULT\0"
+ "GL_FRAMEBUFFER_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT\0"
+ "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES\0"
+ "GL_FRAMEBUFFER_OES\0"
+ "GL_FRAMEBUFFER_STATUS_ERROR_EXT\0"
+ "GL_FRAMEBUFFER_UNDEFINED\0"
+ "GL_FRAMEBUFFER_UNSUPPORTED\0"
+ "GL_FRAMEBUFFER_UNSUPPORTED_EXT\0"
+ "GL_FRAMEBUFFER_UNSUPPORTED_OES\0"
+ "GL_FRONT\0"
+ "GL_FRONT_AND_BACK\0"
+ "GL_FRONT_FACE\0"
+ "GL_FRONT_LEFT\0"
+ "GL_FRONT_RIGHT\0"
+ "GL_FUNC_ADD\0"
+ "GL_FUNC_ADD_EXT\0"
+ "GL_FUNC_ADD_OES\0"
+ "GL_FUNC_REVERSE_SUBTRACT\0"
+ "GL_FUNC_REVERSE_SUBTRACT_EXT\0"
+ "GL_FUNC_REVERSE_SUBTRACT_OES\0"
+ "GL_FUNC_SUBTRACT\0"
+ "GL_FUNC_SUBTRACT_EXT\0"
+ "GL_FUNC_SUBTRACT_OES\0"
+ "GL_GENERATE_MIPMAP\0"
+ "GL_GENERATE_MIPMAP_HINT\0"
+ "GL_GENERATE_MIPMAP_HINT_SGIS\0"
+ "GL_GENERATE_MIPMAP_SGIS\0"
+ "GL_GEOMETRY_INPUT_TYPE\0"
+ "GL_GEOMETRY_INPUT_TYPE_ARB\0"
+ "GL_GEOMETRY_OUTPUT_TYPE\0"
+ "GL_GEOMETRY_OUTPUT_TYPE_ARB\0"
+ "GL_GEOMETRY_SHADER\0"
+ "GL_GEOMETRY_SHADER_ARB\0"
+ "GL_GEOMETRY_VERTICES_OUT\0"
+ "GL_GEOMETRY_VERTICES_OUT_ARB\0"
+ "GL_GEQUAL\0"
+ "GL_GREATER\0"
+ "GL_GREEN\0"
+ "GL_GREEN_BIAS\0"
+ "GL_GREEN_BITS\0"
+ "GL_GREEN_INTEGER\0"
+ "GL_GREEN_INTEGER_EXT\0"
+ "GL_GREEN_SCALE\0"
+ "GL_HALF_FLOAT\0"
+ "GL_HALF_FLOAT_OES\0"
+ "GL_HIGH_FLOAT\0"
+ "GL_HIGH_INT\0"
+ "GL_HINT_BIT\0"
+ "GL_HISTOGRAM\0"
+ "GL_HISTOGRAM_ALPHA_SIZE\0"
+ "GL_HISTOGRAM_ALPHA_SIZE_EXT\0"
+ "GL_HISTOGRAM_BLUE_SIZE\0"
+ "GL_HISTOGRAM_BLUE_SIZE_EXT\0"
+ "GL_HISTOGRAM_EXT\0"
+ "GL_HISTOGRAM_FORMAT\0"
+ "GL_HISTOGRAM_FORMAT_EXT\0"
+ "GL_HISTOGRAM_GREEN_SIZE\0"
+ "GL_HISTOGRAM_GREEN_SIZE_EXT\0"
+ "GL_HISTOGRAM_LUMINANCE_SIZE\0"
+ "GL_HISTOGRAM_LUMINANCE_SIZE_EXT\0"
+ "GL_HISTOGRAM_RED_SIZE\0"
+ "GL_HISTOGRAM_RED_SIZE_EXT\0"
+ "GL_HISTOGRAM_SINK\0"
+ "GL_HISTOGRAM_SINK_EXT\0"
+ "GL_HISTOGRAM_WIDTH\0"
+ "GL_HISTOGRAM_WIDTH_EXT\0"
+ "GL_IDENTITY_NV\0"
+ "GL_IGNORE_BORDER_HP\0"
+ "GL_IMPLEMENTATION_COLOR_READ_FORMAT\0"
+ "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES\0"
+ "GL_IMPLEMENTATION_COLOR_READ_TYPE\0"
+ "GL_IMPLEMENTATION_COLOR_READ_TYPE_OES\0"
+ "GL_INCR\0"
+ "GL_INCR_WRAP\0"
+ "GL_INCR_WRAP_EXT\0"
+ "GL_INDEX\0"
+ "GL_INDEX_ARRAY\0"
+ "GL_INDEX_ARRAY_BUFFER_BINDING\0"
+ "GL_INDEX_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_INDEX_ARRAY_POINTER\0"
+ "GL_INDEX_ARRAY_STRIDE\0"
+ "GL_INDEX_ARRAY_TYPE\0"
+ "GL_INDEX_BITS\0"
+ "GL_INDEX_CLEAR_VALUE\0"
+ "GL_INDEX_LOGIC_OP\0"
+ "GL_INDEX_MODE\0"
+ "GL_INDEX_OFFSET\0"
+ "GL_INDEX_SHIFT\0"
+ "GL_INDEX_WRITEMASK\0"
+ "GL_INFO_LOG_LENGTH\0"
+ "GL_INT\0"
+ "GL_INTENSITY\0"
+ "GL_INTENSITY12\0"
+ "GL_INTENSITY12_EXT\0"
+ "GL_INTENSITY16\0"
+ "GL_INTENSITY16I_EXT\0"
+ "GL_INTENSITY16UI_EXT\0"
+ "GL_INTENSITY16_EXT\0"
+ "GL_INTENSITY32I_EXT\0"
+ "GL_INTENSITY32UI_EXT\0"
+ "GL_INTENSITY4\0"
+ "GL_INTENSITY4_EXT\0"
+ "GL_INTENSITY8\0"
+ "GL_INTENSITY8I_EXT\0"
+ "GL_INTENSITY8UI_EXT\0"
+ "GL_INTENSITY8_EXT\0"
+ "GL_INTENSITY_EXT\0"
+ "GL_INTERLEAVED_ATTRIBS\0"
+ "GL_INTERLEAVED_ATTRIBS_EXT\0"
+ "GL_INTERPOLATE\0"
+ "GL_INTERPOLATE_ARB\0"
+ "GL_INTERPOLATE_EXT\0"
+ "GL_INT_10_10_10_2_OES\0"
+ "GL_INT_SAMPLER_1D\0"
+ "GL_INT_SAMPLER_1D_ARRAY\0"
+ "GL_INT_SAMPLER_1D_ARRAY_EXT\0"
+ "GL_INT_SAMPLER_1D_EXT\0"
+ "GL_INT_SAMPLER_2D\0"
+ "GL_INT_SAMPLER_2D_ARRAY\0"
+ "GL_INT_SAMPLER_2D_ARRAY_EXT\0"
+ "GL_INT_SAMPLER_2D_EXT\0"
+ "GL_INT_SAMPLER_2D_RECT\0"
+ "GL_INT_SAMPLER_2D_RECT_EXT\0"
+ "GL_INT_SAMPLER_3D\0"
+ "GL_INT_SAMPLER_3D_EXT\0"
+ "GL_INT_SAMPLER_BUFFER\0"
+ "GL_INT_SAMPLER_BUFFER_EXT\0"
+ "GL_INT_SAMPLER_CUBE\0"
+ "GL_INT_SAMPLER_CUBE_EXT\0"
+ "GL_INT_VEC2\0"
+ "GL_INT_VEC2_ARB\0"
+ "GL_INT_VEC3\0"
+ "GL_INT_VEC3_ARB\0"
+ "GL_INT_VEC4\0"
+ "GL_INT_VEC4_ARB\0"
+ "GL_INVALID_ENUM\0"
+ "GL_INVALID_FRAMEBUFFER_OPERATION\0"
+ "GL_INVALID_FRAMEBUFFER_OPERATION_EXT\0"
+ "GL_INVALID_FRAMEBUFFER_OPERATION_OES\0"
+ "GL_INVALID_OPERATION\0"
+ "GL_INVALID_VALUE\0"
+ "GL_INVERSE_NV\0"
+ "GL_INVERSE_TRANSPOSE_NV\0"
+ "GL_INVERT\0"
+ "GL_KEEP\0"
+ "GL_LAST_VERTEX_CONVENTION\0"
+ "GL_LAST_VERTEX_CONVENTION_EXT\0"
+ "GL_LEFT\0"
+ "GL_LEQUAL\0"
+ "GL_LESS\0"
+ "GL_LIGHT0\0"
+ "GL_LIGHT1\0"
+ "GL_LIGHT2\0"
+ "GL_LIGHT3\0"
+ "GL_LIGHT4\0"
+ "GL_LIGHT5\0"
+ "GL_LIGHT6\0"
+ "GL_LIGHT7\0"
+ "GL_LIGHTING\0"
+ "GL_LIGHTING_BIT\0"
+ "GL_LIGHT_MODEL_AMBIENT\0"
+ "GL_LIGHT_MODEL_COLOR_CONTROL\0"
+ "GL_LIGHT_MODEL_COLOR_CONTROL_EXT\0"
+ "GL_LIGHT_MODEL_LOCAL_VIEWER\0"
+ "GL_LIGHT_MODEL_TWO_SIDE\0"
+ "GL_LINE\0"
+ "GL_LINEAR\0"
+ "GL_LINEAR_ATTENUATION\0"
+ "GL_LINEAR_CLIPMAP_LINEAR_SGIX\0"
+ "GL_LINEAR_CLIPMAP_NEAREST_SGIX\0"
+ "GL_LINEAR_MIPMAP_LINEAR\0"
+ "GL_LINEAR_MIPMAP_NEAREST\0"
+ "GL_LINES\0"
+ "GL_LINES_ADJACENCY\0"
+ "GL_LINES_ADJACENCY_ARB\0"
+ "GL_LINE_BIT\0"
+ "GL_LINE_LOOP\0"
+ "GL_LINE_RESET_TOKEN\0"
+ "GL_LINE_SMOOTH\0"
+ "GL_LINE_SMOOTH_HINT\0"
+ "GL_LINE_STIPPLE\0"
+ "GL_LINE_STIPPLE_PATTERN\0"
+ "GL_LINE_STIPPLE_REPEAT\0"
+ "GL_LINE_STRIP\0"
+ "GL_LINE_STRIP_ADJACENCY\0"
+ "GL_LINE_STRIP_ADJACENCY_ARB\0"
+ "GL_LINE_TOKEN\0"
+ "GL_LINE_WIDTH\0"
+ "GL_LINE_WIDTH_GRANULARITY\0"
+ "GL_LINE_WIDTH_RANGE\0"
+ "GL_LINK_STATUS\0"
+ "GL_LIST_BASE\0"
+ "GL_LIST_BIT\0"
+ "GL_LIST_INDEX\0"
+ "GL_LIST_MODE\0"
+ "GL_LOAD\0"
+ "GL_LOGIC_OP\0"
+ "GL_LOGIC_OP_MODE\0"
+ "GL_LOWER_LEFT\0"
+ "GL_LOW_FLOAT\0"
+ "GL_LOW_INT\0"
+ "GL_LUMINANCE\0"
+ "GL_LUMINANCE12\0"
+ "GL_LUMINANCE12_ALPHA12\0"
+ "GL_LUMINANCE12_ALPHA12_EXT\0"
+ "GL_LUMINANCE12_ALPHA4\0"
+ "GL_LUMINANCE12_ALPHA4_EXT\0"
+ "GL_LUMINANCE12_EXT\0"
+ "GL_LUMINANCE16\0"
+ "GL_LUMINANCE16I_EXT\0"
+ "GL_LUMINANCE16UI_EXT\0"
+ "GL_LUMINANCE16_ALPHA16\0"
+ "GL_LUMINANCE16_ALPHA16_EXT\0"
+ "GL_LUMINANCE16_EXT\0"
+ "GL_LUMINANCE32I_EXT\0"
+ "GL_LUMINANCE32UI_EXT\0"
+ "GL_LUMINANCE4\0"
+ "GL_LUMINANCE4_ALPHA4\0"
+ "GL_LUMINANCE4_ALPHA4_EXT\0"
+ "GL_LUMINANCE4_EXT\0"
+ "GL_LUMINANCE6_ALPHA2\0"
+ "GL_LUMINANCE6_ALPHA2_EXT\0"
+ "GL_LUMINANCE8\0"
+ "GL_LUMINANCE8I_EXT\0"
+ "GL_LUMINANCE8UI_EXT\0"
+ "GL_LUMINANCE8_ALPHA8\0"
+ "GL_LUMINANCE8_ALPHA8_EXT\0"
+ "GL_LUMINANCE8_EXT\0"
+ "GL_LUMINANCE_ALPHA\0"
+ "GL_LUMINANCE_ALPHA16I_EXT\0"
+ "GL_LUMINANCE_ALPHA16UI_EXT\0"
+ "GL_LUMINANCE_ALPHA32I_EXT\0"
+ "GL_LUMINANCE_ALPHA32UI_EXT\0"
+ "GL_LUMINANCE_ALPHA8I_EXT\0"
+ "GL_LUMINANCE_ALPHA8UI_EXT\0"
+ "GL_LUMINANCE_ALPHA_INTEGER_EXT\0"
+ "GL_LUMINANCE_INTEGER_EXT\0"
+ "GL_MAJOR_VERSION\0"
+ "GL_MAP1_COLOR_4\0"
+ "GL_MAP1_GRID_DOMAIN\0"
+ "GL_MAP1_GRID_SEGMENTS\0"
+ "GL_MAP1_INDEX\0"
+ "GL_MAP1_NORMAL\0"
+ "GL_MAP1_TEXTURE_COORD_1\0"
+ "GL_MAP1_TEXTURE_COORD_2\0"
+ "GL_MAP1_TEXTURE_COORD_3\0"
+ "GL_MAP1_TEXTURE_COORD_4\0"
+ "GL_MAP1_VERTEX_3\0"
+ "GL_MAP1_VERTEX_4\0"
+ "GL_MAP1_VERTEX_ATTRIB0_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB10_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB11_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB12_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB13_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB14_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB15_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB1_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB2_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB3_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB4_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB5_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB6_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB7_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB8_4_NV\0"
+ "GL_MAP1_VERTEX_ATTRIB9_4_NV\0"
+ "GL_MAP2_COLOR_4\0"
+ "GL_MAP2_GRID_DOMAIN\0"
+ "GL_MAP2_GRID_SEGMENTS\0"
+ "GL_MAP2_INDEX\0"
+ "GL_MAP2_NORMAL\0"
+ "GL_MAP2_TEXTURE_COORD_1\0"
+ "GL_MAP2_TEXTURE_COORD_2\0"
+ "GL_MAP2_TEXTURE_COORD_3\0"
+ "GL_MAP2_TEXTURE_COORD_4\0"
+ "GL_MAP2_VERTEX_3\0"
+ "GL_MAP2_VERTEX_4\0"
+ "GL_MAP2_VERTEX_ATTRIB0_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB10_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB11_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB12_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB13_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB14_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB15_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB1_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB2_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB3_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB4_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB5_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB6_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB7_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB8_4_NV\0"
+ "GL_MAP2_VERTEX_ATTRIB9_4_NV\0"
+ "GL_MAP_COLOR\0"
+ "GL_MAP_FLUSH_EXPLICIT_BIT\0"
+ "GL_MAP_INVALIDATE_BUFFER_BIT\0"
+ "GL_MAP_INVALIDATE_RANGE_BIT\0"
+ "GL_MAP_READ_BIT\0"
+ "GL_MAP_STENCIL\0"
+ "GL_MAP_UNSYNCHRONIZED_BIT\0"
+ "GL_MAP_WRITE_BIT\0"
+ "GL_MATRIX0_ARB\0"
+ "GL_MATRIX0_NV\0"
+ "GL_MATRIX10_ARB\0"
+ "GL_MATRIX11_ARB\0"
+ "GL_MATRIX12_ARB\0"
+ "GL_MATRIX13_ARB\0"
+ "GL_MATRIX14_ARB\0"
+ "GL_MATRIX15_ARB\0"
+ "GL_MATRIX16_ARB\0"
+ "GL_MATRIX17_ARB\0"
+ "GL_MATRIX18_ARB\0"
+ "GL_MATRIX19_ARB\0"
+ "GL_MATRIX1_ARB\0"
+ "GL_MATRIX1_NV\0"
+ "GL_MATRIX20_ARB\0"
+ "GL_MATRIX21_ARB\0"
+ "GL_MATRIX22_ARB\0"
+ "GL_MATRIX23_ARB\0"
+ "GL_MATRIX24_ARB\0"
+ "GL_MATRIX25_ARB\0"
+ "GL_MATRIX26_ARB\0"
+ "GL_MATRIX27_ARB\0"
+ "GL_MATRIX28_ARB\0"
+ "GL_MATRIX29_ARB\0"
+ "GL_MATRIX2_ARB\0"
+ "GL_MATRIX2_NV\0"
+ "GL_MATRIX30_ARB\0"
+ "GL_MATRIX31_ARB\0"
+ "GL_MATRIX3_ARB\0"
+ "GL_MATRIX3_NV\0"
+ "GL_MATRIX4_ARB\0"
+ "GL_MATRIX4_NV\0"
+ "GL_MATRIX5_ARB\0"
+ "GL_MATRIX5_NV\0"
+ "GL_MATRIX6_ARB\0"
+ "GL_MATRIX6_NV\0"
+ "GL_MATRIX7_ARB\0"
+ "GL_MATRIX7_NV\0"
+ "GL_MATRIX8_ARB\0"
+ "GL_MATRIX9_ARB\0"
+ "GL_MATRIX_INDEX_ARRAY_ARB\0"
+ "GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES\0"
+ "GL_MATRIX_INDEX_ARRAY_OES\0"
+ "GL_MATRIX_INDEX_ARRAY_POINTER_ARB\0"
+ "GL_MATRIX_INDEX_ARRAY_POINTER_OES\0"
+ "GL_MATRIX_INDEX_ARRAY_SIZE_ARB\0"
+ "GL_MATRIX_INDEX_ARRAY_SIZE_OES\0"
+ "GL_MATRIX_INDEX_ARRAY_STRIDE_ARB\0"
+ "GL_MATRIX_INDEX_ARRAY_STRIDE_OES\0"
+ "GL_MATRIX_INDEX_ARRAY_TYPE_ARB\0"
+ "GL_MATRIX_INDEX_ARRAY_TYPE_OES\0"
+ "GL_MATRIX_MODE\0"
+ "GL_MATRIX_PALETTE_ARB\0"
+ "GL_MATRIX_PALETTE_OES\0"
+ "GL_MAX\0"
+ "GL_MAX_3D_TEXTURE_SIZE\0"
+ "GL_MAX_3D_TEXTURE_SIZE_OES\0"
+ "GL_MAX_ARRAY_TEXTURE_LAYERS\0"
+ "GL_MAX_ARRAY_TEXTURE_LAYERS_EXT\0"
+ "GL_MAX_ATTRIB_STACK_DEPTH\0"
+ "GL_MAX_CLIENT_ATTRIB_STACK_DEPTH\0"
+ "GL_MAX_CLIPMAP_DEPTH_SGIX\0"
+ "GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
+ "GL_MAX_CLIP_DISTANCES\0"
+ "GL_MAX_CLIP_PLANES\0"
+ "GL_MAX_COLOR_ATTACHMENTS\0"
+ "GL_MAX_COLOR_ATTACHMENTS_EXT\0"
+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH\0"
+ "GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI\0"
+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS\0"
+ "GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB\0"
+ "GL_MAX_CONVOLUTION_HEIGHT\0"
+ "GL_MAX_CONVOLUTION_HEIGHT_EXT\0"
+ "GL_MAX_CONVOLUTION_WIDTH\0"
+ "GL_MAX_CONVOLUTION_WIDTH_EXT\0"
+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE\0"
+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB\0"
+ "GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES\0"
+ "GL_MAX_DRAW_BUFFERS\0"
+ "GL_MAX_DRAW_BUFFERS_ARB\0"
+ "GL_MAX_DRAW_BUFFERS_ATI\0"
+ "GL_MAX_ELEMENTS_INDICES\0"
+ "GL_MAX_ELEMENTS_VERTICES\0"
+ "GL_MAX_EVAL_ORDER\0"
+ "GL_MAX_EXT\0"
+ "GL_MAX_FRAGMENT_INPUT_COMPONENTS\0"
+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS\0"
+ "GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB\0"
+ "GL_MAX_FRAGMENT_UNIFORM_VECTORS\0"
+ "GL_MAX_GEOMETRY_INPUT_COMPONENTS\0"
+ "GL_MAX_GEOMETRY_OUTPUT_COMPONENTS\0"
+ "GL_MAX_GEOMETRY_OUTPUT_VERTICES\0"
+ "GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB\0"
+ "GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS\0"
+ "GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB\0"
+ "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS\0"
+ "GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB\0"
+ "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS\0"
+ "GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB\0"
+ "GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB\0"
+ "GL_MAX_LIGHTS\0"
+ "GL_MAX_LIST_NESTING\0"
+ "GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB\0"
+ "GL_MAX_MODELVIEW_STACK_DEPTH\0"
+ "GL_MAX_NAME_STACK_DEPTH\0"
+ "GL_MAX_PALETTE_MATRICES_ARB\0"
+ "GL_MAX_PALETTE_MATRICES_OES\0"
+ "GL_MAX_PIXEL_MAP_TABLE\0"
+ "GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB\0"
+ "GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
+ "GL_MAX_PROGRAM_ATTRIBS_ARB\0"
+ "GL_MAX_PROGRAM_CALL_DEPTH_NV\0"
+ "GL_MAX_PROGRAM_ENV_PARAMETERS_ARB\0"
+ "GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV\0"
+ "GL_MAX_PROGRAM_IF_DEPTH_NV\0"
+ "GL_MAX_PROGRAM_INSTRUCTIONS_ARB\0"
+ "GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB\0"
+ "GL_MAX_PROGRAM_LOOP_COUNT_NV\0"
+ "GL_MAX_PROGRAM_LOOP_DEPTH_NV\0"
+ "GL_MAX_PROGRAM_MATRICES_ARB\0"
+ "GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB\0"
+ "GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
+ "GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
+ "GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB\0"
+ "GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
+ "GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB\0"
+ "GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
+ "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
+ "GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
+ "GL_MAX_PROGRAM_PARAMETERS_ARB\0"
+ "GL_MAX_PROGRAM_TEMPORARIES_ARB\0"
+ "GL_MAX_PROGRAM_TEXEL_OFFSET\0"
+ "GL_MAX_PROGRAM_TEXEL_OFFSET_EXT\0"
+ "GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB\0"
+ "GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
+ "GL_MAX_PROJECTION_STACK_DEPTH\0"
+ "GL_MAX_RECTANGLE_TEXTURE_SIZE\0"
+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB\0"
+ "GL_MAX_RECTANGLE_TEXTURE_SIZE_NV\0"
+ "GL_MAX_RENDERBUFFER_SIZE\0"
+ "GL_MAX_RENDERBUFFER_SIZE_EXT\0"
+ "GL_MAX_RENDERBUFFER_SIZE_OES\0"
+ "GL_MAX_SAMPLES\0"
+ "GL_MAX_SAMPLES_EXT\0"
+ "GL_MAX_SERVER_WAIT_TIMEOUT\0"
+ "GL_MAX_SHININESS_NV\0"
+ "GL_MAX_SPOT_EXPONENT_NV\0"
+ "GL_MAX_TEXTURE_BUFFER_SIZE\0"
+ "GL_MAX_TEXTURE_BUFFER_SIZE_ARB\0"
+ "GL_MAX_TEXTURE_COORDS\0"
+ "GL_MAX_TEXTURE_COORDS_ARB\0"
+ "GL_MAX_TEXTURE_IMAGE_UNITS\0"
+ "GL_MAX_TEXTURE_IMAGE_UNITS_ARB\0"
+ "GL_MAX_TEXTURE_LOD_BIAS\0"
+ "GL_MAX_TEXTURE_LOD_BIAS_EXT\0"
+ "GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT\0"
+ "GL_MAX_TEXTURE_SIZE\0"
+ "GL_MAX_TEXTURE_STACK_DEPTH\0"
+ "GL_MAX_TEXTURE_UNITS\0"
+ "GL_MAX_TEXTURE_UNITS_ARB\0"
+ "GL_MAX_TRACK_MATRICES_NV\0"
+ "GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV\0"
+ "GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS\0"
+ "GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT\0"
+ "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS\0"
+ "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT\0"
+ "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS\0"
+ "GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT\0"
+ "GL_MAX_VARYING_COMPONENTS\0"
+ "GL_MAX_VARYING_FLOATS\0"
+ "GL_MAX_VARYING_FLOATS_ARB\0"
+ "GL_MAX_VARYING_VECTORS\0"
+ "GL_MAX_VERTEX_ATTRIBS\0"
+ "GL_MAX_VERTEX_ATTRIBS_ARB\0"
+ "GL_MAX_VERTEX_OUTPUT_COMPONENTS\0"
+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS\0"
+ "GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB\0"
+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS\0"
+ "GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB\0"
+ "GL_MAX_VERTEX_UNIFORM_VECTORS\0"
+ "GL_MAX_VERTEX_UNITS_ARB\0"
+ "GL_MAX_VERTEX_UNITS_OES\0"
+ "GL_MAX_VERTEX_VARYING_COMPONENTS_ARB\0"
+ "GL_MAX_VIEWPORT_DIMS\0"
+ "GL_MEDIUM_FLOAT\0"
+ "GL_MEDIUM_INT\0"
+ "GL_MIN\0"
+ "GL_MINMAX\0"
+ "GL_MINMAX_EXT\0"
+ "GL_MINMAX_FORMAT\0"
+ "GL_MINMAX_FORMAT_EXT\0"
+ "GL_MINMAX_SINK\0"
+ "GL_MINMAX_SINK_EXT\0"
+ "GL_MINOR_VERSION\0"
+ "GL_MIN_EXT\0"
+ "GL_MIN_PROGRAM_TEXEL_OFFSET\0"
+ "GL_MIN_PROGRAM_TEXEL_OFFSET_EXT\0"
+ "GL_MIRRORED_REPEAT\0"
+ "GL_MIRRORED_REPEAT_ARB\0"
+ "GL_MIRRORED_REPEAT_IBM\0"
+ "GL_MIRROR_CLAMP_ATI\0"
+ "GL_MIRROR_CLAMP_EXT\0"
+ "GL_MIRROR_CLAMP_TO_BORDER_EXT\0"
+ "GL_MIRROR_CLAMP_TO_EDGE_ATI\0"
+ "GL_MIRROR_CLAMP_TO_EDGE_EXT\0"
+ "GL_MODELVIEW\0"
+ "GL_MODELVIEW0_ARB\0"
+ "GL_MODELVIEW10_ARB\0"
+ "GL_MODELVIEW11_ARB\0"
+ "GL_MODELVIEW12_ARB\0"
+ "GL_MODELVIEW13_ARB\0"
+ "GL_MODELVIEW14_ARB\0"
+ "GL_MODELVIEW15_ARB\0"
+ "GL_MODELVIEW16_ARB\0"
+ "GL_MODELVIEW17_ARB\0"
+ "GL_MODELVIEW18_ARB\0"
+ "GL_MODELVIEW19_ARB\0"
+ "GL_MODELVIEW1_ARB\0"
+ "GL_MODELVIEW20_ARB\0"
+ "GL_MODELVIEW21_ARB\0"
+ "GL_MODELVIEW22_ARB\0"
+ "GL_MODELVIEW23_ARB\0"
+ "GL_MODELVIEW24_ARB\0"
+ "GL_MODELVIEW25_ARB\0"
+ "GL_MODELVIEW26_ARB\0"
+ "GL_MODELVIEW27_ARB\0"
+ "GL_MODELVIEW28_ARB\0"
+ "GL_MODELVIEW29_ARB\0"
+ "GL_MODELVIEW2_ARB\0"
+ "GL_MODELVIEW30_ARB\0"
+ "GL_MODELVIEW31_ARB\0"
+ "GL_MODELVIEW3_ARB\0"
+ "GL_MODELVIEW4_ARB\0"
+ "GL_MODELVIEW5_ARB\0"
+ "GL_MODELVIEW6_ARB\0"
+ "GL_MODELVIEW7_ARB\0"
+ "GL_MODELVIEW8_ARB\0"
+ "GL_MODELVIEW9_ARB\0"
+ "GL_MODELVIEW_MATRIX\0"
+ "GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES\0"
+ "GL_MODELVIEW_PROJECTION_NV\0"
+ "GL_MODELVIEW_STACK_DEPTH\0"
+ "GL_MODULATE\0"
+ "GL_MODULATE_ADD_ATI\0"
+ "GL_MODULATE_SIGNED_ADD_ATI\0"
+ "GL_MODULATE_SUBTRACT_ATI\0"
+ "GL_MULT\0"
+ "GL_MULTISAMPLE\0"
+ "GL_MULTISAMPLE_3DFX\0"
+ "GL_MULTISAMPLE_ARB\0"
+ "GL_MULTISAMPLE_BIT\0"
+ "GL_MULTISAMPLE_BIT_3DFX\0"
+ "GL_MULTISAMPLE_BIT_ARB\0"
+ "GL_MULTISAMPLE_FILTER_HINT_NV\0"
+ "GL_N3F_V3F\0"
+ "GL_NAME_STACK_DEPTH\0"
+ "GL_NAND\0"
+ "GL_NEAREST\0"
+ "GL_NEAREST_CLIPMAP_LINEAR_SGIX\0"
+ "GL_NEAREST_CLIPMAP_NEAREST_SGIX\0"
+ "GL_NEAREST_MIPMAP_LINEAR\0"
+ "GL_NEAREST_MIPMAP_NEAREST\0"
+ "GL_NEVER\0"
+ "GL_NICEST\0"
+ "GL_NONE\0"
+ "GL_NONE_OES\0"
+ "GL_NOOP\0"
+ "GL_NOR\0"
+ "GL_NORMALIZE\0"
+ "GL_NORMAL_ARRAY\0"
+ "GL_NORMAL_ARRAY_BUFFER_BINDING\0"
+ "GL_NORMAL_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_NORMAL_ARRAY_POINTER\0"
+ "GL_NORMAL_ARRAY_STRIDE\0"
+ "GL_NORMAL_ARRAY_TYPE\0"
+ "GL_NORMAL_MAP\0"
+ "GL_NORMAL_MAP_ARB\0"
+ "GL_NORMAL_MAP_NV\0"
+ "GL_NORMAL_MAP_OES\0"
+ "GL_NOTEQUAL\0"
+ "GL_NO_ERROR\0"
+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS\0"
+ "GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB\0"
+ "GL_NUM_EXTENSIONS\0"
+ "GL_NUM_PROGRAM_BINARY_FORMATS_OES\0"
+ "GL_NUM_SHADER_BINARY_FORMATS\0"
+ "GL_OBJECT_ACTIVE_ATTRIBUTES_ARB\0"
+ "GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB\0"
+ "GL_OBJECT_ACTIVE_UNIFORMS_ARB\0"
+ "GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB\0"
+ "GL_OBJECT_ATTACHED_OBJECTS_ARB\0"
+ "GL_OBJECT_COMPILE_STATUS_ARB\0"
+ "GL_OBJECT_DELETE_STATUS_ARB\0"
+ "GL_OBJECT_INFO_LOG_LENGTH_ARB\0"
+ "GL_OBJECT_LINEAR\0"
+ "GL_OBJECT_LINK_STATUS_ARB\0"
+ "GL_OBJECT_PLANE\0"
+ "GL_OBJECT_SHADER_SOURCE_LENGTH_ARB\0"
+ "GL_OBJECT_SUBTYPE_ARB\0"
+ "GL_OBJECT_TYPE\0"
+ "GL_OBJECT_TYPE_ARB\0"
+ "GL_OBJECT_VALIDATE_STATUS_ARB\0"
+ "GL_OCCLUSION_TEST_HP\0"
+ "GL_OCCLUSION_TEST_RESULT_HP\0"
+ "GL_ONE\0"
+ "GL_ONE_MINUS_CONSTANT_ALPHA\0"
+ "GL_ONE_MINUS_CONSTANT_ALPHA_EXT\0"
+ "GL_ONE_MINUS_CONSTANT_COLOR\0"
+ "GL_ONE_MINUS_CONSTANT_COLOR_EXT\0"
+ "GL_ONE_MINUS_DST_ALPHA\0"
+ "GL_ONE_MINUS_DST_COLOR\0"
+ "GL_ONE_MINUS_SRC_ALPHA\0"
+ "GL_ONE_MINUS_SRC_COLOR\0"
+ "GL_OPERAND0_ALPHA\0"
+ "GL_OPERAND0_ALPHA_ARB\0"
+ "GL_OPERAND0_ALPHA_EXT\0"
+ "GL_OPERAND0_RGB\0"
+ "GL_OPERAND0_RGB_ARB\0"
+ "GL_OPERAND0_RGB_EXT\0"
+ "GL_OPERAND1_ALPHA\0"
+ "GL_OPERAND1_ALPHA_ARB\0"
+ "GL_OPERAND1_ALPHA_EXT\0"
+ "GL_OPERAND1_RGB\0"
+ "GL_OPERAND1_RGB_ARB\0"
+ "GL_OPERAND1_RGB_EXT\0"
+ "GL_OPERAND2_ALPHA\0"
+ "GL_OPERAND2_ALPHA_ARB\0"
+ "GL_OPERAND2_ALPHA_EXT\0"
+ "GL_OPERAND2_RGB\0"
+ "GL_OPERAND2_RGB_ARB\0"
+ "GL_OPERAND2_RGB_EXT\0"
+ "GL_OPERAND3_ALPHA_NV\0"
+ "GL_OPERAND3_RGB_NV\0"
+ "GL_OR\0"
+ "GL_ORDER\0"
+ "GL_OR_INVERTED\0"
+ "GL_OR_REVERSE\0"
+ "GL_OUT_OF_MEMORY\0"
+ "GL_PACK_ALIGNMENT\0"
+ "GL_PACK_IMAGE_HEIGHT\0"
+ "GL_PACK_INVERT_MESA\0"
+ "GL_PACK_LSB_FIRST\0"
+ "GL_PACK_ROW_LENGTH\0"
+ "GL_PACK_SKIP_IMAGES\0"
+ "GL_PACK_SKIP_PIXELS\0"
+ "GL_PACK_SKIP_ROWS\0"
+ "GL_PACK_SWAP_BYTES\0"
+ "GL_PALETTE4_R5_G6_B5_OES\0"
+ "GL_PALETTE4_RGB5_A1_OES\0"
+ "GL_PALETTE4_RGB8_OES\0"
+ "GL_PALETTE4_RGBA4_OES\0"
+ "GL_PALETTE4_RGBA8_OES\0"
+ "GL_PALETTE8_R5_G6_B5_OES\0"
+ "GL_PALETTE8_RGB5_A1_OES\0"
+ "GL_PALETTE8_RGB8_OES\0"
+ "GL_PALETTE8_RGBA4_OES\0"
+ "GL_PALETTE8_RGBA8_OES\0"
+ "GL_PASS_THROUGH_TOKEN\0"
+ "GL_PERSPECTIVE_CORRECTION_HINT\0"
+ "GL_PIXEL_MAP_A_TO_A\0"
+ "GL_PIXEL_MAP_A_TO_A_SIZE\0"
+ "GL_PIXEL_MAP_B_TO_B\0"
+ "GL_PIXEL_MAP_B_TO_B_SIZE\0"
+ "GL_PIXEL_MAP_G_TO_G\0"
+ "GL_PIXEL_MAP_G_TO_G_SIZE\0"
+ "GL_PIXEL_MAP_I_TO_A\0"
+ "GL_PIXEL_MAP_I_TO_A_SIZE\0"
+ "GL_PIXEL_MAP_I_TO_B\0"
+ "GL_PIXEL_MAP_I_TO_B_SIZE\0"
+ "GL_PIXEL_MAP_I_TO_G\0"
+ "GL_PIXEL_MAP_I_TO_G_SIZE\0"
+ "GL_PIXEL_MAP_I_TO_I\0"
+ "GL_PIXEL_MAP_I_TO_I_SIZE\0"
+ "GL_PIXEL_MAP_I_TO_R\0"
+ "GL_PIXEL_MAP_I_TO_R_SIZE\0"
+ "GL_PIXEL_MAP_R_TO_R\0"
+ "GL_PIXEL_MAP_R_TO_R_SIZE\0"
+ "GL_PIXEL_MAP_S_TO_S\0"
+ "GL_PIXEL_MAP_S_TO_S_SIZE\0"
+ "GL_PIXEL_MODE_BIT\0"
+ "GL_PIXEL_PACK_BUFFER\0"
+ "GL_PIXEL_PACK_BUFFER_BINDING\0"
+ "GL_PIXEL_PACK_BUFFER_BINDING_EXT\0"
+ "GL_PIXEL_PACK_BUFFER_EXT\0"
+ "GL_PIXEL_UNPACK_BUFFER\0"
+ "GL_PIXEL_UNPACK_BUFFER_BINDING\0"
+ "GL_PIXEL_UNPACK_BUFFER_BINDING_EXT\0"
+ "GL_PIXEL_UNPACK_BUFFER_EXT\0"
+ "GL_POINT\0"
+ "GL_POINTS\0"
+ "GL_POINT_BIT\0"
+ "GL_POINT_DISTANCE_ATTENUATION\0"
+ "GL_POINT_DISTANCE_ATTENUATION_ARB\0"
+ "GL_POINT_DISTANCE_ATTENUATION_EXT\0"
+ "GL_POINT_DISTANCE_ATTENUATION_SGIS\0"
+ "GL_POINT_FADE_THRESHOLD_SIZE\0"
+ "GL_POINT_FADE_THRESHOLD_SIZE_ARB\0"
+ "GL_POINT_FADE_THRESHOLD_SIZE_EXT\0"
+ "GL_POINT_FADE_THRESHOLD_SIZE_SGIS\0"
+ "GL_POINT_SIZE\0"
+ "GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES\0"
+ "GL_POINT_SIZE_ARRAY_OES\0"
+ "GL_POINT_SIZE_ARRAY_POINTER_OES\0"
+ "GL_POINT_SIZE_ARRAY_STRIDE_OES\0"
+ "GL_POINT_SIZE_ARRAY_TYPE_OES\0"
+ "GL_POINT_SIZE_GRANULARITY\0"
+ "GL_POINT_SIZE_MAX\0"
+ "GL_POINT_SIZE_MAX_ARB\0"
+ "GL_POINT_SIZE_MAX_EXT\0"
+ "GL_POINT_SIZE_MAX_SGIS\0"
+ "GL_POINT_SIZE_MIN\0"
+ "GL_POINT_SIZE_MIN_ARB\0"
+ "GL_POINT_SIZE_MIN_EXT\0"
+ "GL_POINT_SIZE_MIN_SGIS\0"
+ "GL_POINT_SIZE_RANGE\0"
+ "GL_POINT_SMOOTH\0"
+ "GL_POINT_SMOOTH_HINT\0"
+ "GL_POINT_SPRITE\0"
+ "GL_POINT_SPRITE_ARB\0"
+ "GL_POINT_SPRITE_COORD_ORIGIN\0"
+ "GL_POINT_SPRITE_NV\0"
+ "GL_POINT_SPRITE_OES\0"
+ "GL_POINT_SPRITE_R_MODE_NV\0"
+ "GL_POINT_TOKEN\0"
+ "GL_POLYGON\0"
+ "GL_POLYGON_BIT\0"
+ "GL_POLYGON_MODE\0"
+ "GL_POLYGON_OFFSET_BIAS\0"
+ "GL_POLYGON_OFFSET_FACTOR\0"
+ "GL_POLYGON_OFFSET_FILL\0"
+ "GL_POLYGON_OFFSET_LINE\0"
+ "GL_POLYGON_OFFSET_POINT\0"
+ "GL_POLYGON_OFFSET_UNITS\0"
+ "GL_POLYGON_SMOOTH\0"
+ "GL_POLYGON_SMOOTH_HINT\0"
+ "GL_POLYGON_STIPPLE\0"
+ "GL_POLYGON_STIPPLE_BIT\0"
+ "GL_POLYGON_TOKEN\0"
+ "GL_POSITION\0"
+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS\0"
+ "GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI\0"
+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE\0"
+ "GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI\0"
+ "GL_POST_COLOR_MATRIX_BLUE_BIAS\0"
+ "GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI\0"
+ "GL_POST_COLOR_MATRIX_BLUE_SCALE\0"
+ "GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI\0"
+ "GL_POST_COLOR_MATRIX_COLOR_TABLE\0"
+ "GL_POST_COLOR_MATRIX_GREEN_BIAS\0"
+ "GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI\0"
+ "GL_POST_COLOR_MATRIX_GREEN_SCALE\0"
+ "GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI\0"
+ "GL_POST_COLOR_MATRIX_RED_BIAS\0"
+ "GL_POST_COLOR_MATRIX_RED_BIAS_SGI\0"
+ "GL_POST_COLOR_MATRIX_RED_SCALE\0"
+ "GL_POST_COLOR_MATRIX_RED_SCALE_SGI\0"
+ "GL_POST_CONVOLUTION_ALPHA_BIAS\0"
+ "GL_POST_CONVOLUTION_ALPHA_BIAS_EXT\0"
+ "GL_POST_CONVOLUTION_ALPHA_SCALE\0"
+ "GL_POST_CONVOLUTION_ALPHA_SCALE_EXT\0"
+ "GL_POST_CONVOLUTION_BLUE_BIAS\0"
+ "GL_POST_CONVOLUTION_BLUE_BIAS_EXT\0"
+ "GL_POST_CONVOLUTION_BLUE_SCALE\0"
+ "GL_POST_CONVOLUTION_BLUE_SCALE_EXT\0"
+ "GL_POST_CONVOLUTION_COLOR_TABLE\0"
+ "GL_POST_CONVOLUTION_GREEN_BIAS\0"
+ "GL_POST_CONVOLUTION_GREEN_BIAS_EXT\0"
+ "GL_POST_CONVOLUTION_GREEN_SCALE\0"
+ "GL_POST_CONVOLUTION_GREEN_SCALE_EXT\0"
+ "GL_POST_CONVOLUTION_RED_BIAS\0"
+ "GL_POST_CONVOLUTION_RED_BIAS_EXT\0"
+ "GL_POST_CONVOLUTION_RED_SCALE\0"
+ "GL_POST_CONVOLUTION_RED_SCALE_EXT\0"
+ "GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX\0"
+ "GL_POST_TEXTURE_FILTER_BIAS_SGIX\0"
+ "GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX\0"
+ "GL_POST_TEXTURE_FILTER_SCALE_SGIX\0"
+ "GL_PREVIOUS\0"
+ "GL_PREVIOUS_ARB\0"
+ "GL_PREVIOUS_EXT\0"
+ "GL_PRIMARY_COLOR\0"
+ "GL_PRIMARY_COLOR_ARB\0"
+ "GL_PRIMARY_COLOR_EXT\0"
+ "GL_PRIMITIVES_GENERATED\0"
+ "GL_PRIMITIVES_GENERATED_EXT\0"
+ "GL_PRIMITIVE_RESTART\0"
+ "GL_PRIMITIVE_RESTART_INDEX\0"
+ "GL_PRIMITIVE_RESTART_INDEX_NV\0"
+ "GL_PRIMITIVE_RESTART_NV\0"
+ "GL_PROGRAM_ADDRESS_REGISTERS_ARB\0"
+ "GL_PROGRAM_ALU_INSTRUCTIONS_ARB\0"
+ "GL_PROGRAM_ATTRIBS_ARB\0"
+ "GL_PROGRAM_BINARY_FORMATS_OES\0"
+ "GL_PROGRAM_BINARY_LENGTH_OES\0"
+ "GL_PROGRAM_BINDING_ARB\0"
+ "GL_PROGRAM_ERROR_POSITION_ARB\0"
+ "GL_PROGRAM_ERROR_POSITION_NV\0"
+ "GL_PROGRAM_ERROR_STRING_ARB\0"
+ "GL_PROGRAM_FORMAT_ARB\0"
+ "GL_PROGRAM_FORMAT_ASCII_ARB\0"
+ "GL_PROGRAM_INSTRUCTIONS_ARB\0"
+ "GL_PROGRAM_LENGTH_ARB\0"
+ "GL_PROGRAM_LENGTH_NV\0"
+ "GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB\0"
+ "GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB\0"
+ "GL_PROGRAM_NATIVE_ATTRIBS_ARB\0"
+ "GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB\0"
+ "GL_PROGRAM_NATIVE_PARAMETERS_ARB\0"
+ "GL_PROGRAM_NATIVE_TEMPORARIES_ARB\0"
+ "GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB\0"
+ "GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB\0"
+ "GL_PROGRAM_OBJECT_ARB\0"
+ "GL_PROGRAM_PARAMETERS_ARB\0"
+ "GL_PROGRAM_PARAMETER_NV\0"
+ "GL_PROGRAM_POINT_SIZE\0"
+ "GL_PROGRAM_POINT_SIZE_ARB\0"
+ "GL_PROGRAM_RESIDENT_NV\0"
+ "GL_PROGRAM_STRING_ARB\0"
+ "GL_PROGRAM_STRING_NV\0"
+ "GL_PROGRAM_TARGET_NV\0"
+ "GL_PROGRAM_TEMPORARIES_ARB\0"
+ "GL_PROGRAM_TEX_INDIRECTIONS_ARB\0"
+ "GL_PROGRAM_TEX_INSTRUCTIONS_ARB\0"
+ "GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB\0"
+ "GL_PROJECTION\0"
+ "GL_PROJECTION_MATRIX\0"
+ "GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES\0"
+ "GL_PROJECTION_STACK_DEPTH\0"
+ "GL_PROVOKING_VERTEX\0"
+ "GL_PROVOKING_VERTEX_EXT\0"
+ "GL_PROXY_COLOR_TABLE\0"
+ "GL_PROXY_HISTOGRAM\0"
+ "GL_PROXY_HISTOGRAM_EXT\0"
+ "GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE\0"
+ "GL_PROXY_POST_CONVOLUTION_COLOR_TABLE\0"
+ "GL_PROXY_TEXTURE_1D\0"
+ "GL_PROXY_TEXTURE_1D_ARRAY\0"
+ "GL_PROXY_TEXTURE_1D_ARRAY_EXT\0"
+ "GL_PROXY_TEXTURE_1D_EXT\0"
+ "GL_PROXY_TEXTURE_2D\0"
+ "GL_PROXY_TEXTURE_2D_ARRAY\0"
+ "GL_PROXY_TEXTURE_2D_ARRAY_EXT\0"
+ "GL_PROXY_TEXTURE_2D_EXT\0"
+ "GL_PROXY_TEXTURE_3D\0"
+ "GL_PROXY_TEXTURE_COLOR_TABLE_SGI\0"
+ "GL_PROXY_TEXTURE_CUBE_MAP\0"
+ "GL_PROXY_TEXTURE_CUBE_MAP_ARB\0"
+ "GL_PROXY_TEXTURE_RECTANGLE\0"
+ "GL_PROXY_TEXTURE_RECTANGLE_ARB\0"
+ "GL_PROXY_TEXTURE_RECTANGLE_NV\0"
+ "GL_PURGEABLE_APPLE\0"
+ "GL_Q\0"
+ "GL_QUADRATIC_ATTENUATION\0"
+ "GL_QUADS\0"
+ "GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION\0"
+ "GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT\0"
+ "GL_QUAD_MESH_SUN\0"
+ "GL_QUAD_STRIP\0"
+ "GL_QUERY_BY_REGION_NO_WAIT\0"
+ "GL_QUERY_BY_REGION_NO_WAIT_NV\0"
+ "GL_QUERY_BY_REGION_WAIT\0"
+ "GL_QUERY_BY_REGION_WAIT_NV\0"
+ "GL_QUERY_COUNTER_BITS\0"
+ "GL_QUERY_COUNTER_BITS_ARB\0"
+ "GL_QUERY_NO_WAIT\0"
+ "GL_QUERY_NO_WAIT_NV\0"
+ "GL_QUERY_RESULT\0"
+ "GL_QUERY_RESULT_ARB\0"
+ "GL_QUERY_RESULT_AVAILABLE\0"
+ "GL_QUERY_RESULT_AVAILABLE_ARB\0"
+ "GL_QUERY_WAIT\0"
+ "GL_QUERY_WAIT_NV\0"
+ "GL_R\0"
+ "GL_R11F_G11F_B10F\0"
+ "GL_R16_SNORM\0"
+ "GL_R3_G3_B2\0"
+ "GL_R8_SNORM\0"
+ "GL_RASTERIZER_DISCARD\0"
+ "GL_RASTERIZER_DISCARD_EXT\0"
+ "GL_RASTER_POSITION_UNCLIPPED_IBM\0"
+ "GL_READ_BUFFER\0"
+ "GL_READ_FRAMEBUFFER\0"
+ "GL_READ_FRAMEBUFFER_BINDING\0"
+ "GL_READ_FRAMEBUFFER_BINDING_EXT\0"
+ "GL_READ_FRAMEBUFFER_EXT\0"
+ "GL_READ_ONLY\0"
+ "GL_READ_ONLY_ARB\0"
+ "GL_READ_WRITE\0"
+ "GL_READ_WRITE_ARB\0"
+ "GL_RED\0"
+ "GL_REDUCE\0"
+ "GL_REDUCE_EXT\0"
+ "GL_RED_BIAS\0"
+ "GL_RED_BITS\0"
+ "GL_RED_INTEGER\0"
+ "GL_RED_INTEGER_EXT\0"
+ "GL_RED_SCALE\0"
+ "GL_RED_SNORM\0"
+ "GL_REFLECTION_MAP\0"
+ "GL_REFLECTION_MAP_ARB\0"
+ "GL_REFLECTION_MAP_NV\0"
+ "GL_REFLECTION_MAP_OES\0"
+ "GL_RELEASED_APPLE\0"
+ "GL_RENDER\0"
+ "GL_RENDERBUFFER\0"
+ "GL_RENDERBUFFER_ALPHA_SIZE\0"
+ "GL_RENDERBUFFER_ALPHA_SIZE_OES\0"
+ "GL_RENDERBUFFER_BINDING\0"
+ "GL_RENDERBUFFER_BINDING_EXT\0"
+ "GL_RENDERBUFFER_BINDING_OES\0"
+ "GL_RENDERBUFFER_BLUE_SIZE\0"
+ "GL_RENDERBUFFER_BLUE_SIZE_OES\0"
+ "GL_RENDERBUFFER_DEPTH_SIZE\0"
+ "GL_RENDERBUFFER_DEPTH_SIZE_OES\0"
+ "GL_RENDERBUFFER_EXT\0"
+ "GL_RENDERBUFFER_GREEN_SIZE\0"
+ "GL_RENDERBUFFER_GREEN_SIZE_OES\0"
+ "GL_RENDERBUFFER_HEIGHT\0"
+ "GL_RENDERBUFFER_HEIGHT_EXT\0"
+ "GL_RENDERBUFFER_HEIGHT_OES\0"
+ "GL_RENDERBUFFER_INTERNAL_FORMAT\0"
+ "GL_RENDERBUFFER_INTERNAL_FORMAT_EXT\0"
+ "GL_RENDERBUFFER_INTERNAL_FORMAT_OES\0"
+ "GL_RENDERBUFFER_OES\0"
+ "GL_RENDERBUFFER_RED_SIZE\0"
+ "GL_RENDERBUFFER_RED_SIZE_OES\0"
+ "GL_RENDERBUFFER_SAMPLES\0"
+ "GL_RENDERBUFFER_SAMPLES_EXT\0"
+ "GL_RENDERBUFFER_STENCIL_SIZE\0"
+ "GL_RENDERBUFFER_STENCIL_SIZE_OES\0"
+ "GL_RENDERBUFFER_WIDTH\0"
+ "GL_RENDERBUFFER_WIDTH_EXT\0"
+ "GL_RENDERBUFFER_WIDTH_OES\0"
+ "GL_RENDERER\0"
+ "GL_RENDER_MODE\0"
+ "GL_REPEAT\0"
+ "GL_REPLACE\0"
+ "GL_REPLACE_EXT\0"
+ "GL_REPLICATE_BORDER_HP\0"
+ "GL_RESCALE_NORMAL\0"
+ "GL_RESCALE_NORMAL_EXT\0"
+ "GL_RETAINED_APPLE\0"
+ "GL_RETURN\0"
+ "GL_RG16_SNORM\0"
+ "GL_RG8_SNORM\0"
+ "GL_RGB\0"
+ "GL_RGB10\0"
+ "GL_RGB10_A2\0"
+ "GL_RGB10_A2_EXT\0"
+ "GL_RGB10_EXT\0"
+ "GL_RGB12\0"
+ "GL_RGB12_EXT\0"
+ "GL_RGB16\0"
+ "GL_RGB16F\0"
+ "GL_RGB16I\0"
+ "GL_RGB16I_EXT\0"
+ "GL_RGB16UI\0"
+ "GL_RGB16UI_EXT\0"
+ "GL_RGB16_EXT\0"
+ "GL_RGB16_SNORM\0"
+ "GL_RGB2_EXT\0"
+ "GL_RGB32F\0"
+ "GL_RGB32I\0"
+ "GL_RGB32I_EXT\0"
+ "GL_RGB32UI\0"
+ "GL_RGB32UI_EXT\0"
+ "GL_RGB4\0"
+ "GL_RGB4_EXT\0"
+ "GL_RGB4_S3TC\0"
+ "GL_RGB5\0"
+ "GL_RGB565\0"
+ "GL_RGB565_OES\0"
+ "GL_RGB5_A1\0"
+ "GL_RGB5_A1_EXT\0"
+ "GL_RGB5_A1_OES\0"
+ "GL_RGB5_EXT\0"
+ "GL_RGB8\0"
+ "GL_RGB8I\0"
+ "GL_RGB8I_EXT\0"
+ "GL_RGB8UI\0"
+ "GL_RGB8UI_EXT\0"
+ "GL_RGB8_EXT\0"
+ "GL_RGB8_OES\0"
+ "GL_RGB8_SNORM\0"
+ "GL_RGB9_E5\0"
+ "GL_RGBA\0"
+ "GL_RGBA12\0"
+ "GL_RGBA12_EXT\0"
+ "GL_RGBA16\0"
+ "GL_RGBA16F\0"
+ "GL_RGBA16I\0"
+ "GL_RGBA16I_EXT\0"
+ "GL_RGBA16UI\0"
+ "GL_RGBA16UI_EXT\0"
+ "GL_RGBA16_EXT\0"
+ "GL_RGBA16_SNORM\0"
+ "GL_RGBA2\0"
+ "GL_RGBA2_EXT\0"
+ "GL_RGBA32F\0"
+ "GL_RGBA32I\0"
+ "GL_RGBA32I_EXT\0"
+ "GL_RGBA32UI\0"
+ "GL_RGBA32UI_EXT\0"
+ "GL_RGBA4\0"
+ "GL_RGBA4_DXT5_S3TC\0"
+ "GL_RGBA4_EXT\0"
+ "GL_RGBA4_OES\0"
+ "GL_RGBA4_S3TC\0"
+ "GL_RGBA8\0"
+ "GL_RGBA8I\0"
+ "GL_RGBA8I_EXT\0"
+ "GL_RGBA8UI\0"
+ "GL_RGBA8UI_EXT\0"
+ "GL_RGBA8_EXT\0"
+ "GL_RGBA8_OES\0"
+ "GL_RGBA8_SNORM\0"
+ "GL_RGBA_DXT5_S3TC\0"
+ "GL_RGBA_FLOAT_MODE_ARB\0"
+ "GL_RGBA_INTEGER\0"
+ "GL_RGBA_INTEGER_EXT\0"
+ "GL_RGBA_INTEGER_MODE_EXT\0"
+ "GL_RGBA_MODE\0"
+ "GL_RGBA_S3TC\0"
+ "GL_RGBA_SNORM\0"
+ "GL_RGB_INTEGER\0"
+ "GL_RGB_INTEGER_EXT\0"
+ "GL_RGB_S3TC\0"
+ "GL_RGB_SCALE\0"
+ "GL_RGB_SCALE_ARB\0"
+ "GL_RGB_SCALE_EXT\0"
+ "GL_RGB_SNORM\0"
+ "GL_RG_SNORM\0"
+ "GL_RIGHT\0"
+ "GL_S\0"
+ "GL_SAMPLER_1D\0"
+ "GL_SAMPLER_1D_ARRAY\0"
+ "GL_SAMPLER_1D_ARRAY_EXT\0"
+ "GL_SAMPLER_1D_ARRAY_SHADOW\0"
+ "GL_SAMPLER_1D_ARRAY_SHADOW_EXT\0"
+ "GL_SAMPLER_1D_SHADOW\0"
+ "GL_SAMPLER_2D\0"
+ "GL_SAMPLER_2D_ARRAY\0"
+ "GL_SAMPLER_2D_ARRAY_EXT\0"
+ "GL_SAMPLER_2D_ARRAY_SHADOW\0"
+ "GL_SAMPLER_2D_ARRAY_SHADOW_EXT\0"
+ "GL_SAMPLER_2D_RECT\0"
+ "GL_SAMPLER_2D_RECT_SHADOW\0"
+ "GL_SAMPLER_2D_SHADOW\0"
+ "GL_SAMPLER_3D\0"
+ "GL_SAMPLER_3D_OES\0"
+ "GL_SAMPLER_BUFFER\0"
+ "GL_SAMPLER_BUFFER_EXT\0"
+ "GL_SAMPLER_CUBE\0"
+ "GL_SAMPLER_CUBE_SHADOW\0"
+ "GL_SAMPLER_CUBE_SHADOW_EXT\0"
+ "GL_SAMPLES\0"
+ "GL_SAMPLES_3DFX\0"
+ "GL_SAMPLES_ARB\0"
+ "GL_SAMPLES_PASSED\0"
+ "GL_SAMPLES_PASSED_ARB\0"
+ "GL_SAMPLE_ALPHA_TO_COVERAGE\0"
+ "GL_SAMPLE_ALPHA_TO_COVERAGE_ARB\0"
+ "GL_SAMPLE_ALPHA_TO_ONE\0"
+ "GL_SAMPLE_ALPHA_TO_ONE_ARB\0"
+ "GL_SAMPLE_BUFFERS\0"
+ "GL_SAMPLE_BUFFERS_3DFX\0"
+ "GL_SAMPLE_BUFFERS_ARB\0"
+ "GL_SAMPLE_COVERAGE\0"
+ "GL_SAMPLE_COVERAGE_ARB\0"
+ "GL_SAMPLE_COVERAGE_INVERT\0"
+ "GL_SAMPLE_COVERAGE_INVERT_ARB\0"
+ "GL_SAMPLE_COVERAGE_VALUE\0"
+ "GL_SAMPLE_COVERAGE_VALUE_ARB\0"
+ "GL_SCISSOR_BIT\0"
+ "GL_SCISSOR_BOX\0"
+ "GL_SCISSOR_TEST\0"
+ "GL_SECONDARY_COLOR_ARRAY\0"
+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING\0"
+ "GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_SECONDARY_COLOR_ARRAY_POINTER\0"
+ "GL_SECONDARY_COLOR_ARRAY_SIZE\0"
+ "GL_SECONDARY_COLOR_ARRAY_STRIDE\0"
+ "GL_SECONDARY_COLOR_ARRAY_TYPE\0"
+ "GL_SELECT\0"
+ "GL_SELECTION_BUFFER_POINTER\0"
+ "GL_SELECTION_BUFFER_SIZE\0"
+ "GL_SEPARABLE_2D\0"
+ "GL_SEPARATE_ATTRIBS\0"
+ "GL_SEPARATE_ATTRIBS_EXT\0"
+ "GL_SEPARATE_SPECULAR_COLOR\0"
+ "GL_SEPARATE_SPECULAR_COLOR_EXT\0"
+ "GL_SET\0"
+ "GL_SHADER_BINARY_FORMATS\0"
+ "GL_SHADER_COMPILER\0"
+ "GL_SHADER_OBJECT_ARB\0"
+ "GL_SHADER_SOURCE_LENGTH\0"
+ "GL_SHADER_TYPE\0"
+ "GL_SHADE_MODEL\0"
+ "GL_SHADING_LANGUAGE_VERSION\0"
+ "GL_SHADOW_AMBIENT_SGIX\0"
+ "GL_SHARED_TEXTURE_PALETTE_EXT\0"
+ "GL_SHININESS\0"
+ "GL_SHORT\0"
+ "GL_SIGNALED\0"
+ "GL_SIGNED_NORMALIZED\0"
+ "GL_SINGLE_COLOR\0"
+ "GL_SINGLE_COLOR_EXT\0"
+ "GL_SLICE_ACCUM_SUN\0"
+ "GL_SLUMINANCE\0"
+ "GL_SLUMINANCE8\0"
+ "GL_SLUMINANCE8_ALPHA8\0"
+ "GL_SLUMINANCE_ALPHA\0"
+ "GL_SMOOTH\0"
+ "GL_SMOOTH_LINE_WIDTH_GRANULARITY\0"
+ "GL_SMOOTH_LINE_WIDTH_RANGE\0"
+ "GL_SMOOTH_POINT_SIZE_GRANULARITY\0"
+ "GL_SMOOTH_POINT_SIZE_RANGE\0"
+ "GL_SOURCE0_ALPHA\0"
+ "GL_SOURCE0_ALPHA_ARB\0"
+ "GL_SOURCE0_ALPHA_EXT\0"
+ "GL_SOURCE0_RGB\0"
+ "GL_SOURCE0_RGB_ARB\0"
+ "GL_SOURCE0_RGB_EXT\0"
+ "GL_SOURCE1_ALPHA\0"
+ "GL_SOURCE1_ALPHA_ARB\0"
+ "GL_SOURCE1_ALPHA_EXT\0"
+ "GL_SOURCE1_RGB\0"
+ "GL_SOURCE1_RGB_ARB\0"
+ "GL_SOURCE1_RGB_EXT\0"
+ "GL_SOURCE2_ALPHA\0"
+ "GL_SOURCE2_ALPHA_ARB\0"
+ "GL_SOURCE2_ALPHA_EXT\0"
+ "GL_SOURCE2_RGB\0"
+ "GL_SOURCE2_RGB_ARB\0"
+ "GL_SOURCE2_RGB_EXT\0"
+ "GL_SOURCE3_ALPHA_NV\0"
+ "GL_SOURCE3_RGB_NV\0"
+ "GL_SPECULAR\0"
+ "GL_SPHERE_MAP\0"
+ "GL_SPOT_CUTOFF\0"
+ "GL_SPOT_DIRECTION\0"
+ "GL_SPOT_EXPONENT\0"
+ "GL_SRC0_ALPHA\0"
+ "GL_SRC0_RGB\0"
+ "GL_SRC1_ALPHA\0"
+ "GL_SRC1_RGB\0"
+ "GL_SRC2_ALPHA\0"
+ "GL_SRC2_RGB\0"
+ "GL_SRC_ALPHA\0"
+ "GL_SRC_ALPHA_SATURATE\0"
+ "GL_SRC_COLOR\0"
+ "GL_SRGB\0"
+ "GL_SRGB8\0"
+ "GL_SRGB8_ALPHA8\0"
+ "GL_SRGB_ALPHA\0"
+ "GL_STACK_OVERFLOW\0"
+ "GL_STACK_UNDERFLOW\0"
+ "GL_STATIC_COPY\0"
+ "GL_STATIC_COPY_ARB\0"
+ "GL_STATIC_DRAW\0"
+ "GL_STATIC_DRAW_ARB\0"
+ "GL_STATIC_READ\0"
+ "GL_STATIC_READ_ARB\0"
+ "GL_STENCIL\0"
+ "GL_STENCIL_ATTACHMENT\0"
+ "GL_STENCIL_ATTACHMENT_EXT\0"
+ "GL_STENCIL_ATTACHMENT_OES\0"
+ "GL_STENCIL_BACK_FAIL\0"
+ "GL_STENCIL_BACK_FAIL_ATI\0"
+ "GL_STENCIL_BACK_FUNC\0"
+ "GL_STENCIL_BACK_FUNC_ATI\0"
+ "GL_STENCIL_BACK_PASS_DEPTH_FAIL\0"
+ "GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI\0"
+ "GL_STENCIL_BACK_PASS_DEPTH_PASS\0"
+ "GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI\0"
+ "GL_STENCIL_BACK_REF\0"
+ "GL_STENCIL_BACK_VALUE_MASK\0"
+ "GL_STENCIL_BACK_WRITEMASK\0"
+ "GL_STENCIL_BITS\0"
+ "GL_STENCIL_BUFFER\0"
+ "GL_STENCIL_BUFFER_BIT\0"
+ "GL_STENCIL_CLEAR_VALUE\0"
+ "GL_STENCIL_FAIL\0"
+ "GL_STENCIL_FUNC\0"
+ "GL_STENCIL_INDEX\0"
+ "GL_STENCIL_INDEX1\0"
+ "GL_STENCIL_INDEX16\0"
+ "GL_STENCIL_INDEX16_EXT\0"
+ "GL_STENCIL_INDEX1_EXT\0"
+ "GL_STENCIL_INDEX1_OES\0"
+ "GL_STENCIL_INDEX4\0"
+ "GL_STENCIL_INDEX4_EXT\0"
+ "GL_STENCIL_INDEX4_OES\0"
+ "GL_STENCIL_INDEX8\0"
+ "GL_STENCIL_INDEX8_EXT\0"
+ "GL_STENCIL_INDEX8_OES\0"
+ "GL_STENCIL_INDEX_EXT\0"
+ "GL_STENCIL_PASS_DEPTH_FAIL\0"
+ "GL_STENCIL_PASS_DEPTH_PASS\0"
+ "GL_STENCIL_REF\0"
+ "GL_STENCIL_TEST\0"
+ "GL_STENCIL_TEST_TWO_SIDE_EXT\0"
+ "GL_STENCIL_VALUE_MASK\0"
+ "GL_STENCIL_WRITEMASK\0"
+ "GL_STEREO\0"
+ "GL_STORAGE_CACHED_APPLE\0"
+ "GL_STORAGE_PRIVATE_APPLE\0"
+ "GL_STORAGE_SHARED_APPLE\0"
+ "GL_STREAM_COPY\0"
+ "GL_STREAM_COPY_ARB\0"
+ "GL_STREAM_DRAW\0"
+ "GL_STREAM_DRAW_ARB\0"
+ "GL_STREAM_READ\0"
+ "GL_STREAM_READ_ARB\0"
+ "GL_SUBPIXEL_BITS\0"
+ "GL_SUBTRACT\0"
+ "GL_SUBTRACT_ARB\0"
+ "GL_SYNC_CONDITION\0"
+ "GL_SYNC_FENCE\0"
+ "GL_SYNC_FLAGS\0"
+ "GL_SYNC_FLUSH_COMMANDS_BIT\0"
+ "GL_SYNC_GPU_COMMANDS_COMPLETE\0"
+ "GL_SYNC_STATUS\0"
+ "GL_T\0"
+ "GL_T2F_C3F_V3F\0"
+ "GL_T2F_C4F_N3F_V3F\0"
+ "GL_T2F_C4UB_V3F\0"
+ "GL_T2F_N3F_V3F\0"
+ "GL_T2F_V3F\0"
+ "GL_T4F_C4F_N3F_V4F\0"
+ "GL_T4F_V4F\0"
+ "GL_TABLE_TOO_LARGE_EXT\0"
+ "GL_TEXTURE\0"
+ "GL_TEXTURE0\0"
+ "GL_TEXTURE0_ARB\0"
+ "GL_TEXTURE1\0"
+ "GL_TEXTURE10\0"
+ "GL_TEXTURE10_ARB\0"
+ "GL_TEXTURE11\0"
+ "GL_TEXTURE11_ARB\0"
+ "GL_TEXTURE12\0"
+ "GL_TEXTURE12_ARB\0"
+ "GL_TEXTURE13\0"
+ "GL_TEXTURE13_ARB\0"
+ "GL_TEXTURE14\0"
+ "GL_TEXTURE14_ARB\0"
+ "GL_TEXTURE15\0"
+ "GL_TEXTURE15_ARB\0"
+ "GL_TEXTURE16\0"
+ "GL_TEXTURE16_ARB\0"
+ "GL_TEXTURE17\0"
+ "GL_TEXTURE17_ARB\0"
+ "GL_TEXTURE18\0"
+ "GL_TEXTURE18_ARB\0"
+ "GL_TEXTURE19\0"
+ "GL_TEXTURE19_ARB\0"
+ "GL_TEXTURE1_ARB\0"
+ "GL_TEXTURE2\0"
+ "GL_TEXTURE20\0"
+ "GL_TEXTURE20_ARB\0"
+ "GL_TEXTURE21\0"
+ "GL_TEXTURE21_ARB\0"
+ "GL_TEXTURE22\0"
+ "GL_TEXTURE22_ARB\0"
+ "GL_TEXTURE23\0"
+ "GL_TEXTURE23_ARB\0"
+ "GL_TEXTURE24\0"
+ "GL_TEXTURE24_ARB\0"
+ "GL_TEXTURE25\0"
+ "GL_TEXTURE25_ARB\0"
+ "GL_TEXTURE26\0"
+ "GL_TEXTURE26_ARB\0"
+ "GL_TEXTURE27\0"
+ "GL_TEXTURE27_ARB\0"
+ "GL_TEXTURE28\0"
+ "GL_TEXTURE28_ARB\0"
+ "GL_TEXTURE29\0"
+ "GL_TEXTURE29_ARB\0"
+ "GL_TEXTURE2_ARB\0"
+ "GL_TEXTURE3\0"
+ "GL_TEXTURE30\0"
+ "GL_TEXTURE30_ARB\0"
+ "GL_TEXTURE31\0"
+ "GL_TEXTURE31_ARB\0"
+ "GL_TEXTURE3_ARB\0"
+ "GL_TEXTURE4\0"
+ "GL_TEXTURE4_ARB\0"
+ "GL_TEXTURE5\0"
+ "GL_TEXTURE5_ARB\0"
+ "GL_TEXTURE6\0"
+ "GL_TEXTURE6_ARB\0"
+ "GL_TEXTURE7\0"
+ "GL_TEXTURE7_ARB\0"
+ "GL_TEXTURE8\0"
+ "GL_TEXTURE8_ARB\0"
+ "GL_TEXTURE9\0"
+ "GL_TEXTURE9_ARB\0"
+ "GL_TEXTURE_1D\0"
+ "GL_TEXTURE_1D_ARRAY\0"
+ "GL_TEXTURE_1D_ARRAY_EXT\0"
+ "GL_TEXTURE_2D\0"
+ "GL_TEXTURE_2D_ARRAY\0"
+ "GL_TEXTURE_2D_ARRAY_EXT\0"
+ "GL_TEXTURE_3D\0"
+ "GL_TEXTURE_3D_OES\0"
+ "GL_TEXTURE_ALPHA_SIZE\0"
+ "GL_TEXTURE_ALPHA_SIZE_EXT\0"
+ "GL_TEXTURE_BASE_LEVEL\0"
+ "GL_TEXTURE_BINDING_1D\0"
+ "GL_TEXTURE_BINDING_1D_ARRAY\0"
+ "GL_TEXTURE_BINDING_1D_ARRAY_EXT\0"
+ "GL_TEXTURE_BINDING_2D\0"
+ "GL_TEXTURE_BINDING_2D_ARRAY\0"
+ "GL_TEXTURE_BINDING_2D_ARRAY_EXT\0"
+ "GL_TEXTURE_BINDING_3D\0"
+ "GL_TEXTURE_BINDING_3D_OES\0"
+ "GL_TEXTURE_BINDING_BUFFER\0"
+ "GL_TEXTURE_BINDING_BUFFER_ARB\0"
+ "GL_TEXTURE_BINDING_CUBE_MAP\0"
+ "GL_TEXTURE_BINDING_CUBE_MAP_ARB\0"
+ "GL_TEXTURE_BINDING_CUBE_MAP_OES\0"
+ "GL_TEXTURE_BINDING_RECTANGLE\0"
+ "GL_TEXTURE_BINDING_RECTANGLE_ARB\0"
+ "GL_TEXTURE_BINDING_RECTANGLE_NV\0"
+ "GL_TEXTURE_BIT\0"
+ "GL_TEXTURE_BLUE_SIZE\0"
+ "GL_TEXTURE_BLUE_SIZE_EXT\0"
+ "GL_TEXTURE_BORDER\0"
+ "GL_TEXTURE_BORDER_COLOR\0"
+ "GL_TEXTURE_BUFFER\0"
+ "GL_TEXTURE_BUFFER_ARB\0"
+ "GL_TEXTURE_BUFFER_DATA_STORE_BINDING\0"
+ "GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB\0"
+ "GL_TEXTURE_BUFFER_FORMAT\0"
+ "GL_TEXTURE_BUFFER_FORMAT_ARB\0"
+ "GL_TEXTURE_CLIPMAP_CENTER_SGIX\0"
+ "GL_TEXTURE_CLIPMAP_DEPTH_SGIX\0"
+ "GL_TEXTURE_CLIPMAP_FRAME_SGIX\0"
+ "GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX\0"
+ "GL_TEXTURE_CLIPMAP_OFFSET_SGIX\0"
+ "GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX\0"
+ "GL_TEXTURE_COLOR_TABLE_SGI\0"
+ "GL_TEXTURE_COLOR_WRITEMASK_SGIS\0"
+ "GL_TEXTURE_COMPARE_FAIL_VALUE_ARB\0"
+ "GL_TEXTURE_COMPARE_FUNC\0"
+ "GL_TEXTURE_COMPARE_FUNC_ARB\0"
+ "GL_TEXTURE_COMPARE_MODE\0"
+ "GL_TEXTURE_COMPARE_MODE_ARB\0"
+ "GL_TEXTURE_COMPARE_OPERATOR_SGIX\0"
+ "GL_TEXTURE_COMPARE_SGIX\0"
+ "GL_TEXTURE_COMPONENTS\0"
+ "GL_TEXTURE_COMPRESSED\0"
+ "GL_TEXTURE_COMPRESSED_ARB\0"
+ "GL_TEXTURE_COMPRESSED_FORMATS_ARB\0"
+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE\0"
+ "GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB\0"
+ "GL_TEXTURE_COMPRESSION_HINT\0"
+ "GL_TEXTURE_COMPRESSION_HINT_ARB\0"
+ "GL_TEXTURE_COORD_ARRAY\0"
+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING\0"
+ "GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_TEXTURE_COORD_ARRAY_POINTER\0"
+ "GL_TEXTURE_COORD_ARRAY_SIZE\0"
+ "GL_TEXTURE_COORD_ARRAY_STRIDE\0"
+ "GL_TEXTURE_COORD_ARRAY_TYPE\0"
+ "GL_TEXTURE_CROP_RECT_OES\0"
+ "GL_TEXTURE_CUBE_MAP\0"
+ "GL_TEXTURE_CUBE_MAP_ARB\0"
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X\0"
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB\0"
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES\0"
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y\0"
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB\0"
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES\0"
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z\0"
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB\0"
+ "GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES\0"
+ "GL_TEXTURE_CUBE_MAP_OES\0"
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X\0"
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB\0"
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES\0"
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y\0"
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB\0"
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES\0"
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z\0"
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB\0"
+ "GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES\0"
+ "GL_TEXTURE_CUBE_MAP_SEAMLESS\0"
+ "GL_TEXTURE_DEPTH\0"
+ "GL_TEXTURE_DEPTH_SIZE\0"
+ "GL_TEXTURE_DEPTH_SIZE_ARB\0"
+ "GL_TEXTURE_ENV\0"
+ "GL_TEXTURE_ENV_COLOR\0"
+ "GL_TEXTURE_ENV_MODE\0"
+ "GL_TEXTURE_FILTER_CONTROL\0"
+ "GL_TEXTURE_FILTER_CONTROL_EXT\0"
+ "GL_TEXTURE_GEN_MODE\0"
+ "GL_TEXTURE_GEN_MODE_OES\0"
+ "GL_TEXTURE_GEN_Q\0"
+ "GL_TEXTURE_GEN_R\0"
+ "GL_TEXTURE_GEN_S\0"
+ "GL_TEXTURE_GEN_STR_OES\0"
+ "GL_TEXTURE_GEN_T\0"
+ "GL_TEXTURE_GEQUAL_R_SGIX\0"
+ "GL_TEXTURE_GREEN_SIZE\0"
+ "GL_TEXTURE_GREEN_SIZE_EXT\0"
+ "GL_TEXTURE_HEIGHT\0"
+ "GL_TEXTURE_INDEX_SIZE_EXT\0"
+ "GL_TEXTURE_INTENSITY_SIZE\0"
+ "GL_TEXTURE_INTENSITY_SIZE_EXT\0"
+ "GL_TEXTURE_INTERNAL_FORMAT\0"
+ "GL_TEXTURE_LEQUAL_R_SGIX\0"
+ "GL_TEXTURE_LOD_BIAS\0"
+ "GL_TEXTURE_LOD_BIAS_EXT\0"
+ "GL_TEXTURE_LOD_BIAS_R_SGIX\0"
+ "GL_TEXTURE_LOD_BIAS_S_SGIX\0"
+ "GL_TEXTURE_LOD_BIAS_T_SGIX\0"
+ "GL_TEXTURE_LUMINANCE_SIZE\0"
+ "GL_TEXTURE_LUMINANCE_SIZE_EXT\0"
+ "GL_TEXTURE_MAG_FILTER\0"
+ "GL_TEXTURE_MATRIX\0"
+ "GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES\0"
+ "GL_TEXTURE_MAX_ANISOTROPY_EXT\0"
+ "GL_TEXTURE_MAX_CLAMP_R_SGIX\0"
+ "GL_TEXTURE_MAX_CLAMP_S_SGIX\0"
+ "GL_TEXTURE_MAX_CLAMP_T_SGIX\0"
+ "GL_TEXTURE_MAX_LEVEL\0"
+ "GL_TEXTURE_MAX_LOD\0"
+ "GL_TEXTURE_MIN_FILTER\0"
+ "GL_TEXTURE_MIN_LOD\0"
+ "GL_TEXTURE_PRIORITY\0"
+ "GL_TEXTURE_RANGE_LENGTH_APPLE\0"
+ "GL_TEXTURE_RANGE_POINTER_APPLE\0"
+ "GL_TEXTURE_RECTANGLE\0"
+ "GL_TEXTURE_RECTANGLE_ARB\0"
+ "GL_TEXTURE_RECTANGLE_NV\0"
+ "GL_TEXTURE_RED_SIZE\0"
+ "GL_TEXTURE_RED_SIZE_EXT\0"
+ "GL_TEXTURE_RESIDENT\0"
+ "GL_TEXTURE_SHARED_SIZE\0"
+ "GL_TEXTURE_STACK_DEPTH\0"
+ "GL_TEXTURE_STENCIL_SIZE\0"
+ "GL_TEXTURE_STENCIL_SIZE_EXT\0"
+ "GL_TEXTURE_STORAGE_HINT_APPLE\0"
+ "GL_TEXTURE_TOO_LARGE_EXT\0"
+ "GL_TEXTURE_UNSIGNED_REMAP_MODE_NV\0"
+ "GL_TEXTURE_WIDTH\0"
+ "GL_TEXTURE_WRAP_R\0"
+ "GL_TEXTURE_WRAP_R_OES\0"
+ "GL_TEXTURE_WRAP_S\0"
+ "GL_TEXTURE_WRAP_T\0"
+ "GL_TIMEOUT_EXPIRED\0"
+ "GL_TIME_ELAPSED_EXT\0"
+ "GL_TRACK_MATRIX_NV\0"
+ "GL_TRACK_MATRIX_TRANSFORM_NV\0"
+ "GL_TRANSFORM_BIT\0"
+ "GL_TRANSFORM_FEEDBACK\0"
+ "GL_TRANSFORM_FEEDBACK_BINDING\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_BINDING\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_MODE\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_SIZE\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_START\0"
+ "GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN\0"
+ "GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_VARYINGS\0"
+ "GL_TRANSFORM_FEEDBACK_VARYINGS_EXT\0"
+ "GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH\0"
+ "GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT\0"
+ "GL_TRANSPOSE_COLOR_MATRIX\0"
+ "GL_TRANSPOSE_COLOR_MATRIX_ARB\0"
+ "GL_TRANSPOSE_CURRENT_MATRIX_ARB\0"
+ "GL_TRANSPOSE_MODELVIEW_MATRIX\0"
+ "GL_TRANSPOSE_MODELVIEW_MATRIX_ARB\0"
+ "GL_TRANSPOSE_NV\0"
+ "GL_TRANSPOSE_PROJECTION_MATRIX\0"
+ "GL_TRANSPOSE_PROJECTION_MATRIX_ARB\0"
+ "GL_TRANSPOSE_TEXTURE_MATRIX\0"
+ "GL_TRANSPOSE_TEXTURE_MATRIX_ARB\0"
+ "GL_TRIANGLES\0"
+ "GL_TRIANGLES_ADJACENCY\0"
+ "GL_TRIANGLES_ADJACENCY_ARB\0"
+ "GL_TRIANGLE_FAN\0"
+ "GL_TRIANGLE_MESH_SUN\0"
+ "GL_TRIANGLE_STRIP\0"
+ "GL_TRIANGLE_STRIP_ADJACENCY\0"
+ "GL_TRIANGLE_STRIP_ADJACENCY_ARB\0"
+ "GL_TRUE\0"
+ "GL_UNDEFINED_APPLE\0"
+ "GL_UNPACK_ALIGNMENT\0"
+ "GL_UNPACK_IMAGE_HEIGHT\0"
+ "GL_UNPACK_LSB_FIRST\0"
+ "GL_UNPACK_ROW_LENGTH\0"
+ "GL_UNPACK_SKIP_IMAGES\0"
+ "GL_UNPACK_SKIP_PIXELS\0"
+ "GL_UNPACK_SKIP_ROWS\0"
+ "GL_UNPACK_SWAP_BYTES\0"
+ "GL_UNSIGNALED\0"
+ "GL_UNSIGNED_BYTE\0"
+ "GL_UNSIGNED_BYTE_2_3_3_REV\0"
+ "GL_UNSIGNED_BYTE_3_3_2\0"
+ "GL_UNSIGNED_INT\0"
+ "GL_UNSIGNED_INT_10F_11F_11F_REV\0"
+ "GL_UNSIGNED_INT_10_10_10_2\0"
+ "GL_UNSIGNED_INT_10_10_10_2_OES\0"
+ "GL_UNSIGNED_INT_24_8\0"
+ "GL_UNSIGNED_INT_24_8_EXT\0"
+ "GL_UNSIGNED_INT_24_8_NV\0"
+ "GL_UNSIGNED_INT_24_8_OES\0"
+ "GL_UNSIGNED_INT_2_10_10_10_REV\0"
+ "GL_UNSIGNED_INT_2_10_10_10_REV_EXT\0"
+ "GL_UNSIGNED_INT_5_9_9_9_REV\0"
+ "GL_UNSIGNED_INT_8_8_8_8\0"
+ "GL_UNSIGNED_INT_8_8_8_8_REV\0"
+ "GL_UNSIGNED_INT_SAMPLER_1D\0"
+ "GL_UNSIGNED_INT_SAMPLER_1D_ARRAY\0"
+ "GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_1D_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_2D\0"
+ "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY\0"
+ "GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_2D_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_2D_RECT\0"
+ "GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_3D\0"
+ "GL_UNSIGNED_INT_SAMPLER_3D_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_BUFFER\0"
+ "GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT\0"
+ "GL_UNSIGNED_INT_SAMPLER_CUBE\0"
+ "GL_UNSIGNED_INT_SAMPLER_CUBE_EXT\0"
+ "GL_UNSIGNED_INT_VEC2\0"
+ "GL_UNSIGNED_INT_VEC2_EXT\0"
+ "GL_UNSIGNED_INT_VEC3\0"
+ "GL_UNSIGNED_INT_VEC3_EXT\0"
+ "GL_UNSIGNED_INT_VEC4\0"
+ "GL_UNSIGNED_INT_VEC4_EXT\0"
+ "GL_UNSIGNED_NORMALIZED\0"
+ "GL_UNSIGNED_SHORT\0"
+ "GL_UNSIGNED_SHORT_1_5_5_5_REV\0"
+ "GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT\0"
+ "GL_UNSIGNED_SHORT_4_4_4_4\0"
+ "GL_UNSIGNED_SHORT_4_4_4_4_REV\0"
+ "GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT\0"
+ "GL_UNSIGNED_SHORT_5_5_5_1\0"
+ "GL_UNSIGNED_SHORT_5_6_5\0"
+ "GL_UNSIGNED_SHORT_5_6_5_REV\0"
+ "GL_UNSIGNED_SHORT_8_8_APPLE\0"
+ "GL_UNSIGNED_SHORT_8_8_MESA\0"
+ "GL_UNSIGNED_SHORT_8_8_REV_APPLE\0"
+ "GL_UNSIGNED_SHORT_8_8_REV_MESA\0"
+ "GL_UPPER_LEFT\0"
+ "GL_V2F\0"
+ "GL_V3F\0"
+ "GL_VALIDATE_STATUS\0"
+ "GL_VENDOR\0"
+ "GL_VERSION\0"
+ "GL_VERTEX_ARRAY\0"
+ "GL_VERTEX_ARRAY_BINDING\0"
+ "GL_VERTEX_ARRAY_BINDING_APPLE\0"
+ "GL_VERTEX_ARRAY_BUFFER_BINDING\0"
+ "GL_VERTEX_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_VERTEX_ARRAY_POINTER\0"
+ "GL_VERTEX_ARRAY_SIZE\0"
+ "GL_VERTEX_ARRAY_STRIDE\0"
+ "GL_VERTEX_ARRAY_TYPE\0"
+ "GL_VERTEX_ATTRIB_ARRAY0_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY10_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY11_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY12_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY13_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY14_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY15_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY1_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY2_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY3_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY4_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY5_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY6_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY7_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY8_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY9_NV\0"
+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\0"
+ "GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED\0"
+ "GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_INTEGER\0"
+ "GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT\0"
+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED\0"
+ "GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_POINTER\0"
+ "GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_SIZE\0"
+ "GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE\0"
+ "GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB\0"
+ "GL_VERTEX_ATTRIB_ARRAY_TYPE\0"
+ "GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB\0"
+ "GL_VERTEX_BLEND_ARB\0"
+ "GL_VERTEX_PROGRAM_ARB\0"
+ "GL_VERTEX_PROGRAM_BINDING_NV\0"
+ "GL_VERTEX_PROGRAM_NV\0"
+ "GL_VERTEX_PROGRAM_POINT_SIZE\0"
+ "GL_VERTEX_PROGRAM_POINT_SIZE_ARB\0"
+ "GL_VERTEX_PROGRAM_POINT_SIZE_NV\0"
+ "GL_VERTEX_PROGRAM_TWO_SIDE\0"
+ "GL_VERTEX_PROGRAM_TWO_SIDE_ARB\0"
+ "GL_VERTEX_PROGRAM_TWO_SIDE_NV\0"
+ "GL_VERTEX_SHADER\0"
+ "GL_VERTEX_SHADER_ARB\0"
+ "GL_VERTEX_STATE_PROGRAM_NV\0"
+ "GL_VIEWPORT\0"
+ "GL_VIEWPORT_BIT\0"
+ "GL_VOLATILE_APPLE\0"
+ "GL_WAIT_FAILED\0"
+ "GL_WEIGHT_ARRAY_ARB\0"
+ "GL_WEIGHT_ARRAY_BUFFER_BINDING\0"
+ "GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB\0"
+ "GL_WEIGHT_ARRAY_BUFFER_BINDING_OES\0"
+ "GL_WEIGHT_ARRAY_OES\0"
+ "GL_WEIGHT_ARRAY_POINTER_ARB\0"
+ "GL_WEIGHT_ARRAY_POINTER_OES\0"
+ "GL_WEIGHT_ARRAY_SIZE_ARB\0"
+ "GL_WEIGHT_ARRAY_SIZE_OES\0"
+ "GL_WEIGHT_ARRAY_STRIDE_ARB\0"
+ "GL_WEIGHT_ARRAY_STRIDE_OES\0"
+ "GL_WEIGHT_ARRAY_TYPE_ARB\0"
+ "GL_WEIGHT_ARRAY_TYPE_OES\0"
+ "GL_WEIGHT_SUM_UNITY_ARB\0"
+ "GL_WRAP_BORDER_SUN\0"
+ "GL_WRITE_ONLY\0"
+ "GL_WRITE_ONLY_ARB\0"
+ "GL_WRITE_ONLY_OES\0"
+ "GL_XOR\0"
+ "GL_YCBCR_422_APPLE\0"
+ "GL_YCBCR_MESA\0"
+ "GL_ZERO\0"
+ "GL_ZOOM_X\0"
+ "GL_ZOOM_Y\0"
+ ;
+
+static const enum_elt all_enums[2305] =
+{
+ { 0, 0x00000600 }, /* GL_2D */
+ { 6, 0x00001407 }, /* GL_2_BYTES */
+ { 17, 0x00000601 }, /* GL_3D */
+ { 23, 0x00000602 }, /* GL_3D_COLOR */
+ { 35, 0x00000603 }, /* GL_3D_COLOR_TEXTURE */
+ { 55, 0x00001408 }, /* GL_3_BYTES */
+ { 66, 0x00000604 }, /* GL_4D_COLOR_TEXTURE */
+ { 86, 0x00001409 }, /* GL_4_BYTES */
+ { 97, 0x00000100 }, /* GL_ACCUM */
+ { 106, 0x00000D5B }, /* GL_ACCUM_ALPHA_BITS */
+ { 126, 0x00000D5A }, /* GL_ACCUM_BLUE_BITS */
+ { 145, 0x00000200 }, /* GL_ACCUM_BUFFER_BIT */
+ { 165, 0x00000B80 }, /* GL_ACCUM_CLEAR_VALUE */
+ { 186, 0x00000D59 }, /* GL_ACCUM_GREEN_BITS */
+ { 206, 0x00000D58 }, /* GL_ACCUM_RED_BITS */
+ { 224, 0x00008B89 }, /* GL_ACTIVE_ATTRIBUTES */
+ { 245, 0x00008B8A }, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
+ { 276, 0x00008B8D }, /* GL_ACTIVE_PROGRAM_EXT */
+ { 298, 0x00008911 }, /* GL_ACTIVE_STENCIL_FACE_EXT */
+ { 325, 0x000084E0 }, /* GL_ACTIVE_TEXTURE */
+ { 343, 0x000084E0 }, /* GL_ACTIVE_TEXTURE_ARB */
+ { 365, 0x00008B86 }, /* GL_ACTIVE_UNIFORMS */
+ { 384, 0x00008B87 }, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
+ { 413, 0x000086A5 }, /* GL_ACTIVE_VERTEX_UNITS_ARB */
+ { 440, 0x00000104 }, /* GL_ADD */
+ { 447, 0x00008574 }, /* GL_ADD_SIGNED */
+ { 461, 0x00008574 }, /* GL_ADD_SIGNED_ARB */
+ { 479, 0x00008574 }, /* GL_ADD_SIGNED_EXT */
+ { 497, 0x0000846E }, /* GL_ALIASED_LINE_WIDTH_RANGE */
+ { 525, 0x0000846D }, /* GL_ALIASED_POINT_SIZE_RANGE */
+ { 553, 0x000FFFFF }, /* GL_ALL_ATTRIB_BITS */
+ { 572, 0xFFFFFFFF }, /* GL_ALL_CLIENT_ATTRIB_BITS */
+ { 598, 0x00001906 }, /* GL_ALPHA */
+ { 607, 0x0000803D }, /* GL_ALPHA12 */
+ { 618, 0x0000803D }, /* GL_ALPHA12_EXT */
+ { 633, 0x0000803E }, /* GL_ALPHA16 */
+ { 644, 0x00008D8A }, /* GL_ALPHA16I_EXT */
+ { 660, 0x00008D78 }, /* GL_ALPHA16UI_EXT */
+ { 677, 0x0000803E }, /* GL_ALPHA16_EXT */
+ { 692, 0x00008D84 }, /* GL_ALPHA32I_EXT */
+ { 708, 0x00008D72 }, /* GL_ALPHA32UI_EXT */
+ { 725, 0x0000803B }, /* GL_ALPHA4 */
+ { 735, 0x0000803B }, /* GL_ALPHA4_EXT */
+ { 749, 0x0000803C }, /* GL_ALPHA8 */
+ { 759, 0x00008D90 }, /* GL_ALPHA8I_EXT */
+ { 774, 0x00008D7E }, /* GL_ALPHA8UI_EXT */
+ { 790, 0x0000803C }, /* GL_ALPHA8_EXT */
+ { 804, 0x00000D1D }, /* GL_ALPHA_BIAS */
+ { 818, 0x00000D55 }, /* GL_ALPHA_BITS */
+ { 832, 0x00008D97 }, /* GL_ALPHA_INTEGER_EXT */
+ { 853, 0x00000D1C }, /* GL_ALPHA_SCALE */
+ { 868, 0x00000BC0 }, /* GL_ALPHA_TEST */
+ { 882, 0x00000BC1 }, /* GL_ALPHA_TEST_FUNC */
+ { 901, 0x00000BC2 }, /* GL_ALPHA_TEST_REF */
+ { 919, 0x0000911A }, /* GL_ALREADY_SIGNALED */
+ { 939, 0x00000207 }, /* GL_ALWAYS */
+ { 949, 0x00001200 }, /* GL_AMBIENT */
+ { 960, 0x00001602 }, /* GL_AMBIENT_AND_DIFFUSE */
+ { 983, 0x00001501 }, /* GL_AND */
+ { 990, 0x00001504 }, /* GL_AND_INVERTED */
+ { 1006, 0x00001502 }, /* GL_AND_REVERSE */
+ { 1021, 0x00008892 }, /* GL_ARRAY_BUFFER */
+ { 1037, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING */
+ { 1061, 0x00008894 }, /* GL_ARRAY_BUFFER_BINDING_ARB */
+ { 1089, 0x00008B85 }, /* GL_ATTACHED_SHADERS */
+ { 1109, 0x00008645 }, /* GL_ATTRIB_ARRAY_POINTER_NV */
+ { 1136, 0x00008623 }, /* GL_ATTRIB_ARRAY_SIZE_NV */
+ { 1160, 0x00008624 }, /* GL_ATTRIB_ARRAY_STRIDE_NV */
+ { 1186, 0x00008625 }, /* GL_ATTRIB_ARRAY_TYPE_NV */
+ { 1210, 0x00000BB0 }, /* GL_ATTRIB_STACK_DEPTH */
+ { 1232, 0x00000D80 }, /* GL_AUTO_NORMAL */
+ { 1247, 0x00000409 }, /* GL_AUX0 */
+ { 1255, 0x0000040A }, /* GL_AUX1 */
+ { 1263, 0x0000040B }, /* GL_AUX2 */
+ { 1271, 0x0000040C }, /* GL_AUX3 */
+ { 1279, 0x00000C00 }, /* GL_AUX_BUFFERS */
+ { 1294, 0x00000405 }, /* GL_BACK */
+ { 1302, 0x00000402 }, /* GL_BACK_LEFT */
+ { 1315, 0x00000403 }, /* GL_BACK_RIGHT */
+ { 1329, 0x000080E0 }, /* GL_BGR */
+ { 1336, 0x000080E1 }, /* GL_BGRA */
+ { 1344, 0x000080E1 }, /* GL_BGRA_EXT */
+ { 1356, 0x00008D9B }, /* GL_BGRA_INTEGER */
+ { 1372, 0x00008D9B }, /* GL_BGRA_INTEGER_EXT */
+ { 1392, 0x00008D9A }, /* GL_BGR_INTEGER */
+ { 1407, 0x00008D9A }, /* GL_BGR_INTEGER_EXT */
+ { 1426, 0x00001A00 }, /* GL_BITMAP */
+ { 1436, 0x00000704 }, /* GL_BITMAP_TOKEN */
+ { 1452, 0x00000BE2 }, /* GL_BLEND */
+ { 1461, 0x00008005 }, /* GL_BLEND_COLOR */
+ { 1476, 0x00008005 }, /* GL_BLEND_COLOR_EXT */
+ { 1495, 0x00000BE0 }, /* GL_BLEND_DST */
+ { 1508, 0x000080CA }, /* GL_BLEND_DST_ALPHA */
+ { 1527, 0x000080CA }, /* GL_BLEND_DST_ALPHA_OES */
+ { 1550, 0x000080C8 }, /* GL_BLEND_DST_RGB */
+ { 1567, 0x000080C8 }, /* GL_BLEND_DST_RGB_OES */
+ { 1588, 0x00008009 }, /* GL_BLEND_EQUATION */
+ { 1606, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA */
+ { 1630, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_EXT */
+ { 1658, 0x0000883D }, /* GL_BLEND_EQUATION_ALPHA_OES */
+ { 1686, 0x00008009 }, /* GL_BLEND_EQUATION_EXT */
+ { 1708, 0x00008009 }, /* GL_BLEND_EQUATION_OES */
+ { 1730, 0x00008009 }, /* GL_BLEND_EQUATION_RGB */
+ { 1752, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_EXT */
+ { 1778, 0x00008009 }, /* GL_BLEND_EQUATION_RGB_OES */
+ { 1804, 0x00000BE1 }, /* GL_BLEND_SRC */
+ { 1817, 0x000080CB }, /* GL_BLEND_SRC_ALPHA */
+ { 1836, 0x000080CB }, /* GL_BLEND_SRC_ALPHA_OES */
+ { 1859, 0x000080C9 }, /* GL_BLEND_SRC_RGB */
+ { 1876, 0x000080C9 }, /* GL_BLEND_SRC_RGB_OES */
+ { 1897, 0x00001905 }, /* GL_BLUE */
+ { 1905, 0x00000D1B }, /* GL_BLUE_BIAS */
+ { 1918, 0x00000D54 }, /* GL_BLUE_BITS */
+ { 1931, 0x00008D96 }, /* GL_BLUE_INTEGER */
+ { 1947, 0x00008D96 }, /* GL_BLUE_INTEGER_EXT */
+ { 1967, 0x00000D1A }, /* GL_BLUE_SCALE */
+ { 1981, 0x00008B56 }, /* GL_BOOL */
+ { 1989, 0x00008B56 }, /* GL_BOOL_ARB */
+ { 2001, 0x00008B57 }, /* GL_BOOL_VEC2 */
+ { 2014, 0x00008B57 }, /* GL_BOOL_VEC2_ARB */
+ { 2031, 0x00008B58 }, /* GL_BOOL_VEC3 */
+ { 2044, 0x00008B58 }, /* GL_BOOL_VEC3_ARB */
+ { 2061, 0x00008B59 }, /* GL_BOOL_VEC4 */
+ { 2074, 0x00008B59 }, /* GL_BOOL_VEC4_ARB */
+ { 2091, 0x000088BB }, /* GL_BUFFER_ACCESS */
+ { 2108, 0x000088BB }, /* GL_BUFFER_ACCESS_ARB */
+ { 2129, 0x0000911F }, /* GL_BUFFER_ACCESS_FLAGS */
+ { 2152, 0x000088BB }, /* GL_BUFFER_ACCESS_OES */
+ { 2173, 0x00008A13 }, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
+ { 2204, 0x000088BC }, /* GL_BUFFER_MAPPED */
+ { 2221, 0x000088BC }, /* GL_BUFFER_MAPPED_ARB */
+ { 2242, 0x000088BC }, /* GL_BUFFER_MAPPED_OES */
+ { 2263, 0x00009120 }, /* GL_BUFFER_MAP_LENGTH */
+ { 2284, 0x00009121 }, /* GL_BUFFER_MAP_OFFSET */
+ { 2305, 0x000088BD }, /* GL_BUFFER_MAP_POINTER */
+ { 2327, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_ARB */
+ { 2353, 0x000088BD }, /* GL_BUFFER_MAP_POINTER_OES */
+ { 2379, 0x000085B3 }, /* GL_BUFFER_OBJECT_APPLE */
+ { 2402, 0x00008A12 }, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
+ { 2436, 0x00008764 }, /* GL_BUFFER_SIZE */
+ { 2451, 0x00008764 }, /* GL_BUFFER_SIZE_ARB */
+ { 2470, 0x00008765 }, /* GL_BUFFER_USAGE */
+ { 2486, 0x00008765 }, /* GL_BUFFER_USAGE_ARB */
+ { 2506, 0x0000877B }, /* GL_BUMP_ENVMAP_ATI */
+ { 2525, 0x00008777 }, /* GL_BUMP_NUM_TEX_UNITS_ATI */
+ { 2551, 0x00008775 }, /* GL_BUMP_ROT_MATRIX_ATI */
+ { 2574, 0x00008776 }, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
+ { 2602, 0x0000877C }, /* GL_BUMP_TARGET_ATI */
+ { 2621, 0x00008778 }, /* GL_BUMP_TEX_UNITS_ATI */
+ { 2643, 0x00001400 }, /* GL_BYTE */
+ { 2651, 0x00002A24 }, /* GL_C3F_V3F */
+ { 2662, 0x00002A26 }, /* GL_C4F_N3F_V3F */
+ { 2677, 0x00002A22 }, /* GL_C4UB_V2F */
+ { 2689, 0x00002A23 }, /* GL_C4UB_V3F */
+ { 2701, 0x00000901 }, /* GL_CCW */
+ { 2708, 0x00002900 }, /* GL_CLAMP */
+ { 2717, 0x0000891B }, /* GL_CLAMP_FRAGMENT_COLOR_ARB */
+ { 2745, 0x0000891C }, /* GL_CLAMP_READ_COLOR */
+ { 2765, 0x0000891C }, /* GL_CLAMP_READ_COLOR_ARB */
+ { 2789, 0x0000812D }, /* GL_CLAMP_TO_BORDER */
+ { 2808, 0x0000812D }, /* GL_CLAMP_TO_BORDER_ARB */
+ { 2831, 0x0000812D }, /* GL_CLAMP_TO_BORDER_SGIS */
+ { 2855, 0x0000812F }, /* GL_CLAMP_TO_EDGE */
+ { 2872, 0x0000812F }, /* GL_CLAMP_TO_EDGE_SGIS */
+ { 2894, 0x0000891A }, /* GL_CLAMP_VERTEX_COLOR_ARB */
+ { 2920, 0x00001500 }, /* GL_CLEAR */
+ { 2929, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE */
+ { 2954, 0x000084E1 }, /* GL_CLIENT_ACTIVE_TEXTURE_ARB */
+ { 2983, 0xFFFFFFFF }, /* GL_CLIENT_ALL_ATTRIB_BITS */
+ { 3009, 0x00000BB1 }, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+ { 3038, 0x00000001 }, /* GL_CLIENT_PIXEL_STORE_BIT */
+ { 3064, 0x00000002 }, /* GL_CLIENT_VERTEX_ARRAY_BIT */
+ { 3091, 0x00003000 }, /* GL_CLIP_DISTANCE0 */
+ { 3109, 0x00003001 }, /* GL_CLIP_DISTANCE1 */
+ { 3127, 0x00003002 }, /* GL_CLIP_DISTANCE2 */
+ { 3145, 0x00003003 }, /* GL_CLIP_DISTANCE3 */
+ { 3163, 0x00003004 }, /* GL_CLIP_DISTANCE4 */
+ { 3181, 0x00003005 }, /* GL_CLIP_DISTANCE5 */
+ { 3199, 0x00003006 }, /* GL_CLIP_DISTANCE6 */
+ { 3217, 0x00003007 }, /* GL_CLIP_DISTANCE7 */
+ { 3235, 0x00003000 }, /* GL_CLIP_PLANE0 */
+ { 3250, 0x00003001 }, /* GL_CLIP_PLANE1 */
+ { 3265, 0x00003002 }, /* GL_CLIP_PLANE2 */
+ { 3280, 0x00003003 }, /* GL_CLIP_PLANE3 */
+ { 3295, 0x00003004 }, /* GL_CLIP_PLANE4 */
+ { 3310, 0x00003005 }, /* GL_CLIP_PLANE5 */
+ { 3325, 0x000080F0 }, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+ { 3358, 0x00000A00 }, /* GL_COEFF */
+ { 3367, 0x00001800 }, /* GL_COLOR */
+ { 3376, 0x00008076 }, /* GL_COLOR_ARRAY */
+ { 3391, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+ { 3421, 0x00008898 }, /* GL_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 3455, 0x00008090 }, /* GL_COLOR_ARRAY_POINTER */
+ { 3478, 0x00008081 }, /* GL_COLOR_ARRAY_SIZE */
+ { 3498, 0x00008083 }, /* GL_COLOR_ARRAY_STRIDE */
+ { 3520, 0x00008082 }, /* GL_COLOR_ARRAY_TYPE */
+ { 3540, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0 */
+ { 3561, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_EXT */
+ { 3586, 0x00008CE0 }, /* GL_COLOR_ATTACHMENT0_OES */
+ { 3611, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1 */
+ { 3632, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10 */
+ { 3654, 0x00008CEA }, /* GL_COLOR_ATTACHMENT10_EXT */
+ { 3680, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11 */
+ { 3702, 0x00008CEB }, /* GL_COLOR_ATTACHMENT11_EXT */
+ { 3728, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12 */
+ { 3750, 0x00008CEC }, /* GL_COLOR_ATTACHMENT12_EXT */
+ { 3776, 0x00008CED }, /* GL_COLOR_ATTACHMENT13 */
+ { 3798, 0x00008CED }, /* GL_COLOR_ATTACHMENT13_EXT */
+ { 3824, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14 */
+ { 3846, 0x00008CEE }, /* GL_COLOR_ATTACHMENT14_EXT */
+ { 3872, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15 */
+ { 3894, 0x00008CEF }, /* GL_COLOR_ATTACHMENT15_EXT */
+ { 3920, 0x00008CE1 }, /* GL_COLOR_ATTACHMENT1_EXT */
+ { 3945, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2 */
+ { 3966, 0x00008CE2 }, /* GL_COLOR_ATTACHMENT2_EXT */
+ { 3991, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3 */
+ { 4012, 0x00008CE3 }, /* GL_COLOR_ATTACHMENT3_EXT */
+ { 4037, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4 */
+ { 4058, 0x00008CE4 }, /* GL_COLOR_ATTACHMENT4_EXT */
+ { 4083, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5 */
+ { 4104, 0x00008CE5 }, /* GL_COLOR_ATTACHMENT5_EXT */
+ { 4129, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6 */
+ { 4150, 0x00008CE6 }, /* GL_COLOR_ATTACHMENT6_EXT */
+ { 4175, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7 */
+ { 4196, 0x00008CE7 }, /* GL_COLOR_ATTACHMENT7_EXT */
+ { 4221, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8 */
+ { 4242, 0x00008CE8 }, /* GL_COLOR_ATTACHMENT8_EXT */
+ { 4267, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9 */
+ { 4288, 0x00008CE9 }, /* GL_COLOR_ATTACHMENT9_EXT */
+ { 4313, 0x00004000 }, /* GL_COLOR_BUFFER_BIT */
+ { 4333, 0x00000C22 }, /* GL_COLOR_CLEAR_VALUE */
+ { 4354, 0x00001900 }, /* GL_COLOR_INDEX */
+ { 4369, 0x00001603 }, /* GL_COLOR_INDEXES */
+ { 4386, 0x00000BF2 }, /* GL_COLOR_LOGIC_OP */
+ { 4404, 0x00000B57 }, /* GL_COLOR_MATERIAL */
+ { 4422, 0x00000B55 }, /* GL_COLOR_MATERIAL_FACE */
+ { 4445, 0x00000B56 }, /* GL_COLOR_MATERIAL_PARAMETER */
+ { 4473, 0x000080B1 }, /* GL_COLOR_MATRIX */
+ { 4489, 0x000080B1 }, /* GL_COLOR_MATRIX_SGI */
+ { 4509, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH */
+ { 4537, 0x000080B2 }, /* GL_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 4569, 0x00008458 }, /* GL_COLOR_SUM */
+ { 4582, 0x00008458 }, /* GL_COLOR_SUM_ARB */
+ { 4599, 0x000080D0 }, /* GL_COLOR_TABLE */
+ { 4614, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE */
+ { 4640, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_EXT */
+ { 4670, 0x000080DD }, /* GL_COLOR_TABLE_ALPHA_SIZE_SGI */
+ { 4700, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS */
+ { 4720, 0x000080D7 }, /* GL_COLOR_TABLE_BIAS_SGI */
+ { 4744, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE */
+ { 4769, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_EXT */
+ { 4798, 0x000080DC }, /* GL_COLOR_TABLE_BLUE_SIZE_SGI */
+ { 4827, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT */
+ { 4849, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_EXT */
+ { 4875, 0x000080D8 }, /* GL_COLOR_TABLE_FORMAT_SGI */
+ { 4901, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE */
+ { 4927, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_EXT */
+ { 4957, 0x000080DB }, /* GL_COLOR_TABLE_GREEN_SIZE_SGI */
+ { 4987, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+ { 5017, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_EXT */
+ { 5051, 0x000080DF }, /* GL_COLOR_TABLE_INTENSITY_SIZE_SGI */
+ { 5085, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+ { 5115, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_EXT */
+ { 5149, 0x000080DE }, /* GL_COLOR_TABLE_LUMINANCE_SIZE_SGI */
+ { 5183, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE */
+ { 5207, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_EXT */
+ { 5235, 0x000080DA }, /* GL_COLOR_TABLE_RED_SIZE_SGI */
+ { 5263, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE */
+ { 5284, 0x000080D6 }, /* GL_COLOR_TABLE_SCALE_SGI */
+ { 5309, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH */
+ { 5330, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_EXT */
+ { 5355, 0x000080D9 }, /* GL_COLOR_TABLE_WIDTH_SGI */
+ { 5380, 0x00000C23 }, /* GL_COLOR_WRITEMASK */
+ { 5399, 0x00008570 }, /* GL_COMBINE */
+ { 5410, 0x00008503 }, /* GL_COMBINE4 */
+ { 5422, 0x00008572 }, /* GL_COMBINE_ALPHA */
+ { 5439, 0x00008572 }, /* GL_COMBINE_ALPHA_ARB */
+ { 5460, 0x00008572 }, /* GL_COMBINE_ALPHA_EXT */
+ { 5481, 0x00008570 }, /* GL_COMBINE_ARB */
+ { 5496, 0x00008570 }, /* GL_COMBINE_EXT */
+ { 5511, 0x00008571 }, /* GL_COMBINE_RGB */
+ { 5526, 0x00008571 }, /* GL_COMBINE_RGB_ARB */
+ { 5545, 0x00008571 }, /* GL_COMBINE_RGB_EXT */
+ { 5564, 0x0000884E }, /* GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT */
+ { 5600, 0x0000884E }, /* GL_COMPARE_REF_TO_TEXTURE */
+ { 5626, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE */
+ { 5650, 0x0000884E }, /* GL_COMPARE_R_TO_TEXTURE_ARB */
+ { 5678, 0x00001300 }, /* GL_COMPILE */
+ { 5689, 0x00001301 }, /* GL_COMPILE_AND_EXECUTE */
+ { 5712, 0x00008B81 }, /* GL_COMPILE_STATUS */
+ { 5730, 0x000084E9 }, /* GL_COMPRESSED_ALPHA */
+ { 5750, 0x000084E9 }, /* GL_COMPRESSED_ALPHA_ARB */
+ { 5774, 0x000084EC }, /* GL_COMPRESSED_INTENSITY */
+ { 5798, 0x000084EC }, /* GL_COMPRESSED_INTENSITY_ARB */
+ { 5826, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE */
+ { 5850, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+ { 5880, 0x000084EB }, /* GL_COMPRESSED_LUMINANCE_ALPHA_ARB */
+ { 5914, 0x000084EA }, /* GL_COMPRESSED_LUMINANCE_ARB */
+ { 5942, 0x00008225 }, /* GL_COMPRESSED_RED */
+ { 5960, 0x00008226 }, /* GL_COMPRESSED_RG */
+ { 5977, 0x000084ED }, /* GL_COMPRESSED_RGB */
+ { 5995, 0x000084EE }, /* GL_COMPRESSED_RGBA */
+ { 6014, 0x000084EE }, /* GL_COMPRESSED_RGBA_ARB */
+ { 6037, 0x000086B1 }, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+ { 6066, 0x000083F1 }, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+ { 6099, 0x000083F2 }, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+ { 6132, 0x000083F3 }, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+ { 6165, 0x000084ED }, /* GL_COMPRESSED_RGB_ARB */
+ { 6187, 0x000086B0 }, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+ { 6215, 0x000083F0 }, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+ { 6247, 0x00008C4A }, /* GL_COMPRESSED_SLUMINANCE */
+ { 6272, 0x00008C4B }, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
+ { 6303, 0x00008C48 }, /* GL_COMPRESSED_SRGB */
+ { 6322, 0x00008C49 }, /* GL_COMPRESSED_SRGB_ALPHA */
+ { 6347, 0x000086A3 }, /* GL_COMPRESSED_TEXTURE_FORMATS */
+ { 6377, 0x0000911C }, /* GL_CONDITION_SATISFIED */
+ { 6400, 0x00008576 }, /* GL_CONSTANT */
+ { 6412, 0x00008003 }, /* GL_CONSTANT_ALPHA */
+ { 6430, 0x00008003 }, /* GL_CONSTANT_ALPHA_EXT */
+ { 6452, 0x00008576 }, /* GL_CONSTANT_ARB */
+ { 6468, 0x00001207 }, /* GL_CONSTANT_ATTENUATION */
+ { 6492, 0x00008151 }, /* GL_CONSTANT_BORDER_HP */
+ { 6514, 0x00008001 }, /* GL_CONSTANT_COLOR */
+ { 6532, 0x00008001 }, /* GL_CONSTANT_COLOR_EXT */
+ { 6554, 0x00008576 }, /* GL_CONSTANT_EXT */
+ { 6570, 0x00000002 }, /* GL_CONTEXT_COMPATIBILITY_PROFILE_BIT */
+ { 6607, 0x00000001 }, /* GL_CONTEXT_CORE_PROFILE_BIT */
+ { 6635, 0x0000821E }, /* GL_CONTEXT_FLAGS */
+ { 6652, 0x00000001 }, /* GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT */
+ { 6691, 0x00009126 }, /* GL_CONTEXT_PROFILE_MASK */
+ { 6715, 0x00008010 }, /* GL_CONVOLUTION_1D */
+ { 6733, 0x00008011 }, /* GL_CONVOLUTION_2D */
+ { 6751, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR */
+ { 6779, 0x00008154 }, /* GL_CONVOLUTION_BORDER_COLOR_HP */
+ { 6810, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE */
+ { 6837, 0x00008013 }, /* GL_CONVOLUTION_BORDER_MODE_EXT */
+ { 6868, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS */
+ { 6895, 0x00008015 }, /* GL_CONVOLUTION_FILTER_BIAS_EXT */
+ { 6926, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE */
+ { 6954, 0x00008014 }, /* GL_CONVOLUTION_FILTER_SCALE_EXT */
+ { 6986, 0x00008017 }, /* GL_CONVOLUTION_FORMAT */
+ { 7008, 0x00008017 }, /* GL_CONVOLUTION_FORMAT_EXT */
+ { 7034, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT */
+ { 7056, 0x00008019 }, /* GL_CONVOLUTION_HEIGHT_EXT */
+ { 7082, 0x00008018 }, /* GL_CONVOLUTION_WIDTH */
+ { 7103, 0x00008018 }, /* GL_CONVOLUTION_WIDTH_EXT */
+ { 7128, 0x00008862 }, /* GL_COORD_REPLACE */
+ { 7145, 0x00008862 }, /* GL_COORD_REPLACE_ARB */
+ { 7166, 0x00008862 }, /* GL_COORD_REPLACE_NV */
+ { 7186, 0x00008862 }, /* GL_COORD_REPLACE_OES */
+ { 7207, 0x00001503 }, /* GL_COPY */
+ { 7215, 0x0000150C }, /* GL_COPY_INVERTED */
+ { 7232, 0x00000706 }, /* GL_COPY_PIXEL_TOKEN */
+ { 7252, 0x00008F36 }, /* GL_COPY_READ_BUFFER */
+ { 7272, 0x00008F37 }, /* GL_COPY_WRITE_BUFFER */
+ { 7293, 0x00000B44 }, /* GL_CULL_FACE */
+ { 7306, 0x00000B45 }, /* GL_CULL_FACE_MODE */
+ { 7324, 0x000081AA }, /* GL_CULL_VERTEX_EXT */
+ { 7343, 0x000081AC }, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+ { 7375, 0x000081AB }, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+ { 7410, 0x00008626 }, /* GL_CURRENT_ATTRIB_NV */
+ { 7431, 0x00000001 }, /* GL_CURRENT_BIT */
+ { 7446, 0x00000B00 }, /* GL_CURRENT_COLOR */
+ { 7463, 0x00008453 }, /* GL_CURRENT_FOG_COORD */
+ { 7484, 0x00008453 }, /* GL_CURRENT_FOG_COORDINATE */
+ { 7510, 0x00000B01 }, /* GL_CURRENT_INDEX */
+ { 7527, 0x00008641 }, /* GL_CURRENT_MATRIX_ARB */
+ { 7549, 0x00008845 }, /* GL_CURRENT_MATRIX_INDEX_ARB */
+ { 7577, 0x00008641 }, /* GL_CURRENT_MATRIX_NV */
+ { 7598, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+ { 7632, 0x00008640 }, /* GL_CURRENT_MATRIX_STACK_DEPTH_NV */
+ { 7665, 0x00000B02 }, /* GL_CURRENT_NORMAL */
+ { 7683, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+ { 7713, 0x00008843 }, /* GL_CURRENT_PALETTE_MATRIX_OES */
+ { 7743, 0x00008B8D }, /* GL_CURRENT_PROGRAM */
+ { 7762, 0x00008865 }, /* GL_CURRENT_QUERY */
+ { 7779, 0x00008865 }, /* GL_CURRENT_QUERY_ARB */
+ { 7800, 0x00000B04 }, /* GL_CURRENT_RASTER_COLOR */
+ { 7824, 0x00000B09 }, /* GL_CURRENT_RASTER_DISTANCE */
+ { 7851, 0x00000B05 }, /* GL_CURRENT_RASTER_INDEX */
+ { 7875, 0x00000B07 }, /* GL_CURRENT_RASTER_POSITION */
+ { 7902, 0x00000B08 }, /* GL_CURRENT_RASTER_POSITION_VALID */
+ { 7935, 0x0000845F }, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
+ { 7969, 0x00000B06 }, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+ { 8002, 0x00008459 }, /* GL_CURRENT_SECONDARY_COLOR */
+ { 8029, 0x00000B03 }, /* GL_CURRENT_TEXTURE_COORDS */
+ { 8055, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB */
+ { 8080, 0x00008626 }, /* GL_CURRENT_VERTEX_ATTRIB_ARB */
+ { 8109, 0x000086A8 }, /* GL_CURRENT_WEIGHT_ARB */
+ { 8131, 0x00000900 }, /* GL_CW */
+ { 8137, 0x0000875B }, /* GL_DEBUG_ASSERT_MESA */
+ { 8158, 0x00008759 }, /* GL_DEBUG_OBJECT_MESA */
+ { 8179, 0x0000875A }, /* GL_DEBUG_PRINT_MESA */
+ { 8199, 0x00002101 }, /* GL_DECAL */
+ { 8208, 0x00001E03 }, /* GL_DECR */
+ { 8216, 0x00008508 }, /* GL_DECR_WRAP */
+ { 8229, 0x00008508 }, /* GL_DECR_WRAP_EXT */
+ { 8246, 0x00008B80 }, /* GL_DELETE_STATUS */
+ { 8263, 0x00001801 }, /* GL_DEPTH */
+ { 8272, 0x000088F0 }, /* GL_DEPTH24_STENCIL8 */
+ { 8292, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_EXT */
+ { 8316, 0x000088F0 }, /* GL_DEPTH24_STENCIL8_OES */
+ { 8340, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT */
+ { 8360, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_EXT */
+ { 8384, 0x00008D00 }, /* GL_DEPTH_ATTACHMENT_OES */
+ { 8408, 0x00000D1F }, /* GL_DEPTH_BIAS */
+ { 8422, 0x00000D56 }, /* GL_DEPTH_BITS */
+ { 8436, 0x00008891 }, /* GL_DEPTH_BOUNDS_EXT */
+ { 8456, 0x00008890 }, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ { 8481, 0x00008223 }, /* GL_DEPTH_BUFFER */
+ { 8497, 0x00000100 }, /* GL_DEPTH_BUFFER_BIT */
+ { 8517, 0x0000864F }, /* GL_DEPTH_CLAMP */
+ { 8532, 0x0000864F }, /* GL_DEPTH_CLAMP_NV */
+ { 8550, 0x00000B73 }, /* GL_DEPTH_CLEAR_VALUE */
+ { 8571, 0x00001902 }, /* GL_DEPTH_COMPONENT */
+ { 8590, 0x000081A5 }, /* GL_DEPTH_COMPONENT16 */
+ { 8611, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_ARB */
+ { 8636, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_OES */
+ { 8661, 0x000081A5 }, /* GL_DEPTH_COMPONENT16_SGIX */
+ { 8687, 0x000081A6 }, /* GL_DEPTH_COMPONENT24 */
+ { 8708, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_ARB */
+ { 8733, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_OES */
+ { 8758, 0x000081A6 }, /* GL_DEPTH_COMPONENT24_SGIX */
+ { 8784, 0x000081A7 }, /* GL_DEPTH_COMPONENT32 */
+ { 8805, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_ARB */
+ { 8830, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_OES */
+ { 8855, 0x000081A7 }, /* GL_DEPTH_COMPONENT32_SGIX */
+ { 8881, 0x00000B74 }, /* GL_DEPTH_FUNC */
+ { 8895, 0x00000B70 }, /* GL_DEPTH_RANGE */
+ { 8910, 0x00000D1E }, /* GL_DEPTH_SCALE */
+ { 8925, 0x000084F9 }, /* GL_DEPTH_STENCIL */
+ { 8942, 0x0000821A }, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ { 8970, 0x000084F9 }, /* GL_DEPTH_STENCIL_EXT */
+ { 8991, 0x000084F9 }, /* GL_DEPTH_STENCIL_NV */
+ { 9011, 0x000084F9 }, /* GL_DEPTH_STENCIL_OES */
+ { 9032, 0x0000886F }, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ { 9060, 0x0000886E }, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ { 9088, 0x00000B71 }, /* GL_DEPTH_TEST */
+ { 9102, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE */
+ { 9124, 0x0000884B }, /* GL_DEPTH_TEXTURE_MODE_ARB */
+ { 9150, 0x00000B72 }, /* GL_DEPTH_WRITEMASK */
+ { 9169, 0x00001201 }, /* GL_DIFFUSE */
+ { 9180, 0x00000BD0 }, /* GL_DITHER */
+ { 9190, 0x00000A02 }, /* GL_DOMAIN */
+ { 9200, 0x00001100 }, /* GL_DONT_CARE */
+ { 9213, 0x000086AE }, /* GL_DOT3_RGB */
+ { 9225, 0x000086AF }, /* GL_DOT3_RGBA */
+ { 9238, 0x000086AF }, /* GL_DOT3_RGBA_ARB */
+ { 9255, 0x00008741 }, /* GL_DOT3_RGBA_EXT */
+ { 9272, 0x000086AE }, /* GL_DOT3_RGB_ARB */
+ { 9288, 0x00008740 }, /* GL_DOT3_RGB_EXT */
+ { 9304, 0x0000140A }, /* GL_DOUBLE */
+ { 9314, 0x00000C32 }, /* GL_DOUBLEBUFFER */
+ { 9330, 0x00000C01 }, /* GL_DRAW_BUFFER */
+ { 9345, 0x00008825 }, /* GL_DRAW_BUFFER0 */
+ { 9361, 0x00008825 }, /* GL_DRAW_BUFFER0_ARB */
+ { 9381, 0x00008825 }, /* GL_DRAW_BUFFER0_ATI */
+ { 9401, 0x00008826 }, /* GL_DRAW_BUFFER1 */
+ { 9417, 0x0000882F }, /* GL_DRAW_BUFFER10 */
+ { 9434, 0x0000882F }, /* GL_DRAW_BUFFER10_ARB */
+ { 9455, 0x0000882F }, /* GL_DRAW_BUFFER10_ATI */
+ { 9476, 0x00008830 }, /* GL_DRAW_BUFFER11 */
+ { 9493, 0x00008830 }, /* GL_DRAW_BUFFER11_ARB */
+ { 9514, 0x00008830 }, /* GL_DRAW_BUFFER11_ATI */
+ { 9535, 0x00008831 }, /* GL_DRAW_BUFFER12 */
+ { 9552, 0x00008831 }, /* GL_DRAW_BUFFER12_ARB */
+ { 9573, 0x00008831 }, /* GL_DRAW_BUFFER12_ATI */
+ { 9594, 0x00008832 }, /* GL_DRAW_BUFFER13 */
+ { 9611, 0x00008832 }, /* GL_DRAW_BUFFER13_ARB */
+ { 9632, 0x00008832 }, /* GL_DRAW_BUFFER13_ATI */
+ { 9653, 0x00008833 }, /* GL_DRAW_BUFFER14 */
+ { 9670, 0x00008833 }, /* GL_DRAW_BUFFER14_ARB */
+ { 9691, 0x00008833 }, /* GL_DRAW_BUFFER14_ATI */
+ { 9712, 0x00008834 }, /* GL_DRAW_BUFFER15 */
+ { 9729, 0x00008834 }, /* GL_DRAW_BUFFER15_ARB */
+ { 9750, 0x00008834 }, /* GL_DRAW_BUFFER15_ATI */
+ { 9771, 0x00008826 }, /* GL_DRAW_BUFFER1_ARB */
+ { 9791, 0x00008826 }, /* GL_DRAW_BUFFER1_ATI */
+ { 9811, 0x00008827 }, /* GL_DRAW_BUFFER2 */
+ { 9827, 0x00008827 }, /* GL_DRAW_BUFFER2_ARB */
+ { 9847, 0x00008827 }, /* GL_DRAW_BUFFER2_ATI */
+ { 9867, 0x00008828 }, /* GL_DRAW_BUFFER3 */
+ { 9883, 0x00008828 }, /* GL_DRAW_BUFFER3_ARB */
+ { 9903, 0x00008828 }, /* GL_DRAW_BUFFER3_ATI */
+ { 9923, 0x00008829 }, /* GL_DRAW_BUFFER4 */
+ { 9939, 0x00008829 }, /* GL_DRAW_BUFFER4_ARB */
+ { 9959, 0x00008829 }, /* GL_DRAW_BUFFER4_ATI */
+ { 9979, 0x0000882A }, /* GL_DRAW_BUFFER5 */
+ { 9995, 0x0000882A }, /* GL_DRAW_BUFFER5_ARB */
+ { 10015, 0x0000882A }, /* GL_DRAW_BUFFER5_ATI */
+ { 10035, 0x0000882B }, /* GL_DRAW_BUFFER6 */
+ { 10051, 0x0000882B }, /* GL_DRAW_BUFFER6_ARB */
+ { 10071, 0x0000882B }, /* GL_DRAW_BUFFER6_ATI */
+ { 10091, 0x0000882C }, /* GL_DRAW_BUFFER7 */
+ { 10107, 0x0000882C }, /* GL_DRAW_BUFFER7_ARB */
+ { 10127, 0x0000882C }, /* GL_DRAW_BUFFER7_ATI */
+ { 10147, 0x0000882D }, /* GL_DRAW_BUFFER8 */
+ { 10163, 0x0000882D }, /* GL_DRAW_BUFFER8_ARB */
+ { 10183, 0x0000882D }, /* GL_DRAW_BUFFER8_ATI */
+ { 10203, 0x0000882E }, /* GL_DRAW_BUFFER9 */
+ { 10219, 0x0000882E }, /* GL_DRAW_BUFFER9_ARB */
+ { 10239, 0x0000882E }, /* GL_DRAW_BUFFER9_ATI */
+ { 10259, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER */
+ { 10279, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ { 10307, 0x00008CA6 }, /* GL_DRAW_FRAMEBUFFER_BINDING_EXT */
+ { 10339, 0x00008CA9 }, /* GL_DRAW_FRAMEBUFFER_EXT */
+ { 10363, 0x00000705 }, /* GL_DRAW_PIXEL_TOKEN */
+ { 10383, 0x00000304 }, /* GL_DST_ALPHA */
+ { 10396, 0x00000306 }, /* GL_DST_COLOR */
+ { 10409, 0x0000877A }, /* GL_DU8DV8_ATI */
+ { 10423, 0x00008779 }, /* GL_DUDV_ATI */
+ { 10435, 0x000088EA }, /* GL_DYNAMIC_COPY */
+ { 10451, 0x000088EA }, /* GL_DYNAMIC_COPY_ARB */
+ { 10471, 0x000088E8 }, /* GL_DYNAMIC_DRAW */
+ { 10487, 0x000088E8 }, /* GL_DYNAMIC_DRAW_ARB */
+ { 10507, 0x000088E9 }, /* GL_DYNAMIC_READ */
+ { 10523, 0x000088E9 }, /* GL_DYNAMIC_READ_ARB */
+ { 10543, 0x00000B43 }, /* GL_EDGE_FLAG */
+ { 10556, 0x00008079 }, /* GL_EDGE_FLAG_ARRAY */
+ { 10575, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ { 10609, 0x0000889B }, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB */
+ { 10647, 0x00008093 }, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ { 10674, 0x0000808C }, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ { 10700, 0x00008893 }, /* GL_ELEMENT_ARRAY_BUFFER */
+ { 10724, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ { 10756, 0x00008895 }, /* GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB */
+ { 10792, 0x00001600 }, /* GL_EMISSION */
+ { 10804, 0x00002000 }, /* GL_ENABLE_BIT */
+ { 10818, 0x00000202 }, /* GL_EQUAL */
+ { 10827, 0x00001509 }, /* GL_EQUIV */
+ { 10836, 0x00010000 }, /* GL_EVAL_BIT */
+ { 10848, 0x00000800 }, /* GL_EXP */
+ { 10855, 0x00000801 }, /* GL_EXP2 */
+ { 10863, 0x00001F03 }, /* GL_EXTENSIONS */
+ { 10877, 0x00002400 }, /* GL_EYE_LINEAR */
+ { 10891, 0x00002502 }, /* GL_EYE_PLANE */
+ { 10904, 0x0000855C }, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ { 10929, 0x0000855B }, /* GL_EYE_RADIAL_NV */
+ { 10946, 0x00000000 }, /* GL_FALSE */
+ { 10955, 0x00001101 }, /* GL_FASTEST */
+ { 10966, 0x00001C01 }, /* GL_FEEDBACK */
+ { 10978, 0x00000DF0 }, /* GL_FEEDBACK_BUFFER_POINTER */
+ { 11005, 0x00000DF1 }, /* GL_FEEDBACK_BUFFER_SIZE */
+ { 11029, 0x00000DF2 }, /* GL_FEEDBACK_BUFFER_TYPE */
+ { 11053, 0x00001B02 }, /* GL_FILL */
+ { 11061, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION */
+ { 11088, 0x00008E4D }, /* GL_FIRST_VERTEX_CONVENTION_EXT */
+ { 11119, 0x0000140C }, /* GL_FIXED */
+ { 11128, 0x0000140C }, /* GL_FIXED_OES */
+ { 11141, 0x0000891D }, /* GL_FIXED_ONLY */
+ { 11155, 0x0000891D }, /* GL_FIXED_ONLY_ARB */
+ { 11173, 0x00001D00 }, /* GL_FLAT */
+ { 11181, 0x00001406 }, /* GL_FLOAT */
+ { 11190, 0x00008B5A }, /* GL_FLOAT_MAT2 */
+ { 11204, 0x00008B5A }, /* GL_FLOAT_MAT2_ARB */
+ { 11222, 0x00008B65 }, /* GL_FLOAT_MAT2x3 */
+ { 11238, 0x00008B66 }, /* GL_FLOAT_MAT2x4 */
+ { 11254, 0x00008B5B }, /* GL_FLOAT_MAT3 */
+ { 11268, 0x00008B5B }, /* GL_FLOAT_MAT3_ARB */
+ { 11286, 0x00008B67 }, /* GL_FLOAT_MAT3x2 */
+ { 11302, 0x00008B68 }, /* GL_FLOAT_MAT3x4 */
+ { 11318, 0x00008B5C }, /* GL_FLOAT_MAT4 */
+ { 11332, 0x00008B5C }, /* GL_FLOAT_MAT4_ARB */
+ { 11350, 0x00008B69 }, /* GL_FLOAT_MAT4x2 */
+ { 11366, 0x00008B6A }, /* GL_FLOAT_MAT4x3 */
+ { 11382, 0x00008B50 }, /* GL_FLOAT_VEC2 */
+ { 11396, 0x00008B50 }, /* GL_FLOAT_VEC2_ARB */
+ { 11414, 0x00008B51 }, /* GL_FLOAT_VEC3 */
+ { 11428, 0x00008B51 }, /* GL_FLOAT_VEC3_ARB */
+ { 11446, 0x00008B52 }, /* GL_FLOAT_VEC4 */
+ { 11460, 0x00008B52 }, /* GL_FLOAT_VEC4_ARB */
+ { 11478, 0x00000B60 }, /* GL_FOG */
+ { 11485, 0x00000080 }, /* GL_FOG_BIT */
+ { 11496, 0x00000B66 }, /* GL_FOG_COLOR */
+ { 11509, 0x00008451 }, /* GL_FOG_COORD */
+ { 11522, 0x00008451 }, /* GL_FOG_COORDINATE */
+ { 11540, 0x00008457 }, /* GL_FOG_COORDINATE_ARRAY */
+ { 11564, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ { 11603, 0x0000889D }, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB */
+ { 11646, 0x00008456 }, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ { 11678, 0x00008455 }, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ { 11709, 0x00008454 }, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ { 11738, 0x00008450 }, /* GL_FOG_COORDINATE_SOURCE */
+ { 11763, 0x00008457 }, /* GL_FOG_COORD_ARRAY */
+ { 11782, 0x0000889D }, /* GL_FOG_COORD_ARRAY_BUFFER_BINDING */
+ { 11816, 0x00008456 }, /* GL_FOG_COORD_ARRAY_POINTER */
+ { 11843, 0x00008455 }, /* GL_FOG_COORD_ARRAY_STRIDE */
+ { 11869, 0x00008454 }, /* GL_FOG_COORD_ARRAY_TYPE */
+ { 11893, 0x00008450 }, /* GL_FOG_COORD_SRC */
+ { 11910, 0x00000B62 }, /* GL_FOG_DENSITY */
+ { 11925, 0x0000855A }, /* GL_FOG_DISTANCE_MODE_NV */
+ { 11949, 0x00000B64 }, /* GL_FOG_END */
+ { 11960, 0x00000C54 }, /* GL_FOG_HINT */
+ { 11972, 0x00000B61 }, /* GL_FOG_INDEX */
+ { 11985, 0x00000B65 }, /* GL_FOG_MODE */
+ { 11997, 0x00008198 }, /* GL_FOG_OFFSET_SGIX */
+ { 12016, 0x00008199 }, /* GL_FOG_OFFSET_VALUE_SGIX */
+ { 12041, 0x00000B63 }, /* GL_FOG_START */
+ { 12054, 0x00008452 }, /* GL_FRAGMENT_DEPTH */
+ { 12072, 0x00008804 }, /* GL_FRAGMENT_PROGRAM_ARB */
+ { 12096, 0x00008B30 }, /* GL_FRAGMENT_SHADER */
+ { 12115, 0x00008B30 }, /* GL_FRAGMENT_SHADER_ARB */
+ { 12138, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ { 12173, 0x00008B8B }, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES */
+ { 12212, 0x00008D40 }, /* GL_FRAMEBUFFER */
+ { 12227, 0x00008215 }, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ { 12264, 0x00008214 }, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ { 12300, 0x00008210 }, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ { 12341, 0x00008211 }, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ { 12382, 0x00008216 }, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ { 12419, 0x00008213 }, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ { 12456, 0x00008DA7 }, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED */
+ { 12490, 0x00008DA7 }, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB */
+ { 12528, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ { 12566, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT */
+ { 12608, 0x00008CD1 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES */
+ { 12650, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ { 12688, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT */
+ { 12730, 0x00008CD0 }, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES */
+ { 12772, 0x00008212 }, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ { 12807, 0x00008217 }, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ { 12846, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT */
+ { 12895, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES */
+ { 12944, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ { 12992, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT */
+ { 13044, 0x00008CD3 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES */
+ { 13096, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ { 13136, 0x00008CD4 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT */
+ { 13180, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ { 13220, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT */
+ { 13264, 0x00008CD2 }, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES */
+ { 13308, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING */
+ { 13331, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_EXT */
+ { 13358, 0x00008CA6 }, /* GL_FRAMEBUFFER_BINDING_OES */
+ { 13385, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE */
+ { 13409, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_EXT */
+ { 13437, 0x00008CD5 }, /* GL_FRAMEBUFFER_COMPLETE_OES */
+ { 13465, 0x00008218 }, /* GL_FRAMEBUFFER_DEFAULT */
+ { 13488, 0x00008D40 }, /* GL_FRAMEBUFFER_EXT */
+ { 13507, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ { 13544, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT */
+ { 13585, 0x00008CD6 }, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES */
+ { 13626, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS */
+ { 13663, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ { 13704, 0x00008CD9 }, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES */
+ { 13745, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ { 13783, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT */
+ { 13825, 0x00008CDB }, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES */
+ { 13867, 0x00008CD8 }, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ { 13918, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ { 13956, 0x00008CDA }, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES */
+ { 13994, 0x00008DA9 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */
+ { 14036, 0x00008DA8 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS */
+ { 14076, 0x00008DA8 }, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB */
+ { 14120, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ { 14165, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT */
+ { 14214, 0x00008CD7 }, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES */
+ { 14263, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ { 14301, 0x00008D56 }, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT */
+ { 14343, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ { 14381, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT */
+ { 14423, 0x00008CDC }, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES */
+ { 14465, 0x00008D40 }, /* GL_FRAMEBUFFER_OES */
+ { 14484, 0x00008CDE }, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ { 14516, 0x00008219 }, /* GL_FRAMEBUFFER_UNDEFINED */
+ { 14541, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ { 14568, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_EXT */
+ { 14599, 0x00008CDD }, /* GL_FRAMEBUFFER_UNSUPPORTED_OES */
+ { 14630, 0x00000404 }, /* GL_FRONT */
+ { 14639, 0x00000408 }, /* GL_FRONT_AND_BACK */
+ { 14657, 0x00000B46 }, /* GL_FRONT_FACE */
+ { 14671, 0x00000400 }, /* GL_FRONT_LEFT */
+ { 14685, 0x00000401 }, /* GL_FRONT_RIGHT */
+ { 14700, 0x00008006 }, /* GL_FUNC_ADD */
+ { 14712, 0x00008006 }, /* GL_FUNC_ADD_EXT */
+ { 14728, 0x00008006 }, /* GL_FUNC_ADD_OES */
+ { 14744, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT */
+ { 14769, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_EXT */
+ { 14798, 0x0000800B }, /* GL_FUNC_REVERSE_SUBTRACT_OES */
+ { 14827, 0x0000800A }, /* GL_FUNC_SUBTRACT */
+ { 14844, 0x0000800A }, /* GL_FUNC_SUBTRACT_EXT */
+ { 14865, 0x0000800A }, /* GL_FUNC_SUBTRACT_OES */
+ { 14886, 0x00008191 }, /* GL_GENERATE_MIPMAP */
+ { 14905, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT */
+ { 14929, 0x00008192 }, /* GL_GENERATE_MIPMAP_HINT_SGIS */
+ { 14958, 0x00008191 }, /* GL_GENERATE_MIPMAP_SGIS */
+ { 14982, 0x00008917 }, /* GL_GEOMETRY_INPUT_TYPE */
+ { 15005, 0x00008DDB }, /* GL_GEOMETRY_INPUT_TYPE_ARB */
+ { 15032, 0x00008918 }, /* GL_GEOMETRY_OUTPUT_TYPE */
+ { 15056, 0x00008DDC }, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */
+ { 15084, 0x00008DD9 }, /* GL_GEOMETRY_SHADER */
+ { 15103, 0x00008DD9 }, /* GL_GEOMETRY_SHADER_ARB */
+ { 15126, 0x00008916 }, /* GL_GEOMETRY_VERTICES_OUT */
+ { 15151, 0x00008DDA }, /* GL_GEOMETRY_VERTICES_OUT_ARB */
+ { 15180, 0x00000206 }, /* GL_GEQUAL */
+ { 15190, 0x00000204 }, /* GL_GREATER */
+ { 15201, 0x00001904 }, /* GL_GREEN */
+ { 15210, 0x00000D19 }, /* GL_GREEN_BIAS */
+ { 15224, 0x00000D53 }, /* GL_GREEN_BITS */
+ { 15238, 0x00008D95 }, /* GL_GREEN_INTEGER */
+ { 15255, 0x00008D95 }, /* GL_GREEN_INTEGER_EXT */
+ { 15276, 0x00000D18 }, /* GL_GREEN_SCALE */
+ { 15291, 0x0000140B }, /* GL_HALF_FLOAT */
+ { 15305, 0x00008D61 }, /* GL_HALF_FLOAT_OES */
+ { 15323, 0x00008DF2 }, /* GL_HIGH_FLOAT */
+ { 15337, 0x00008DF5 }, /* GL_HIGH_INT */
+ { 15349, 0x00008000 }, /* GL_HINT_BIT */
+ { 15361, 0x00008024 }, /* GL_HISTOGRAM */
+ { 15374, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE */
+ { 15398, 0x0000802B }, /* GL_HISTOGRAM_ALPHA_SIZE_EXT */
+ { 15426, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE */
+ { 15449, 0x0000802A }, /* GL_HISTOGRAM_BLUE_SIZE_EXT */
+ { 15476, 0x00008024 }, /* GL_HISTOGRAM_EXT */
+ { 15493, 0x00008027 }, /* GL_HISTOGRAM_FORMAT */
+ { 15513, 0x00008027 }, /* GL_HISTOGRAM_FORMAT_EXT */
+ { 15537, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE */
+ { 15561, 0x00008029 }, /* GL_HISTOGRAM_GREEN_SIZE_EXT */
+ { 15589, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ { 15617, 0x0000802C }, /* GL_HISTOGRAM_LUMINANCE_SIZE_EXT */
+ { 15649, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE */
+ { 15671, 0x00008028 }, /* GL_HISTOGRAM_RED_SIZE_EXT */
+ { 15697, 0x0000802D }, /* GL_HISTOGRAM_SINK */
+ { 15715, 0x0000802D }, /* GL_HISTOGRAM_SINK_EXT */
+ { 15737, 0x00008026 }, /* GL_HISTOGRAM_WIDTH */
+ { 15756, 0x00008026 }, /* GL_HISTOGRAM_WIDTH_EXT */
+ { 15779, 0x0000862A }, /* GL_IDENTITY_NV */
+ { 15794, 0x00008150 }, /* GL_IGNORE_BORDER_HP */
+ { 15814, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT */
+ { 15850, 0x00008B9B }, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */
+ { 15890, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE */
+ { 15924, 0x00008B9A }, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */
+ { 15962, 0x00001E02 }, /* GL_INCR */
+ { 15970, 0x00008507 }, /* GL_INCR_WRAP */
+ { 15983, 0x00008507 }, /* GL_INCR_WRAP_EXT */
+ { 16000, 0x00008222 }, /* GL_INDEX */
+ { 16009, 0x00008077 }, /* GL_INDEX_ARRAY */
+ { 16024, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ { 16054, 0x00008899 }, /* GL_INDEX_ARRAY_BUFFER_BINDING_ARB */
+ { 16088, 0x00008091 }, /* GL_INDEX_ARRAY_POINTER */
+ { 16111, 0x00008086 }, /* GL_INDEX_ARRAY_STRIDE */
+ { 16133, 0x00008085 }, /* GL_INDEX_ARRAY_TYPE */
+ { 16153, 0x00000D51 }, /* GL_INDEX_BITS */
+ { 16167, 0x00000C20 }, /* GL_INDEX_CLEAR_VALUE */
+ { 16188, 0x00000BF1 }, /* GL_INDEX_LOGIC_OP */
+ { 16206, 0x00000C30 }, /* GL_INDEX_MODE */
+ { 16220, 0x00000D13 }, /* GL_INDEX_OFFSET */
+ { 16236, 0x00000D12 }, /* GL_INDEX_SHIFT */
+ { 16251, 0x00000C21 }, /* GL_INDEX_WRITEMASK */
+ { 16270, 0x00008B84 }, /* GL_INFO_LOG_LENGTH */
+ { 16289, 0x00001404 }, /* GL_INT */
+ { 16296, 0x00008049 }, /* GL_INTENSITY */
+ { 16309, 0x0000804C }, /* GL_INTENSITY12 */
+ { 16324, 0x0000804C }, /* GL_INTENSITY12_EXT */
+ { 16343, 0x0000804D }, /* GL_INTENSITY16 */
+ { 16358, 0x00008D8B }, /* GL_INTENSITY16I_EXT */
+ { 16378, 0x00008D79 }, /* GL_INTENSITY16UI_EXT */
+ { 16399, 0x0000804D }, /* GL_INTENSITY16_EXT */
+ { 16418, 0x00008D85 }, /* GL_INTENSITY32I_EXT */
+ { 16438, 0x00008D73 }, /* GL_INTENSITY32UI_EXT */
+ { 16459, 0x0000804A }, /* GL_INTENSITY4 */
+ { 16473, 0x0000804A }, /* GL_INTENSITY4_EXT */
+ { 16491, 0x0000804B }, /* GL_INTENSITY8 */
+ { 16505, 0x00008D91 }, /* GL_INTENSITY8I_EXT */
+ { 16524, 0x00008D7F }, /* GL_INTENSITY8UI_EXT */
+ { 16544, 0x0000804B }, /* GL_INTENSITY8_EXT */
+ { 16562, 0x00008049 }, /* GL_INTENSITY_EXT */
+ { 16579, 0x00008C8C }, /* GL_INTERLEAVED_ATTRIBS */
+ { 16602, 0x00008C8C }, /* GL_INTERLEAVED_ATTRIBS_EXT */
+ { 16629, 0x00008575 }, /* GL_INTERPOLATE */
+ { 16644, 0x00008575 }, /* GL_INTERPOLATE_ARB */
+ { 16663, 0x00008575 }, /* GL_INTERPOLATE_EXT */
+ { 16682, 0x00008DF7 }, /* GL_INT_10_10_10_2_OES */
+ { 16704, 0x00008DC9 }, /* GL_INT_SAMPLER_1D */
+ { 16722, 0x00008DCE }, /* GL_INT_SAMPLER_1D_ARRAY */
+ { 16746, 0x00008DCE }, /* GL_INT_SAMPLER_1D_ARRAY_EXT */
+ { 16774, 0x00008DC9 }, /* GL_INT_SAMPLER_1D_EXT */
+ { 16796, 0x00008DCA }, /* GL_INT_SAMPLER_2D */
+ { 16814, 0x00008DCF }, /* GL_INT_SAMPLER_2D_ARRAY */
+ { 16838, 0x00008DCF }, /* GL_INT_SAMPLER_2D_ARRAY_EXT */
+ { 16866, 0x00008DCA }, /* GL_INT_SAMPLER_2D_EXT */
+ { 16888, 0x00008DCD }, /* GL_INT_SAMPLER_2D_RECT */
+ { 16911, 0x00008DCD }, /* GL_INT_SAMPLER_2D_RECT_EXT */
+ { 16938, 0x00008DCB }, /* GL_INT_SAMPLER_3D */
+ { 16956, 0x00008DCB }, /* GL_INT_SAMPLER_3D_EXT */
+ { 16978, 0x00008DD0 }, /* GL_INT_SAMPLER_BUFFER */
+ { 17000, 0x00008DD0 }, /* GL_INT_SAMPLER_BUFFER_EXT */
+ { 17026, 0x00008DCC }, /* GL_INT_SAMPLER_CUBE */
+ { 17046, 0x00008DCC }, /* GL_INT_SAMPLER_CUBE_EXT */
+ { 17070, 0x00008B53 }, /* GL_INT_VEC2 */
+ { 17082, 0x00008B53 }, /* GL_INT_VEC2_ARB */
+ { 17098, 0x00008B54 }, /* GL_INT_VEC3 */
+ { 17110, 0x00008B54 }, /* GL_INT_VEC3_ARB */
+ { 17126, 0x00008B55 }, /* GL_INT_VEC4 */
+ { 17138, 0x00008B55 }, /* GL_INT_VEC4_ARB */
+ { 17154, 0x00000500 }, /* GL_INVALID_ENUM */
+ { 17170, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ { 17203, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_EXT */
+ { 17240, 0x00000506 }, /* GL_INVALID_FRAMEBUFFER_OPERATION_OES */
+ { 17277, 0x00000502 }, /* GL_INVALID_OPERATION */
+ { 17298, 0x00000501 }, /* GL_INVALID_VALUE */
+ { 17315, 0x0000862B }, /* GL_INVERSE_NV */
+ { 17329, 0x0000862D }, /* GL_INVERSE_TRANSPOSE_NV */
+ { 17353, 0x0000150A }, /* GL_INVERT */
+ { 17363, 0x00001E00 }, /* GL_KEEP */
+ { 17371, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION */
+ { 17397, 0x00008E4E }, /* GL_LAST_VERTEX_CONVENTION_EXT */
+ { 17427, 0x00000406 }, /* GL_LEFT */
+ { 17435, 0x00000203 }, /* GL_LEQUAL */
+ { 17445, 0x00000201 }, /* GL_LESS */
+ { 17453, 0x00004000 }, /* GL_LIGHT0 */
+ { 17463, 0x00004001 }, /* GL_LIGHT1 */
+ { 17473, 0x00004002 }, /* GL_LIGHT2 */
+ { 17483, 0x00004003 }, /* GL_LIGHT3 */
+ { 17493, 0x00004004 }, /* GL_LIGHT4 */
+ { 17503, 0x00004005 }, /* GL_LIGHT5 */
+ { 17513, 0x00004006 }, /* GL_LIGHT6 */
+ { 17523, 0x00004007 }, /* GL_LIGHT7 */
+ { 17533, 0x00000B50 }, /* GL_LIGHTING */
+ { 17545, 0x00000040 }, /* GL_LIGHTING_BIT */
+ { 17561, 0x00000B53 }, /* GL_LIGHT_MODEL_AMBIENT */
+ { 17584, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ { 17613, 0x000081F8 }, /* GL_LIGHT_MODEL_COLOR_CONTROL_EXT */
+ { 17646, 0x00000B51 }, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ { 17674, 0x00000B52 }, /* GL_LIGHT_MODEL_TWO_SIDE */
+ { 17698, 0x00001B01 }, /* GL_LINE */
+ { 17706, 0x00002601 }, /* GL_LINEAR */
+ { 17716, 0x00001208 }, /* GL_LINEAR_ATTENUATION */
+ { 17738, 0x00008170 }, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ { 17768, 0x0000844F }, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ { 17799, 0x00002703 }, /* GL_LINEAR_MIPMAP_LINEAR */
+ { 17823, 0x00002701 }, /* GL_LINEAR_MIPMAP_NEAREST */
+ { 17848, 0x00000001 }, /* GL_LINES */
+ { 17857, 0x0000000A }, /* GL_LINES_ADJACENCY */
+ { 17876, 0x0000000A }, /* GL_LINES_ADJACENCY_ARB */
+ { 17899, 0x00000004 }, /* GL_LINE_BIT */
+ { 17911, 0x00000002 }, /* GL_LINE_LOOP */
+ { 17924, 0x00000707 }, /* GL_LINE_RESET_TOKEN */
+ { 17944, 0x00000B20 }, /* GL_LINE_SMOOTH */
+ { 17959, 0x00000C52 }, /* GL_LINE_SMOOTH_HINT */
+ { 17979, 0x00000B24 }, /* GL_LINE_STIPPLE */
+ { 17995, 0x00000B25 }, /* GL_LINE_STIPPLE_PATTERN */
+ { 18019, 0x00000B26 }, /* GL_LINE_STIPPLE_REPEAT */
+ { 18042, 0x00000003 }, /* GL_LINE_STRIP */
+ { 18056, 0x0000000B }, /* GL_LINE_STRIP_ADJACENCY */
+ { 18080, 0x0000000B }, /* GL_LINE_STRIP_ADJACENCY_ARB */
+ { 18108, 0x00000702 }, /* GL_LINE_TOKEN */
+ { 18122, 0x00000B21 }, /* GL_LINE_WIDTH */
+ { 18136, 0x00000B23 }, /* GL_LINE_WIDTH_GRANULARITY */
+ { 18162, 0x00000B22 }, /* GL_LINE_WIDTH_RANGE */
+ { 18182, 0x00008B82 }, /* GL_LINK_STATUS */
+ { 18197, 0x00000B32 }, /* GL_LIST_BASE */
+ { 18210, 0x00020000 }, /* GL_LIST_BIT */
+ { 18222, 0x00000B33 }, /* GL_LIST_INDEX */
+ { 18236, 0x00000B30 }, /* GL_LIST_MODE */
+ { 18249, 0x00000101 }, /* GL_LOAD */
+ { 18257, 0x00000BF1 }, /* GL_LOGIC_OP */
+ { 18269, 0x00000BF0 }, /* GL_LOGIC_OP_MODE */
+ { 18286, 0x00008CA1 }, /* GL_LOWER_LEFT */
+ { 18300, 0x00008DF0 }, /* GL_LOW_FLOAT */
+ { 18313, 0x00008DF3 }, /* GL_LOW_INT */
+ { 18324, 0x00001909 }, /* GL_LUMINANCE */
+ { 18337, 0x00008041 }, /* GL_LUMINANCE12 */
+ { 18352, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12 */
+ { 18375, 0x00008047 }, /* GL_LUMINANCE12_ALPHA12_EXT */
+ { 18402, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4 */
+ { 18424, 0x00008046 }, /* GL_LUMINANCE12_ALPHA4_EXT */
+ { 18450, 0x00008041 }, /* GL_LUMINANCE12_EXT */
+ { 18469, 0x00008042 }, /* GL_LUMINANCE16 */
+ { 18484, 0x00008D8C }, /* GL_LUMINANCE16I_EXT */
+ { 18504, 0x00008D7A }, /* GL_LUMINANCE16UI_EXT */
+ { 18525, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16 */
+ { 18548, 0x00008048 }, /* GL_LUMINANCE16_ALPHA16_EXT */
+ { 18575, 0x00008042 }, /* GL_LUMINANCE16_EXT */
+ { 18594, 0x00008D86 }, /* GL_LUMINANCE32I_EXT */
+ { 18614, 0x00008D74 }, /* GL_LUMINANCE32UI_EXT */
+ { 18635, 0x0000803F }, /* GL_LUMINANCE4 */
+ { 18649, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4 */
+ { 18670, 0x00008043 }, /* GL_LUMINANCE4_ALPHA4_EXT */
+ { 18695, 0x0000803F }, /* GL_LUMINANCE4_EXT */
+ { 18713, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2 */
+ { 18734, 0x00008044 }, /* GL_LUMINANCE6_ALPHA2_EXT */
+ { 18759, 0x00008040 }, /* GL_LUMINANCE8 */
+ { 18773, 0x00008D92 }, /* GL_LUMINANCE8I_EXT */
+ { 18792, 0x00008D80 }, /* GL_LUMINANCE8UI_EXT */
+ { 18812, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8 */
+ { 18833, 0x00008045 }, /* GL_LUMINANCE8_ALPHA8_EXT */
+ { 18858, 0x00008040 }, /* GL_LUMINANCE8_EXT */
+ { 18876, 0x0000190A }, /* GL_LUMINANCE_ALPHA */
+ { 18895, 0x00008D8D }, /* GL_LUMINANCE_ALPHA16I_EXT */
+ { 18921, 0x00008D7B }, /* GL_LUMINANCE_ALPHA16UI_EXT */
+ { 18948, 0x00008D87 }, /* GL_LUMINANCE_ALPHA32I_EXT */
+ { 18974, 0x00008D75 }, /* GL_LUMINANCE_ALPHA32UI_EXT */
+ { 19001, 0x00008D93 }, /* GL_LUMINANCE_ALPHA8I_EXT */
+ { 19026, 0x00008D81 }, /* GL_LUMINANCE_ALPHA8UI_EXT */
+ { 19052, 0x00008D9D }, /* GL_LUMINANCE_ALPHA_INTEGER_EXT */
+ { 19083, 0x00008D9C }, /* GL_LUMINANCE_INTEGER_EXT */
+ { 19108, 0x0000821B }, /* GL_MAJOR_VERSION */
+ { 19125, 0x00000D90 }, /* GL_MAP1_COLOR_4 */
+ { 19141, 0x00000DD0 }, /* GL_MAP1_GRID_DOMAIN */
+ { 19161, 0x00000DD1 }, /* GL_MAP1_GRID_SEGMENTS */
+ { 19183, 0x00000D91 }, /* GL_MAP1_INDEX */
+ { 19197, 0x00000D92 }, /* GL_MAP1_NORMAL */
+ { 19212, 0x00000D93 }, /* GL_MAP1_TEXTURE_COORD_1 */
+ { 19236, 0x00000D94 }, /* GL_MAP1_TEXTURE_COORD_2 */
+ { 19260, 0x00000D95 }, /* GL_MAP1_TEXTURE_COORD_3 */
+ { 19284, 0x00000D96 }, /* GL_MAP1_TEXTURE_COORD_4 */
+ { 19308, 0x00000D97 }, /* GL_MAP1_VERTEX_3 */
+ { 19325, 0x00000D98 }, /* GL_MAP1_VERTEX_4 */
+ { 19342, 0x00008660 }, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ { 19370, 0x0000866A }, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ { 19399, 0x0000866B }, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ { 19428, 0x0000866C }, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ { 19457, 0x0000866D }, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ { 19486, 0x0000866E }, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ { 19515, 0x0000866F }, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ { 19544, 0x00008661 }, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ { 19572, 0x00008662 }, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ { 19600, 0x00008663 }, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ { 19628, 0x00008664 }, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ { 19656, 0x00008665 }, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ { 19684, 0x00008666 }, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ { 19712, 0x00008667 }, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ { 19740, 0x00008668 }, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ { 19768, 0x00008669 }, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ { 19796, 0x00000DB0 }, /* GL_MAP2_COLOR_4 */
+ { 19812, 0x00000DD2 }, /* GL_MAP2_GRID_DOMAIN */
+ { 19832, 0x00000DD3 }, /* GL_MAP2_GRID_SEGMENTS */
+ { 19854, 0x00000DB1 }, /* GL_MAP2_INDEX */
+ { 19868, 0x00000DB2 }, /* GL_MAP2_NORMAL */
+ { 19883, 0x00000DB3 }, /* GL_MAP2_TEXTURE_COORD_1 */
+ { 19907, 0x00000DB4 }, /* GL_MAP2_TEXTURE_COORD_2 */
+ { 19931, 0x00000DB5 }, /* GL_MAP2_TEXTURE_COORD_3 */
+ { 19955, 0x00000DB6 }, /* GL_MAP2_TEXTURE_COORD_4 */
+ { 19979, 0x00000DB7 }, /* GL_MAP2_VERTEX_3 */
+ { 19996, 0x00000DB8 }, /* GL_MAP2_VERTEX_4 */
+ { 20013, 0x00008670 }, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ { 20041, 0x0000867A }, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ { 20070, 0x0000867B }, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ { 20099, 0x0000867C }, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ { 20128, 0x0000867D }, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ { 20157, 0x0000867E }, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ { 20186, 0x0000867F }, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ { 20215, 0x00008671 }, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ { 20243, 0x00008672 }, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ { 20271, 0x00008673 }, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ { 20299, 0x00008674 }, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ { 20327, 0x00008675 }, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ { 20355, 0x00008676 }, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ { 20383, 0x00008677 }, /* GL_MAP2_VERTEX_ATTRIB7_4_NV */
+ { 20411, 0x00008678 }, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ { 20439, 0x00008679 }, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ { 20467, 0x00000D10 }, /* GL_MAP_COLOR */
+ { 20480, 0x00000010 }, /* GL_MAP_FLUSH_EXPLICIT_BIT */
+ { 20506, 0x00000008 }, /* GL_MAP_INVALIDATE_BUFFER_BIT */
+ { 20535, 0x00000004 }, /* GL_MAP_INVALIDATE_RANGE_BIT */
+ { 20563, 0x00000001 }, /* GL_MAP_READ_BIT */
+ { 20579, 0x00000D11 }, /* GL_MAP_STENCIL */
+ { 20594, 0x00000020 }, /* GL_MAP_UNSYNCHRONIZED_BIT */
+ { 20620, 0x00000002 }, /* GL_MAP_WRITE_BIT */
+ { 20637, 0x000088C0 }, /* GL_MATRIX0_ARB */
+ { 20652, 0x00008630 }, /* GL_MATRIX0_NV */
+ { 20666, 0x000088CA }, /* GL_MATRIX10_ARB */
+ { 20682, 0x000088CB }, /* GL_MATRIX11_ARB */
+ { 20698, 0x000088CC }, /* GL_MATRIX12_ARB */
+ { 20714, 0x000088CD }, /* GL_MATRIX13_ARB */
+ { 20730, 0x000088CE }, /* GL_MATRIX14_ARB */
+ { 20746, 0x000088CF }, /* GL_MATRIX15_ARB */
+ { 20762, 0x000088D0 }, /* GL_MATRIX16_ARB */
+ { 20778, 0x000088D1 }, /* GL_MATRIX17_ARB */
+ { 20794, 0x000088D2 }, /* GL_MATRIX18_ARB */
+ { 20810, 0x000088D3 }, /* GL_MATRIX19_ARB */
+ { 20826, 0x000088C1 }, /* GL_MATRIX1_ARB */
+ { 20841, 0x00008631 }, /* GL_MATRIX1_NV */
+ { 20855, 0x000088D4 }, /* GL_MATRIX20_ARB */
+ { 20871, 0x000088D5 }, /* GL_MATRIX21_ARB */
+ { 20887, 0x000088D6 }, /* GL_MATRIX22_ARB */
+ { 20903, 0x000088D7 }, /* GL_MATRIX23_ARB */
+ { 20919, 0x000088D8 }, /* GL_MATRIX24_ARB */
+ { 20935, 0x000088D9 }, /* GL_MATRIX25_ARB */
+ { 20951, 0x000088DA }, /* GL_MATRIX26_ARB */
+ { 20967, 0x000088DB }, /* GL_MATRIX27_ARB */
+ { 20983, 0x000088DC }, /* GL_MATRIX28_ARB */
+ { 20999, 0x000088DD }, /* GL_MATRIX29_ARB */
+ { 21015, 0x000088C2 }, /* GL_MATRIX2_ARB */
+ { 21030, 0x00008632 }, /* GL_MATRIX2_NV */
+ { 21044, 0x000088DE }, /* GL_MATRIX30_ARB */
+ { 21060, 0x000088DF }, /* GL_MATRIX31_ARB */
+ { 21076, 0x000088C3 }, /* GL_MATRIX3_ARB */
+ { 21091, 0x00008633 }, /* GL_MATRIX3_NV */
+ { 21105, 0x000088C4 }, /* GL_MATRIX4_ARB */
+ { 21120, 0x00008634 }, /* GL_MATRIX4_NV */
+ { 21134, 0x000088C5 }, /* GL_MATRIX5_ARB */
+ { 21149, 0x00008635 }, /* GL_MATRIX5_NV */
+ { 21163, 0x000088C6 }, /* GL_MATRIX6_ARB */
+ { 21178, 0x00008636 }, /* GL_MATRIX6_NV */
+ { 21192, 0x000088C7 }, /* GL_MATRIX7_ARB */
+ { 21207, 0x00008637 }, /* GL_MATRIX7_NV */
+ { 21221, 0x000088C8 }, /* GL_MATRIX8_ARB */
+ { 21236, 0x000088C9 }, /* GL_MATRIX9_ARB */
+ { 21251, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ { 21277, 0x00008B9E }, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */
+ { 21318, 0x00008844 }, /* GL_MATRIX_INDEX_ARRAY_OES */
+ { 21344, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ { 21378, 0x00008849 }, /* GL_MATRIX_INDEX_ARRAY_POINTER_OES */
+ { 21412, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ { 21443, 0x00008846 }, /* GL_MATRIX_INDEX_ARRAY_SIZE_OES */
+ { 21474, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ { 21507, 0x00008848 }, /* GL_MATRIX_INDEX_ARRAY_STRIDE_OES */
+ { 21540, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ { 21571, 0x00008847 }, /* GL_MATRIX_INDEX_ARRAY_TYPE_OES */
+ { 21602, 0x00000BA0 }, /* GL_MATRIX_MODE */
+ { 21617, 0x00008840 }, /* GL_MATRIX_PALETTE_ARB */
+ { 21639, 0x00008840 }, /* GL_MATRIX_PALETTE_OES */
+ { 21661, 0x00008008 }, /* GL_MAX */
+ { 21668, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE */
+ { 21691, 0x00008073 }, /* GL_MAX_3D_TEXTURE_SIZE_OES */
+ { 21718, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS */
+ { 21746, 0x000088FF }, /* GL_MAX_ARRAY_TEXTURE_LAYERS_EXT */
+ { 21778, 0x00000D35 }, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ { 21804, 0x00000D3B }, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ { 21837, 0x00008177 }, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ { 21863, 0x00008178 }, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 21897, 0x00000D32 }, /* GL_MAX_CLIP_DISTANCES */
+ { 21919, 0x00000D32 }, /* GL_MAX_CLIP_PLANES */
+ { 21938, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS */
+ { 21963, 0x00008CDF }, /* GL_MAX_COLOR_ATTACHMENTS_EXT */
+ { 21992, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ { 22024, 0x000080B3 }, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI */
+ { 22060, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ { 22096, 0x00008B4D }, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB */
+ { 22136, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT */
+ { 22162, 0x0000801B }, /* GL_MAX_CONVOLUTION_HEIGHT_EXT */
+ { 22192, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH */
+ { 22217, 0x0000801A }, /* GL_MAX_CONVOLUTION_WIDTH_EXT */
+ { 22246, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ { 22275, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB */
+ { 22308, 0x0000851C }, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES */
+ { 22341, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS */
+ { 22361, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ARB */
+ { 22385, 0x00008824 }, /* GL_MAX_DRAW_BUFFERS_ATI */
+ { 22409, 0x000080E9 }, /* GL_MAX_ELEMENTS_INDICES */
+ { 22433, 0x000080E8 }, /* GL_MAX_ELEMENTS_VERTICES */
+ { 22458, 0x00000D30 }, /* GL_MAX_EVAL_ORDER */
+ { 22476, 0x00008008 }, /* GL_MAX_EXT */
+ { 22487, 0x00009125 }, /* GL_MAX_FRAGMENT_INPUT_COMPONENTS */
+ { 22520, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ { 22555, 0x00008B49 }, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB */
+ { 22594, 0x00008DFD }, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */
+ { 22626, 0x00009123 }, /* GL_MAX_GEOMETRY_INPUT_COMPONENTS */
+ { 22659, 0x00009124 }, /* GL_MAX_GEOMETRY_OUTPUT_COMPONENTS */
+ { 22693, 0x00008DE0 }, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES */
+ { 22725, 0x00008DE0 }, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB */
+ { 22761, 0x00008C29 }, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS */
+ { 22797, 0x00008C29 }, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB */
+ { 22837, 0x00008DE1 }, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS */
+ { 22877, 0x00008DE1 }, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB */
+ { 22921, 0x00008DDF }, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS */
+ { 22956, 0x00008DDF }, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB */
+ { 22995, 0x00008DDD }, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */
+ { 23034, 0x00000D31 }, /* GL_MAX_LIGHTS */
+ { 23048, 0x00000B31 }, /* GL_MAX_LIST_NESTING */
+ { 23068, 0x00008841 }, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ { 23106, 0x00000D36 }, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ { 23135, 0x00000D37 }, /* GL_MAX_NAME_STACK_DEPTH */
+ { 23159, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_ARB */
+ { 23187, 0x00008842 }, /* GL_MAX_PALETTE_MATRICES_OES */
+ { 23215, 0x00000D34 }, /* GL_MAX_PIXEL_MAP_TABLE */
+ { 23238, 0x000088B1 }, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 23275, 0x0000880B }, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 23311, 0x000088AD }, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ { 23338, 0x000088F5 }, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ { 23367, 0x000088B5 }, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ { 23401, 0x000088F4 }, /* GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV */
+ { 23437, 0x000088F6 }, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ { 23464, 0x000088A1 }, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ { 23496, 0x000088B4 }, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ { 23532, 0x000088F8 }, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ { 23561, 0x000088F7 }, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ { 23590, 0x0000862F }, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ { 23618, 0x0000862E }, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ { 23656, 0x000088B3 }, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 23700, 0x0000880E }, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 23743, 0x000088AF }, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 23777, 0x000088A3 }, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 23816, 0x000088AB }, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 23853, 0x000088A7 }, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 23891, 0x00008810 }, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 23934, 0x0000880F }, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 23977, 0x000088A9 }, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ { 24007, 0x000088A5 }, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ { 24038, 0x00008905 }, /* GL_MAX_PROGRAM_TEXEL_OFFSET */
+ { 24066, 0x00008905 }, /* GL_MAX_PROGRAM_TEXEL_OFFSET_EXT */
+ { 24098, 0x0000880D }, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 24134, 0x0000880C }, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 24170, 0x00000D38 }, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ { 24200, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE */
+ { 24230, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */
+ { 24264, 0x000084F8 }, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_NV */
+ { 24297, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE */
+ { 24322, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_EXT */
+ { 24351, 0x000084E8 }, /* GL_MAX_RENDERBUFFER_SIZE_OES */
+ { 24380, 0x00008D57 }, /* GL_MAX_SAMPLES */
+ { 24395, 0x00008D57 }, /* GL_MAX_SAMPLES_EXT */
+ { 24414, 0x00009111 }, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ { 24441, 0x00008504 }, /* GL_MAX_SHININESS_NV */
+ { 24461, 0x00008505 }, /* GL_MAX_SPOT_EXPONENT_NV */
+ { 24485, 0x00008C2B }, /* GL_MAX_TEXTURE_BUFFER_SIZE */
+ { 24512, 0x00008C2B }, /* GL_MAX_TEXTURE_BUFFER_SIZE_ARB */
+ { 24543, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS */
+ { 24565, 0x00008871 }, /* GL_MAX_TEXTURE_COORDS_ARB */
+ { 24591, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ { 24618, 0x00008872 }, /* GL_MAX_TEXTURE_IMAGE_UNITS_ARB */
+ { 24649, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS */
+ { 24673, 0x000084FD }, /* GL_MAX_TEXTURE_LOD_BIAS_EXT */
+ { 24701, 0x000084FF }, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 24735, 0x00000D33 }, /* GL_MAX_TEXTURE_SIZE */
+ { 24755, 0x00000D39 }, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ { 24782, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS */
+ { 24803, 0x000084E2 }, /* GL_MAX_TEXTURE_UNITS_ARB */
+ { 24828, 0x0000862F }, /* GL_MAX_TRACK_MATRICES_NV */
+ { 24853, 0x0000862E }, /* GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
+ { 24888, 0x00008C8A }, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS */
+ { 24937, 0x00008C8A }, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT */
+ { 24990, 0x00008C8B }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS */
+ { 25033, 0x00008C8B }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT */
+ { 25080, 0x00008C80 }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS */
+ { 25126, 0x00008C80 }, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT */
+ { 25176, 0x00008B4B }, /* GL_MAX_VARYING_COMPONENTS */
+ { 25202, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS */
+ { 25224, 0x00008B4B }, /* GL_MAX_VARYING_FLOATS_ARB */
+ { 25250, 0x00008DFC }, /* GL_MAX_VARYING_VECTORS */
+ { 25273, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS */
+ { 25295, 0x00008869 }, /* GL_MAX_VERTEX_ATTRIBS_ARB */
+ { 25321, 0x00009122 }, /* GL_MAX_VERTEX_OUTPUT_COMPONENTS */
+ { 25353, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ { 25387, 0x00008B4C }, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB */
+ { 25425, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ { 25458, 0x00008B4A }, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB */
+ { 25495, 0x00008DFB }, /* GL_MAX_VERTEX_UNIFORM_VECTORS */
+ { 25525, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_ARB */
+ { 25549, 0x000086A4 }, /* GL_MAX_VERTEX_UNITS_OES */
+ { 25573, 0x00008DDE }, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */
+ { 25610, 0x00000D3A }, /* GL_MAX_VIEWPORT_DIMS */
+ { 25631, 0x00008DF1 }, /* GL_MEDIUM_FLOAT */
+ { 25647, 0x00008DF4 }, /* GL_MEDIUM_INT */
+ { 25661, 0x00008007 }, /* GL_MIN */
+ { 25668, 0x0000802E }, /* GL_MINMAX */
+ { 25678, 0x0000802E }, /* GL_MINMAX_EXT */
+ { 25692, 0x0000802F }, /* GL_MINMAX_FORMAT */
+ { 25709, 0x0000802F }, /* GL_MINMAX_FORMAT_EXT */
+ { 25730, 0x00008030 }, /* GL_MINMAX_SINK */
+ { 25745, 0x00008030 }, /* GL_MINMAX_SINK_EXT */
+ { 25764, 0x0000821C }, /* GL_MINOR_VERSION */
+ { 25781, 0x00008007 }, /* GL_MIN_EXT */
+ { 25792, 0x00008904 }, /* GL_MIN_PROGRAM_TEXEL_OFFSET */
+ { 25820, 0x00008904 }, /* GL_MIN_PROGRAM_TEXEL_OFFSET_EXT */
+ { 25852, 0x00008370 }, /* GL_MIRRORED_REPEAT */
+ { 25871, 0x00008370 }, /* GL_MIRRORED_REPEAT_ARB */
+ { 25894, 0x00008370 }, /* GL_MIRRORED_REPEAT_IBM */
+ { 25917, 0x00008742 }, /* GL_MIRROR_CLAMP_ATI */
+ { 25937, 0x00008742 }, /* GL_MIRROR_CLAMP_EXT */
+ { 25957, 0x00008912 }, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ { 25987, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_ATI */
+ { 26015, 0x00008743 }, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ { 26043, 0x00001700 }, /* GL_MODELVIEW */
+ { 26056, 0x00001700 }, /* GL_MODELVIEW0_ARB */
+ { 26074, 0x0000872A }, /* GL_MODELVIEW10_ARB */
+ { 26093, 0x0000872B }, /* GL_MODELVIEW11_ARB */
+ { 26112, 0x0000872C }, /* GL_MODELVIEW12_ARB */
+ { 26131, 0x0000872D }, /* GL_MODELVIEW13_ARB */
+ { 26150, 0x0000872E }, /* GL_MODELVIEW14_ARB */
+ { 26169, 0x0000872F }, /* GL_MODELVIEW15_ARB */
+ { 26188, 0x00008730 }, /* GL_MODELVIEW16_ARB */
+ { 26207, 0x00008731 }, /* GL_MODELVIEW17_ARB */
+ { 26226, 0x00008732 }, /* GL_MODELVIEW18_ARB */
+ { 26245, 0x00008733 }, /* GL_MODELVIEW19_ARB */
+ { 26264, 0x0000850A }, /* GL_MODELVIEW1_ARB */
+ { 26282, 0x00008734 }, /* GL_MODELVIEW20_ARB */
+ { 26301, 0x00008735 }, /* GL_MODELVIEW21_ARB */
+ { 26320, 0x00008736 }, /* GL_MODELVIEW22_ARB */
+ { 26339, 0x00008737 }, /* GL_MODELVIEW23_ARB */
+ { 26358, 0x00008738 }, /* GL_MODELVIEW24_ARB */
+ { 26377, 0x00008739 }, /* GL_MODELVIEW25_ARB */
+ { 26396, 0x0000873A }, /* GL_MODELVIEW26_ARB */
+ { 26415, 0x0000873B }, /* GL_MODELVIEW27_ARB */
+ { 26434, 0x0000873C }, /* GL_MODELVIEW28_ARB */
+ { 26453, 0x0000873D }, /* GL_MODELVIEW29_ARB */
+ { 26472, 0x00008722 }, /* GL_MODELVIEW2_ARB */
+ { 26490, 0x0000873E }, /* GL_MODELVIEW30_ARB */
+ { 26509, 0x0000873F }, /* GL_MODELVIEW31_ARB */
+ { 26528, 0x00008723 }, /* GL_MODELVIEW3_ARB */
+ { 26546, 0x00008724 }, /* GL_MODELVIEW4_ARB */
+ { 26564, 0x00008725 }, /* GL_MODELVIEW5_ARB */
+ { 26582, 0x00008726 }, /* GL_MODELVIEW6_ARB */
+ { 26600, 0x00008727 }, /* GL_MODELVIEW7_ARB */
+ { 26618, 0x00008728 }, /* GL_MODELVIEW8_ARB */
+ { 26636, 0x00008729 }, /* GL_MODELVIEW9_ARB */
+ { 26654, 0x00000BA6 }, /* GL_MODELVIEW_MATRIX */
+ { 26674, 0x0000898D }, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */
+ { 26716, 0x00008629 }, /* GL_MODELVIEW_PROJECTION_NV */
+ { 26743, 0x00000BA3 }, /* GL_MODELVIEW_STACK_DEPTH */
+ { 26768, 0x00002100 }, /* GL_MODULATE */
+ { 26780, 0x00008744 }, /* GL_MODULATE_ADD_ATI */
+ { 26800, 0x00008745 }, /* GL_MODULATE_SIGNED_ADD_ATI */
+ { 26827, 0x00008746 }, /* GL_MODULATE_SUBTRACT_ATI */
+ { 26852, 0x00000103 }, /* GL_MULT */
+ { 26860, 0x0000809D }, /* GL_MULTISAMPLE */
+ { 26875, 0x000086B2 }, /* GL_MULTISAMPLE_3DFX */
+ { 26895, 0x0000809D }, /* GL_MULTISAMPLE_ARB */
+ { 26914, 0x20000000 }, /* GL_MULTISAMPLE_BIT */
+ { 26933, 0x20000000 }, /* GL_MULTISAMPLE_BIT_3DFX */
+ { 26957, 0x20000000 }, /* GL_MULTISAMPLE_BIT_ARB */
+ { 26980, 0x00008534 }, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ { 27010, 0x00002A25 }, /* GL_N3F_V3F */
+ { 27021, 0x00000D70 }, /* GL_NAME_STACK_DEPTH */
+ { 27041, 0x0000150E }, /* GL_NAND */
+ { 27049, 0x00002600 }, /* GL_NEAREST */
+ { 27060, 0x0000844E }, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ { 27091, 0x0000844D }, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ { 27123, 0x00002702 }, /* GL_NEAREST_MIPMAP_LINEAR */
+ { 27148, 0x00002700 }, /* GL_NEAREST_MIPMAP_NEAREST */
+ { 27174, 0x00000200 }, /* GL_NEVER */
+ { 27183, 0x00001102 }, /* GL_NICEST */
+ { 27193, 0x00000000 }, /* GL_NONE */
+ { 27201, 0x00000000 }, /* GL_NONE_OES */
+ { 27213, 0x00001505 }, /* GL_NOOP */
+ { 27221, 0x00001508 }, /* GL_NOR */
+ { 27228, 0x00000BA1 }, /* GL_NORMALIZE */
+ { 27241, 0x00008075 }, /* GL_NORMAL_ARRAY */
+ { 27257, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ { 27288, 0x00008897 }, /* GL_NORMAL_ARRAY_BUFFER_BINDING_ARB */
+ { 27323, 0x0000808F }, /* GL_NORMAL_ARRAY_POINTER */
+ { 27347, 0x0000807F }, /* GL_NORMAL_ARRAY_STRIDE */
+ { 27370, 0x0000807E }, /* GL_NORMAL_ARRAY_TYPE */
+ { 27391, 0x00008511 }, /* GL_NORMAL_MAP */
+ { 27405, 0x00008511 }, /* GL_NORMAL_MAP_ARB */
+ { 27423, 0x00008511 }, /* GL_NORMAL_MAP_NV */
+ { 27440, 0x00008511 }, /* GL_NORMAL_MAP_OES */
+ { 27458, 0x00000205 }, /* GL_NOTEQUAL */
+ { 27470, 0x00000000 }, /* GL_NO_ERROR */
+ { 27482, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ { 27516, 0x000086A2 }, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB */
+ { 27554, 0x0000821D }, /* GL_NUM_EXTENSIONS */
+ { 27572, 0x000087FE }, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */
+ { 27606, 0x00008DF9 }, /* GL_NUM_SHADER_BINARY_FORMATS */
+ { 27635, 0x00008B89 }, /* GL_OBJECT_ACTIVE_ATTRIBUTES_ARB */
+ { 27667, 0x00008B8A }, /* GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB */
+ { 27709, 0x00008B86 }, /* GL_OBJECT_ACTIVE_UNIFORMS_ARB */
+ { 27739, 0x00008B87 }, /* GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB */
+ { 27779, 0x00008B85 }, /* GL_OBJECT_ATTACHED_OBJECTS_ARB */
+ { 27810, 0x00008B81 }, /* GL_OBJECT_COMPILE_STATUS_ARB */
+ { 27839, 0x00008B80 }, /* GL_OBJECT_DELETE_STATUS_ARB */
+ { 27867, 0x00008B84 }, /* GL_OBJECT_INFO_LOG_LENGTH_ARB */
+ { 27897, 0x00002401 }, /* GL_OBJECT_LINEAR */
+ { 27914, 0x00008B82 }, /* GL_OBJECT_LINK_STATUS_ARB */
+ { 27940, 0x00002501 }, /* GL_OBJECT_PLANE */
+ { 27956, 0x00008B88 }, /* GL_OBJECT_SHADER_SOURCE_LENGTH_ARB */
+ { 27991, 0x00008B4F }, /* GL_OBJECT_SUBTYPE_ARB */
+ { 28013, 0x00009112 }, /* GL_OBJECT_TYPE */
+ { 28028, 0x00008B4E }, /* GL_OBJECT_TYPE_ARB */
+ { 28047, 0x00008B83 }, /* GL_OBJECT_VALIDATE_STATUS_ARB */
+ { 28077, 0x00008165 }, /* GL_OCCLUSION_TEST_HP */
+ { 28098, 0x00008166 }, /* GL_OCCLUSION_TEST_RESULT_HP */
+ { 28126, 0x00000001 }, /* GL_ONE */
+ { 28133, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ { 28161, 0x00008004 }, /* GL_ONE_MINUS_CONSTANT_ALPHA_EXT */
+ { 28193, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ { 28221, 0x00008002 }, /* GL_ONE_MINUS_CONSTANT_COLOR_EXT */
+ { 28253, 0x00000305 }, /* GL_ONE_MINUS_DST_ALPHA */
+ { 28276, 0x00000307 }, /* GL_ONE_MINUS_DST_COLOR */
+ { 28299, 0x00000303 }, /* GL_ONE_MINUS_SRC_ALPHA */
+ { 28322, 0x00000301 }, /* GL_ONE_MINUS_SRC_COLOR */
+ { 28345, 0x00008598 }, /* GL_OPERAND0_ALPHA */
+ { 28363, 0x00008598 }, /* GL_OPERAND0_ALPHA_ARB */
+ { 28385, 0x00008598 }, /* GL_OPERAND0_ALPHA_EXT */
+ { 28407, 0x00008590 }, /* GL_OPERAND0_RGB */
+ { 28423, 0x00008590 }, /* GL_OPERAND0_RGB_ARB */
+ { 28443, 0x00008590 }, /* GL_OPERAND0_RGB_EXT */
+ { 28463, 0x00008599 }, /* GL_OPERAND1_ALPHA */
+ { 28481, 0x00008599 }, /* GL_OPERAND1_ALPHA_ARB */
+ { 28503, 0x00008599 }, /* GL_OPERAND1_ALPHA_EXT */
+ { 28525, 0x00008591 }, /* GL_OPERAND1_RGB */
+ { 28541, 0x00008591 }, /* GL_OPERAND1_RGB_ARB */
+ { 28561, 0x00008591 }, /* GL_OPERAND1_RGB_EXT */
+ { 28581, 0x0000859A }, /* GL_OPERAND2_ALPHA */
+ { 28599, 0x0000859A }, /* GL_OPERAND2_ALPHA_ARB */
+ { 28621, 0x0000859A }, /* GL_OPERAND2_ALPHA_EXT */
+ { 28643, 0x00008592 }, /* GL_OPERAND2_RGB */
+ { 28659, 0x00008592 }, /* GL_OPERAND2_RGB_ARB */
+ { 28679, 0x00008592 }, /* GL_OPERAND2_RGB_EXT */
+ { 28699, 0x0000859B }, /* GL_OPERAND3_ALPHA_NV */
+ { 28720, 0x00008593 }, /* GL_OPERAND3_RGB_NV */
+ { 28739, 0x00001507 }, /* GL_OR */
+ { 28745, 0x00000A01 }, /* GL_ORDER */
+ { 28754, 0x0000150D }, /* GL_OR_INVERTED */
+ { 28769, 0x0000150B }, /* GL_OR_REVERSE */
+ { 28783, 0x00000505 }, /* GL_OUT_OF_MEMORY */
+ { 28800, 0x00000D05 }, /* GL_PACK_ALIGNMENT */
+ { 28818, 0x0000806C }, /* GL_PACK_IMAGE_HEIGHT */
+ { 28839, 0x00008758 }, /* GL_PACK_INVERT_MESA */
+ { 28859, 0x00000D01 }, /* GL_PACK_LSB_FIRST */
+ { 28877, 0x00000D02 }, /* GL_PACK_ROW_LENGTH */
+ { 28896, 0x0000806B }, /* GL_PACK_SKIP_IMAGES */
+ { 28916, 0x00000D04 }, /* GL_PACK_SKIP_PIXELS */
+ { 28936, 0x00000D03 }, /* GL_PACK_SKIP_ROWS */
+ { 28954, 0x00000D00 }, /* GL_PACK_SWAP_BYTES */
+ { 28973, 0x00008B92 }, /* GL_PALETTE4_R5_G6_B5_OES */
+ { 28998, 0x00008B94 }, /* GL_PALETTE4_RGB5_A1_OES */
+ { 29022, 0x00008B90 }, /* GL_PALETTE4_RGB8_OES */
+ { 29043, 0x00008B93 }, /* GL_PALETTE4_RGBA4_OES */
+ { 29065, 0x00008B91 }, /* GL_PALETTE4_RGBA8_OES */
+ { 29087, 0x00008B97 }, /* GL_PALETTE8_R5_G6_B5_OES */
+ { 29112, 0x00008B99 }, /* GL_PALETTE8_RGB5_A1_OES */
+ { 29136, 0x00008B95 }, /* GL_PALETTE8_RGB8_OES */
+ { 29157, 0x00008B98 }, /* GL_PALETTE8_RGBA4_OES */
+ { 29179, 0x00008B96 }, /* GL_PALETTE8_RGBA8_OES */
+ { 29201, 0x00000700 }, /* GL_PASS_THROUGH_TOKEN */
+ { 29223, 0x00000C50 }, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ { 29254, 0x00000C79 }, /* GL_PIXEL_MAP_A_TO_A */
+ { 29274, 0x00000CB9 }, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ { 29299, 0x00000C78 }, /* GL_PIXEL_MAP_B_TO_B */
+ { 29319, 0x00000CB8 }, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ { 29344, 0x00000C77 }, /* GL_PIXEL_MAP_G_TO_G */
+ { 29364, 0x00000CB7 }, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ { 29389, 0x00000C75 }, /* GL_PIXEL_MAP_I_TO_A */
+ { 29409, 0x00000CB5 }, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ { 29434, 0x00000C74 }, /* GL_PIXEL_MAP_I_TO_B */
+ { 29454, 0x00000CB4 }, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ { 29479, 0x00000C73 }, /* GL_PIXEL_MAP_I_TO_G */
+ { 29499, 0x00000CB3 }, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ { 29524, 0x00000C70 }, /* GL_PIXEL_MAP_I_TO_I */
+ { 29544, 0x00000CB0 }, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ { 29569, 0x00000C72 }, /* GL_PIXEL_MAP_I_TO_R */
+ { 29589, 0x00000CB2 }, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ { 29614, 0x00000C76 }, /* GL_PIXEL_MAP_R_TO_R */
+ { 29634, 0x00000CB6 }, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ { 29659, 0x00000C71 }, /* GL_PIXEL_MAP_S_TO_S */
+ { 29679, 0x00000CB1 }, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ { 29704, 0x00000020 }, /* GL_PIXEL_MODE_BIT */
+ { 29722, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER */
+ { 29743, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ { 29772, 0x000088ED }, /* GL_PIXEL_PACK_BUFFER_BINDING_EXT */
+ { 29805, 0x000088EB }, /* GL_PIXEL_PACK_BUFFER_EXT */
+ { 29830, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER */
+ { 29853, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ { 29884, 0x000088EF }, /* GL_PIXEL_UNPACK_BUFFER_BINDING_EXT */
+ { 29919, 0x000088EC }, /* GL_PIXEL_UNPACK_BUFFER_EXT */
+ { 29946, 0x00001B00 }, /* GL_POINT */
+ { 29955, 0x00000000 }, /* GL_POINTS */
+ { 29965, 0x00000002 }, /* GL_POINT_BIT */
+ { 29978, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION */
+ { 30008, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_ARB */
+ { 30042, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_EXT */
+ { 30076, 0x00008129 }, /* GL_POINT_DISTANCE_ATTENUATION_SGIS */
+ { 30111, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ { 30140, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_ARB */
+ { 30173, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_EXT */
+ { 30206, 0x00008128 }, /* GL_POINT_FADE_THRESHOLD_SIZE_SGIS */
+ { 30240, 0x00000B11 }, /* GL_POINT_SIZE */
+ { 30254, 0x00008B9F }, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */
+ { 30293, 0x00008B9C }, /* GL_POINT_SIZE_ARRAY_OES */
+ { 30317, 0x0000898C }, /* GL_POINT_SIZE_ARRAY_POINTER_OES */
+ { 30349, 0x0000898B }, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */
+ { 30380, 0x0000898A }, /* GL_POINT_SIZE_ARRAY_TYPE_OES */
+ { 30409, 0x00000B13 }, /* GL_POINT_SIZE_GRANULARITY */
+ { 30435, 0x00008127 }, /* GL_POINT_SIZE_MAX */
+ { 30453, 0x00008127 }, /* GL_POINT_SIZE_MAX_ARB */
+ { 30475, 0x00008127 }, /* GL_POINT_SIZE_MAX_EXT */
+ { 30497, 0x00008127 }, /* GL_POINT_SIZE_MAX_SGIS */
+ { 30520, 0x00008126 }, /* GL_POINT_SIZE_MIN */
+ { 30538, 0x00008126 }, /* GL_POINT_SIZE_MIN_ARB */
+ { 30560, 0x00008126 }, /* GL_POINT_SIZE_MIN_EXT */
+ { 30582, 0x00008126 }, /* GL_POINT_SIZE_MIN_SGIS */
+ { 30605, 0x00000B12 }, /* GL_POINT_SIZE_RANGE */
+ { 30625, 0x00000B10 }, /* GL_POINT_SMOOTH */
+ { 30641, 0x00000C51 }, /* GL_POINT_SMOOTH_HINT */
+ { 30662, 0x00008861 }, /* GL_POINT_SPRITE */
+ { 30678, 0x00008861 }, /* GL_POINT_SPRITE_ARB */
+ { 30698, 0x00008CA0 }, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ { 30727, 0x00008861 }, /* GL_POINT_SPRITE_NV */
+ { 30746, 0x00008861 }, /* GL_POINT_SPRITE_OES */
+ { 30766, 0x00008863 }, /* GL_POINT_SPRITE_R_MODE_NV */
+ { 30792, 0x00000701 }, /* GL_POINT_TOKEN */
+ { 30807, 0x00000009 }, /* GL_POLYGON */
+ { 30818, 0x00000008 }, /* GL_POLYGON_BIT */
+ { 30833, 0x00000B40 }, /* GL_POLYGON_MODE */
+ { 30849, 0x00008039 }, /* GL_POLYGON_OFFSET_BIAS */
+ { 30872, 0x00008038 }, /* GL_POLYGON_OFFSET_FACTOR */
+ { 30897, 0x00008037 }, /* GL_POLYGON_OFFSET_FILL */
+ { 30920, 0x00002A02 }, /* GL_POLYGON_OFFSET_LINE */
+ { 30943, 0x00002A01 }, /* GL_POLYGON_OFFSET_POINT */
+ { 30967, 0x00002A00 }, /* GL_POLYGON_OFFSET_UNITS */
+ { 30991, 0x00000B41 }, /* GL_POLYGON_SMOOTH */
+ { 31009, 0x00000C53 }, /* GL_POLYGON_SMOOTH_HINT */
+ { 31032, 0x00000B42 }, /* GL_POLYGON_STIPPLE */
+ { 31051, 0x00000010 }, /* GL_POLYGON_STIPPLE_BIT */
+ { 31074, 0x00000703 }, /* GL_POLYGON_TOKEN */
+ { 31091, 0x00001203 }, /* GL_POSITION */
+ { 31103, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ { 31135, 0x000080BB }, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI */
+ { 31171, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ { 31204, 0x000080B7 }, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI */
+ { 31241, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ { 31272, 0x000080BA }, /* GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI */
+ { 31307, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ { 31339, 0x000080B6 }, /* GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI */
+ { 31375, 0x000080D2 }, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 31408, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ { 31440, 0x000080B9 }, /* GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI */
+ { 31476, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ { 31509, 0x000080B5 }, /* GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI */
+ { 31546, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ { 31576, 0x000080B8 }, /* GL_POST_COLOR_MATRIX_RED_BIAS_SGI */
+ { 31610, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ { 31641, 0x000080B4 }, /* GL_POST_COLOR_MATRIX_RED_SCALE_SGI */
+ { 31676, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ { 31707, 0x00008023 }, /* GL_POST_CONVOLUTION_ALPHA_BIAS_EXT */
+ { 31742, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ { 31774, 0x0000801F }, /* GL_POST_CONVOLUTION_ALPHA_SCALE_EXT */
+ { 31810, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ { 31840, 0x00008022 }, /* GL_POST_CONVOLUTION_BLUE_BIAS_EXT */
+ { 31874, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ { 31905, 0x0000801E }, /* GL_POST_CONVOLUTION_BLUE_SCALE_EXT */
+ { 31940, 0x000080D1 }, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ { 31972, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ { 32003, 0x00008021 }, /* GL_POST_CONVOLUTION_GREEN_BIAS_EXT */
+ { 32038, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ { 32070, 0x0000801D }, /* GL_POST_CONVOLUTION_GREEN_SCALE_EXT */
+ { 32106, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS */
+ { 32135, 0x00008020 }, /* GL_POST_CONVOLUTION_RED_BIAS_EXT */
+ { 32168, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE */
+ { 32198, 0x0000801C }, /* GL_POST_CONVOLUTION_RED_SCALE_EXT */
+ { 32232, 0x0000817B }, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ { 32271, 0x00008179 }, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ { 32304, 0x0000817C }, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ { 32344, 0x0000817A }, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ { 32378, 0x00008578 }, /* GL_PREVIOUS */
+ { 32390, 0x00008578 }, /* GL_PREVIOUS_ARB */
+ { 32406, 0x00008578 }, /* GL_PREVIOUS_EXT */
+ { 32422, 0x00008577 }, /* GL_PRIMARY_COLOR */
+ { 32439, 0x00008577 }, /* GL_PRIMARY_COLOR_ARB */
+ { 32460, 0x00008577 }, /* GL_PRIMARY_COLOR_EXT */
+ { 32481, 0x00008C87 }, /* GL_PRIMITIVES_GENERATED */
+ { 32505, 0x00008C87 }, /* GL_PRIMITIVES_GENERATED_EXT */
+ { 32533, 0x00008F9D }, /* GL_PRIMITIVE_RESTART */
+ { 32554, 0x00008F9E }, /* GL_PRIMITIVE_RESTART_INDEX */
+ { 32581, 0x00008559 }, /* GL_PRIMITIVE_RESTART_INDEX_NV */
+ { 32611, 0x00008558 }, /* GL_PRIMITIVE_RESTART_NV */
+ { 32635, 0x000088B0 }, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ { 32668, 0x00008805 }, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ { 32700, 0x000088AC }, /* GL_PROGRAM_ATTRIBS_ARB */
+ { 32723, 0x000087FF }, /* GL_PROGRAM_BINARY_FORMATS_OES */
+ { 32753, 0x00008741 }, /* GL_PROGRAM_BINARY_LENGTH_OES */
+ { 32782, 0x00008677 }, /* GL_PROGRAM_BINDING_ARB */
+ { 32805, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ { 32835, 0x0000864B }, /* GL_PROGRAM_ERROR_POSITION_NV */
+ { 32864, 0x00008874 }, /* GL_PROGRAM_ERROR_STRING_ARB */
+ { 32892, 0x00008876 }, /* GL_PROGRAM_FORMAT_ARB */
+ { 32914, 0x00008875 }, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ { 32942, 0x000088A0 }, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ { 32970, 0x00008627 }, /* GL_PROGRAM_LENGTH_ARB */
+ { 32992, 0x00008627 }, /* GL_PROGRAM_LENGTH_NV */
+ { 33013, 0x000088B2 }, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ { 33053, 0x00008808 }, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ { 33092, 0x000088AE }, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ { 33122, 0x000088A2 }, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ { 33157, 0x000088AA }, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ { 33190, 0x000088A6 }, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ { 33224, 0x0000880A }, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ { 33263, 0x00008809 }, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ { 33302, 0x00008B40 }, /* GL_PROGRAM_OBJECT_ARB */
+ { 33324, 0x000088A8 }, /* GL_PROGRAM_PARAMETERS_ARB */
+ { 33350, 0x00008644 }, /* GL_PROGRAM_PARAMETER_NV */
+ { 33374, 0x00008642 }, /* GL_PROGRAM_POINT_SIZE */
+ { 33396, 0x00008642 }, /* GL_PROGRAM_POINT_SIZE_ARB */
+ { 33422, 0x00008647 }, /* GL_PROGRAM_RESIDENT_NV */
+ { 33445, 0x00008628 }, /* GL_PROGRAM_STRING_ARB */
+ { 33467, 0x00008628 }, /* GL_PROGRAM_STRING_NV */
+ { 33488, 0x00008646 }, /* GL_PROGRAM_TARGET_NV */
+ { 33509, 0x000088A4 }, /* GL_PROGRAM_TEMPORARIES_ARB */
+ { 33536, 0x00008807 }, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ { 33568, 0x00008806 }, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ { 33600, 0x000088B6 }, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ { 33635, 0x00001701 }, /* GL_PROJECTION */
+ { 33649, 0x00000BA7 }, /* GL_PROJECTION_MATRIX */
+ { 33670, 0x0000898E }, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */
+ { 33713, 0x00000BA4 }, /* GL_PROJECTION_STACK_DEPTH */
+ { 33739, 0x00008E4F }, /* GL_PROVOKING_VERTEX */
+ { 33759, 0x00008E4F }, /* GL_PROVOKING_VERTEX_EXT */
+ { 33783, 0x000080D3 }, /* GL_PROXY_COLOR_TABLE */
+ { 33804, 0x00008025 }, /* GL_PROXY_HISTOGRAM */
+ { 33823, 0x00008025 }, /* GL_PROXY_HISTOGRAM_EXT */
+ { 33846, 0x000080D5 }, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ { 33885, 0x000080D4 }, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ { 33923, 0x00008063 }, /* GL_PROXY_TEXTURE_1D */
+ { 33943, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY */
+ { 33969, 0x00008C19 }, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */
+ { 33999, 0x00008063 }, /* GL_PROXY_TEXTURE_1D_EXT */
+ { 34023, 0x00008064 }, /* GL_PROXY_TEXTURE_2D */
+ { 34043, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY */
+ { 34069, 0x00008C1B }, /* GL_PROXY_TEXTURE_2D_ARRAY_EXT */
+ { 34099, 0x00008064 }, /* GL_PROXY_TEXTURE_2D_EXT */
+ { 34123, 0x00008070 }, /* GL_PROXY_TEXTURE_3D */
+ { 34143, 0x000080BD }, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ { 34176, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ { 34202, 0x0000851B }, /* GL_PROXY_TEXTURE_CUBE_MAP_ARB */
+ { 34232, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE */
+ { 34259, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */
+ { 34290, 0x000084F7 }, /* GL_PROXY_TEXTURE_RECTANGLE_NV */
+ { 34320, 0x00008A1D }, /* GL_PURGEABLE_APPLE */
+ { 34339, 0x00002003 }, /* GL_Q */
+ { 34344, 0x00001209 }, /* GL_QUADRATIC_ATTENUATION */
+ { 34369, 0x00000007 }, /* GL_QUADS */
+ { 34378, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ { 34422, 0x00008E4C }, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT */
+ { 34470, 0x00008614 }, /* GL_QUAD_MESH_SUN */
+ { 34487, 0x00000008 }, /* GL_QUAD_STRIP */
+ { 34501, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT */
+ { 34528, 0x00008E16 }, /* GL_QUERY_BY_REGION_NO_WAIT_NV */
+ { 34558, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT */
+ { 34582, 0x00008E15 }, /* GL_QUERY_BY_REGION_WAIT_NV */
+ { 34609, 0x00008864 }, /* GL_QUERY_COUNTER_BITS */
+ { 34631, 0x00008864 }, /* GL_QUERY_COUNTER_BITS_ARB */
+ { 34657, 0x00008E14 }, /* GL_QUERY_NO_WAIT */
+ { 34674, 0x00008E14 }, /* GL_QUERY_NO_WAIT_NV */
+ { 34694, 0x00008866 }, /* GL_QUERY_RESULT */
+ { 34710, 0x00008866 }, /* GL_QUERY_RESULT_ARB */
+ { 34730, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE */
+ { 34756, 0x00008867 }, /* GL_QUERY_RESULT_AVAILABLE_ARB */
+ { 34786, 0x00008E13 }, /* GL_QUERY_WAIT */
+ { 34800, 0x00008E13 }, /* GL_QUERY_WAIT_NV */
+ { 34817, 0x00002002 }, /* GL_R */
+ { 34822, 0x00008C3A }, /* GL_R11F_G11F_B10F */
+ { 34840, 0x00008F98 }, /* GL_R16_SNORM */
+ { 34853, 0x00002A10 }, /* GL_R3_G3_B2 */
+ { 34865, 0x00008F94 }, /* GL_R8_SNORM */
+ { 34877, 0x00008C89 }, /* GL_RASTERIZER_DISCARD */
+ { 34899, 0x00008C89 }, /* GL_RASTERIZER_DISCARD_EXT */
+ { 34925, 0x00019262 }, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ { 34958, 0x00000C02 }, /* GL_READ_BUFFER */
+ { 34973, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER */
+ { 34993, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING */
+ { 35021, 0x00008CAA }, /* GL_READ_FRAMEBUFFER_BINDING_EXT */
+ { 35053, 0x00008CA8 }, /* GL_READ_FRAMEBUFFER_EXT */
+ { 35077, 0x000088B8 }, /* GL_READ_ONLY */
+ { 35090, 0x000088B8 }, /* GL_READ_ONLY_ARB */
+ { 35107, 0x000088BA }, /* GL_READ_WRITE */
+ { 35121, 0x000088BA }, /* GL_READ_WRITE_ARB */
+ { 35139, 0x00001903 }, /* GL_RED */
+ { 35146, 0x00008016 }, /* GL_REDUCE */
+ { 35156, 0x00008016 }, /* GL_REDUCE_EXT */
+ { 35170, 0x00000D15 }, /* GL_RED_BIAS */
+ { 35182, 0x00000D52 }, /* GL_RED_BITS */
+ { 35194, 0x00008D94 }, /* GL_RED_INTEGER */
+ { 35209, 0x00008D94 }, /* GL_RED_INTEGER_EXT */
+ { 35228, 0x00000D14 }, /* GL_RED_SCALE */
+ { 35241, 0x00008F90 }, /* GL_RED_SNORM */
+ { 35254, 0x00008512 }, /* GL_REFLECTION_MAP */
+ { 35272, 0x00008512 }, /* GL_REFLECTION_MAP_ARB */
+ { 35294, 0x00008512 }, /* GL_REFLECTION_MAP_NV */
+ { 35315, 0x00008512 }, /* GL_REFLECTION_MAP_OES */
+ { 35337, 0x00008A19 }, /* GL_RELEASED_APPLE */
+ { 35355, 0x00001C00 }, /* GL_RENDER */
+ { 35365, 0x00008D41 }, /* GL_RENDERBUFFER */
+ { 35381, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ { 35408, 0x00008D53 }, /* GL_RENDERBUFFER_ALPHA_SIZE_OES */
+ { 35439, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING */
+ { 35463, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_EXT */
+ { 35491, 0x00008CA7 }, /* GL_RENDERBUFFER_BINDING_OES */
+ { 35519, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE */
+ { 35545, 0x00008D52 }, /* GL_RENDERBUFFER_BLUE_SIZE_OES */
+ { 35575, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ { 35602, 0x00008D54 }, /* GL_RENDERBUFFER_DEPTH_SIZE_OES */
+ { 35633, 0x00008D41 }, /* GL_RENDERBUFFER_EXT */
+ { 35653, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE */
+ { 35680, 0x00008D51 }, /* GL_RENDERBUFFER_GREEN_SIZE_OES */
+ { 35711, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT */
+ { 35734, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_EXT */
+ { 35761, 0x00008D43 }, /* GL_RENDERBUFFER_HEIGHT_OES */
+ { 35788, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ { 35820, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_EXT */
+ { 35856, 0x00008D44 }, /* GL_RENDERBUFFER_INTERNAL_FORMAT_OES */
+ { 35892, 0x00008D41 }, /* GL_RENDERBUFFER_OES */
+ { 35912, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE */
+ { 35937, 0x00008D50 }, /* GL_RENDERBUFFER_RED_SIZE_OES */
+ { 35966, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES */
+ { 35990, 0x00008CAB }, /* GL_RENDERBUFFER_SAMPLES_EXT */
+ { 36018, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ { 36047, 0x00008D55 }, /* GL_RENDERBUFFER_STENCIL_SIZE_OES */
+ { 36080, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH */
+ { 36102, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_EXT */
+ { 36128, 0x00008D42 }, /* GL_RENDERBUFFER_WIDTH_OES */
+ { 36154, 0x00001F01 }, /* GL_RENDERER */
+ { 36166, 0x00000C40 }, /* GL_RENDER_MODE */
+ { 36181, 0x00002901 }, /* GL_REPEAT */
+ { 36191, 0x00001E01 }, /* GL_REPLACE */
+ { 36202, 0x00008062 }, /* GL_REPLACE_EXT */
+ { 36217, 0x00008153 }, /* GL_REPLICATE_BORDER_HP */
+ { 36240, 0x0000803A }, /* GL_RESCALE_NORMAL */
+ { 36258, 0x0000803A }, /* GL_RESCALE_NORMAL_EXT */
+ { 36280, 0x00008A1B }, /* GL_RETAINED_APPLE */
+ { 36298, 0x00000102 }, /* GL_RETURN */
+ { 36308, 0x00008F99 }, /* GL_RG16_SNORM */
+ { 36322, 0x00008F95 }, /* GL_RG8_SNORM */
+ { 36335, 0x00001907 }, /* GL_RGB */
+ { 36342, 0x00008052 }, /* GL_RGB10 */
+ { 36351, 0x00008059 }, /* GL_RGB10_A2 */
+ { 36363, 0x00008059 }, /* GL_RGB10_A2_EXT */
+ { 36379, 0x00008052 }, /* GL_RGB10_EXT */
+ { 36392, 0x00008053 }, /* GL_RGB12 */
+ { 36401, 0x00008053 }, /* GL_RGB12_EXT */
+ { 36414, 0x00008054 }, /* GL_RGB16 */
+ { 36423, 0x0000881B }, /* GL_RGB16F */
+ { 36433, 0x00008D89 }, /* GL_RGB16I */
+ { 36443, 0x00008D89 }, /* GL_RGB16I_EXT */
+ { 36457, 0x00008D77 }, /* GL_RGB16UI */
+ { 36468, 0x00008D77 }, /* GL_RGB16UI_EXT */
+ { 36483, 0x00008054 }, /* GL_RGB16_EXT */
+ { 36496, 0x00008F9A }, /* GL_RGB16_SNORM */
+ { 36511, 0x0000804E }, /* GL_RGB2_EXT */
+ { 36523, 0x00008815 }, /* GL_RGB32F */
+ { 36533, 0x00008D83 }, /* GL_RGB32I */
+ { 36543, 0x00008D83 }, /* GL_RGB32I_EXT */
+ { 36557, 0x00008D71 }, /* GL_RGB32UI */
+ { 36568, 0x00008D71 }, /* GL_RGB32UI_EXT */
+ { 36583, 0x0000804F }, /* GL_RGB4 */
+ { 36591, 0x0000804F }, /* GL_RGB4_EXT */
+ { 36603, 0x000083A1 }, /* GL_RGB4_S3TC */
+ { 36616, 0x00008050 }, /* GL_RGB5 */
+ { 36624, 0x00008D62 }, /* GL_RGB565 */
+ { 36634, 0x00008D62 }, /* GL_RGB565_OES */
+ { 36648, 0x00008057 }, /* GL_RGB5_A1 */
+ { 36659, 0x00008057 }, /* GL_RGB5_A1_EXT */
+ { 36674, 0x00008057 }, /* GL_RGB5_A1_OES */
+ { 36689, 0x00008050 }, /* GL_RGB5_EXT */
+ { 36701, 0x00008051 }, /* GL_RGB8 */
+ { 36709, 0x00008D8F }, /* GL_RGB8I */
+ { 36718, 0x00008D8F }, /* GL_RGB8I_EXT */
+ { 36731, 0x00008D7D }, /* GL_RGB8UI */
+ { 36741, 0x00008D7D }, /* GL_RGB8UI_EXT */
+ { 36755, 0x00008051 }, /* GL_RGB8_EXT */
+ { 36767, 0x00008051 }, /* GL_RGB8_OES */
+ { 36779, 0x00008F96 }, /* GL_RGB8_SNORM */
+ { 36793, 0x00008C3D }, /* GL_RGB9_E5 */
+ { 36804, 0x00001908 }, /* GL_RGBA */
+ { 36812, 0x0000805A }, /* GL_RGBA12 */
+ { 36822, 0x0000805A }, /* GL_RGBA12_EXT */
+ { 36836, 0x0000805B }, /* GL_RGBA16 */
+ { 36846, 0x0000881A }, /* GL_RGBA16F */
+ { 36857, 0x00008D88 }, /* GL_RGBA16I */
+ { 36868, 0x00008D88 }, /* GL_RGBA16I_EXT */
+ { 36883, 0x00008D76 }, /* GL_RGBA16UI */
+ { 36895, 0x00008D76 }, /* GL_RGBA16UI_EXT */
+ { 36911, 0x0000805B }, /* GL_RGBA16_EXT */
+ { 36925, 0x00008F9B }, /* GL_RGBA16_SNORM */
+ { 36941, 0x00008055 }, /* GL_RGBA2 */
+ { 36950, 0x00008055 }, /* GL_RGBA2_EXT */
+ { 36963, 0x00008814 }, /* GL_RGBA32F */
+ { 36974, 0x00008D82 }, /* GL_RGBA32I */
+ { 36985, 0x00008D82 }, /* GL_RGBA32I_EXT */
+ { 37000, 0x00008D70 }, /* GL_RGBA32UI */
+ { 37012, 0x00008D70 }, /* GL_RGBA32UI_EXT */
+ { 37028, 0x00008056 }, /* GL_RGBA4 */
+ { 37037, 0x000083A5 }, /* GL_RGBA4_DXT5_S3TC */
+ { 37056, 0x00008056 }, /* GL_RGBA4_EXT */
+ { 37069, 0x00008056 }, /* GL_RGBA4_OES */
+ { 37082, 0x000083A3 }, /* GL_RGBA4_S3TC */
+ { 37096, 0x00008058 }, /* GL_RGBA8 */
+ { 37105, 0x00008D8E }, /* GL_RGBA8I */
+ { 37115, 0x00008D8E }, /* GL_RGBA8I_EXT */
+ { 37129, 0x00008D7C }, /* GL_RGBA8UI */
+ { 37140, 0x00008D7C }, /* GL_RGBA8UI_EXT */
+ { 37155, 0x00008058 }, /* GL_RGBA8_EXT */
+ { 37168, 0x00008058 }, /* GL_RGBA8_OES */
+ { 37181, 0x00008F97 }, /* GL_RGBA8_SNORM */
+ { 37196, 0x000083A4 }, /* GL_RGBA_DXT5_S3TC */
+ { 37214, 0x00008820 }, /* GL_RGBA_FLOAT_MODE_ARB */
+ { 37237, 0x00008D99 }, /* GL_RGBA_INTEGER */
+ { 37253, 0x00008D99 }, /* GL_RGBA_INTEGER_EXT */
+ { 37273, 0x00008D9E }, /* GL_RGBA_INTEGER_MODE_EXT */
+ { 37298, 0x00000C31 }, /* GL_RGBA_MODE */
+ { 37311, 0x000083A2 }, /* GL_RGBA_S3TC */
+ { 37324, 0x00008F93 }, /* GL_RGBA_SNORM */
+ { 37338, 0x00008D98 }, /* GL_RGB_INTEGER */
+ { 37353, 0x00008D98 }, /* GL_RGB_INTEGER_EXT */
+ { 37372, 0x000083A0 }, /* GL_RGB_S3TC */
+ { 37384, 0x00008573 }, /* GL_RGB_SCALE */
+ { 37397, 0x00008573 }, /* GL_RGB_SCALE_ARB */
+ { 37414, 0x00008573 }, /* GL_RGB_SCALE_EXT */
+ { 37431, 0x00008F92 }, /* GL_RGB_SNORM */
+ { 37444, 0x00008F91 }, /* GL_RG_SNORM */
+ { 37456, 0x00000407 }, /* GL_RIGHT */
+ { 37465, 0x00002000 }, /* GL_S */
+ { 37470, 0x00008B5D }, /* GL_SAMPLER_1D */
+ { 37484, 0x00008DC0 }, /* GL_SAMPLER_1D_ARRAY */
+ { 37504, 0x00008DC0 }, /* GL_SAMPLER_1D_ARRAY_EXT */
+ { 37528, 0x00008DC3 }, /* GL_SAMPLER_1D_ARRAY_SHADOW */
+ { 37555, 0x00008DC3 }, /* GL_SAMPLER_1D_ARRAY_SHADOW_EXT */
+ { 37586, 0x00008B61 }, /* GL_SAMPLER_1D_SHADOW */
+ { 37607, 0x00008B5E }, /* GL_SAMPLER_2D */
+ { 37621, 0x00008DC1 }, /* GL_SAMPLER_2D_ARRAY */
+ { 37641, 0x00008DC1 }, /* GL_SAMPLER_2D_ARRAY_EXT */
+ { 37665, 0x00008DC4 }, /* GL_SAMPLER_2D_ARRAY_SHADOW */
+ { 37692, 0x00008DC4 }, /* GL_SAMPLER_2D_ARRAY_SHADOW_EXT */
+ { 37723, 0x00008B63 }, /* GL_SAMPLER_2D_RECT */
+ { 37742, 0x00008B64 }, /* GL_SAMPLER_2D_RECT_SHADOW */
+ { 37768, 0x00008B62 }, /* GL_SAMPLER_2D_SHADOW */
+ { 37789, 0x00008B5F }, /* GL_SAMPLER_3D */
+ { 37803, 0x00008B5F }, /* GL_SAMPLER_3D_OES */
+ { 37821, 0x00008DC2 }, /* GL_SAMPLER_BUFFER */
+ { 37839, 0x00008DC2 }, /* GL_SAMPLER_BUFFER_EXT */
+ { 37861, 0x00008B60 }, /* GL_SAMPLER_CUBE */
+ { 37877, 0x00008DC5 }, /* GL_SAMPLER_CUBE_SHADOW */
+ { 37900, 0x00008DC5 }, /* GL_SAMPLER_CUBE_SHADOW_EXT */
+ { 37927, 0x000080A9 }, /* GL_SAMPLES */
+ { 37938, 0x000086B4 }, /* GL_SAMPLES_3DFX */
+ { 37954, 0x000080A9 }, /* GL_SAMPLES_ARB */
+ { 37969, 0x00008914 }, /* GL_SAMPLES_PASSED */
+ { 37987, 0x00008914 }, /* GL_SAMPLES_PASSED_ARB */
+ { 38009, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ { 38037, 0x0000809E }, /* GL_SAMPLE_ALPHA_TO_COVERAGE_ARB */
+ { 38069, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE */
+ { 38092, 0x0000809F }, /* GL_SAMPLE_ALPHA_TO_ONE_ARB */
+ { 38119, 0x000080A8 }, /* GL_SAMPLE_BUFFERS */
+ { 38137, 0x000086B3 }, /* GL_SAMPLE_BUFFERS_3DFX */
+ { 38160, 0x000080A8 }, /* GL_SAMPLE_BUFFERS_ARB */
+ { 38182, 0x000080A0 }, /* GL_SAMPLE_COVERAGE */
+ { 38201, 0x000080A0 }, /* GL_SAMPLE_COVERAGE_ARB */
+ { 38224, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT */
+ { 38250, 0x000080AB }, /* GL_SAMPLE_COVERAGE_INVERT_ARB */
+ { 38280, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE */
+ { 38305, 0x000080AA }, /* GL_SAMPLE_COVERAGE_VALUE_ARB */
+ { 38334, 0x00080000 }, /* GL_SCISSOR_BIT */
+ { 38349, 0x00000C10 }, /* GL_SCISSOR_BOX */
+ { 38364, 0x00000C11 }, /* GL_SCISSOR_TEST */
+ { 38380, 0x0000845E }, /* GL_SECONDARY_COLOR_ARRAY */
+ { 38405, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ { 38445, 0x0000889C }, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB */
+ { 38489, 0x0000845D }, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ { 38522, 0x0000845A }, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ { 38552, 0x0000845C }, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ { 38584, 0x0000845B }, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ { 38614, 0x00001C02 }, /* GL_SELECT */
+ { 38624, 0x00000DF3 }, /* GL_SELECTION_BUFFER_POINTER */
+ { 38652, 0x00000DF4 }, /* GL_SELECTION_BUFFER_SIZE */
+ { 38677, 0x00008012 }, /* GL_SEPARABLE_2D */
+ { 38693, 0x00008C8D }, /* GL_SEPARATE_ATTRIBS */
+ { 38713, 0x00008C8D }, /* GL_SEPARATE_ATTRIBS_EXT */
+ { 38737, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR */
+ { 38764, 0x000081FA }, /* GL_SEPARATE_SPECULAR_COLOR_EXT */
+ { 38795, 0x0000150F }, /* GL_SET */
+ { 38802, 0x00008DF8 }, /* GL_SHADER_BINARY_FORMATS */
+ { 38827, 0x00008DFA }, /* GL_SHADER_COMPILER */
+ { 38846, 0x00008B48 }, /* GL_SHADER_OBJECT_ARB */
+ { 38867, 0x00008B88 }, /* GL_SHADER_SOURCE_LENGTH */
+ { 38891, 0x00008B4F }, /* GL_SHADER_TYPE */
+ { 38906, 0x00000B54 }, /* GL_SHADE_MODEL */
+ { 38921, 0x00008B8C }, /* GL_SHADING_LANGUAGE_VERSION */
+ { 38949, 0x000080BF }, /* GL_SHADOW_AMBIENT_SGIX */
+ { 38972, 0x000081FB }, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ { 39002, 0x00001601 }, /* GL_SHININESS */
+ { 39015, 0x00001402 }, /* GL_SHORT */
+ { 39024, 0x00009119 }, /* GL_SIGNALED */
+ { 39036, 0x00008F9C }, /* GL_SIGNED_NORMALIZED */
+ { 39057, 0x000081F9 }, /* GL_SINGLE_COLOR */
+ { 39073, 0x000081F9 }, /* GL_SINGLE_COLOR_EXT */
+ { 39093, 0x000085CC }, /* GL_SLICE_ACCUM_SUN */
+ { 39112, 0x00008C46 }, /* GL_SLUMINANCE */
+ { 39126, 0x00008C47 }, /* GL_SLUMINANCE8 */
+ { 39141, 0x00008C45 }, /* GL_SLUMINANCE8_ALPHA8 */
+ { 39163, 0x00008C44 }, /* GL_SLUMINANCE_ALPHA */
+ { 39183, 0x00001D01 }, /* GL_SMOOTH */
+ { 39193, 0x00000B23 }, /* GL_SMOOTH_LINE_WIDTH_GRANULARITY */
+ { 39226, 0x00000B22 }, /* GL_SMOOTH_LINE_WIDTH_RANGE */
+ { 39253, 0x00000B13 }, /* GL_SMOOTH_POINT_SIZE_GRANULARITY */
+ { 39286, 0x00000B12 }, /* GL_SMOOTH_POINT_SIZE_RANGE */
+ { 39313, 0x00008588 }, /* GL_SOURCE0_ALPHA */
+ { 39330, 0x00008588 }, /* GL_SOURCE0_ALPHA_ARB */
+ { 39351, 0x00008588 }, /* GL_SOURCE0_ALPHA_EXT */
+ { 39372, 0x00008580 }, /* GL_SOURCE0_RGB */
+ { 39387, 0x00008580 }, /* GL_SOURCE0_RGB_ARB */
+ { 39406, 0x00008580 }, /* GL_SOURCE0_RGB_EXT */
+ { 39425, 0x00008589 }, /* GL_SOURCE1_ALPHA */
+ { 39442, 0x00008589 }, /* GL_SOURCE1_ALPHA_ARB */
+ { 39463, 0x00008589 }, /* GL_SOURCE1_ALPHA_EXT */
+ { 39484, 0x00008581 }, /* GL_SOURCE1_RGB */
+ { 39499, 0x00008581 }, /* GL_SOURCE1_RGB_ARB */
+ { 39518, 0x00008581 }, /* GL_SOURCE1_RGB_EXT */
+ { 39537, 0x0000858A }, /* GL_SOURCE2_ALPHA */
+ { 39554, 0x0000858A }, /* GL_SOURCE2_ALPHA_ARB */
+ { 39575, 0x0000858A }, /* GL_SOURCE2_ALPHA_EXT */
+ { 39596, 0x00008582 }, /* GL_SOURCE2_RGB */
+ { 39611, 0x00008582 }, /* GL_SOURCE2_RGB_ARB */
+ { 39630, 0x00008582 }, /* GL_SOURCE2_RGB_EXT */
+ { 39649, 0x0000858B }, /* GL_SOURCE3_ALPHA_NV */
+ { 39669, 0x00008583 }, /* GL_SOURCE3_RGB_NV */
+ { 39687, 0x00001202 }, /* GL_SPECULAR */
+ { 39699, 0x00002402 }, /* GL_SPHERE_MAP */
+ { 39713, 0x00001206 }, /* GL_SPOT_CUTOFF */
+ { 39728, 0x00001204 }, /* GL_SPOT_DIRECTION */
+ { 39746, 0x00001205 }, /* GL_SPOT_EXPONENT */
+ { 39763, 0x00008588 }, /* GL_SRC0_ALPHA */
+ { 39777, 0x00008580 }, /* GL_SRC0_RGB */
+ { 39789, 0x00008589 }, /* GL_SRC1_ALPHA */
+ { 39803, 0x00008581 }, /* GL_SRC1_RGB */
+ { 39815, 0x0000858A }, /* GL_SRC2_ALPHA */
+ { 39829, 0x00008582 }, /* GL_SRC2_RGB */
+ { 39841, 0x00000302 }, /* GL_SRC_ALPHA */
+ { 39854, 0x00000308 }, /* GL_SRC_ALPHA_SATURATE */
+ { 39876, 0x00000300 }, /* GL_SRC_COLOR */
+ { 39889, 0x00008C40 }, /* GL_SRGB */
+ { 39897, 0x00008C41 }, /* GL_SRGB8 */
+ { 39906, 0x00008C43 }, /* GL_SRGB8_ALPHA8 */
+ { 39922, 0x00008C42 }, /* GL_SRGB_ALPHA */
+ { 39936, 0x00000503 }, /* GL_STACK_OVERFLOW */
+ { 39954, 0x00000504 }, /* GL_STACK_UNDERFLOW */
+ { 39973, 0x000088E6 }, /* GL_STATIC_COPY */
+ { 39988, 0x000088E6 }, /* GL_STATIC_COPY_ARB */
+ { 40007, 0x000088E4 }, /* GL_STATIC_DRAW */
+ { 40022, 0x000088E4 }, /* GL_STATIC_DRAW_ARB */
+ { 40041, 0x000088E5 }, /* GL_STATIC_READ */
+ { 40056, 0x000088E5 }, /* GL_STATIC_READ_ARB */
+ { 40075, 0x00001802 }, /* GL_STENCIL */
+ { 40086, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT */
+ { 40108, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_EXT */
+ { 40134, 0x00008D20 }, /* GL_STENCIL_ATTACHMENT_OES */
+ { 40160, 0x00008801 }, /* GL_STENCIL_BACK_FAIL */
+ { 40181, 0x00008801 }, /* GL_STENCIL_BACK_FAIL_ATI */
+ { 40206, 0x00008800 }, /* GL_STENCIL_BACK_FUNC */
+ { 40227, 0x00008800 }, /* GL_STENCIL_BACK_FUNC_ATI */
+ { 40252, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ { 40284, 0x00008802 }, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI */
+ { 40320, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ { 40352, 0x00008803 }, /* GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI */
+ { 40388, 0x00008CA3 }, /* GL_STENCIL_BACK_REF */
+ { 40408, 0x00008CA4 }, /* GL_STENCIL_BACK_VALUE_MASK */
+ { 40435, 0x00008CA5 }, /* GL_STENCIL_BACK_WRITEMASK */
+ { 40461, 0x00000D57 }, /* GL_STENCIL_BITS */
+ { 40477, 0x00008224 }, /* GL_STENCIL_BUFFER */
+ { 40495, 0x00000400 }, /* GL_STENCIL_BUFFER_BIT */
+ { 40517, 0x00000B91 }, /* GL_STENCIL_CLEAR_VALUE */
+ { 40540, 0x00000B94 }, /* GL_STENCIL_FAIL */
+ { 40556, 0x00000B92 }, /* GL_STENCIL_FUNC */
+ { 40572, 0x00001901 }, /* GL_STENCIL_INDEX */
+ { 40589, 0x00008D46 }, /* GL_STENCIL_INDEX1 */
+ { 40607, 0x00008D49 }, /* GL_STENCIL_INDEX16 */
+ { 40626, 0x00008D49 }, /* GL_STENCIL_INDEX16_EXT */
+ { 40649, 0x00008D46 }, /* GL_STENCIL_INDEX1_EXT */
+ { 40671, 0x00008D46 }, /* GL_STENCIL_INDEX1_OES */
+ { 40693, 0x00008D47 }, /* GL_STENCIL_INDEX4 */
+ { 40711, 0x00008D47 }, /* GL_STENCIL_INDEX4_EXT */
+ { 40733, 0x00008D47 }, /* GL_STENCIL_INDEX4_OES */
+ { 40755, 0x00008D48 }, /* GL_STENCIL_INDEX8 */
+ { 40773, 0x00008D48 }, /* GL_STENCIL_INDEX8_EXT */
+ { 40795, 0x00008D48 }, /* GL_STENCIL_INDEX8_OES */
+ { 40817, 0x00008D45 }, /* GL_STENCIL_INDEX_EXT */
+ { 40838, 0x00000B95 }, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ { 40865, 0x00000B96 }, /* GL_STENCIL_PASS_DEPTH_PASS */
+ { 40892, 0x00000B97 }, /* GL_STENCIL_REF */
+ { 40907, 0x00000B90 }, /* GL_STENCIL_TEST */
+ { 40923, 0x00008910 }, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ { 40952, 0x00000B93 }, /* GL_STENCIL_VALUE_MASK */
+ { 40974, 0x00000B98 }, /* GL_STENCIL_WRITEMASK */
+ { 40995, 0x00000C33 }, /* GL_STEREO */
+ { 41005, 0x000085BE }, /* GL_STORAGE_CACHED_APPLE */
+ { 41029, 0x000085BD }, /* GL_STORAGE_PRIVATE_APPLE */
+ { 41054, 0x000085BF }, /* GL_STORAGE_SHARED_APPLE */
+ { 41078, 0x000088E2 }, /* GL_STREAM_COPY */
+ { 41093, 0x000088E2 }, /* GL_STREAM_COPY_ARB */
+ { 41112, 0x000088E0 }, /* GL_STREAM_DRAW */
+ { 41127, 0x000088E0 }, /* GL_STREAM_DRAW_ARB */
+ { 41146, 0x000088E1 }, /* GL_STREAM_READ */
+ { 41161, 0x000088E1 }, /* GL_STREAM_READ_ARB */
+ { 41180, 0x00000D50 }, /* GL_SUBPIXEL_BITS */
+ { 41197, 0x000084E7 }, /* GL_SUBTRACT */
+ { 41209, 0x000084E7 }, /* GL_SUBTRACT_ARB */
+ { 41225, 0x00009113 }, /* GL_SYNC_CONDITION */
+ { 41243, 0x00009116 }, /* GL_SYNC_FENCE */
+ { 41257, 0x00009115 }, /* GL_SYNC_FLAGS */
+ { 41271, 0x00000001 }, /* GL_SYNC_FLUSH_COMMANDS_BIT */
+ { 41298, 0x00009117 }, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ { 41328, 0x00009114 }, /* GL_SYNC_STATUS */
+ { 41343, 0x00002001 }, /* GL_T */
+ { 41348, 0x00002A2A }, /* GL_T2F_C3F_V3F */
+ { 41363, 0x00002A2C }, /* GL_T2F_C4F_N3F_V3F */
+ { 41382, 0x00002A29 }, /* GL_T2F_C4UB_V3F */
+ { 41398, 0x00002A2B }, /* GL_T2F_N3F_V3F */
+ { 41413, 0x00002A27 }, /* GL_T2F_V3F */
+ { 41424, 0x00002A2D }, /* GL_T4F_C4F_N3F_V4F */
+ { 41443, 0x00002A28 }, /* GL_T4F_V4F */
+ { 41454, 0x00008031 }, /* GL_TABLE_TOO_LARGE_EXT */
+ { 41477, 0x00001702 }, /* GL_TEXTURE */
+ { 41488, 0x000084C0 }, /* GL_TEXTURE0 */
+ { 41500, 0x000084C0 }, /* GL_TEXTURE0_ARB */
+ { 41516, 0x000084C1 }, /* GL_TEXTURE1 */
+ { 41528, 0x000084CA }, /* GL_TEXTURE10 */
+ { 41541, 0x000084CA }, /* GL_TEXTURE10_ARB */
+ { 41558, 0x000084CB }, /* GL_TEXTURE11 */
+ { 41571, 0x000084CB }, /* GL_TEXTURE11_ARB */
+ { 41588, 0x000084CC }, /* GL_TEXTURE12 */
+ { 41601, 0x000084CC }, /* GL_TEXTURE12_ARB */
+ { 41618, 0x000084CD }, /* GL_TEXTURE13 */
+ { 41631, 0x000084CD }, /* GL_TEXTURE13_ARB */
+ { 41648, 0x000084CE }, /* GL_TEXTURE14 */
+ { 41661, 0x000084CE }, /* GL_TEXTURE14_ARB */
+ { 41678, 0x000084CF }, /* GL_TEXTURE15 */
+ { 41691, 0x000084CF }, /* GL_TEXTURE15_ARB */
+ { 41708, 0x000084D0 }, /* GL_TEXTURE16 */
+ { 41721, 0x000084D0 }, /* GL_TEXTURE16_ARB */
+ { 41738, 0x000084D1 }, /* GL_TEXTURE17 */
+ { 41751, 0x000084D1 }, /* GL_TEXTURE17_ARB */
+ { 41768, 0x000084D2 }, /* GL_TEXTURE18 */
+ { 41781, 0x000084D2 }, /* GL_TEXTURE18_ARB */
+ { 41798, 0x000084D3 }, /* GL_TEXTURE19 */
+ { 41811, 0x000084D3 }, /* GL_TEXTURE19_ARB */
+ { 41828, 0x000084C1 }, /* GL_TEXTURE1_ARB */
+ { 41844, 0x000084C2 }, /* GL_TEXTURE2 */
+ { 41856, 0x000084D4 }, /* GL_TEXTURE20 */
+ { 41869, 0x000084D4 }, /* GL_TEXTURE20_ARB */
+ { 41886, 0x000084D5 }, /* GL_TEXTURE21 */
+ { 41899, 0x000084D5 }, /* GL_TEXTURE21_ARB */
+ { 41916, 0x000084D6 }, /* GL_TEXTURE22 */
+ { 41929, 0x000084D6 }, /* GL_TEXTURE22_ARB */
+ { 41946, 0x000084D7 }, /* GL_TEXTURE23 */
+ { 41959, 0x000084D7 }, /* GL_TEXTURE23_ARB */
+ { 41976, 0x000084D8 }, /* GL_TEXTURE24 */
+ { 41989, 0x000084D8 }, /* GL_TEXTURE24_ARB */
+ { 42006, 0x000084D9 }, /* GL_TEXTURE25 */
+ { 42019, 0x000084D9 }, /* GL_TEXTURE25_ARB */
+ { 42036, 0x000084DA }, /* GL_TEXTURE26 */
+ { 42049, 0x000084DA }, /* GL_TEXTURE26_ARB */
+ { 42066, 0x000084DB }, /* GL_TEXTURE27 */
+ { 42079, 0x000084DB }, /* GL_TEXTURE27_ARB */
+ { 42096, 0x000084DC }, /* GL_TEXTURE28 */
+ { 42109, 0x000084DC }, /* GL_TEXTURE28_ARB */
+ { 42126, 0x000084DD }, /* GL_TEXTURE29 */
+ { 42139, 0x000084DD }, /* GL_TEXTURE29_ARB */
+ { 42156, 0x000084C2 }, /* GL_TEXTURE2_ARB */
+ { 42172, 0x000084C3 }, /* GL_TEXTURE3 */
+ { 42184, 0x000084DE }, /* GL_TEXTURE30 */
+ { 42197, 0x000084DE }, /* GL_TEXTURE30_ARB */
+ { 42214, 0x000084DF }, /* GL_TEXTURE31 */
+ { 42227, 0x000084DF }, /* GL_TEXTURE31_ARB */
+ { 42244, 0x000084C3 }, /* GL_TEXTURE3_ARB */
+ { 42260, 0x000084C4 }, /* GL_TEXTURE4 */
+ { 42272, 0x000084C4 }, /* GL_TEXTURE4_ARB */
+ { 42288, 0x000084C5 }, /* GL_TEXTURE5 */
+ { 42300, 0x000084C5 }, /* GL_TEXTURE5_ARB */
+ { 42316, 0x000084C6 }, /* GL_TEXTURE6 */
+ { 42328, 0x000084C6 }, /* GL_TEXTURE6_ARB */
+ { 42344, 0x000084C7 }, /* GL_TEXTURE7 */
+ { 42356, 0x000084C7 }, /* GL_TEXTURE7_ARB */
+ { 42372, 0x000084C8 }, /* GL_TEXTURE8 */
+ { 42384, 0x000084C8 }, /* GL_TEXTURE8_ARB */
+ { 42400, 0x000084C9 }, /* GL_TEXTURE9 */
+ { 42412, 0x000084C9 }, /* GL_TEXTURE9_ARB */
+ { 42428, 0x00000DE0 }, /* GL_TEXTURE_1D */
+ { 42442, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY */
+ { 42462, 0x00008C18 }, /* GL_TEXTURE_1D_ARRAY_EXT */
+ { 42486, 0x00000DE1 }, /* GL_TEXTURE_2D */
+ { 42500, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY */
+ { 42520, 0x00008C1A }, /* GL_TEXTURE_2D_ARRAY_EXT */
+ { 42544, 0x0000806F }, /* GL_TEXTURE_3D */
+ { 42558, 0x0000806F }, /* GL_TEXTURE_3D_OES */
+ { 42576, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE */
+ { 42598, 0x0000805F }, /* GL_TEXTURE_ALPHA_SIZE_EXT */
+ { 42624, 0x0000813C }, /* GL_TEXTURE_BASE_LEVEL */
+ { 42646, 0x00008068 }, /* GL_TEXTURE_BINDING_1D */
+ { 42668, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY */
+ { 42696, 0x00008C1C }, /* GL_TEXTURE_BINDING_1D_ARRAY_EXT */
+ { 42728, 0x00008069 }, /* GL_TEXTURE_BINDING_2D */
+ { 42750, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY */
+ { 42778, 0x00008C1D }, /* GL_TEXTURE_BINDING_2D_ARRAY_EXT */
+ { 42810, 0x0000806A }, /* GL_TEXTURE_BINDING_3D */
+ { 42832, 0x0000806A }, /* GL_TEXTURE_BINDING_3D_OES */
+ { 42858, 0x00008C2C }, /* GL_TEXTURE_BINDING_BUFFER */
+ { 42884, 0x00008C2C }, /* GL_TEXTURE_BINDING_BUFFER_ARB */
+ { 42914, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ { 42942, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_ARB */
+ { 42974, 0x00008514 }, /* GL_TEXTURE_BINDING_CUBE_MAP_OES */
+ { 43006, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE */
+ { 43035, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_ARB */
+ { 43068, 0x000084F6 }, /* GL_TEXTURE_BINDING_RECTANGLE_NV */
+ { 43100, 0x00040000 }, /* GL_TEXTURE_BIT */
+ { 43115, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE */
+ { 43136, 0x0000805E }, /* GL_TEXTURE_BLUE_SIZE_EXT */
+ { 43161, 0x00001005 }, /* GL_TEXTURE_BORDER */
+ { 43179, 0x00001004 }, /* GL_TEXTURE_BORDER_COLOR */
+ { 43203, 0x00008C2A }, /* GL_TEXTURE_BUFFER */
+ { 43221, 0x00008C2A }, /* GL_TEXTURE_BUFFER_ARB */
+ { 43243, 0x00008C2D }, /* GL_TEXTURE_BUFFER_DATA_STORE_BINDING */
+ { 43280, 0x00008C2D }, /* GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB */
+ { 43321, 0x00008C2E }, /* GL_TEXTURE_BUFFER_FORMAT */
+ { 43346, 0x00008C2E }, /* GL_TEXTURE_BUFFER_FORMAT_ARB */
+ { 43375, 0x00008171 }, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ { 43406, 0x00008176 }, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ { 43436, 0x00008172 }, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ { 43466, 0x00008175 }, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ { 43501, 0x00008173 }, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ { 43532, 0x00008174 }, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ { 43570, 0x000080BC }, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ { 43597, 0x000081EF }, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ { 43629, 0x000080BF }, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ { 43663, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC */
+ { 43687, 0x0000884D }, /* GL_TEXTURE_COMPARE_FUNC_ARB */
+ { 43715, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE */
+ { 43739, 0x0000884C }, /* GL_TEXTURE_COMPARE_MODE_ARB */
+ { 43767, 0x0000819B }, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ { 43800, 0x0000819A }, /* GL_TEXTURE_COMPARE_SGIX */
+ { 43824, 0x00001003 }, /* GL_TEXTURE_COMPONENTS */
+ { 43846, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED */
+ { 43868, 0x000086A1 }, /* GL_TEXTURE_COMPRESSED_ARB */
+ { 43894, 0x000086A3 }, /* GL_TEXTURE_COMPRESSED_FORMATS_ARB */
+ { 43928, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ { 43961, 0x000086A0 }, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB */
+ { 43998, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT */
+ { 44026, 0x000084EF }, /* GL_TEXTURE_COMPRESSION_HINT_ARB */
+ { 44058, 0x00008078 }, /* GL_TEXTURE_COORD_ARRAY */
+ { 44081, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ { 44119, 0x0000889A }, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB */
+ { 44161, 0x00008092 }, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ { 44192, 0x00008088 }, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ { 44220, 0x0000808A }, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ { 44250, 0x00008089 }, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ { 44278, 0x00008B9D }, /* GL_TEXTURE_CROP_RECT_OES */
+ { 44303, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP */
+ { 44323, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_ARB */
+ { 44347, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ { 44378, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB */
+ { 44413, 0x00008516 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES */
+ { 44448, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ { 44479, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB */
+ { 44514, 0x00008518 }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES */
+ { 44549, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ { 44580, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB */
+ { 44615, 0x0000851A }, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES */
+ { 44650, 0x00008513 }, /* GL_TEXTURE_CUBE_MAP_OES */
+ { 44674, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ { 44705, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB */
+ { 44740, 0x00008515 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES */
+ { 44775, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ { 44806, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB */
+ { 44841, 0x00008517 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES */
+ { 44876, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ { 44907, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB */
+ { 44942, 0x00008519 }, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES */
+ { 44977, 0x000088F4 }, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ { 45006, 0x00008071 }, /* GL_TEXTURE_DEPTH */
+ { 45023, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE */
+ { 45045, 0x0000884A }, /* GL_TEXTURE_DEPTH_SIZE_ARB */
+ { 45071, 0x00002300 }, /* GL_TEXTURE_ENV */
+ { 45086, 0x00002201 }, /* GL_TEXTURE_ENV_COLOR */
+ { 45107, 0x00002200 }, /* GL_TEXTURE_ENV_MODE */
+ { 45127, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL */
+ { 45153, 0x00008500 }, /* GL_TEXTURE_FILTER_CONTROL_EXT */
+ { 45183, 0x00002500 }, /* GL_TEXTURE_GEN_MODE */
+ { 45203, 0x00002500 }, /* GL_TEXTURE_GEN_MODE_OES */
+ { 45227, 0x00000C63 }, /* GL_TEXTURE_GEN_Q */
+ { 45244, 0x00000C62 }, /* GL_TEXTURE_GEN_R */
+ { 45261, 0x00000C60 }, /* GL_TEXTURE_GEN_S */
+ { 45278, 0x00008D60 }, /* GL_TEXTURE_GEN_STR_OES */
+ { 45301, 0x00000C61 }, /* GL_TEXTURE_GEN_T */
+ { 45318, 0x0000819D }, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ { 45343, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE */
+ { 45365, 0x0000805D }, /* GL_TEXTURE_GREEN_SIZE_EXT */
+ { 45391, 0x00001001 }, /* GL_TEXTURE_HEIGHT */
+ { 45409, 0x000080ED }, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ { 45435, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE */
+ { 45461, 0x00008061 }, /* GL_TEXTURE_INTENSITY_SIZE_EXT */
+ { 45491, 0x00001003 }, /* GL_TEXTURE_INTERNAL_FORMAT */
+ { 45518, 0x0000819C }, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ { 45543, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS */
+ { 45563, 0x00008501 }, /* GL_TEXTURE_LOD_BIAS_EXT */
+ { 45587, 0x00008190 }, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ { 45614, 0x0000818E }, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ { 45641, 0x0000818F }, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ { 45668, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE */
+ { 45694, 0x00008060 }, /* GL_TEXTURE_LUMINANCE_SIZE_EXT */
+ { 45724, 0x00002800 }, /* GL_TEXTURE_MAG_FILTER */
+ { 45746, 0x00000BA8 }, /* GL_TEXTURE_MATRIX */
+ { 45764, 0x0000898F }, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */
+ { 45804, 0x000084FE }, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ { 45834, 0x0000836B }, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ { 45862, 0x00008369 }, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ { 45890, 0x0000836A }, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ { 45918, 0x0000813D }, /* GL_TEXTURE_MAX_LEVEL */
+ { 45939, 0x0000813B }, /* GL_TEXTURE_MAX_LOD */
+ { 45958, 0x00002801 }, /* GL_TEXTURE_MIN_FILTER */
+ { 45980, 0x0000813A }, /* GL_TEXTURE_MIN_LOD */
+ { 45999, 0x00008066 }, /* GL_TEXTURE_PRIORITY */
+ { 46019, 0x000085B7 }, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ { 46049, 0x000085B8 }, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ { 46080, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE */
+ { 46101, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_ARB */
+ { 46126, 0x000084F5 }, /* GL_TEXTURE_RECTANGLE_NV */
+ { 46150, 0x0000805C }, /* GL_TEXTURE_RED_SIZE */
+ { 46170, 0x0000805C }, /* GL_TEXTURE_RED_SIZE_EXT */
+ { 46194, 0x00008067 }, /* GL_TEXTURE_RESIDENT */
+ { 46214, 0x00008C3F }, /* GL_TEXTURE_SHARED_SIZE */
+ { 46237, 0x00000BA5 }, /* GL_TEXTURE_STACK_DEPTH */
+ { 46260, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE */
+ { 46284, 0x000088F1 }, /* GL_TEXTURE_STENCIL_SIZE_EXT */
+ { 46312, 0x000085BC }, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ { 46342, 0x00008065 }, /* GL_TEXTURE_TOO_LARGE_EXT */
+ { 46367, 0x0000888F }, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ { 46401, 0x00001000 }, /* GL_TEXTURE_WIDTH */
+ { 46418, 0x00008072 }, /* GL_TEXTURE_WRAP_R */
+ { 46436, 0x00008072 }, /* GL_TEXTURE_WRAP_R_OES */
+ { 46458, 0x00002802 }, /* GL_TEXTURE_WRAP_S */
+ { 46476, 0x00002803 }, /* GL_TEXTURE_WRAP_T */
+ { 46494, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */
+ { 46513, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */
+ { 46533, 0x00008648 }, /* GL_TRACK_MATRIX_NV */
+ { 46552, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ { 46581, 0x00001000 }, /* GL_TRANSFORM_BIT */
+ { 46598, 0x00008E22 }, /* GL_TRANSFORM_FEEDBACK */
+ { 46620, 0x00008E25 }, /* GL_TRANSFORM_FEEDBACK_BINDING */
+ { 46650, 0x00008C8E }, /* GL_TRANSFORM_FEEDBACK_BUFFER */
+ { 46679, 0x00008E24 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
+ { 46715, 0x00008C8F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING */
+ { 46752, 0x00008C8F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT */
+ { 46793, 0x00008C8E }, /* GL_TRANSFORM_FEEDBACK_BUFFER_EXT */
+ { 46826, 0x00008C7F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE */
+ { 46860, 0x00008C7F }, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT */
+ { 46898, 0x00008E23 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
+ { 46934, 0x00008C85 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE */
+ { 46968, 0x00008C85 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT */
+ { 47006, 0x00008C84 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_START */
+ { 47041, 0x00008C84 }, /* GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT */
+ { 47080, 0x00008C88 }, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN */
+ { 47121, 0x00008C88 }, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT */
+ { 47166, 0x00008C83 }, /* GL_TRANSFORM_FEEDBACK_VARYINGS */
+ { 47197, 0x00008C83 }, /* GL_TRANSFORM_FEEDBACK_VARYINGS_EXT */
+ { 47232, 0x00008C76 }, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH */
+ { 47273, 0x00008C76 }, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT */
+ { 47318, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */
+ { 47344, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */
+ { 47374, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ { 47406, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ { 47436, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */
+ { 47470, 0x0000862C }, /* GL_TRANSPOSE_NV */
+ { 47486, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ { 47517, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */
+ { 47552, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ { 47580, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */
+ { 47612, 0x00000004 }, /* GL_TRIANGLES */
+ { 47625, 0x0000000C }, /* GL_TRIANGLES_ADJACENCY */
+ { 47648, 0x0000000C }, /* GL_TRIANGLES_ADJACENCY_ARB */
+ { 47675, 0x00000006 }, /* GL_TRIANGLE_FAN */
+ { 47691, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */
+ { 47712, 0x00000005 }, /* GL_TRIANGLE_STRIP */
+ { 47730, 0x0000000D }, /* GL_TRIANGLE_STRIP_ADJACENCY */
+ { 47758, 0x0000000D }, /* GL_TRIANGLE_STRIP_ADJACENCY_ARB */
+ { 47790, 0x00000001 }, /* GL_TRUE */
+ { 47798, 0x00008A1C }, /* GL_UNDEFINED_APPLE */
+ { 47817, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */
+ { 47837, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */
+ { 47860, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */
+ { 47880, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */
+ { 47901, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */
+ { 47923, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */
+ { 47945, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */
+ { 47965, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */
+ { 47986, 0x00009118 }, /* GL_UNSIGNALED */
+ { 48000, 0x00001401 }, /* GL_UNSIGNED_BYTE */
+ { 48017, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ { 48044, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */
+ { 48067, 0x00001405 }, /* GL_UNSIGNED_INT */
+ { 48083, 0x00008C3B }, /* GL_UNSIGNED_INT_10F_11F_11F_REV */
+ { 48115, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */
+ { 48142, 0x00008DF6 }, /* GL_UNSIGNED_INT_10_10_10_2_OES */
+ { 48173, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */
+ { 48194, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */
+ { 48219, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */
+ { 48243, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_OES */
+ { 48268, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ { 48299, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV_EXT */
+ { 48334, 0x00008C3E }, /* GL_UNSIGNED_INT_5_9_9_9_REV */
+ { 48362, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */
+ { 48386, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ { 48414, 0x00008DD1 }, /* GL_UNSIGNED_INT_SAMPLER_1D */
+ { 48441, 0x00008DD6 }, /* GL_UNSIGNED_INT_SAMPLER_1D_ARRAY */
+ { 48474, 0x00008DD6 }, /* GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT */
+ { 48511, 0x00008DD1 }, /* GL_UNSIGNED_INT_SAMPLER_1D_EXT */
+ { 48542, 0x00008DD2 }, /* GL_UNSIGNED_INT_SAMPLER_2D */
+ { 48569, 0x00008DD7 }, /* GL_UNSIGNED_INT_SAMPLER_2D_ARRAY */
+ { 48602, 0x00008DD7 }, /* GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT */
+ { 48639, 0x00008DD2 }, /* GL_UNSIGNED_INT_SAMPLER_2D_EXT */
+ { 48670, 0x00008DD5 }, /* GL_UNSIGNED_INT_SAMPLER_2D_RECT */
+ { 48702, 0x00008DD5 }, /* GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT */
+ { 48738, 0x00008DD3 }, /* GL_UNSIGNED_INT_SAMPLER_3D */
+ { 48765, 0x00008DD3 }, /* GL_UNSIGNED_INT_SAMPLER_3D_EXT */
+ { 48796, 0x00008DD8 }, /* GL_UNSIGNED_INT_SAMPLER_BUFFER */
+ { 48827, 0x00008DD8 }, /* GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT */
+ { 48862, 0x00008DD4 }, /* GL_UNSIGNED_INT_SAMPLER_CUBE */
+ { 48891, 0x00008DD4 }, /* GL_UNSIGNED_INT_SAMPLER_CUBE_EXT */
+ { 48924, 0x00008DC6 }, /* GL_UNSIGNED_INT_VEC2 */
+ { 48945, 0x00008DC6 }, /* GL_UNSIGNED_INT_VEC2_EXT */
+ { 48970, 0x00008DC7 }, /* GL_UNSIGNED_INT_VEC3 */
+ { 48991, 0x00008DC7 }, /* GL_UNSIGNED_INT_VEC3_EXT */
+ { 49016, 0x00008DC8 }, /* GL_UNSIGNED_INT_VEC4 */
+ { 49037, 0x00008DC8 }, /* GL_UNSIGNED_INT_VEC4_EXT */
+ { 49062, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */
+ { 49085, 0x00001403 }, /* GL_UNSIGNED_SHORT */
+ { 49103, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ { 49133, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT */
+ { 49167, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ { 49193, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ { 49223, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT */
+ { 49257, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ { 49283, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */
+ { 49307, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ { 49335, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ { 49363, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */
+ { 49390, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ { 49422, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */
+ { 49453, 0x00008CA2 }, /* GL_UPPER_LEFT */
+ { 49467, 0x00002A20 }, /* GL_V2F */
+ { 49474, 0x00002A21 }, /* GL_V3F */
+ { 49481, 0x00008B83 }, /* GL_VALIDATE_STATUS */
+ { 49500, 0x00001F00 }, /* GL_VENDOR */
+ { 49510, 0x00001F02 }, /* GL_VERSION */
+ { 49521, 0x00008074 }, /* GL_VERTEX_ARRAY */
+ { 49537, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */
+ { 49561, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */
+ { 49591, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ { 49622, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */
+ { 49657, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */
+ { 49681, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */
+ { 49702, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */
+ { 49725, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */
+ { 49746, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ { 49773, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ { 49801, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ { 49829, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ { 49857, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ { 49885, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ { 49913, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ { 49941, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ { 49968, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ { 49995, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ { 50022, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ { 50049, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ { 50076, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ { 50103, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ { 50130, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ { 50157, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ { 50184, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ { 50222, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */
+ { 50264, 0x000088FE }, /* GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB */
+ { 50299, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ { 50330, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */
+ { 50365, 0x000088FD }, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER */
+ { 50396, 0x000088FD }, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT */
+ { 50431, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ { 50465, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */
+ { 50503, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ { 50534, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */
+ { 50569, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ { 50597, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */
+ { 50629, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ { 50659, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */
+ { 50693, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ { 50721, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */
+ { 50753, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */
+ { 50773, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */
+ { 50795, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ { 50824, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */
+ { 50845, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */
+ { 50874, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */
+ { 50907, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */
+ { 50939, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ { 50966, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */
+ { 50997, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ { 51027, 0x00008B31 }, /* GL_VERTEX_SHADER */
+ { 51044, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */
+ { 51065, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */
+ { 51092, 0x00000BA2 }, /* GL_VIEWPORT */
+ { 51104, 0x00000800 }, /* GL_VIEWPORT_BIT */
+ { 51120, 0x00008A1A }, /* GL_VOLATILE_APPLE */
+ { 51138, 0x0000911D }, /* GL_WAIT_FAILED */
+ { 51153, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */
+ { 51173, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ { 51204, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */
+ { 51239, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_OES */
+ { 51274, 0x000086AD }, /* GL_WEIGHT_ARRAY_OES */
+ { 51294, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ { 51322, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_OES */
+ { 51350, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ { 51375, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_OES */
+ { 51400, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ { 51427, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_OES */
+ { 51454, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ { 51479, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_OES */
+ { 51504, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */
+ { 51528, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */
+ { 51547, 0x000088B9 }, /* GL_WRITE_ONLY */
+ { 51561, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */
+ { 51579, 0x000088B9 }, /* GL_WRITE_ONLY_OES */
+ { 51597, 0x00001506 }, /* GL_XOR */
+ { 51604, 0x000085B9 }, /* GL_YCBCR_422_APPLE */
+ { 51623, 0x00008757 }, /* GL_YCBCR_MESA */
+ { 51637, 0x00000000 }, /* GL_ZERO */
+ { 51645, 0x00000D16 }, /* GL_ZOOM_X */
+ { 51655, 0x00000D17 }, /* GL_ZOOM_Y */
+};
+
+static const unsigned reduced_enums[1555] =
+{
+ 538, /* GL_FALSE */
+ 831, /* GL_LINES */
+ 835, /* GL_LINE_LOOP */
+ 842, /* GL_LINE_STRIP */
+ 2145, /* GL_TRIANGLES */
+ 2150, /* GL_TRIANGLE_STRIP */
+ 2148, /* GL_TRIANGLE_FAN */
+ 1512, /* GL_QUADS */
+ 1516, /* GL_QUAD_STRIP */
+ 1383, /* GL_POLYGON */
+ 832, /* GL_LINES_ADJACENCY */
+ 843, /* GL_LINE_STRIP_ADJACENCY */
+ 2146, /* GL_TRIANGLES_ADJACENCY */
+ 2151, /* GL_TRIANGLE_STRIP_ADJACENCY */
+ 1395, /* GL_POLYGON_STIPPLE_BIT */
+ 1338, /* GL_PIXEL_MODE_BIT */
+ 818, /* GL_LIGHTING_BIT */
+ 572, /* GL_FOG_BIT */
+ 8, /* GL_ACCUM */
+ 854, /* GL_LOAD */
+ 1601, /* GL_RETURN */
+ 1205, /* GL_MULT */
+ 24, /* GL_ADD */
+ 1221, /* GL_NEVER */
+ 808, /* GL_LESS */
+ 528, /* GL_EQUAL */
+ 807, /* GL_LEQUAL */
+ 695, /* GL_GREATER */
+ 1238, /* GL_NOTEQUAL */
+ 694, /* GL_GEQUAL */
+ 55, /* GL_ALWAYS */
+ 1809, /* GL_SRC_COLOR */
+ 1271, /* GL_ONE_MINUS_SRC_COLOR */
+ 1807, /* GL_SRC_ALPHA */
+ 1270, /* GL_ONE_MINUS_SRC_ALPHA */
+ 507, /* GL_DST_ALPHA */
+ 1268, /* GL_ONE_MINUS_DST_ALPHA */
+ 508, /* GL_DST_COLOR */
+ 1269, /* GL_ONE_MINUS_DST_COLOR */
+ 1808, /* GL_SRC_ALPHA_SATURATE */
+ 671, /* GL_FRONT_LEFT */
+ 672, /* GL_FRONT_RIGHT */
+ 77, /* GL_BACK_LEFT */
+ 78, /* GL_BACK_RIGHT */
+ 668, /* GL_FRONT */
+ 76, /* GL_BACK */
+ 806, /* GL_LEFT */
+ 1691, /* GL_RIGHT */
+ 669, /* GL_FRONT_AND_BACK */
+ 71, /* GL_AUX0 */
+ 72, /* GL_AUX1 */
+ 73, /* GL_AUX2 */
+ 74, /* GL_AUX3 */
+ 794, /* GL_INVALID_ENUM */
+ 799, /* GL_INVALID_VALUE */
+ 798, /* GL_INVALID_OPERATION */
+ 1814, /* GL_STACK_OVERFLOW */
+ 1815, /* GL_STACK_UNDERFLOW */
+ 1296, /* GL_OUT_OF_MEMORY */
+ 795, /* GL_INVALID_FRAMEBUFFER_OPERATION */
+ 0, /* GL_2D */
+ 2, /* GL_3D */
+ 3, /* GL_3D_COLOR */
+ 4, /* GL_3D_COLOR_TEXTURE */
+ 6, /* GL_4D_COLOR_TEXTURE */
+ 1316, /* GL_PASS_THROUGH_TOKEN */
+ 1382, /* GL_POINT_TOKEN */
+ 845, /* GL_LINE_TOKEN */
+ 1396, /* GL_POLYGON_TOKEN */
+ 87, /* GL_BITMAP_TOKEN */
+ 506, /* GL_DRAW_PIXEL_TOKEN */
+ 352, /* GL_COPY_PIXEL_TOKEN */
+ 836, /* GL_LINE_RESET_TOKEN */
+ 531, /* GL_EXP */
+ 532, /* GL_EXP2 */
+ 389, /* GL_CW */
+ 154, /* GL_CCW */
+ 187, /* GL_COEFF */
+ 1293, /* GL_ORDER */
+ 443, /* GL_DOMAIN */
+ 362, /* GL_CURRENT_COLOR */
+ 365, /* GL_CURRENT_INDEX */
+ 371, /* GL_CURRENT_NORMAL */
+ 385, /* GL_CURRENT_TEXTURE_COORDS */
+ 377, /* GL_CURRENT_RASTER_COLOR */
+ 379, /* GL_CURRENT_RASTER_INDEX */
+ 383, /* GL_CURRENT_RASTER_TEXTURE_COORDS */
+ 380, /* GL_CURRENT_RASTER_POSITION */
+ 381, /* GL_CURRENT_RASTER_POSITION_VALID */
+ 378, /* GL_CURRENT_RASTER_DISTANCE */
+ 1374, /* GL_POINT_SMOOTH */
+ 1358, /* GL_POINT_SIZE */
+ 1373, /* GL_POINT_SIZE_RANGE */
+ 1364, /* GL_POINT_SIZE_GRANULARITY */
+ 837, /* GL_LINE_SMOOTH */
+ 846, /* GL_LINE_WIDTH */
+ 848, /* GL_LINE_WIDTH_RANGE */
+ 847, /* GL_LINE_WIDTH_GRANULARITY */
+ 839, /* GL_LINE_STIPPLE */
+ 840, /* GL_LINE_STIPPLE_PATTERN */
+ 841, /* GL_LINE_STIPPLE_REPEAT */
+ 853, /* GL_LIST_MODE */
+ 1060, /* GL_MAX_LIST_NESTING */
+ 850, /* GL_LIST_BASE */
+ 852, /* GL_LIST_INDEX */
+ 1385, /* GL_POLYGON_MODE */
+ 1392, /* GL_POLYGON_SMOOTH */
+ 1394, /* GL_POLYGON_STIPPLE */
+ 517, /* GL_EDGE_FLAG */
+ 355, /* GL_CULL_FACE */
+ 356, /* GL_CULL_FACE_MODE */
+ 670, /* GL_FRONT_FACE */
+ 817, /* GL_LIGHTING */
+ 822, /* GL_LIGHT_MODEL_LOCAL_VIEWER */
+ 823, /* GL_LIGHT_MODEL_TWO_SIDE */
+ 819, /* GL_LIGHT_MODEL_AMBIENT */
+ 1756, /* GL_SHADE_MODEL */
+ 235, /* GL_COLOR_MATERIAL_FACE */
+ 236, /* GL_COLOR_MATERIAL_PARAMETER */
+ 234, /* GL_COLOR_MATERIAL */
+ 571, /* GL_FOG */
+ 593, /* GL_FOG_INDEX */
+ 589, /* GL_FOG_DENSITY */
+ 597, /* GL_FOG_START */
+ 591, /* GL_FOG_END */
+ 594, /* GL_FOG_MODE */
+ 573, /* GL_FOG_COLOR */
+ 428, /* GL_DEPTH_RANGE */
+ 437, /* GL_DEPTH_TEST */
+ 440, /* GL_DEPTH_WRITEMASK */
+ 413, /* GL_DEPTH_CLEAR_VALUE */
+ 427, /* GL_DEPTH_FUNC */
+ 12, /* GL_ACCUM_CLEAR_VALUE */
+ 1859, /* GL_STENCIL_TEST */
+ 1840, /* GL_STENCIL_CLEAR_VALUE */
+ 1842, /* GL_STENCIL_FUNC */
+ 1861, /* GL_STENCIL_VALUE_MASK */
+ 1841, /* GL_STENCIL_FAIL */
+ 1856, /* GL_STENCIL_PASS_DEPTH_FAIL */
+ 1857, /* GL_STENCIL_PASS_DEPTH_PASS */
+ 1858, /* GL_STENCIL_REF */
+ 1862, /* GL_STENCIL_WRITEMASK */
+ 1010, /* GL_MATRIX_MODE */
+ 1227, /* GL_NORMALIZE */
+ 2277, /* GL_VIEWPORT */
+ 1200, /* GL_MODELVIEW_STACK_DEPTH */
+ 1486, /* GL_PROJECTION_STACK_DEPTH */
+ 2099, /* GL_TEXTURE_STACK_DEPTH */
+ 1197, /* GL_MODELVIEW_MATRIX */
+ 1484, /* GL_PROJECTION_MATRIX */
+ 2079, /* GL_TEXTURE_MATRIX */
+ 69, /* GL_ATTRIB_STACK_DEPTH */
+ 169, /* GL_CLIENT_ATTRIB_STACK_DEPTH */
+ 51, /* GL_ALPHA_TEST */
+ 52, /* GL_ALPHA_TEST_FUNC */
+ 53, /* GL_ALPHA_TEST_REF */
+ 442, /* GL_DITHER */
+ 91, /* GL_BLEND_DST */
+ 105, /* GL_BLEND_SRC */
+ 88, /* GL_BLEND */
+ 856, /* GL_LOGIC_OP_MODE */
+ 743, /* GL_INDEX_LOGIC_OP */
+ 233, /* GL_COLOR_LOGIC_OP */
+ 75, /* GL_AUX_BUFFERS */
+ 453, /* GL_DRAW_BUFFER */
+ 1539, /* GL_READ_BUFFER */
+ 1733, /* GL_SCISSOR_BOX */
+ 1734, /* GL_SCISSOR_TEST */
+ 742, /* GL_INDEX_CLEAR_VALUE */
+ 747, /* GL_INDEX_WRITEMASK */
+ 230, /* GL_COLOR_CLEAR_VALUE */
+ 272, /* GL_COLOR_WRITEMASK */
+ 744, /* GL_INDEX_MODE */
+ 1680, /* GL_RGBA_MODE */
+ 452, /* GL_DOUBLEBUFFER */
+ 1863, /* GL_STEREO */
+ 1593, /* GL_RENDER_MODE */
+ 1317, /* GL_PERSPECTIVE_CORRECTION_HINT */
+ 1375, /* GL_POINT_SMOOTH_HINT */
+ 838, /* GL_LINE_SMOOTH_HINT */
+ 1393, /* GL_POLYGON_SMOOTH_HINT */
+ 592, /* GL_FOG_HINT */
+ 2059, /* GL_TEXTURE_GEN_S */
+ 2061, /* GL_TEXTURE_GEN_T */
+ 2058, /* GL_TEXTURE_GEN_R */
+ 2057, /* GL_TEXTURE_GEN_Q */
+ 1330, /* GL_PIXEL_MAP_I_TO_I */
+ 1336, /* GL_PIXEL_MAP_S_TO_S */
+ 1332, /* GL_PIXEL_MAP_I_TO_R */
+ 1328, /* GL_PIXEL_MAP_I_TO_G */
+ 1326, /* GL_PIXEL_MAP_I_TO_B */
+ 1324, /* GL_PIXEL_MAP_I_TO_A */
+ 1334, /* GL_PIXEL_MAP_R_TO_R */
+ 1322, /* GL_PIXEL_MAP_G_TO_G */
+ 1320, /* GL_PIXEL_MAP_B_TO_B */
+ 1318, /* GL_PIXEL_MAP_A_TO_A */
+ 1331, /* GL_PIXEL_MAP_I_TO_I_SIZE */
+ 1337, /* GL_PIXEL_MAP_S_TO_S_SIZE */
+ 1333, /* GL_PIXEL_MAP_I_TO_R_SIZE */
+ 1329, /* GL_PIXEL_MAP_I_TO_G_SIZE */
+ 1327, /* GL_PIXEL_MAP_I_TO_B_SIZE */
+ 1325, /* GL_PIXEL_MAP_I_TO_A_SIZE */
+ 1335, /* GL_PIXEL_MAP_R_TO_R_SIZE */
+ 1323, /* GL_PIXEL_MAP_G_TO_G_SIZE */
+ 1321, /* GL_PIXEL_MAP_B_TO_B_SIZE */
+ 1319, /* GL_PIXEL_MAP_A_TO_A_SIZE */
+ 2162, /* GL_UNPACK_SWAP_BYTES */
+ 2157, /* GL_UNPACK_LSB_FIRST */
+ 2158, /* GL_UNPACK_ROW_LENGTH */
+ 2161, /* GL_UNPACK_SKIP_ROWS */
+ 2160, /* GL_UNPACK_SKIP_PIXELS */
+ 2155, /* GL_UNPACK_ALIGNMENT */
+ 1305, /* GL_PACK_SWAP_BYTES */
+ 1300, /* GL_PACK_LSB_FIRST */
+ 1301, /* GL_PACK_ROW_LENGTH */
+ 1304, /* GL_PACK_SKIP_ROWS */
+ 1303, /* GL_PACK_SKIP_PIXELS */
+ 1297, /* GL_PACK_ALIGNMENT */
+ 951, /* GL_MAP_COLOR */
+ 956, /* GL_MAP_STENCIL */
+ 746, /* GL_INDEX_SHIFT */
+ 745, /* GL_INDEX_OFFSET */
+ 1555, /* GL_RED_SCALE */
+ 1551, /* GL_RED_BIAS */
+ 2303, /* GL_ZOOM_X */
+ 2304, /* GL_ZOOM_Y */
+ 701, /* GL_GREEN_SCALE */
+ 697, /* GL_GREEN_BIAS */
+ 115, /* GL_BLUE_SCALE */
+ 111, /* GL_BLUE_BIAS */
+ 50, /* GL_ALPHA_SCALE */
+ 47, /* GL_ALPHA_BIAS */
+ 429, /* GL_DEPTH_SCALE */
+ 405, /* GL_DEPTH_BIAS */
+ 1042, /* GL_MAX_EVAL_ORDER */
+ 1059, /* GL_MAX_LIGHTS */
+ 1022, /* GL_MAX_CLIP_DISTANCES */
+ 1115, /* GL_MAX_TEXTURE_SIZE */
+ 1066, /* GL_MAX_PIXEL_MAP_TABLE */
+ 1018, /* GL_MAX_ATTRIB_STACK_DEPTH */
+ 1062, /* GL_MAX_MODELVIEW_STACK_DEPTH */
+ 1063, /* GL_MAX_NAME_STACK_DEPTH */
+ 1094, /* GL_MAX_PROJECTION_STACK_DEPTH */
+ 1116, /* GL_MAX_TEXTURE_STACK_DEPTH */
+ 1142, /* GL_MAX_VIEWPORT_DIMS */
+ 1019, /* GL_MAX_CLIENT_ATTRIB_STACK_DEPTH */
+ 1873, /* GL_SUBPIXEL_BITS */
+ 741, /* GL_INDEX_BITS */
+ 1552, /* GL_RED_BITS */
+ 698, /* GL_GREEN_BITS */
+ 112, /* GL_BLUE_BITS */
+ 48, /* GL_ALPHA_BITS */
+ 406, /* GL_DEPTH_BITS */
+ 1837, /* GL_STENCIL_BITS */
+ 14, /* GL_ACCUM_RED_BITS */
+ 13, /* GL_ACCUM_GREEN_BITS */
+ 10, /* GL_ACCUM_BLUE_BITS */
+ 9, /* GL_ACCUM_ALPHA_BITS */
+ 1214, /* GL_NAME_STACK_DEPTH */
+ 70, /* GL_AUTO_NORMAL */
+ 897, /* GL_MAP1_COLOR_4 */
+ 900, /* GL_MAP1_INDEX */
+ 901, /* GL_MAP1_NORMAL */
+ 902, /* GL_MAP1_TEXTURE_COORD_1 */
+ 903, /* GL_MAP1_TEXTURE_COORD_2 */
+ 904, /* GL_MAP1_TEXTURE_COORD_3 */
+ 905, /* GL_MAP1_TEXTURE_COORD_4 */
+ 906, /* GL_MAP1_VERTEX_3 */
+ 907, /* GL_MAP1_VERTEX_4 */
+ 924, /* GL_MAP2_COLOR_4 */
+ 927, /* GL_MAP2_INDEX */
+ 928, /* GL_MAP2_NORMAL */
+ 929, /* GL_MAP2_TEXTURE_COORD_1 */
+ 930, /* GL_MAP2_TEXTURE_COORD_2 */
+ 931, /* GL_MAP2_TEXTURE_COORD_3 */
+ 932, /* GL_MAP2_TEXTURE_COORD_4 */
+ 933, /* GL_MAP2_VERTEX_3 */
+ 934, /* GL_MAP2_VERTEX_4 */
+ 898, /* GL_MAP1_GRID_DOMAIN */
+ 899, /* GL_MAP1_GRID_SEGMENTS */
+ 925, /* GL_MAP2_GRID_DOMAIN */
+ 926, /* GL_MAP2_GRID_SEGMENTS */
+ 1956, /* GL_TEXTURE_1D */
+ 1959, /* GL_TEXTURE_2D */
+ 541, /* GL_FEEDBACK_BUFFER_POINTER */
+ 542, /* GL_FEEDBACK_BUFFER_SIZE */
+ 543, /* GL_FEEDBACK_BUFFER_TYPE */
+ 1743, /* GL_SELECTION_BUFFER_POINTER */
+ 1744, /* GL_SELECTION_BUFFER_SIZE */
+ 2105, /* GL_TEXTURE_WIDTH */
+ 2065, /* GL_TEXTURE_HEIGHT */
+ 2009, /* GL_TEXTURE_COMPONENTS */
+ 1987, /* GL_TEXTURE_BORDER_COLOR */
+ 1986, /* GL_TEXTURE_BORDER */
+ 444, /* GL_DONT_CARE */
+ 539, /* GL_FASTEST */
+ 1222, /* GL_NICEST */
+ 56, /* GL_AMBIENT */
+ 441, /* GL_DIFFUSE */
+ 1796, /* GL_SPECULAR */
+ 1397, /* GL_POSITION */
+ 1799, /* GL_SPOT_DIRECTION */
+ 1800, /* GL_SPOT_EXPONENT */
+ 1798, /* GL_SPOT_CUTOFF */
+ 320, /* GL_CONSTANT_ATTENUATION */
+ 826, /* GL_LINEAR_ATTENUATION */
+ 1511, /* GL_QUADRATIC_ATTENUATION */
+ 287, /* GL_COMPILE */
+ 288, /* GL_COMPILE_AND_EXECUTE */
+ 149, /* GL_BYTE */
+ 2164, /* GL_UNSIGNED_BYTE */
+ 1761, /* GL_SHORT */
+ 2203, /* GL_UNSIGNED_SHORT */
+ 749, /* GL_INT */
+ 2167, /* GL_UNSIGNED_INT */
+ 552, /* GL_FLOAT */
+ 1, /* GL_2_BYTES */
+ 5, /* GL_3_BYTES */
+ 7, /* GL_4_BYTES */
+ 451, /* GL_DOUBLE */
+ 702, /* GL_HALF_FLOAT */
+ 547, /* GL_FIXED */
+ 165, /* GL_CLEAR */
+ 58, /* GL_AND */
+ 60, /* GL_AND_REVERSE */
+ 350, /* GL_COPY */
+ 59, /* GL_AND_INVERTED */
+ 1225, /* GL_NOOP */
+ 2299, /* GL_XOR */
+ 1292, /* GL_OR */
+ 1226, /* GL_NOR */
+ 529, /* GL_EQUIV */
+ 802, /* GL_INVERT */
+ 1295, /* GL_OR_REVERSE */
+ 351, /* GL_COPY_INVERTED */
+ 1294, /* GL_OR_INVERTED */
+ 1215, /* GL_NAND */
+ 1750, /* GL_SET */
+ 526, /* GL_EMISSION */
+ 1760, /* GL_SHININESS */
+ 57, /* GL_AMBIENT_AND_DIFFUSE */
+ 232, /* GL_COLOR_INDEXES */
+ 1164, /* GL_MODELVIEW */
+ 1483, /* GL_PROJECTION */
+ 1891, /* GL_TEXTURE */
+ 188, /* GL_COLOR */
+ 398, /* GL_DEPTH */
+ 1822, /* GL_STENCIL */
+ 231, /* GL_COLOR_INDEX */
+ 1843, /* GL_STENCIL_INDEX */
+ 414, /* GL_DEPTH_COMPONENT */
+ 1548, /* GL_RED */
+ 696, /* GL_GREEN */
+ 110, /* GL_BLUE */
+ 32, /* GL_ALPHA */
+ 1604, /* GL_RGB */
+ 1644, /* GL_RGBA */
+ 860, /* GL_LUMINANCE */
+ 887, /* GL_LUMINANCE_ALPHA */
+ 86, /* GL_BITMAP */
+ 1347, /* GL_POINT */
+ 824, /* GL_LINE */
+ 544, /* GL_FILL */
+ 1562, /* GL_RENDER */
+ 540, /* GL_FEEDBACK */
+ 1742, /* GL_SELECT */
+ 551, /* GL_FLAT */
+ 1771, /* GL_SMOOTH */
+ 803, /* GL_KEEP */
+ 1595, /* GL_REPLACE */
+ 731, /* GL_INCR */
+ 394, /* GL_DECR */
+ 2220, /* GL_VENDOR */
+ 1592, /* GL_RENDERER */
+ 2221, /* GL_VERSION */
+ 533, /* GL_EXTENSIONS */
+ 1692, /* GL_S */
+ 1882, /* GL_T */
+ 1531, /* GL_R */
+ 1510, /* GL_Q */
+ 1201, /* GL_MODULATE */
+ 393, /* GL_DECAL */
+ 2052, /* GL_TEXTURE_ENV_MODE */
+ 2051, /* GL_TEXTURE_ENV_COLOR */
+ 2050, /* GL_TEXTURE_ENV */
+ 534, /* GL_EYE_LINEAR */
+ 1253, /* GL_OBJECT_LINEAR */
+ 1797, /* GL_SPHERE_MAP */
+ 2055, /* GL_TEXTURE_GEN_MODE */
+ 1255, /* GL_OBJECT_PLANE */
+ 535, /* GL_EYE_PLANE */
+ 1216, /* GL_NEAREST */
+ 825, /* GL_LINEAR */
+ 1220, /* GL_NEAREST_MIPMAP_NEAREST */
+ 830, /* GL_LINEAR_MIPMAP_NEAREST */
+ 1219, /* GL_NEAREST_MIPMAP_LINEAR */
+ 829, /* GL_LINEAR_MIPMAP_LINEAR */
+ 2078, /* GL_TEXTURE_MAG_FILTER */
+ 2087, /* GL_TEXTURE_MIN_FILTER */
+ 2108, /* GL_TEXTURE_WRAP_S */
+ 2109, /* GL_TEXTURE_WRAP_T */
+ 155, /* GL_CLAMP */
+ 1594, /* GL_REPEAT */
+ 1391, /* GL_POLYGON_OFFSET_UNITS */
+ 1390, /* GL_POLYGON_OFFSET_POINT */
+ 1389, /* GL_POLYGON_OFFSET_LINE */
+ 1534, /* GL_R3_G3_B2 */
+ 2217, /* GL_V2F */
+ 2218, /* GL_V3F */
+ 152, /* GL_C4UB_V2F */
+ 153, /* GL_C4UB_V3F */
+ 150, /* GL_C3F_V3F */
+ 1213, /* GL_N3F_V3F */
+ 151, /* GL_C4F_N3F_V3F */
+ 1887, /* GL_T2F_V3F */
+ 1889, /* GL_T4F_V4F */
+ 1885, /* GL_T2F_C4UB_V3F */
+ 1883, /* GL_T2F_C3F_V3F */
+ 1886, /* GL_T2F_N3F_V3F */
+ 1884, /* GL_T2F_C4F_N3F_V3F */
+ 1888, /* GL_T4F_C4F_N3F_V4F */
+ 172, /* GL_CLIP_DISTANCE0 */
+ 173, /* GL_CLIP_DISTANCE1 */
+ 174, /* GL_CLIP_DISTANCE2 */
+ 175, /* GL_CLIP_DISTANCE3 */
+ 176, /* GL_CLIP_DISTANCE4 */
+ 177, /* GL_CLIP_DISTANCE5 */
+ 178, /* GL_CLIP_DISTANCE6 */
+ 179, /* GL_CLIP_DISTANCE7 */
+ 809, /* GL_LIGHT0 */
+ 810, /* GL_LIGHT1 */
+ 811, /* GL_LIGHT2 */
+ 812, /* GL_LIGHT3 */
+ 813, /* GL_LIGHT4 */
+ 814, /* GL_LIGHT5 */
+ 815, /* GL_LIGHT6 */
+ 816, /* GL_LIGHT7 */
+ 706, /* GL_HINT_BIT */
+ 322, /* GL_CONSTANT_COLOR */
+ 1266, /* GL_ONE_MINUS_CONSTANT_COLOR */
+ 317, /* GL_CONSTANT_ALPHA */
+ 1264, /* GL_ONE_MINUS_CONSTANT_ALPHA */
+ 89, /* GL_BLEND_COLOR */
+ 673, /* GL_FUNC_ADD */
+ 1145, /* GL_MIN */
+ 1013, /* GL_MAX */
+ 96, /* GL_BLEND_EQUATION */
+ 679, /* GL_FUNC_SUBTRACT */
+ 676, /* GL_FUNC_REVERSE_SUBTRACT */
+ 330, /* GL_CONVOLUTION_1D */
+ 331, /* GL_CONVOLUTION_2D */
+ 1745, /* GL_SEPARABLE_2D */
+ 334, /* GL_CONVOLUTION_BORDER_MODE */
+ 338, /* GL_CONVOLUTION_FILTER_SCALE */
+ 336, /* GL_CONVOLUTION_FILTER_BIAS */
+ 1549, /* GL_REDUCE */
+ 340, /* GL_CONVOLUTION_FORMAT */
+ 344, /* GL_CONVOLUTION_WIDTH */
+ 342, /* GL_CONVOLUTION_HEIGHT */
+ 1032, /* GL_MAX_CONVOLUTION_WIDTH */
+ 1030, /* GL_MAX_CONVOLUTION_HEIGHT */
+ 1430, /* GL_POST_CONVOLUTION_RED_SCALE */
+ 1426, /* GL_POST_CONVOLUTION_GREEN_SCALE */
+ 1421, /* GL_POST_CONVOLUTION_BLUE_SCALE */
+ 1417, /* GL_POST_CONVOLUTION_ALPHA_SCALE */
+ 1428, /* GL_POST_CONVOLUTION_RED_BIAS */
+ 1424, /* GL_POST_CONVOLUTION_GREEN_BIAS */
+ 1419, /* GL_POST_CONVOLUTION_BLUE_BIAS */
+ 1415, /* GL_POST_CONVOLUTION_ALPHA_BIAS */
+ 707, /* GL_HISTOGRAM */
+ 1490, /* GL_PROXY_HISTOGRAM */
+ 723, /* GL_HISTOGRAM_WIDTH */
+ 713, /* GL_HISTOGRAM_FORMAT */
+ 719, /* GL_HISTOGRAM_RED_SIZE */
+ 715, /* GL_HISTOGRAM_GREEN_SIZE */
+ 710, /* GL_HISTOGRAM_BLUE_SIZE */
+ 708, /* GL_HISTOGRAM_ALPHA_SIZE */
+ 717, /* GL_HISTOGRAM_LUMINANCE_SIZE */
+ 721, /* GL_HISTOGRAM_SINK */
+ 1146, /* GL_MINMAX */
+ 1148, /* GL_MINMAX_FORMAT */
+ 1150, /* GL_MINMAX_SINK */
+ 1890, /* GL_TABLE_TOO_LARGE_EXT */
+ 2166, /* GL_UNSIGNED_BYTE_3_3_2 */
+ 2206, /* GL_UNSIGNED_SHORT_4_4_4_4 */
+ 2209, /* GL_UNSIGNED_SHORT_5_5_5_1 */
+ 2178, /* GL_UNSIGNED_INT_8_8_8_8 */
+ 2169, /* GL_UNSIGNED_INT_10_10_10_2 */
+ 1388, /* GL_POLYGON_OFFSET_FILL */
+ 1387, /* GL_POLYGON_OFFSET_FACTOR */
+ 1386, /* GL_POLYGON_OFFSET_BIAS */
+ 1598, /* GL_RESCALE_NORMAL */
+ 41, /* GL_ALPHA4 */
+ 43, /* GL_ALPHA8 */
+ 33, /* GL_ALPHA12 */
+ 35, /* GL_ALPHA16 */
+ 875, /* GL_LUMINANCE4 */
+ 881, /* GL_LUMINANCE8 */
+ 861, /* GL_LUMINANCE12 */
+ 867, /* GL_LUMINANCE16 */
+ 876, /* GL_LUMINANCE4_ALPHA4 */
+ 879, /* GL_LUMINANCE6_ALPHA2 */
+ 884, /* GL_LUMINANCE8_ALPHA8 */
+ 864, /* GL_LUMINANCE12_ALPHA4 */
+ 862, /* GL_LUMINANCE12_ALPHA12 */
+ 870, /* GL_LUMINANCE16_ALPHA16 */
+ 750, /* GL_INTENSITY */
+ 759, /* GL_INTENSITY4 */
+ 761, /* GL_INTENSITY8 */
+ 751, /* GL_INTENSITY12 */
+ 753, /* GL_INTENSITY16 */
+ 1619, /* GL_RGB2_EXT */
+ 1625, /* GL_RGB4 */
+ 1628, /* GL_RGB5 */
+ 1635, /* GL_RGB8 */
+ 1605, /* GL_RGB10 */
+ 1609, /* GL_RGB12 */
+ 1611, /* GL_RGB16 */
+ 1655, /* GL_RGBA2 */
+ 1662, /* GL_RGBA4 */
+ 1631, /* GL_RGB5_A1 */
+ 1667, /* GL_RGBA8 */
+ 1606, /* GL_RGB10_A2 */
+ 1645, /* GL_RGBA12 */
+ 1647, /* GL_RGBA16 */
+ 2095, /* GL_TEXTURE_RED_SIZE */
+ 2063, /* GL_TEXTURE_GREEN_SIZE */
+ 1984, /* GL_TEXTURE_BLUE_SIZE */
+ 1964, /* GL_TEXTURE_ALPHA_SIZE */
+ 2076, /* GL_TEXTURE_LUMINANCE_SIZE */
+ 2067, /* GL_TEXTURE_INTENSITY_SIZE */
+ 1596, /* GL_REPLACE_EXT */
+ 1494, /* GL_PROXY_TEXTURE_1D */
+ 1498, /* GL_PROXY_TEXTURE_2D */
+ 2103, /* GL_TEXTURE_TOO_LARGE_EXT */
+ 2089, /* GL_TEXTURE_PRIORITY */
+ 2097, /* GL_TEXTURE_RESIDENT */
+ 1967, /* GL_TEXTURE_BINDING_1D */
+ 1970, /* GL_TEXTURE_BINDING_2D */
+ 1973, /* GL_TEXTURE_BINDING_3D */
+ 1302, /* GL_PACK_SKIP_IMAGES */
+ 1298, /* GL_PACK_IMAGE_HEIGHT */
+ 2159, /* GL_UNPACK_SKIP_IMAGES */
+ 2156, /* GL_UNPACK_IMAGE_HEIGHT */
+ 1962, /* GL_TEXTURE_3D */
+ 1502, /* GL_PROXY_TEXTURE_3D */
+ 2047, /* GL_TEXTURE_DEPTH */
+ 2106, /* GL_TEXTURE_WRAP_R */
+ 1014, /* GL_MAX_3D_TEXTURE_SIZE */
+ 2222, /* GL_VERTEX_ARRAY */
+ 1228, /* GL_NORMAL_ARRAY */
+ 189, /* GL_COLOR_ARRAY */
+ 735, /* GL_INDEX_ARRAY */
+ 2017, /* GL_TEXTURE_COORD_ARRAY */
+ 518, /* GL_EDGE_FLAG_ARRAY */
+ 2228, /* GL_VERTEX_ARRAY_SIZE */
+ 2230, /* GL_VERTEX_ARRAY_TYPE */
+ 2229, /* GL_VERTEX_ARRAY_STRIDE */
+ 1233, /* GL_NORMAL_ARRAY_TYPE */
+ 1232, /* GL_NORMAL_ARRAY_STRIDE */
+ 193, /* GL_COLOR_ARRAY_SIZE */
+ 195, /* GL_COLOR_ARRAY_TYPE */
+ 194, /* GL_COLOR_ARRAY_STRIDE */
+ 740, /* GL_INDEX_ARRAY_TYPE */
+ 739, /* GL_INDEX_ARRAY_STRIDE */
+ 2021, /* GL_TEXTURE_COORD_ARRAY_SIZE */
+ 2023, /* GL_TEXTURE_COORD_ARRAY_TYPE */
+ 2022, /* GL_TEXTURE_COORD_ARRAY_STRIDE */
+ 522, /* GL_EDGE_FLAG_ARRAY_STRIDE */
+ 2227, /* GL_VERTEX_ARRAY_POINTER */
+ 1231, /* GL_NORMAL_ARRAY_POINTER */
+ 192, /* GL_COLOR_ARRAY_POINTER */
+ 738, /* GL_INDEX_ARRAY_POINTER */
+ 2020, /* GL_TEXTURE_COORD_ARRAY_POINTER */
+ 521, /* GL_EDGE_FLAG_ARRAY_POINTER */
+ 1206, /* GL_MULTISAMPLE */
+ 1719, /* GL_SAMPLE_ALPHA_TO_COVERAGE */
+ 1721, /* GL_SAMPLE_ALPHA_TO_ONE */
+ 1726, /* GL_SAMPLE_COVERAGE */
+ 1723, /* GL_SAMPLE_BUFFERS */
+ 1714, /* GL_SAMPLES */
+ 1730, /* GL_SAMPLE_COVERAGE_VALUE */
+ 1728, /* GL_SAMPLE_COVERAGE_INVERT */
+ 237, /* GL_COLOR_MATRIX */
+ 239, /* GL_COLOR_MATRIX_STACK_DEPTH */
+ 1026, /* GL_MAX_COLOR_MATRIX_STACK_DEPTH */
+ 1413, /* GL_POST_COLOR_MATRIX_RED_SCALE */
+ 1409, /* GL_POST_COLOR_MATRIX_GREEN_SCALE */
+ 1404, /* GL_POST_COLOR_MATRIX_BLUE_SCALE */
+ 1400, /* GL_POST_COLOR_MATRIX_ALPHA_SCALE */
+ 1411, /* GL_POST_COLOR_MATRIX_RED_BIAS */
+ 1407, /* GL_POST_COLOR_MATRIX_GREEN_BIAS */
+ 1402, /* GL_POST_COLOR_MATRIX_BLUE_BIAS */
+ 1398, /* GL_POST_COLOR_MATRIX_ALPHA_BIAS */
+ 2000, /* GL_TEXTURE_COLOR_TABLE_SGI */
+ 1503, /* GL_PROXY_TEXTURE_COLOR_TABLE_SGI */
+ 2002, /* GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+ 94, /* GL_BLEND_DST_RGB */
+ 108, /* GL_BLEND_SRC_RGB */
+ 92, /* GL_BLEND_DST_ALPHA */
+ 106, /* GL_BLEND_SRC_ALPHA */
+ 243, /* GL_COLOR_TABLE */
+ 1423, /* GL_POST_CONVOLUTION_COLOR_TABLE */
+ 1406, /* GL_POST_COLOR_MATRIX_COLOR_TABLE */
+ 1489, /* GL_PROXY_COLOR_TABLE */
+ 1493, /* GL_PROXY_POST_CONVOLUTION_COLOR_TABLE */
+ 1492, /* GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE */
+ 267, /* GL_COLOR_TABLE_SCALE */
+ 247, /* GL_COLOR_TABLE_BIAS */
+ 252, /* GL_COLOR_TABLE_FORMAT */
+ 269, /* GL_COLOR_TABLE_WIDTH */
+ 264, /* GL_COLOR_TABLE_RED_SIZE */
+ 255, /* GL_COLOR_TABLE_GREEN_SIZE */
+ 249, /* GL_COLOR_TABLE_BLUE_SIZE */
+ 244, /* GL_COLOR_TABLE_ALPHA_SIZE */
+ 261, /* GL_COLOR_TABLE_LUMINANCE_SIZE */
+ 258, /* GL_COLOR_TABLE_INTENSITY_SIZE */
+ 79, /* GL_BGR */
+ 80, /* GL_BGRA */
+ 1041, /* GL_MAX_ELEMENTS_VERTICES */
+ 1040, /* GL_MAX_ELEMENTS_INDICES */
+ 2066, /* GL_TEXTURE_INDEX_SIZE_EXT */
+ 186, /* GL_CLIP_VOLUME_CLIPPING_HINT_EXT */
+ 1369, /* GL_POINT_SIZE_MIN */
+ 1365, /* GL_POINT_SIZE_MAX */
+ 1354, /* GL_POINT_FADE_THRESHOLD_SIZE */
+ 1350, /* GL_POINT_DISTANCE_ATTENUATION */
+ 159, /* GL_CLAMP_TO_BORDER */
+ 162, /* GL_CLAMP_TO_EDGE */
+ 2088, /* GL_TEXTURE_MIN_LOD */
+ 2086, /* GL_TEXTURE_MAX_LOD */
+ 1966, /* GL_TEXTURE_BASE_LEVEL */
+ 2085, /* GL_TEXTURE_MAX_LEVEL */
+ 726, /* GL_IGNORE_BORDER_HP */
+ 321, /* GL_CONSTANT_BORDER_HP */
+ 1597, /* GL_REPLICATE_BORDER_HP */
+ 332, /* GL_CONVOLUTION_BORDER_COLOR */
+ 1261, /* GL_OCCLUSION_TEST_HP */
+ 1262, /* GL_OCCLUSION_TEST_RESULT_HP */
+ 827, /* GL_LINEAR_CLIPMAP_LINEAR_SGIX */
+ 1994, /* GL_TEXTURE_CLIPMAP_CENTER_SGIX */
+ 1996, /* GL_TEXTURE_CLIPMAP_FRAME_SGIX */
+ 1998, /* GL_TEXTURE_CLIPMAP_OFFSET_SGIX */
+ 1999, /* GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1997, /* GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX */
+ 1995, /* GL_TEXTURE_CLIPMAP_DEPTH_SGIX */
+ 1020, /* GL_MAX_CLIPMAP_DEPTH_SGIX */
+ 1021, /* GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX */
+ 1433, /* GL_POST_TEXTURE_FILTER_BIAS_SGIX */
+ 1435, /* GL_POST_TEXTURE_FILTER_SCALE_SGIX */
+ 1432, /* GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX */
+ 1434, /* GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX */
+ 2074, /* GL_TEXTURE_LOD_BIAS_S_SGIX */
+ 2075, /* GL_TEXTURE_LOD_BIAS_T_SGIX */
+ 2073, /* GL_TEXTURE_LOD_BIAS_R_SGIX */
+ 682, /* GL_GENERATE_MIPMAP */
+ 683, /* GL_GENERATE_MIPMAP_HINT */
+ 595, /* GL_FOG_OFFSET_SGIX */
+ 596, /* GL_FOG_OFFSET_VALUE_SGIX */
+ 2008, /* GL_TEXTURE_COMPARE_SGIX */
+ 2007, /* GL_TEXTURE_COMPARE_OPERATOR_SGIX */
+ 2070, /* GL_TEXTURE_LEQUAL_R_SGIX */
+ 2062, /* GL_TEXTURE_GEQUAL_R_SGIX */
+ 415, /* GL_DEPTH_COMPONENT16 */
+ 419, /* GL_DEPTH_COMPONENT24 */
+ 423, /* GL_DEPTH_COMPONENT32 */
+ 357, /* GL_CULL_VERTEX_EXT */
+ 359, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */
+ 358, /* GL_CULL_VERTEX_EYE_POSITION_EXT */
+ 2295, /* GL_WRAP_BORDER_SUN */
+ 2001, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */
+ 820, /* GL_LIGHT_MODEL_COLOR_CONTROL */
+ 1764, /* GL_SINGLE_COLOR */
+ 1748, /* GL_SEPARATE_SPECULAR_COLOR */
+ 1759, /* GL_SHARED_TEXTURE_PALETTE_EXT */
+ 607, /* GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+ 608, /* GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+ 619, /* GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+ 610, /* GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+ 606, /* GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+ 605, /* GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+ 609, /* GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+ 620, /* GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+ 637, /* GL_FRAMEBUFFER_DEFAULT */
+ 664, /* GL_FRAMEBUFFER_UNDEFINED */
+ 431, /* GL_DEPTH_STENCIL_ATTACHMENT */
+ 896, /* GL_MAJOR_VERSION */
+ 1152, /* GL_MINOR_VERSION */
+ 1242, /* GL_NUM_EXTENSIONS */
+ 327, /* GL_CONTEXT_FLAGS */
+ 734, /* GL_INDEX */
+ 409, /* GL_DEPTH_BUFFER */
+ 1838, /* GL_STENCIL_BUFFER */
+ 298, /* GL_COMPRESSED_RED */
+ 299, /* GL_COMPRESSED_RG */
+ 2165, /* GL_UNSIGNED_BYTE_2_3_3_REV */
+ 2210, /* GL_UNSIGNED_SHORT_5_6_5 */
+ 2211, /* GL_UNSIGNED_SHORT_5_6_5_REV */
+ 2207, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */
+ 2204, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */
+ 2179, /* GL_UNSIGNED_INT_8_8_8_8_REV */
+ 2175, /* GL_UNSIGNED_INT_2_10_10_10_REV */
+ 2083, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */
+ 2084, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */
+ 2082, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */
+ 1156, /* GL_MIRRORED_REPEAT */
+ 1685, /* GL_RGB_S3TC */
+ 1627, /* GL_RGB4_S3TC */
+ 1681, /* GL_RGBA_S3TC */
+ 1666, /* GL_RGBA4_S3TC */
+ 1675, /* GL_RGBA_DXT5_S3TC */
+ 1663, /* GL_RGBA4_DXT5_S3TC */
+ 309, /* GL_COMPRESSED_RGB_S3TC_DXT1_EXT */
+ 304, /* GL_COMPRESSED_RGBA_S3TC_DXT1_EXT */
+ 305, /* GL_COMPRESSED_RGBA_S3TC_DXT3_EXT */
+ 306, /* GL_COMPRESSED_RGBA_S3TC_DXT5_EXT */
+ 1218, /* GL_NEAREST_CLIPMAP_NEAREST_SGIX */
+ 1217, /* GL_NEAREST_CLIPMAP_LINEAR_SGIX */
+ 828, /* GL_LINEAR_CLIPMAP_NEAREST_SGIX */
+ 582, /* GL_FOG_COORDINATE_SOURCE */
+ 574, /* GL_FOG_COORD */
+ 598, /* GL_FRAGMENT_DEPTH */
+ 363, /* GL_CURRENT_FOG_COORD */
+ 581, /* GL_FOG_COORDINATE_ARRAY_TYPE */
+ 580, /* GL_FOG_COORDINATE_ARRAY_STRIDE */
+ 579, /* GL_FOG_COORDINATE_ARRAY_POINTER */
+ 576, /* GL_FOG_COORDINATE_ARRAY */
+ 241, /* GL_COLOR_SUM */
+ 384, /* GL_CURRENT_SECONDARY_COLOR */
+ 1739, /* GL_SECONDARY_COLOR_ARRAY_SIZE */
+ 1741, /* GL_SECONDARY_COLOR_ARRAY_TYPE */
+ 1740, /* GL_SECONDARY_COLOR_ARRAY_STRIDE */
+ 1738, /* GL_SECONDARY_COLOR_ARRAY_POINTER */
+ 1735, /* GL_SECONDARY_COLOR_ARRAY */
+ 382, /* GL_CURRENT_RASTER_SECONDARY_COLOR */
+ 29, /* GL_ALIASED_POINT_SIZE_RANGE */
+ 28, /* GL_ALIASED_LINE_WIDTH_RANGE */
+ 1892, /* GL_TEXTURE0 */
+ 1894, /* GL_TEXTURE1 */
+ 1916, /* GL_TEXTURE2 */
+ 1938, /* GL_TEXTURE3 */
+ 1944, /* GL_TEXTURE4 */
+ 1946, /* GL_TEXTURE5 */
+ 1948, /* GL_TEXTURE6 */
+ 1950, /* GL_TEXTURE7 */
+ 1952, /* GL_TEXTURE8 */
+ 1954, /* GL_TEXTURE9 */
+ 1895, /* GL_TEXTURE10 */
+ 1897, /* GL_TEXTURE11 */
+ 1899, /* GL_TEXTURE12 */
+ 1901, /* GL_TEXTURE13 */
+ 1903, /* GL_TEXTURE14 */
+ 1905, /* GL_TEXTURE15 */
+ 1907, /* GL_TEXTURE16 */
+ 1909, /* GL_TEXTURE17 */
+ 1911, /* GL_TEXTURE18 */
+ 1913, /* GL_TEXTURE19 */
+ 1917, /* GL_TEXTURE20 */
+ 1919, /* GL_TEXTURE21 */
+ 1921, /* GL_TEXTURE22 */
+ 1923, /* GL_TEXTURE23 */
+ 1925, /* GL_TEXTURE24 */
+ 1927, /* GL_TEXTURE25 */
+ 1929, /* GL_TEXTURE26 */
+ 1931, /* GL_TEXTURE27 */
+ 1933, /* GL_TEXTURE28 */
+ 1935, /* GL_TEXTURE29 */
+ 1939, /* GL_TEXTURE30 */
+ 1941, /* GL_TEXTURE31 */
+ 19, /* GL_ACTIVE_TEXTURE */
+ 166, /* GL_CLIENT_ACTIVE_TEXTURE */
+ 1117, /* GL_MAX_TEXTURE_UNITS */
+ 2138, /* GL_TRANSPOSE_MODELVIEW_MATRIX */
+ 2141, /* GL_TRANSPOSE_PROJECTION_MATRIX */
+ 2143, /* GL_TRANSPOSE_TEXTURE_MATRIX */
+ 2135, /* GL_TRANSPOSE_COLOR_MATRIX */
+ 1874, /* GL_SUBTRACT */
+ 1098, /* GL_MAX_RENDERBUFFER_SIZE */
+ 290, /* GL_COMPRESSED_ALPHA */
+ 294, /* GL_COMPRESSED_LUMINANCE */
+ 295, /* GL_COMPRESSED_LUMINANCE_ALPHA */
+ 292, /* GL_COMPRESSED_INTENSITY */
+ 300, /* GL_COMPRESSED_RGB */
+ 301, /* GL_COMPRESSED_RGBA */
+ 2015, /* GL_TEXTURE_COMPRESSION_HINT */
+ 2092, /* GL_TEXTURE_RECTANGLE */
+ 1980, /* GL_TEXTURE_BINDING_RECTANGLE */
+ 1506, /* GL_PROXY_TEXTURE_RECTANGLE */
+ 1095, /* GL_MAX_RECTANGLE_TEXTURE_SIZE */
+ 430, /* GL_DEPTH_STENCIL */
+ 2171, /* GL_UNSIGNED_INT_24_8 */
+ 1112, /* GL_MAX_TEXTURE_LOD_BIAS */
+ 2081, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */
+ 1114, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */
+ 2053, /* GL_TEXTURE_FILTER_CONTROL */
+ 2071, /* GL_TEXTURE_LOD_BIAS */
+ 274, /* GL_COMBINE4 */
+ 1104, /* GL_MAX_SHININESS_NV */
+ 1105, /* GL_MAX_SPOT_EXPONENT_NV */
+ 732, /* GL_INCR_WRAP */
+ 395, /* GL_DECR_WRAP */
+ 1176, /* GL_MODELVIEW1_ARB */
+ 1234, /* GL_NORMAL_MAP */
+ 1557, /* GL_REFLECTION_MAP */
+ 2025, /* GL_TEXTURE_CUBE_MAP */
+ 1977, /* GL_TEXTURE_BINDING_CUBE_MAP */
+ 2037, /* GL_TEXTURE_CUBE_MAP_POSITIVE_X */
+ 2027, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_X */
+ 2040, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Y */
+ 2030, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Y */
+ 2043, /* GL_TEXTURE_CUBE_MAP_POSITIVE_Z */
+ 2033, /* GL_TEXTURE_CUBE_MAP_NEGATIVE_Z */
+ 1504, /* GL_PROXY_TEXTURE_CUBE_MAP */
+ 1034, /* GL_MAX_CUBE_MAP_TEXTURE_SIZE */
+ 1212, /* GL_MULTISAMPLE_FILTER_HINT_NV */
+ 1447, /* GL_PRIMITIVE_RESTART_NV */
+ 1446, /* GL_PRIMITIVE_RESTART_INDEX_NV */
+ 590, /* GL_FOG_DISTANCE_MODE_NV */
+ 537, /* GL_EYE_RADIAL_NV */
+ 536, /* GL_EYE_PLANE_ABSOLUTE_NV */
+ 273, /* GL_COMBINE */
+ 280, /* GL_COMBINE_RGB */
+ 275, /* GL_COMBINE_ALPHA */
+ 1686, /* GL_RGB_SCALE */
+ 25, /* GL_ADD_SIGNED */
+ 768, /* GL_INTERPOLATE */
+ 316, /* GL_CONSTANT */
+ 1439, /* GL_PRIMARY_COLOR */
+ 1436, /* GL_PREVIOUS */
+ 1779, /* GL_SOURCE0_RGB */
+ 1785, /* GL_SOURCE1_RGB */
+ 1791, /* GL_SOURCE2_RGB */
+ 1795, /* GL_SOURCE3_RGB_NV */
+ 1776, /* GL_SOURCE0_ALPHA */
+ 1782, /* GL_SOURCE1_ALPHA */
+ 1788, /* GL_SOURCE2_ALPHA */
+ 1794, /* GL_SOURCE3_ALPHA_NV */
+ 1275, /* GL_OPERAND0_RGB */
+ 1281, /* GL_OPERAND1_RGB */
+ 1287, /* GL_OPERAND2_RGB */
+ 1291, /* GL_OPERAND3_RGB_NV */
+ 1272, /* GL_OPERAND0_ALPHA */
+ 1278, /* GL_OPERAND1_ALPHA */
+ 1284, /* GL_OPERAND2_ALPHA */
+ 1290, /* GL_OPERAND3_ALPHA_NV */
+ 137, /* GL_BUFFER_OBJECT_APPLE */
+ 2223, /* GL_VERTEX_ARRAY_BINDING */
+ 2090, /* GL_TEXTURE_RANGE_LENGTH_APPLE */
+ 2091, /* GL_TEXTURE_RANGE_POINTER_APPLE */
+ 2300, /* GL_YCBCR_422_APPLE */
+ 2212, /* GL_UNSIGNED_SHORT_8_8_APPLE */
+ 2214, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */
+ 2102, /* GL_TEXTURE_STORAGE_HINT_APPLE */
+ 1865, /* GL_STORAGE_PRIVATE_APPLE */
+ 1864, /* GL_STORAGE_CACHED_APPLE */
+ 1866, /* GL_STORAGE_SHARED_APPLE */
+ 1766, /* GL_SLICE_ACCUM_SUN */
+ 1515, /* GL_QUAD_MESH_SUN */
+ 2149, /* GL_TRIANGLE_MESH_SUN */
+ 2265, /* GL_VERTEX_PROGRAM_ARB */
+ 2276, /* GL_VERTEX_STATE_PROGRAM_NV */
+ 2250, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */
+ 2258, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */
+ 2260, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */
+ 2262, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */
+ 386, /* GL_CURRENT_VERTEX_ATTRIB */
+ 1460, /* GL_PROGRAM_LENGTH_ARB */
+ 1476, /* GL_PROGRAM_STRING_ARB */
+ 1199, /* GL_MODELVIEW_PROJECTION_NV */
+ 725, /* GL_IDENTITY_NV */
+ 800, /* GL_INVERSE_NV */
+ 2140, /* GL_TRANSPOSE_NV */
+ 801, /* GL_INVERSE_TRANSPOSE_NV */
+ 1079, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */
+ 1078, /* GL_MAX_PROGRAM_MATRICES_ARB */
+ 960, /* GL_MATRIX0_NV */
+ 972, /* GL_MATRIX1_NV */
+ 984, /* GL_MATRIX2_NV */
+ 988, /* GL_MATRIX3_NV */
+ 990, /* GL_MATRIX4_NV */
+ 992, /* GL_MATRIX5_NV */
+ 994, /* GL_MATRIX6_NV */
+ 996, /* GL_MATRIX7_NV */
+ 369, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */
+ 366, /* GL_CURRENT_MATRIX_ARB */
+ 1473, /* GL_PROGRAM_POINT_SIZE */
+ 2271, /* GL_VERTEX_PROGRAM_TWO_SIDE */
+ 1472, /* GL_PROGRAM_PARAMETER_NV */
+ 2256, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */
+ 1478, /* GL_PROGRAM_TARGET_NV */
+ 1475, /* GL_PROGRAM_RESIDENT_NV */
+ 2112, /* GL_TRACK_MATRIX_NV */
+ 2113, /* GL_TRACK_MATRIX_TRANSFORM_NV */
+ 2266, /* GL_VERTEX_PROGRAM_BINDING_NV */
+ 1454, /* GL_PROGRAM_ERROR_POSITION_ARB */
+ 411, /* GL_DEPTH_CLAMP */
+ 2231, /* GL_VERTEX_ATTRIB_ARRAY0_NV */
+ 2238, /* GL_VERTEX_ATTRIB_ARRAY1_NV */
+ 2239, /* GL_VERTEX_ATTRIB_ARRAY2_NV */
+ 2240, /* GL_VERTEX_ATTRIB_ARRAY3_NV */
+ 2241, /* GL_VERTEX_ATTRIB_ARRAY4_NV */
+ 2242, /* GL_VERTEX_ATTRIB_ARRAY5_NV */
+ 2243, /* GL_VERTEX_ATTRIB_ARRAY6_NV */
+ 2244, /* GL_VERTEX_ATTRIB_ARRAY7_NV */
+ 2245, /* GL_VERTEX_ATTRIB_ARRAY8_NV */
+ 2246, /* GL_VERTEX_ATTRIB_ARRAY9_NV */
+ 2232, /* GL_VERTEX_ATTRIB_ARRAY10_NV */
+ 2233, /* GL_VERTEX_ATTRIB_ARRAY11_NV */
+ 2234, /* GL_VERTEX_ATTRIB_ARRAY12_NV */
+ 2235, /* GL_VERTEX_ATTRIB_ARRAY13_NV */
+ 2236, /* GL_VERTEX_ATTRIB_ARRAY14_NV */
+ 2237, /* GL_VERTEX_ATTRIB_ARRAY15_NV */
+ 908, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */
+ 915, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */
+ 916, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */
+ 917, /* GL_MAP1_VERTEX_ATTRIB3_4_NV */
+ 918, /* GL_MAP1_VERTEX_ATTRIB4_4_NV */
+ 919, /* GL_MAP1_VERTEX_ATTRIB5_4_NV */
+ 920, /* GL_MAP1_VERTEX_ATTRIB6_4_NV */
+ 921, /* GL_MAP1_VERTEX_ATTRIB7_4_NV */
+ 922, /* GL_MAP1_VERTEX_ATTRIB8_4_NV */
+ 923, /* GL_MAP1_VERTEX_ATTRIB9_4_NV */
+ 909, /* GL_MAP1_VERTEX_ATTRIB10_4_NV */
+ 910, /* GL_MAP1_VERTEX_ATTRIB11_4_NV */
+ 911, /* GL_MAP1_VERTEX_ATTRIB12_4_NV */
+ 912, /* GL_MAP1_VERTEX_ATTRIB13_4_NV */
+ 913, /* GL_MAP1_VERTEX_ATTRIB14_4_NV */
+ 914, /* GL_MAP1_VERTEX_ATTRIB15_4_NV */
+ 935, /* GL_MAP2_VERTEX_ATTRIB0_4_NV */
+ 942, /* GL_MAP2_VERTEX_ATTRIB1_4_NV */
+ 943, /* GL_MAP2_VERTEX_ATTRIB2_4_NV */
+ 944, /* GL_MAP2_VERTEX_ATTRIB3_4_NV */
+ 945, /* GL_MAP2_VERTEX_ATTRIB4_4_NV */
+ 946, /* GL_MAP2_VERTEX_ATTRIB5_4_NV */
+ 947, /* GL_MAP2_VERTEX_ATTRIB6_4_NV */
+ 1453, /* GL_PROGRAM_BINDING_ARB */
+ 949, /* GL_MAP2_VERTEX_ATTRIB8_4_NV */
+ 950, /* GL_MAP2_VERTEX_ATTRIB9_4_NV */
+ 936, /* GL_MAP2_VERTEX_ATTRIB10_4_NV */
+ 937, /* GL_MAP2_VERTEX_ATTRIB11_4_NV */
+ 938, /* GL_MAP2_VERTEX_ATTRIB12_4_NV */
+ 939, /* GL_MAP2_VERTEX_ATTRIB13_4_NV */
+ 940, /* GL_MAP2_VERTEX_ATTRIB14_4_NV */
+ 941, /* GL_MAP2_VERTEX_ATTRIB15_4_NV */
+ 2013, /* GL_TEXTURE_COMPRESSED_IMAGE_SIZE */
+ 2010, /* GL_TEXTURE_COMPRESSED */
+ 1240, /* GL_NUM_COMPRESSED_TEXTURE_FORMATS */
+ 314, /* GL_COMPRESSED_TEXTURE_FORMATS */
+ 1139, /* GL_MAX_VERTEX_UNITS_ARB */
+ 23, /* GL_ACTIVE_VERTEX_UNITS_ARB */
+ 2294, /* GL_WEIGHT_SUM_UNITY_ARB */
+ 2264, /* GL_VERTEX_BLEND_ARB */
+ 388, /* GL_CURRENT_WEIGHT_ARB */
+ 2292, /* GL_WEIGHT_ARRAY_TYPE_ARB */
+ 2290, /* GL_WEIGHT_ARRAY_STRIDE_ARB */
+ 2288, /* GL_WEIGHT_ARRAY_SIZE_ARB */
+ 2286, /* GL_WEIGHT_ARRAY_POINTER_ARB */
+ 2281, /* GL_WEIGHT_ARRAY_ARB */
+ 445, /* GL_DOT3_RGB */
+ 446, /* GL_DOT3_RGBA */
+ 308, /* GL_COMPRESSED_RGB_FXT1_3DFX */
+ 303, /* GL_COMPRESSED_RGBA_FXT1_3DFX */
+ 1207, /* GL_MULTISAMPLE_3DFX */
+ 1724, /* GL_SAMPLE_BUFFERS_3DFX */
+ 1715, /* GL_SAMPLES_3DFX */
+ 1187, /* GL_MODELVIEW2_ARB */
+ 1190, /* GL_MODELVIEW3_ARB */
+ 1191, /* GL_MODELVIEW4_ARB */
+ 1192, /* GL_MODELVIEW5_ARB */
+ 1193, /* GL_MODELVIEW6_ARB */
+ 1194, /* GL_MODELVIEW7_ARB */
+ 1195, /* GL_MODELVIEW8_ARB */
+ 1196, /* GL_MODELVIEW9_ARB */
+ 1166, /* GL_MODELVIEW10_ARB */
+ 1167, /* GL_MODELVIEW11_ARB */
+ 1168, /* GL_MODELVIEW12_ARB */
+ 1169, /* GL_MODELVIEW13_ARB */
+ 1170, /* GL_MODELVIEW14_ARB */
+ 1171, /* GL_MODELVIEW15_ARB */
+ 1172, /* GL_MODELVIEW16_ARB */
+ 1173, /* GL_MODELVIEW17_ARB */
+ 1174, /* GL_MODELVIEW18_ARB */
+ 1175, /* GL_MODELVIEW19_ARB */
+ 1177, /* GL_MODELVIEW20_ARB */
+ 1178, /* GL_MODELVIEW21_ARB */
+ 1179, /* GL_MODELVIEW22_ARB */
+ 1180, /* GL_MODELVIEW23_ARB */
+ 1181, /* GL_MODELVIEW24_ARB */
+ 1182, /* GL_MODELVIEW25_ARB */
+ 1183, /* GL_MODELVIEW26_ARB */
+ 1184, /* GL_MODELVIEW27_ARB */
+ 1185, /* GL_MODELVIEW28_ARB */
+ 1186, /* GL_MODELVIEW29_ARB */
+ 1188, /* GL_MODELVIEW30_ARB */
+ 1189, /* GL_MODELVIEW31_ARB */
+ 450, /* GL_DOT3_RGB_EXT */
+ 448, /* GL_DOT3_RGBA_EXT */
+ 1160, /* GL_MIRROR_CLAMP_EXT */
+ 1163, /* GL_MIRROR_CLAMP_TO_EDGE_EXT */
+ 1202, /* GL_MODULATE_ADD_ATI */
+ 1203, /* GL_MODULATE_SIGNED_ADD_ATI */
+ 1204, /* GL_MODULATE_SUBTRACT_ATI */
+ 2301, /* GL_YCBCR_MESA */
+ 1299, /* GL_PACK_INVERT_MESA */
+ 391, /* GL_DEBUG_OBJECT_MESA */
+ 392, /* GL_DEBUG_PRINT_MESA */
+ 390, /* GL_DEBUG_ASSERT_MESA */
+ 139, /* GL_BUFFER_SIZE */
+ 141, /* GL_BUFFER_USAGE */
+ 145, /* GL_BUMP_ROT_MATRIX_ATI */
+ 146, /* GL_BUMP_ROT_MATRIX_SIZE_ATI */
+ 144, /* GL_BUMP_NUM_TEX_UNITS_ATI */
+ 148, /* GL_BUMP_TEX_UNITS_ATI */
+ 510, /* GL_DUDV_ATI */
+ 509, /* GL_DU8DV8_ATI */
+ 143, /* GL_BUMP_ENVMAP_ATI */
+ 147, /* GL_BUMP_TARGET_ATI */
+ 1243, /* GL_NUM_PROGRAM_BINARY_FORMATS_OES */
+ 1451, /* GL_PROGRAM_BINARY_FORMATS_OES */
+ 1828, /* GL_STENCIL_BACK_FUNC */
+ 1826, /* GL_STENCIL_BACK_FAIL */
+ 1830, /* GL_STENCIL_BACK_PASS_DEPTH_FAIL */
+ 1832, /* GL_STENCIL_BACK_PASS_DEPTH_PASS */
+ 599, /* GL_FRAGMENT_PROGRAM_ARB */
+ 1449, /* GL_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 1481, /* GL_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 1480, /* GL_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 1463, /* GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 1469, /* GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 1468, /* GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 1068, /* GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB */
+ 1093, /* GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB */
+ 1092, /* GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB */
+ 1081, /* GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB */
+ 1087, /* GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB */
+ 1086, /* GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB */
+ 1657, /* GL_RGBA32F */
+ 1620, /* GL_RGB32F */
+ 1648, /* GL_RGBA16F */
+ 1612, /* GL_RGB16F */
+ 1676, /* GL_RGBA_FLOAT_MODE_ARB */
+ 1037, /* GL_MAX_DRAW_BUFFERS */
+ 454, /* GL_DRAW_BUFFER0 */
+ 457, /* GL_DRAW_BUFFER1 */
+ 478, /* GL_DRAW_BUFFER2 */
+ 481, /* GL_DRAW_BUFFER3 */
+ 484, /* GL_DRAW_BUFFER4 */
+ 487, /* GL_DRAW_BUFFER5 */
+ 490, /* GL_DRAW_BUFFER6 */
+ 493, /* GL_DRAW_BUFFER7 */
+ 496, /* GL_DRAW_BUFFER8 */
+ 499, /* GL_DRAW_BUFFER9 */
+ 458, /* GL_DRAW_BUFFER10 */
+ 461, /* GL_DRAW_BUFFER11 */
+ 464, /* GL_DRAW_BUFFER12 */
+ 467, /* GL_DRAW_BUFFER13 */
+ 470, /* GL_DRAW_BUFFER14 */
+ 473, /* GL_DRAW_BUFFER15 */
+ 97, /* GL_BLEND_EQUATION_ALPHA */
+ 1011, /* GL_MATRIX_PALETTE_ARB */
+ 1061, /* GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB */
+ 1064, /* GL_MAX_PALETTE_MATRICES_ARB */
+ 372, /* GL_CURRENT_PALETTE_MATRIX_ARB */
+ 999, /* GL_MATRIX_INDEX_ARRAY_ARB */
+ 367, /* GL_CURRENT_MATRIX_INDEX_ARB */
+ 1004, /* GL_MATRIX_INDEX_ARRAY_SIZE_ARB */
+ 1008, /* GL_MATRIX_INDEX_ARRAY_TYPE_ARB */
+ 1006, /* GL_MATRIX_INDEX_ARRAY_STRIDE_ARB */
+ 1002, /* GL_MATRIX_INDEX_ARRAY_POINTER_ARB */
+ 2048, /* GL_TEXTURE_DEPTH_SIZE */
+ 438, /* GL_DEPTH_TEXTURE_MODE */
+ 2005, /* GL_TEXTURE_COMPARE_MODE */
+ 2003, /* GL_TEXTURE_COMPARE_FUNC */
+ 284, /* GL_COMPARE_REF_TO_TEXTURE */
+ 1376, /* GL_POINT_SPRITE */
+ 346, /* GL_COORD_REPLACE */
+ 1381, /* GL_POINT_SPRITE_R_MODE_NV */
+ 1521, /* GL_QUERY_COUNTER_BITS */
+ 375, /* GL_CURRENT_QUERY */
+ 1525, /* GL_QUERY_RESULT */
+ 1527, /* GL_QUERY_RESULT_AVAILABLE */
+ 1131, /* GL_MAX_VERTEX_ATTRIBS */
+ 2254, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */
+ 436, /* GL_DEPTH_STENCIL_TO_RGBA_NV */
+ 435, /* GL_DEPTH_STENCIL_TO_BGRA_NV */
+ 1108, /* GL_MAX_TEXTURE_COORDS */
+ 1110, /* GL_MAX_TEXTURE_IMAGE_UNITS */
+ 1456, /* GL_PROGRAM_ERROR_STRING_ARB */
+ 1458, /* GL_PROGRAM_FORMAT_ASCII_ARB */
+ 1457, /* GL_PROGRAM_FORMAT_ARB */
+ 2104, /* GL_TEXTURE_UNSIGNED_REMAP_MODE_NV */
+ 408, /* GL_DEPTH_BOUNDS_TEST_EXT */
+ 407, /* GL_DEPTH_BOUNDS_EXT */
+ 61, /* GL_ARRAY_BUFFER */
+ 523, /* GL_ELEMENT_ARRAY_BUFFER */
+ 62, /* GL_ARRAY_BUFFER_BINDING */
+ 524, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */
+ 2225, /* GL_VERTEX_ARRAY_BUFFER_BINDING */
+ 1229, /* GL_NORMAL_ARRAY_BUFFER_BINDING */
+ 190, /* GL_COLOR_ARRAY_BUFFER_BINDING */
+ 736, /* GL_INDEX_ARRAY_BUFFER_BINDING */
+ 2018, /* GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING */
+ 519, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */
+ 1736, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */
+ 577, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */
+ 2282, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */
+ 2247, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */
+ 1459, /* GL_PROGRAM_INSTRUCTIONS_ARB */
+ 1074, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */
+ 1465, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 1083, /* GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB */
+ 1479, /* GL_PROGRAM_TEMPORARIES_ARB */
+ 1089, /* GL_MAX_PROGRAM_TEMPORARIES_ARB */
+ 1467, /* GL_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 1085, /* GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB */
+ 1471, /* GL_PROGRAM_PARAMETERS_ARB */
+ 1088, /* GL_MAX_PROGRAM_PARAMETERS_ARB */
+ 1466, /* GL_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 1084, /* GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB */
+ 1450, /* GL_PROGRAM_ATTRIBS_ARB */
+ 1069, /* GL_MAX_PROGRAM_ATTRIBS_ARB */
+ 1464, /* GL_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 1082, /* GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB */
+ 1448, /* GL_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 1067, /* GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB */
+ 1462, /* GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 1080, /* GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB */
+ 1075, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */
+ 1071, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */
+ 1482, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */
+ 2137, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */
+ 1544, /* GL_READ_ONLY */
+ 2296, /* GL_WRITE_ONLY */
+ 1546, /* GL_READ_WRITE */
+ 124, /* GL_BUFFER_ACCESS */
+ 129, /* GL_BUFFER_MAPPED */
+ 134, /* GL_BUFFER_MAP_POINTER */
+ 2111, /* GL_TIME_ELAPSED_EXT */
+ 959, /* GL_MATRIX0_ARB */
+ 971, /* GL_MATRIX1_ARB */
+ 983, /* GL_MATRIX2_ARB */
+ 987, /* GL_MATRIX3_ARB */
+ 989, /* GL_MATRIX4_ARB */
+ 991, /* GL_MATRIX5_ARB */
+ 993, /* GL_MATRIX6_ARB */
+ 995, /* GL_MATRIX7_ARB */
+ 997, /* GL_MATRIX8_ARB */
+ 998, /* GL_MATRIX9_ARB */
+ 961, /* GL_MATRIX10_ARB */
+ 962, /* GL_MATRIX11_ARB */
+ 963, /* GL_MATRIX12_ARB */
+ 964, /* GL_MATRIX13_ARB */
+ 965, /* GL_MATRIX14_ARB */
+ 966, /* GL_MATRIX15_ARB */
+ 967, /* GL_MATRIX16_ARB */
+ 968, /* GL_MATRIX17_ARB */
+ 969, /* GL_MATRIX18_ARB */
+ 970, /* GL_MATRIX19_ARB */
+ 973, /* GL_MATRIX20_ARB */
+ 974, /* GL_MATRIX21_ARB */
+ 975, /* GL_MATRIX22_ARB */
+ 976, /* GL_MATRIX23_ARB */
+ 977, /* GL_MATRIX24_ARB */
+ 978, /* GL_MATRIX25_ARB */
+ 979, /* GL_MATRIX26_ARB */
+ 980, /* GL_MATRIX27_ARB */
+ 981, /* GL_MATRIX28_ARB */
+ 982, /* GL_MATRIX29_ARB */
+ 985, /* GL_MATRIX30_ARB */
+ 986, /* GL_MATRIX31_ARB */
+ 1869, /* GL_STREAM_DRAW */
+ 1871, /* GL_STREAM_READ */
+ 1867, /* GL_STREAM_COPY */
+ 1818, /* GL_STATIC_DRAW */
+ 1820, /* GL_STATIC_READ */
+ 1816, /* GL_STATIC_COPY */
+ 513, /* GL_DYNAMIC_DRAW */
+ 515, /* GL_DYNAMIC_READ */
+ 511, /* GL_DYNAMIC_COPY */
+ 1339, /* GL_PIXEL_PACK_BUFFER */
+ 1343, /* GL_PIXEL_UNPACK_BUFFER */
+ 1340, /* GL_PIXEL_PACK_BUFFER_BINDING */
+ 1344, /* GL_PIXEL_UNPACK_BUFFER_BINDING */
+ 399, /* GL_DEPTH24_STENCIL8 */
+ 2100, /* GL_TEXTURE_STENCIL_SIZE */
+ 2046, /* GL_TEXTURE_CUBE_MAP_SEAMLESS */
+ 1070, /* GL_MAX_PROGRAM_CALL_DEPTH_NV */
+ 1073, /* GL_MAX_PROGRAM_IF_DEPTH_NV */
+ 1077, /* GL_MAX_PROGRAM_LOOP_DEPTH_NV */
+ 1076, /* GL_MAX_PROGRAM_LOOP_COUNT_NV */
+ 2252, /* GL_VERTEX_ATTRIB_ARRAY_INTEGER */
+ 2249, /* GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB */
+ 1016, /* GL_MAX_ARRAY_TEXTURE_LAYERS */
+ 1154, /* GL_MIN_PROGRAM_TEXEL_OFFSET */
+ 1090, /* GL_MAX_PROGRAM_TEXEL_OFFSET */
+ 1860, /* GL_STENCIL_TEST_TWO_SIDE_EXT */
+ 18, /* GL_ACTIVE_STENCIL_FACE_EXT */
+ 1161, /* GL_MIRROR_CLAMP_TO_BORDER_EXT */
+ 1717, /* GL_SAMPLES_PASSED */
+ 692, /* GL_GEOMETRY_VERTICES_OUT */
+ 686, /* GL_GEOMETRY_INPUT_TYPE */
+ 688, /* GL_GEOMETRY_OUTPUT_TYPE */
+ 164, /* GL_CLAMP_VERTEX_COLOR_ARB */
+ 156, /* GL_CLAMP_FRAGMENT_COLOR_ARB */
+ 157, /* GL_CLAMP_READ_COLOR */
+ 549, /* GL_FIXED_ONLY */
+ 1363, /* GL_POINT_SIZE_ARRAY_TYPE_OES */
+ 1362, /* GL_POINT_SIZE_ARRAY_STRIDE_OES */
+ 1361, /* GL_POINT_SIZE_ARRAY_POINTER_OES */
+ 1198, /* GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES */
+ 1485, /* GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES */
+ 2080, /* GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES */
+ 138, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */
+ 128, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */
+ 1561, /* GL_RELEASED_APPLE */
+ 2279, /* GL_VOLATILE_APPLE */
+ 1600, /* GL_RETAINED_APPLE */
+ 2154, /* GL_UNDEFINED_APPLE */
+ 1509, /* GL_PURGEABLE_APPLE */
+ 600, /* GL_FRAGMENT_SHADER */
+ 2274, /* GL_VERTEX_SHADER */
+ 1470, /* GL_PROGRAM_OBJECT_ARB */
+ 1753, /* GL_SHADER_OBJECT_ARB */
+ 1045, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */
+ 1136, /* GL_MAX_VERTEX_UNIFORM_COMPONENTS */
+ 1127, /* GL_MAX_VARYING_COMPONENTS */
+ 1134, /* GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS */
+ 1028, /* GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS */
+ 1259, /* GL_OBJECT_TYPE_ARB */
+ 1755, /* GL_SHADER_TYPE */
+ 565, /* GL_FLOAT_VEC2 */
+ 567, /* GL_FLOAT_VEC3 */
+ 569, /* GL_FLOAT_VEC4 */
+ 788, /* GL_INT_VEC2 */
+ 790, /* GL_INT_VEC3 */
+ 792, /* GL_INT_VEC4 */
+ 116, /* GL_BOOL */
+ 118, /* GL_BOOL_VEC2 */
+ 120, /* GL_BOOL_VEC3 */
+ 122, /* GL_BOOL_VEC4 */
+ 553, /* GL_FLOAT_MAT2 */
+ 557, /* GL_FLOAT_MAT3 */
+ 561, /* GL_FLOAT_MAT4 */
+ 1693, /* GL_SAMPLER_1D */
+ 1699, /* GL_SAMPLER_2D */
+ 1707, /* GL_SAMPLER_3D */
+ 1711, /* GL_SAMPLER_CUBE */
+ 1698, /* GL_SAMPLER_1D_SHADOW */
+ 1706, /* GL_SAMPLER_2D_SHADOW */
+ 1704, /* GL_SAMPLER_2D_RECT */
+ 1705, /* GL_SAMPLER_2D_RECT_SHADOW */
+ 555, /* GL_FLOAT_MAT2x3 */
+ 556, /* GL_FLOAT_MAT2x4 */
+ 559, /* GL_FLOAT_MAT3x2 */
+ 560, /* GL_FLOAT_MAT3x4 */
+ 563, /* GL_FLOAT_MAT4x2 */
+ 564, /* GL_FLOAT_MAT4x3 */
+ 397, /* GL_DELETE_STATUS */
+ 289, /* GL_COMPILE_STATUS */
+ 849, /* GL_LINK_STATUS */
+ 2219, /* GL_VALIDATE_STATUS */
+ 748, /* GL_INFO_LOG_LENGTH */
+ 64, /* GL_ATTACHED_SHADERS */
+ 21, /* GL_ACTIVE_UNIFORMS */
+ 22, /* GL_ACTIVE_UNIFORM_MAX_LENGTH */
+ 1754, /* GL_SHADER_SOURCE_LENGTH */
+ 15, /* GL_ACTIVE_ATTRIBUTES */
+ 16, /* GL_ACTIVE_ATTRIBUTE_MAX_LENGTH */
+ 602, /* GL_FRAGMENT_SHADER_DERIVATIVE_HINT */
+ 1757, /* GL_SHADING_LANGUAGE_VERSION */
+ 374, /* GL_CURRENT_PROGRAM */
+ 1308, /* GL_PALETTE4_RGB8_OES */
+ 1310, /* GL_PALETTE4_RGBA8_OES */
+ 1306, /* GL_PALETTE4_R5_G6_B5_OES */
+ 1309, /* GL_PALETTE4_RGBA4_OES */
+ 1307, /* GL_PALETTE4_RGB5_A1_OES */
+ 1313, /* GL_PALETTE8_RGB8_OES */
+ 1315, /* GL_PALETTE8_RGBA8_OES */
+ 1311, /* GL_PALETTE8_R5_G6_B5_OES */
+ 1314, /* GL_PALETTE8_RGBA4_OES */
+ 1312, /* GL_PALETTE8_RGB5_A1_OES */
+ 729, /* GL_IMPLEMENTATION_COLOR_READ_TYPE */
+ 727, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT */
+ 1360, /* GL_POINT_SIZE_ARRAY_OES */
+ 2024, /* GL_TEXTURE_CROP_RECT_OES */
+ 1000, /* GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES */
+ 1359, /* GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES */
+ 2202, /* GL_UNSIGNED_NORMALIZED */
+ 1957, /* GL_TEXTURE_1D_ARRAY */
+ 1495, /* GL_PROXY_TEXTURE_1D_ARRAY */
+ 1960, /* GL_TEXTURE_2D_ARRAY */
+ 1499, /* GL_PROXY_TEXTURE_2D_ARRAY */
+ 1968, /* GL_TEXTURE_BINDING_1D_ARRAY */
+ 1971, /* GL_TEXTURE_BINDING_2D_ARRAY */
+ 1052, /* GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS */
+ 1988, /* GL_TEXTURE_BUFFER */
+ 1106, /* GL_MAX_TEXTURE_BUFFER_SIZE */
+ 1975, /* GL_TEXTURE_BINDING_BUFFER */
+ 1990, /* GL_TEXTURE_BUFFER_DATA_STORE_BINDING */
+ 1992, /* GL_TEXTURE_BUFFER_FORMAT */
+ 1532, /* GL_R11F_G11F_B10F */
+ 2168, /* GL_UNSIGNED_INT_10F_11F_11F_REV */
+ 1643, /* GL_RGB9_E5 */
+ 2177, /* GL_UNSIGNED_INT_5_9_9_9_REV */
+ 2098, /* GL_TEXTURE_SHARED_SIZE */
+ 1810, /* GL_SRGB */
+ 1811, /* GL_SRGB8 */
+ 1813, /* GL_SRGB_ALPHA */
+ 1812, /* GL_SRGB8_ALPHA8 */
+ 1770, /* GL_SLUMINANCE_ALPHA */
+ 1769, /* GL_SLUMINANCE8_ALPHA8 */
+ 1767, /* GL_SLUMINANCE */
+ 1768, /* GL_SLUMINANCE8 */
+ 312, /* GL_COMPRESSED_SRGB */
+ 313, /* GL_COMPRESSED_SRGB_ALPHA */
+ 310, /* GL_COMPRESSED_SLUMINANCE */
+ 311, /* GL_COMPRESSED_SLUMINANCE_ALPHA */
+ 2133, /* GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH */
+ 2122, /* GL_TRANSFORM_FEEDBACK_BUFFER_MODE */
+ 1125, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS */
+ 2131, /* GL_TRANSFORM_FEEDBACK_VARYINGS */
+ 2127, /* GL_TRANSFORM_FEEDBACK_BUFFER_START */
+ 2125, /* GL_TRANSFORM_FEEDBACK_BUFFER_SIZE */
+ 1442, /* GL_PRIMITIVES_GENERATED */
+ 2129, /* GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN */
+ 1536, /* GL_RASTERIZER_DISCARD */
+ 1121, /* GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS */
+ 1123, /* GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS */
+ 766, /* GL_INTERLEAVED_ATTRIBS */
+ 1746, /* GL_SEPARATE_ATTRIBS */
+ 2117, /* GL_TRANSFORM_FEEDBACK_BUFFER */
+ 2119, /* GL_TRANSFORM_FEEDBACK_BUFFER_BINDING */
+ 1378, /* GL_POINT_SPRITE_COORD_ORIGIN */
+ 857, /* GL_LOWER_LEFT */
+ 2216, /* GL_UPPER_LEFT */
+ 1834, /* GL_STENCIL_BACK_REF */
+ 1835, /* GL_STENCIL_BACK_VALUE_MASK */
+ 1836, /* GL_STENCIL_BACK_WRITEMASK */
+ 503, /* GL_DRAW_FRAMEBUFFER_BINDING */
+ 1566, /* GL_RENDERBUFFER_BINDING */
+ 1540, /* GL_READ_FRAMEBUFFER */
+ 502, /* GL_DRAW_FRAMEBUFFER */
+ 1541, /* GL_READ_FRAMEBUFFER_BINDING */
+ 1585, /* GL_RENDERBUFFER_SAMPLES */
+ 616, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+ 613, /* GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+ 628, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+ 623, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+ 626, /* GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+ 634, /* GL_FRAMEBUFFER_COMPLETE */
+ 639, /* GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+ 654, /* GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+ 648, /* GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT */
+ 643, /* GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT */
+ 649, /* GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT */
+ 645, /* GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+ 659, /* GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+ 665, /* GL_FRAMEBUFFER_UNSUPPORTED */
+ 663, /* GL_FRAMEBUFFER_STATUS_ERROR_EXT */
+ 1024, /* GL_MAX_COLOR_ATTACHMENTS */
+ 196, /* GL_COLOR_ATTACHMENT0 */
+ 199, /* GL_COLOR_ATTACHMENT1 */
+ 213, /* GL_COLOR_ATTACHMENT2 */
+ 215, /* GL_COLOR_ATTACHMENT3 */
+ 217, /* GL_COLOR_ATTACHMENT4 */
+ 219, /* GL_COLOR_ATTACHMENT5 */
+ 221, /* GL_COLOR_ATTACHMENT6 */
+ 223, /* GL_COLOR_ATTACHMENT7 */
+ 225, /* GL_COLOR_ATTACHMENT8 */
+ 227, /* GL_COLOR_ATTACHMENT9 */
+ 200, /* GL_COLOR_ATTACHMENT10 */
+ 202, /* GL_COLOR_ATTACHMENT11 */
+ 204, /* GL_COLOR_ATTACHMENT12 */
+ 206, /* GL_COLOR_ATTACHMENT13 */
+ 208, /* GL_COLOR_ATTACHMENT14 */
+ 210, /* GL_COLOR_ATTACHMENT15 */
+ 402, /* GL_DEPTH_ATTACHMENT */
+ 1823, /* GL_STENCIL_ATTACHMENT */
+ 604, /* GL_FRAMEBUFFER */
+ 1563, /* GL_RENDERBUFFER */
+ 1589, /* GL_RENDERBUFFER_WIDTH */
+ 1576, /* GL_RENDERBUFFER_HEIGHT */
+ 1579, /* GL_RENDERBUFFER_INTERNAL_FORMAT */
+ 1855, /* GL_STENCIL_INDEX_EXT */
+ 1844, /* GL_STENCIL_INDEX1 */
+ 1849, /* GL_STENCIL_INDEX4 */
+ 1852, /* GL_STENCIL_INDEX8 */
+ 1845, /* GL_STENCIL_INDEX16 */
+ 1583, /* GL_RENDERBUFFER_RED_SIZE */
+ 1574, /* GL_RENDERBUFFER_GREEN_SIZE */
+ 1569, /* GL_RENDERBUFFER_BLUE_SIZE */
+ 1564, /* GL_RENDERBUFFER_ALPHA_SIZE */
+ 1571, /* GL_RENDERBUFFER_DEPTH_SIZE */
+ 1587, /* GL_RENDERBUFFER_STENCIL_SIZE */
+ 657, /* GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+ 1101, /* GL_MAX_SAMPLES */
+ 2060, /* GL_TEXTURE_GEN_STR_OES */
+ 703, /* GL_HALF_FLOAT_OES */
+ 1630, /* GL_RGB565_OES */
+ 1660, /* GL_RGBA32UI */
+ 1623, /* GL_RGB32UI */
+ 40, /* GL_ALPHA32UI_EXT */
+ 758, /* GL_INTENSITY32UI_EXT */
+ 874, /* GL_LUMINANCE32UI_EXT */
+ 891, /* GL_LUMINANCE_ALPHA32UI_EXT */
+ 1651, /* GL_RGBA16UI */
+ 1615, /* GL_RGB16UI */
+ 37, /* GL_ALPHA16UI_EXT */
+ 755, /* GL_INTENSITY16UI_EXT */
+ 869, /* GL_LUMINANCE16UI_EXT */
+ 889, /* GL_LUMINANCE_ALPHA16UI_EXT */
+ 1670, /* GL_RGBA8UI */
+ 1638, /* GL_RGB8UI */
+ 45, /* GL_ALPHA8UI_EXT */
+ 763, /* GL_INTENSITY8UI_EXT */
+ 883, /* GL_LUMINANCE8UI_EXT */
+ 893, /* GL_LUMINANCE_ALPHA8UI_EXT */
+ 1658, /* GL_RGBA32I */
+ 1621, /* GL_RGB32I */
+ 39, /* GL_ALPHA32I_EXT */
+ 757, /* GL_INTENSITY32I_EXT */
+ 873, /* GL_LUMINANCE32I_EXT */
+ 890, /* GL_LUMINANCE_ALPHA32I_EXT */
+ 1649, /* GL_RGBA16I */
+ 1613, /* GL_RGB16I */
+ 36, /* GL_ALPHA16I_EXT */
+ 754, /* GL_INTENSITY16I_EXT */
+ 868, /* GL_LUMINANCE16I_EXT */
+ 888, /* GL_LUMINANCE_ALPHA16I_EXT */
+ 1668, /* GL_RGBA8I */
+ 1636, /* GL_RGB8I */
+ 44, /* GL_ALPHA8I_EXT */
+ 762, /* GL_INTENSITY8I_EXT */
+ 882, /* GL_LUMINANCE8I_EXT */
+ 892, /* GL_LUMINANCE_ALPHA8I_EXT */
+ 1553, /* GL_RED_INTEGER */
+ 699, /* GL_GREEN_INTEGER */
+ 113, /* GL_BLUE_INTEGER */
+ 49, /* GL_ALPHA_INTEGER_EXT */
+ 1683, /* GL_RGB_INTEGER */
+ 1677, /* GL_RGBA_INTEGER */
+ 84, /* GL_BGR_INTEGER */
+ 82, /* GL_BGRA_INTEGER */
+ 895, /* GL_LUMINANCE_INTEGER_EXT */
+ 894, /* GL_LUMINANCE_ALPHA_INTEGER_EXT */
+ 1679, /* GL_RGBA_INTEGER_MODE_EXT */
+ 611, /* GL_FRAMEBUFFER_ATTACHMENT_LAYERED */
+ 652, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS */
+ 651, /* GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB */
+ 1694, /* GL_SAMPLER_1D_ARRAY */
+ 1700, /* GL_SAMPLER_2D_ARRAY */
+ 1709, /* GL_SAMPLER_BUFFER */
+ 1696, /* GL_SAMPLER_1D_ARRAY_SHADOW */
+ 1702, /* GL_SAMPLER_2D_ARRAY_SHADOW */
+ 1712, /* GL_SAMPLER_CUBE_SHADOW */
+ 2196, /* GL_UNSIGNED_INT_VEC2 */
+ 2198, /* GL_UNSIGNED_INT_VEC3 */
+ 2200, /* GL_UNSIGNED_INT_VEC4 */
+ 772, /* GL_INT_SAMPLER_1D */
+ 776, /* GL_INT_SAMPLER_2D */
+ 782, /* GL_INT_SAMPLER_3D */
+ 786, /* GL_INT_SAMPLER_CUBE */
+ 780, /* GL_INT_SAMPLER_2D_RECT */
+ 773, /* GL_INT_SAMPLER_1D_ARRAY */
+ 777, /* GL_INT_SAMPLER_2D_ARRAY */
+ 784, /* GL_INT_SAMPLER_BUFFER */
+ 2180, /* GL_UNSIGNED_INT_SAMPLER_1D */
+ 2184, /* GL_UNSIGNED_INT_SAMPLER_2D */
+ 2190, /* GL_UNSIGNED_INT_SAMPLER_3D */
+ 2194, /* GL_UNSIGNED_INT_SAMPLER_CUBE */
+ 2188, /* GL_UNSIGNED_INT_SAMPLER_2D_RECT */
+ 2181, /* GL_UNSIGNED_INT_SAMPLER_1D_ARRAY */
+ 2185, /* GL_UNSIGNED_INT_SAMPLER_2D_ARRAY */
+ 2192, /* GL_UNSIGNED_INT_SAMPLER_BUFFER */
+ 690, /* GL_GEOMETRY_SHADER */
+ 693, /* GL_GEOMETRY_VERTICES_OUT_ARB */
+ 687, /* GL_GEOMETRY_INPUT_TYPE_ARB */
+ 689, /* GL_GEOMETRY_OUTPUT_TYPE_ARB */
+ 1058, /* GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB */
+ 1141, /* GL_MAX_VERTEX_VARYING_COMPONENTS_ARB */
+ 1056, /* GL_MAX_GEOMETRY_UNIFORM_COMPONENTS */
+ 1050, /* GL_MAX_GEOMETRY_OUTPUT_VERTICES */
+ 1054, /* GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS */
+ 858, /* GL_LOW_FLOAT */
+ 1143, /* GL_MEDIUM_FLOAT */
+ 704, /* GL_HIGH_FLOAT */
+ 859, /* GL_LOW_INT */
+ 1144, /* GL_MEDIUM_INT */
+ 705, /* GL_HIGH_INT */
+ 2170, /* GL_UNSIGNED_INT_10_10_10_2_OES */
+ 771, /* GL_INT_10_10_10_2_OES */
+ 1751, /* GL_SHADER_BINARY_FORMATS */
+ 1244, /* GL_NUM_SHADER_BINARY_FORMATS */
+ 1752, /* GL_SHADER_COMPILER */
+ 1138, /* GL_MAX_VERTEX_UNIFORM_VECTORS */
+ 1130, /* GL_MAX_VARYING_VECTORS */
+ 1047, /* GL_MAX_FRAGMENT_UNIFORM_VECTORS */
+ 1529, /* GL_QUERY_WAIT */
+ 1523, /* GL_QUERY_NO_WAIT */
+ 1519, /* GL_QUERY_BY_REGION_WAIT */
+ 1517, /* GL_QUERY_BY_REGION_NO_WAIT */
+ 2115, /* GL_TRANSFORM_FEEDBACK */
+ 2124, /* GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
+ 2118, /* GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
+ 2116, /* GL_TRANSFORM_FEEDBACK_BINDING */
+ 1513, /* GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+ 545, /* GL_FIRST_VERTEX_CONVENTION */
+ 804, /* GL_LAST_VERTEX_CONVENTION */
+ 1487, /* GL_PROVOKING_VERTEX */
+ 353, /* GL_COPY_READ_BUFFER */
+ 354, /* GL_COPY_WRITE_BUFFER */
+ 1556, /* GL_RED_SNORM */
+ 1690, /* GL_RG_SNORM */
+ 1689, /* GL_RGB_SNORM */
+ 1682, /* GL_RGBA_SNORM */
+ 1535, /* GL_R8_SNORM */
+ 1603, /* GL_RG8_SNORM */
+ 1642, /* GL_RGB8_SNORM */
+ 1674, /* GL_RGBA8_SNORM */
+ 1533, /* GL_R16_SNORM */
+ 1602, /* GL_RG16_SNORM */
+ 1618, /* GL_RGB16_SNORM */
+ 1654, /* GL_RGBA16_SNORM */
+ 1763, /* GL_SIGNED_NORMALIZED */
+ 1444, /* GL_PRIMITIVE_RESTART */
+ 1445, /* GL_PRIMITIVE_RESTART_INDEX */
+ 1103, /* GL_MAX_SERVER_WAIT_TIMEOUT */
+ 1258, /* GL_OBJECT_TYPE */
+ 1876, /* GL_SYNC_CONDITION */
+ 1881, /* GL_SYNC_STATUS */
+ 1878, /* GL_SYNC_FLAGS */
+ 1877, /* GL_SYNC_FENCE */
+ 1880, /* GL_SYNC_GPU_COMMANDS_COMPLETE */
+ 2163, /* GL_UNSIGNALED */
+ 1762, /* GL_SIGNALED */
+ 54, /* GL_ALREADY_SIGNALED */
+ 2110, /* GL_TIMEOUT_EXPIRED */
+ 315, /* GL_CONDITION_SATISFIED */
+ 2280, /* GL_WAIT_FAILED */
+ 126, /* GL_BUFFER_ACCESS_FLAGS */
+ 132, /* GL_BUFFER_MAP_LENGTH */
+ 133, /* GL_BUFFER_MAP_OFFSET */
+ 1133, /* GL_MAX_VERTEX_OUTPUT_COMPONENTS */
+ 1048, /* GL_MAX_GEOMETRY_INPUT_COMPONENTS */
+ 1049, /* GL_MAX_GEOMETRY_OUTPUT_COMPONENTS */
+ 1044, /* GL_MAX_FRAGMENT_INPUT_COMPONENTS */
+ 329, /* GL_CONTEXT_PROFILE_MASK */
+ 530, /* GL_EVAL_BIT */
+ 1538, /* GL_RASTER_POSITION_UNCLIPPED_IBM */
+ 851, /* GL_LIST_BIT */
+ 1983, /* GL_TEXTURE_BIT */
+ 1732, /* GL_SCISSOR_BIT */
+ 30, /* GL_ALL_ATTRIB_BITS */
+ 1209, /* GL_MULTISAMPLE_BIT */
+ 31, /* GL_ALL_CLIENT_ATTRIB_BITS */
+};
+
+typedef int (*cfunc)(const void *, const void *);
+
+/**
+ * Compare a key name to an element in the \c all_enums array.
+ *
+ * \c bsearch always passes the key as the first parameter and the pointer
+ * to the array element as the second parameter. We can elimiate some
+ * extra work by taking advantage of that fact.
+ *
+ * \param a Pointer to the desired enum name.
+ * \param b Pointer to an element of the \c all_enums array.
+ */
+static int compar_name( const char *a, const enum_elt *b )
+{
+ return strcmp( a, & enum_string_table[ b->offset ] );
+}
+
+/**
+ * Compare a key enum value to an element in the \c all_enums array.
+ *
+ * \c bsearch always passes the key as the first parameter and the pointer
+ * to the array element as the second parameter. We can elimiate some
+ * extra work by taking advantage of that fact.
+ *
+ * \param a Pointer to the desired enum name.
+ * \param b Pointer to an index into the \c all_enums array.
+ */
+static int compar_nr( const int *a, const unsigned *b )
+{
+ return a[0] - all_enums[*b].n;
+}
+
+
+static char token_tmp[20];
+
+const char *_mesa_lookup_enum_by_nr( int nr )
+{
+ unsigned * i;
+
+ i = (unsigned *) _mesa_bsearch(& nr, reduced_enums,
+ Elements(reduced_enums),
+ sizeof(reduced_enums[0]),
+ (cfunc) compar_nr);
+
+ if ( i != NULL ) {
+ return & enum_string_table[ all_enums[ *i ].offset ];
+ }
+ else {
+ /* this is not re-entrant safe, no big deal here */
+ _mesa_snprintf(token_tmp, sizeof(token_tmp) - 1, "0x%x", nr);
+ token_tmp[sizeof(token_tmp) - 1] = '\0';
+ return token_tmp;
+ }
+}
+
+/**
+ * Primitive names
+ */
+static const char *prim_names[PRIM_UNKNOWN + 1] = {
+ "GL_POINTS",
+ "GL_LINES",
+ "GL_LINE_LOOP",
+ "GL_LINE_STRIP",
+ "GL_TRIANGLES",
+ "GL_TRIANGLE_STRIP",
+ "GL_TRIANGLE_FAN",
+ "GL_QUADS",
+ "GL_QUAD_STRIP",
+ "GL_POLYGON",
+ "outside begin/end",
+ "inside unknown primitive",
+ "unknown state"
+};
+
+
+/* Get the name of an enum given that it is a primitive type. Avoids
+ * GL_FALSE/GL_POINTS ambiguity and others.
+ */
+const char *
+_mesa_lookup_prim_by_nr(GLuint nr)
+{
+ if (nr < Elements(prim_names))
+ return prim_names[nr];
+ else
+ return "invalid mode";
+}
+
+
+int _mesa_lookup_enum_by_name( const char *symbol )
+{
+ enum_elt * f = NULL;
+
+ if ( symbol != NULL ) {
+ f = (enum_elt *) _mesa_bsearch(symbol, all_enums,
+ Elements(all_enums),
+ sizeof( enum_elt ),
+ (cfunc) compar_name);
+ }
+
+ return (f != NULL) ? f->n : -1;
+}
+
+
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c index 4eab3e119..76493f1a8 100644 --- a/mesalib/src/mesa/main/fbobject.c +++ b/mesalib/src/mesa/main/fbobject.c @@ -1,2498 +1,2496 @@ -/* - * Mesa 3-D graphics library - * Version: 7.1 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * Copyright (C) 1999-2009 VMware, Inc. All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - - -/* - * GL_EXT/ARB_framebuffer_object extensions - * - * Authors: - * Brian Paul - */ - - -#include "buffers.h" -#include "context.h" -#include "enums.h" -#include "fbobject.h" -#include "formats.h" -#include "framebuffer.h" -#include "hash.h" -#include "macros.h" -#include "mfeatures.h" -#include "mtypes.h" -#include "renderbuffer.h" -#include "state.h" -#include "teximage.h" -#include "texobj.h" - - -/** Set this to 1 to help debug FBO incompleteness problems */ -#define DEBUG_FBO 0 - -/** Set this to 1 to debug/log glBlitFramebuffer() calls */ -#define DEBUG_BLIT 0 - - -/** - * Notes: - * - * None of the GL_EXT_framebuffer_object functions are compiled into - * display lists. - */ - - - -/* - * When glGenRender/FramebuffersEXT() is called we insert pointers to - * these placeholder objects into the hash table. - * Later, when the object ID is first bound, we replace the placeholder - * with the real frame/renderbuffer. - */ -static struct gl_framebuffer DummyFramebuffer; -static struct gl_renderbuffer DummyRenderbuffer; - -/* We bind this framebuffer when applications pass a NULL - * drawable/surface in make current. */ -static struct gl_framebuffer IncompleteFramebuffer; - - -#define IS_CUBE_FACE(TARGET) \ - ((TARGET) >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && \ - (TARGET) <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z) - - -static void -delete_dummy_renderbuffer(struct gl_renderbuffer *rb) -{ - /* no op */ -} - -static void -delete_dummy_framebuffer(struct gl_framebuffer *fb) -{ - /* no op */ -} - - -void -_mesa_init_fbobjects(struct gl_context *ctx) -{ - _glthread_INIT_MUTEX(DummyFramebuffer.Mutex); - _glthread_INIT_MUTEX(DummyRenderbuffer.Mutex); - _glthread_INIT_MUTEX(IncompleteFramebuffer.Mutex); - DummyFramebuffer.Delete = delete_dummy_framebuffer; - DummyRenderbuffer.Delete = delete_dummy_renderbuffer; - IncompleteFramebuffer.Delete = delete_dummy_framebuffer; -} - -struct gl_framebuffer * -_mesa_get_incomplete_framebuffer(void) -{ - return &IncompleteFramebuffer; -} - -/** - * Helper routine for getting a gl_renderbuffer. - */ -struct gl_renderbuffer * -_mesa_lookup_renderbuffer(struct gl_context *ctx, GLuint id) -{ - struct gl_renderbuffer *rb; - - if (id == 0) - return NULL; - - rb = (struct gl_renderbuffer *) - _mesa_HashLookup(ctx->Shared->RenderBuffers, id); - return rb; -} - - -/** - * Helper routine for getting a gl_framebuffer. - */ -struct gl_framebuffer * -_mesa_lookup_framebuffer(struct gl_context *ctx, GLuint id) -{ - struct gl_framebuffer *fb; - - if (id == 0) - return NULL; - - fb = (struct gl_framebuffer *) - _mesa_HashLookup(ctx->Shared->FrameBuffers, id); - return fb; -} - - -/** - * Mark the given framebuffer as invalid. This will force the - * test for framebuffer completeness to be done before the framebuffer - * is used. - */ -static void -invalidate_framebuffer(struct gl_framebuffer *fb) -{ - fb->_Status = 0; /* "indeterminate" */ -} - - -/** - * Return the gl_framebuffer object which corresponds to the given - * framebuffer target, such as GL_DRAW_FRAMEBUFFER. - * Check support for GL_EXT_framebuffer_blit to determine if certain - * targets are legal. - * \return gl_framebuffer pointer or NULL if target is illegal - */ -static struct gl_framebuffer * -get_framebuffer_target(struct gl_context *ctx, GLenum target) -{ - switch (target) { - case GL_DRAW_FRAMEBUFFER: - return ctx->Extensions.EXT_framebuffer_blit ? ctx->DrawBuffer : NULL; - case GL_READ_FRAMEBUFFER: - return ctx->Extensions.EXT_framebuffer_blit ? ctx->ReadBuffer : NULL; - case GL_FRAMEBUFFER_EXT: - return ctx->DrawBuffer; - default: - return NULL; - } -} - - -/** - * Given a GL_*_ATTACHMENTn token, return a pointer to the corresponding - * gl_renderbuffer_attachment object. - * This function is only used for user-created FB objects, not the - * default / window-system FB object. - * If \p attachment is GL_DEPTH_STENCIL_ATTACHMENT, return a pointer to - * the depth buffer attachment point. - */ -struct gl_renderbuffer_attachment * -_mesa_get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb, - GLenum attachment) -{ - GLuint i; - - assert(fb->Name > 0); - - switch (attachment) { - case GL_COLOR_ATTACHMENT0_EXT: - case GL_COLOR_ATTACHMENT1_EXT: - case GL_COLOR_ATTACHMENT2_EXT: - case GL_COLOR_ATTACHMENT3_EXT: - case GL_COLOR_ATTACHMENT4_EXT: - case GL_COLOR_ATTACHMENT5_EXT: - case GL_COLOR_ATTACHMENT6_EXT: - case GL_COLOR_ATTACHMENT7_EXT: - case GL_COLOR_ATTACHMENT8_EXT: - case GL_COLOR_ATTACHMENT9_EXT: - case GL_COLOR_ATTACHMENT10_EXT: - case GL_COLOR_ATTACHMENT11_EXT: - case GL_COLOR_ATTACHMENT12_EXT: - case GL_COLOR_ATTACHMENT13_EXT: - case GL_COLOR_ATTACHMENT14_EXT: - case GL_COLOR_ATTACHMENT15_EXT: - i = attachment - GL_COLOR_ATTACHMENT0_EXT; - if (i >= ctx->Const.MaxColorAttachments) { - return NULL; - } - return &fb->Attachment[BUFFER_COLOR0 + i]; - case GL_DEPTH_STENCIL_ATTACHMENT: - /* fall-through */ - case GL_DEPTH_BUFFER: - /* fall-through / new in GL 3.0 */ - case GL_DEPTH_ATTACHMENT_EXT: - return &fb->Attachment[BUFFER_DEPTH]; - case GL_STENCIL_BUFFER: - /* fall-through / new in GL 3.0 */ - case GL_STENCIL_ATTACHMENT_EXT: - return &fb->Attachment[BUFFER_STENCIL]; - default: - return NULL; - } -} - - -/** - * As above, but only used for getting attachments of the default / - * window-system framebuffer (not user-created framebuffer objects). - */ -static struct gl_renderbuffer_attachment * -_mesa_get_fb0_attachment(struct gl_context *ctx, struct gl_framebuffer *fb, - GLenum attachment) -{ - assert(fb->Name == 0); - - switch (attachment) { - case GL_FRONT_LEFT: - return &fb->Attachment[BUFFER_FRONT_LEFT]; - case GL_FRONT_RIGHT: - return &fb->Attachment[BUFFER_FRONT_RIGHT]; - case GL_BACK_LEFT: - return &fb->Attachment[BUFFER_BACK_LEFT]; - case GL_BACK_RIGHT: - return &fb->Attachment[BUFFER_BACK_RIGHT]; - case GL_AUX0: - if (fb->Visual.numAuxBuffers == 1) { - return &fb->Attachment[BUFFER_AUX0]; - } - return NULL; - case GL_DEPTH_BUFFER: - /* fall-through / new in GL 3.0 */ - case GL_DEPTH_ATTACHMENT_EXT: - return &fb->Attachment[BUFFER_DEPTH]; - case GL_STENCIL_BUFFER: - /* fall-through / new in GL 3.0 */ - case GL_STENCIL_ATTACHMENT_EXT: - return &fb->Attachment[BUFFER_STENCIL]; - default: - return NULL; - } -} - - - -/** - * Remove any texture or renderbuffer attached to the given attachment - * point. Update reference counts, etc. - */ -void -_mesa_remove_attachment(struct gl_context *ctx, - struct gl_renderbuffer_attachment *att) -{ - if (att->Type == GL_TEXTURE) { - ASSERT(att->Texture); - if (ctx->Driver.FinishRenderTexture) { - /* tell driver that we're done rendering to this texture. */ - ctx->Driver.FinishRenderTexture(ctx, att); - } - _mesa_reference_texobj(&att->Texture, NULL); /* unbind */ - ASSERT(!att->Texture); - } - if (att->Type == GL_TEXTURE || att->Type == GL_RENDERBUFFER_EXT) { - ASSERT(!att->Texture); - _mesa_reference_renderbuffer(&att->Renderbuffer, NULL); /* unbind */ - ASSERT(!att->Renderbuffer); - } - att->Type = GL_NONE; - att->Complete = GL_TRUE; -} - - -/** - * Bind a texture object to an attachment point. - * The previous binding, if any, will be removed first. - */ -void -_mesa_set_texture_attachment(struct gl_context *ctx, - struct gl_framebuffer *fb, - struct gl_renderbuffer_attachment *att, - struct gl_texture_object *texObj, - GLenum texTarget, GLuint level, GLuint zoffset) -{ - if (att->Texture == texObj) { - /* re-attaching same texture */ - ASSERT(att->Type == GL_TEXTURE); - if (ctx->Driver.FinishRenderTexture) - ctx->Driver.FinishRenderTexture(ctx, att); - } - else { - /* new attachment */ - if (ctx->Driver.FinishRenderTexture && att->Texture) - ctx->Driver.FinishRenderTexture(ctx, att); - _mesa_remove_attachment(ctx, att); - att->Type = GL_TEXTURE; - assert(!att->Texture); - _mesa_reference_texobj(&att->Texture, texObj); - } - - /* always update these fields */ - att->TextureLevel = level; - att->CubeMapFace = _mesa_tex_target_to_face(texTarget); - att->Zoffset = zoffset; - att->Complete = GL_FALSE; - - if (att->Texture->Image[att->CubeMapFace][att->TextureLevel]) { - ctx->Driver.RenderTexture(ctx, fb, att); - } - - invalidate_framebuffer(fb); -} - - -/** - * Bind a renderbuffer to an attachment point. - * The previous binding, if any, will be removed first. - */ -void -_mesa_set_renderbuffer_attachment(struct gl_context *ctx, - struct gl_renderbuffer_attachment *att, - struct gl_renderbuffer *rb) -{ - /* XXX check if re-doing same attachment, exit early */ - _mesa_remove_attachment(ctx, att); - att->Type = GL_RENDERBUFFER_EXT; - att->Texture = NULL; /* just to be safe */ - att->Complete = GL_FALSE; - _mesa_reference_renderbuffer(&att->Renderbuffer, rb); -} - - -/** - * Fallback for ctx->Driver.FramebufferRenderbuffer() - * Attach a renderbuffer object to a framebuffer object. - */ -void -_mesa_framebuffer_renderbuffer(struct gl_context *ctx, - struct gl_framebuffer *fb, - GLenum attachment, struct gl_renderbuffer *rb) -{ - struct gl_renderbuffer_attachment *att; - - _glthread_LOCK_MUTEX(fb->Mutex); - - att = _mesa_get_attachment(ctx, fb, attachment); - ASSERT(att); - if (rb) { - _mesa_set_renderbuffer_attachment(ctx, att, rb); - if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) { - /* do stencil attachment here (depth already done above) */ - att = _mesa_get_attachment(ctx, fb, GL_STENCIL_ATTACHMENT_EXT); - assert(att); - _mesa_set_renderbuffer_attachment(ctx, att, rb); - } - rb->AttachedAnytime = GL_TRUE; - } - else { - _mesa_remove_attachment(ctx, att); - } - - invalidate_framebuffer(fb); - - _glthread_UNLOCK_MUTEX(fb->Mutex); -} - - -/** - * Fallback for ctx->Driver.ValidateFramebuffer() - * Check if the renderbuffer's formats are supported by the software - * renderer. - * Drivers should probably override this. - */ -void -_mesa_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb) -{ - gl_buffer_index buf; - for (buf = 0; buf < BUFFER_COUNT; buf++) { - const struct gl_renderbuffer *rb = fb->Attachment[buf].Renderbuffer; - if (rb) { - switch (rb->_BaseFormat) { - case GL_ALPHA: - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE: - case GL_INTENSITY: - case GL_RED: - case GL_RG: - fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED; - return; - default: - /* render buffer format is supported by software rendering */ - ; - } - } - } -} - - -/** - * For debug only. - */ -static void -att_incomplete(const char *msg) -{ -#if DEBUG_FBO - _mesa_debug(NULL, "attachment incomplete: %s\n", msg); -#else - (void) msg; -#endif -} - - -/** - * For debug only. - */ -static void -fbo_incomplete(const char *msg, int index) -{ -#if DEBUG_FBO - _mesa_debug(NULL, "FBO Incomplete: %s [%d]\n", msg, index); -#else - (void) msg; - (void) index; -#endif -} - - -/** - * Is the given base format a legal format for a color renderbuffer? - */ -GLboolean -_mesa_is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat) -{ - switch (baseFormat) { - case GL_RGB: - case GL_RGBA: - return GL_TRUE; - case GL_LUMINANCE: - case GL_LUMINANCE_ALPHA: - case GL_INTENSITY: - case GL_ALPHA: - return ctx->Extensions.ARB_framebuffer_object; - case GL_RED: - case GL_RG: - return ctx->Extensions.ARB_texture_rg; - default: - return GL_FALSE; - } -} - - -/** - * Is the given base format a legal format for a depth/stencil renderbuffer? - */ -static GLboolean -is_legal_depth_format(const struct gl_context *ctx, GLenum baseFormat) -{ - switch (baseFormat) { - case GL_DEPTH_COMPONENT: - case GL_DEPTH_STENCIL_EXT: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - -/** - * Test if an attachment point is complete and update its Complete field. - * \param format if GL_COLOR, this is a color attachment point, - * if GL_DEPTH, this is a depth component attachment point, - * if GL_STENCIL, this is a stencil component attachment point. - */ -static void -test_attachment_completeness(const struct gl_context *ctx, GLenum format, - struct gl_renderbuffer_attachment *att) -{ - assert(format == GL_COLOR || format == GL_DEPTH || format == GL_STENCIL); - - /* assume complete */ - att->Complete = GL_TRUE; - - /* Look for reasons why the attachment might be incomplete */ - if (att->Type == GL_TEXTURE) { - const struct gl_texture_object *texObj = att->Texture; - struct gl_texture_image *texImage; - GLenum baseFormat; - - if (!texObj) { - att_incomplete("no texobj"); - att->Complete = GL_FALSE; - return; - } - - texImage = texObj->Image[att->CubeMapFace][att->TextureLevel]; - if (!texImage) { - att_incomplete("no teximage"); - att->Complete = GL_FALSE; - return; - } - if (texImage->Width < 1 || texImage->Height < 1) { - att_incomplete("teximage width/height=0"); - printf("texobj = %u\n", texObj->Name); - printf("level = %d\n", att->TextureLevel); - att->Complete = GL_FALSE; - return; - } - if (texObj->Target == GL_TEXTURE_3D && att->Zoffset >= texImage->Depth) { - att_incomplete("bad z offset"); - att->Complete = GL_FALSE; - return; - } - - baseFormat = _mesa_get_format_base_format(texImage->TexFormat); - - if (format == GL_COLOR) { - if (!_mesa_is_legal_color_format(ctx, baseFormat)) { - att_incomplete("bad format"); - att->Complete = GL_FALSE; - return; - } - if (_mesa_is_format_compressed(texImage->TexFormat)) { - att_incomplete("compressed internalformat"); - att->Complete = GL_FALSE; - return; - } - } - else if (format == GL_DEPTH) { - if (baseFormat == GL_DEPTH_COMPONENT) { - /* OK */ - } - else if (ctx->Extensions.EXT_packed_depth_stencil && - ctx->Extensions.ARB_depth_texture && - baseFormat == GL_DEPTH_STENCIL_EXT) { - /* OK */ - } - else { - att->Complete = GL_FALSE; - att_incomplete("bad depth format"); - return; - } - } - else { - ASSERT(format == GL_STENCIL); - if (ctx->Extensions.EXT_packed_depth_stencil && - ctx->Extensions.ARB_depth_texture && - baseFormat == GL_DEPTH_STENCIL_EXT) { - /* OK */ - } - else { - /* no such thing as stencil-only textures */ - att_incomplete("illegal stencil texture"); - att->Complete = GL_FALSE; - return; - } - } - } - else if (att->Type == GL_RENDERBUFFER_EXT) { - const GLenum baseFormat = - _mesa_get_format_base_format(att->Renderbuffer->Format); - - ASSERT(att->Renderbuffer); - if (!att->Renderbuffer->InternalFormat || - att->Renderbuffer->Width < 1 || - att->Renderbuffer->Height < 1) { - att_incomplete("0x0 renderbuffer"); - att->Complete = GL_FALSE; - return; - } - if (format == GL_COLOR) { - if (!_mesa_is_legal_color_format(ctx, baseFormat)) { - att_incomplete("bad renderbuffer color format"); - att->Complete = GL_FALSE; - return; - } - } - else if (format == GL_DEPTH) { - if (baseFormat == GL_DEPTH_COMPONENT) { - /* OK */ - } - else if (ctx->Extensions.EXT_packed_depth_stencil && - baseFormat == GL_DEPTH_STENCIL_EXT) { - /* OK */ - } - else { - att_incomplete("bad renderbuffer depth format"); - att->Complete = GL_FALSE; - return; - } - } - else { - assert(format == GL_STENCIL); - if (baseFormat == GL_STENCIL_INDEX) { - /* OK */ - } - else if (ctx->Extensions.EXT_packed_depth_stencil && - baseFormat == GL_DEPTH_STENCIL_EXT) { - /* OK */ - } - else { - att->Complete = GL_FALSE; - att_incomplete("bad renderbuffer stencil format"); - return; - } - } - } - else { - ASSERT(att->Type == GL_NONE); - /* complete */ - return; - } -} - - -/** - * Test if the given framebuffer object is complete and update its - * Status field with the results. - * Calls the ctx->Driver.ValidateFramebuffer() function to allow the - * driver to make hardware-specific validation/completeness checks. - * Also update the framebuffer's Width and Height fields if the - * framebuffer is complete. - */ -void -_mesa_test_framebuffer_completeness(struct gl_context *ctx, - struct gl_framebuffer *fb) -{ - GLuint numImages; - GLenum intFormat = GL_NONE; /* color buffers' internal format */ - GLuint minWidth = ~0, minHeight = ~0, maxWidth = 0, maxHeight = 0; - GLint numSamples = -1; - GLint i; - GLuint j; - - assert(fb->Name != 0); - - numImages = 0; - fb->Width = 0; - fb->Height = 0; - - /* Start at -2 to more easily loop over all attachment points. - * -2: depth buffer - * -1: stencil buffer - * >=0: color buffer - */ - for (i = -2; i < (GLint) ctx->Const.MaxColorAttachments; i++) { - struct gl_renderbuffer_attachment *att; - GLenum f; - gl_format attFormat; - - /* - * XXX for ARB_fbo, only check color buffers that are named by - * GL_READ_BUFFER and GL_DRAW_BUFFERi. - */ - - /* check for attachment completeness - */ - if (i == -2) { - att = &fb->Attachment[BUFFER_DEPTH]; - test_attachment_completeness(ctx, GL_DEPTH, att); - if (!att->Complete) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT; - fbo_incomplete("depth attachment incomplete", -1); - return; - } - } - else if (i == -1) { - att = &fb->Attachment[BUFFER_STENCIL]; - test_attachment_completeness(ctx, GL_STENCIL, att); - if (!att->Complete) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT; - fbo_incomplete("stencil attachment incomplete", -1); - return; - } - } - else { - att = &fb->Attachment[BUFFER_COLOR0 + i]; - test_attachment_completeness(ctx, GL_COLOR, att); - if (!att->Complete) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT; - fbo_incomplete("color attachment incomplete", i); - return; - } - } - - /* get width, height, format of the renderbuffer/texture - */ - if (att->Type == GL_TEXTURE) { - const struct gl_texture_image *texImg - = att->Texture->Image[att->CubeMapFace][att->TextureLevel]; - minWidth = MIN2(minWidth, texImg->Width); - maxWidth = MAX2(maxWidth, texImg->Width); - minHeight = MIN2(minHeight, texImg->Height); - maxHeight = MAX2(maxHeight, texImg->Height); - f = texImg->_BaseFormat; - attFormat = texImg->TexFormat; - numImages++; - if (!_mesa_is_legal_color_format(ctx, f) && - !is_legal_depth_format(ctx, f)) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT; - fbo_incomplete("texture attachment incomplete", -1); - return; - } - } - else if (att->Type == GL_RENDERBUFFER_EXT) { - minWidth = MIN2(minWidth, att->Renderbuffer->Width); - maxWidth = MAX2(minWidth, att->Renderbuffer->Width); - minHeight = MIN2(minHeight, att->Renderbuffer->Height); - maxHeight = MAX2(minHeight, att->Renderbuffer->Height); - f = att->Renderbuffer->InternalFormat; - attFormat = att->Renderbuffer->Format; - numImages++; - } - else { - assert(att->Type == GL_NONE); - continue; - } - - if (numSamples < 0) { - /* first buffer */ - numSamples = att->Renderbuffer->NumSamples; - } - - /* check if integer color */ - fb->_IntegerColor = _mesa_is_format_integer_color(attFormat); - - /* Error-check width, height, format, samples - */ - if (numImages == 1) { - /* save format, num samples */ - if (i >= 0) { - intFormat = f; - } - } - else { - if (!ctx->Extensions.ARB_framebuffer_object) { - /* check that width, height, format are same */ - if (minWidth != maxWidth || minHeight != maxHeight) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT; - fbo_incomplete("width or height mismatch", -1); - return; - } - /* check that all color buffer have same format */ - if (intFormat != GL_NONE && f != intFormat) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT; - fbo_incomplete("format mismatch", -1); - return; - } - } - if (att->Renderbuffer && - att->Renderbuffer->NumSamples != numSamples) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE; - fbo_incomplete("inconsistant number of samples", i); - return; - } - - } - } - -#if FEATURE_GL - if (ctx->API == API_OPENGL) { - /* Check that all DrawBuffers are present */ - for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) { - if (fb->ColorDrawBuffer[j] != GL_NONE) { - const struct gl_renderbuffer_attachment *att - = _mesa_get_attachment(ctx, fb, fb->ColorDrawBuffer[j]); - assert(att); - if (att->Type == GL_NONE) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT; - fbo_incomplete("missing drawbuffer", j); - return; - } - } - } - - /* Check that the ReadBuffer is present */ - if (fb->ColorReadBuffer != GL_NONE) { - const struct gl_renderbuffer_attachment *att - = _mesa_get_attachment(ctx, fb, fb->ColorReadBuffer); - assert(att); - if (att->Type == GL_NONE) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT; - fbo_incomplete("missing readbuffer", -1); - return; - } - } - } -#else - (void) j; -#endif - - if (numImages == 0) { - fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT; - fbo_incomplete("no attachments", -1); - return; - } - - /* Provisionally set status = COMPLETE ... */ - fb->_Status = GL_FRAMEBUFFER_COMPLETE_EXT; - - /* ... but the driver may say the FB is incomplete. - * Drivers will most likely set the status to GL_FRAMEBUFFER_UNSUPPORTED - * if anything. - */ - if (ctx->Driver.ValidateFramebuffer) { - ctx->Driver.ValidateFramebuffer(ctx, fb); - if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - fbo_incomplete("driver marked FBO as incomplete", -1); - } - } - - if (fb->_Status == GL_FRAMEBUFFER_COMPLETE_EXT) { - /* - * Note that if ARB_framebuffer_object is supported and the attached - * renderbuffers/textures are different sizes, the framebuffer - * width/height will be set to the smallest width/height. - */ - fb->Width = minWidth; - fb->Height = minHeight; - - /* finally, update the visual info for the framebuffer */ - _mesa_update_framebuffer_visual(ctx, fb); - } -} - - -GLboolean GLAPIENTRY -_mesa_IsRenderbufferEXT(GLuint renderbuffer) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - if (renderbuffer) { - struct gl_renderbuffer *rb = _mesa_lookup_renderbuffer(ctx, renderbuffer); - if (rb != NULL && rb != &DummyRenderbuffer) - return GL_TRUE; - } - return GL_FALSE; -} - - -void GLAPIENTRY -_mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer) -{ - struct gl_renderbuffer *newRb; - GET_CURRENT_CONTEXT(ctx); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_RENDERBUFFER_EXT) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBindRenderbufferEXT(target)"); - return; - } - - /* No need to flush here since the render buffer binding has no - * effect on rendering state. - */ - - if (renderbuffer) { - newRb = _mesa_lookup_renderbuffer(ctx, renderbuffer); - if (newRb == &DummyRenderbuffer) { - /* ID was reserved, but no real renderbuffer object made yet */ - newRb = NULL; - } - else if (!newRb && ctx->Extensions.ARB_framebuffer_object) { - /* All RB IDs must be Gen'd */ - _mesa_error(ctx, GL_INVALID_OPERATION, "glBindRenderbuffer(buffer)"); - return; - } - - if (!newRb) { - /* create new renderbuffer object */ - newRb = ctx->Driver.NewRenderbuffer(ctx, renderbuffer); - if (!newRb) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindRenderbufferEXT"); - return; - } - ASSERT(newRb->AllocStorage); - _mesa_HashInsert(ctx->Shared->RenderBuffers, renderbuffer, newRb); - newRb->RefCount = 1; /* referenced by hash table */ - } - } - else { - newRb = NULL; - } - - ASSERT(newRb != &DummyRenderbuffer); - - _mesa_reference_renderbuffer(&ctx->CurrentRenderbuffer, newRb); -} - - -/** - * If the given renderbuffer is anywhere attached to the framebuffer, detach - * the renderbuffer. - * This is used when a renderbuffer object is deleted. - * The spec calls for unbinding. - */ -static void -detach_renderbuffer(struct gl_context *ctx, - struct gl_framebuffer *fb, - struct gl_renderbuffer *rb) -{ - GLuint i; - for (i = 0; i < BUFFER_COUNT; i++) { - if (fb->Attachment[i].Renderbuffer == rb) { - _mesa_remove_attachment(ctx, &fb->Attachment[i]); - } - } - invalidate_framebuffer(fb); -} - - -void GLAPIENTRY -_mesa_DeleteRenderbuffersEXT(GLsizei n, const GLuint *renderbuffers) -{ - GLint i; - GET_CURRENT_CONTEXT(ctx); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - FLUSH_VERTICES(ctx, _NEW_BUFFERS); - - for (i = 0; i < n; i++) { - if (renderbuffers[i] > 0) { - struct gl_renderbuffer *rb; - rb = _mesa_lookup_renderbuffer(ctx, renderbuffers[i]); - if (rb) { - /* check if deleting currently bound renderbuffer object */ - if (rb == ctx->CurrentRenderbuffer) { - /* bind default */ - ASSERT(rb->RefCount >= 2); - _mesa_BindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0); - } - - if (ctx->DrawBuffer->Name) { - detach_renderbuffer(ctx, ctx->DrawBuffer, rb); - } - if (ctx->ReadBuffer->Name && ctx->ReadBuffer != ctx->DrawBuffer) { - detach_renderbuffer(ctx, ctx->ReadBuffer, rb); - } - - /* Remove from hash table immediately, to free the ID. - * But the object will not be freed until it's no longer - * referenced anywhere else. - */ - _mesa_HashRemove(ctx->Shared->RenderBuffers, renderbuffers[i]); - - if (rb != &DummyRenderbuffer) { - /* no longer referenced by hash table */ - _mesa_reference_renderbuffer(&rb, NULL); - } - } - } - } -} - - -void GLAPIENTRY -_mesa_GenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint first; - GLint i; - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (n < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGenRenderbuffersEXT(n)"); - return; - } - - if (!renderbuffers) - return; - - first = _mesa_HashFindFreeKeyBlock(ctx->Shared->RenderBuffers, n); - - for (i = 0; i < n; i++) { - GLuint name = first + i; - renderbuffers[i] = name; - /* insert dummy placeholder into hash table */ - _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - _mesa_HashInsert(ctx->Shared->RenderBuffers, name, &DummyRenderbuffer); - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - } -} - - -/** - * Given an internal format token for a render buffer, return the - * corresponding base format (one of GL_RGB, GL_RGBA, GL_STENCIL_INDEX, - * GL_DEPTH_COMPONENT, GL_DEPTH_STENCIL_EXT, GL_ALPHA, GL_LUMINANCE, - * GL_LUMINANCE_ALPHA, GL_INTENSITY, etc). - * - * This is similar to _mesa_base_tex_format() but the set of valid - * internal formats is different. - * - * Note that even if a format is determined to be legal here, validation - * of the FBO may fail if the format is not supported by the driver/GPU. - * - * \param internalFormat as passed to glRenderbufferStorage() - * \return the base internal format, or 0 if internalFormat is illegal - */ -GLenum -_mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat) -{ - /* - * Notes: some formats such as alpha, luminance, etc. were added - * with GL_ARB_framebuffer_object. - */ - switch (internalFormat) { - case GL_ALPHA: - case GL_ALPHA4: - case GL_ALPHA8: - case GL_ALPHA12: - case GL_ALPHA16: - return ctx->Extensions.ARB_framebuffer_object ? GL_ALPHA : 0; - case GL_LUMINANCE: - case GL_LUMINANCE4: - case GL_LUMINANCE8: - case GL_LUMINANCE12: - case GL_LUMINANCE16: - return ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE : 0; - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE4_ALPHA4: - case GL_LUMINANCE6_ALPHA2: - case GL_LUMINANCE8_ALPHA8: - case GL_LUMINANCE12_ALPHA4: - case GL_LUMINANCE12_ALPHA12: - case GL_LUMINANCE16_ALPHA16: - return ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE_ALPHA : 0; - case GL_INTENSITY: - case GL_INTENSITY4: - case GL_INTENSITY8: - case GL_INTENSITY12: - case GL_INTENSITY16: - return ctx->Extensions.ARB_framebuffer_object ? GL_INTENSITY : 0; - case GL_RGB: - case GL_R3_G3_B2: - case GL_RGB4: - case GL_RGB5: - case GL_RGB8: - case GL_RGB10: - case GL_RGB12: - case GL_RGB16: - case GL_SRGB8_EXT: - return GL_RGB; - case GL_RGBA: - case GL_RGBA2: - case GL_RGBA4: - case GL_RGB5_A1: - case GL_RGBA8: - case GL_RGB10_A2: - case GL_RGBA12: - case GL_RGBA16: - case GL_SRGB8_ALPHA8_EXT: - return GL_RGBA; - case GL_STENCIL_INDEX: - case GL_STENCIL_INDEX1_EXT: - case GL_STENCIL_INDEX4_EXT: - case GL_STENCIL_INDEX8_EXT: - case GL_STENCIL_INDEX16_EXT: - return GL_STENCIL_INDEX; - case GL_DEPTH_COMPONENT: - case GL_DEPTH_COMPONENT16: - case GL_DEPTH_COMPONENT24: - case GL_DEPTH_COMPONENT32: - return GL_DEPTH_COMPONENT; - case GL_DEPTH_STENCIL_EXT: - case GL_DEPTH24_STENCIL8_EXT: - if (ctx->Extensions.EXT_packed_depth_stencil) - return GL_DEPTH_STENCIL_EXT; - else - return 0; - case GL_RED: - case GL_R8: - case GL_R16: - return ctx->Extensions.ARB_texture_rg ? GL_RED : 0; - case GL_RG: - case GL_RG8: - case GL_RG16: - return ctx->Extensions.ARB_texture_rg ? GL_RG : 0; - /* signed normalized texture formats */ - case GL_RED_SNORM: - case GL_R8_SNORM: - case GL_R16_SNORM: - return ctx->Extensions.EXT_texture_snorm ? GL_RED : 0; - case GL_RG_SNORM: - case GL_RG8_SNORM: - case GL_RG16_SNORM: - return ctx->Extensions.EXT_texture_snorm ? GL_RG : 0; - case GL_RGB_SNORM: - case GL_RGB8_SNORM: - case GL_RGB16_SNORM: - return ctx->Extensions.EXT_texture_snorm ? GL_RGB : 0; - case GL_RGBA_SNORM: - case GL_RGBA8_SNORM: - case GL_RGBA16_SNORM: - return ctx->Extensions.EXT_texture_snorm ? GL_RGBA : 0; - case GL_ALPHA_SNORM: - case GL_ALPHA8_SNORM: - case GL_ALPHA16_SNORM: - return ctx->Extensions.EXT_texture_snorm && - ctx->Extensions.ARB_framebuffer_object ? GL_ALPHA : 0; - case GL_LUMINANCE_SNORM: - case GL_LUMINANCE8_SNORM: - case GL_LUMINANCE16_SNORM: - return ctx->Extensions.EXT_texture_snorm && - ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE : 0; - case GL_LUMINANCE_ALPHA_SNORM: - case GL_LUMINANCE8_ALPHA8_SNORM: - case GL_LUMINANCE16_ALPHA16_SNORM: - return ctx->Extensions.EXT_texture_snorm && - ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE_ALPHA : 0; - case GL_INTENSITY_SNORM: - case GL_INTENSITY8_SNORM: - case GL_INTENSITY16_SNORM: - return ctx->Extensions.EXT_texture_snorm && - ctx->Extensions.ARB_framebuffer_object ? GL_INTENSITY : 0; - /* XXX add floating point and integer formats eventually */ - default: - return 0; - } -} - - -/** - * Invalidate a renderbuffer attachment. Called from _mesa_HashWalk(). - */ -static void -invalidate_rb(GLuint key, void *data, void *userData) -{ - struct gl_framebuffer *fb = (struct gl_framebuffer *) data; - struct gl_renderbuffer *rb = (struct gl_renderbuffer *) userData; - - /* If this is a user-created FBO */ - if (fb->Name) { - GLuint i; - for (i = 0; i < BUFFER_COUNT; i++) { - struct gl_renderbuffer_attachment *att = fb->Attachment + i; - if (att->Type == GL_RENDERBUFFER && - att->Renderbuffer == rb) { - /* Mark fb status as indeterminate to force re-validation */ - fb->_Status = 0; - return; - } - } - } -} - - -/** sentinal value, see below */ -#define NO_SAMPLES 1000 - - -/** - * Helper function used by _mesa_RenderbufferStorageEXT() and - * _mesa_RenderbufferStorageMultisample(). - * samples will be NO_SAMPLES if called by _mesa_RenderbufferStorageEXT(). - */ -static void -renderbuffer_storage(GLenum target, GLenum internalFormat, - GLsizei width, GLsizei height, GLsizei samples) -{ - const char *func = samples == NO_SAMPLES ? - "glRenderbufferStorage" : "RenderbufferStorageMultisample"; - struct gl_renderbuffer *rb; - GLenum baseFormat; - GET_CURRENT_CONTEXT(ctx); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_RENDERBUFFER_EXT) { - _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", func); - return; - } - - baseFormat = _mesa_base_fbo_format(ctx, internalFormat); - if (baseFormat == 0) { - _mesa_error(ctx, GL_INVALID_ENUM, "%s(internalFormat)", func); - return; - } - - if (width < 1 || width > (GLsizei) ctx->Const.MaxRenderbufferSize) { - _mesa_error(ctx, GL_INVALID_VALUE, "%s(width)", func); - return; - } - - if (height < 1 || height > (GLsizei) ctx->Const.MaxRenderbufferSize) { - _mesa_error(ctx, GL_INVALID_VALUE, "%s(height)", func); - return; - } - - if (samples == NO_SAMPLES) { - /* NumSamples == 0 indicates non-multisampling */ - samples = 0; - } - else if (samples > (GLsizei) ctx->Const.MaxSamples) { - /* note: driver may choose to use more samples than what's requested */ - _mesa_error(ctx, GL_INVALID_VALUE, "%s(samples)", func); - return; - } - - rb = ctx->CurrentRenderbuffer; - if (!rb) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s", func); - return; - } - - FLUSH_VERTICES(ctx, _NEW_BUFFERS); - - if (rb->InternalFormat == internalFormat && - rb->Width == (GLuint) width && - rb->Height == (GLuint) height) { - /* no change in allocation needed */ - return; - } - - /* These MUST get set by the AllocStorage func */ - rb->Format = MESA_FORMAT_NONE; - rb->NumSamples = samples; - - /* Now allocate the storage */ - ASSERT(rb->AllocStorage); - if (rb->AllocStorage(ctx, rb, internalFormat, width, height)) { - /* No error - check/set fields now */ - assert(rb->Format != MESA_FORMAT_NONE); - assert(rb->Width == (GLuint) width); - assert(rb->Height == (GLuint) height); - rb->InternalFormat = internalFormat; - rb->_BaseFormat = baseFormat; - assert(rb->_BaseFormat != 0); - } - else { - /* Probably ran out of memory - clear the fields */ - rb->Width = 0; - rb->Height = 0; - rb->Format = MESA_FORMAT_NONE; - rb->InternalFormat = GL_NONE; - rb->_BaseFormat = GL_NONE; - rb->NumSamples = 0; - } - - /* Invalidate the framebuffers the renderbuffer is attached in. */ - if (rb->AttachedAnytime) { - _mesa_HashWalk(ctx->Shared->FrameBuffers, invalidate_rb, rb); - } -} - - -#if FEATURE_OES_EGL_image -void GLAPIENTRY -_mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) -{ - struct gl_renderbuffer *rb; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!ctx->Extensions.OES_EGL_image) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glEGLImageTargetRenderbufferStorageOES(unsupported)"); - return; - } - - if (target != GL_RENDERBUFFER) { - _mesa_error(ctx, GL_INVALID_ENUM, - "EGLImageTargetRenderbufferStorageOES"); - return; - } - - rb = ctx->CurrentRenderbuffer; - if (!rb) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "EGLImageTargetRenderbufferStorageOES"); - return; - } - - FLUSH_VERTICES(ctx, _NEW_BUFFERS); - - ctx->Driver.EGLImageTargetRenderbufferStorage(ctx, rb, image); -} -#endif - - -/** - * Helper function for _mesa_GetRenderbufferParameterivEXT() and - * _mesa_GetFramebufferAttachmentParameterivEXT() - * We have to be careful to respect the base format. For example, if a - * renderbuffer/texture was created with internalFormat=GL_RGB but the - * driver actually chose a GL_RGBA format, when the user queries ALPHA_SIZE - * we need to return zero. - */ -static GLint -get_component_bits(GLenum pname, GLenum baseFormat, gl_format format) -{ - switch (pname) { - case GL_RENDERBUFFER_RED_SIZE_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE: - if (baseFormat == GL_RGB || baseFormat == GL_RGBA || - baseFormat == GL_RG || baseFormat == GL_RED) - return _mesa_get_format_bits(format, pname); - else - return 0; - case GL_RENDERBUFFER_GREEN_SIZE_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: - if (baseFormat == GL_RGB || baseFormat == GL_RGBA || baseFormat == GL_RG) - return _mesa_get_format_bits(format, pname); - else - return 0; - case GL_RENDERBUFFER_BLUE_SIZE_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: - if (baseFormat == GL_RGB || baseFormat == GL_RGBA) - return _mesa_get_format_bits(format, pname); - else - return 0; - case GL_RENDERBUFFER_ALPHA_SIZE_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: - if (baseFormat == GL_RGBA || baseFormat == GL_ALPHA || - baseFormat == GL_LUMINANCE_ALPHA) - return _mesa_get_format_bits(format, pname); - else - return 0; - case GL_RENDERBUFFER_DEPTH_SIZE_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: - if (baseFormat == GL_DEPTH_COMPONENT || baseFormat == GL_DEPTH_STENCIL) - return _mesa_get_format_bits(format, pname); - else - return 0; - case GL_RENDERBUFFER_STENCIL_SIZE_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: - if (baseFormat == GL_STENCIL_INDEX || baseFormat == GL_DEPTH_STENCIL) - return _mesa_get_format_bits(format, pname); - else - return 0; - default: - return 0; - } -} - - - -void GLAPIENTRY -_mesa_RenderbufferStorageEXT(GLenum target, GLenum internalFormat, - GLsizei width, GLsizei height) -{ - /* GL_ARB_fbo says calling this function is equivalent to calling - * glRenderbufferStorageMultisample() with samples=0. We pass in - * a token value here just for error reporting purposes. - */ - renderbuffer_storage(target, internalFormat, width, height, NO_SAMPLES); -} - - -void GLAPIENTRY -_mesa_RenderbufferStorageMultisample(GLenum target, GLsizei samples, - GLenum internalFormat, - GLsizei width, GLsizei height) -{ - renderbuffer_storage(target, internalFormat, width, height, samples); -} - - -/** - * OpenGL ES version of glRenderBufferStorage. - */ -void GLAPIENTRY -_es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat, - GLsizei width, GLsizei height) -{ - switch (internalFormat) { - case GL_RGB565: - /* XXX this confuses GL_RENDERBUFFER_INTERNAL_FORMAT_OES */ - /* choose a closest format */ - internalFormat = GL_RGB5; - break; - default: - break; - } - - renderbuffer_storage(target, internalFormat, width, height, 0); -} - - -void GLAPIENTRY -_mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params) -{ - struct gl_renderbuffer *rb; - GET_CURRENT_CONTEXT(ctx); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (target != GL_RENDERBUFFER_EXT) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetRenderbufferParameterivEXT(target)"); - return; - } - - rb = ctx->CurrentRenderbuffer; - if (!rb) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetRenderbufferParameterivEXT"); - return; - } - - /* No need to flush here since we're just quering state which is - * not effected by rendering. - */ - - switch (pname) { - case GL_RENDERBUFFER_WIDTH_EXT: - *params = rb->Width; - return; - case GL_RENDERBUFFER_HEIGHT_EXT: - *params = rb->Height; - return; - case GL_RENDERBUFFER_INTERNAL_FORMAT_EXT: - *params = rb->InternalFormat; - return; - case GL_RENDERBUFFER_RED_SIZE_EXT: - case GL_RENDERBUFFER_GREEN_SIZE_EXT: - case GL_RENDERBUFFER_BLUE_SIZE_EXT: - case GL_RENDERBUFFER_ALPHA_SIZE_EXT: - case GL_RENDERBUFFER_DEPTH_SIZE_EXT: - case GL_RENDERBUFFER_STENCIL_SIZE_EXT: - *params = get_component_bits(pname, rb->_BaseFormat, rb->Format); - break; - case GL_RENDERBUFFER_SAMPLES: - if (ctx->Extensions.ARB_framebuffer_object) { - *params = rb->NumSamples; - break; - } - /* fallthrough */ - default: - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetRenderbufferParameterivEXT(target)"); - return; - } -} - - -GLboolean GLAPIENTRY -_mesa_IsFramebufferEXT(GLuint framebuffer) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - if (framebuffer) { - struct gl_framebuffer *rb = _mesa_lookup_framebuffer(ctx, framebuffer); - if (rb != NULL && rb != &DummyFramebuffer) - return GL_TRUE; - } - return GL_FALSE; -} - - -/** - * Check if any of the attachments of the given framebuffer are textures - * (render to texture). Call ctx->Driver.RenderTexture() for such - * attachments. - */ -static void -check_begin_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb) -{ - GLuint i; - ASSERT(ctx->Driver.RenderTexture); - - if (fb->Name == 0) - return; /* can't render to texture with winsys framebuffers */ - - for (i = 0; i < BUFFER_COUNT; i++) { - struct gl_renderbuffer_attachment *att = fb->Attachment + i; - struct gl_texture_object *texObj = att->Texture; - if (texObj - && texObj->Image[att->CubeMapFace][att->TextureLevel]) { - ctx->Driver.RenderTexture(ctx, fb, att); - } - } -} - - -/** - * Examine all the framebuffer's attachments to see if any are textures. - * If so, call ctx->Driver.FinishRenderTexture() for each texture to - * notify the device driver that the texture image may have changed. - */ -static void -check_end_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb) -{ - if (fb->Name == 0) - return; /* can't render to texture with winsys framebuffers */ - - if (ctx->Driver.FinishRenderTexture) { - GLuint i; - for (i = 0; i < BUFFER_COUNT; i++) { - struct gl_renderbuffer_attachment *att = fb->Attachment + i; - if (att->Texture && att->Renderbuffer) { - ctx->Driver.FinishRenderTexture(ctx, att); - } - } - } -} - - -void GLAPIENTRY -_mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer) -{ - struct gl_framebuffer *newDrawFb, *newReadFb; - struct gl_framebuffer *oldDrawFb, *oldReadFb; - GLboolean bindReadBuf, bindDrawBuf; - GET_CURRENT_CONTEXT(ctx); - -#ifdef DEBUG - if (ctx->Extensions.ARB_framebuffer_object) { - ASSERT(ctx->Extensions.EXT_framebuffer_object); - ASSERT(ctx->Extensions.EXT_framebuffer_blit); - } -#endif - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!ctx->Extensions.EXT_framebuffer_object) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBindFramebufferEXT(unsupported)"); - return; - } - - switch (target) { -#if FEATURE_EXT_framebuffer_blit - case GL_DRAW_FRAMEBUFFER_EXT: - if (!ctx->Extensions.EXT_framebuffer_blit) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBindFramebufferEXT(target)"); - return; - } - bindDrawBuf = GL_TRUE; - bindReadBuf = GL_FALSE; - break; - case GL_READ_FRAMEBUFFER_EXT: - if (!ctx->Extensions.EXT_framebuffer_blit) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBindFramebufferEXT(target)"); - return; - } - bindDrawBuf = GL_FALSE; - bindReadBuf = GL_TRUE; - break; -#endif - case GL_FRAMEBUFFER_EXT: - bindDrawBuf = GL_TRUE; - bindReadBuf = GL_TRUE; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glBindFramebufferEXT(target)"); - return; - } - - if (framebuffer) { - /* Binding a user-created framebuffer object */ - newDrawFb = _mesa_lookup_framebuffer(ctx, framebuffer); - if (newDrawFb == &DummyFramebuffer) { - /* ID was reserved, but no real framebuffer object made yet */ - newDrawFb = NULL; - } - else if (!newDrawFb && ctx->Extensions.ARB_framebuffer_object) { - /* All FBO IDs must be Gen'd */ - _mesa_error(ctx, GL_INVALID_OPERATION, "glBindFramebuffer(buffer)"); - return; - } - - if (!newDrawFb) { - /* create new framebuffer object */ - newDrawFb = ctx->Driver.NewFramebuffer(ctx, framebuffer); - if (!newDrawFb) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindFramebufferEXT"); - return; - } - _mesa_HashInsert(ctx->Shared->FrameBuffers, framebuffer, newDrawFb); - } - newReadFb = newDrawFb; - } - else { - /* Binding the window system framebuffer (which was originally set - * with MakeCurrent). - */ - newDrawFb = ctx->WinSysDrawBuffer; - newReadFb = ctx->WinSysReadBuffer; - } - - ASSERT(newDrawFb); - ASSERT(newDrawFb != &DummyFramebuffer); - - /* save pointers to current/old framebuffers */ - oldDrawFb = ctx->DrawBuffer; - oldReadFb = ctx->ReadBuffer; - - /* check if really changing bindings */ - if (oldDrawFb == newDrawFb) - bindDrawBuf = GL_FALSE; - if (oldReadFb == newReadFb) - bindReadBuf = GL_FALSE; - - /* - * OK, now bind the new Draw/Read framebuffers, if they're changing. - * - * We also check if we're beginning and/or ending render-to-texture. - * When a framebuffer with texture attachments is unbound, call - * ctx->Driver.FinishRenderTexture(). - * When a framebuffer with texture attachments is bound, call - * ctx->Driver.RenderTexture(). - * - * Note that if the ReadBuffer has texture attachments we don't consider - * that a render-to-texture case. - */ - if (bindReadBuf) { - FLUSH_VERTICES(ctx, _NEW_BUFFERS); - - /* check if old readbuffer was render-to-texture */ - check_end_texture_render(ctx, oldReadFb); - - _mesa_reference_framebuffer(&ctx->ReadBuffer, newReadFb); - } - - if (bindDrawBuf) { - FLUSH_VERTICES(ctx, _NEW_BUFFERS); - - /* check if old read/draw buffers were render-to-texture */ - if (!bindReadBuf) - check_end_texture_render(ctx, oldReadFb); - - if (oldDrawFb != oldReadFb) - check_end_texture_render(ctx, oldDrawFb); - - /* check if newly bound framebuffer has any texture attachments */ - check_begin_texture_render(ctx, newDrawFb); - - _mesa_reference_framebuffer(&ctx->DrawBuffer, newDrawFb); - } - - if ((bindDrawBuf || bindReadBuf) && ctx->Driver.BindFramebuffer) { - ctx->Driver.BindFramebuffer(ctx, target, newDrawFb, newReadFb); - } -} - - -void GLAPIENTRY -_mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers) -{ - GLint i; - GET_CURRENT_CONTEXT(ctx); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - FLUSH_VERTICES(ctx, _NEW_BUFFERS); - - for (i = 0; i < n; i++) { - if (framebuffers[i] > 0) { - struct gl_framebuffer *fb; - fb = _mesa_lookup_framebuffer(ctx, framebuffers[i]); - if (fb) { - ASSERT(fb == &DummyFramebuffer || fb->Name == framebuffers[i]); - - /* check if deleting currently bound framebuffer object */ - if (ctx->Extensions.EXT_framebuffer_blit) { - /* separate draw/read binding points */ - if (fb == ctx->DrawBuffer) { - /* bind default */ - ASSERT(fb->RefCount >= 2); - _mesa_BindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0); - } - if (fb == ctx->ReadBuffer) { - /* bind default */ - ASSERT(fb->RefCount >= 2); - _mesa_BindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0); - } - } - else { - /* only one binding point for read/draw buffers */ - if (fb == ctx->DrawBuffer || fb == ctx->ReadBuffer) { - /* bind default */ - ASSERT(fb->RefCount >= 2); - _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); - } - } - - /* remove from hash table immediately, to free the ID */ - _mesa_HashRemove(ctx->Shared->FrameBuffers, framebuffers[i]); - - if (fb != &DummyFramebuffer) { - /* But the object will not be freed until it's no longer - * bound in any context. - */ - _mesa_reference_framebuffer(&fb, NULL); - } - } - } - } -} - - -void GLAPIENTRY -_mesa_GenFramebuffersEXT(GLsizei n, GLuint *framebuffers) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint first; - GLint i; - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (n < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glGenFramebuffersEXT(n)"); - return; - } - - if (!framebuffers) - return; - - first = _mesa_HashFindFreeKeyBlock(ctx->Shared->FrameBuffers, n); - - for (i = 0; i < n; i++) { - GLuint name = first + i; - framebuffers[i] = name; - /* insert dummy placeholder into hash table */ - _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - _mesa_HashInsert(ctx->Shared->FrameBuffers, name, &DummyFramebuffer); - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - } -} - - - -GLenum GLAPIENTRY -_mesa_CheckFramebufferStatusEXT(GLenum target) -{ - struct gl_framebuffer *buffer; - GET_CURRENT_CONTEXT(ctx); - - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0); - - buffer = get_framebuffer_target(ctx, target); - if (!buffer) { - _mesa_error(ctx, GL_INVALID_ENUM, "glCheckFramebufferStatus(target)"); - return 0; - } - - if (buffer->Name == 0) { - /* The window system / default framebuffer is always complete */ - return GL_FRAMEBUFFER_COMPLETE_EXT; - } - - /* No need to flush here */ - - if (buffer->_Status != GL_FRAMEBUFFER_COMPLETE) { - _mesa_test_framebuffer_completeness(ctx, buffer); - } - - return buffer->_Status; -} - - - -/** - * Common code called by glFramebufferTexture1D/2D/3DEXT(). - */ -static void -framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target, - GLenum attachment, GLenum textarget, GLuint texture, - GLint level, GLint zoffset) -{ - struct gl_renderbuffer_attachment *att; - struct gl_texture_object *texObj = NULL; - struct gl_framebuffer *fb; - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - fb = get_framebuffer_target(ctx, target); - if (!fb) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glFramebufferTexture%sEXT(target=0x%x)", caller, target); - return; - } - - /* check framebuffer binding */ - if (fb->Name == 0) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glFramebufferTexture%sEXT", caller); - return; - } - - - /* The textarget, level, and zoffset parameters are only validated if - * texture is non-zero. - */ - if (texture) { - GLboolean err = GL_TRUE; - - texObj = _mesa_lookup_texture(ctx, texture); - if (texObj != NULL) { - if (textarget == 0) { - /* XXX what's the purpose of this? */ - err = (texObj->Target != GL_TEXTURE_3D) && - (texObj->Target != GL_TEXTURE_1D_ARRAY_EXT) && - (texObj->Target != GL_TEXTURE_2D_ARRAY_EXT); - } - else { - err = (texObj->Target == GL_TEXTURE_CUBE_MAP) - ? !IS_CUBE_FACE(textarget) - : (texObj->Target != textarget); - } - } - else { - /* can't render to a non-existant texture */ - _mesa_error(ctx, GL_INVALID_OPERATION, - "glFramebufferTexture%sEXT(non existant texture)", - caller); - return; - } - - if (err) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glFramebufferTexture%sEXT(texture target mismatch)", - caller); - return; - } - - if (texObj->Target == GL_TEXTURE_3D) { - const GLint maxSize = 1 << (ctx->Const.Max3DTextureLevels - 1); - if (zoffset < 0 || zoffset >= maxSize) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glFramebufferTexture%sEXT(zoffset)", caller); - return; - } - } - else if ((texObj->Target == GL_TEXTURE_1D_ARRAY_EXT) || - (texObj->Target == GL_TEXTURE_2D_ARRAY_EXT)) { - if (zoffset < 0 || zoffset >= ctx->Const.MaxArrayTextureLayers) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glFramebufferTexture%sEXT(layer)", caller); - return; - } - } - - if ((level < 0) || - (level >= _mesa_max_texture_levels(ctx, texObj->Target))) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glFramebufferTexture%sEXT(level)", caller); - return; - } - } - - att = _mesa_get_attachment(ctx, fb, attachment); - if (att == NULL) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glFramebufferTexture%sEXT(attachment)", caller); - return; - } - - FLUSH_VERTICES(ctx, _NEW_BUFFERS); - - _glthread_LOCK_MUTEX(fb->Mutex); - if (texObj) { - _mesa_set_texture_attachment(ctx, fb, att, texObj, textarget, - level, zoffset); - /* Set the render-to-texture flag. We'll check this flag in - * glTexImage() and friends to determine if we need to revalidate - * any FBOs that might be rendering into this texture. - * This flag never gets cleared since it's non-trivial to determine - * when all FBOs might be done rendering to this texture. That's OK - * though since it's uncommon to render to a texture then repeatedly - * call glTexImage() to change images in the texture. - */ - texObj->_RenderToTexture = GL_TRUE; - } - else { - _mesa_remove_attachment(ctx, att); - } - - invalidate_framebuffer(fb); - - _glthread_UNLOCK_MUTEX(fb->Mutex); -} - - - -void GLAPIENTRY -_mesa_FramebufferTexture1DEXT(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, GLint level) -{ - GET_CURRENT_CONTEXT(ctx); - - if ((texture != 0) && (textarget != GL_TEXTURE_1D)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glFramebufferTexture1DEXT(textarget)"); - return; - } - - framebuffer_texture(ctx, "1D", target, attachment, textarget, texture, - level, 0); -} - - -void GLAPIENTRY -_mesa_FramebufferTexture2DEXT(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, GLint level) -{ - GET_CURRENT_CONTEXT(ctx); - - if ((texture != 0) && - (textarget != GL_TEXTURE_2D) && - (textarget != GL_TEXTURE_RECTANGLE_ARB) && - (!IS_CUBE_FACE(textarget))) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glFramebufferTexture2DEXT(textarget=0x%x)", textarget); - return; - } - - framebuffer_texture(ctx, "2D", target, attachment, textarget, texture, - level, 0); -} - - -void GLAPIENTRY -_mesa_FramebufferTexture3DEXT(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, - GLint level, GLint zoffset) -{ - GET_CURRENT_CONTEXT(ctx); - - if ((texture != 0) && (textarget != GL_TEXTURE_3D)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glFramebufferTexture3DEXT(textarget)"); - return; - } - - framebuffer_texture(ctx, "3D", target, attachment, textarget, texture, - level, zoffset); -} - - -void GLAPIENTRY -_mesa_FramebufferTextureLayerEXT(GLenum target, GLenum attachment, - GLuint texture, GLint level, GLint layer) -{ - GET_CURRENT_CONTEXT(ctx); - - framebuffer_texture(ctx, "Layer", target, attachment, 0, texture, - level, layer); -} - - -void GLAPIENTRY -_mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment, - GLenum renderbufferTarget, - GLuint renderbuffer) -{ - struct gl_renderbuffer_attachment *att; - struct gl_framebuffer *fb; - struct gl_renderbuffer *rb; - GET_CURRENT_CONTEXT(ctx); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - fb = get_framebuffer_target(ctx, target); - if (!fb) { - _mesa_error(ctx, GL_INVALID_ENUM, "glFramebufferRenderbufferEXT(target)"); - return; - } - - if (renderbufferTarget != GL_RENDERBUFFER_EXT) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glFramebufferRenderbufferEXT(renderbufferTarget)"); - return; - } - - if (fb->Name == 0) { - /* Can't attach new renderbuffers to a window system framebuffer */ - _mesa_error(ctx, GL_INVALID_OPERATION, "glFramebufferRenderbufferEXT"); - return; - } - - att = _mesa_get_attachment(ctx, fb, attachment); - if (att == NULL) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glFramebufferRenderbufferEXT(invalid attachment %s)", - _mesa_lookup_enum_by_nr(attachment)); - return; - } - - if (renderbuffer) { - rb = _mesa_lookup_renderbuffer(ctx, renderbuffer); - if (!rb) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glFramebufferRenderbufferEXT(non-existant" - " renderbuffer %u)", renderbuffer); - return; - } - else if (rb == &DummyRenderbuffer) { - /* This is what NVIDIA does */ - _mesa_error(ctx, GL_INVALID_VALUE, - "glFramebufferRenderbufferEXT(renderbuffer %u)", - renderbuffer); - return; - } - } - else { - /* remove renderbuffer attachment */ - rb = NULL; - } - - if (attachment == GL_DEPTH_STENCIL_ATTACHMENT && - rb && rb->Format != MESA_FORMAT_NONE) { - /* make sure the renderbuffer is a depth/stencil format */ - const GLenum baseFormat = _mesa_get_format_base_format(rb->Format); - if (baseFormat != GL_DEPTH_STENCIL) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glFramebufferRenderbufferEXT(renderbuffer" - " is not DEPTH_STENCIL format)"); - return; - } - } - - - FLUSH_VERTICES(ctx, _NEW_BUFFERS); - - assert(ctx->Driver.FramebufferRenderbuffer); - ctx->Driver.FramebufferRenderbuffer(ctx, fb, attachment, rb); - - /* Some subsequent GL commands may depend on the framebuffer's visual - * after the binding is updated. Update visual info now. - */ - _mesa_update_framebuffer_visual(ctx, fb); -} - - -void GLAPIENTRY -_mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, - GLenum pname, GLint *params) -{ - const struct gl_renderbuffer_attachment *att; - struct gl_framebuffer *buffer; - GET_CURRENT_CONTEXT(ctx); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - buffer = get_framebuffer_target(ctx, target); - if (!buffer) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetFramebufferAttachmentParameterivEXT(target)"); - return; - } - - if (buffer->Name == 0) { - /* the default / window-system FBO */ - att = _mesa_get_fb0_attachment(ctx, buffer, attachment); - } - else { - /* user-created framebuffer FBO */ - att = _mesa_get_attachment(ctx, buffer, attachment); - } - - if (att == NULL) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetFramebufferAttachmentParameterivEXT(attachment)"); - return; - } - - if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) { - /* the depth and stencil attachments must point to the same buffer */ - const struct gl_renderbuffer_attachment *depthAtt, *stencilAtt; - depthAtt = _mesa_get_attachment(ctx, buffer, GL_DEPTH_ATTACHMENT); - stencilAtt = _mesa_get_attachment(ctx, buffer, GL_STENCIL_ATTACHMENT); - if (depthAtt->Renderbuffer != stencilAtt->Renderbuffer) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetFramebufferAttachmentParameterivEXT(DEPTH/STENCIL" - " attachments differ)"); - return; - } - } - - /* No need to flush here */ - - switch (pname) { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT: - *params = buffer->Name == 0 ? GL_FRAMEBUFFER_DEFAULT : att->Type; - return; - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT: - if (att->Type == GL_RENDERBUFFER_EXT) { - *params = att->Renderbuffer->Name; - } - else if (att->Type == GL_TEXTURE) { - *params = att->Texture->Name; - } - else { - assert(att->Type == GL_NONE); - *params = 0; - } - return; - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT: - if (att->Type == GL_TEXTURE) { - *params = att->TextureLevel; - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetFramebufferAttachmentParameterivEXT(pname)"); - } - return; - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT: - if (att->Type == GL_TEXTURE) { - if (att->Texture && att->Texture->Target == GL_TEXTURE_CUBE_MAP) { - *params = GL_TEXTURE_CUBE_MAP_POSITIVE_X + att->CubeMapFace; - } - else { - *params = 0; - } - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetFramebufferAttachmentParameterivEXT(pname)"); - } - return; - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT: - if (att->Type == GL_TEXTURE) { - if (att->Texture && att->Texture->Target == GL_TEXTURE_3D) { - *params = att->Zoffset; - } - else { - *params = 0; - } - } - else { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetFramebufferAttachmentParameterivEXT(pname)"); - } - return; - case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: - if (!ctx->Extensions.ARB_framebuffer_object) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetFramebufferAttachmentParameterivEXT(pname)"); - } - else { - if (ctx->Extensions.EXT_framebuffer_sRGB && ctx->Const.sRGBCapable) { - *params = _mesa_get_format_color_encoding(att->Renderbuffer->Format); - } - else { - /* According to ARB_framebuffer_sRGB, we should return LINEAR - * if the sRGB conversion is unsupported. */ - *params = GL_LINEAR; - } - } - return; - case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: - if (!ctx->Extensions.ARB_framebuffer_object) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetFramebufferAttachmentParameterivEXT(pname)"); - return; - } - else { - gl_format format = att->Renderbuffer->Format; - if (format == MESA_FORMAT_CI8 || format == MESA_FORMAT_S8) { - /* special cases */ - *params = GL_INDEX; - } - else { - *params = _mesa_get_format_datatype(format); - } - } - return; - case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE: - case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: - case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: - case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: - case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: - case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: - if (!ctx->Extensions.ARB_framebuffer_object) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetFramebufferAttachmentParameterivEXT(pname)"); - } - else if (att->Texture) { - const struct gl_texture_image *texImage = - _mesa_select_tex_image(ctx, att->Texture, att->Texture->Target, - att->TextureLevel); - if (texImage) { - *params = get_component_bits(pname, texImage->_BaseFormat, - texImage->TexFormat); - } - else { - *params = 0; - } - } - else if (att->Renderbuffer) { - *params = get_component_bits(pname, att->Renderbuffer->_BaseFormat, - att->Renderbuffer->Format); - } - else { - *params = 0; - } - return; - default: - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetFramebufferAttachmentParameterivEXT(pname)"); - return; - } -} - - -void GLAPIENTRY -_mesa_GenerateMipmapEXT(GLenum target) -{ - struct gl_texture_object *texObj; - GET_CURRENT_CONTEXT(ctx); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - FLUSH_VERTICES(ctx, _NEW_BUFFERS); - - switch (target) { - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_3D: - case GL_TEXTURE_CUBE_MAP: - /* OK, legal value */ - break; - default: - /* XXX need to implement GL_TEXTURE_1D_ARRAY and GL_TEXTURE_2D_ARRAY */ - _mesa_error(ctx, GL_INVALID_ENUM, "glGenerateMipmapEXT(target)"); - return; - } - - texObj = _mesa_get_current_tex_object(ctx, target); - - if (texObj->BaseLevel >= texObj->MaxLevel) { - /* nothing to do */ - return; - } - - if (texObj->Target == GL_TEXTURE_CUBE_MAP && - !_mesa_cube_complete(texObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGenerateMipmap(incomplete cube map)"); - return; - } - - _mesa_lock_texture(ctx, texObj); - if (target == GL_TEXTURE_CUBE_MAP) { - GLuint face; - for (face = 0; face < 6; face++) - ctx->Driver.GenerateMipmap(ctx, - GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB + face, - texObj); - } - else { - ctx->Driver.GenerateMipmap(ctx, target, texObj); - } - _mesa_unlock_texture(ctx, texObj); -} - - -#if FEATURE_EXT_framebuffer_blit - -static const struct gl_renderbuffer_attachment * -find_attachment(const struct gl_framebuffer *fb, - const struct gl_renderbuffer *rb) -{ - GLuint i; - for (i = 0; i < Elements(fb->Attachment); i++) { - if (fb->Attachment[i].Renderbuffer == rb) - return &fb->Attachment[i]; - } - return NULL; -} - - - -/** - * Blit rectangular region, optionally from one framebuffer to another. - * - * Note, if the src buffer is multisampled and the dest is not, this is - * when the samples must be resolved to a single color. - */ -void GLAPIENTRY -_mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, - GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, - GLbitfield mask, GLenum filter) -{ - const GLbitfield legalMaskBits = (GL_COLOR_BUFFER_BIT | - GL_DEPTH_BUFFER_BIT | - GL_STENCIL_BUFFER_BIT); - const struct gl_framebuffer *readFb, *drawFb; - const struct gl_renderbuffer *colorReadRb, *colorDrawRb; - GET_CURRENT_CONTEXT(ctx); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - FLUSH_VERTICES(ctx, _NEW_BUFFERS); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, - "glBlitFramebuffer(%d, %d, %d, %d, %d, %d, %d, %d, 0x%x, %s)\n", - srcX0, srcY0, srcX1, srcY1, - dstX0, dstY0, dstX1, dstY1, - mask, _mesa_lookup_enum_by_nr(filter)); - - if (ctx->NewState) { - _mesa_update_state(ctx); - } - - readFb = ctx->ReadBuffer; - drawFb = ctx->DrawBuffer; - - if (!readFb || !drawFb) { - /* This will normally never happen but someday we may want to - * support MakeCurrent() with no drawables. - */ - return; - } - - /* check for complete framebuffers */ - if (drawFb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT || - readFb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, - "glBlitFramebufferEXT(incomplete draw/read buffers)"); - return; - } - - if (filter != GL_NEAREST && filter != GL_LINEAR) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlitFramebufferEXT(filter)"); - return; - } - - if (mask & ~legalMaskBits) { - _mesa_error( ctx, GL_INVALID_VALUE, "glBlitFramebufferEXT(mask)"); - return; - } - - /* depth/stencil must be blitted with nearest filtering */ - if ((mask & (GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT)) - && filter != GL_NEAREST) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBlitFramebufferEXT(depth/stencil requires GL_NEAREST filter)"); - return; - } - - /* get color read/draw renderbuffers */ - if (mask & GL_COLOR_BUFFER_BIT) { - colorReadRb = readFb->_ColorReadBuffer; - colorDrawRb = drawFb->_ColorDrawBuffers[0]; - } - else { - colorReadRb = colorDrawRb = NULL; - } - - if (mask & GL_STENCIL_BUFFER_BIT) { - struct gl_renderbuffer *readRb = readFb->_StencilBuffer; - struct gl_renderbuffer *drawRb = drawFb->_StencilBuffer; - if (!readRb || - !drawRb || - _mesa_get_format_bits(readRb->Format, GL_STENCIL_BITS) != - _mesa_get_format_bits(drawRb->Format, GL_STENCIL_BITS)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBlitFramebufferEXT(stencil buffer size mismatch)"); - return; - } - } - - if (mask & GL_DEPTH_BUFFER_BIT) { - struct gl_renderbuffer *readRb = readFb->_DepthBuffer; - struct gl_renderbuffer *drawRb = drawFb->_DepthBuffer; - if (!readRb || - !drawRb || - _mesa_get_format_bits(readRb->Format, GL_DEPTH_BITS) != - _mesa_get_format_bits(drawRb->Format, GL_DEPTH_BITS)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBlitFramebufferEXT(depth buffer size mismatch)"); - return; - } - } - - if (readFb->Visual.samples > 0 && - drawFb->Visual.samples > 0 && - readFb->Visual.samples != drawFb->Visual.samples) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBlitFramebufferEXT(mismatched samples"); - return; - } - - /* extra checks for multisample copies... */ - if (readFb->Visual.samples > 0 || drawFb->Visual.samples > 0) { - /* src and dest region sizes must be the same */ - if (srcX1 - srcX0 != dstX1 - dstX0 || - srcY1 - srcY0 != dstY1 - dstY0) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBlitFramebufferEXT(bad src/dst multisample region sizes)"); - return; - } - - /* color formats must match */ - if (colorReadRb && - colorDrawRb && - colorReadRb->Format != colorDrawRb->Format) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBlitFramebufferEXT(bad src/dst multisample pixel formats)"); - return; - } - } - - if (!ctx->Extensions.EXT_framebuffer_blit) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glBlitFramebufferEXT"); - return; - } - - /* Debug code */ - if (DEBUG_BLIT) { - printf("glBlitFramebuffer(%d, %d, %d, %d, %d, %d, %d, %d," - " 0x%x, 0x%x)\n", - srcX0, srcY0, srcX1, srcY1, - dstX0, dstY0, dstX1, dstY1, - mask, filter); - if (colorReadRb) { - const struct gl_renderbuffer_attachment *att; - - att = find_attachment(readFb, colorReadRb); - printf(" Src FBO %u RB %u (%dx%d) ", - readFb->Name, colorReadRb->Name, - colorReadRb->Width, colorReadRb->Height); - if (att && att->Texture) { - printf("Tex %u tgt 0x%x level %u face %u", - att->Texture->Name, - att->Texture->Target, - att->TextureLevel, - att->CubeMapFace); - } - printf("\n"); - - att = find_attachment(drawFb, colorDrawRb); - printf(" Dst FBO %u RB %u (%dx%d) ", - drawFb->Name, colorDrawRb->Name, - colorDrawRb->Width, colorDrawRb->Height); - if (att && att->Texture) { - printf("Tex %u tgt 0x%x level %u face %u", - att->Texture->Name, - att->Texture->Target, - att->TextureLevel, - att->CubeMapFace); - } - printf("\n"); - } - } - - ASSERT(ctx->Driver.BlitFramebuffer); - ctx->Driver.BlitFramebuffer(ctx, - srcX0, srcY0, srcX1, srcY1, - dstX0, dstY0, dstX1, dstY1, - mask, filter); -} -#endif /* FEATURE_EXT_framebuffer_blit */ - -#if FEATURE_ARB_geometry_shader4 -void GLAPIENTRY -_mesa_FramebufferTextureARB(GLenum target, GLenum attachment, - GLuint texture, GLint level) -{ - GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_OPERATION, - "glFramebufferTextureARB " - "not implemented!"); -} - -void GLAPIENTRY -_mesa_FramebufferTextureFaceARB(GLenum target, GLenum attachment, - GLuint texture, GLint level, GLenum face) -{ - GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_OPERATION, - "glFramebufferTextureFaceARB " - "not implemented!"); -} -#endif /* FEATURE_ARB_geometry_shader4 */ +/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2009 VMware, Inc. All Rights Reserved.
+ *
+ * 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
+ * BRIAN PAUL 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.
+ */
+
+
+/*
+ * GL_EXT/ARB_framebuffer_object extensions
+ *
+ * Authors:
+ * Brian Paul
+ */
+
+
+#include "buffers.h"
+#include "context.h"
+#include "enums.h"
+#include "fbobject.h"
+#include "formats.h"
+#include "framebuffer.h"
+#include "hash.h"
+#include "macros.h"
+#include "mfeatures.h"
+#include "mtypes.h"
+#include "renderbuffer.h"
+#include "state.h"
+#include "teximage.h"
+#include "texobj.h"
+
+
+/** Set this to 1 to help debug FBO incompleteness problems */
+#define DEBUG_FBO 0
+
+/** Set this to 1 to debug/log glBlitFramebuffer() calls */
+#define DEBUG_BLIT 0
+
+
+/**
+ * Notes:
+ *
+ * None of the GL_EXT_framebuffer_object functions are compiled into
+ * display lists.
+ */
+
+
+
+/*
+ * When glGenRender/FramebuffersEXT() is called we insert pointers to
+ * these placeholder objects into the hash table.
+ * Later, when the object ID is first bound, we replace the placeholder
+ * with the real frame/renderbuffer.
+ */
+static struct gl_framebuffer DummyFramebuffer;
+static struct gl_renderbuffer DummyRenderbuffer;
+
+/* We bind this framebuffer when applications pass a NULL
+ * drawable/surface in make current. */
+static struct gl_framebuffer IncompleteFramebuffer;
+
+
+#define IS_CUBE_FACE(TARGET) \
+ ((TARGET) >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && \
+ (TARGET) <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z)
+
+
+static void
+delete_dummy_renderbuffer(struct gl_renderbuffer *rb)
+{
+ /* no op */
+}
+
+static void
+delete_dummy_framebuffer(struct gl_framebuffer *fb)
+{
+ /* no op */
+}
+
+
+void
+_mesa_init_fbobjects(struct gl_context *ctx)
+{
+ _glthread_INIT_MUTEX(DummyFramebuffer.Mutex);
+ _glthread_INIT_MUTEX(DummyRenderbuffer.Mutex);
+ _glthread_INIT_MUTEX(IncompleteFramebuffer.Mutex);
+ DummyFramebuffer.Delete = delete_dummy_framebuffer;
+ DummyRenderbuffer.Delete = delete_dummy_renderbuffer;
+ IncompleteFramebuffer.Delete = delete_dummy_framebuffer;
+}
+
+struct gl_framebuffer *
+_mesa_get_incomplete_framebuffer(void)
+{
+ return &IncompleteFramebuffer;
+}
+
+/**
+ * Helper routine for getting a gl_renderbuffer.
+ */
+struct gl_renderbuffer *
+_mesa_lookup_renderbuffer(struct gl_context *ctx, GLuint id)
+{
+ struct gl_renderbuffer *rb;
+
+ if (id == 0)
+ return NULL;
+
+ rb = (struct gl_renderbuffer *)
+ _mesa_HashLookup(ctx->Shared->RenderBuffers, id);
+ return rb;
+}
+
+
+/**
+ * Helper routine for getting a gl_framebuffer.
+ */
+struct gl_framebuffer *
+_mesa_lookup_framebuffer(struct gl_context *ctx, GLuint id)
+{
+ struct gl_framebuffer *fb;
+
+ if (id == 0)
+ return NULL;
+
+ fb = (struct gl_framebuffer *)
+ _mesa_HashLookup(ctx->Shared->FrameBuffers, id);
+ return fb;
+}
+
+
+/**
+ * Mark the given framebuffer as invalid. This will force the
+ * test for framebuffer completeness to be done before the framebuffer
+ * is used.
+ */
+static void
+invalidate_framebuffer(struct gl_framebuffer *fb)
+{
+ fb->_Status = 0; /* "indeterminate" */
+}
+
+
+/**
+ * Return the gl_framebuffer object which corresponds to the given
+ * framebuffer target, such as GL_DRAW_FRAMEBUFFER.
+ * Check support for GL_EXT_framebuffer_blit to determine if certain
+ * targets are legal.
+ * \return gl_framebuffer pointer or NULL if target is illegal
+ */
+static struct gl_framebuffer *
+get_framebuffer_target(struct gl_context *ctx, GLenum target)
+{
+ switch (target) {
+ case GL_DRAW_FRAMEBUFFER:
+ return ctx->Extensions.EXT_framebuffer_blit ? ctx->DrawBuffer : NULL;
+ case GL_READ_FRAMEBUFFER:
+ return ctx->Extensions.EXT_framebuffer_blit ? ctx->ReadBuffer : NULL;
+ case GL_FRAMEBUFFER_EXT:
+ return ctx->DrawBuffer;
+ default:
+ return NULL;
+ }
+}
+
+
+/**
+ * Given a GL_*_ATTACHMENTn token, return a pointer to the corresponding
+ * gl_renderbuffer_attachment object.
+ * This function is only used for user-created FB objects, not the
+ * default / window-system FB object.
+ * If \p attachment is GL_DEPTH_STENCIL_ATTACHMENT, return a pointer to
+ * the depth buffer attachment point.
+ */
+struct gl_renderbuffer_attachment *
+_mesa_get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
+ GLenum attachment)
+{
+ GLuint i;
+
+ assert(fb->Name > 0);
+
+ switch (attachment) {
+ case GL_COLOR_ATTACHMENT0_EXT:
+ case GL_COLOR_ATTACHMENT1_EXT:
+ case GL_COLOR_ATTACHMENT2_EXT:
+ case GL_COLOR_ATTACHMENT3_EXT:
+ case GL_COLOR_ATTACHMENT4_EXT:
+ case GL_COLOR_ATTACHMENT5_EXT:
+ case GL_COLOR_ATTACHMENT6_EXT:
+ case GL_COLOR_ATTACHMENT7_EXT:
+ case GL_COLOR_ATTACHMENT8_EXT:
+ case GL_COLOR_ATTACHMENT9_EXT:
+ case GL_COLOR_ATTACHMENT10_EXT:
+ case GL_COLOR_ATTACHMENT11_EXT:
+ case GL_COLOR_ATTACHMENT12_EXT:
+ case GL_COLOR_ATTACHMENT13_EXT:
+ case GL_COLOR_ATTACHMENT14_EXT:
+ case GL_COLOR_ATTACHMENT15_EXT:
+ i = attachment - GL_COLOR_ATTACHMENT0_EXT;
+ if (i >= ctx->Const.MaxColorAttachments) {
+ return NULL;
+ }
+ return &fb->Attachment[BUFFER_COLOR0 + i];
+ case GL_DEPTH_STENCIL_ATTACHMENT:
+ /* fall-through */
+ case GL_DEPTH_BUFFER:
+ /* fall-through / new in GL 3.0 */
+ case GL_DEPTH_ATTACHMENT_EXT:
+ return &fb->Attachment[BUFFER_DEPTH];
+ case GL_STENCIL_BUFFER:
+ /* fall-through / new in GL 3.0 */
+ case GL_STENCIL_ATTACHMENT_EXT:
+ return &fb->Attachment[BUFFER_STENCIL];
+ default:
+ return NULL;
+ }
+}
+
+
+/**
+ * As above, but only used for getting attachments of the default /
+ * window-system framebuffer (not user-created framebuffer objects).
+ */
+static struct gl_renderbuffer_attachment *
+_mesa_get_fb0_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
+ GLenum attachment)
+{
+ assert(fb->Name == 0);
+
+ switch (attachment) {
+ case GL_FRONT_LEFT:
+ return &fb->Attachment[BUFFER_FRONT_LEFT];
+ case GL_FRONT_RIGHT:
+ return &fb->Attachment[BUFFER_FRONT_RIGHT];
+ case GL_BACK_LEFT:
+ return &fb->Attachment[BUFFER_BACK_LEFT];
+ case GL_BACK_RIGHT:
+ return &fb->Attachment[BUFFER_BACK_RIGHT];
+ case GL_AUX0:
+ if (fb->Visual.numAuxBuffers == 1) {
+ return &fb->Attachment[BUFFER_AUX0];
+ }
+ return NULL;
+ case GL_DEPTH_BUFFER:
+ /* fall-through / new in GL 3.0 */
+ case GL_DEPTH_ATTACHMENT_EXT:
+ return &fb->Attachment[BUFFER_DEPTH];
+ case GL_STENCIL_BUFFER:
+ /* fall-through / new in GL 3.0 */
+ case GL_STENCIL_ATTACHMENT_EXT:
+ return &fb->Attachment[BUFFER_STENCIL];
+ default:
+ return NULL;
+ }
+}
+
+
+
+/**
+ * Remove any texture or renderbuffer attached to the given attachment
+ * point. Update reference counts, etc.
+ */
+void
+_mesa_remove_attachment(struct gl_context *ctx,
+ struct gl_renderbuffer_attachment *att)
+{
+ if (att->Type == GL_TEXTURE) {
+ ASSERT(att->Texture);
+ if (ctx->Driver.FinishRenderTexture) {
+ /* tell driver that we're done rendering to this texture. */
+ ctx->Driver.FinishRenderTexture(ctx, att);
+ }
+ _mesa_reference_texobj(&att->Texture, NULL); /* unbind */
+ ASSERT(!att->Texture);
+ }
+ if (att->Type == GL_TEXTURE || att->Type == GL_RENDERBUFFER_EXT) {
+ ASSERT(!att->Texture);
+ _mesa_reference_renderbuffer(&att->Renderbuffer, NULL); /* unbind */
+ ASSERT(!att->Renderbuffer);
+ }
+ att->Type = GL_NONE;
+ att->Complete = GL_TRUE;
+}
+
+
+/**
+ * Bind a texture object to an attachment point.
+ * The previous binding, if any, will be removed first.
+ */
+void
+_mesa_set_texture_attachment(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
+ struct gl_renderbuffer_attachment *att,
+ struct gl_texture_object *texObj,
+ GLenum texTarget, GLuint level, GLuint zoffset)
+{
+ if (att->Texture == texObj) {
+ /* re-attaching same texture */
+ ASSERT(att->Type == GL_TEXTURE);
+ if (ctx->Driver.FinishRenderTexture)
+ ctx->Driver.FinishRenderTexture(ctx, att);
+ }
+ else {
+ /* new attachment */
+ if (ctx->Driver.FinishRenderTexture && att->Texture)
+ ctx->Driver.FinishRenderTexture(ctx, att);
+ _mesa_remove_attachment(ctx, att);
+ att->Type = GL_TEXTURE;
+ assert(!att->Texture);
+ _mesa_reference_texobj(&att->Texture, texObj);
+ }
+
+ /* always update these fields */
+ att->TextureLevel = level;
+ att->CubeMapFace = _mesa_tex_target_to_face(texTarget);
+ att->Zoffset = zoffset;
+ att->Complete = GL_FALSE;
+
+ if (_mesa_get_attachment_teximage(att)) {
+ ctx->Driver.RenderTexture(ctx, fb, att);
+ }
+
+ invalidate_framebuffer(fb);
+}
+
+
+/**
+ * Bind a renderbuffer to an attachment point.
+ * The previous binding, if any, will be removed first.
+ */
+void
+_mesa_set_renderbuffer_attachment(struct gl_context *ctx,
+ struct gl_renderbuffer_attachment *att,
+ struct gl_renderbuffer *rb)
+{
+ /* XXX check if re-doing same attachment, exit early */
+ _mesa_remove_attachment(ctx, att);
+ att->Type = GL_RENDERBUFFER_EXT;
+ att->Texture = NULL; /* just to be safe */
+ att->Complete = GL_FALSE;
+ _mesa_reference_renderbuffer(&att->Renderbuffer, rb);
+}
+
+
+/**
+ * Fallback for ctx->Driver.FramebufferRenderbuffer()
+ * Attach a renderbuffer object to a framebuffer object.
+ */
+void
+_mesa_framebuffer_renderbuffer(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
+ GLenum attachment, struct gl_renderbuffer *rb)
+{
+ struct gl_renderbuffer_attachment *att;
+
+ _glthread_LOCK_MUTEX(fb->Mutex);
+
+ att = _mesa_get_attachment(ctx, fb, attachment);
+ ASSERT(att);
+ if (rb) {
+ _mesa_set_renderbuffer_attachment(ctx, att, rb);
+ if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
+ /* do stencil attachment here (depth already done above) */
+ att = _mesa_get_attachment(ctx, fb, GL_STENCIL_ATTACHMENT_EXT);
+ assert(att);
+ _mesa_set_renderbuffer_attachment(ctx, att, rb);
+ }
+ rb->AttachedAnytime = GL_TRUE;
+ }
+ else {
+ _mesa_remove_attachment(ctx, att);
+ }
+
+ invalidate_framebuffer(fb);
+
+ _glthread_UNLOCK_MUTEX(fb->Mutex);
+}
+
+
+/**
+ * Fallback for ctx->Driver.ValidateFramebuffer()
+ * Check if the renderbuffer's formats are supported by the software
+ * renderer.
+ * Drivers should probably override this.
+ */
+void
+_mesa_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
+{
+ gl_buffer_index buf;
+ for (buf = 0; buf < BUFFER_COUNT; buf++) {
+ const struct gl_renderbuffer *rb = fb->Attachment[buf].Renderbuffer;
+ if (rb) {
+ switch (rb->_BaseFormat) {
+ case GL_ALPHA:
+ case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE:
+ case GL_INTENSITY:
+ case GL_RED:
+ case GL_RG:
+ fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED;
+ return;
+ default:
+ /* render buffer format is supported by software rendering */
+ ;
+ }
+ }
+ }
+}
+
+
+/**
+ * For debug only.
+ */
+static void
+att_incomplete(const char *msg)
+{
+#if DEBUG_FBO
+ _mesa_debug(NULL, "attachment incomplete: %s\n", msg);
+#else
+ (void) msg;
+#endif
+}
+
+
+/**
+ * For debug only.
+ */
+static void
+fbo_incomplete(const char *msg, int index)
+{
+#if DEBUG_FBO
+ _mesa_debug(NULL, "FBO Incomplete: %s [%d]\n", msg, index);
+#else
+ (void) msg;
+ (void) index;
+#endif
+}
+
+
+/**
+ * Is the given base format a legal format for a color renderbuffer?
+ */
+GLboolean
+_mesa_is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat)
+{
+ switch (baseFormat) {
+ case GL_RGB:
+ case GL_RGBA:
+ return GL_TRUE;
+ case GL_LUMINANCE:
+ case GL_LUMINANCE_ALPHA:
+ case GL_INTENSITY:
+ case GL_ALPHA:
+ return ctx->Extensions.ARB_framebuffer_object;
+ case GL_RED:
+ case GL_RG:
+ return ctx->Extensions.ARB_texture_rg;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+/**
+ * Is the given base format a legal format for a depth/stencil renderbuffer?
+ */
+static GLboolean
+is_legal_depth_format(const struct gl_context *ctx, GLenum baseFormat)
+{
+ switch (baseFormat) {
+ case GL_DEPTH_COMPONENT:
+ case GL_DEPTH_STENCIL_EXT:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+/**
+ * Test if an attachment point is complete and update its Complete field.
+ * \param format if GL_COLOR, this is a color attachment point,
+ * if GL_DEPTH, this is a depth component attachment point,
+ * if GL_STENCIL, this is a stencil component attachment point.
+ */
+static void
+test_attachment_completeness(const struct gl_context *ctx, GLenum format,
+ struct gl_renderbuffer_attachment *att)
+{
+ assert(format == GL_COLOR || format == GL_DEPTH || format == GL_STENCIL);
+
+ /* assume complete */
+ att->Complete = GL_TRUE;
+
+ /* Look for reasons why the attachment might be incomplete */
+ if (att->Type == GL_TEXTURE) {
+ const struct gl_texture_object *texObj = att->Texture;
+ struct gl_texture_image *texImage;
+ GLenum baseFormat;
+
+ if (!texObj) {
+ att_incomplete("no texobj");
+ att->Complete = GL_FALSE;
+ return;
+ }
+
+ texImage = texObj->Image[att->CubeMapFace][att->TextureLevel];
+ if (!texImage) {
+ att_incomplete("no teximage");
+ att->Complete = GL_FALSE;
+ return;
+ }
+ if (texImage->Width < 1 || texImage->Height < 1) {
+ att_incomplete("teximage width/height=0");
+ printf("texobj = %u\n", texObj->Name);
+ printf("level = %d\n", att->TextureLevel);
+ att->Complete = GL_FALSE;
+ return;
+ }
+ if (texObj->Target == GL_TEXTURE_3D && att->Zoffset >= texImage->Depth) {
+ att_incomplete("bad z offset");
+ att->Complete = GL_FALSE;
+ return;
+ }
+
+ baseFormat = _mesa_get_format_base_format(texImage->TexFormat);
+
+ if (format == GL_COLOR) {
+ if (!_mesa_is_legal_color_format(ctx, baseFormat)) {
+ att_incomplete("bad format");
+ att->Complete = GL_FALSE;
+ return;
+ }
+ if (_mesa_is_format_compressed(texImage->TexFormat)) {
+ att_incomplete("compressed internalformat");
+ att->Complete = GL_FALSE;
+ return;
+ }
+ }
+ else if (format == GL_DEPTH) {
+ if (baseFormat == GL_DEPTH_COMPONENT) {
+ /* OK */
+ }
+ else if (ctx->Extensions.EXT_packed_depth_stencil &&
+ ctx->Extensions.ARB_depth_texture &&
+ baseFormat == GL_DEPTH_STENCIL_EXT) {
+ /* OK */
+ }
+ else {
+ att->Complete = GL_FALSE;
+ att_incomplete("bad depth format");
+ return;
+ }
+ }
+ else {
+ ASSERT(format == GL_STENCIL);
+ if (ctx->Extensions.EXT_packed_depth_stencil &&
+ ctx->Extensions.ARB_depth_texture &&
+ baseFormat == GL_DEPTH_STENCIL_EXT) {
+ /* OK */
+ }
+ else {
+ /* no such thing as stencil-only textures */
+ att_incomplete("illegal stencil texture");
+ att->Complete = GL_FALSE;
+ return;
+ }
+ }
+ }
+ else if (att->Type == GL_RENDERBUFFER_EXT) {
+ const GLenum baseFormat =
+ _mesa_get_format_base_format(att->Renderbuffer->Format);
+
+ ASSERT(att->Renderbuffer);
+ if (!att->Renderbuffer->InternalFormat ||
+ att->Renderbuffer->Width < 1 ||
+ att->Renderbuffer->Height < 1) {
+ att_incomplete("0x0 renderbuffer");
+ att->Complete = GL_FALSE;
+ return;
+ }
+ if (format == GL_COLOR) {
+ if (!_mesa_is_legal_color_format(ctx, baseFormat)) {
+ att_incomplete("bad renderbuffer color format");
+ att->Complete = GL_FALSE;
+ return;
+ }
+ }
+ else if (format == GL_DEPTH) {
+ if (baseFormat == GL_DEPTH_COMPONENT) {
+ /* OK */
+ }
+ else if (ctx->Extensions.EXT_packed_depth_stencil &&
+ baseFormat == GL_DEPTH_STENCIL_EXT) {
+ /* OK */
+ }
+ else {
+ att_incomplete("bad renderbuffer depth format");
+ att->Complete = GL_FALSE;
+ return;
+ }
+ }
+ else {
+ assert(format == GL_STENCIL);
+ if (baseFormat == GL_STENCIL_INDEX) {
+ /* OK */
+ }
+ else if (ctx->Extensions.EXT_packed_depth_stencil &&
+ baseFormat == GL_DEPTH_STENCIL_EXT) {
+ /* OK */
+ }
+ else {
+ att->Complete = GL_FALSE;
+ att_incomplete("bad renderbuffer stencil format");
+ return;
+ }
+ }
+ }
+ else {
+ ASSERT(att->Type == GL_NONE);
+ /* complete */
+ return;
+ }
+}
+
+
+/**
+ * Test if the given framebuffer object is complete and update its
+ * Status field with the results.
+ * Calls the ctx->Driver.ValidateFramebuffer() function to allow the
+ * driver to make hardware-specific validation/completeness checks.
+ * Also update the framebuffer's Width and Height fields if the
+ * framebuffer is complete.
+ */
+void
+_mesa_test_framebuffer_completeness(struct gl_context *ctx,
+ struct gl_framebuffer *fb)
+{
+ GLuint numImages;
+ GLenum intFormat = GL_NONE; /* color buffers' internal format */
+ GLuint minWidth = ~0, minHeight = ~0, maxWidth = 0, maxHeight = 0;
+ GLint numSamples = -1;
+ GLint i;
+ GLuint j;
+
+ assert(fb->Name != 0);
+
+ numImages = 0;
+ fb->Width = 0;
+ fb->Height = 0;
+
+ /* Start at -2 to more easily loop over all attachment points.
+ * -2: depth buffer
+ * -1: stencil buffer
+ * >=0: color buffer
+ */
+ for (i = -2; i < (GLint) ctx->Const.MaxColorAttachments; i++) {
+ struct gl_renderbuffer_attachment *att;
+ GLenum f;
+ gl_format attFormat;
+
+ /*
+ * XXX for ARB_fbo, only check color buffers that are named by
+ * GL_READ_BUFFER and GL_DRAW_BUFFERi.
+ */
+
+ /* check for attachment completeness
+ */
+ if (i == -2) {
+ att = &fb->Attachment[BUFFER_DEPTH];
+ test_attachment_completeness(ctx, GL_DEPTH, att);
+ if (!att->Complete) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT;
+ fbo_incomplete("depth attachment incomplete", -1);
+ return;
+ }
+ }
+ else if (i == -1) {
+ att = &fb->Attachment[BUFFER_STENCIL];
+ test_attachment_completeness(ctx, GL_STENCIL, att);
+ if (!att->Complete) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT;
+ fbo_incomplete("stencil attachment incomplete", -1);
+ return;
+ }
+ }
+ else {
+ att = &fb->Attachment[BUFFER_COLOR0 + i];
+ test_attachment_completeness(ctx, GL_COLOR, att);
+ if (!att->Complete) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT;
+ fbo_incomplete("color attachment incomplete", i);
+ return;
+ }
+ }
+
+ /* get width, height, format of the renderbuffer/texture
+ */
+ if (att->Type == GL_TEXTURE) {
+ const struct gl_texture_image *texImg =
+ _mesa_get_attachment_teximage(att);
+ minWidth = MIN2(minWidth, texImg->Width);
+ maxWidth = MAX2(maxWidth, texImg->Width);
+ minHeight = MIN2(minHeight, texImg->Height);
+ maxHeight = MAX2(maxHeight, texImg->Height);
+ f = texImg->_BaseFormat;
+ attFormat = texImg->TexFormat;
+ numImages++;
+ if (!_mesa_is_legal_color_format(ctx, f) &&
+ !is_legal_depth_format(ctx, f)) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT;
+ fbo_incomplete("texture attachment incomplete", -1);
+ return;
+ }
+ }
+ else if (att->Type == GL_RENDERBUFFER_EXT) {
+ minWidth = MIN2(minWidth, att->Renderbuffer->Width);
+ maxWidth = MAX2(minWidth, att->Renderbuffer->Width);
+ minHeight = MIN2(minHeight, att->Renderbuffer->Height);
+ maxHeight = MAX2(minHeight, att->Renderbuffer->Height);
+ f = att->Renderbuffer->InternalFormat;
+ attFormat = att->Renderbuffer->Format;
+ numImages++;
+ }
+ else {
+ assert(att->Type == GL_NONE);
+ continue;
+ }
+
+ if (att->Renderbuffer && numSamples < 0) {
+ /* first buffer */
+ numSamples = att->Renderbuffer->NumSamples;
+ }
+
+ /* check if integer color */
+ fb->_IntegerColor = _mesa_is_format_integer_color(attFormat);
+
+ /* Error-check width, height, format, samples
+ */
+ if (numImages == 1) {
+ /* save format, num samples */
+ if (i >= 0) {
+ intFormat = f;
+ }
+ }
+ else {
+ if (!ctx->Extensions.ARB_framebuffer_object) {
+ /* check that width, height, format are same */
+ if (minWidth != maxWidth || minHeight != maxHeight) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT;
+ fbo_incomplete("width or height mismatch", -1);
+ return;
+ }
+ /* check that all color buffer have same format */
+ if (intFormat != GL_NONE && f != intFormat) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT;
+ fbo_incomplete("format mismatch", -1);
+ return;
+ }
+ }
+ if (att->Renderbuffer &&
+ att->Renderbuffer->NumSamples != numSamples) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE;
+ fbo_incomplete("inconsistant number of samples", i);
+ return;
+ }
+
+ }
+ }
+
+#if FEATURE_GL
+ if (ctx->API == API_OPENGL) {
+ /* Check that all DrawBuffers are present */
+ for (j = 0; j < ctx->Const.MaxDrawBuffers; j++) {
+ if (fb->ColorDrawBuffer[j] != GL_NONE) {
+ const struct gl_renderbuffer_attachment *att
+ = _mesa_get_attachment(ctx, fb, fb->ColorDrawBuffer[j]);
+ assert(att);
+ if (att->Type == GL_NONE) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT;
+ fbo_incomplete("missing drawbuffer", j);
+ return;
+ }
+ }
+ }
+
+ /* Check that the ReadBuffer is present */
+ if (fb->ColorReadBuffer != GL_NONE) {
+ const struct gl_renderbuffer_attachment *att
+ = _mesa_get_attachment(ctx, fb, fb->ColorReadBuffer);
+ assert(att);
+ if (att->Type == GL_NONE) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT;
+ fbo_incomplete("missing readbuffer", -1);
+ return;
+ }
+ }
+ }
+#else
+ (void) j;
+#endif
+
+ if (numImages == 0) {
+ fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT;
+ fbo_incomplete("no attachments", -1);
+ return;
+ }
+
+ /* Provisionally set status = COMPLETE ... */
+ fb->_Status = GL_FRAMEBUFFER_COMPLETE_EXT;
+
+ /* ... but the driver may say the FB is incomplete.
+ * Drivers will most likely set the status to GL_FRAMEBUFFER_UNSUPPORTED
+ * if anything.
+ */
+ if (ctx->Driver.ValidateFramebuffer) {
+ ctx->Driver.ValidateFramebuffer(ctx, fb);
+ if (fb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ fbo_incomplete("driver marked FBO as incomplete", -1);
+ }
+ }
+
+ if (fb->_Status == GL_FRAMEBUFFER_COMPLETE_EXT) {
+ /*
+ * Note that if ARB_framebuffer_object is supported and the attached
+ * renderbuffers/textures are different sizes, the framebuffer
+ * width/height will be set to the smallest width/height.
+ */
+ fb->Width = minWidth;
+ fb->Height = minHeight;
+
+ /* finally, update the visual info for the framebuffer */
+ _mesa_update_framebuffer_visual(ctx, fb);
+ }
+}
+
+
+GLboolean GLAPIENTRY
+_mesa_IsRenderbufferEXT(GLuint renderbuffer)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ if (renderbuffer) {
+ struct gl_renderbuffer *rb = _mesa_lookup_renderbuffer(ctx, renderbuffer);
+ if (rb != NULL && rb != &DummyRenderbuffer)
+ return GL_TRUE;
+ }
+ return GL_FALSE;
+}
+
+
+void GLAPIENTRY
+_mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer)
+{
+ struct gl_renderbuffer *newRb;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (target != GL_RENDERBUFFER_EXT) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindRenderbufferEXT(target)");
+ return;
+ }
+
+ /* No need to flush here since the render buffer binding has no
+ * effect on rendering state.
+ */
+
+ if (renderbuffer) {
+ newRb = _mesa_lookup_renderbuffer(ctx, renderbuffer);
+ if (newRb == &DummyRenderbuffer) {
+ /* ID was reserved, but no real renderbuffer object made yet */
+ newRb = NULL;
+ }
+ else if (!newRb && ctx->Extensions.ARB_framebuffer_object) {
+ /* All RB IDs must be Gen'd */
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glBindRenderbuffer(buffer)");
+ return;
+ }
+
+ if (!newRb) {
+ /* create new renderbuffer object */
+ newRb = ctx->Driver.NewRenderbuffer(ctx, renderbuffer);
+ if (!newRb) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindRenderbufferEXT");
+ return;
+ }
+ ASSERT(newRb->AllocStorage);
+ _mesa_HashInsert(ctx->Shared->RenderBuffers, renderbuffer, newRb);
+ newRb->RefCount = 1; /* referenced by hash table */
+ }
+ }
+ else {
+ newRb = NULL;
+ }
+
+ ASSERT(newRb != &DummyRenderbuffer);
+
+ _mesa_reference_renderbuffer(&ctx->CurrentRenderbuffer, newRb);
+}
+
+
+/**
+ * If the given renderbuffer is anywhere attached to the framebuffer, detach
+ * the renderbuffer.
+ * This is used when a renderbuffer object is deleted.
+ * The spec calls for unbinding.
+ */
+static void
+detach_renderbuffer(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
+ struct gl_renderbuffer *rb)
+{
+ GLuint i;
+ for (i = 0; i < BUFFER_COUNT; i++) {
+ if (fb->Attachment[i].Renderbuffer == rb) {
+ _mesa_remove_attachment(ctx, &fb->Attachment[i]);
+ }
+ }
+ invalidate_framebuffer(fb);
+}
+
+
+void GLAPIENTRY
+_mesa_DeleteRenderbuffersEXT(GLsizei n, const GLuint *renderbuffers)
+{
+ GLint i;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+
+ for (i = 0; i < n; i++) {
+ if (renderbuffers[i] > 0) {
+ struct gl_renderbuffer *rb;
+ rb = _mesa_lookup_renderbuffer(ctx, renderbuffers[i]);
+ if (rb) {
+ /* check if deleting currently bound renderbuffer object */
+ if (rb == ctx->CurrentRenderbuffer) {
+ /* bind default */
+ ASSERT(rb->RefCount >= 2);
+ _mesa_BindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);
+ }
+
+ if (ctx->DrawBuffer->Name) {
+ detach_renderbuffer(ctx, ctx->DrawBuffer, rb);
+ }
+ if (ctx->ReadBuffer->Name && ctx->ReadBuffer != ctx->DrawBuffer) {
+ detach_renderbuffer(ctx, ctx->ReadBuffer, rb);
+ }
+
+ /* Remove from hash table immediately, to free the ID.
+ * But the object will not be freed until it's no longer
+ * referenced anywhere else.
+ */
+ _mesa_HashRemove(ctx->Shared->RenderBuffers, renderbuffers[i]);
+
+ if (rb != &DummyRenderbuffer) {
+ /* no longer referenced by hash table */
+ _mesa_reference_renderbuffer(&rb, NULL);
+ }
+ }
+ }
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_GenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLuint first;
+ GLint i;
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGenRenderbuffersEXT(n)");
+ return;
+ }
+
+ if (!renderbuffers)
+ return;
+
+ first = _mesa_HashFindFreeKeyBlock(ctx->Shared->RenderBuffers, n);
+
+ for (i = 0; i < n; i++) {
+ GLuint name = first + i;
+ renderbuffers[i] = name;
+ /* insert dummy placeholder into hash table */
+ _glthread_LOCK_MUTEX(ctx->Shared->Mutex);
+ _mesa_HashInsert(ctx->Shared->RenderBuffers, name, &DummyRenderbuffer);
+ _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
+ }
+}
+
+
+/**
+ * Given an internal format token for a render buffer, return the
+ * corresponding base format (one of GL_RGB, GL_RGBA, GL_STENCIL_INDEX,
+ * GL_DEPTH_COMPONENT, GL_DEPTH_STENCIL_EXT, GL_ALPHA, GL_LUMINANCE,
+ * GL_LUMINANCE_ALPHA, GL_INTENSITY, etc).
+ *
+ * This is similar to _mesa_base_tex_format() but the set of valid
+ * internal formats is different.
+ *
+ * Note that even if a format is determined to be legal here, validation
+ * of the FBO may fail if the format is not supported by the driver/GPU.
+ *
+ * \param internalFormat as passed to glRenderbufferStorage()
+ * \return the base internal format, or 0 if internalFormat is illegal
+ */
+GLenum
+_mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
+{
+ /*
+ * Notes: some formats such as alpha, luminance, etc. were added
+ * with GL_ARB_framebuffer_object.
+ */
+ switch (internalFormat) {
+ case GL_ALPHA:
+ case GL_ALPHA4:
+ case GL_ALPHA8:
+ case GL_ALPHA12:
+ case GL_ALPHA16:
+ return ctx->Extensions.ARB_framebuffer_object ? GL_ALPHA : 0;
+ case GL_LUMINANCE:
+ case GL_LUMINANCE4:
+ case GL_LUMINANCE8:
+ case GL_LUMINANCE12:
+ case GL_LUMINANCE16:
+ return ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE : 0;
+ case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE4_ALPHA4:
+ case GL_LUMINANCE6_ALPHA2:
+ case GL_LUMINANCE8_ALPHA8:
+ case GL_LUMINANCE12_ALPHA4:
+ case GL_LUMINANCE12_ALPHA12:
+ case GL_LUMINANCE16_ALPHA16:
+ return ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE_ALPHA : 0;
+ case GL_INTENSITY:
+ case GL_INTENSITY4:
+ case GL_INTENSITY8:
+ case GL_INTENSITY12:
+ case GL_INTENSITY16:
+ return ctx->Extensions.ARB_framebuffer_object ? GL_INTENSITY : 0;
+ case GL_RGB:
+ case GL_R3_G3_B2:
+ case GL_RGB4:
+ case GL_RGB5:
+ case GL_RGB8:
+ case GL_RGB10:
+ case GL_RGB12:
+ case GL_RGB16:
+ case GL_SRGB8_EXT:
+ return GL_RGB;
+ case GL_RGBA:
+ case GL_RGBA2:
+ case GL_RGBA4:
+ case GL_RGB5_A1:
+ case GL_RGBA8:
+ case GL_RGB10_A2:
+ case GL_RGBA12:
+ case GL_RGBA16:
+ case GL_SRGB8_ALPHA8_EXT:
+ return GL_RGBA;
+ case GL_STENCIL_INDEX:
+ case GL_STENCIL_INDEX1_EXT:
+ case GL_STENCIL_INDEX4_EXT:
+ case GL_STENCIL_INDEX8_EXT:
+ case GL_STENCIL_INDEX16_EXT:
+ return GL_STENCIL_INDEX;
+ case GL_DEPTH_COMPONENT:
+ case GL_DEPTH_COMPONENT16:
+ case GL_DEPTH_COMPONENT24:
+ case GL_DEPTH_COMPONENT32:
+ return GL_DEPTH_COMPONENT;
+ case GL_DEPTH_STENCIL_EXT:
+ case GL_DEPTH24_STENCIL8_EXT:
+ if (ctx->Extensions.EXT_packed_depth_stencil)
+ return GL_DEPTH_STENCIL_EXT;
+ else
+ return 0;
+ case GL_RED:
+ case GL_R8:
+ case GL_R16:
+ return ctx->Extensions.ARB_texture_rg ? GL_RED : 0;
+ case GL_RG:
+ case GL_RG8:
+ case GL_RG16:
+ return ctx->Extensions.ARB_texture_rg ? GL_RG : 0;
+ /* signed normalized texture formats */
+ case GL_RED_SNORM:
+ case GL_R8_SNORM:
+ case GL_R16_SNORM:
+ return ctx->Extensions.EXT_texture_snorm ? GL_RED : 0;
+ case GL_RG_SNORM:
+ case GL_RG8_SNORM:
+ case GL_RG16_SNORM:
+ return ctx->Extensions.EXT_texture_snorm ? GL_RG : 0;
+ case GL_RGB_SNORM:
+ case GL_RGB8_SNORM:
+ case GL_RGB16_SNORM:
+ return ctx->Extensions.EXT_texture_snorm ? GL_RGB : 0;
+ case GL_RGBA_SNORM:
+ case GL_RGBA8_SNORM:
+ case GL_RGBA16_SNORM:
+ return ctx->Extensions.EXT_texture_snorm ? GL_RGBA : 0;
+ case GL_ALPHA_SNORM:
+ case GL_ALPHA8_SNORM:
+ case GL_ALPHA16_SNORM:
+ return ctx->Extensions.EXT_texture_snorm &&
+ ctx->Extensions.ARB_framebuffer_object ? GL_ALPHA : 0;
+ case GL_LUMINANCE_SNORM:
+ case GL_LUMINANCE8_SNORM:
+ case GL_LUMINANCE16_SNORM:
+ return ctx->Extensions.EXT_texture_snorm &&
+ ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE : 0;
+ case GL_LUMINANCE_ALPHA_SNORM:
+ case GL_LUMINANCE8_ALPHA8_SNORM:
+ case GL_LUMINANCE16_ALPHA16_SNORM:
+ return ctx->Extensions.EXT_texture_snorm &&
+ ctx->Extensions.ARB_framebuffer_object ? GL_LUMINANCE_ALPHA : 0;
+ case GL_INTENSITY_SNORM:
+ case GL_INTENSITY8_SNORM:
+ case GL_INTENSITY16_SNORM:
+ return ctx->Extensions.EXT_texture_snorm &&
+ ctx->Extensions.ARB_framebuffer_object ? GL_INTENSITY : 0;
+ /* XXX add floating point and integer formats eventually */
+ default:
+ return 0;
+ }
+}
+
+
+/**
+ * Invalidate a renderbuffer attachment. Called from _mesa_HashWalk().
+ */
+static void
+invalidate_rb(GLuint key, void *data, void *userData)
+{
+ struct gl_framebuffer *fb = (struct gl_framebuffer *) data;
+ struct gl_renderbuffer *rb = (struct gl_renderbuffer *) userData;
+
+ /* If this is a user-created FBO */
+ if (fb->Name) {
+ GLuint i;
+ for (i = 0; i < BUFFER_COUNT; i++) {
+ struct gl_renderbuffer_attachment *att = fb->Attachment + i;
+ if (att->Type == GL_RENDERBUFFER &&
+ att->Renderbuffer == rb) {
+ /* Mark fb status as indeterminate to force re-validation */
+ fb->_Status = 0;
+ return;
+ }
+ }
+ }
+}
+
+
+/** sentinal value, see below */
+#define NO_SAMPLES 1000
+
+
+/**
+ * Helper function used by _mesa_RenderbufferStorageEXT() and
+ * _mesa_RenderbufferStorageMultisample().
+ * samples will be NO_SAMPLES if called by _mesa_RenderbufferStorageEXT().
+ */
+static void
+renderbuffer_storage(GLenum target, GLenum internalFormat,
+ GLsizei width, GLsizei height, GLsizei samples)
+{
+ const char *func = samples == NO_SAMPLES ?
+ "glRenderbufferStorage" : "RenderbufferStorageMultisample";
+ struct gl_renderbuffer *rb;
+ GLenum baseFormat;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (target != GL_RENDERBUFFER_EXT) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", func);
+ return;
+ }
+
+ baseFormat = _mesa_base_fbo_format(ctx, internalFormat);
+ if (baseFormat == 0) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(internalFormat)", func);
+ return;
+ }
+
+ if (width < 1 || width > (GLsizei) ctx->Const.MaxRenderbufferSize) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(width)", func);
+ return;
+ }
+
+ if (height < 1 || height > (GLsizei) ctx->Const.MaxRenderbufferSize) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(height)", func);
+ return;
+ }
+
+ if (samples == NO_SAMPLES) {
+ /* NumSamples == 0 indicates non-multisampling */
+ samples = 0;
+ }
+ else if (samples > (GLsizei) ctx->Const.MaxSamples) {
+ /* note: driver may choose to use more samples than what's requested */
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(samples)", func);
+ return;
+ }
+
+ rb = ctx->CurrentRenderbuffer;
+ if (!rb) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s", func);
+ return;
+ }
+
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+
+ if (rb->InternalFormat == internalFormat &&
+ rb->Width == (GLuint) width &&
+ rb->Height == (GLuint) height) {
+ /* no change in allocation needed */
+ return;
+ }
+
+ /* These MUST get set by the AllocStorage func */
+ rb->Format = MESA_FORMAT_NONE;
+ rb->NumSamples = samples;
+
+ /* Now allocate the storage */
+ ASSERT(rb->AllocStorage);
+ if (rb->AllocStorage(ctx, rb, internalFormat, width, height)) {
+ /* No error - check/set fields now */
+ assert(rb->Format != MESA_FORMAT_NONE);
+ assert(rb->Width == (GLuint) width);
+ assert(rb->Height == (GLuint) height);
+ rb->InternalFormat = internalFormat;
+ rb->_BaseFormat = baseFormat;
+ assert(rb->_BaseFormat != 0);
+ }
+ else {
+ /* Probably ran out of memory - clear the fields */
+ rb->Width = 0;
+ rb->Height = 0;
+ rb->Format = MESA_FORMAT_NONE;
+ rb->InternalFormat = GL_NONE;
+ rb->_BaseFormat = GL_NONE;
+ rb->NumSamples = 0;
+ }
+
+ /* Invalidate the framebuffers the renderbuffer is attached in. */
+ if (rb->AttachedAnytime) {
+ _mesa_HashWalk(ctx->Shared->FrameBuffers, invalidate_rb, rb);
+ }
+}
+
+
+#if FEATURE_OES_EGL_image
+void GLAPIENTRY
+_mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image)
+{
+ struct gl_renderbuffer *rb;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (!ctx->Extensions.OES_EGL_image) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glEGLImageTargetRenderbufferStorageOES(unsupported)");
+ return;
+ }
+
+ if (target != GL_RENDERBUFFER) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "EGLImageTargetRenderbufferStorageOES");
+ return;
+ }
+
+ rb = ctx->CurrentRenderbuffer;
+ if (!rb) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "EGLImageTargetRenderbufferStorageOES");
+ return;
+ }
+
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+
+ ctx->Driver.EGLImageTargetRenderbufferStorage(ctx, rb, image);
+}
+#endif
+
+
+/**
+ * Helper function for _mesa_GetRenderbufferParameterivEXT() and
+ * _mesa_GetFramebufferAttachmentParameterivEXT()
+ * We have to be careful to respect the base format. For example, if a
+ * renderbuffer/texture was created with internalFormat=GL_RGB but the
+ * driver actually chose a GL_RGBA format, when the user queries ALPHA_SIZE
+ * we need to return zero.
+ */
+static GLint
+get_component_bits(GLenum pname, GLenum baseFormat, gl_format format)
+{
+ switch (pname) {
+ case GL_RENDERBUFFER_RED_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE:
+ if (baseFormat == GL_RGB || baseFormat == GL_RGBA ||
+ baseFormat == GL_RG || baseFormat == GL_RED)
+ return _mesa_get_format_bits(format, pname);
+ else
+ return 0;
+ case GL_RENDERBUFFER_GREEN_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:
+ if (baseFormat == GL_RGB || baseFormat == GL_RGBA || baseFormat == GL_RG)
+ return _mesa_get_format_bits(format, pname);
+ else
+ return 0;
+ case GL_RENDERBUFFER_BLUE_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:
+ if (baseFormat == GL_RGB || baseFormat == GL_RGBA)
+ return _mesa_get_format_bits(format, pname);
+ else
+ return 0;
+ case GL_RENDERBUFFER_ALPHA_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
+ if (baseFormat == GL_RGBA || baseFormat == GL_ALPHA ||
+ baseFormat == GL_LUMINANCE_ALPHA)
+ return _mesa_get_format_bits(format, pname);
+ else
+ return 0;
+ case GL_RENDERBUFFER_DEPTH_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
+ if (baseFormat == GL_DEPTH_COMPONENT || baseFormat == GL_DEPTH_STENCIL)
+ return _mesa_get_format_bits(format, pname);
+ else
+ return 0;
+ case GL_RENDERBUFFER_STENCIL_SIZE_EXT:
+ case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
+ if (baseFormat == GL_STENCIL_INDEX || baseFormat == GL_DEPTH_STENCIL)
+ return _mesa_get_format_bits(format, pname);
+ else
+ return 0;
+ default:
+ return 0;
+ }
+}
+
+
+
+void GLAPIENTRY
+_mesa_RenderbufferStorageEXT(GLenum target, GLenum internalFormat,
+ GLsizei width, GLsizei height)
+{
+ /* GL_ARB_fbo says calling this function is equivalent to calling
+ * glRenderbufferStorageMultisample() with samples=0. We pass in
+ * a token value here just for error reporting purposes.
+ */
+ renderbuffer_storage(target, internalFormat, width, height, NO_SAMPLES);
+}
+
+
+void GLAPIENTRY
+_mesa_RenderbufferStorageMultisample(GLenum target, GLsizei samples,
+ GLenum internalFormat,
+ GLsizei width, GLsizei height)
+{
+ renderbuffer_storage(target, internalFormat, width, height, samples);
+}
+
+
+/**
+ * OpenGL ES version of glRenderBufferStorage.
+ */
+void GLAPIENTRY
+_es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat,
+ GLsizei width, GLsizei height)
+{
+ switch (internalFormat) {
+ case GL_RGB565:
+ /* XXX this confuses GL_RENDERBUFFER_INTERNAL_FORMAT_OES */
+ /* choose a closest format */
+ internalFormat = GL_RGB5;
+ break;
+ default:
+ break;
+ }
+
+ renderbuffer_storage(target, internalFormat, width, height, 0);
+}
+
+
+void GLAPIENTRY
+_mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint *params)
+{
+ struct gl_renderbuffer *rb;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (target != GL_RENDERBUFFER_EXT) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetRenderbufferParameterivEXT(target)");
+ return;
+ }
+
+ rb = ctx->CurrentRenderbuffer;
+ if (!rb) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetRenderbufferParameterivEXT");
+ return;
+ }
+
+ /* No need to flush here since we're just quering state which is
+ * not effected by rendering.
+ */
+
+ switch (pname) {
+ case GL_RENDERBUFFER_WIDTH_EXT:
+ *params = rb->Width;
+ return;
+ case GL_RENDERBUFFER_HEIGHT_EXT:
+ *params = rb->Height;
+ return;
+ case GL_RENDERBUFFER_INTERNAL_FORMAT_EXT:
+ *params = rb->InternalFormat;
+ return;
+ case GL_RENDERBUFFER_RED_SIZE_EXT:
+ case GL_RENDERBUFFER_GREEN_SIZE_EXT:
+ case GL_RENDERBUFFER_BLUE_SIZE_EXT:
+ case GL_RENDERBUFFER_ALPHA_SIZE_EXT:
+ case GL_RENDERBUFFER_DEPTH_SIZE_EXT:
+ case GL_RENDERBUFFER_STENCIL_SIZE_EXT:
+ *params = get_component_bits(pname, rb->_BaseFormat, rb->Format);
+ break;
+ case GL_RENDERBUFFER_SAMPLES:
+ if (ctx->Extensions.ARB_framebuffer_object) {
+ *params = rb->NumSamples;
+ break;
+ }
+ /* fallthrough */
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetRenderbufferParameterivEXT(target)");
+ return;
+ }
+}
+
+
+GLboolean GLAPIENTRY
+_mesa_IsFramebufferEXT(GLuint framebuffer)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+ if (framebuffer) {
+ struct gl_framebuffer *rb = _mesa_lookup_framebuffer(ctx, framebuffer);
+ if (rb != NULL && rb != &DummyFramebuffer)
+ return GL_TRUE;
+ }
+ return GL_FALSE;
+}
+
+
+/**
+ * Check if any of the attachments of the given framebuffer are textures
+ * (render to texture). Call ctx->Driver.RenderTexture() for such
+ * attachments.
+ */
+static void
+check_begin_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb)
+{
+ GLuint i;
+ ASSERT(ctx->Driver.RenderTexture);
+
+ if (fb->Name == 0)
+ return; /* can't render to texture with winsys framebuffers */
+
+ for (i = 0; i < BUFFER_COUNT; i++) {
+ struct gl_renderbuffer_attachment *att = fb->Attachment + i;
+ if (att->Texture && _mesa_get_attachment_teximage(att)) {
+ ctx->Driver.RenderTexture(ctx, fb, att);
+ }
+ }
+}
+
+
+/**
+ * Examine all the framebuffer's attachments to see if any are textures.
+ * If so, call ctx->Driver.FinishRenderTexture() for each texture to
+ * notify the device driver that the texture image may have changed.
+ */
+static void
+check_end_texture_render(struct gl_context *ctx, struct gl_framebuffer *fb)
+{
+ if (fb->Name == 0)
+ return; /* can't render to texture with winsys framebuffers */
+
+ if (ctx->Driver.FinishRenderTexture) {
+ GLuint i;
+ for (i = 0; i < BUFFER_COUNT; i++) {
+ struct gl_renderbuffer_attachment *att = fb->Attachment + i;
+ if (att->Texture && att->Renderbuffer) {
+ ctx->Driver.FinishRenderTexture(ctx, att);
+ }
+ }
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
+{
+ struct gl_framebuffer *newDrawFb, *newReadFb;
+ struct gl_framebuffer *oldDrawFb, *oldReadFb;
+ GLboolean bindReadBuf, bindDrawBuf;
+ GET_CURRENT_CONTEXT(ctx);
+
+#ifdef DEBUG
+ if (ctx->Extensions.ARB_framebuffer_object) {
+ ASSERT(ctx->Extensions.EXT_framebuffer_object);
+ ASSERT(ctx->Extensions.EXT_framebuffer_blit);
+ }
+#endif
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (!ctx->Extensions.EXT_framebuffer_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindFramebufferEXT(unsupported)");
+ return;
+ }
+
+ switch (target) {
+#if FEATURE_EXT_framebuffer_blit
+ case GL_DRAW_FRAMEBUFFER_EXT:
+ if (!ctx->Extensions.EXT_framebuffer_blit) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindFramebufferEXT(target)");
+ return;
+ }
+ bindDrawBuf = GL_TRUE;
+ bindReadBuf = GL_FALSE;
+ break;
+ case GL_READ_FRAMEBUFFER_EXT:
+ if (!ctx->Extensions.EXT_framebuffer_blit) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindFramebufferEXT(target)");
+ return;
+ }
+ bindDrawBuf = GL_FALSE;
+ bindReadBuf = GL_TRUE;
+ break;
+#endif
+ case GL_FRAMEBUFFER_EXT:
+ bindDrawBuf = GL_TRUE;
+ bindReadBuf = GL_TRUE;
+ break;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindFramebufferEXT(target)");
+ return;
+ }
+
+ if (framebuffer) {
+ /* Binding a user-created framebuffer object */
+ newDrawFb = _mesa_lookup_framebuffer(ctx, framebuffer);
+ if (newDrawFb == &DummyFramebuffer) {
+ /* ID was reserved, but no real framebuffer object made yet */
+ newDrawFb = NULL;
+ }
+ else if (!newDrawFb && ctx->Extensions.ARB_framebuffer_object) {
+ /* All FBO IDs must be Gen'd */
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glBindFramebuffer(buffer)");
+ return;
+ }
+
+ if (!newDrawFb) {
+ /* create new framebuffer object */
+ newDrawFb = ctx->Driver.NewFramebuffer(ctx, framebuffer);
+ if (!newDrawFb) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindFramebufferEXT");
+ return;
+ }
+ _mesa_HashInsert(ctx->Shared->FrameBuffers, framebuffer, newDrawFb);
+ }
+ newReadFb = newDrawFb;
+ }
+ else {
+ /* Binding the window system framebuffer (which was originally set
+ * with MakeCurrent).
+ */
+ newDrawFb = ctx->WinSysDrawBuffer;
+ newReadFb = ctx->WinSysReadBuffer;
+ }
+
+ ASSERT(newDrawFb);
+ ASSERT(newDrawFb != &DummyFramebuffer);
+
+ /* save pointers to current/old framebuffers */
+ oldDrawFb = ctx->DrawBuffer;
+ oldReadFb = ctx->ReadBuffer;
+
+ /* check if really changing bindings */
+ if (oldDrawFb == newDrawFb)
+ bindDrawBuf = GL_FALSE;
+ if (oldReadFb == newReadFb)
+ bindReadBuf = GL_FALSE;
+
+ /*
+ * OK, now bind the new Draw/Read framebuffers, if they're changing.
+ *
+ * We also check if we're beginning and/or ending render-to-texture.
+ * When a framebuffer with texture attachments is unbound, call
+ * ctx->Driver.FinishRenderTexture().
+ * When a framebuffer with texture attachments is bound, call
+ * ctx->Driver.RenderTexture().
+ *
+ * Note that if the ReadBuffer has texture attachments we don't consider
+ * that a render-to-texture case.
+ */
+ if (bindReadBuf) {
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+
+ /* check if old readbuffer was render-to-texture */
+ check_end_texture_render(ctx, oldReadFb);
+
+ _mesa_reference_framebuffer(&ctx->ReadBuffer, newReadFb);
+ }
+
+ if (bindDrawBuf) {
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+
+ /* check if old read/draw buffers were render-to-texture */
+ if (!bindReadBuf)
+ check_end_texture_render(ctx, oldReadFb);
+
+ if (oldDrawFb != oldReadFb)
+ check_end_texture_render(ctx, oldDrawFb);
+
+ /* check if newly bound framebuffer has any texture attachments */
+ check_begin_texture_render(ctx, newDrawFb);
+
+ _mesa_reference_framebuffer(&ctx->DrawBuffer, newDrawFb);
+ }
+
+ if ((bindDrawBuf || bindReadBuf) && ctx->Driver.BindFramebuffer) {
+ ctx->Driver.BindFramebuffer(ctx, target, newDrawFb, newReadFb);
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers)
+{
+ GLint i;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+
+ for (i = 0; i < n; i++) {
+ if (framebuffers[i] > 0) {
+ struct gl_framebuffer *fb;
+ fb = _mesa_lookup_framebuffer(ctx, framebuffers[i]);
+ if (fb) {
+ ASSERT(fb == &DummyFramebuffer || fb->Name == framebuffers[i]);
+
+ /* check if deleting currently bound framebuffer object */
+ if (ctx->Extensions.EXT_framebuffer_blit) {
+ /* separate draw/read binding points */
+ if (fb == ctx->DrawBuffer) {
+ /* bind default */
+ ASSERT(fb->RefCount >= 2);
+ _mesa_BindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ }
+ if (fb == ctx->ReadBuffer) {
+ /* bind default */
+ ASSERT(fb->RefCount >= 2);
+ _mesa_BindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0);
+ }
+ }
+ else {
+ /* only one binding point for read/draw buffers */
+ if (fb == ctx->DrawBuffer || fb == ctx->ReadBuffer) {
+ /* bind default */
+ ASSERT(fb->RefCount >= 2);
+ _mesa_BindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ }
+ }
+
+ /* remove from hash table immediately, to free the ID */
+ _mesa_HashRemove(ctx->Shared->FrameBuffers, framebuffers[i]);
+
+ if (fb != &DummyFramebuffer) {
+ /* But the object will not be freed until it's no longer
+ * bound in any context.
+ */
+ _mesa_reference_framebuffer(&fb, NULL);
+ }
+ }
+ }
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_GenFramebuffersEXT(GLsizei n, GLuint *framebuffers)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLuint first;
+ GLint i;
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGenFramebuffersEXT(n)");
+ return;
+ }
+
+ if (!framebuffers)
+ return;
+
+ first = _mesa_HashFindFreeKeyBlock(ctx->Shared->FrameBuffers, n);
+
+ for (i = 0; i < n; i++) {
+ GLuint name = first + i;
+ framebuffers[i] = name;
+ /* insert dummy placeholder into hash table */
+ _glthread_LOCK_MUTEX(ctx->Shared->Mutex);
+ _mesa_HashInsert(ctx->Shared->FrameBuffers, name, &DummyFramebuffer);
+ _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
+ }
+}
+
+
+
+GLenum GLAPIENTRY
+_mesa_CheckFramebufferStatusEXT(GLenum target)
+{
+ struct gl_framebuffer *buffer;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, 0);
+
+ buffer = get_framebuffer_target(ctx, target);
+ if (!buffer) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glCheckFramebufferStatus(target)");
+ return 0;
+ }
+
+ if (buffer->Name == 0) {
+ /* The window system / default framebuffer is always complete */
+ return GL_FRAMEBUFFER_COMPLETE_EXT;
+ }
+
+ /* No need to flush here */
+
+ if (buffer->_Status != GL_FRAMEBUFFER_COMPLETE) {
+ _mesa_test_framebuffer_completeness(ctx, buffer);
+ }
+
+ return buffer->_Status;
+}
+
+
+
+/**
+ * Common code called by glFramebufferTexture1D/2D/3DEXT().
+ */
+static void
+framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
+ GLenum attachment, GLenum textarget, GLuint texture,
+ GLint level, GLint zoffset)
+{
+ struct gl_renderbuffer_attachment *att;
+ struct gl_texture_object *texObj = NULL;
+ struct gl_framebuffer *fb;
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ fb = get_framebuffer_target(ctx, target);
+ if (!fb) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glFramebufferTexture%sEXT(target=0x%x)", caller, target);
+ return;
+ }
+
+ /* check framebuffer binding */
+ if (fb->Name == 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glFramebufferTexture%sEXT", caller);
+ return;
+ }
+
+
+ /* The textarget, level, and zoffset parameters are only validated if
+ * texture is non-zero.
+ */
+ if (texture) {
+ GLboolean err = GL_TRUE;
+
+ texObj = _mesa_lookup_texture(ctx, texture);
+ if (texObj != NULL) {
+ if (textarget == 0) {
+ /* XXX what's the purpose of this? */
+ err = (texObj->Target != GL_TEXTURE_3D) &&
+ (texObj->Target != GL_TEXTURE_1D_ARRAY_EXT) &&
+ (texObj->Target != GL_TEXTURE_2D_ARRAY_EXT);
+ }
+ else {
+ err = (texObj->Target == GL_TEXTURE_CUBE_MAP)
+ ? !IS_CUBE_FACE(textarget)
+ : (texObj->Target != textarget);
+ }
+ }
+ else {
+ /* can't render to a non-existant texture */
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glFramebufferTexture%sEXT(non existant texture)",
+ caller);
+ return;
+ }
+
+ if (err) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glFramebufferTexture%sEXT(texture target mismatch)",
+ caller);
+ return;
+ }
+
+ if (texObj->Target == GL_TEXTURE_3D) {
+ const GLint maxSize = 1 << (ctx->Const.Max3DTextureLevels - 1);
+ if (zoffset < 0 || zoffset >= maxSize) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glFramebufferTexture%sEXT(zoffset)", caller);
+ return;
+ }
+ }
+ else if ((texObj->Target == GL_TEXTURE_1D_ARRAY_EXT) ||
+ (texObj->Target == GL_TEXTURE_2D_ARRAY_EXT)) {
+ if (zoffset < 0 || zoffset >= ctx->Const.MaxArrayTextureLayers) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glFramebufferTexture%sEXT(layer)", caller);
+ return;
+ }
+ }
+
+ if ((level < 0) ||
+ (level >= _mesa_max_texture_levels(ctx, texObj->Target))) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glFramebufferTexture%sEXT(level)", caller);
+ return;
+ }
+ }
+
+ att = _mesa_get_attachment(ctx, fb, attachment);
+ if (att == NULL) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glFramebufferTexture%sEXT(attachment)", caller);
+ return;
+ }
+
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+
+ _glthread_LOCK_MUTEX(fb->Mutex);
+ if (texObj) {
+ _mesa_set_texture_attachment(ctx, fb, att, texObj, textarget,
+ level, zoffset);
+ /* Set the render-to-texture flag. We'll check this flag in
+ * glTexImage() and friends to determine if we need to revalidate
+ * any FBOs that might be rendering into this texture.
+ * This flag never gets cleared since it's non-trivial to determine
+ * when all FBOs might be done rendering to this texture. That's OK
+ * though since it's uncommon to render to a texture then repeatedly
+ * call glTexImage() to change images in the texture.
+ */
+ texObj->_RenderToTexture = GL_TRUE;
+ }
+ else {
+ _mesa_remove_attachment(ctx, att);
+ }
+
+ invalidate_framebuffer(fb);
+
+ _glthread_UNLOCK_MUTEX(fb->Mutex);
+}
+
+
+
+void GLAPIENTRY
+_mesa_FramebufferTexture1DEXT(GLenum target, GLenum attachment,
+ GLenum textarget, GLuint texture, GLint level)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if ((texture != 0) && (textarget != GL_TEXTURE_1D)) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glFramebufferTexture1DEXT(textarget)");
+ return;
+ }
+
+ framebuffer_texture(ctx, "1D", target, attachment, textarget, texture,
+ level, 0);
+}
+
+
+void GLAPIENTRY
+_mesa_FramebufferTexture2DEXT(GLenum target, GLenum attachment,
+ GLenum textarget, GLuint texture, GLint level)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if ((texture != 0) &&
+ (textarget != GL_TEXTURE_2D) &&
+ (textarget != GL_TEXTURE_RECTANGLE_ARB) &&
+ (!IS_CUBE_FACE(textarget))) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glFramebufferTexture2DEXT(textarget=0x%x)", textarget);
+ return;
+ }
+
+ framebuffer_texture(ctx, "2D", target, attachment, textarget, texture,
+ level, 0);
+}
+
+
+void GLAPIENTRY
+_mesa_FramebufferTexture3DEXT(GLenum target, GLenum attachment,
+ GLenum textarget, GLuint texture,
+ GLint level, GLint zoffset)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ if ((texture != 0) && (textarget != GL_TEXTURE_3D)) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glFramebufferTexture3DEXT(textarget)");
+ return;
+ }
+
+ framebuffer_texture(ctx, "3D", target, attachment, textarget, texture,
+ level, zoffset);
+}
+
+
+void GLAPIENTRY
+_mesa_FramebufferTextureLayerEXT(GLenum target, GLenum attachment,
+ GLuint texture, GLint level, GLint layer)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ framebuffer_texture(ctx, "Layer", target, attachment, 0, texture,
+ level, layer);
+}
+
+
+void GLAPIENTRY
+_mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
+ GLenum renderbufferTarget,
+ GLuint renderbuffer)
+{
+ struct gl_renderbuffer_attachment *att;
+ struct gl_framebuffer *fb;
+ struct gl_renderbuffer *rb;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ fb = get_framebuffer_target(ctx, target);
+ if (!fb) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glFramebufferRenderbufferEXT(target)");
+ return;
+ }
+
+ if (renderbufferTarget != GL_RENDERBUFFER_EXT) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glFramebufferRenderbufferEXT(renderbufferTarget)");
+ return;
+ }
+
+ if (fb->Name == 0) {
+ /* Can't attach new renderbuffers to a window system framebuffer */
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glFramebufferRenderbufferEXT");
+ return;
+ }
+
+ att = _mesa_get_attachment(ctx, fb, attachment);
+ if (att == NULL) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glFramebufferRenderbufferEXT(invalid attachment %s)",
+ _mesa_lookup_enum_by_nr(attachment));
+ return;
+ }
+
+ if (renderbuffer) {
+ rb = _mesa_lookup_renderbuffer(ctx, renderbuffer);
+ if (!rb) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glFramebufferRenderbufferEXT(non-existant"
+ " renderbuffer %u)", renderbuffer);
+ return;
+ }
+ else if (rb == &DummyRenderbuffer) {
+ /* This is what NVIDIA does */
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glFramebufferRenderbufferEXT(renderbuffer %u)",
+ renderbuffer);
+ return;
+ }
+ }
+ else {
+ /* remove renderbuffer attachment */
+ rb = NULL;
+ }
+
+ if (attachment == GL_DEPTH_STENCIL_ATTACHMENT &&
+ rb && rb->Format != MESA_FORMAT_NONE) {
+ /* make sure the renderbuffer is a depth/stencil format */
+ const GLenum baseFormat = _mesa_get_format_base_format(rb->Format);
+ if (baseFormat != GL_DEPTH_STENCIL) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glFramebufferRenderbufferEXT(renderbuffer"
+ " is not DEPTH_STENCIL format)");
+ return;
+ }
+ }
+
+
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+
+ assert(ctx->Driver.FramebufferRenderbuffer);
+ ctx->Driver.FramebufferRenderbuffer(ctx, fb, attachment, rb);
+
+ /* Some subsequent GL commands may depend on the framebuffer's visual
+ * after the binding is updated. Update visual info now.
+ */
+ _mesa_update_framebuffer_visual(ctx, fb);
+}
+
+
+void GLAPIENTRY
+_mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
+ GLenum pname, GLint *params)
+{
+ const struct gl_renderbuffer_attachment *att;
+ struct gl_framebuffer *buffer;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ buffer = get_framebuffer_target(ctx, target);
+ if (!buffer) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetFramebufferAttachmentParameterivEXT(target)");
+ return;
+ }
+
+ if (buffer->Name == 0) {
+ /* the default / window-system FBO */
+ att = _mesa_get_fb0_attachment(ctx, buffer, attachment);
+ }
+ else {
+ /* user-created framebuffer FBO */
+ att = _mesa_get_attachment(ctx, buffer, attachment);
+ }
+
+ if (att == NULL) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetFramebufferAttachmentParameterivEXT(attachment)");
+ return;
+ }
+
+ if (attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
+ /* the depth and stencil attachments must point to the same buffer */
+ const struct gl_renderbuffer_attachment *depthAtt, *stencilAtt;
+ depthAtt = _mesa_get_attachment(ctx, buffer, GL_DEPTH_ATTACHMENT);
+ stencilAtt = _mesa_get_attachment(ctx, buffer, GL_STENCIL_ATTACHMENT);
+ if (depthAtt->Renderbuffer != stencilAtt->Renderbuffer) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetFramebufferAttachmentParameterivEXT(DEPTH/STENCIL"
+ " attachments differ)");
+ return;
+ }
+ }
+
+ /* No need to flush here */
+
+ switch (pname) {
+ case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:
+ *params = buffer->Name == 0 ? GL_FRAMEBUFFER_DEFAULT : att->Type;
+ return;
+ case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT:
+ if (att->Type == GL_RENDERBUFFER_EXT) {
+ *params = att->Renderbuffer->Name;
+ }
+ else if (att->Type == GL_TEXTURE) {
+ *params = att->Texture->Name;
+ }
+ else {
+ assert(att->Type == GL_NONE);
+ *params = 0;
+ }
+ return;
+ case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT:
+ if (att->Type == GL_TEXTURE) {
+ *params = att->TextureLevel;
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ }
+ return;
+ case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT:
+ if (att->Type == GL_TEXTURE) {
+ if (att->Texture && att->Texture->Target == GL_TEXTURE_CUBE_MAP) {
+ *params = GL_TEXTURE_CUBE_MAP_POSITIVE_X + att->CubeMapFace;
+ }
+ else {
+ *params = 0;
+ }
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ }
+ return;
+ case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT:
+ if (att->Type == GL_TEXTURE) {
+ if (att->Texture && att->Texture->Target == GL_TEXTURE_3D) {
+ *params = att->Zoffset;
+ }
+ else {
+ *params = 0;
+ }
+ }
+ else {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ }
+ return;
+ case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:
+ if (!ctx->Extensions.ARB_framebuffer_object) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ }
+ else {
+ if (ctx->Extensions.EXT_framebuffer_sRGB && ctx->Const.sRGBCapable) {
+ *params = _mesa_get_format_color_encoding(att->Renderbuffer->Format);
+ }
+ else {
+ /* According to ARB_framebuffer_sRGB, we should return LINEAR
+ * if the sRGB conversion is unsupported. */
+ *params = GL_LINEAR;
+ }
+ }
+ return;
+ case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:
+ if (!ctx->Extensions.ARB_framebuffer_object) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ return;
+ }
+ else {
+ gl_format format = att->Renderbuffer->Format;
+ if (format == MESA_FORMAT_CI8 || format == MESA_FORMAT_S8) {
+ /* special cases */
+ *params = GL_INDEX;
+ }
+ else {
+ *params = _mesa_get_format_datatype(format);
+ }
+ }
+ return;
+ case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE:
+ case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:
+ case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:
+ case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
+ case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
+ case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
+ if (!ctx->Extensions.ARB_framebuffer_object) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ }
+ else if (att->Texture) {
+ const struct gl_texture_image *texImage =
+ _mesa_select_tex_image(ctx, att->Texture, att->Texture->Target,
+ att->TextureLevel);
+ if (texImage) {
+ *params = get_component_bits(pname, texImage->_BaseFormat,
+ texImage->TexFormat);
+ }
+ else {
+ *params = 0;
+ }
+ }
+ else if (att->Renderbuffer) {
+ *params = get_component_bits(pname, att->Renderbuffer->_BaseFormat,
+ att->Renderbuffer->Format);
+ }
+ else {
+ *params = 0;
+ }
+ return;
+ default:
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glGetFramebufferAttachmentParameterivEXT(pname)");
+ return;
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_GenerateMipmapEXT(GLenum target)
+{
+ struct gl_texture_object *texObj;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+
+ switch (target) {
+ case GL_TEXTURE_1D:
+ case GL_TEXTURE_2D:
+ case GL_TEXTURE_3D:
+ case GL_TEXTURE_CUBE_MAP:
+ /* OK, legal value */
+ break;
+ default:
+ /* XXX need to implement GL_TEXTURE_1D_ARRAY and GL_TEXTURE_2D_ARRAY */
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGenerateMipmapEXT(target)");
+ return;
+ }
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
+
+ if (texObj->BaseLevel >= texObj->MaxLevel) {
+ /* nothing to do */
+ return;
+ }
+
+ if (texObj->Target == GL_TEXTURE_CUBE_MAP &&
+ !_mesa_cube_complete(texObj)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGenerateMipmap(incomplete cube map)");
+ return;
+ }
+
+ _mesa_lock_texture(ctx, texObj);
+ if (target == GL_TEXTURE_CUBE_MAP) {
+ GLuint face;
+ for (face = 0; face < 6; face++)
+ ctx->Driver.GenerateMipmap(ctx,
+ GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB + face,
+ texObj);
+ }
+ else {
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
+ }
+ _mesa_unlock_texture(ctx, texObj);
+}
+
+
+#if FEATURE_EXT_framebuffer_blit
+
+static const struct gl_renderbuffer_attachment *
+find_attachment(const struct gl_framebuffer *fb,
+ const struct gl_renderbuffer *rb)
+{
+ GLuint i;
+ for (i = 0; i < Elements(fb->Attachment); i++) {
+ if (fb->Attachment[i].Renderbuffer == rb)
+ return &fb->Attachment[i];
+ }
+ return NULL;
+}
+
+
+
+/**
+ * Blit rectangular region, optionally from one framebuffer to another.
+ *
+ * Note, if the src buffer is multisampled and the dest is not, this is
+ * when the samples must be resolved to a single color.
+ */
+void GLAPIENTRY
+_mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
+ GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
+ GLbitfield mask, GLenum filter)
+{
+ const GLbitfield legalMaskBits = (GL_COLOR_BUFFER_BIT |
+ GL_DEPTH_BUFFER_BIT |
+ GL_STENCIL_BUFFER_BIT);
+ const struct gl_framebuffer *readFb, *drawFb;
+ const struct gl_renderbuffer *colorReadRb, *colorDrawRb;
+ GET_CURRENT_CONTEXT(ctx);
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+ FLUSH_VERTICES(ctx, _NEW_BUFFERS);
+
+ if (MESA_VERBOSE & VERBOSE_API)
+ _mesa_debug(ctx,
+ "glBlitFramebuffer(%d, %d, %d, %d, %d, %d, %d, %d, 0x%x, %s)\n",
+ srcX0, srcY0, srcX1, srcY1,
+ dstX0, dstY0, dstX1, dstY1,
+ mask, _mesa_lookup_enum_by_nr(filter));
+
+ if (ctx->NewState) {
+ _mesa_update_state(ctx);
+ }
+
+ readFb = ctx->ReadBuffer;
+ drawFb = ctx->DrawBuffer;
+
+ if (!readFb || !drawFb) {
+ /* This will normally never happen but someday we may want to
+ * support MakeCurrent() with no drawables.
+ */
+ return;
+ }
+
+ /* check for complete framebuffers */
+ if (drawFb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT ||
+ readFb->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
+ "glBlitFramebufferEXT(incomplete draw/read buffers)");
+ return;
+ }
+
+ if (filter != GL_NEAREST && filter != GL_LINEAR) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBlitFramebufferEXT(filter)");
+ return;
+ }
+
+ if (mask & ~legalMaskBits) {
+ _mesa_error( ctx, GL_INVALID_VALUE, "glBlitFramebufferEXT(mask)");
+ return;
+ }
+
+ /* depth/stencil must be blitted with nearest filtering */
+ if ((mask & (GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT))
+ && filter != GL_NEAREST) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBlitFramebufferEXT(depth/stencil requires GL_NEAREST filter)");
+ return;
+ }
+
+ /* get color read/draw renderbuffers */
+ if (mask & GL_COLOR_BUFFER_BIT) {
+ colorReadRb = readFb->_ColorReadBuffer;
+ colorDrawRb = drawFb->_ColorDrawBuffers[0];
+ }
+ else {
+ colorReadRb = colorDrawRb = NULL;
+ }
+
+ if (mask & GL_STENCIL_BUFFER_BIT) {
+ struct gl_renderbuffer *readRb = readFb->_StencilBuffer;
+ struct gl_renderbuffer *drawRb = drawFb->_StencilBuffer;
+ if (!readRb ||
+ !drawRb ||
+ _mesa_get_format_bits(readRb->Format, GL_STENCIL_BITS) !=
+ _mesa_get_format_bits(drawRb->Format, GL_STENCIL_BITS)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBlitFramebufferEXT(stencil buffer size mismatch)");
+ return;
+ }
+ }
+
+ if (mask & GL_DEPTH_BUFFER_BIT) {
+ struct gl_renderbuffer *readRb = readFb->_DepthBuffer;
+ struct gl_renderbuffer *drawRb = drawFb->_DepthBuffer;
+ if (!readRb ||
+ !drawRb ||
+ _mesa_get_format_bits(readRb->Format, GL_DEPTH_BITS) !=
+ _mesa_get_format_bits(drawRb->Format, GL_DEPTH_BITS)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBlitFramebufferEXT(depth buffer size mismatch)");
+ return;
+ }
+ }
+
+ if (readFb->Visual.samples > 0 &&
+ drawFb->Visual.samples > 0 &&
+ readFb->Visual.samples != drawFb->Visual.samples) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBlitFramebufferEXT(mismatched samples");
+ return;
+ }
+
+ /* extra checks for multisample copies... */
+ if (readFb->Visual.samples > 0 || drawFb->Visual.samples > 0) {
+ /* src and dest region sizes must be the same */
+ if (srcX1 - srcX0 != dstX1 - dstX0 ||
+ srcY1 - srcY0 != dstY1 - dstY0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBlitFramebufferEXT(bad src/dst multisample region sizes)");
+ return;
+ }
+
+ /* color formats must match */
+ if (colorReadRb &&
+ colorDrawRb &&
+ colorReadRb->Format != colorDrawRb->Format) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBlitFramebufferEXT(bad src/dst multisample pixel formats)");
+ return;
+ }
+ }
+
+ if (!ctx->Extensions.EXT_framebuffer_blit) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glBlitFramebufferEXT");
+ return;
+ }
+
+ /* Debug code */
+ if (DEBUG_BLIT) {
+ printf("glBlitFramebuffer(%d, %d, %d, %d, %d, %d, %d, %d,"
+ " 0x%x, 0x%x)\n",
+ srcX0, srcY0, srcX1, srcY1,
+ dstX0, dstY0, dstX1, dstY1,
+ mask, filter);
+ if (colorReadRb) {
+ const struct gl_renderbuffer_attachment *att;
+
+ att = find_attachment(readFb, colorReadRb);
+ printf(" Src FBO %u RB %u (%dx%d) ",
+ readFb->Name, colorReadRb->Name,
+ colorReadRb->Width, colorReadRb->Height);
+ if (att && att->Texture) {
+ printf("Tex %u tgt 0x%x level %u face %u",
+ att->Texture->Name,
+ att->Texture->Target,
+ att->TextureLevel,
+ att->CubeMapFace);
+ }
+ printf("\n");
+
+ att = find_attachment(drawFb, colorDrawRb);
+ printf(" Dst FBO %u RB %u (%dx%d) ",
+ drawFb->Name, colorDrawRb->Name,
+ colorDrawRb->Width, colorDrawRb->Height);
+ if (att && att->Texture) {
+ printf("Tex %u tgt 0x%x level %u face %u",
+ att->Texture->Name,
+ att->Texture->Target,
+ att->TextureLevel,
+ att->CubeMapFace);
+ }
+ printf("\n");
+ }
+ }
+
+ ASSERT(ctx->Driver.BlitFramebuffer);
+ ctx->Driver.BlitFramebuffer(ctx,
+ srcX0, srcY0, srcX1, srcY1,
+ dstX0, dstY0, dstX1, dstY1,
+ mask, filter);
+}
+#endif /* FEATURE_EXT_framebuffer_blit */
+
+#if FEATURE_ARB_geometry_shader4
+void GLAPIENTRY
+_mesa_FramebufferTextureARB(GLenum target, GLenum attachment,
+ GLuint texture, GLint level)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glFramebufferTextureARB "
+ "not implemented!");
+}
+
+void GLAPIENTRY
+_mesa_FramebufferTextureFaceARB(GLenum target, GLenum attachment,
+ GLuint texture, GLint level, GLenum face)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glFramebufferTextureFaceARB "
+ "not implemented!");
+}
+#endif /* FEATURE_ARB_geometry_shader4 */
diff --git a/mesalib/src/mesa/main/fbobject.h b/mesalib/src/mesa/main/fbobject.h index ba74a95b7..d9b06b9af 100644 --- a/mesalib/src/mesa/main/fbobject.h +++ b/mesalib/src/mesa/main/fbobject.h @@ -1,174 +1,195 @@ -/* - * Mesa 3-D graphics library - * Version: 7.1 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - - -#ifndef FBOBJECT_H -#define FBOBJECT_H - -#include "glheader.h" - -struct gl_context; -struct gl_texture_object; - -extern void -_mesa_init_fbobjects(struct gl_context *ctx); - -extern struct gl_framebuffer * -_mesa_get_incomplete_framebuffer(void); - -extern struct gl_renderbuffer * -_mesa_lookup_renderbuffer(struct gl_context *ctx, GLuint id); - -extern struct gl_framebuffer * -_mesa_lookup_framebuffer(struct gl_context *ctx, GLuint id); - -extern struct gl_renderbuffer_attachment * -_mesa_get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb, - GLenum attachment); - - -extern void -_mesa_remove_attachment(struct gl_context *ctx, - struct gl_renderbuffer_attachment *att); - -extern void -_mesa_set_texture_attachment(struct gl_context *ctx, - struct gl_framebuffer *fb, - struct gl_renderbuffer_attachment *att, - struct gl_texture_object *texObj, - GLenum texTarget, GLuint level, GLuint zoffset); - -extern void -_mesa_set_renderbuffer_attachment(struct gl_context *ctx, - struct gl_renderbuffer_attachment *att, - struct gl_renderbuffer *rb); - -extern void -_mesa_framebuffer_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, - GLenum attachment, struct gl_renderbuffer *rb); - -extern void -_mesa_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb); - -extern void -_mesa_test_framebuffer_completeness(struct gl_context *ctx, struct gl_framebuffer *fb); - -extern GLboolean -_mesa_is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat); - -extern GLenum -_mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat); - -extern GLboolean GLAPIENTRY -_mesa_IsRenderbufferEXT(GLuint renderbuffer); - -extern void GLAPIENTRY -_mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer); - -extern void GLAPIENTRY -_mesa_DeleteRenderbuffersEXT(GLsizei n, const GLuint *renderbuffers); - -extern void GLAPIENTRY -_mesa_GenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers); - -extern void GLAPIENTRY -_mesa_RenderbufferStorageEXT(GLenum target, GLenum internalformat, - GLsizei width, GLsizei height); - -extern void GLAPIENTRY -_mesa_RenderbufferStorageMultisample(GLenum target, GLsizei samples, - GLenum internalformat, - GLsizei width, GLsizei height); - -extern void GLAPIENTRY -_es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat, - GLsizei width, GLsizei height); - -extern void GLAPIENTRY -_mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image); - -extern void GLAPIENTRY -_mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, - GLint *params); - -extern GLboolean GLAPIENTRY -_mesa_IsFramebufferEXT(GLuint framebuffer); - -extern void GLAPIENTRY -_mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer); - -extern void GLAPIENTRY -_mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers); - -extern void GLAPIENTRY -_mesa_GenFramebuffersEXT(GLsizei n, GLuint *framebuffers); - -extern GLenum GLAPIENTRY -_mesa_CheckFramebufferStatusEXT(GLenum target); - -extern void GLAPIENTRY -_mesa_FramebufferTexture1DEXT(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, GLint level); - -extern void GLAPIENTRY -_mesa_FramebufferTexture2DEXT(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, GLint level); - -extern void GLAPIENTRY -_mesa_FramebufferTexture3DEXT(GLenum target, GLenum attachment, - GLenum textarget, GLuint texture, - GLint level, GLint zoffset); - -extern void GLAPIENTRY -_mesa_FramebufferTextureLayerEXT(GLenum target, GLenum attachment, - GLuint texture, GLint level, GLint layer); - -extern void GLAPIENTRY -_mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment, - GLenum renderbuffertarget, - GLuint renderbuffer); - -extern void GLAPIENTRY -_mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, - GLenum pname, GLint *params); - -extern void GLAPIENTRY -_mesa_GenerateMipmapEXT(GLenum target); - - -extern void GLAPIENTRY -_mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, - GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, - GLbitfield mask, GLenum filter); - -extern void GLAPIENTRY -_mesa_FramebufferTextureARB(GLenum target, GLenum attachment, - GLuint texture, GLint level); - -extern void GLAPIENTRY -_mesa_FramebufferTextureFaceARB(GLenum target, GLenum attachment, - GLuint texture, GLint level, GLenum face); - - -#endif /* FBOBJECT_H */ +/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ *
+ * 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
+ * BRIAN PAUL 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.
+ */
+
+
+#ifndef FBOBJECT_H
+#define FBOBJECT_H
+
+#include "compiler.h"
+#include "glheader.h"
+
+struct gl_context;
+struct gl_texture_object;
+
+extern void
+_mesa_init_fbobjects(struct gl_context *ctx);
+
+extern struct gl_framebuffer *
+_mesa_get_incomplete_framebuffer(void);
+
+extern struct gl_renderbuffer *
+_mesa_lookup_renderbuffer(struct gl_context *ctx, GLuint id);
+
+extern struct gl_framebuffer *
+_mesa_lookup_framebuffer(struct gl_context *ctx, GLuint id);
+
+extern struct gl_renderbuffer_attachment *
+_mesa_get_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
+ GLenum attachment);
+
+
+/** Return the texture image for a renderbuffer attachment */
+static INLINE struct gl_texture_image *
+_mesa_get_attachment_teximage(struct gl_renderbuffer_attachment *att)
+{
+ assert(att->Type == GL_TEXTURE);
+ return att->Texture->Image[att->CubeMapFace][att->TextureLevel];
+}
+
+
+/** Return the (const) texture image for a renderbuffer attachment */
+static INLINE const struct gl_texture_image *
+_mesa_get_attachment_teximage_const(const struct gl_renderbuffer_attachment *att)
+{
+ assert(att->Type == GL_TEXTURE);
+ return att->Texture->Image[att->CubeMapFace][att->TextureLevel];
+}
+
+
+extern void
+_mesa_remove_attachment(struct gl_context *ctx,
+ struct gl_renderbuffer_attachment *att);
+
+extern void
+_mesa_set_texture_attachment(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
+ struct gl_renderbuffer_attachment *att,
+ struct gl_texture_object *texObj,
+ GLenum texTarget, GLuint level, GLuint zoffset);
+
+extern void
+_mesa_set_renderbuffer_attachment(struct gl_context *ctx,
+ struct gl_renderbuffer_attachment *att,
+ struct gl_renderbuffer *rb);
+
+extern void
+_mesa_framebuffer_renderbuffer(struct gl_context *ctx,
+ struct gl_framebuffer *fb,
+ GLenum attachment, struct gl_renderbuffer *rb);
+
+extern void
+_mesa_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb);
+
+extern void
+_mesa_test_framebuffer_completeness(struct gl_context *ctx,
+ struct gl_framebuffer *fb);
+
+extern GLboolean
+_mesa_is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat);
+
+extern GLenum
+_mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat);
+
+extern GLboolean GLAPIENTRY
+_mesa_IsRenderbufferEXT(GLuint renderbuffer);
+
+extern void GLAPIENTRY
+_mesa_BindRenderbufferEXT(GLenum target, GLuint renderbuffer);
+
+extern void GLAPIENTRY
+_mesa_DeleteRenderbuffersEXT(GLsizei n, const GLuint *renderbuffers);
+
+extern void GLAPIENTRY
+_mesa_GenRenderbuffersEXT(GLsizei n, GLuint *renderbuffers);
+
+extern void GLAPIENTRY
+_mesa_RenderbufferStorageEXT(GLenum target, GLenum internalformat,
+ GLsizei width, GLsizei height);
+
+extern void GLAPIENTRY
+_mesa_RenderbufferStorageMultisample(GLenum target, GLsizei samples,
+ GLenum internalformat,
+ GLsizei width, GLsizei height);
+
+extern void GLAPIENTRY
+_es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat,
+ GLsizei width, GLsizei height);
+
+extern void GLAPIENTRY
+_mesa_EGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image);
+
+extern void GLAPIENTRY
+_mesa_GetRenderbufferParameterivEXT(GLenum target, GLenum pname,
+ GLint *params);
+
+extern GLboolean GLAPIENTRY
+_mesa_IsFramebufferEXT(GLuint framebuffer);
+
+extern void GLAPIENTRY
+_mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer);
+
+extern void GLAPIENTRY
+_mesa_DeleteFramebuffersEXT(GLsizei n, const GLuint *framebuffers);
+
+extern void GLAPIENTRY
+_mesa_GenFramebuffersEXT(GLsizei n, GLuint *framebuffers);
+
+extern GLenum GLAPIENTRY
+_mesa_CheckFramebufferStatusEXT(GLenum target);
+
+extern void GLAPIENTRY
+_mesa_FramebufferTexture1DEXT(GLenum target, GLenum attachment,
+ GLenum textarget, GLuint texture, GLint level);
+
+extern void GLAPIENTRY
+_mesa_FramebufferTexture2DEXT(GLenum target, GLenum attachment,
+ GLenum textarget, GLuint texture, GLint level);
+
+extern void GLAPIENTRY
+_mesa_FramebufferTexture3DEXT(GLenum target, GLenum attachment,
+ GLenum textarget, GLuint texture,
+ GLint level, GLint zoffset);
+
+extern void GLAPIENTRY
+_mesa_FramebufferTextureLayerEXT(GLenum target, GLenum attachment,
+ GLuint texture, GLint level, GLint layer);
+
+extern void GLAPIENTRY
+_mesa_FramebufferRenderbufferEXT(GLenum target, GLenum attachment,
+ GLenum renderbuffertarget,
+ GLuint renderbuffer);
+
+extern void GLAPIENTRY
+_mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
+ GLenum pname, GLint *params);
+
+extern void GLAPIENTRY
+_mesa_GenerateMipmapEXT(GLenum target);
+
+
+extern void GLAPIENTRY
+_mesa_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
+ GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
+ GLbitfield mask, GLenum filter);
+
+extern void GLAPIENTRY
+_mesa_FramebufferTextureARB(GLenum target, GLenum attachment,
+ GLuint texture, GLint level);
+
+extern void GLAPIENTRY
+_mesa_FramebufferTextureFaceARB(GLenum target, GLenum attachment,
+ GLuint texture, GLint level, GLenum face);
+
+
+#endif /* FBOBJECT_H */
diff --git a/mesalib/src/mesa/main/framebuffer.c b/mesalib/src/mesa/main/framebuffer.c index 30af04c48..b741c51ab 100644 --- a/mesalib/src/mesa/main/framebuffer.c +++ b/mesalib/src/mesa/main/framebuffer.c @@ -1061,12 +1061,12 @@ _mesa_print_framebuffer(const struct gl_framebuffer *fb) for (i = 0; i < BUFFER_COUNT; i++) {
const struct gl_renderbuffer_attachment *att = &fb->Attachment[i];
if (att->Type == GL_TEXTURE) {
- const struct gl_texture_image *texImage;
+ const struct gl_texture_image *texImage =
+ _mesa_get_attachment_teximage_const(att);
fprintf(stderr,
" %2d: Texture %u, level %u, face %u, slice %u, complete %d\n",
i, att->Texture->Name, att->TextureLevel, att->CubeMapFace,
att->Zoffset, att->Complete);
- texImage = att->Texture->Image[att->CubeMapFace][att->TextureLevel];
fprintf(stderr, " Size: %u x %u x %u Format %s\n",
texImage->Width, texImage->Height, texImage->Depth,
_mesa_get_format_name(texImage->TexFormat));
diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c index 9090ca661..eec22fc3f 100644 --- a/mesalib/src/mesa/main/get.c +++ b/mesalib/src/mesa/main/get.c @@ -1,2564 +1,2600 @@ -/* - * Copyright (C) 2010 Brian Paul All Rights Reserved. - * Copyright (C) 2010 Intel Corporation - * - * 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 - * BRIAN PAUL 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. - * - * Author: Kristian Høgsberg <krh@bitplanet.net> - */ - -#include "glheader.h" -#include "context.h" -#include "enable.h" -#include "enums.h" -#include "extensions.h" -#include "get.h" -#include "macros.h" -#include "mfeatures.h" -#include "mtypes.h" -#include "state.h" -#include "texcompress.h" -#include "framebuffer.h" - -/* This is a table driven implemetation of the glGet*v() functions. - * The basic idea is that most getters just look up an int somewhere - * in struct gl_context and then convert it to a bool or float according to - * which of glGetIntegerv() glGetBooleanv() etc is being called. - * Instead of generating code to do this, we can just record the enum - * value and the offset into struct gl_context in an array of structs. Then - * in glGet*(), we lookup the struct for the enum in question, and use - * the offset to get the int we need. - * - * Sometimes we need to look up a float, a boolean, a bit in a - * bitfield, a matrix or other types instead, so we need to track the - * type of the value in struct gl_context. And sometimes the value isn't in - * struct gl_context but in the drawbuffer, the array object, current texture - * unit, or maybe it's a computed value. So we need to also track - * where or how to find the value. Finally, we sometimes need to - * check that one of a number of extensions are enabled, the GL - * version or flush or call _mesa_update_state(). This is done by - * attaching optional extra information to the value description - * struct, it's sort of like an array of opcodes that describe extra - * checks or actions. - * - * Putting all this together we end up with struct value_desc below, - * and with a couple of macros to help, the table of struct value_desc - * is about as concise as the specification in the old python script. - */ - -#undef CONST - -#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE ) -#define FLOAT_TO_FIXED(F) ( ((F) * 65536.0f > INT_MAX) ? INT_MAX : \ - ((F) * 65536.0f < INT_MIN) ? INT_MIN : \ - (GLint) ((F) * 65536.0f) ) - -#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE ) -#define INT_TO_FIXED(I) ( ((I) > SHRT_MAX) ? INT_MAX : \ - ((I) < SHRT_MIN) ? INT_MIN : \ - (GLint) ((I) * 65536) ) - -#define INT64_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE ) -#define INT64_TO_INT(I) ( (GLint)((I > INT_MAX) ? INT_MAX : ((I < INT_MIN) ? INT_MIN : (I))) ) - -#define BOOLEAN_TO_INT(B) ( (GLint) (B) ) -#define BOOLEAN_TO_INT64(B) ( (GLint64) (B) ) -#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F ) -#define BOOLEAN_TO_FIXED(B) ( (GLint) ((B) ? 1 : 0) << 16 ) - -#define ENUM_TO_INT64(E) ( (GLint64) (E) ) -#define ENUM_TO_FIXED(E) (E) - -enum value_type { - TYPE_INVALID, - TYPE_API_MASK, - TYPE_INT, - TYPE_INT_2, - TYPE_INT_3, - TYPE_INT_4, - TYPE_INT_N, - TYPE_INT64, - TYPE_ENUM, - TYPE_ENUM_2, - TYPE_BOOLEAN, - TYPE_BIT_0, - TYPE_BIT_1, - TYPE_BIT_2, - TYPE_BIT_3, - TYPE_BIT_4, - TYPE_BIT_5, - TYPE_FLOAT, - TYPE_FLOAT_2, - TYPE_FLOAT_3, - TYPE_FLOAT_4, - TYPE_FLOATN, - TYPE_FLOATN_2, - TYPE_FLOATN_3, - TYPE_FLOATN_4, - TYPE_DOUBLEN, - TYPE_MATRIX, - TYPE_MATRIX_T, - TYPE_CONST -}; - -enum value_location { - LOC_BUFFER, - LOC_CONTEXT, - LOC_ARRAY, - LOC_TEXUNIT, - LOC_CUSTOM -}; - -enum value_extra { - EXTRA_END = 0x8000, - EXTRA_VERSION_30, - EXTRA_VERSION_31, - EXTRA_VERSION_32, - EXTRA_VERSION_ES2, - EXTRA_NEW_BUFFERS, - EXTRA_NEW_FRAG_CLAMP, - EXTRA_VALID_DRAW_BUFFER, - EXTRA_VALID_TEXTURE_UNIT, - EXTRA_FLUSH_CURRENT, -}; - -#define NO_EXTRA NULL -#define NO_OFFSET 0 - -struct value_desc { - GLenum pname; - GLubyte location; /**< enum value_location */ - GLubyte type; /**< enum value_type */ - int offset; - const int *extra; -}; - -union value { - GLfloat value_float; - GLfloat value_float_4[4]; - GLmatrix *value_matrix; - GLint value_int; - GLint value_int_4[4]; - GLint64 value_int64; - GLenum value_enum; - - /* Sigh, see GL_COMPRESSED_TEXTURE_FORMATS_ARB handling */ - struct { - GLint n, ints[100]; - } value_int_n; - GLboolean value_bool; -}; - -#define BUFFER_FIELD(field, type) \ - LOC_BUFFER, type, offsetof(struct gl_framebuffer, field) -#define CONTEXT_FIELD(field, type) \ - LOC_CONTEXT, type, offsetof(struct gl_context, field) -#define ARRAY_FIELD(field, type) \ - LOC_ARRAY, type, offsetof(struct gl_array_object, field) -#define CONST(value) \ - LOC_CONTEXT, TYPE_CONST, value - -#define BUFFER_INT(field) BUFFER_FIELD(field, TYPE_INT) -#define BUFFER_ENUM(field) BUFFER_FIELD(field, TYPE_ENUM) -#define BUFFER_BOOL(field) BUFFER_FIELD(field, TYPE_BOOLEAN) - -#define CONTEXT_INT(field) CONTEXT_FIELD(field, TYPE_INT) -#define CONTEXT_INT2(field) CONTEXT_FIELD(field, TYPE_INT_2) -#define CONTEXT_INT64(field) CONTEXT_FIELD(field, TYPE_INT64) -#define CONTEXT_ENUM(field) CONTEXT_FIELD(field, TYPE_ENUM) -#define CONTEXT_ENUM2(field) CONTEXT_FIELD(field, TYPE_ENUM_2) -#define CONTEXT_BOOL(field) CONTEXT_FIELD(field, TYPE_BOOLEAN) -#define CONTEXT_BIT0(field) CONTEXT_FIELD(field, TYPE_BIT_0) -#define CONTEXT_BIT1(field) CONTEXT_FIELD(field, TYPE_BIT_1) -#define CONTEXT_BIT2(field) CONTEXT_FIELD(field, TYPE_BIT_2) -#define CONTEXT_BIT3(field) CONTEXT_FIELD(field, TYPE_BIT_3) -#define CONTEXT_BIT4(field) CONTEXT_FIELD(field, TYPE_BIT_4) -#define CONTEXT_BIT5(field) CONTEXT_FIELD(field, TYPE_BIT_5) -#define CONTEXT_FLOAT(field) CONTEXT_FIELD(field, TYPE_FLOAT) -#define CONTEXT_FLOAT2(field) CONTEXT_FIELD(field, TYPE_FLOAT_2) -#define CONTEXT_FLOAT3(field) CONTEXT_FIELD(field, TYPE_FLOAT_3) -#define CONTEXT_FLOAT4(field) CONTEXT_FIELD(field, TYPE_FLOAT_4) -#define CONTEXT_MATRIX(field) CONTEXT_FIELD(field, TYPE_MATRIX) -#define CONTEXT_MATRIX_T(field) CONTEXT_FIELD(field, TYPE_MATRIX_T) - -#define ARRAY_INT(field) ARRAY_FIELD(field, TYPE_INT) -#define ARRAY_ENUM(field) ARRAY_FIELD(field, TYPE_ENUM) -#define ARRAY_BOOL(field) ARRAY_FIELD(field, TYPE_BOOLEAN) - -#define EXT(f) \ - offsetof(struct gl_extensions, f) - -#define EXTRA_EXT(e) \ - static const int extra_##e[] = { \ - EXT(e), EXTRA_END \ - } - -#define EXTRA_EXT2(e1, e2) \ - static const int extra_##e1##_##e2[] = { \ - EXT(e1), EXT(e2), EXTRA_END \ - } - -/* The 'extra' mechanism is a way to specify extra checks (such as - * extensions or specific gl versions) or actions (flush current, new - * buffers) that we need to do before looking up an enum. We need to - * declare them all up front so we can refer to them in the value_desc - * structs below. */ - -static const int extra_new_buffers[] = { - EXTRA_NEW_BUFFERS, - EXTRA_END -}; - -static const int extra_new_frag_clamp[] = { - EXTRA_NEW_FRAG_CLAMP, - EXTRA_END -}; - -static const int extra_valid_draw_buffer[] = { - EXTRA_VALID_DRAW_BUFFER, - EXTRA_END -}; - -static const int extra_valid_texture_unit[] = { - EXTRA_VALID_TEXTURE_UNIT, - EXTRA_END -}; - -static const int extra_flush_current_valid_texture_unit[] = { - EXTRA_FLUSH_CURRENT, - EXTRA_VALID_TEXTURE_UNIT, - EXTRA_END -}; - -static const int extra_flush_current[] = { - EXTRA_FLUSH_CURRENT, - EXTRA_END -}; - -static const int extra_new_buffers_OES_read_format[] = { - EXTRA_NEW_BUFFERS, - EXT(OES_read_format), - EXTRA_END -}; - -static const int extra_EXT_secondary_color_flush_current[] = { - EXT(EXT_secondary_color), - EXTRA_FLUSH_CURRENT, - EXTRA_END -}; - -static const int extra_EXT_fog_coord_flush_current[] = { - EXT(EXT_fog_coord), - EXTRA_FLUSH_CURRENT, - EXTRA_END -}; - -static const int extra_EXT_texture_integer[] = { - EXT(EXT_texture_integer), - EXTRA_END -}; - -static const int extra_EXT_gpu_shader4[] = { - EXT(EXT_gpu_shader4), - EXTRA_END -}; - - -EXTRA_EXT(ARB_ES2_compatibility); -EXTRA_EXT(ARB_multitexture); -EXTRA_EXT(ARB_texture_cube_map); -EXTRA_EXT(MESA_texture_array); -EXTRA_EXT2(EXT_secondary_color, ARB_vertex_program); -EXTRA_EXT(EXT_secondary_color); -EXTRA_EXT(EXT_fog_coord); -EXTRA_EXT(EXT_texture_lod_bias); -EXTRA_EXT(EXT_texture_filter_anisotropic); -EXTRA_EXT(IBM_rasterpos_clip); -EXTRA_EXT(NV_point_sprite); -EXTRA_EXT(SGIS_generate_mipmap); -EXTRA_EXT(NV_vertex_program); -EXTRA_EXT(NV_fragment_program); -EXTRA_EXT(NV_texture_rectangle); -EXTRA_EXT(EXT_stencil_two_side); -EXTRA_EXT(NV_light_max_exponent); -EXTRA_EXT(EXT_depth_bounds_test); -EXTRA_EXT(ARB_depth_clamp); -EXTRA_EXT(ATI_fragment_shader); -EXTRA_EXT(EXT_framebuffer_blit); -EXTRA_EXT(ARB_shader_objects); -EXTRA_EXT(EXT_provoking_vertex); -EXTRA_EXT(ARB_fragment_shader); -EXTRA_EXT(ARB_fragment_program); -EXTRA_EXT2(ARB_framebuffer_object, EXT_framebuffer_multisample); -EXTRA_EXT(EXT_framebuffer_object); -EXTRA_EXT(APPLE_vertex_array_object); -EXTRA_EXT(ARB_seamless_cube_map); -EXTRA_EXT(EXT_compiled_vertex_array); -EXTRA_EXT(ARB_sync); -EXTRA_EXT(ARB_vertex_shader); -EXTRA_EXT(EXT_transform_feedback); -EXTRA_EXT(ARB_transform_feedback2); -EXTRA_EXT(EXT_pixel_buffer_object); -EXTRA_EXT(ARB_vertex_program); -EXTRA_EXT2(NV_point_sprite, ARB_point_sprite); -EXTRA_EXT2(ARB_fragment_program, NV_fragment_program); -EXTRA_EXT2(ARB_vertex_program, NV_vertex_program); -EXTRA_EXT2(ARB_vertex_program, ARB_fragment_program); -EXTRA_EXT(ARB_vertex_buffer_object); -EXTRA_EXT(ARB_geometry_shader4); -EXTRA_EXT(ARB_copy_buffer); -EXTRA_EXT(EXT_framebuffer_sRGB); - -static const int -extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = { - EXT(ARB_vertex_program), - EXT(ARB_fragment_program), - EXT(NV_vertex_program), - EXTRA_END -}; - -static const int -extra_NV_vertex_program_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = { - EXT(NV_vertex_program), - EXT(ARB_vertex_program), - EXT(ARB_fragment_program), - EXT(NV_vertex_program), - EXTRA_END -}; - -static const int -extra_NV_primitive_restart[] = { - EXT(NV_primitive_restart), - EXTRA_END -}; - -static const int extra_version_30[] = { EXTRA_VERSION_30, EXTRA_END }; -static const int extra_version_31[] = { EXTRA_VERSION_31, EXTRA_END }; -static const int extra_version_32[] = { EXTRA_VERSION_32, EXTRA_END }; - -static const int -extra_ARB_vertex_program_version_es2[] = { - EXT(ARB_vertex_program), - EXTRA_VERSION_ES2, - EXTRA_END -}; - -#define API_OPENGL_BIT (1 << API_OPENGL) -#define API_OPENGLES_BIT (1 << API_OPENGLES) -#define API_OPENGLES2_BIT (1 << API_OPENGLES2) - -/* This is the big table describing all the enums we accept in - * glGet*v(). The table is partitioned into six parts: enums - * understood by all GL APIs (OpenGL, GLES and GLES2), enums shared - * between OpenGL and GLES, enums exclusive to GLES, etc for the - * remaining combinations. When we add the enums to the hash table in - * _mesa_init_get_hash(), we only add the enums for the API we're - * instantiating and the different sections are guarded by #if - * FEATURE_GL etc to make sure we only compile in the enums we may - * need. */ - -static const struct value_desc values[] = { - /* Enums shared between OpenGL, GLES1 and GLES2 */ - { 0, 0, TYPE_API_MASK, - API_OPENGL_BIT | API_OPENGLES_BIT | API_OPENGLES2_BIT, NO_EXTRA}, - { GL_ALPHA_BITS, BUFFER_INT(Visual.alphaBits), extra_new_buffers }, - { GL_BLEND, CONTEXT_BIT0(Color.BlendEnabled), NO_EXTRA }, - { GL_BLEND_SRC, CONTEXT_ENUM(Color.Blend[0].SrcRGB), NO_EXTRA }, - { GL_BLUE_BITS, BUFFER_INT(Visual.blueBits), extra_new_buffers }, - { GL_COLOR_CLEAR_VALUE, LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp }, - { GL_COLOR_WRITEMASK, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA }, - { GL_CULL_FACE, CONTEXT_BOOL(Polygon.CullFlag), NO_EXTRA }, - { GL_CULL_FACE_MODE, CONTEXT_ENUM(Polygon.CullFaceMode), NO_EXTRA }, - { GL_DEPTH_BITS, BUFFER_INT(Visual.depthBits), NO_EXTRA }, - { GL_DEPTH_CLEAR_VALUE, CONTEXT_FIELD(Depth.Clear, TYPE_DOUBLEN), NO_EXTRA }, - { GL_DEPTH_FUNC, CONTEXT_ENUM(Depth.Func), NO_EXTRA }, - { GL_DEPTH_RANGE, CONTEXT_FIELD(Viewport.Near, TYPE_FLOATN_2), NO_EXTRA }, - { GL_DEPTH_TEST, CONTEXT_BOOL(Depth.Test), NO_EXTRA }, - { GL_DEPTH_WRITEMASK, CONTEXT_BOOL(Depth.Mask), NO_EXTRA }, - { GL_DITHER, CONTEXT_BOOL(Color.DitherFlag), NO_EXTRA }, - { GL_FRONT_FACE, CONTEXT_ENUM(Polygon.FrontFace), NO_EXTRA }, - { GL_GREEN_BITS, BUFFER_INT(Visual.greenBits), extra_new_buffers }, - { GL_LINE_WIDTH, CONTEXT_FLOAT(Line.Width), NO_EXTRA }, - { GL_ALIASED_LINE_WIDTH_RANGE, CONTEXT_FLOAT2(Const.MinLineWidth), NO_EXTRA }, - { GL_MAX_ELEMENTS_VERTICES, CONTEXT_INT(Const.MaxArrayLockSize), NO_EXTRA }, - { GL_MAX_ELEMENTS_INDICES, CONTEXT_INT(Const.MaxArrayLockSize), NO_EXTRA }, - { GL_MAX_TEXTURE_SIZE, LOC_CUSTOM, TYPE_INT, - offsetof(struct gl_context, Const.MaxTextureLevels), NO_EXTRA }, - { GL_MAX_VIEWPORT_DIMS, CONTEXT_INT2(Const.MaxViewportWidth), NO_EXTRA }, - { GL_PACK_ALIGNMENT, CONTEXT_INT(Pack.Alignment), NO_EXTRA }, - { GL_ALIASED_POINT_SIZE_RANGE, CONTEXT_FLOAT2(Const.MinPointSize), NO_EXTRA }, - { GL_POLYGON_OFFSET_FACTOR, CONTEXT_FLOAT(Polygon.OffsetFactor ), NO_EXTRA }, - { GL_POLYGON_OFFSET_UNITS, CONTEXT_FLOAT(Polygon.OffsetUnits ), NO_EXTRA }, - { GL_POLYGON_OFFSET_FILL, CONTEXT_BOOL(Polygon.OffsetFill), NO_EXTRA }, - { GL_RED_BITS, BUFFER_INT(Visual.redBits), extra_new_buffers }, - { GL_SCISSOR_BOX, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA }, - { GL_SCISSOR_TEST, CONTEXT_BOOL(Scissor.Enabled), NO_EXTRA }, - { GL_STENCIL_BITS, BUFFER_INT(Visual.stencilBits), NO_EXTRA }, - { GL_STENCIL_CLEAR_VALUE, CONTEXT_INT(Stencil.Clear), NO_EXTRA }, - { GL_STENCIL_FAIL, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA }, - { GL_STENCIL_FUNC, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA }, - { GL_STENCIL_PASS_DEPTH_FAIL, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA }, - { GL_STENCIL_PASS_DEPTH_PASS, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA }, - { GL_STENCIL_REF, LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA }, - { GL_STENCIL_TEST, CONTEXT_BOOL(Stencil.Enabled), NO_EXTRA }, - { GL_STENCIL_VALUE_MASK, LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA }, - { GL_STENCIL_WRITEMASK, LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA }, - { GL_SUBPIXEL_BITS, CONTEXT_INT(Const.SubPixelBits), NO_EXTRA }, - { GL_TEXTURE_BINDING_2D, LOC_CUSTOM, TYPE_INT, TEXTURE_2D_INDEX, NO_EXTRA }, - { GL_UNPACK_ALIGNMENT, CONTEXT_INT(Unpack.Alignment), NO_EXTRA }, - { GL_VIEWPORT, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA }, - - /* GL_ARB_multitexture */ - { GL_ACTIVE_TEXTURE_ARB, - LOC_CUSTOM, TYPE_INT, 0, extra_ARB_multitexture }, - - /* Note that all the OES_* extensions require that the Mesa "struct - * gl_extensions" include a member with the name of the extension. - * That structure does not yet include OES extensions (and we're - * not sure whether it will). If it does, all the OES_* - * extensions below should mark the dependency. */ - - /* GL_ARB_texture_cube_map */ - { GL_TEXTURE_BINDING_CUBE_MAP_ARB, LOC_CUSTOM, TYPE_INT, - TEXTURE_CUBE_INDEX, extra_ARB_texture_cube_map }, - { GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB, LOC_CUSTOM, TYPE_INT, - offsetof(struct gl_context, Const.MaxCubeTextureLevels), - extra_ARB_texture_cube_map }, /* XXX: OES_texture_cube_map */ - - /* XXX: OES_blend_subtract */ - { GL_BLEND_SRC_RGB_EXT, CONTEXT_ENUM(Color.Blend[0].SrcRGB), NO_EXTRA }, - { GL_BLEND_DST_RGB_EXT, CONTEXT_ENUM(Color.Blend[0].DstRGB), NO_EXTRA }, - { GL_BLEND_SRC_ALPHA_EXT, CONTEXT_ENUM(Color.Blend[0].SrcA), NO_EXTRA }, - { GL_BLEND_DST_ALPHA_EXT, CONTEXT_ENUM(Color.Blend[0].DstA), NO_EXTRA }, - - /* GL_BLEND_EQUATION_RGB, which is what we're really after, is - * defined identically to GL_BLEND_EQUATION. */ - { GL_BLEND_EQUATION, CONTEXT_ENUM(Color.Blend[0].EquationRGB), NO_EXTRA }, - { GL_BLEND_EQUATION_ALPHA_EXT, CONTEXT_ENUM(Color.Blend[0].EquationA), NO_EXTRA }, - - /* GL_ARB_texture_compression */ - { GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA }, - { GL_COMPRESSED_TEXTURE_FORMATS_ARB, LOC_CUSTOM, TYPE_INT_N, 0, NO_EXTRA }, - - /* GL_ARB_multisample */ - { GL_SAMPLE_ALPHA_TO_COVERAGE_ARB, - CONTEXT_BOOL(Multisample.SampleAlphaToCoverage), NO_EXTRA }, - { GL_SAMPLE_COVERAGE_ARB, CONTEXT_BOOL(Multisample.SampleCoverage), NO_EXTRA }, - { GL_SAMPLE_COVERAGE_VALUE_ARB, - CONTEXT_FLOAT(Multisample.SampleCoverageValue), NO_EXTRA }, - { GL_SAMPLE_COVERAGE_INVERT_ARB, - CONTEXT_BOOL(Multisample.SampleCoverageInvert), NO_EXTRA }, - { GL_SAMPLE_BUFFERS_ARB, BUFFER_INT(Visual.sampleBuffers), NO_EXTRA }, - { GL_SAMPLES_ARB, BUFFER_INT(Visual.samples), NO_EXTRA }, - - /* GL_SGIS_generate_mipmap */ - { GL_GENERATE_MIPMAP_HINT_SGIS, CONTEXT_ENUM(Hint.GenerateMipmap), - extra_SGIS_generate_mipmap }, - - /* GL_ARB_vertex_buffer_object */ - { GL_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA }, - - /* GL_ARB_vertex_buffer_object */ - /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB - not supported */ - { GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_vertex_buffer_object }, - - /* GL_ARB_copy_buffer */ - { GL_COPY_READ_BUFFER, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_copy_buffer }, - { GL_COPY_WRITE_BUFFER, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_copy_buffer }, - - /* GL_OES_read_format */ - { GL_IMPLEMENTATION_COLOR_READ_TYPE_OES, LOC_CUSTOM, TYPE_INT, 0, - extra_new_buffers_OES_read_format }, - { GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES, LOC_CUSTOM, TYPE_INT, 0, - extra_new_buffers_OES_read_format }, - - /* GL_EXT_framebuffer_object */ - { GL_FRAMEBUFFER_BINDING_EXT, BUFFER_INT(Name), - extra_EXT_framebuffer_object }, - { GL_RENDERBUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0, - extra_EXT_framebuffer_object }, - { GL_MAX_RENDERBUFFER_SIZE_EXT, CONTEXT_INT(Const.MaxRenderbufferSize), - extra_EXT_framebuffer_object }, - - /* This entry isn't spec'ed for GLES 2, but is needed for Mesa's - * GLSL: */ - { GL_MAX_CLIP_PLANES, CONTEXT_INT(Const.MaxClipPlanes), NO_EXTRA }, - -#if FEATURE_GL || FEATURE_ES1 - /* Enums in OpenGL and GLES1 */ - { 0, 0, TYPE_API_MASK, API_OPENGL_BIT | API_OPENGLES_BIT, NO_EXTRA }, - { GL_LIGHT0, CONTEXT_BOOL(Light.Light[0].Enabled), NO_EXTRA }, - { GL_LIGHT1, CONTEXT_BOOL(Light.Light[1].Enabled), NO_EXTRA }, - { GL_LIGHT2, CONTEXT_BOOL(Light.Light[2].Enabled), NO_EXTRA }, - { GL_LIGHT3, CONTEXT_BOOL(Light.Light[3].Enabled), NO_EXTRA }, - { GL_LIGHT4, CONTEXT_BOOL(Light.Light[4].Enabled), NO_EXTRA }, - { GL_LIGHT5, CONTEXT_BOOL(Light.Light[5].Enabled), NO_EXTRA }, - { GL_LIGHT6, CONTEXT_BOOL(Light.Light[6].Enabled), NO_EXTRA }, - { GL_LIGHT7, CONTEXT_BOOL(Light.Light[7].Enabled), NO_EXTRA }, - { GL_LIGHTING, CONTEXT_BOOL(Light.Enabled), NO_EXTRA }, - { GL_LIGHT_MODEL_AMBIENT, - CONTEXT_FIELD(Light.Model.Ambient[0], TYPE_FLOATN_4), NO_EXTRA }, - { GL_LIGHT_MODEL_TWO_SIDE, CONTEXT_BOOL(Light.Model.TwoSide), NO_EXTRA }, - { GL_ALPHA_TEST, CONTEXT_BOOL(Color.AlphaEnabled), NO_EXTRA }, - { GL_ALPHA_TEST_FUNC, CONTEXT_ENUM(Color.AlphaFunc), NO_EXTRA }, - { GL_ALPHA_TEST_REF, LOC_CUSTOM, TYPE_FLOATN, 0, extra_new_frag_clamp }, - { GL_BLEND_DST, CONTEXT_ENUM(Color.Blend[0].DstRGB), NO_EXTRA }, - { GL_CLIP_PLANE0, CONTEXT_BIT0(Transform.ClipPlanesEnabled), NO_EXTRA }, - { GL_CLIP_PLANE1, CONTEXT_BIT1(Transform.ClipPlanesEnabled), NO_EXTRA }, - { GL_CLIP_PLANE2, CONTEXT_BIT2(Transform.ClipPlanesEnabled), NO_EXTRA }, - { GL_CLIP_PLANE3, CONTEXT_BIT3(Transform.ClipPlanesEnabled), NO_EXTRA }, - { GL_CLIP_PLANE4, CONTEXT_BIT4(Transform.ClipPlanesEnabled), NO_EXTRA }, - { GL_CLIP_PLANE5, CONTEXT_BIT5(Transform.ClipPlanesEnabled), NO_EXTRA }, - { GL_COLOR_MATERIAL, CONTEXT_BOOL(Light.ColorMaterialEnabled), NO_EXTRA }, - { GL_CURRENT_COLOR, - CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_COLOR0][0], TYPE_FLOATN_4), - extra_flush_current }, - { GL_CURRENT_NORMAL, - CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_NORMAL][0], TYPE_FLOATN_3), - extra_flush_current }, - { GL_CURRENT_TEXTURE_COORDS, LOC_CUSTOM, TYPE_FLOAT_4, 0, - extra_flush_current_valid_texture_unit }, - { GL_DISTANCE_ATTENUATION_EXT, CONTEXT_FLOAT3(Point.Params[0]), NO_EXTRA }, - { GL_FOG, CONTEXT_BOOL(Fog.Enabled), NO_EXTRA }, - { GL_FOG_COLOR, LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp }, - { GL_FOG_DENSITY, CONTEXT_FLOAT(Fog.Density), NO_EXTRA }, - { GL_FOG_END, CONTEXT_FLOAT(Fog.End), NO_EXTRA }, - { GL_FOG_HINT, CONTEXT_ENUM(Hint.Fog), NO_EXTRA }, - { GL_FOG_MODE, CONTEXT_ENUM(Fog.Mode), NO_EXTRA }, - { GL_FOG_START, CONTEXT_FLOAT(Fog.Start), NO_EXTRA }, - { GL_LINE_SMOOTH, CONTEXT_BOOL(Line.SmoothFlag), NO_EXTRA }, - { GL_LINE_SMOOTH_HINT, CONTEXT_ENUM(Hint.LineSmooth), NO_EXTRA }, - { GL_LINE_WIDTH_RANGE, CONTEXT_FLOAT2(Const.MinLineWidthAA), NO_EXTRA }, - { GL_COLOR_LOGIC_OP, CONTEXT_BOOL(Color.ColorLogicOpEnabled), NO_EXTRA }, - { GL_LOGIC_OP_MODE, CONTEXT_ENUM(Color.LogicOp), NO_EXTRA }, - { GL_MATRIX_MODE, CONTEXT_ENUM(Transform.MatrixMode), NO_EXTRA }, - { GL_MAX_MODELVIEW_STACK_DEPTH, CONST(MAX_MODELVIEW_STACK_DEPTH), NO_EXTRA }, - { GL_MAX_PROJECTION_STACK_DEPTH, CONST(MAX_PROJECTION_STACK_DEPTH), NO_EXTRA }, - { GL_MAX_TEXTURE_STACK_DEPTH, CONST(MAX_TEXTURE_STACK_DEPTH), NO_EXTRA }, - { GL_MODELVIEW_MATRIX, CONTEXT_MATRIX(ModelviewMatrixStack.Top), NO_EXTRA }, - { GL_MODELVIEW_STACK_DEPTH, LOC_CUSTOM, TYPE_INT, - offsetof(struct gl_context, ModelviewMatrixStack.Depth), NO_EXTRA }, - { GL_NORMALIZE, CONTEXT_BOOL(Transform.Normalize), NO_EXTRA }, - { GL_PACK_SKIP_IMAGES_EXT, CONTEXT_INT(Pack.SkipImages), NO_EXTRA }, - { GL_PERSPECTIVE_CORRECTION_HINT, CONTEXT_ENUM(Hint.PerspectiveCorrection), NO_EXTRA }, - { GL_POINT_SIZE, CONTEXT_FLOAT(Point.Size), NO_EXTRA }, - { GL_POINT_SIZE_RANGE, CONTEXT_FLOAT2(Const.MinPointSizeAA), NO_EXTRA }, - { GL_POINT_SMOOTH, CONTEXT_BOOL(Point.SmoothFlag), NO_EXTRA }, - { GL_POINT_SMOOTH_HINT, CONTEXT_ENUM(Hint.PointSmooth), NO_EXTRA }, - { GL_POINT_SIZE_MIN_EXT, CONTEXT_FLOAT(Point.MinSize), NO_EXTRA }, - { GL_POINT_SIZE_MAX_EXT, CONTEXT_FLOAT(Point.MaxSize), NO_EXTRA }, - { GL_POINT_FADE_THRESHOLD_SIZE_EXT, CONTEXT_FLOAT(Point.Threshold), NO_EXTRA }, - { GL_PROJECTION_MATRIX, CONTEXT_MATRIX(ProjectionMatrixStack.Top), NO_EXTRA }, - { GL_PROJECTION_STACK_DEPTH, LOC_CUSTOM, TYPE_INT, - offsetof(struct gl_context, ProjectionMatrixStack.Depth), NO_EXTRA }, - { GL_RESCALE_NORMAL, CONTEXT_BOOL(Transform.RescaleNormals), NO_EXTRA }, - { GL_SHADE_MODEL, CONTEXT_ENUM(Light.ShadeModel), NO_EXTRA }, - { GL_TEXTURE_2D, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA }, - { GL_TEXTURE_MATRIX, LOC_CUSTOM, TYPE_MATRIX, 0, extra_valid_texture_unit }, - { GL_TEXTURE_STACK_DEPTH, LOC_CUSTOM, TYPE_INT, 0, - extra_valid_texture_unit }, - - { GL_VERTEX_ARRAY, ARRAY_BOOL(Vertex.Enabled), NO_EXTRA }, - { GL_VERTEX_ARRAY_SIZE, ARRAY_INT(Vertex.Size), NO_EXTRA }, - { GL_VERTEX_ARRAY_TYPE, ARRAY_ENUM(Vertex.Type), NO_EXTRA }, - { GL_VERTEX_ARRAY_STRIDE, ARRAY_INT(Vertex.Stride), NO_EXTRA }, - { GL_NORMAL_ARRAY, ARRAY_BOOL(Normal.Enabled), NO_EXTRA }, - { GL_NORMAL_ARRAY_TYPE, ARRAY_ENUM(Normal.Type), NO_EXTRA }, - { GL_NORMAL_ARRAY_STRIDE, ARRAY_INT(Normal.Stride), NO_EXTRA }, - { GL_COLOR_ARRAY, ARRAY_BOOL(Color.Enabled), NO_EXTRA }, - { GL_COLOR_ARRAY_SIZE, ARRAY_INT(Color.Size), NO_EXTRA }, - { GL_COLOR_ARRAY_TYPE, ARRAY_ENUM(Color.Type), NO_EXTRA }, - { GL_COLOR_ARRAY_STRIDE, ARRAY_INT(Color.Stride), NO_EXTRA }, - { GL_TEXTURE_COORD_ARRAY, - LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_client_array, Enabled), NO_EXTRA }, - { GL_TEXTURE_COORD_ARRAY_SIZE, - LOC_CUSTOM, TYPE_INT, offsetof(struct gl_client_array, Size), NO_EXTRA }, - { GL_TEXTURE_COORD_ARRAY_TYPE, - LOC_CUSTOM, TYPE_ENUM, offsetof(struct gl_client_array, Type), NO_EXTRA }, - { GL_TEXTURE_COORD_ARRAY_STRIDE, - LOC_CUSTOM, TYPE_INT, offsetof(struct gl_client_array, Stride), NO_EXTRA }, - - /* GL_ARB_ES2_compatibility */ - { GL_SHADER_COMPILER, CONST(1), extra_ARB_ES2_compatibility }, - { GL_MAX_VARYING_VECTORS, CONTEXT_INT(Const.MaxVarying), - extra_ARB_ES2_compatibility }, - { GL_MAX_VERTEX_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_ES2_compatibility }, - { GL_MAX_FRAGMENT_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_ES2_compatibility }, - - /* GL_ARB_multitexture */ - { GL_MAX_TEXTURE_UNITS_ARB, - CONTEXT_INT(Const.MaxTextureUnits), extra_ARB_multitexture }, - { GL_CLIENT_ACTIVE_TEXTURE_ARB, - LOC_CUSTOM, TYPE_INT, 0, extra_ARB_multitexture }, - - /* GL_ARB_texture_cube_map */ - { GL_TEXTURE_CUBE_MAP_ARB, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA }, - /* S, T, and R are always set at the same time */ - { GL_TEXTURE_GEN_STR_OES, LOC_TEXUNIT, TYPE_BIT_0, - offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA }, - - /* GL_ARB_multisample */ - { GL_MULTISAMPLE_ARB, CONTEXT_BOOL(Multisample.Enabled), NO_EXTRA }, - { GL_SAMPLE_ALPHA_TO_ONE_ARB, CONTEXT_BOOL(Multisample.SampleAlphaToOne), NO_EXTRA }, - - /* GL_ARB_vertex_buffer_object */ - { GL_VERTEX_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, - offsetof(struct gl_array_object, Vertex.BufferObj), NO_EXTRA }, - { GL_NORMAL_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, - offsetof(struct gl_array_object, Normal.BufferObj), NO_EXTRA }, - { GL_COLOR_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, - offsetof(struct gl_array_object, Color.BufferObj), NO_EXTRA }, - { GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA }, - - /* GL_OES_point_sprite */ - { GL_POINT_SPRITE_NV, - CONTEXT_BOOL(Point.PointSprite), - extra_NV_point_sprite_ARB_point_sprite }, - - /* GL_ARB_fragment_shader */ - { GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB, - CONTEXT_INT(Const.FragmentProgram.MaxUniformComponents), - extra_ARB_fragment_shader }, - - /* GL_ARB_vertex_shader */ - { GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB, - CONTEXT_INT(Const.VertexProgram.MaxUniformComponents), - extra_ARB_vertex_shader }, - { GL_MAX_VARYING_FLOATS_ARB, LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_vertex_shader }, - - /* GL_EXT_texture_lod_bias */ - { GL_MAX_TEXTURE_LOD_BIAS_EXT, CONTEXT_FLOAT(Const.MaxTextureLodBias), - extra_EXT_texture_lod_bias }, - - /* GL_EXT_texture_filter_anisotropic */ - { GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, - CONTEXT_FLOAT(Const.MaxTextureMaxAnisotropy), - extra_EXT_texture_filter_anisotropic }, -#endif /* FEATURE_GL || FEATURE_ES1 */ - -#if FEATURE_ES1 - { 0, 0, TYPE_API_MASK, API_OPENGLES_BIT }, - /* XXX: OES_matrix_get */ - { GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES }, - { GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES }, - { GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES }, - - /* OES_point_size_array */ - { GL_POINT_SIZE_ARRAY_OES, ARRAY_FIELD(PointSize.Enabled, TYPE_BOOLEAN) }, - { GL_POINT_SIZE_ARRAY_TYPE_OES, ARRAY_FIELD(PointSize.Type, TYPE_ENUM) }, - { GL_POINT_SIZE_ARRAY_STRIDE_OES, ARRAY_FIELD(PointSize.Stride, TYPE_INT) }, - { GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES, LOC_CUSTOM, TYPE_INT, 0 }, -#endif /* FEATURE_ES1 */ - -#if FEATURE_GL || FEATURE_ES2 - { 0, 0, TYPE_API_MASK, API_OPENGL_BIT | API_OPENGLES2_BIT, NO_EXTRA }, - /* This entry isn't spec'ed for GLES 2, but is needed for Mesa's GLSL: */ - { GL_MAX_LIGHTS, CONTEXT_INT(Const.MaxLights), NO_EXTRA }, - { GL_MAX_TEXTURE_COORDS_ARB, /* == GL_MAX_TEXTURE_COORDS_NV */ - CONTEXT_INT(Const.MaxTextureCoordUnits), - extra_ARB_fragment_program_NV_fragment_program }, - - /* GL_ARB_draw_buffers */ - { GL_MAX_DRAW_BUFFERS_ARB, CONTEXT_INT(Const.MaxDrawBuffers), NO_EXTRA }, - - { GL_BLEND_COLOR_EXT, LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp }, - /* GL_ARB_fragment_program */ - { GL_MAX_TEXTURE_IMAGE_UNITS_ARB, /* == GL_MAX_TEXTURE_IMAGE_UNITS_NV */ - CONTEXT_INT(Const.MaxTextureImageUnits), - extra_ARB_fragment_program_NV_fragment_program }, - { GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB, - CONTEXT_INT(Const.MaxVertexTextureImageUnits), extra_ARB_vertex_shader }, - { GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB, - CONTEXT_INT(Const.MaxCombinedTextureImageUnits), - extra_ARB_vertex_shader }, - - /* GL_ARB_shader_objects - * Actually, this token isn't part of GL_ARB_shader_objects, but is - * close enough for now. */ - { GL_CURRENT_PROGRAM, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_shader_objects }, - - /* OpenGL 2.0 */ - { GL_STENCIL_BACK_FUNC, CONTEXT_ENUM(Stencil.Function[1]), NO_EXTRA }, - { GL_STENCIL_BACK_VALUE_MASK, CONTEXT_INT(Stencil.ValueMask[1]), NO_EXTRA }, - { GL_STENCIL_BACK_WRITEMASK, CONTEXT_INT(Stencil.WriteMask[1]), NO_EXTRA }, - { GL_STENCIL_BACK_REF, CONTEXT_INT(Stencil.Ref[1]), NO_EXTRA }, - { GL_STENCIL_BACK_FAIL, CONTEXT_ENUM(Stencil.FailFunc[1]), NO_EXTRA }, - { GL_STENCIL_BACK_PASS_DEPTH_FAIL, CONTEXT_ENUM(Stencil.ZFailFunc[1]), NO_EXTRA }, - { GL_STENCIL_BACK_PASS_DEPTH_PASS, CONTEXT_ENUM(Stencil.ZPassFunc[1]), NO_EXTRA }, - - { GL_MAX_VERTEX_ATTRIBS_ARB, - CONTEXT_INT(Const.VertexProgram.MaxAttribs), - extra_ARB_vertex_program_version_es2 }, - - /* OES_texture_3D */ - { GL_TEXTURE_BINDING_3D, LOC_CUSTOM, TYPE_INT, TEXTURE_3D_INDEX, NO_EXTRA }, - { GL_MAX_3D_TEXTURE_SIZE, LOC_CUSTOM, TYPE_INT, - offsetof(struct gl_context, Const.Max3DTextureLevels), NO_EXTRA }, - - /* GL_ARB_fragment_program/OES_standard_derivatives */ - { GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB, - CONTEXT_ENUM(Hint.FragmentShaderDerivative), extra_ARB_fragment_shader }, -#endif /* FEATURE_GL || FEATURE_ES2 */ - -#if FEATURE_ES2 - /* Enums unique to OpenGL ES 2.0 */ - { 0, 0, TYPE_API_MASK, API_OPENGLES2_BIT, NO_EXTRA }, - { GL_MAX_FRAGMENT_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA }, - { GL_MAX_VARYING_VECTORS, CONTEXT_INT(Const.MaxVarying), NO_EXTRA }, - { GL_MAX_VERTEX_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA }, - { GL_SHADER_COMPILER, CONST(1), NO_EXTRA }, - /* OES_get_program_binary */ - { GL_NUM_SHADER_BINARY_FORMATS, CONST(0), NO_EXTRA }, - { GL_SHADER_BINARY_FORMATS, CONST(0), NO_EXTRA }, -#endif /* FEATURE_ES2 */ - -#if FEATURE_GL - /* Remaining enums are only in OpenGL */ - { 0, 0, TYPE_API_MASK, API_OPENGL_BIT, NO_EXTRA }, - { GL_ACCUM_RED_BITS, BUFFER_INT(Visual.accumRedBits), NO_EXTRA }, - { GL_ACCUM_GREEN_BITS, BUFFER_INT(Visual.accumGreenBits), NO_EXTRA }, - { GL_ACCUM_BLUE_BITS, BUFFER_INT(Visual.accumBlueBits), NO_EXTRA }, - { GL_ACCUM_ALPHA_BITS, BUFFER_INT(Visual.accumAlphaBits), NO_EXTRA }, - { GL_ACCUM_CLEAR_VALUE, CONTEXT_FIELD(Accum.ClearColor[0], TYPE_FLOATN_4), NO_EXTRA }, - { GL_ALPHA_BIAS, CONTEXT_FLOAT(Pixel.AlphaBias), NO_EXTRA }, - { GL_ALPHA_SCALE, CONTEXT_FLOAT(Pixel.AlphaScale), NO_EXTRA }, - { GL_ATTRIB_STACK_DEPTH, CONTEXT_INT(AttribStackDepth), NO_EXTRA }, - { GL_AUTO_NORMAL, CONTEXT_BOOL(Eval.AutoNormal), NO_EXTRA }, - { GL_AUX_BUFFERS, BUFFER_INT(Visual.numAuxBuffers), NO_EXTRA }, - { GL_BLUE_BIAS, CONTEXT_FLOAT(Pixel.BlueBias), NO_EXTRA }, - { GL_BLUE_SCALE, CONTEXT_FLOAT(Pixel.BlueScale), NO_EXTRA }, - { GL_CLIENT_ATTRIB_STACK_DEPTH, CONTEXT_INT(ClientAttribStackDepth), NO_EXTRA }, - { GL_COLOR_MATERIAL_FACE, CONTEXT_ENUM(Light.ColorMaterialFace), NO_EXTRA }, - { GL_COLOR_MATERIAL_PARAMETER, CONTEXT_ENUM(Light.ColorMaterialMode), NO_EXTRA }, - { GL_CURRENT_INDEX, - CONTEXT_FLOAT(Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]), - extra_flush_current }, - { GL_CURRENT_RASTER_COLOR, - CONTEXT_FIELD(Current.RasterColor[0], TYPE_FLOATN_4), NO_EXTRA }, - { GL_CURRENT_RASTER_DISTANCE, CONTEXT_FLOAT(Current.RasterDistance), NO_EXTRA }, - { GL_CURRENT_RASTER_INDEX, CONST(1), NO_EXTRA }, - { GL_CURRENT_RASTER_POSITION, CONTEXT_FLOAT4(Current.RasterPos[0]), NO_EXTRA }, - { GL_CURRENT_RASTER_SECONDARY_COLOR, - CONTEXT_FIELD(Current.RasterSecondaryColor[0], TYPE_FLOATN_4), NO_EXTRA }, - { GL_CURRENT_RASTER_TEXTURE_COORDS, LOC_CUSTOM, TYPE_FLOAT_4, 0, - extra_valid_texture_unit }, - { GL_CURRENT_RASTER_POSITION_VALID, CONTEXT_BOOL(Current.RasterPosValid), NO_EXTRA }, - { GL_DEPTH_BIAS, CONTEXT_FLOAT(Pixel.DepthBias), NO_EXTRA }, - { GL_DEPTH_SCALE, CONTEXT_FLOAT(Pixel.DepthScale), NO_EXTRA }, - { GL_DOUBLEBUFFER, BUFFER_INT(Visual.doubleBufferMode), NO_EXTRA }, - { GL_DRAW_BUFFER, BUFFER_ENUM(ColorDrawBuffer[0]), NO_EXTRA }, - { GL_EDGE_FLAG, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA }, - { GL_FEEDBACK_BUFFER_SIZE, CONTEXT_INT(Feedback.BufferSize), NO_EXTRA }, - { GL_FEEDBACK_BUFFER_TYPE, CONTEXT_ENUM(Feedback.Type), NO_EXTRA }, - { GL_FOG_INDEX, CONTEXT_FLOAT(Fog.Index), NO_EXTRA }, - { GL_GREEN_BIAS, CONTEXT_FLOAT(Pixel.GreenBias), NO_EXTRA }, - { GL_GREEN_SCALE, CONTEXT_FLOAT(Pixel.GreenScale), NO_EXTRA }, - { GL_INDEX_BITS, BUFFER_INT(Visual.indexBits), extra_new_buffers }, - { GL_INDEX_CLEAR_VALUE, CONTEXT_INT(Color.ClearIndex), NO_EXTRA }, - { GL_INDEX_MODE, CONST(0) , NO_EXTRA}, - { GL_INDEX_OFFSET, CONTEXT_INT(Pixel.IndexOffset), NO_EXTRA }, - { GL_INDEX_SHIFT, CONTEXT_INT(Pixel.IndexShift), NO_EXTRA }, - { GL_INDEX_WRITEMASK, CONTEXT_INT(Color.IndexMask), NO_EXTRA }, - { GL_LIGHT_MODEL_COLOR_CONTROL, CONTEXT_ENUM(Light.Model.ColorControl), NO_EXTRA }, - { GL_LIGHT_MODEL_LOCAL_VIEWER, CONTEXT_BOOL(Light.Model.LocalViewer), NO_EXTRA }, - { GL_LINE_STIPPLE, CONTEXT_BOOL(Line.StippleFlag), NO_EXTRA }, - { GL_LINE_STIPPLE_PATTERN, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA }, - { GL_LINE_STIPPLE_REPEAT, CONTEXT_INT(Line.StippleFactor), NO_EXTRA }, - { GL_LINE_WIDTH_GRANULARITY, CONTEXT_FLOAT(Const.LineWidthGranularity), NO_EXTRA }, - { GL_LIST_BASE, CONTEXT_INT(List.ListBase), NO_EXTRA }, - { GL_LIST_INDEX, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA }, - { GL_LIST_MODE, LOC_CUSTOM, TYPE_ENUM, 0, NO_EXTRA }, - { GL_INDEX_LOGIC_OP, CONTEXT_BOOL(Color.IndexLogicOpEnabled), NO_EXTRA }, - { GL_MAP1_COLOR_4, CONTEXT_BOOL(Eval.Map1Color4), NO_EXTRA }, - { GL_MAP1_GRID_DOMAIN, CONTEXT_FLOAT2(Eval.MapGrid1u1), NO_EXTRA }, - { GL_MAP1_GRID_SEGMENTS, CONTEXT_INT(Eval.MapGrid1un), NO_EXTRA }, - { GL_MAP1_INDEX, CONTEXT_BOOL(Eval.Map1Index), NO_EXTRA }, - { GL_MAP1_NORMAL, CONTEXT_BOOL(Eval.Map1Normal), NO_EXTRA }, - { GL_MAP1_TEXTURE_COORD_1, CONTEXT_BOOL(Eval.Map1TextureCoord1), NO_EXTRA }, - { GL_MAP1_TEXTURE_COORD_2, CONTEXT_BOOL(Eval.Map1TextureCoord2), NO_EXTRA }, - { GL_MAP1_TEXTURE_COORD_3, CONTEXT_BOOL(Eval.Map1TextureCoord3), NO_EXTRA }, - { GL_MAP1_TEXTURE_COORD_4, CONTEXT_BOOL(Eval.Map1TextureCoord4), NO_EXTRA }, - { GL_MAP1_VERTEX_3, CONTEXT_BOOL(Eval.Map1Vertex3), NO_EXTRA }, - { GL_MAP1_VERTEX_4, CONTEXT_BOOL(Eval.Map1Vertex4), NO_EXTRA }, - { GL_MAP2_COLOR_4, CONTEXT_BOOL(Eval.Map2Color4), NO_EXTRA }, - { GL_MAP2_GRID_DOMAIN, LOC_CUSTOM, TYPE_FLOAT_4, 0, NO_EXTRA }, - { GL_MAP2_GRID_SEGMENTS, CONTEXT_INT2(Eval.MapGrid2un), NO_EXTRA }, - { GL_MAP2_INDEX, CONTEXT_BOOL(Eval.Map2Index), NO_EXTRA }, - { GL_MAP2_NORMAL, CONTEXT_BOOL(Eval.Map2Normal), NO_EXTRA }, - { GL_MAP2_TEXTURE_COORD_1, CONTEXT_BOOL(Eval.Map2TextureCoord1), NO_EXTRA }, - { GL_MAP2_TEXTURE_COORD_2, CONTEXT_BOOL(Eval.Map2TextureCoord2), NO_EXTRA }, - { GL_MAP2_TEXTURE_COORD_3, CONTEXT_BOOL(Eval.Map2TextureCoord3), NO_EXTRA }, - { GL_MAP2_TEXTURE_COORD_4, CONTEXT_BOOL(Eval.Map2TextureCoord4), NO_EXTRA }, - { GL_MAP2_VERTEX_3, CONTEXT_BOOL(Eval.Map2Vertex3), NO_EXTRA }, - { GL_MAP2_VERTEX_4, CONTEXT_BOOL(Eval.Map2Vertex4), NO_EXTRA }, - { GL_MAP_COLOR, CONTEXT_BOOL(Pixel.MapColorFlag), NO_EXTRA }, - { GL_MAP_STENCIL, CONTEXT_BOOL(Pixel.MapStencilFlag), NO_EXTRA }, - { GL_MAX_ATTRIB_STACK_DEPTH, CONST(MAX_ATTRIB_STACK_DEPTH), NO_EXTRA }, - { GL_MAX_CLIENT_ATTRIB_STACK_DEPTH, CONST(MAX_CLIENT_ATTRIB_STACK_DEPTH), NO_EXTRA }, - - { GL_MAX_EVAL_ORDER, CONST(MAX_EVAL_ORDER), NO_EXTRA }, - { GL_MAX_LIST_NESTING, CONST(MAX_LIST_NESTING), NO_EXTRA }, - { GL_MAX_NAME_STACK_DEPTH, CONST(MAX_NAME_STACK_DEPTH), NO_EXTRA }, - { GL_MAX_PIXEL_MAP_TABLE, CONST(MAX_PIXEL_MAP_TABLE), NO_EXTRA }, - { GL_NAME_STACK_DEPTH, CONTEXT_INT(Select.NameStackDepth), NO_EXTRA }, - { GL_PACK_LSB_FIRST, CONTEXT_BOOL(Pack.LsbFirst), NO_EXTRA }, - { GL_PACK_ROW_LENGTH, CONTEXT_INT(Pack.RowLength), NO_EXTRA }, - { GL_PACK_SKIP_PIXELS, CONTEXT_INT(Pack.SkipPixels), NO_EXTRA }, - { GL_PACK_SKIP_ROWS, CONTEXT_INT(Pack.SkipRows), NO_EXTRA }, - { GL_PACK_SWAP_BYTES, CONTEXT_BOOL(Pack.SwapBytes), NO_EXTRA }, - { GL_PACK_IMAGE_HEIGHT_EXT, CONTEXT_INT(Pack.ImageHeight), NO_EXTRA }, - { GL_PACK_INVERT_MESA, CONTEXT_BOOL(Pack.Invert), NO_EXTRA }, - { GL_PIXEL_MAP_A_TO_A_SIZE, CONTEXT_INT(PixelMaps.AtoA.Size), NO_EXTRA }, - { GL_PIXEL_MAP_B_TO_B_SIZE, CONTEXT_INT(PixelMaps.BtoB.Size), NO_EXTRA }, - { GL_PIXEL_MAP_G_TO_G_SIZE, CONTEXT_INT(PixelMaps.GtoG.Size), NO_EXTRA }, - { GL_PIXEL_MAP_I_TO_A_SIZE, CONTEXT_INT(PixelMaps.ItoA.Size), NO_EXTRA }, - { GL_PIXEL_MAP_I_TO_B_SIZE, CONTEXT_INT(PixelMaps.ItoB.Size), NO_EXTRA }, - { GL_PIXEL_MAP_I_TO_G_SIZE, CONTEXT_INT(PixelMaps.ItoG.Size), NO_EXTRA }, - { GL_PIXEL_MAP_I_TO_I_SIZE, CONTEXT_INT(PixelMaps.ItoI.Size), NO_EXTRA }, - { GL_PIXEL_MAP_I_TO_R_SIZE, CONTEXT_INT(PixelMaps.ItoR.Size), NO_EXTRA }, - { GL_PIXEL_MAP_R_TO_R_SIZE, CONTEXT_INT(PixelMaps.RtoR.Size), NO_EXTRA }, - { GL_PIXEL_MAP_S_TO_S_SIZE, CONTEXT_INT(PixelMaps.StoS.Size), NO_EXTRA }, - { GL_POINT_SIZE_GRANULARITY, CONTEXT_FLOAT(Const.PointSizeGranularity), NO_EXTRA }, - { GL_POLYGON_MODE, CONTEXT_ENUM2(Polygon.FrontMode), NO_EXTRA }, - { GL_POLYGON_OFFSET_BIAS_EXT, CONTEXT_FLOAT(Polygon.OffsetUnits), NO_EXTRA }, - { GL_POLYGON_OFFSET_POINT, CONTEXT_BOOL(Polygon.OffsetPoint), NO_EXTRA }, - { GL_POLYGON_OFFSET_LINE, CONTEXT_BOOL(Polygon.OffsetLine), NO_EXTRA }, - { GL_POLYGON_SMOOTH, CONTEXT_BOOL(Polygon.SmoothFlag), NO_EXTRA }, - { GL_POLYGON_SMOOTH_HINT, CONTEXT_ENUM(Hint.PolygonSmooth), NO_EXTRA }, - { GL_POLYGON_STIPPLE, CONTEXT_BOOL(Polygon.StippleFlag), NO_EXTRA }, - { GL_READ_BUFFER, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA }, - { GL_RED_BIAS, CONTEXT_FLOAT(Pixel.RedBias), NO_EXTRA }, - { GL_RED_SCALE, CONTEXT_FLOAT(Pixel.RedScale), NO_EXTRA }, - { GL_RENDER_MODE, CONTEXT_ENUM(RenderMode), NO_EXTRA }, - { GL_RGBA_MODE, CONST(1), NO_EXTRA }, - { GL_SELECTION_BUFFER_SIZE, CONTEXT_INT(Select.BufferSize), NO_EXTRA }, - { GL_SHARED_TEXTURE_PALETTE_EXT, CONTEXT_BOOL(Texture.SharedPalette), NO_EXTRA }, - - { GL_STEREO, BUFFER_INT(Visual.stereoMode), NO_EXTRA }, - - { GL_TEXTURE_1D, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA }, - { GL_TEXTURE_3D, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA }, - { GL_TEXTURE_1D_ARRAY_EXT, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA }, - { GL_TEXTURE_2D_ARRAY_EXT, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA }, - - { GL_TEXTURE_BINDING_1D, LOC_CUSTOM, TYPE_INT, TEXTURE_1D_INDEX, NO_EXTRA }, - { GL_TEXTURE_BINDING_1D_ARRAY, LOC_CUSTOM, TYPE_INT, - TEXTURE_1D_ARRAY_INDEX, extra_MESA_texture_array }, - { GL_TEXTURE_BINDING_2D_ARRAY, LOC_CUSTOM, TYPE_INT, - TEXTURE_1D_ARRAY_INDEX, extra_MESA_texture_array }, - { GL_MAX_ARRAY_TEXTURE_LAYERS_EXT, - CONTEXT_INT(Const.MaxArrayTextureLayers), extra_MESA_texture_array }, - - { GL_TEXTURE_GEN_S, LOC_TEXUNIT, TYPE_BIT_0, - offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA }, - { GL_TEXTURE_GEN_T, LOC_TEXUNIT, TYPE_BIT_1, - offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA }, - { GL_TEXTURE_GEN_R, LOC_TEXUNIT, TYPE_BIT_2, - offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA }, - { GL_TEXTURE_GEN_Q, LOC_TEXUNIT, TYPE_BIT_3, - offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA }, - { GL_UNPACK_LSB_FIRST, CONTEXT_BOOL(Unpack.LsbFirst), NO_EXTRA }, - { GL_UNPACK_ROW_LENGTH, CONTEXT_INT(Unpack.RowLength), NO_EXTRA }, - { GL_UNPACK_SKIP_PIXELS, CONTEXT_INT(Unpack.SkipPixels), NO_EXTRA }, - { GL_UNPACK_SKIP_ROWS, CONTEXT_INT(Unpack.SkipRows), NO_EXTRA }, - { GL_UNPACK_SWAP_BYTES, CONTEXT_BOOL(Unpack.SwapBytes), NO_EXTRA }, - { GL_UNPACK_SKIP_IMAGES_EXT, CONTEXT_INT(Unpack.SkipImages), NO_EXTRA }, - { GL_UNPACK_IMAGE_HEIGHT_EXT, CONTEXT_INT(Unpack.ImageHeight), NO_EXTRA }, - { GL_UNPACK_CLIENT_STORAGE_APPLE, CONTEXT_BOOL(Unpack.ClientStorage), NO_EXTRA }, - { GL_ZOOM_X, CONTEXT_FLOAT(Pixel.ZoomX), NO_EXTRA }, - { GL_ZOOM_Y, CONTEXT_FLOAT(Pixel.ZoomY), NO_EXTRA }, - - /* Vertex arrays */ - { GL_VERTEX_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA }, - { GL_NORMAL_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA }, - { GL_COLOR_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA }, - { GL_INDEX_ARRAY, ARRAY_BOOL(Index.Enabled), NO_EXTRA }, - { GL_INDEX_ARRAY_TYPE, ARRAY_ENUM(Index.Type), NO_EXTRA }, - { GL_INDEX_ARRAY_STRIDE, ARRAY_INT(Index.Stride), NO_EXTRA }, - { GL_INDEX_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA }, - { GL_TEXTURE_COORD_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA }, - { GL_EDGE_FLAG_ARRAY, ARRAY_BOOL(EdgeFlag.Enabled), NO_EXTRA }, - { GL_EDGE_FLAG_ARRAY_STRIDE, ARRAY_INT(EdgeFlag.Stride), NO_EXTRA }, - { GL_EDGE_FLAG_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA }, - - /* GL_ARB_texture_compression */ - { GL_TEXTURE_COMPRESSION_HINT_ARB, CONTEXT_INT(Hint.TextureCompression), NO_EXTRA }, - - /* GL_EXT_compiled_vertex_array */ - { GL_ARRAY_ELEMENT_LOCK_FIRST_EXT, CONTEXT_INT(Array.LockFirst), - extra_EXT_compiled_vertex_array }, - { GL_ARRAY_ELEMENT_LOCK_COUNT_EXT, CONTEXT_INT(Array.LockCount), - extra_EXT_compiled_vertex_array }, - - /* GL_ARB_transpose_matrix */ - { GL_TRANSPOSE_MODELVIEW_MATRIX_ARB, - CONTEXT_MATRIX_T(ModelviewMatrixStack), NO_EXTRA }, - { GL_TRANSPOSE_PROJECTION_MATRIX_ARB, - CONTEXT_MATRIX_T(ProjectionMatrixStack.Top), NO_EXTRA }, - { GL_TRANSPOSE_TEXTURE_MATRIX_ARB, CONTEXT_MATRIX_T(TextureMatrixStack), NO_EXTRA }, - - /* GL_EXT_secondary_color */ - { GL_COLOR_SUM_EXT, CONTEXT_BOOL(Fog.ColorSumEnabled), - extra_EXT_secondary_color_ARB_vertex_program }, - { GL_CURRENT_SECONDARY_COLOR_EXT, - CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_COLOR1][0], TYPE_FLOATN_4), - extra_EXT_secondary_color_flush_current }, - { GL_SECONDARY_COLOR_ARRAY_EXT, ARRAY_BOOL(SecondaryColor.Enabled), - extra_EXT_secondary_color }, - { GL_SECONDARY_COLOR_ARRAY_TYPE_EXT, ARRAY_ENUM(SecondaryColor.Type), - extra_EXT_secondary_color }, - { GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT, ARRAY_INT(SecondaryColor.Stride), - extra_EXT_secondary_color }, - { GL_SECONDARY_COLOR_ARRAY_SIZE_EXT, ARRAY_INT(SecondaryColor.Size), - extra_EXT_secondary_color }, - - /* GL_EXT_fog_coord */ - { GL_CURRENT_FOG_COORDINATE_EXT, - CONTEXT_FLOAT(Current.Attrib[VERT_ATTRIB_FOG][0]), - extra_EXT_fog_coord_flush_current }, - { GL_FOG_COORDINATE_ARRAY_EXT, ARRAY_BOOL(FogCoord.Enabled), - extra_EXT_fog_coord }, - { GL_FOG_COORDINATE_ARRAY_TYPE_EXT, ARRAY_ENUM(FogCoord.Type), - extra_EXT_fog_coord }, - { GL_FOG_COORDINATE_ARRAY_STRIDE_EXT, ARRAY_INT(FogCoord.Stride), - extra_EXT_fog_coord }, - { GL_FOG_COORDINATE_SOURCE_EXT, CONTEXT_ENUM(Fog.FogCoordinateSource), - extra_EXT_fog_coord }, - - /* GL_IBM_rasterpos_clip */ - { GL_RASTER_POSITION_UNCLIPPED_IBM, - CONTEXT_BOOL(Transform.RasterPositionUnclipped), - extra_IBM_rasterpos_clip }, - - /* GL_NV_point_sprite */ - { GL_POINT_SPRITE_R_MODE_NV, - CONTEXT_ENUM(Point.SpriteRMode), extra_NV_point_sprite }, - { GL_POINT_SPRITE_COORD_ORIGIN, CONTEXT_ENUM(Point.SpriteOrigin), - extra_NV_point_sprite_ARB_point_sprite }, - - /* GL_NV_vertex_program */ - { GL_VERTEX_PROGRAM_BINDING_NV, LOC_CUSTOM, TYPE_INT, 0, - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY0_NV, ARRAY_BOOL(VertexAttrib[0].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY1_NV, ARRAY_BOOL(VertexAttrib[1].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY2_NV, ARRAY_BOOL(VertexAttrib[2].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY3_NV, ARRAY_BOOL(VertexAttrib[3].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY4_NV, ARRAY_BOOL(VertexAttrib[4].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY5_NV, ARRAY_BOOL(VertexAttrib[5].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY6_NV, ARRAY_BOOL(VertexAttrib[6].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY7_NV, ARRAY_BOOL(VertexAttrib[7].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY8_NV, ARRAY_BOOL(VertexAttrib[8].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY9_NV, ARRAY_BOOL(VertexAttrib[9].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY10_NV, ARRAY_BOOL(VertexAttrib[10].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY11_NV, ARRAY_BOOL(VertexAttrib[11].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY12_NV, ARRAY_BOOL(VertexAttrib[12].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY13_NV, ARRAY_BOOL(VertexAttrib[13].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY14_NV, ARRAY_BOOL(VertexAttrib[14].Enabled), - extra_NV_vertex_program }, - { GL_VERTEX_ATTRIB_ARRAY15_NV, ARRAY_BOOL(VertexAttrib[15].Enabled), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB0_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[0]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB1_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[1]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB2_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[2]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB3_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[3]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB4_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[4]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB5_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[5]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB6_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[6]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB7_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[7]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB8_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[8]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB9_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[9]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB10_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[10]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB11_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[11]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB12_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[12]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB13_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[13]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB14_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[14]), - extra_NV_vertex_program }, - { GL_MAP1_VERTEX_ATTRIB15_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[15]), - extra_NV_vertex_program }, - - /* GL_NV_fragment_program */ - { GL_FRAGMENT_PROGRAM_NV, CONTEXT_BOOL(FragmentProgram.Enabled), - extra_NV_fragment_program }, - { GL_FRAGMENT_PROGRAM_BINDING_NV, LOC_CUSTOM, TYPE_INT, 0, - extra_NV_fragment_program }, - { GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV, - CONST(MAX_NV_FRAGMENT_PROGRAM_PARAMS), - extra_NV_fragment_program }, - - /* GL_NV_texture_rectangle */ - { GL_TEXTURE_RECTANGLE_NV, - LOC_CUSTOM, TYPE_BOOLEAN, 0, extra_NV_texture_rectangle }, - { GL_TEXTURE_BINDING_RECTANGLE_NV, - LOC_CUSTOM, TYPE_INT, TEXTURE_RECT_INDEX, extra_NV_texture_rectangle }, - { GL_MAX_RECTANGLE_TEXTURE_SIZE_NV, - CONTEXT_INT(Const.MaxTextureRectSize), extra_NV_texture_rectangle }, - - /* GL_EXT_stencil_two_side */ - { GL_STENCIL_TEST_TWO_SIDE_EXT, CONTEXT_BOOL(Stencil.TestTwoSide), - extra_EXT_stencil_two_side }, - { GL_ACTIVE_STENCIL_FACE_EXT, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA }, - - /* GL_NV_light_max_exponent */ - { GL_MAX_SHININESS_NV, CONTEXT_FLOAT(Const.MaxShininess), - extra_NV_light_max_exponent }, - { GL_MAX_SPOT_EXPONENT_NV, CONTEXT_FLOAT(Const.MaxSpotExponent), - extra_NV_light_max_exponent }, - - /* GL_NV_primitive_restart */ - { GL_PRIMITIVE_RESTART_NV, CONTEXT_BOOL(Array.PrimitiveRestart), - extra_NV_primitive_restart }, - { GL_PRIMITIVE_RESTART_INDEX_NV, CONTEXT_INT(Array.RestartIndex), - extra_NV_primitive_restart }, - - /* GL_ARB_vertex_buffer_object */ - { GL_INDEX_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, - offsetof(struct gl_array_object, Index.BufferObj), NO_EXTRA }, - { GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, - offsetof(struct gl_array_object, EdgeFlag.BufferObj), NO_EXTRA }, - { GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, - offsetof(struct gl_array_object, SecondaryColor.BufferObj), NO_EXTRA }, - { GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, - offsetof(struct gl_array_object, FogCoord.BufferObj), NO_EXTRA }, - - /* GL_EXT_pixel_buffer_object */ - { GL_PIXEL_PACK_BUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0, - extra_EXT_pixel_buffer_object }, - { GL_PIXEL_UNPACK_BUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0, - extra_EXT_pixel_buffer_object }, - - /* GL_ARB_vertex_program */ - { GL_VERTEX_PROGRAM_ARB, /* == GL_VERTEX_PROGRAM_NV */ - CONTEXT_BOOL(VertexProgram.Enabled), - extra_ARB_vertex_program_NV_vertex_program }, - { GL_VERTEX_PROGRAM_POINT_SIZE_ARB, /* == GL_VERTEX_PROGRAM_POINT_SIZE_NV*/ - CONTEXT_BOOL(VertexProgram.PointSizeEnabled), - extra_ARB_vertex_program_NV_vertex_program }, - { GL_VERTEX_PROGRAM_TWO_SIDE_ARB, /* == GL_VERTEX_PROGRAM_TWO_SIDE_NV */ - CONTEXT_BOOL(VertexProgram.TwoSideEnabled), - extra_ARB_vertex_program_NV_vertex_program }, - { GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB, /* == GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */ - CONTEXT_INT(Const.MaxProgramMatrixStackDepth), - extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program }, - { GL_MAX_PROGRAM_MATRICES_ARB, /* == GL_MAX_TRACK_MATRICES_NV */ - CONTEXT_INT(Const.MaxProgramMatrices), - extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program }, - { GL_CURRENT_MATRIX_STACK_DEPTH_ARB, /* == GL_CURRENT_MATRIX_STACK_DEPTH_NV */ - LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program }, - - { GL_CURRENT_MATRIX_ARB, /* == GL_CURRENT_MATRIX_NV */ - LOC_CUSTOM, TYPE_MATRIX, 0, - extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program }, - { GL_TRANSPOSE_CURRENT_MATRIX_ARB, /* == GL_CURRENT_MATRIX_NV */ - LOC_CUSTOM, TYPE_MATRIX, 0, - extra_ARB_vertex_program_ARB_fragment_program }, - - { GL_PROGRAM_ERROR_POSITION_ARB, /* == GL_PROGRAM_ERROR_POSITION_NV */ - CONTEXT_INT(Program.ErrorPos), - extra_NV_vertex_program_ARB_vertex_program_ARB_fragment_program_NV_vertex_program }, - - /* GL_ARB_fragment_program */ - { GL_FRAGMENT_PROGRAM_ARB, CONTEXT_BOOL(FragmentProgram.Enabled), - extra_ARB_fragment_program }, - - /* GL_EXT_depth_bounds_test */ - { GL_DEPTH_BOUNDS_TEST_EXT, CONTEXT_BOOL(Depth.BoundsTest), - extra_EXT_depth_bounds_test }, - { GL_DEPTH_BOUNDS_EXT, CONTEXT_FLOAT2(Depth.BoundsMin), - extra_EXT_depth_bounds_test }, - - /* GL_ARB_depth_clamp*/ - { GL_DEPTH_CLAMP, CONTEXT_BOOL(Transform.DepthClamp), - extra_ARB_depth_clamp }, - - /* GL_ARB_draw_buffers */ - { GL_DRAW_BUFFER0_ARB, BUFFER_ENUM(ColorDrawBuffer[0]), NO_EXTRA }, - { GL_DRAW_BUFFER1_ARB, BUFFER_ENUM(ColorDrawBuffer[1]), - extra_valid_draw_buffer }, - { GL_DRAW_BUFFER2_ARB, BUFFER_ENUM(ColorDrawBuffer[2]), - extra_valid_draw_buffer }, - { GL_DRAW_BUFFER3_ARB, BUFFER_ENUM(ColorDrawBuffer[3]), - extra_valid_draw_buffer }, - { GL_DRAW_BUFFER4_ARB, BUFFER_ENUM(ColorDrawBuffer[4]), - extra_valid_draw_buffer }, - { GL_DRAW_BUFFER5_ARB, BUFFER_ENUM(ColorDrawBuffer[5]), - extra_valid_draw_buffer }, - { GL_DRAW_BUFFER6_ARB, BUFFER_ENUM(ColorDrawBuffer[6]), - extra_valid_draw_buffer }, - { GL_DRAW_BUFFER7_ARB, BUFFER_ENUM(ColorDrawBuffer[7]), - extra_valid_draw_buffer }, - - /* GL_ATI_fragment_shader */ - { GL_NUM_FRAGMENT_REGISTERS_ATI, CONST(6), extra_ATI_fragment_shader }, - { GL_NUM_FRAGMENT_CONSTANTS_ATI, CONST(8), extra_ATI_fragment_shader }, - { GL_NUM_PASSES_ATI, CONST(2), extra_ATI_fragment_shader }, - { GL_NUM_INSTRUCTIONS_PER_PASS_ATI, CONST(8), extra_ATI_fragment_shader }, - { GL_NUM_INSTRUCTIONS_TOTAL_ATI, CONST(16), extra_ATI_fragment_shader }, - { GL_COLOR_ALPHA_PAIRING_ATI, CONST(GL_TRUE), extra_ATI_fragment_shader }, - { GL_NUM_LOOPBACK_COMPONENTS_ATI, CONST(3), extra_ATI_fragment_shader }, - { GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI, - CONST(3), extra_ATI_fragment_shader }, - - /* GL_EXT_framebuffer_object */ - { GL_MAX_COLOR_ATTACHMENTS_EXT, CONTEXT_INT(Const.MaxColorAttachments), - extra_EXT_framebuffer_object }, - - /* GL_EXT_framebuffer_blit - * NOTE: GL_DRAW_FRAMEBUFFER_BINDING_EXT == GL_FRAMEBUFFER_BINDING_EXT */ - { GL_READ_FRAMEBUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0, - extra_EXT_framebuffer_blit }, - - /* GL_EXT_provoking_vertex */ - { GL_PROVOKING_VERTEX_EXT, - CONTEXT_BOOL(Light.ProvokingVertex), extra_EXT_provoking_vertex }, - { GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT, - CONTEXT_BOOL(Const.QuadsFollowProvokingVertexConvention), - extra_EXT_provoking_vertex }, - - /* GL_ARB_framebuffer_object */ - { GL_MAX_SAMPLES, CONTEXT_INT(Const.MaxSamples), - extra_ARB_framebuffer_object_EXT_framebuffer_multisample }, - - /* GL_APPLE_vertex_array_object */ - { GL_VERTEX_ARRAY_BINDING_APPLE, ARRAY_INT(Name), - extra_APPLE_vertex_array_object }, - - /* GL_ARB_seamless_cube_map */ - { GL_TEXTURE_CUBE_MAP_SEAMLESS, - CONTEXT_BOOL(Texture.CubeMapSeamless), extra_ARB_seamless_cube_map }, - - /* GL_ARB_sync */ - { GL_MAX_SERVER_WAIT_TIMEOUT, - CONTEXT_INT64(Const.MaxServerWaitTimeout), extra_ARB_sync }, - - /* GL_EXT_texture_integer */ - { GL_RGBA_INTEGER_MODE_EXT, BUFFER_BOOL(_IntegerColor), - extra_EXT_texture_integer }, - - /* GL_EXT_transform_feedback */ - { GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, LOC_CUSTOM, TYPE_INT, 0, - extra_EXT_transform_feedback }, - { GL_RASTERIZER_DISCARD, CONTEXT_BOOL(TransformFeedback.RasterDiscard), - extra_EXT_transform_feedback }, - { GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS, - CONTEXT_INT(Const.MaxTransformFeedbackInterleavedComponents), - extra_EXT_transform_feedback }, - { GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS, - CONTEXT_INT(Const.MaxTransformFeedbackSeparateAttribs), - extra_EXT_transform_feedback }, - { GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS, - CONTEXT_INT(Const.MaxTransformFeedbackSeparateComponents), - extra_EXT_transform_feedback }, - - /* GL_ARB_transform_feedback2 */ - { GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED, LOC_CUSTOM, TYPE_BOOLEAN, 0, - extra_ARB_transform_feedback2 }, - { GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE, LOC_CUSTOM, TYPE_BOOLEAN, 0, - extra_ARB_transform_feedback2 }, - { GL_TRANSFORM_FEEDBACK_BINDING, LOC_CUSTOM, TYPE_INT, 0, - extra_ARB_transform_feedback2 }, - - /* GL_ARB_geometry_shader4 */ - { GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB, - CONTEXT_INT(Const.MaxGeometryTextureImageUnits), - extra_ARB_geometry_shader4 }, - { GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB, - CONTEXT_INT(Const.MaxGeometryOutputVertices), - extra_ARB_geometry_shader4 }, - { GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB, - CONTEXT_INT(Const.MaxGeometryTotalOutputComponents), - extra_ARB_geometry_shader4 }, - { GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB, - CONTEXT_INT(Const.GeometryProgram.MaxUniformComponents), - extra_ARB_geometry_shader4 }, - { GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB, - CONTEXT_INT(Const.MaxGeometryVaryingComponents), - extra_ARB_geometry_shader4 }, - { GL_MAX_VERTEX_VARYING_COMPONENTS_ARB, - CONTEXT_INT(Const.MaxVertexVaryingComponents), - extra_ARB_geometry_shader4 }, - - /* GL_ARB_color_buffer_float */ - { GL_RGBA_FLOAT_MODE_ARB, BUFFER_FIELD(Visual.floatMode, TYPE_BOOLEAN), 0 }, - - /* GL_EXT_gpu_shader4 / GL 3.0 */ - { GL_MIN_PROGRAM_TEXEL_OFFSET, - CONTEXT_INT(Const.MinProgramTexelOffset), - extra_EXT_gpu_shader4 }, - { GL_MAX_PROGRAM_TEXEL_OFFSET, - CONTEXT_INT(Const.MaxProgramTexelOffset), - extra_EXT_gpu_shader4 }, - - /* GL 3.0 */ - { GL_NUM_EXTENSIONS, LOC_CUSTOM, TYPE_INT, 0, extra_version_30 }, - { GL_MAJOR_VERSION, CONTEXT_INT(VersionMajor), extra_version_30 }, - { GL_MINOR_VERSION, CONTEXT_INT(VersionMinor), extra_version_30 }, - { GL_CONTEXT_FLAGS, CONTEXT_INT(Const.ContextFlags), extra_version_30 }, - - /* GL3.0 / GL_EXT_framebuffer_sRGB */ - { GL_FRAMEBUFFER_SRGB_EXT, CONTEXT_BOOL(Color.sRGBEnabled), extra_EXT_framebuffer_sRGB }, - { GL_FRAMEBUFFER_SRGB_CAPABLE_EXT, BUFFER_INT(Visual.sRGBCapable), extra_EXT_framebuffer_sRGB }, - - /* GL 3.1 */ - /* NOTE: different enum values for GL_PRIMITIVE_RESTART_NV - * vs. GL_PRIMITIVE_RESTART! - */ - { GL_PRIMITIVE_RESTART, CONTEXT_BOOL(Array.PrimitiveRestart), - extra_version_31 }, - { GL_PRIMITIVE_RESTART_INDEX, CONTEXT_INT(Array.RestartIndex), - extra_version_31 }, - - - /* GL 3.2 */ - { GL_CONTEXT_PROFILE_MASK, CONTEXT_INT(Const.ProfileMask), - extra_version_32 }, -#endif /* FEATURE_GL */ -}; - -/* All we need now is a way to look up the value struct from the enum. - * The code generated by gcc for the old generated big switch - * statement is a big, balanced, open coded if/else tree, essentially - * an unrolled binary search. It would be natural to sort the new - * enum table and use bsearch(), but we will use a read-only hash - * table instead. bsearch() has a nice guaranteed worst case - * performance, but we're also guaranteed to hit that worst case - * (log2(n) iterations) for about half the enums. Instead, using an - * open addressing hash table, we can find the enum on the first try - * for 80% of the enums, 1 collision for 10% and never more than 5 - * collisions for any enum (typical numbers). And the code is very - * simple, even though it feels a little magic. */ - -static unsigned short table[1024]; -static const int prime_factor = 89, prime_step = 281; - -#ifdef GET_DEBUG -static void -print_table_stats(void) -{ - int i, j, collisions[11], count, hash, mask; - const struct value_desc *d; - - count = 0; - mask = Elements(table) - 1; - memset(collisions, 0, sizeof collisions); - - for (i = 0; i < Elements(table); i++) { - if (!table[i]) - continue; - count++; - d = &values[table[i]]; - hash = (d->pname * prime_factor); - j = 0; - while (1) { - if (values[table[hash & mask]].pname == d->pname) - break; - hash += prime_step; - j++; - } - - if (j < 10) - collisions[j]++; - else - collisions[10]++; - } - - printf("number of enums: %d (total %d)\n", count, Elements(values)); - for (i = 0; i < Elements(collisions) - 1; i++) - if (collisions[i] > 0) - printf(" %d enums with %d %scollisions\n", - collisions[i], i, i == 10 ? "or more " : ""); -} -#endif - -/** - * Initialize the enum hash for a given API - * - * This is called from one_time_init() to insert the enum values that - * are valid for the API in question into the enum hash table. - * - * \param the current context, for determining the API in question - */ -void _mesa_init_get_hash(struct gl_context *ctx) -{ - int i, hash, index, mask; - int api_mask = 0, api_bit; - - mask = Elements(table) - 1; - api_bit = 1 << ctx->API; - - for (i = 0; i < Elements(values); i++) { - if (values[i].type == TYPE_API_MASK) { - api_mask = values[i].offset; - continue; - } - if (!(api_mask & api_bit)) - continue; - - hash = (values[i].pname * prime_factor) & mask; - while (1) { - index = hash & mask; - if (!table[index]) { - table[index] = i; - break; - } - hash += prime_step; - } - } - -#ifdef GET_DEBUG - print_table_stats(); -#endif -} - -/** - * Handle irregular enums - * - * Some values don't conform to the "well-known type at context - * pointer + offset" pattern, so we have this function to catch all - * the corner cases. Typically, it's a computed value or a one-off - * pointer to a custom struct or something. - * - * In this case we can't return a pointer to the value, so we'll have - * to use the temporary variable 'v' declared back in the calling - * glGet*v() function to store the result. - * - * \param ctx the current context - * \param d the struct value_desc that describes the enum - * \param v pointer to the tmp declared in the calling glGet*v() function - */ -static void -find_custom_value(struct gl_context *ctx, const struct value_desc *d, union value *v) -{ - struct gl_buffer_object **buffer_obj; - struct gl_client_array *array; - GLuint unit, *p; - - switch (d->pname) { - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_3D: - case GL_TEXTURE_1D_ARRAY_EXT: - case GL_TEXTURE_2D_ARRAY_EXT: - case GL_TEXTURE_CUBE_MAP_ARB: - case GL_TEXTURE_RECTANGLE_NV: - v->value_bool = _mesa_IsEnabled(d->pname); - break; - - case GL_LINE_STIPPLE_PATTERN: - /* This is the only GLushort, special case it here by promoting - * to an int rather than introducing a new type. */ - v->value_int = ctx->Line.StipplePattern; - break; - - case GL_CURRENT_RASTER_TEXTURE_COORDS: - unit = ctx->Texture.CurrentUnit; - v->value_float_4[0] = ctx->Current.RasterTexCoords[unit][0]; - v->value_float_4[1] = ctx->Current.RasterTexCoords[unit][1]; - v->value_float_4[2] = ctx->Current.RasterTexCoords[unit][2]; - v->value_float_4[3] = ctx->Current.RasterTexCoords[unit][3]; - break; - - case GL_CURRENT_TEXTURE_COORDS: - unit = ctx->Texture.CurrentUnit; - v->value_float_4[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][0]; - v->value_float_4[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][1]; - v->value_float_4[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2]; - v->value_float_4[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3]; - break; - - case GL_COLOR_WRITEMASK: - v->value_int_4[0] = ctx->Color.ColorMask[0][RCOMP] ? 1 : 0; - v->value_int_4[1] = ctx->Color.ColorMask[0][GCOMP] ? 1 : 0; - v->value_int_4[2] = ctx->Color.ColorMask[0][BCOMP] ? 1 : 0; - v->value_int_4[3] = ctx->Color.ColorMask[0][ACOMP] ? 1 : 0; - break; - - case GL_EDGE_FLAG: - v->value_bool = ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG][0] == 1.0; - break; - - case GL_READ_BUFFER: - v->value_enum = ctx->ReadBuffer->ColorReadBuffer; - break; - - case GL_MAP2_GRID_DOMAIN: - v->value_float_4[0] = ctx->Eval.MapGrid2u1; - v->value_float_4[1] = ctx->Eval.MapGrid2u2; - v->value_float_4[2] = ctx->Eval.MapGrid2v1; - v->value_float_4[3] = ctx->Eval.MapGrid2v2; - break; - - case GL_TEXTURE_STACK_DEPTH: - unit = ctx->Texture.CurrentUnit; - v->value_int = ctx->TextureMatrixStack[unit].Depth + 1; - break; - case GL_TEXTURE_MATRIX: - unit = ctx->Texture.CurrentUnit; - v->value_matrix = ctx->TextureMatrixStack[unit].Top; - break; - - case GL_TEXTURE_COORD_ARRAY: - case GL_TEXTURE_COORD_ARRAY_SIZE: - case GL_TEXTURE_COORD_ARRAY_TYPE: - case GL_TEXTURE_COORD_ARRAY_STRIDE: - array = &ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture]; - v->value_int = *(GLuint *) ((char *) array + d->offset); - break; - - case GL_ACTIVE_TEXTURE_ARB: - v->value_int = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit; - break; - case GL_CLIENT_ACTIVE_TEXTURE_ARB: - v->value_int = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture; - break; - - case GL_MODELVIEW_STACK_DEPTH: - case GL_PROJECTION_STACK_DEPTH: - v->value_int = *(GLint *) ((char *) ctx + d->offset) + 1; - break; - - case GL_MAX_TEXTURE_SIZE: - case GL_MAX_3D_TEXTURE_SIZE: - case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB: - p = (GLuint *) ((char *) ctx + d->offset); - v->value_int = 1 << (*p - 1); - break; - - case GL_SCISSOR_BOX: - v->value_int_4[0] = ctx->Scissor.X; - v->value_int_4[1] = ctx->Scissor.Y; - v->value_int_4[2] = ctx->Scissor.Width; - v->value_int_4[3] = ctx->Scissor.Height; - break; - - case GL_LIST_INDEX: - v->value_int = - ctx->ListState.CurrentList ? ctx->ListState.CurrentList->Name : 0; - break; - case GL_LIST_MODE: - if (!ctx->CompileFlag) - v->value_enum = 0; - else if (ctx->ExecuteFlag) - v->value_enum = GL_COMPILE_AND_EXECUTE; - else - v->value_enum = GL_COMPILE; - break; - - case GL_VIEWPORT: - v->value_int_4[0] = ctx->Viewport.X; - v->value_int_4[1] = ctx->Viewport.Y; - v->value_int_4[2] = ctx->Viewport.Width; - v->value_int_4[3] = ctx->Viewport.Height; - break; - - case GL_ACTIVE_STENCIL_FACE_EXT: - v->value_enum = ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT; - break; - - case GL_STENCIL_FAIL: - v->value_enum = ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_FUNC: - v->value_enum = ctx->Stencil.Function[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_PASS_DEPTH_FAIL: - v->value_enum = ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_PASS_DEPTH_PASS: - v->value_enum = ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_REF: - v->value_int = ctx->Stencil.Ref[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_VALUE_MASK: - v->value_int = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace]; - break; - case GL_STENCIL_WRITEMASK: - v->value_int = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace]; - break; - - case GL_NUM_EXTENSIONS: - v->value_int = _mesa_get_extension_count(ctx); - break; - - case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES: - v->value_int = _mesa_get_color_read_type(ctx); - break; - case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES: - v->value_int = _mesa_get_color_read_format(ctx); - break; - - case GL_CURRENT_MATRIX_STACK_DEPTH_ARB: - v->value_int = ctx->CurrentStack->Depth + 1; - break; - case GL_CURRENT_MATRIX_ARB: - case GL_TRANSPOSE_CURRENT_MATRIX_ARB: - v->value_matrix = ctx->CurrentStack->Top; - break; - - case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB: - v->value_int = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE); - break; - case GL_COMPRESSED_TEXTURE_FORMATS_ARB: - v->value_int_n.n = - _mesa_get_compressed_formats(ctx, v->value_int_n.ints, GL_FALSE); - ASSERT(v->value_int_n.n <= 100); - break; - - case GL_MAX_VARYING_FLOATS_ARB: - v->value_int = ctx->Const.MaxVarying * 4; - break; - - /* Various object names */ - - case GL_TEXTURE_BINDING_1D: - case GL_TEXTURE_BINDING_2D: - case GL_TEXTURE_BINDING_3D: - case GL_TEXTURE_BINDING_1D_ARRAY_EXT: - case GL_TEXTURE_BINDING_2D_ARRAY_EXT: - case GL_TEXTURE_BINDING_CUBE_MAP_ARB: - case GL_TEXTURE_BINDING_RECTANGLE_NV: - unit = ctx->Texture.CurrentUnit; - v->value_int = - ctx->Texture.Unit[unit].CurrentTex[d->offset]->Name; - break; - - /* GL_ARB_vertex_buffer_object */ - case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB: - case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB: - case GL_COLOR_ARRAY_BUFFER_BINDING_ARB: - case GL_INDEX_ARRAY_BUFFER_BINDING_ARB: - case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB: - case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB: - case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB: - buffer_obj = (struct gl_buffer_object **) - ((char *) ctx->Array.ArrayObj + d->offset); - v->value_int = (*buffer_obj)->Name; - break; - case GL_ARRAY_BUFFER_BINDING_ARB: - v->value_int = ctx->Array.ArrayBufferObj->Name; - break; - case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB: - v->value_int = - ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name; - break; - case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB: - v->value_int = ctx->Array.ElementArrayBufferObj->Name; - break; - - /* ARB_copy_buffer */ - case GL_COPY_READ_BUFFER: - v->value_int = ctx->CopyReadBuffer->Name; - break; - case GL_COPY_WRITE_BUFFER: - v->value_int = ctx->CopyWriteBuffer->Name; - break; - - case GL_FRAGMENT_PROGRAM_BINDING_NV: - v->value_int = - ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0; - break; - case GL_VERTEX_PROGRAM_BINDING_NV: - v->value_int = - ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0; - break; - case GL_PIXEL_PACK_BUFFER_BINDING_EXT: - v->value_int = ctx->Pack.BufferObj->Name; - break; - case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT: - v->value_int = ctx->Unpack.BufferObj->Name; - break; - case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: - v->value_int = ctx->TransformFeedback.CurrentBuffer->Name; - break; - case GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED: - v->value_int = ctx->TransformFeedback.CurrentObject->Paused; - break; - case GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE: - v->value_int = ctx->TransformFeedback.CurrentObject->Active; - break; - case GL_TRANSFORM_FEEDBACK_BINDING: - v->value_int = ctx->TransformFeedback.CurrentObject->Name; - break; - case GL_CURRENT_PROGRAM: - v->value_int = - ctx->Shader.ActiveProgram ? ctx->Shader.ActiveProgram->Name : 0; - break; - case GL_READ_FRAMEBUFFER_BINDING_EXT: - v->value_int = ctx->ReadBuffer->Name; - break; - case GL_RENDERBUFFER_BINDING_EXT: - v->value_int = - ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0; - break; - case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES: - v->value_int = ctx->Array.ArrayObj->PointSize.BufferObj->Name; - break; - - case GL_FOG_COLOR: - if(ctx->Color._ClampFragmentColor) - COPY_4FV(v->value_float_4, ctx->Fog.Color); - else - COPY_4FV(v->value_float_4, ctx->Fog.ColorUnclamped); - break; - case GL_COLOR_CLEAR_VALUE: - if(ctx->Color._ClampFragmentColor) - COPY_4FV(v->value_float_4, ctx->Color.ClearColor); - else - COPY_4FV(v->value_float_4, ctx->Color.ClearColorUnclamped); - break; - case GL_BLEND_COLOR_EXT: - if(ctx->Color._ClampFragmentColor) - COPY_4FV(v->value_float_4, ctx->Color.BlendColor); - else - COPY_4FV(v->value_float_4, ctx->Color.BlendColorUnclamped); - break; - case GL_ALPHA_TEST_REF: - if(ctx->Color._ClampFragmentColor) - v->value_float = ctx->Color.AlphaRef; - else - v->value_float = ctx->Color.AlphaRefUnclamped; - break; - case GL_MAX_VERTEX_UNIFORM_VECTORS: - v->value_int = ctx->Const.VertexProgram.MaxUniformComponents / 4; - break; - - case GL_MAX_FRAGMENT_UNIFORM_VECTORS: - v->value_int = ctx->Const.FragmentProgram.MaxUniformComponents / 4; - break; - } -} - -/** - * Check extra constraints on a struct value_desc descriptor - * - * If a struct value_desc has a non-NULL extra pointer, it means that - * there are a number of extra constraints to check or actions to - * perform. The extras is just an integer array where each integer - * encode different constraints or actions. - * - * \param ctx current context - * \param func name of calling glGet*v() function for error reporting - * \param d the struct value_desc that has the extra constraints - * - * \return GL_FALSE if one of the constraints was not satisfied, - * otherwise GL_TRUE. - */ -static GLboolean -check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d) -{ - const GLuint version = ctx->VersionMajor * 10 + ctx->VersionMinor; - int total, enabled; - const int *e; - - total = 0; - enabled = 0; - for (e = d->extra; *e != EXTRA_END; e++) - switch (*e) { - case EXTRA_VERSION_30: - if (version >= 30) { - total++; - enabled++; - } - break; - case EXTRA_VERSION_31: - if (version >= 31) { - total++; - enabled++; - } - break; - case EXTRA_VERSION_32: - if (version >= 32) { - total++; - enabled++; - } - break; - case EXTRA_NEW_FRAG_CLAMP: - if (ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP)) - _mesa_update_state(ctx); - break; - case EXTRA_VERSION_ES2: - if (ctx->API == API_OPENGLES2) { - total++; - enabled++; - } - break; - case EXTRA_NEW_BUFFERS: - if (ctx->NewState & _NEW_BUFFERS) - _mesa_update_state(ctx); - break; - case EXTRA_FLUSH_CURRENT: - FLUSH_CURRENT(ctx, 0); - break; - case EXTRA_VALID_DRAW_BUFFER: - if (d->pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s(draw buffer %u)", - func, d->pname - GL_DRAW_BUFFER0_ARB); - return GL_FALSE; - } - break; - case EXTRA_VALID_TEXTURE_UNIT: - if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) { - _mesa_error(ctx, GL_INVALID_OPERATION, "%s(texture %u)", - func, ctx->Texture.CurrentUnit); - return GL_FALSE; - } - break; - case EXTRA_END: - break; - default: /* *e is a offset into the extension struct */ - total++; - if (*(GLboolean *) ((char *) &ctx->Extensions + *e)) - enabled++; - break; - } - - if (total > 0 && enabled == 0) { - _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func, - _mesa_lookup_enum_by_nr(d->pname)); - return GL_FALSE; - } - - return GL_TRUE; -} - -static const struct value_desc error_value = - { 0, 0, TYPE_INVALID, NO_OFFSET, NO_EXTRA }; - -/** - * Find the struct value_desc corresponding to the enum 'pname'. - * - * We hash the enum value to get an index into the 'table' array, - * which holds the index in the 'values' array of struct value_desc. - * Once we've found the entry, we do the extra checks, if any, then - * look up the value and return a pointer to it. - * - * If the value has to be computed (for example, it's the result of a - * function call or we need to add 1 to it), we use the tmp 'v' to - * store the result. - * - * \param func name of glGet*v() func for error reporting - * \param pname the enum value we're looking up - * \param p is were we return the pointer to the value - * \param v a tmp union value variable in the calling glGet*v() function - * - * \return the struct value_desc corresponding to the enum or a struct - * value_desc of TYPE_INVALID if not found. This lets the calling - * glGet*v() function jump right into a switch statement and - * handle errors there instead of having to check for NULL. - */ -static const struct value_desc * -find_value(const char *func, GLenum pname, void **p, union value *v) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_texture_unit *unit; - int mask, hash; - const struct value_desc *d; - - mask = Elements(table) - 1; - hash = (pname * prime_factor); - while (1) { - d = &values[table[hash & mask]]; - - /* If the enum isn't valid, the hash walk ends with index 0, - * which is the API mask entry at the beginning of values[]. */ - if (unlikely(d->type == TYPE_API_MASK)) { - _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func, - _mesa_lookup_enum_by_nr(pname)); - return &error_value; - } - - if (likely(d->pname == pname)) - break; - - hash += prime_step; - } - - if (unlikely(d->extra && !check_extra(ctx, func, d))) - return &error_value; - - switch (d->location) { - case LOC_BUFFER: - *p = ((char *) ctx->DrawBuffer + d->offset); - return d; - case LOC_CONTEXT: - *p = ((char *) ctx + d->offset); - return d; - case LOC_ARRAY: - *p = ((char *) ctx->Array.ArrayObj + d->offset); - return d; - case LOC_TEXUNIT: - unit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit]; - *p = ((char *) unit + d->offset); - return d; - case LOC_CUSTOM: - find_custom_value(ctx, d, v); - *p = v; - return d; - default: - assert(0); - break; - } - - /* silence warning */ - return &error_value; -} - -static const int transpose[] = { - 0, 4, 8, 12, - 1, 5, 9, 13, - 2, 6, 10, 14, - 3, 7, 11, 15 -}; - -void GLAPIENTRY -_mesa_GetBooleanv(GLenum pname, GLboolean *params) -{ - const struct value_desc *d; - union value v; - GLmatrix *m; - int shift, i; - void *p; - - d = find_value("glGetBooleanv", pname, &p, &v); - switch (d->type) { - case TYPE_INVALID: - break; - case TYPE_CONST: - params[0] = INT_TO_BOOLEAN(d->offset); - break; - - case TYPE_FLOAT_4: - case TYPE_FLOATN_4: - params[3] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[3]); - case TYPE_FLOAT_3: - case TYPE_FLOATN_3: - params[2] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[2]); - case TYPE_FLOAT_2: - case TYPE_FLOATN_2: - params[1] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[1]); - case TYPE_FLOAT: - case TYPE_FLOATN: - params[0] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[0]); - break; - - case TYPE_DOUBLEN: - params[0] = FLOAT_TO_BOOLEAN(((GLdouble *) p)[0]); - break; - - case TYPE_INT_4: - params[3] = INT_TO_BOOLEAN(((GLint *) p)[3]); - case TYPE_INT_3: - params[2] = INT_TO_BOOLEAN(((GLint *) p)[2]); - case TYPE_INT_2: - case TYPE_ENUM_2: - params[1] = INT_TO_BOOLEAN(((GLint *) p)[1]); - case TYPE_INT: - case TYPE_ENUM: - params[0] = INT_TO_BOOLEAN(((GLint *) p)[0]); - break; - - case TYPE_INT_N: - for (i = 0; i < v.value_int_n.n; i++) - params[i] = INT_TO_BOOLEAN(v.value_int_n.ints[i]); - break; - - case TYPE_INT64: - params[0] = INT64_TO_BOOLEAN(((GLint64 *) p)[0]); - break; - - case TYPE_BOOLEAN: - params[0] = ((GLboolean*) p)[0]; - break; - - case TYPE_MATRIX: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = FLOAT_TO_BOOLEAN(m->m[i]); - break; - - case TYPE_MATRIX_T: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = FLOAT_TO_BOOLEAN(m->m[transpose[i]]); - break; - - case TYPE_BIT_0: - case TYPE_BIT_1: - case TYPE_BIT_2: - case TYPE_BIT_3: - case TYPE_BIT_4: - case TYPE_BIT_5: - shift = d->type - TYPE_BIT_0; - params[0] = (*(GLbitfield *) p >> shift) & 1; - break; - } -} - -void GLAPIENTRY -_mesa_GetFloatv(GLenum pname, GLfloat *params) -{ - const struct value_desc *d; - union value v; - GLmatrix *m; - int shift, i; - void *p; - - d = find_value("glGetFloatv", pname, &p, &v); - switch (d->type) { - case TYPE_INVALID: - break; - case TYPE_CONST: - params[0] = (GLfloat) d->offset; - break; - - case TYPE_FLOAT_4: - case TYPE_FLOATN_4: - params[3] = ((GLfloat *) p)[3]; - case TYPE_FLOAT_3: - case TYPE_FLOATN_3: - params[2] = ((GLfloat *) p)[2]; - case TYPE_FLOAT_2: - case TYPE_FLOATN_2: - params[1] = ((GLfloat *) p)[1]; - case TYPE_FLOAT: - case TYPE_FLOATN: - params[0] = ((GLfloat *) p)[0]; - break; - - case TYPE_DOUBLEN: - params[0] = ((GLdouble *) p)[0]; - break; - - case TYPE_INT_4: - params[3] = (GLfloat) (((GLint *) p)[3]); - case TYPE_INT_3: - params[2] = (GLfloat) (((GLint *) p)[2]); - case TYPE_INT_2: - case TYPE_ENUM_2: - params[1] = (GLfloat) (((GLint *) p)[1]); - case TYPE_INT: - case TYPE_ENUM: - params[0] = (GLfloat) (((GLint *) p)[0]); - break; - - case TYPE_INT_N: - for (i = 0; i < v.value_int_n.n; i++) - params[i] = INT_TO_FLOAT(v.value_int_n.ints[i]); - break; - - case TYPE_INT64: - params[0] = ((GLint64 *) p)[0]; - break; - - case TYPE_BOOLEAN: - params[0] = BOOLEAN_TO_FLOAT(*(GLboolean*) p); - break; - - case TYPE_MATRIX: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = m->m[i]; - break; - - case TYPE_MATRIX_T: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = m->m[transpose[i]]; - break; - - case TYPE_BIT_0: - case TYPE_BIT_1: - case TYPE_BIT_2: - case TYPE_BIT_3: - case TYPE_BIT_4: - case TYPE_BIT_5: - shift = d->type - TYPE_BIT_0; - params[0] = BOOLEAN_TO_FLOAT((*(GLbitfield *) p >> shift) & 1); - break; - } -} - -void GLAPIENTRY -_mesa_GetIntegerv(GLenum pname, GLint *params) -{ - const struct value_desc *d; - union value v; - GLmatrix *m; - int shift, i; - void *p; - - d = find_value("glGetIntegerv", pname, &p, &v); - switch (d->type) { - case TYPE_INVALID: - break; - case TYPE_CONST: - params[0] = d->offset; - break; - - case TYPE_FLOAT_4: - params[3] = IROUND(((GLfloat *) p)[3]); - case TYPE_FLOAT_3: - params[2] = IROUND(((GLfloat *) p)[2]); - case TYPE_FLOAT_2: - params[1] = IROUND(((GLfloat *) p)[1]); - case TYPE_FLOAT: - params[0] = IROUND(((GLfloat *) p)[0]); - break; - - case TYPE_FLOATN_4: - params[3] = FLOAT_TO_INT(((GLfloat *) p)[3]); - case TYPE_FLOATN_3: - params[2] = FLOAT_TO_INT(((GLfloat *) p)[2]); - case TYPE_FLOATN_2: - params[1] = FLOAT_TO_INT(((GLfloat *) p)[1]); - case TYPE_FLOATN: - params[0] = FLOAT_TO_INT(((GLfloat *) p)[0]); - break; - - case TYPE_DOUBLEN: - params[0] = FLOAT_TO_INT(((GLdouble *) p)[0]); - break; - - case TYPE_INT_4: - params[3] = ((GLint *) p)[3]; - case TYPE_INT_3: - params[2] = ((GLint *) p)[2]; - case TYPE_INT_2: - case TYPE_ENUM_2: - params[1] = ((GLint *) p)[1]; - case TYPE_INT: - case TYPE_ENUM: - params[0] = ((GLint *) p)[0]; - break; - - case TYPE_INT_N: - for (i = 0; i < v.value_int_n.n; i++) - params[i] = v.value_int_n.ints[i]; - break; - - case TYPE_INT64: - params[0] = INT64_TO_INT(((GLint64 *) p)[0]); - break; - - case TYPE_BOOLEAN: - params[0] = BOOLEAN_TO_INT(*(GLboolean*) p); - break; - - case TYPE_MATRIX: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = FLOAT_TO_INT(m->m[i]); - break; - - case TYPE_MATRIX_T: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = FLOAT_TO_INT(m->m[transpose[i]]); - break; - - case TYPE_BIT_0: - case TYPE_BIT_1: - case TYPE_BIT_2: - case TYPE_BIT_3: - case TYPE_BIT_4: - case TYPE_BIT_5: - shift = d->type - TYPE_BIT_0; - params[0] = (*(GLbitfield *) p >> shift) & 1; - break; - } -} - -#if FEATURE_ARB_sync -void GLAPIENTRY -_mesa_GetInteger64v(GLenum pname, GLint64 *params) -{ - const struct value_desc *d; - union value v; - GLmatrix *m; - int shift, i; - void *p; - - d = find_value("glGetInteger64v", pname, &p, &v); - switch (d->type) { - case TYPE_INVALID: - break; - case TYPE_CONST: - params[0] = d->offset; - break; - - case TYPE_FLOAT_4: - params[3] = IROUND64(((GLfloat *) p)[3]); - case TYPE_FLOAT_3: - params[2] = IROUND64(((GLfloat *) p)[2]); - case TYPE_FLOAT_2: - params[1] = IROUND64(((GLfloat *) p)[1]); - case TYPE_FLOAT: - params[0] = IROUND64(((GLfloat *) p)[0]); - break; - - case TYPE_FLOATN_4: - params[3] = FLOAT_TO_INT64(((GLfloat *) p)[3]); - case TYPE_FLOATN_3: - params[2] = FLOAT_TO_INT64(((GLfloat *) p)[2]); - case TYPE_FLOATN_2: - params[1] = FLOAT_TO_INT64(((GLfloat *) p)[1]); - case TYPE_FLOATN: - params[0] = FLOAT_TO_INT64(((GLfloat *) p)[0]); - break; - - case TYPE_DOUBLEN: - params[0] = FLOAT_TO_INT64(((GLdouble *) p)[0]); - break; - - case TYPE_INT_4: - params[3] = ((GLint *) p)[3]; - case TYPE_INT_3: - params[2] = ((GLint *) p)[2]; - case TYPE_INT_2: - case TYPE_ENUM_2: - params[1] = ((GLint *) p)[1]; - case TYPE_INT: - case TYPE_ENUM: - params[0] = ((GLint *) p)[0]; - break; - - case TYPE_INT_N: - for (i = 0; i < v.value_int_n.n; i++) - params[i] = INT_TO_BOOLEAN(v.value_int_n.ints[i]); - break; - - case TYPE_INT64: - params[0] = ((GLint64 *) p)[0]; - break; - - case TYPE_BOOLEAN: - params[0] = ((GLboolean*) p)[0]; - break; - - case TYPE_MATRIX: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = FLOAT_TO_INT64(m->m[i]); - break; - - case TYPE_MATRIX_T: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = FLOAT_TO_INT64(m->m[transpose[i]]); - break; - - case TYPE_BIT_0: - case TYPE_BIT_1: - case TYPE_BIT_2: - case TYPE_BIT_3: - case TYPE_BIT_4: - case TYPE_BIT_5: - shift = d->type - TYPE_BIT_0; - params[0] = (*(GLbitfield *) p >> shift) & 1; - break; - } -} -#endif /* FEATURE_ARB_sync */ - -void GLAPIENTRY -_mesa_GetDoublev(GLenum pname, GLdouble *params) -{ - const struct value_desc *d; - union value v; - GLmatrix *m; - int shift, i; - void *p; - - d = find_value("glGetDoublev", pname, &p, &v); - switch (d->type) { - case TYPE_INVALID: - break; - case TYPE_CONST: - params[0] = d->offset; - break; - - case TYPE_FLOAT_4: - case TYPE_FLOATN_4: - params[3] = ((GLfloat *) p)[3]; - case TYPE_FLOAT_3: - case TYPE_FLOATN_3: - params[2] = ((GLfloat *) p)[2]; - case TYPE_FLOAT_2: - case TYPE_FLOATN_2: - params[1] = ((GLfloat *) p)[1]; - case TYPE_FLOAT: - case TYPE_FLOATN: - params[0] = ((GLfloat *) p)[0]; - break; - - case TYPE_DOUBLEN: - params[0] = ((GLdouble *) p)[0]; - break; - - case TYPE_INT_4: - params[3] = ((GLint *) p)[3]; - case TYPE_INT_3: - params[2] = ((GLint *) p)[2]; - case TYPE_INT_2: - case TYPE_ENUM_2: - params[1] = ((GLint *) p)[1]; - case TYPE_INT: - case TYPE_ENUM: - params[0] = ((GLint *) p)[0]; - break; - - case TYPE_INT_N: - for (i = 0; i < v.value_int_n.n; i++) - params[i] = v.value_int_n.ints[i]; - break; - - case TYPE_INT64: - params[0] = ((GLint64 *) p)[0]; - break; - - case TYPE_BOOLEAN: - params[0] = *(GLboolean*) p; - break; - - case TYPE_MATRIX: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = m->m[i]; - break; - - case TYPE_MATRIX_T: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = m->m[transpose[i]]; - break; - - case TYPE_BIT_0: - case TYPE_BIT_1: - case TYPE_BIT_2: - case TYPE_BIT_3: - case TYPE_BIT_4: - case TYPE_BIT_5: - shift = d->type - TYPE_BIT_0; - params[0] = (*(GLbitfield *) p >> shift) & 1; - break; - } -} - -static enum value_type -find_value_indexed(const char *func, GLenum pname, int index, union value *v) -{ - GET_CURRENT_CONTEXT(ctx); - - switch (pname) { - - case GL_BLEND: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.EXT_draw_buffers2) - goto invalid_enum; - v->value_int = (ctx->Color.BlendEnabled >> index) & 1; - return TYPE_INT; - - case GL_BLEND_SRC: - /* fall-through */ - case GL_BLEND_SRC_RGB: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.ARB_draw_buffers_blend) - goto invalid_enum; - v->value_int = ctx->Color.Blend[index].SrcRGB; - return TYPE_INT; - case GL_BLEND_SRC_ALPHA: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.ARB_draw_buffers_blend) - goto invalid_enum; - v->value_int = ctx->Color.Blend[index].SrcA; - return TYPE_INT; - case GL_BLEND_DST: - /* fall-through */ - case GL_BLEND_DST_RGB: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.ARB_draw_buffers_blend) - goto invalid_enum; - v->value_int = ctx->Color.Blend[index].DstRGB; - return TYPE_INT; - case GL_BLEND_DST_ALPHA: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.ARB_draw_buffers_blend) - goto invalid_enum; - v->value_int = ctx->Color.Blend[index].DstA; - return TYPE_INT; - case GL_BLEND_EQUATION_RGB: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.ARB_draw_buffers_blend) - goto invalid_enum; - v->value_int = ctx->Color.Blend[index].EquationRGB; - return TYPE_INT; - case GL_BLEND_EQUATION_ALPHA: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.ARB_draw_buffers_blend) - goto invalid_enum; - v->value_int = ctx->Color.Blend[index].EquationA; - return TYPE_INT; - - case GL_COLOR_WRITEMASK: - if (index >= ctx->Const.MaxDrawBuffers) - goto invalid_value; - if (!ctx->Extensions.EXT_draw_buffers2) - goto invalid_enum; - v->value_int_4[0] = ctx->Color.ColorMask[index][RCOMP] ? 1 : 0; - v->value_int_4[1] = ctx->Color.ColorMask[index][GCOMP] ? 1 : 0; - v->value_int_4[2] = ctx->Color.ColorMask[index][BCOMP] ? 1 : 0; - v->value_int_4[3] = ctx->Color.ColorMask[index][ACOMP] ? 1 : 0; - return TYPE_INT_4; - - case GL_TRANSFORM_FEEDBACK_BUFFER_START: - if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs) - goto invalid_value; - if (!ctx->Extensions.EXT_transform_feedback) - goto invalid_enum; - v->value_int64 = ctx->TransformFeedback.CurrentObject->Offset[index]; - return TYPE_INT64; - - case GL_TRANSFORM_FEEDBACK_BUFFER_SIZE: - if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs) - goto invalid_value; - if (!ctx->Extensions.EXT_transform_feedback) - goto invalid_enum; - v->value_int64 = ctx->TransformFeedback.CurrentObject->Size[index]; - return TYPE_INT64; - - case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING: - if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs) - goto invalid_value; - if (!ctx->Extensions.EXT_transform_feedback) - goto invalid_enum; - v->value_int = ctx->TransformFeedback.CurrentObject->Buffers[index]->Name; - return TYPE_INT; - } - - invalid_enum: - _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func, - _mesa_lookup_enum_by_nr(pname)); - return TYPE_INVALID; - invalid_value: - _mesa_error(ctx, GL_INVALID_VALUE, "%s(pname=%s)", func, - _mesa_lookup_enum_by_nr(pname)); - return TYPE_INVALID; -} - -void GLAPIENTRY -_mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params ) -{ - union value v; - enum value_type type = - find_value_indexed("glGetBooleanIndexedv", pname, index, &v); - - switch (type) { - case TYPE_INT: - params[0] = INT_TO_BOOLEAN(v.value_int); - break; - case TYPE_INT_4: - params[0] = INT_TO_BOOLEAN(v.value_int_4[0]); - params[1] = INT_TO_BOOLEAN(v.value_int_4[1]); - params[2] = INT_TO_BOOLEAN(v.value_int_4[2]); - params[3] = INT_TO_BOOLEAN(v.value_int_4[3]); - break; - case TYPE_INT64: - params[0] = INT64_TO_BOOLEAN(v.value_int); - break; - default: - ; /* nothing - GL error was recorded */ - } -} - -void GLAPIENTRY -_mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params ) -{ - union value v; - enum value_type type = - find_value_indexed("glGetIntegerIndexedv", pname, index, &v); - - switch (type) { - case TYPE_INT: - params[0] = v.value_int; - break; - case TYPE_INT_4: - params[0] = v.value_int_4[0]; - params[1] = v.value_int_4[1]; - params[2] = v.value_int_4[2]; - params[3] = v.value_int_4[3]; - break; - case TYPE_INT64: - params[0] = INT64_TO_INT(v.value_int); - break; - default: - ; /* nothing - GL error was recorded */ - } -} - -#if FEATURE_ARB_sync -void GLAPIENTRY -_mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params ) -{ - union value v; - enum value_type type = - find_value_indexed("glGetIntegerIndexedv", pname, index, &v); - - switch (type) { - case TYPE_INT: - params[0] = v.value_int; - break; - case TYPE_INT_4: - params[0] = v.value_int_4[0]; - params[1] = v.value_int_4[1]; - params[2] = v.value_int_4[2]; - params[3] = v.value_int_4[3]; - break; - case TYPE_INT64: - params[0] = v.value_int; - break; - default: - ; /* nothing - GL error was recorded */ - } -} -#endif /* FEATURE_ARB_sync */ - -#if FEATURE_ES1 -void GLAPIENTRY -_mesa_GetFixedv(GLenum pname, GLfixed *params) -{ - const struct value_desc *d; - union value v; - GLmatrix *m; - int shift, i; - void *p; - - d = find_value("glGetDoublev", pname, &p, &v); - switch (d->type) { - case TYPE_INVALID: - break; - case TYPE_CONST: - params[0] = INT_TO_FIXED(d->offset); - break; - - case TYPE_FLOAT_4: - case TYPE_FLOATN_4: - params[3] = FLOAT_TO_FIXED(((GLfloat *) p)[3]); - case TYPE_FLOAT_3: - case TYPE_FLOATN_3: - params[2] = FLOAT_TO_FIXED(((GLfloat *) p)[2]); - case TYPE_FLOAT_2: - case TYPE_FLOATN_2: - params[1] = FLOAT_TO_FIXED(((GLfloat *) p)[1]); - case TYPE_FLOAT: - case TYPE_FLOATN: - params[0] = FLOAT_TO_FIXED(((GLfloat *) p)[0]); - break; - - case TYPE_DOUBLEN: - params[0] = FLOAT_TO_FIXED(((GLdouble *) p)[0]); - break; - - case TYPE_INT_4: - params[3] = INT_TO_FIXED(((GLint *) p)[3]); - case TYPE_INT_3: - params[2] = INT_TO_FIXED(((GLint *) p)[2]); - case TYPE_INT_2: - case TYPE_ENUM_2: - params[1] = INT_TO_FIXED(((GLint *) p)[1]); - case TYPE_INT: - case TYPE_ENUM: - params[0] = INT_TO_FIXED(((GLint *) p)[0]); - break; - - case TYPE_INT_N: - for (i = 0; i < v.value_int_n.n; i++) - params[i] = INT_TO_FIXED(v.value_int_n.ints[i]); - break; - - case TYPE_INT64: - params[0] = ((GLint64 *) p)[0]; - break; - - case TYPE_BOOLEAN: - params[0] = BOOLEAN_TO_FIXED(((GLboolean*) p)[0]); - break; - - case TYPE_MATRIX: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = FLOAT_TO_FIXED(m->m[i]); - break; - - case TYPE_MATRIX_T: - m = *(GLmatrix **) p; - for (i = 0; i < 16; i++) - params[i] = FLOAT_TO_FIXED(m->m[transpose[i]]); - break; - - case TYPE_BIT_0: - case TYPE_BIT_1: - case TYPE_BIT_2: - case TYPE_BIT_3: - case TYPE_BIT_4: - case TYPE_BIT_5: - shift = d->type - TYPE_BIT_0; - params[0] = BOOLEAN_TO_FIXED((*(GLbitfield *) p >> shift) & 1); - break; - } -} -#endif +/*
+ * Copyright (C) 2010 Brian Paul All Rights Reserved.
+ * Copyright (C) 2010 Intel Corporation
+ *
+ * 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
+ * BRIAN PAUL 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.
+ *
+ * Author: Kristian Høgsberg <krh@bitplanet.net>
+ */
+
+#include "glheader.h"
+#include "context.h"
+#include "enable.h"
+#include "enums.h"
+#include "extensions.h"
+#include "get.h"
+#include "macros.h"
+#include "mfeatures.h"
+#include "mtypes.h"
+#include "state.h"
+#include "texcompress.h"
+#include "framebuffer.h"
+
+/* This is a table driven implemetation of the glGet*v() functions.
+ * The basic idea is that most getters just look up an int somewhere
+ * in struct gl_context and then convert it to a bool or float according to
+ * which of glGetIntegerv() glGetBooleanv() etc is being called.
+ * Instead of generating code to do this, we can just record the enum
+ * value and the offset into struct gl_context in an array of structs. Then
+ * in glGet*(), we lookup the struct for the enum in question, and use
+ * the offset to get the int we need.
+ *
+ * Sometimes we need to look up a float, a boolean, a bit in a
+ * bitfield, a matrix or other types instead, so we need to track the
+ * type of the value in struct gl_context. And sometimes the value isn't in
+ * struct gl_context but in the drawbuffer, the array object, current texture
+ * unit, or maybe it's a computed value. So we need to also track
+ * where or how to find the value. Finally, we sometimes need to
+ * check that one of a number of extensions are enabled, the GL
+ * version or flush or call _mesa_update_state(). This is done by
+ * attaching optional extra information to the value description
+ * struct, it's sort of like an array of opcodes that describe extra
+ * checks or actions.
+ *
+ * Putting all this together we end up with struct value_desc below,
+ * and with a couple of macros to help, the table of struct value_desc
+ * is about as concise as the specification in the old python script.
+ */
+
+#undef CONST
+
+#define FLOAT_TO_BOOLEAN(X) ( (X) ? GL_TRUE : GL_FALSE )
+#define FLOAT_TO_FIXED(F) ( ((F) * 65536.0f > INT_MAX) ? INT_MAX : \
+ ((F) * 65536.0f < INT_MIN) ? INT_MIN : \
+ (GLint) ((F) * 65536.0f) )
+
+#define INT_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
+#define INT_TO_FIXED(I) ( ((I) > SHRT_MAX) ? INT_MAX : \
+ ((I) < SHRT_MIN) ? INT_MIN : \
+ (GLint) ((I) * 65536) )
+
+#define INT64_TO_BOOLEAN(I) ( (I) ? GL_TRUE : GL_FALSE )
+#define INT64_TO_INT(I) ( (GLint)((I > INT_MAX) ? INT_MAX : ((I < INT_MIN) ? INT_MIN : (I))) )
+
+#define BOOLEAN_TO_INT(B) ( (GLint) (B) )
+#define BOOLEAN_TO_INT64(B) ( (GLint64) (B) )
+#define BOOLEAN_TO_FLOAT(B) ( (B) ? 1.0F : 0.0F )
+#define BOOLEAN_TO_FIXED(B) ( (GLint) ((B) ? 1 : 0) << 16 )
+
+#define ENUM_TO_INT64(E) ( (GLint64) (E) )
+#define ENUM_TO_FIXED(E) (E)
+
+enum value_type {
+ TYPE_INVALID,
+ TYPE_API_MASK,
+ TYPE_INT,
+ TYPE_INT_2,
+ TYPE_INT_3,
+ TYPE_INT_4,
+ TYPE_INT_N,
+ TYPE_INT64,
+ TYPE_ENUM,
+ TYPE_ENUM_2,
+ TYPE_BOOLEAN,
+ TYPE_BIT_0,
+ TYPE_BIT_1,
+ TYPE_BIT_2,
+ TYPE_BIT_3,
+ TYPE_BIT_4,
+ TYPE_BIT_5,
+ TYPE_FLOAT,
+ TYPE_FLOAT_2,
+ TYPE_FLOAT_3,
+ TYPE_FLOAT_4,
+ TYPE_FLOATN,
+ TYPE_FLOATN_2,
+ TYPE_FLOATN_3,
+ TYPE_FLOATN_4,
+ TYPE_DOUBLEN,
+ TYPE_MATRIX,
+ TYPE_MATRIX_T,
+ TYPE_CONST
+};
+
+enum value_location {
+ LOC_BUFFER,
+ LOC_CONTEXT,
+ LOC_ARRAY,
+ LOC_TEXUNIT,
+ LOC_CUSTOM
+};
+
+enum value_extra {
+ EXTRA_END = 0x8000,
+ EXTRA_VERSION_30,
+ EXTRA_VERSION_31,
+ EXTRA_VERSION_32,
+ EXTRA_VERSION_ES2,
+ EXTRA_NEW_BUFFERS,
+ EXTRA_NEW_FRAG_CLAMP,
+ EXTRA_VALID_DRAW_BUFFER,
+ EXTRA_VALID_TEXTURE_UNIT,
+ EXTRA_FLUSH_CURRENT,
+};
+
+#define NO_EXTRA NULL
+#define NO_OFFSET 0
+
+struct value_desc {
+ GLenum pname;
+ GLubyte location; /**< enum value_location */
+ GLubyte type; /**< enum value_type */
+ int offset;
+ const int *extra;
+};
+
+union value {
+ GLfloat value_float;
+ GLfloat value_float_4[4];
+ GLmatrix *value_matrix;
+ GLint value_int;
+ GLint value_int_4[4];
+ GLint64 value_int64;
+ GLenum value_enum;
+
+ /* Sigh, see GL_COMPRESSED_TEXTURE_FORMATS_ARB handling */
+ struct {
+ GLint n, ints[100];
+ } value_int_n;
+ GLboolean value_bool;
+};
+
+#define BUFFER_FIELD(field, type) \
+ LOC_BUFFER, type, offsetof(struct gl_framebuffer, field)
+#define CONTEXT_FIELD(field, type) \
+ LOC_CONTEXT, type, offsetof(struct gl_context, field)
+#define ARRAY_FIELD(field, type) \
+ LOC_ARRAY, type, offsetof(struct gl_array_object, field)
+#define CONST(value) \
+ LOC_CONTEXT, TYPE_CONST, value
+
+#define BUFFER_INT(field) BUFFER_FIELD(field, TYPE_INT)
+#define BUFFER_ENUM(field) BUFFER_FIELD(field, TYPE_ENUM)
+#define BUFFER_BOOL(field) BUFFER_FIELD(field, TYPE_BOOLEAN)
+
+#define CONTEXT_INT(field) CONTEXT_FIELD(field, TYPE_INT)
+#define CONTEXT_INT2(field) CONTEXT_FIELD(field, TYPE_INT_2)
+#define CONTEXT_INT64(field) CONTEXT_FIELD(field, TYPE_INT64)
+#define CONTEXT_ENUM(field) CONTEXT_FIELD(field, TYPE_ENUM)
+#define CONTEXT_ENUM2(field) CONTEXT_FIELD(field, TYPE_ENUM_2)
+#define CONTEXT_BOOL(field) CONTEXT_FIELD(field, TYPE_BOOLEAN)
+#define CONTEXT_BIT0(field) CONTEXT_FIELD(field, TYPE_BIT_0)
+#define CONTEXT_BIT1(field) CONTEXT_FIELD(field, TYPE_BIT_1)
+#define CONTEXT_BIT2(field) CONTEXT_FIELD(field, TYPE_BIT_2)
+#define CONTEXT_BIT3(field) CONTEXT_FIELD(field, TYPE_BIT_3)
+#define CONTEXT_BIT4(field) CONTEXT_FIELD(field, TYPE_BIT_4)
+#define CONTEXT_BIT5(field) CONTEXT_FIELD(field, TYPE_BIT_5)
+#define CONTEXT_FLOAT(field) CONTEXT_FIELD(field, TYPE_FLOAT)
+#define CONTEXT_FLOAT2(field) CONTEXT_FIELD(field, TYPE_FLOAT_2)
+#define CONTEXT_FLOAT3(field) CONTEXT_FIELD(field, TYPE_FLOAT_3)
+#define CONTEXT_FLOAT4(field) CONTEXT_FIELD(field, TYPE_FLOAT_4)
+#define CONTEXT_MATRIX(field) CONTEXT_FIELD(field, TYPE_MATRIX)
+#define CONTEXT_MATRIX_T(field) CONTEXT_FIELD(field, TYPE_MATRIX_T)
+
+#define ARRAY_INT(field) ARRAY_FIELD(field, TYPE_INT)
+#define ARRAY_ENUM(field) ARRAY_FIELD(field, TYPE_ENUM)
+#define ARRAY_BOOL(field) ARRAY_FIELD(field, TYPE_BOOLEAN)
+
+#define EXT(f) \
+ offsetof(struct gl_extensions, f)
+
+#define EXTRA_EXT(e) \
+ static const int extra_##e[] = { \
+ EXT(e), EXTRA_END \
+ }
+
+#define EXTRA_EXT2(e1, e2) \
+ static const int extra_##e1##_##e2[] = { \
+ EXT(e1), EXT(e2), EXTRA_END \
+ }
+
+/* The 'extra' mechanism is a way to specify extra checks (such as
+ * extensions or specific gl versions) or actions (flush current, new
+ * buffers) that we need to do before looking up an enum. We need to
+ * declare them all up front so we can refer to them in the value_desc
+ * structs below. */
+
+static const int extra_new_buffers[] = {
+ EXTRA_NEW_BUFFERS,
+ EXTRA_END
+};
+
+static const int extra_new_frag_clamp[] = {
+ EXTRA_NEW_FRAG_CLAMP,
+ EXTRA_END
+};
+
+static const int extra_valid_draw_buffer[] = {
+ EXTRA_VALID_DRAW_BUFFER,
+ EXTRA_END
+};
+
+static const int extra_valid_texture_unit[] = {
+ EXTRA_VALID_TEXTURE_UNIT,
+ EXTRA_END
+};
+
+static const int extra_flush_current_valid_texture_unit[] = {
+ EXTRA_FLUSH_CURRENT,
+ EXTRA_VALID_TEXTURE_UNIT,
+ EXTRA_END
+};
+
+static const int extra_flush_current[] = {
+ EXTRA_FLUSH_CURRENT,
+ EXTRA_END
+};
+
+static const int extra_new_buffers_OES_read_format[] = {
+ EXTRA_NEW_BUFFERS,
+ EXT(OES_read_format),
+ EXTRA_END
+};
+
+static const int extra_EXT_secondary_color_flush_current[] = {
+ EXT(EXT_secondary_color),
+ EXTRA_FLUSH_CURRENT,
+ EXTRA_END
+};
+
+static const int extra_EXT_fog_coord_flush_current[] = {
+ EXT(EXT_fog_coord),
+ EXTRA_FLUSH_CURRENT,
+ EXTRA_END
+};
+
+static const int extra_EXT_texture_integer[] = {
+ EXT(EXT_texture_integer),
+ EXTRA_END
+};
+
+static const int extra_EXT_gpu_shader4[] = {
+ EXT(EXT_gpu_shader4),
+ EXTRA_END
+};
+
+
+EXTRA_EXT(ARB_ES2_compatibility);
+EXTRA_EXT(ARB_multitexture);
+EXTRA_EXT(ARB_texture_cube_map);
+EXTRA_EXT(MESA_texture_array);
+EXTRA_EXT2(EXT_secondary_color, ARB_vertex_program);
+EXTRA_EXT(EXT_secondary_color);
+EXTRA_EXT(EXT_fog_coord);
+EXTRA_EXT(EXT_texture_lod_bias);
+EXTRA_EXT(EXT_texture_filter_anisotropic);
+EXTRA_EXT(IBM_rasterpos_clip);
+EXTRA_EXT(NV_point_sprite);
+EXTRA_EXT(SGIS_generate_mipmap);
+EXTRA_EXT(NV_vertex_program);
+EXTRA_EXT(NV_fragment_program);
+EXTRA_EXT(NV_texture_rectangle);
+EXTRA_EXT(EXT_stencil_two_side);
+EXTRA_EXT(NV_light_max_exponent);
+EXTRA_EXT(EXT_depth_bounds_test);
+EXTRA_EXT(ARB_depth_clamp);
+EXTRA_EXT(ATI_fragment_shader);
+EXTRA_EXT(EXT_framebuffer_blit);
+EXTRA_EXT(ARB_shader_objects);
+EXTRA_EXT(EXT_provoking_vertex);
+EXTRA_EXT(ARB_fragment_shader);
+EXTRA_EXT(ARB_fragment_program);
+EXTRA_EXT2(ARB_framebuffer_object, EXT_framebuffer_multisample);
+EXTRA_EXT(EXT_framebuffer_object);
+EXTRA_EXT(APPLE_vertex_array_object);
+EXTRA_EXT(ARB_seamless_cube_map);
+EXTRA_EXT(EXT_compiled_vertex_array);
+EXTRA_EXT(ARB_sync);
+EXTRA_EXT(ARB_vertex_shader);
+EXTRA_EXT(EXT_transform_feedback);
+EXTRA_EXT(ARB_transform_feedback2);
+EXTRA_EXT(EXT_pixel_buffer_object);
+EXTRA_EXT(ARB_vertex_program);
+EXTRA_EXT2(NV_point_sprite, ARB_point_sprite);
+EXTRA_EXT2(ARB_fragment_program, NV_fragment_program);
+EXTRA_EXT2(ARB_vertex_program, NV_vertex_program);
+EXTRA_EXT2(ARB_vertex_program, ARB_fragment_program);
+EXTRA_EXT(ARB_vertex_buffer_object);
+EXTRA_EXT(ARB_geometry_shader4);
+EXTRA_EXT(ARB_copy_buffer);
+EXTRA_EXT(EXT_framebuffer_sRGB);
+EXTRA_EXT(ARB_texture_buffer_object);
+
+static const int
+extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = {
+ EXT(ARB_vertex_program),
+ EXT(ARB_fragment_program),
+ EXT(NV_vertex_program),
+ EXTRA_END
+};
+
+static const int
+extra_NV_vertex_program_ARB_vertex_program_ARB_fragment_program_NV_vertex_program[] = {
+ EXT(NV_vertex_program),
+ EXT(ARB_vertex_program),
+ EXT(ARB_fragment_program),
+ EXT(NV_vertex_program),
+ EXTRA_END
+};
+
+static const int
+extra_NV_primitive_restart[] = {
+ EXT(NV_primitive_restart),
+ EXTRA_END
+};
+
+static const int extra_version_30[] = { EXTRA_VERSION_30, EXTRA_END };
+static const int extra_version_31[] = { EXTRA_VERSION_31, EXTRA_END };
+static const int extra_version_32[] = { EXTRA_VERSION_32, EXTRA_END };
+
+static const int
+extra_ARB_vertex_program_version_es2[] = {
+ EXT(ARB_vertex_program),
+ EXTRA_VERSION_ES2,
+ EXTRA_END
+};
+
+#define API_OPENGL_BIT (1 << API_OPENGL)
+#define API_OPENGLES_BIT (1 << API_OPENGLES)
+#define API_OPENGLES2_BIT (1 << API_OPENGLES2)
+
+/* This is the big table describing all the enums we accept in
+ * glGet*v(). The table is partitioned into six parts: enums
+ * understood by all GL APIs (OpenGL, GLES and GLES2), enums shared
+ * between OpenGL and GLES, enums exclusive to GLES, etc for the
+ * remaining combinations. When we add the enums to the hash table in
+ * _mesa_init_get_hash(), we only add the enums for the API we're
+ * instantiating and the different sections are guarded by #if
+ * FEATURE_GL etc to make sure we only compile in the enums we may
+ * need. */
+
+static const struct value_desc values[] = {
+ /* Enums shared between OpenGL, GLES1 and GLES2 */
+ { 0, 0, TYPE_API_MASK,
+ API_OPENGL_BIT | API_OPENGLES_BIT | API_OPENGLES2_BIT, NO_EXTRA},
+ { GL_ALPHA_BITS, BUFFER_INT(Visual.alphaBits), extra_new_buffers },
+ { GL_BLEND, CONTEXT_BIT0(Color.BlendEnabled), NO_EXTRA },
+ { GL_BLEND_SRC, CONTEXT_ENUM(Color.Blend[0].SrcRGB), NO_EXTRA },
+ { GL_BLUE_BITS, BUFFER_INT(Visual.blueBits), extra_new_buffers },
+ { GL_COLOR_CLEAR_VALUE, LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp },
+ { GL_COLOR_WRITEMASK, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA },
+ { GL_CULL_FACE, CONTEXT_BOOL(Polygon.CullFlag), NO_EXTRA },
+ { GL_CULL_FACE_MODE, CONTEXT_ENUM(Polygon.CullFaceMode), NO_EXTRA },
+ { GL_DEPTH_BITS, BUFFER_INT(Visual.depthBits), NO_EXTRA },
+ { GL_DEPTH_CLEAR_VALUE, CONTEXT_FIELD(Depth.Clear, TYPE_DOUBLEN), NO_EXTRA },
+ { GL_DEPTH_FUNC, CONTEXT_ENUM(Depth.Func), NO_EXTRA },
+ { GL_DEPTH_RANGE, CONTEXT_FIELD(Viewport.Near, TYPE_FLOATN_2), NO_EXTRA },
+ { GL_DEPTH_TEST, CONTEXT_BOOL(Depth.Test), NO_EXTRA },
+ { GL_DEPTH_WRITEMASK, CONTEXT_BOOL(Depth.Mask), NO_EXTRA },
+ { GL_DITHER, CONTEXT_BOOL(Color.DitherFlag), NO_EXTRA },
+ { GL_FRONT_FACE, CONTEXT_ENUM(Polygon.FrontFace), NO_EXTRA },
+ { GL_GREEN_BITS, BUFFER_INT(Visual.greenBits), extra_new_buffers },
+ { GL_LINE_WIDTH, CONTEXT_FLOAT(Line.Width), NO_EXTRA },
+ { GL_ALIASED_LINE_WIDTH_RANGE, CONTEXT_FLOAT2(Const.MinLineWidth), NO_EXTRA },
+ { GL_MAX_ELEMENTS_VERTICES, CONTEXT_INT(Const.MaxArrayLockSize), NO_EXTRA },
+ { GL_MAX_ELEMENTS_INDICES, CONTEXT_INT(Const.MaxArrayLockSize), NO_EXTRA },
+ { GL_MAX_TEXTURE_SIZE, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_context, Const.MaxTextureLevels), NO_EXTRA },
+ { GL_MAX_VIEWPORT_DIMS, CONTEXT_INT2(Const.MaxViewportWidth), NO_EXTRA },
+ { GL_PACK_ALIGNMENT, CONTEXT_INT(Pack.Alignment), NO_EXTRA },
+ { GL_ALIASED_POINT_SIZE_RANGE, CONTEXT_FLOAT2(Const.MinPointSize), NO_EXTRA },
+ { GL_POLYGON_OFFSET_FACTOR, CONTEXT_FLOAT(Polygon.OffsetFactor ), NO_EXTRA },
+ { GL_POLYGON_OFFSET_UNITS, CONTEXT_FLOAT(Polygon.OffsetUnits ), NO_EXTRA },
+ { GL_POLYGON_OFFSET_FILL, CONTEXT_BOOL(Polygon.OffsetFill), NO_EXTRA },
+ { GL_RED_BITS, BUFFER_INT(Visual.redBits), extra_new_buffers },
+ { GL_SCISSOR_BOX, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA },
+ { GL_SCISSOR_TEST, CONTEXT_BOOL(Scissor.Enabled), NO_EXTRA },
+ { GL_STENCIL_BITS, BUFFER_INT(Visual.stencilBits), NO_EXTRA },
+ { GL_STENCIL_CLEAR_VALUE, CONTEXT_INT(Stencil.Clear), NO_EXTRA },
+ { GL_STENCIL_FAIL, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA },
+ { GL_STENCIL_FUNC, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA },
+ { GL_STENCIL_PASS_DEPTH_FAIL, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA },
+ { GL_STENCIL_PASS_DEPTH_PASS, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA },
+ { GL_STENCIL_REF, LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA },
+ { GL_STENCIL_TEST, CONTEXT_BOOL(Stencil.Enabled), NO_EXTRA },
+ { GL_STENCIL_VALUE_MASK, LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA },
+ { GL_STENCIL_WRITEMASK, LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA },
+ { GL_SUBPIXEL_BITS, CONTEXT_INT(Const.SubPixelBits), NO_EXTRA },
+ { GL_TEXTURE_BINDING_2D, LOC_CUSTOM, TYPE_INT, TEXTURE_2D_INDEX, NO_EXTRA },
+ { GL_UNPACK_ALIGNMENT, CONTEXT_INT(Unpack.Alignment), NO_EXTRA },
+ { GL_VIEWPORT, LOC_CUSTOM, TYPE_INT_4, 0, NO_EXTRA },
+
+ /* GL_ARB_multitexture */
+ { GL_ACTIVE_TEXTURE_ARB,
+ LOC_CUSTOM, TYPE_INT, 0, extra_ARB_multitexture },
+
+ /* Note that all the OES_* extensions require that the Mesa "struct
+ * gl_extensions" include a member with the name of the extension.
+ * That structure does not yet include OES extensions (and we're
+ * not sure whether it will). If it does, all the OES_*
+ * extensions below should mark the dependency. */
+
+ /* GL_ARB_texture_cube_map */
+ { GL_TEXTURE_BINDING_CUBE_MAP_ARB, LOC_CUSTOM, TYPE_INT,
+ TEXTURE_CUBE_INDEX, extra_ARB_texture_cube_map },
+ { GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_context, Const.MaxCubeTextureLevels),
+ extra_ARB_texture_cube_map }, /* XXX: OES_texture_cube_map */
+
+ /* XXX: OES_blend_subtract */
+ { GL_BLEND_SRC_RGB_EXT, CONTEXT_ENUM(Color.Blend[0].SrcRGB), NO_EXTRA },
+ { GL_BLEND_DST_RGB_EXT, CONTEXT_ENUM(Color.Blend[0].DstRGB), NO_EXTRA },
+ { GL_BLEND_SRC_ALPHA_EXT, CONTEXT_ENUM(Color.Blend[0].SrcA), NO_EXTRA },
+ { GL_BLEND_DST_ALPHA_EXT, CONTEXT_ENUM(Color.Blend[0].DstA), NO_EXTRA },
+
+ /* GL_BLEND_EQUATION_RGB, which is what we're really after, is
+ * defined identically to GL_BLEND_EQUATION. */
+ { GL_BLEND_EQUATION, CONTEXT_ENUM(Color.Blend[0].EquationRGB), NO_EXTRA },
+ { GL_BLEND_EQUATION_ALPHA_EXT, CONTEXT_ENUM(Color.Blend[0].EquationA), NO_EXTRA },
+
+ /* GL_ARB_texture_compression */
+ { GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
+ { GL_COMPRESSED_TEXTURE_FORMATS_ARB, LOC_CUSTOM, TYPE_INT_N, 0, NO_EXTRA },
+
+ /* GL_ARB_multisample */
+ { GL_SAMPLE_ALPHA_TO_COVERAGE_ARB,
+ CONTEXT_BOOL(Multisample.SampleAlphaToCoverage), NO_EXTRA },
+ { GL_SAMPLE_COVERAGE_ARB, CONTEXT_BOOL(Multisample.SampleCoverage), NO_EXTRA },
+ { GL_SAMPLE_COVERAGE_VALUE_ARB,
+ CONTEXT_FLOAT(Multisample.SampleCoverageValue), NO_EXTRA },
+ { GL_SAMPLE_COVERAGE_INVERT_ARB,
+ CONTEXT_BOOL(Multisample.SampleCoverageInvert), NO_EXTRA },
+ { GL_SAMPLE_BUFFERS_ARB, BUFFER_INT(Visual.sampleBuffers), NO_EXTRA },
+ { GL_SAMPLES_ARB, BUFFER_INT(Visual.samples), NO_EXTRA },
+
+ /* GL_SGIS_generate_mipmap */
+ { GL_GENERATE_MIPMAP_HINT_SGIS, CONTEXT_ENUM(Hint.GenerateMipmap),
+ extra_SGIS_generate_mipmap },
+
+ /* GL_ARB_vertex_buffer_object */
+ { GL_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
+
+ /* GL_ARB_vertex_buffer_object */
+ /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB - not supported */
+ { GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_vertex_buffer_object },
+
+ /* GL_ARB_copy_buffer */
+ { GL_COPY_READ_BUFFER, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_copy_buffer },
+ { GL_COPY_WRITE_BUFFER, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_copy_buffer },
+
+ /* GL_OES_read_format */
+ { GL_IMPLEMENTATION_COLOR_READ_TYPE_OES, LOC_CUSTOM, TYPE_INT, 0,
+ extra_new_buffers_OES_read_format },
+ { GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES, LOC_CUSTOM, TYPE_INT, 0,
+ extra_new_buffers_OES_read_format },
+
+ /* GL_EXT_framebuffer_object */
+ { GL_FRAMEBUFFER_BINDING_EXT, BUFFER_INT(Name),
+ extra_EXT_framebuffer_object },
+ { GL_RENDERBUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0,
+ extra_EXT_framebuffer_object },
+ { GL_MAX_RENDERBUFFER_SIZE_EXT, CONTEXT_INT(Const.MaxRenderbufferSize),
+ extra_EXT_framebuffer_object },
+
+ /* This entry isn't spec'ed for GLES 2, but is needed for Mesa's
+ * GLSL: */
+ { GL_MAX_CLIP_PLANES, CONTEXT_INT(Const.MaxClipPlanes), NO_EXTRA },
+
+#if FEATURE_GL || FEATURE_ES1
+ /* Enums in OpenGL and GLES1 */
+ { 0, 0, TYPE_API_MASK, API_OPENGL_BIT | API_OPENGLES_BIT, NO_EXTRA },
+ { GL_LIGHT0, CONTEXT_BOOL(Light.Light[0].Enabled), NO_EXTRA },
+ { GL_LIGHT1, CONTEXT_BOOL(Light.Light[1].Enabled), NO_EXTRA },
+ { GL_LIGHT2, CONTEXT_BOOL(Light.Light[2].Enabled), NO_EXTRA },
+ { GL_LIGHT3, CONTEXT_BOOL(Light.Light[3].Enabled), NO_EXTRA },
+ { GL_LIGHT4, CONTEXT_BOOL(Light.Light[4].Enabled), NO_EXTRA },
+ { GL_LIGHT5, CONTEXT_BOOL(Light.Light[5].Enabled), NO_EXTRA },
+ { GL_LIGHT6, CONTEXT_BOOL(Light.Light[6].Enabled), NO_EXTRA },
+ { GL_LIGHT7, CONTEXT_BOOL(Light.Light[7].Enabled), NO_EXTRA },
+ { GL_LIGHTING, CONTEXT_BOOL(Light.Enabled), NO_EXTRA },
+ { GL_LIGHT_MODEL_AMBIENT,
+ CONTEXT_FIELD(Light.Model.Ambient[0], TYPE_FLOATN_4), NO_EXTRA },
+ { GL_LIGHT_MODEL_TWO_SIDE, CONTEXT_BOOL(Light.Model.TwoSide), NO_EXTRA },
+ { GL_ALPHA_TEST, CONTEXT_BOOL(Color.AlphaEnabled), NO_EXTRA },
+ { GL_ALPHA_TEST_FUNC, CONTEXT_ENUM(Color.AlphaFunc), NO_EXTRA },
+ { GL_ALPHA_TEST_REF, LOC_CUSTOM, TYPE_FLOATN, 0, extra_new_frag_clamp },
+ { GL_BLEND_DST, CONTEXT_ENUM(Color.Blend[0].DstRGB), NO_EXTRA },
+ { GL_CLIP_PLANE0, CONTEXT_BIT0(Transform.ClipPlanesEnabled), NO_EXTRA },
+ { GL_CLIP_PLANE1, CONTEXT_BIT1(Transform.ClipPlanesEnabled), NO_EXTRA },
+ { GL_CLIP_PLANE2, CONTEXT_BIT2(Transform.ClipPlanesEnabled), NO_EXTRA },
+ { GL_CLIP_PLANE3, CONTEXT_BIT3(Transform.ClipPlanesEnabled), NO_EXTRA },
+ { GL_CLIP_PLANE4, CONTEXT_BIT4(Transform.ClipPlanesEnabled), NO_EXTRA },
+ { GL_CLIP_PLANE5, CONTEXT_BIT5(Transform.ClipPlanesEnabled), NO_EXTRA },
+ { GL_COLOR_MATERIAL, CONTEXT_BOOL(Light.ColorMaterialEnabled), NO_EXTRA },
+ { GL_CURRENT_COLOR,
+ CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_COLOR0][0], TYPE_FLOATN_4),
+ extra_flush_current },
+ { GL_CURRENT_NORMAL,
+ CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_NORMAL][0], TYPE_FLOATN_3),
+ extra_flush_current },
+ { GL_CURRENT_TEXTURE_COORDS, LOC_CUSTOM, TYPE_FLOAT_4, 0,
+ extra_flush_current_valid_texture_unit },
+ { GL_DISTANCE_ATTENUATION_EXT, CONTEXT_FLOAT3(Point.Params[0]), NO_EXTRA },
+ { GL_FOG, CONTEXT_BOOL(Fog.Enabled), NO_EXTRA },
+ { GL_FOG_COLOR, LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp },
+ { GL_FOG_DENSITY, CONTEXT_FLOAT(Fog.Density), NO_EXTRA },
+ { GL_FOG_END, CONTEXT_FLOAT(Fog.End), NO_EXTRA },
+ { GL_FOG_HINT, CONTEXT_ENUM(Hint.Fog), NO_EXTRA },
+ { GL_FOG_MODE, CONTEXT_ENUM(Fog.Mode), NO_EXTRA },
+ { GL_FOG_START, CONTEXT_FLOAT(Fog.Start), NO_EXTRA },
+ { GL_LINE_SMOOTH, CONTEXT_BOOL(Line.SmoothFlag), NO_EXTRA },
+ { GL_LINE_SMOOTH_HINT, CONTEXT_ENUM(Hint.LineSmooth), NO_EXTRA },
+ { GL_LINE_WIDTH_RANGE, CONTEXT_FLOAT2(Const.MinLineWidthAA), NO_EXTRA },
+ { GL_COLOR_LOGIC_OP, CONTEXT_BOOL(Color.ColorLogicOpEnabled), NO_EXTRA },
+ { GL_LOGIC_OP_MODE, CONTEXT_ENUM(Color.LogicOp), NO_EXTRA },
+ { GL_MATRIX_MODE, CONTEXT_ENUM(Transform.MatrixMode), NO_EXTRA },
+ { GL_MAX_MODELVIEW_STACK_DEPTH, CONST(MAX_MODELVIEW_STACK_DEPTH), NO_EXTRA },
+ { GL_MAX_PROJECTION_STACK_DEPTH, CONST(MAX_PROJECTION_STACK_DEPTH), NO_EXTRA },
+ { GL_MAX_TEXTURE_STACK_DEPTH, CONST(MAX_TEXTURE_STACK_DEPTH), NO_EXTRA },
+ { GL_MODELVIEW_MATRIX, CONTEXT_MATRIX(ModelviewMatrixStack.Top), NO_EXTRA },
+ { GL_MODELVIEW_STACK_DEPTH, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_context, ModelviewMatrixStack.Depth), NO_EXTRA },
+ { GL_NORMALIZE, CONTEXT_BOOL(Transform.Normalize), NO_EXTRA },
+ { GL_PACK_SKIP_IMAGES_EXT, CONTEXT_INT(Pack.SkipImages), NO_EXTRA },
+ { GL_PERSPECTIVE_CORRECTION_HINT, CONTEXT_ENUM(Hint.PerspectiveCorrection), NO_EXTRA },
+ { GL_POINT_SIZE, CONTEXT_FLOAT(Point.Size), NO_EXTRA },
+ { GL_POINT_SIZE_RANGE, CONTEXT_FLOAT2(Const.MinPointSizeAA), NO_EXTRA },
+ { GL_POINT_SMOOTH, CONTEXT_BOOL(Point.SmoothFlag), NO_EXTRA },
+ { GL_POINT_SMOOTH_HINT, CONTEXT_ENUM(Hint.PointSmooth), NO_EXTRA },
+ { GL_POINT_SIZE_MIN_EXT, CONTEXT_FLOAT(Point.MinSize), NO_EXTRA },
+ { GL_POINT_SIZE_MAX_EXT, CONTEXT_FLOAT(Point.MaxSize), NO_EXTRA },
+ { GL_POINT_FADE_THRESHOLD_SIZE_EXT, CONTEXT_FLOAT(Point.Threshold), NO_EXTRA },
+ { GL_PROJECTION_MATRIX, CONTEXT_MATRIX(ProjectionMatrixStack.Top), NO_EXTRA },
+ { GL_PROJECTION_STACK_DEPTH, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_context, ProjectionMatrixStack.Depth), NO_EXTRA },
+ { GL_RESCALE_NORMAL, CONTEXT_BOOL(Transform.RescaleNormals), NO_EXTRA },
+ { GL_SHADE_MODEL, CONTEXT_ENUM(Light.ShadeModel), NO_EXTRA },
+ { GL_TEXTURE_2D, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA },
+ { GL_TEXTURE_MATRIX, LOC_CUSTOM, TYPE_MATRIX, 0, extra_valid_texture_unit },
+ { GL_TEXTURE_STACK_DEPTH, LOC_CUSTOM, TYPE_INT, 0,
+ extra_valid_texture_unit },
+
+ { GL_VERTEX_ARRAY, ARRAY_BOOL(Vertex.Enabled), NO_EXTRA },
+ { GL_VERTEX_ARRAY_SIZE, ARRAY_INT(Vertex.Size), NO_EXTRA },
+ { GL_VERTEX_ARRAY_TYPE, ARRAY_ENUM(Vertex.Type), NO_EXTRA },
+ { GL_VERTEX_ARRAY_STRIDE, ARRAY_INT(Vertex.Stride), NO_EXTRA },
+ { GL_NORMAL_ARRAY, ARRAY_BOOL(Normal.Enabled), NO_EXTRA },
+ { GL_NORMAL_ARRAY_TYPE, ARRAY_ENUM(Normal.Type), NO_EXTRA },
+ { GL_NORMAL_ARRAY_STRIDE, ARRAY_INT(Normal.Stride), NO_EXTRA },
+ { GL_COLOR_ARRAY, ARRAY_BOOL(Color.Enabled), NO_EXTRA },
+ { GL_COLOR_ARRAY_SIZE, ARRAY_INT(Color.Size), NO_EXTRA },
+ { GL_COLOR_ARRAY_TYPE, ARRAY_ENUM(Color.Type), NO_EXTRA },
+ { GL_COLOR_ARRAY_STRIDE, ARRAY_INT(Color.Stride), NO_EXTRA },
+ { GL_TEXTURE_COORD_ARRAY,
+ LOC_CUSTOM, TYPE_BOOLEAN, offsetof(struct gl_client_array, Enabled), NO_EXTRA },
+ { GL_TEXTURE_COORD_ARRAY_SIZE,
+ LOC_CUSTOM, TYPE_INT, offsetof(struct gl_client_array, Size), NO_EXTRA },
+ { GL_TEXTURE_COORD_ARRAY_TYPE,
+ LOC_CUSTOM, TYPE_ENUM, offsetof(struct gl_client_array, Type), NO_EXTRA },
+ { GL_TEXTURE_COORD_ARRAY_STRIDE,
+ LOC_CUSTOM, TYPE_INT, offsetof(struct gl_client_array, Stride), NO_EXTRA },
+
+ /* GL_ARB_ES2_compatibility */
+ { GL_SHADER_COMPILER, CONST(1), extra_ARB_ES2_compatibility },
+ { GL_MAX_VARYING_VECTORS, CONTEXT_INT(Const.MaxVarying),
+ extra_ARB_ES2_compatibility },
+ { GL_MAX_VERTEX_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_ES2_compatibility },
+ { GL_MAX_FRAGMENT_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_ES2_compatibility },
+
+ /* GL_ARB_multitexture */
+ { GL_MAX_TEXTURE_UNITS_ARB,
+ CONTEXT_INT(Const.MaxTextureUnits), extra_ARB_multitexture },
+ { GL_CLIENT_ACTIVE_TEXTURE_ARB,
+ LOC_CUSTOM, TYPE_INT, 0, extra_ARB_multitexture },
+
+ /* GL_ARB_texture_cube_map */
+ { GL_TEXTURE_CUBE_MAP_ARB, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA },
+ /* S, T, and R are always set at the same time */
+ { GL_TEXTURE_GEN_STR_OES, LOC_TEXUNIT, TYPE_BIT_0,
+ offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA },
+
+ /* GL_ARB_multisample */
+ { GL_MULTISAMPLE_ARB, CONTEXT_BOOL(Multisample.Enabled), NO_EXTRA },
+ { GL_SAMPLE_ALPHA_TO_ONE_ARB, CONTEXT_BOOL(Multisample.SampleAlphaToOne), NO_EXTRA },
+
+ /* GL_ARB_vertex_buffer_object */
+ { GL_VERTEX_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, Vertex.BufferObj), NO_EXTRA },
+ { GL_NORMAL_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, Normal.BufferObj), NO_EXTRA },
+ { GL_COLOR_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, Color.BufferObj), NO_EXTRA },
+ { GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA },
+
+ /* GL_OES_point_sprite */
+ { GL_POINT_SPRITE_NV,
+ CONTEXT_BOOL(Point.PointSprite),
+ extra_NV_point_sprite_ARB_point_sprite },
+
+ /* GL_ARB_fragment_shader */
+ { GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB,
+ CONTEXT_INT(Const.FragmentProgram.MaxUniformComponents),
+ extra_ARB_fragment_shader },
+
+ /* GL_ARB_vertex_shader */
+ { GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB,
+ CONTEXT_INT(Const.VertexProgram.MaxUniformComponents),
+ extra_ARB_vertex_shader },
+ { GL_MAX_VARYING_FLOATS_ARB, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_vertex_shader },
+
+ /* GL_EXT_texture_lod_bias */
+ { GL_MAX_TEXTURE_LOD_BIAS_EXT, CONTEXT_FLOAT(Const.MaxTextureLodBias),
+ extra_EXT_texture_lod_bias },
+
+ /* GL_EXT_texture_filter_anisotropic */
+ { GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT,
+ CONTEXT_FLOAT(Const.MaxTextureMaxAnisotropy),
+ extra_EXT_texture_filter_anisotropic },
+#endif /* FEATURE_GL || FEATURE_ES1 */
+
+#if FEATURE_ES1
+ { 0, 0, TYPE_API_MASK, API_OPENGLES_BIT },
+ /* XXX: OES_matrix_get */
+ { GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES },
+ { GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES },
+ { GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES },
+
+ /* OES_point_size_array */
+ { GL_POINT_SIZE_ARRAY_OES, ARRAY_FIELD(PointSize.Enabled, TYPE_BOOLEAN) },
+ { GL_POINT_SIZE_ARRAY_TYPE_OES, ARRAY_FIELD(PointSize.Type, TYPE_ENUM) },
+ { GL_POINT_SIZE_ARRAY_STRIDE_OES, ARRAY_FIELD(PointSize.Stride, TYPE_INT) },
+ { GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES, LOC_CUSTOM, TYPE_INT, 0 },
+#endif /* FEATURE_ES1 */
+
+#if FEATURE_GL || FEATURE_ES2
+ { 0, 0, TYPE_API_MASK, API_OPENGL_BIT | API_OPENGLES2_BIT, NO_EXTRA },
+ /* This entry isn't spec'ed for GLES 2, but is needed for Mesa's GLSL: */
+ { GL_MAX_LIGHTS, CONTEXT_INT(Const.MaxLights), NO_EXTRA },
+ { GL_MAX_TEXTURE_COORDS_ARB, /* == GL_MAX_TEXTURE_COORDS_NV */
+ CONTEXT_INT(Const.MaxTextureCoordUnits),
+ extra_ARB_fragment_program_NV_fragment_program },
+
+ /* GL_ARB_draw_buffers */
+ { GL_MAX_DRAW_BUFFERS_ARB, CONTEXT_INT(Const.MaxDrawBuffers), NO_EXTRA },
+
+ { GL_BLEND_COLOR_EXT, LOC_CUSTOM, TYPE_FLOATN_4, 0, extra_new_frag_clamp },
+ /* GL_ARB_fragment_program */
+ { GL_MAX_TEXTURE_IMAGE_UNITS_ARB, /* == GL_MAX_TEXTURE_IMAGE_UNITS_NV */
+ CONTEXT_INT(Const.MaxTextureImageUnits),
+ extra_ARB_fragment_program_NV_fragment_program },
+ { GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB,
+ CONTEXT_INT(Const.MaxVertexTextureImageUnits), extra_ARB_vertex_shader },
+ { GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB,
+ CONTEXT_INT(Const.MaxCombinedTextureImageUnits),
+ extra_ARB_vertex_shader },
+
+ /* GL_ARB_shader_objects
+ * Actually, this token isn't part of GL_ARB_shader_objects, but is
+ * close enough for now. */
+ { GL_CURRENT_PROGRAM, LOC_CUSTOM, TYPE_INT, 0, extra_ARB_shader_objects },
+
+ /* OpenGL 2.0 */
+ { GL_STENCIL_BACK_FUNC, CONTEXT_ENUM(Stencil.Function[1]), NO_EXTRA },
+ { GL_STENCIL_BACK_VALUE_MASK, CONTEXT_INT(Stencil.ValueMask[1]), NO_EXTRA },
+ { GL_STENCIL_BACK_WRITEMASK, CONTEXT_INT(Stencil.WriteMask[1]), NO_EXTRA },
+ { GL_STENCIL_BACK_REF, CONTEXT_INT(Stencil.Ref[1]), NO_EXTRA },
+ { GL_STENCIL_BACK_FAIL, CONTEXT_ENUM(Stencil.FailFunc[1]), NO_EXTRA },
+ { GL_STENCIL_BACK_PASS_DEPTH_FAIL, CONTEXT_ENUM(Stencil.ZFailFunc[1]), NO_EXTRA },
+ { GL_STENCIL_BACK_PASS_DEPTH_PASS, CONTEXT_ENUM(Stencil.ZPassFunc[1]), NO_EXTRA },
+
+ { GL_MAX_VERTEX_ATTRIBS_ARB,
+ CONTEXT_INT(Const.VertexProgram.MaxAttribs),
+ extra_ARB_vertex_program_version_es2 },
+
+ /* OES_texture_3D */
+ { GL_TEXTURE_BINDING_3D, LOC_CUSTOM, TYPE_INT, TEXTURE_3D_INDEX, NO_EXTRA },
+ { GL_MAX_3D_TEXTURE_SIZE, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_context, Const.Max3DTextureLevels), NO_EXTRA },
+
+ /* GL_ARB_fragment_program/OES_standard_derivatives */
+ { GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB,
+ CONTEXT_ENUM(Hint.FragmentShaderDerivative), extra_ARB_fragment_shader },
+#endif /* FEATURE_GL || FEATURE_ES2 */
+
+#if FEATURE_ES2
+ /* Enums unique to OpenGL ES 2.0 */
+ { 0, 0, TYPE_API_MASK, API_OPENGLES2_BIT, NO_EXTRA },
+ { GL_MAX_FRAGMENT_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
+ { GL_MAX_VARYING_VECTORS, CONTEXT_INT(Const.MaxVarying), NO_EXTRA },
+ { GL_MAX_VERTEX_UNIFORM_VECTORS, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
+ { GL_SHADER_COMPILER, CONST(1), NO_EXTRA },
+ /* OES_get_program_binary */
+ { GL_NUM_SHADER_BINARY_FORMATS, CONST(0), NO_EXTRA },
+ { GL_SHADER_BINARY_FORMATS, CONST(0), NO_EXTRA },
+#endif /* FEATURE_ES2 */
+
+#if FEATURE_GL
+ /* Remaining enums are only in OpenGL */
+ { 0, 0, TYPE_API_MASK, API_OPENGL_BIT, NO_EXTRA },
+ { GL_ACCUM_RED_BITS, BUFFER_INT(Visual.accumRedBits), NO_EXTRA },
+ { GL_ACCUM_GREEN_BITS, BUFFER_INT(Visual.accumGreenBits), NO_EXTRA },
+ { GL_ACCUM_BLUE_BITS, BUFFER_INT(Visual.accumBlueBits), NO_EXTRA },
+ { GL_ACCUM_ALPHA_BITS, BUFFER_INT(Visual.accumAlphaBits), NO_EXTRA },
+ { GL_ACCUM_CLEAR_VALUE, CONTEXT_FIELD(Accum.ClearColor[0], TYPE_FLOATN_4), NO_EXTRA },
+ { GL_ALPHA_BIAS, CONTEXT_FLOAT(Pixel.AlphaBias), NO_EXTRA },
+ { GL_ALPHA_SCALE, CONTEXT_FLOAT(Pixel.AlphaScale), NO_EXTRA },
+ { GL_ATTRIB_STACK_DEPTH, CONTEXT_INT(AttribStackDepth), NO_EXTRA },
+ { GL_AUTO_NORMAL, CONTEXT_BOOL(Eval.AutoNormal), NO_EXTRA },
+ { GL_AUX_BUFFERS, BUFFER_INT(Visual.numAuxBuffers), NO_EXTRA },
+ { GL_BLUE_BIAS, CONTEXT_FLOAT(Pixel.BlueBias), NO_EXTRA },
+ { GL_BLUE_SCALE, CONTEXT_FLOAT(Pixel.BlueScale), NO_EXTRA },
+ { GL_CLIENT_ATTRIB_STACK_DEPTH, CONTEXT_INT(ClientAttribStackDepth), NO_EXTRA },
+ { GL_COLOR_MATERIAL_FACE, CONTEXT_ENUM(Light.ColorMaterialFace), NO_EXTRA },
+ { GL_COLOR_MATERIAL_PARAMETER, CONTEXT_ENUM(Light.ColorMaterialMode), NO_EXTRA },
+ { GL_CURRENT_INDEX,
+ CONTEXT_FLOAT(Current.Attrib[VERT_ATTRIB_COLOR_INDEX][0]),
+ extra_flush_current },
+ { GL_CURRENT_RASTER_COLOR,
+ CONTEXT_FIELD(Current.RasterColor[0], TYPE_FLOATN_4), NO_EXTRA },
+ { GL_CURRENT_RASTER_DISTANCE, CONTEXT_FLOAT(Current.RasterDistance), NO_EXTRA },
+ { GL_CURRENT_RASTER_INDEX, CONST(1), NO_EXTRA },
+ { GL_CURRENT_RASTER_POSITION, CONTEXT_FLOAT4(Current.RasterPos[0]), NO_EXTRA },
+ { GL_CURRENT_RASTER_SECONDARY_COLOR,
+ CONTEXT_FIELD(Current.RasterSecondaryColor[0], TYPE_FLOATN_4), NO_EXTRA },
+ { GL_CURRENT_RASTER_TEXTURE_COORDS, LOC_CUSTOM, TYPE_FLOAT_4, 0,
+ extra_valid_texture_unit },
+ { GL_CURRENT_RASTER_POSITION_VALID, CONTEXT_BOOL(Current.RasterPosValid), NO_EXTRA },
+ { GL_DEPTH_BIAS, CONTEXT_FLOAT(Pixel.DepthBias), NO_EXTRA },
+ { GL_DEPTH_SCALE, CONTEXT_FLOAT(Pixel.DepthScale), NO_EXTRA },
+ { GL_DOUBLEBUFFER, BUFFER_INT(Visual.doubleBufferMode), NO_EXTRA },
+ { GL_DRAW_BUFFER, BUFFER_ENUM(ColorDrawBuffer[0]), NO_EXTRA },
+ { GL_EDGE_FLAG, LOC_CUSTOM, TYPE_BOOLEAN, 0, NO_EXTRA },
+ { GL_FEEDBACK_BUFFER_SIZE, CONTEXT_INT(Feedback.BufferSize), NO_EXTRA },
+ { GL_FEEDBACK_BUFFER_TYPE, CONTEXT_ENUM(Feedback.Type), NO_EXTRA },
+ { GL_FOG_INDEX, CONTEXT_FLOAT(Fog.Index), NO_EXTRA },
+ { GL_GREEN_BIAS, CONTEXT_FLOAT(Pixel.GreenBias), NO_EXTRA },
+ { GL_GREEN_SCALE, CONTEXT_FLOAT(Pixel.GreenScale), NO_EXTRA },
+ { GL_INDEX_BITS, BUFFER_INT(Visual.indexBits), extra_new_buffers },
+ { GL_INDEX_CLEAR_VALUE, CONTEXT_INT(Color.ClearIndex), NO_EXTRA },
+ { GL_INDEX_MODE, CONST(0) , NO_EXTRA},
+ { GL_INDEX_OFFSET, CONTEXT_INT(Pixel.IndexOffset), NO_EXTRA },
+ { GL_INDEX_SHIFT, CONTEXT_INT(Pixel.IndexShift), NO_EXTRA },
+ { GL_INDEX_WRITEMASK, CONTEXT_INT(Color.IndexMask), NO_EXTRA },
+ { GL_LIGHT_MODEL_COLOR_CONTROL, CONTEXT_ENUM(Light.Model.ColorControl), NO_EXTRA },
+ { GL_LIGHT_MODEL_LOCAL_VIEWER, CONTEXT_BOOL(Light.Model.LocalViewer), NO_EXTRA },
+ { GL_LINE_STIPPLE, CONTEXT_BOOL(Line.StippleFlag), NO_EXTRA },
+ { GL_LINE_STIPPLE_PATTERN, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
+ { GL_LINE_STIPPLE_REPEAT, CONTEXT_INT(Line.StippleFactor), NO_EXTRA },
+ { GL_LINE_WIDTH_GRANULARITY, CONTEXT_FLOAT(Const.LineWidthGranularity), NO_EXTRA },
+ { GL_LIST_BASE, CONTEXT_INT(List.ListBase), NO_EXTRA },
+ { GL_LIST_INDEX, LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA },
+ { GL_LIST_MODE, LOC_CUSTOM, TYPE_ENUM, 0, NO_EXTRA },
+ { GL_INDEX_LOGIC_OP, CONTEXT_BOOL(Color.IndexLogicOpEnabled), NO_EXTRA },
+ { GL_MAP1_COLOR_4, CONTEXT_BOOL(Eval.Map1Color4), NO_EXTRA },
+ { GL_MAP1_GRID_DOMAIN, CONTEXT_FLOAT2(Eval.MapGrid1u1), NO_EXTRA },
+ { GL_MAP1_GRID_SEGMENTS, CONTEXT_INT(Eval.MapGrid1un), NO_EXTRA },
+ { GL_MAP1_INDEX, CONTEXT_BOOL(Eval.Map1Index), NO_EXTRA },
+ { GL_MAP1_NORMAL, CONTEXT_BOOL(Eval.Map1Normal), NO_EXTRA },
+ { GL_MAP1_TEXTURE_COORD_1, CONTEXT_BOOL(Eval.Map1TextureCoord1), NO_EXTRA },
+ { GL_MAP1_TEXTURE_COORD_2, CONTEXT_BOOL(Eval.Map1TextureCoord2), NO_EXTRA },
+ { GL_MAP1_TEXTURE_COORD_3, CONTEXT_BOOL(Eval.Map1TextureCoord3), NO_EXTRA },
+ { GL_MAP1_TEXTURE_COORD_4, CONTEXT_BOOL(Eval.Map1TextureCoord4), NO_EXTRA },
+ { GL_MAP1_VERTEX_3, CONTEXT_BOOL(Eval.Map1Vertex3), NO_EXTRA },
+ { GL_MAP1_VERTEX_4, CONTEXT_BOOL(Eval.Map1Vertex4), NO_EXTRA },
+ { GL_MAP2_COLOR_4, CONTEXT_BOOL(Eval.Map2Color4), NO_EXTRA },
+ { GL_MAP2_GRID_DOMAIN, LOC_CUSTOM, TYPE_FLOAT_4, 0, NO_EXTRA },
+ { GL_MAP2_GRID_SEGMENTS, CONTEXT_INT2(Eval.MapGrid2un), NO_EXTRA },
+ { GL_MAP2_INDEX, CONTEXT_BOOL(Eval.Map2Index), NO_EXTRA },
+ { GL_MAP2_NORMAL, CONTEXT_BOOL(Eval.Map2Normal), NO_EXTRA },
+ { GL_MAP2_TEXTURE_COORD_1, CONTEXT_BOOL(Eval.Map2TextureCoord1), NO_EXTRA },
+ { GL_MAP2_TEXTURE_COORD_2, CONTEXT_BOOL(Eval.Map2TextureCoord2), NO_EXTRA },
+ { GL_MAP2_TEXTURE_COORD_3, CONTEXT_BOOL(Eval.Map2TextureCoord3), NO_EXTRA },
+ { GL_MAP2_TEXTURE_COORD_4, CONTEXT_BOOL(Eval.Map2TextureCoord4), NO_EXTRA },
+ { GL_MAP2_VERTEX_3, CONTEXT_BOOL(Eval.Map2Vertex3), NO_EXTRA },
+ { GL_MAP2_VERTEX_4, CONTEXT_BOOL(Eval.Map2Vertex4), NO_EXTRA },
+ { GL_MAP_COLOR, CONTEXT_BOOL(Pixel.MapColorFlag), NO_EXTRA },
+ { GL_MAP_STENCIL, CONTEXT_BOOL(Pixel.MapStencilFlag), NO_EXTRA },
+ { GL_MAX_ATTRIB_STACK_DEPTH, CONST(MAX_ATTRIB_STACK_DEPTH), NO_EXTRA },
+ { GL_MAX_CLIENT_ATTRIB_STACK_DEPTH, CONST(MAX_CLIENT_ATTRIB_STACK_DEPTH), NO_EXTRA },
+
+ { GL_MAX_EVAL_ORDER, CONST(MAX_EVAL_ORDER), NO_EXTRA },
+ { GL_MAX_LIST_NESTING, CONST(MAX_LIST_NESTING), NO_EXTRA },
+ { GL_MAX_NAME_STACK_DEPTH, CONST(MAX_NAME_STACK_DEPTH), NO_EXTRA },
+ { GL_MAX_PIXEL_MAP_TABLE, CONST(MAX_PIXEL_MAP_TABLE), NO_EXTRA },
+ { GL_NAME_STACK_DEPTH, CONTEXT_INT(Select.NameStackDepth), NO_EXTRA },
+ { GL_PACK_LSB_FIRST, CONTEXT_BOOL(Pack.LsbFirst), NO_EXTRA },
+ { GL_PACK_ROW_LENGTH, CONTEXT_INT(Pack.RowLength), NO_EXTRA },
+ { GL_PACK_SKIP_PIXELS, CONTEXT_INT(Pack.SkipPixels), NO_EXTRA },
+ { GL_PACK_SKIP_ROWS, CONTEXT_INT(Pack.SkipRows), NO_EXTRA },
+ { GL_PACK_SWAP_BYTES, CONTEXT_BOOL(Pack.SwapBytes), NO_EXTRA },
+ { GL_PACK_IMAGE_HEIGHT_EXT, CONTEXT_INT(Pack.ImageHeight), NO_EXTRA },
+ { GL_PACK_INVERT_MESA, CONTEXT_BOOL(Pack.Invert), NO_EXTRA },
+ { GL_PIXEL_MAP_A_TO_A_SIZE, CONTEXT_INT(PixelMaps.AtoA.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_B_TO_B_SIZE, CONTEXT_INT(PixelMaps.BtoB.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_G_TO_G_SIZE, CONTEXT_INT(PixelMaps.GtoG.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_I_TO_A_SIZE, CONTEXT_INT(PixelMaps.ItoA.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_I_TO_B_SIZE, CONTEXT_INT(PixelMaps.ItoB.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_I_TO_G_SIZE, CONTEXT_INT(PixelMaps.ItoG.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_I_TO_I_SIZE, CONTEXT_INT(PixelMaps.ItoI.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_I_TO_R_SIZE, CONTEXT_INT(PixelMaps.ItoR.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_R_TO_R_SIZE, CONTEXT_INT(PixelMaps.RtoR.Size), NO_EXTRA },
+ { GL_PIXEL_MAP_S_TO_S_SIZE, CONTEXT_INT(PixelMaps.StoS.Size), NO_EXTRA },
+ { GL_POINT_SIZE_GRANULARITY, CONTEXT_FLOAT(Const.PointSizeGranularity), NO_EXTRA },
+ { GL_POLYGON_MODE, CONTEXT_ENUM2(Polygon.FrontMode), NO_EXTRA },
+ { GL_POLYGON_OFFSET_BIAS_EXT, CONTEXT_FLOAT(Polygon.OffsetUnits), NO_EXTRA },
+ { GL_POLYGON_OFFSET_POINT, CONTEXT_BOOL(Polygon.OffsetPoint), NO_EXTRA },
+ { GL_POLYGON_OFFSET_LINE, CONTEXT_BOOL(Polygon.OffsetLine), NO_EXTRA },
+ { GL_POLYGON_SMOOTH, CONTEXT_BOOL(Polygon.SmoothFlag), NO_EXTRA },
+ { GL_POLYGON_SMOOTH_HINT, CONTEXT_ENUM(Hint.PolygonSmooth), NO_EXTRA },
+ { GL_POLYGON_STIPPLE, CONTEXT_BOOL(Polygon.StippleFlag), NO_EXTRA },
+ { GL_READ_BUFFER, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA },
+ { GL_RED_BIAS, CONTEXT_FLOAT(Pixel.RedBias), NO_EXTRA },
+ { GL_RED_SCALE, CONTEXT_FLOAT(Pixel.RedScale), NO_EXTRA },
+ { GL_RENDER_MODE, CONTEXT_ENUM(RenderMode), NO_EXTRA },
+ { GL_RGBA_MODE, CONST(1), NO_EXTRA },
+ { GL_SELECTION_BUFFER_SIZE, CONTEXT_INT(Select.BufferSize), NO_EXTRA },
+ { GL_SHARED_TEXTURE_PALETTE_EXT, CONTEXT_BOOL(Texture.SharedPalette), NO_EXTRA },
+
+ { GL_STEREO, BUFFER_INT(Visual.stereoMode), NO_EXTRA },
+
+ { GL_TEXTURE_1D, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA },
+ { GL_TEXTURE_3D, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA },
+ { GL_TEXTURE_1D_ARRAY_EXT, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA },
+ { GL_TEXTURE_2D_ARRAY_EXT, LOC_CUSTOM, TYPE_BOOLEAN, NO_OFFSET, NO_EXTRA },
+
+ { GL_TEXTURE_BINDING_1D, LOC_CUSTOM, TYPE_INT, TEXTURE_1D_INDEX, NO_EXTRA },
+ { GL_TEXTURE_BINDING_1D_ARRAY, LOC_CUSTOM, TYPE_INT,
+ TEXTURE_1D_ARRAY_INDEX, extra_MESA_texture_array },
+ { GL_TEXTURE_BINDING_2D_ARRAY, LOC_CUSTOM, TYPE_INT,
+ TEXTURE_1D_ARRAY_INDEX, extra_MESA_texture_array },
+ { GL_MAX_ARRAY_TEXTURE_LAYERS_EXT,
+ CONTEXT_INT(Const.MaxArrayTextureLayers), extra_MESA_texture_array },
+
+ { GL_TEXTURE_GEN_S, LOC_TEXUNIT, TYPE_BIT_0,
+ offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA },
+ { GL_TEXTURE_GEN_T, LOC_TEXUNIT, TYPE_BIT_1,
+ offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA },
+ { GL_TEXTURE_GEN_R, LOC_TEXUNIT, TYPE_BIT_2,
+ offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA },
+ { GL_TEXTURE_GEN_Q, LOC_TEXUNIT, TYPE_BIT_3,
+ offsetof(struct gl_texture_unit, TexGenEnabled), NO_EXTRA },
+ { GL_UNPACK_LSB_FIRST, CONTEXT_BOOL(Unpack.LsbFirst), NO_EXTRA },
+ { GL_UNPACK_ROW_LENGTH, CONTEXT_INT(Unpack.RowLength), NO_EXTRA },
+ { GL_UNPACK_SKIP_PIXELS, CONTEXT_INT(Unpack.SkipPixels), NO_EXTRA },
+ { GL_UNPACK_SKIP_ROWS, CONTEXT_INT(Unpack.SkipRows), NO_EXTRA },
+ { GL_UNPACK_SWAP_BYTES, CONTEXT_BOOL(Unpack.SwapBytes), NO_EXTRA },
+ { GL_UNPACK_SKIP_IMAGES_EXT, CONTEXT_INT(Unpack.SkipImages), NO_EXTRA },
+ { GL_UNPACK_IMAGE_HEIGHT_EXT, CONTEXT_INT(Unpack.ImageHeight), NO_EXTRA },
+ { GL_UNPACK_CLIENT_STORAGE_APPLE, CONTEXT_BOOL(Unpack.ClientStorage), NO_EXTRA },
+ { GL_ZOOM_X, CONTEXT_FLOAT(Pixel.ZoomX), NO_EXTRA },
+ { GL_ZOOM_Y, CONTEXT_FLOAT(Pixel.ZoomY), NO_EXTRA },
+
+ /* Vertex arrays */
+ { GL_VERTEX_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA },
+ { GL_NORMAL_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA },
+ { GL_COLOR_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA },
+ { GL_INDEX_ARRAY, ARRAY_BOOL(Index.Enabled), NO_EXTRA },
+ { GL_INDEX_ARRAY_TYPE, ARRAY_ENUM(Index.Type), NO_EXTRA },
+ { GL_INDEX_ARRAY_STRIDE, ARRAY_INT(Index.Stride), NO_EXTRA },
+ { GL_INDEX_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA },
+ { GL_TEXTURE_COORD_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA },
+ { GL_EDGE_FLAG_ARRAY, ARRAY_BOOL(EdgeFlag.Enabled), NO_EXTRA },
+ { GL_EDGE_FLAG_ARRAY_STRIDE, ARRAY_INT(EdgeFlag.Stride), NO_EXTRA },
+ { GL_EDGE_FLAG_ARRAY_COUNT_EXT, CONST(0), NO_EXTRA },
+
+ /* GL_ARB_texture_compression */
+ { GL_TEXTURE_COMPRESSION_HINT_ARB, CONTEXT_INT(Hint.TextureCompression), NO_EXTRA },
+
+ /* GL_EXT_compiled_vertex_array */
+ { GL_ARRAY_ELEMENT_LOCK_FIRST_EXT, CONTEXT_INT(Array.LockFirst),
+ extra_EXT_compiled_vertex_array },
+ { GL_ARRAY_ELEMENT_LOCK_COUNT_EXT, CONTEXT_INT(Array.LockCount),
+ extra_EXT_compiled_vertex_array },
+
+ /* GL_ARB_transpose_matrix */
+ { GL_TRANSPOSE_MODELVIEW_MATRIX_ARB,
+ CONTEXT_MATRIX_T(ModelviewMatrixStack), NO_EXTRA },
+ { GL_TRANSPOSE_PROJECTION_MATRIX_ARB,
+ CONTEXT_MATRIX_T(ProjectionMatrixStack.Top), NO_EXTRA },
+ { GL_TRANSPOSE_TEXTURE_MATRIX_ARB, CONTEXT_MATRIX_T(TextureMatrixStack), NO_EXTRA },
+
+ /* GL_EXT_secondary_color */
+ { GL_COLOR_SUM_EXT, CONTEXT_BOOL(Fog.ColorSumEnabled),
+ extra_EXT_secondary_color_ARB_vertex_program },
+ { GL_CURRENT_SECONDARY_COLOR_EXT,
+ CONTEXT_FIELD(Current.Attrib[VERT_ATTRIB_COLOR1][0], TYPE_FLOATN_4),
+ extra_EXT_secondary_color_flush_current },
+ { GL_SECONDARY_COLOR_ARRAY_EXT, ARRAY_BOOL(SecondaryColor.Enabled),
+ extra_EXT_secondary_color },
+ { GL_SECONDARY_COLOR_ARRAY_TYPE_EXT, ARRAY_ENUM(SecondaryColor.Type),
+ extra_EXT_secondary_color },
+ { GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT, ARRAY_INT(SecondaryColor.Stride),
+ extra_EXT_secondary_color },
+ { GL_SECONDARY_COLOR_ARRAY_SIZE_EXT, ARRAY_INT(SecondaryColor.Size),
+ extra_EXT_secondary_color },
+
+ /* GL_EXT_fog_coord */
+ { GL_CURRENT_FOG_COORDINATE_EXT,
+ CONTEXT_FLOAT(Current.Attrib[VERT_ATTRIB_FOG][0]),
+ extra_EXT_fog_coord_flush_current },
+ { GL_FOG_COORDINATE_ARRAY_EXT, ARRAY_BOOL(FogCoord.Enabled),
+ extra_EXT_fog_coord },
+ { GL_FOG_COORDINATE_ARRAY_TYPE_EXT, ARRAY_ENUM(FogCoord.Type),
+ extra_EXT_fog_coord },
+ { GL_FOG_COORDINATE_ARRAY_STRIDE_EXT, ARRAY_INT(FogCoord.Stride),
+ extra_EXT_fog_coord },
+ { GL_FOG_COORDINATE_SOURCE_EXT, CONTEXT_ENUM(Fog.FogCoordinateSource),
+ extra_EXT_fog_coord },
+
+ /* GL_IBM_rasterpos_clip */
+ { GL_RASTER_POSITION_UNCLIPPED_IBM,
+ CONTEXT_BOOL(Transform.RasterPositionUnclipped),
+ extra_IBM_rasterpos_clip },
+
+ /* GL_NV_point_sprite */
+ { GL_POINT_SPRITE_R_MODE_NV,
+ CONTEXT_ENUM(Point.SpriteRMode), extra_NV_point_sprite },
+ { GL_POINT_SPRITE_COORD_ORIGIN, CONTEXT_ENUM(Point.SpriteOrigin),
+ extra_NV_point_sprite_ARB_point_sprite },
+
+ /* GL_NV_vertex_program */
+ { GL_VERTEX_PROGRAM_BINDING_NV, LOC_CUSTOM, TYPE_INT, 0,
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY0_NV, ARRAY_BOOL(VertexAttrib[0].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY1_NV, ARRAY_BOOL(VertexAttrib[1].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY2_NV, ARRAY_BOOL(VertexAttrib[2].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY3_NV, ARRAY_BOOL(VertexAttrib[3].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY4_NV, ARRAY_BOOL(VertexAttrib[4].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY5_NV, ARRAY_BOOL(VertexAttrib[5].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY6_NV, ARRAY_BOOL(VertexAttrib[6].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY7_NV, ARRAY_BOOL(VertexAttrib[7].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY8_NV, ARRAY_BOOL(VertexAttrib[8].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY9_NV, ARRAY_BOOL(VertexAttrib[9].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY10_NV, ARRAY_BOOL(VertexAttrib[10].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY11_NV, ARRAY_BOOL(VertexAttrib[11].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY12_NV, ARRAY_BOOL(VertexAttrib[12].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY13_NV, ARRAY_BOOL(VertexAttrib[13].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY14_NV, ARRAY_BOOL(VertexAttrib[14].Enabled),
+ extra_NV_vertex_program },
+ { GL_VERTEX_ATTRIB_ARRAY15_NV, ARRAY_BOOL(VertexAttrib[15].Enabled),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB0_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[0]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB1_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[1]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB2_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[2]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB3_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[3]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB4_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[4]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB5_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[5]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB6_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[6]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB7_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[7]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB8_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[8]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB9_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[9]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB10_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[10]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB11_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[11]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB12_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[12]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB13_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[13]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB14_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[14]),
+ extra_NV_vertex_program },
+ { GL_MAP1_VERTEX_ATTRIB15_4_NV, CONTEXT_BOOL(Eval.Map1Attrib[15]),
+ extra_NV_vertex_program },
+
+ /* GL_NV_fragment_program */
+ { GL_FRAGMENT_PROGRAM_NV, CONTEXT_BOOL(FragmentProgram.Enabled),
+ extra_NV_fragment_program },
+ { GL_FRAGMENT_PROGRAM_BINDING_NV, LOC_CUSTOM, TYPE_INT, 0,
+ extra_NV_fragment_program },
+ { GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV,
+ CONST(MAX_NV_FRAGMENT_PROGRAM_PARAMS),
+ extra_NV_fragment_program },
+
+ /* GL_NV_texture_rectangle */
+ { GL_TEXTURE_RECTANGLE_NV,
+ LOC_CUSTOM, TYPE_BOOLEAN, 0, extra_NV_texture_rectangle },
+ { GL_TEXTURE_BINDING_RECTANGLE_NV,
+ LOC_CUSTOM, TYPE_INT, TEXTURE_RECT_INDEX, extra_NV_texture_rectangle },
+ { GL_MAX_RECTANGLE_TEXTURE_SIZE_NV,
+ CONTEXT_INT(Const.MaxTextureRectSize), extra_NV_texture_rectangle },
+
+ /* GL_EXT_stencil_two_side */
+ { GL_STENCIL_TEST_TWO_SIDE_EXT, CONTEXT_BOOL(Stencil.TestTwoSide),
+ extra_EXT_stencil_two_side },
+ { GL_ACTIVE_STENCIL_FACE_EXT, LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA },
+
+ /* GL_NV_light_max_exponent */
+ { GL_MAX_SHININESS_NV, CONTEXT_FLOAT(Const.MaxShininess),
+ extra_NV_light_max_exponent },
+ { GL_MAX_SPOT_EXPONENT_NV, CONTEXT_FLOAT(Const.MaxSpotExponent),
+ extra_NV_light_max_exponent },
+
+ /* GL_NV_primitive_restart */
+ { GL_PRIMITIVE_RESTART_NV, CONTEXT_BOOL(Array.PrimitiveRestart),
+ extra_NV_primitive_restart },
+ { GL_PRIMITIVE_RESTART_INDEX_NV, CONTEXT_INT(Array.RestartIndex),
+ extra_NV_primitive_restart },
+
+ /* GL_ARB_vertex_buffer_object */
+ { GL_INDEX_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, Index.BufferObj), NO_EXTRA },
+ { GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, EdgeFlag.BufferObj), NO_EXTRA },
+ { GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, SecondaryColor.BufferObj), NO_EXTRA },
+ { GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ offsetof(struct gl_array_object, FogCoord.BufferObj), NO_EXTRA },
+
+ /* GL_EXT_pixel_buffer_object */
+ { GL_PIXEL_PACK_BUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0,
+ extra_EXT_pixel_buffer_object },
+ { GL_PIXEL_UNPACK_BUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0,
+ extra_EXT_pixel_buffer_object },
+
+ /* GL_ARB_vertex_program */
+ { GL_VERTEX_PROGRAM_ARB, /* == GL_VERTEX_PROGRAM_NV */
+ CONTEXT_BOOL(VertexProgram.Enabled),
+ extra_ARB_vertex_program_NV_vertex_program },
+ { GL_VERTEX_PROGRAM_POINT_SIZE_ARB, /* == GL_VERTEX_PROGRAM_POINT_SIZE_NV*/
+ CONTEXT_BOOL(VertexProgram.PointSizeEnabled),
+ extra_ARB_vertex_program_NV_vertex_program },
+ { GL_VERTEX_PROGRAM_TWO_SIDE_ARB, /* == GL_VERTEX_PROGRAM_TWO_SIDE_NV */
+ CONTEXT_BOOL(VertexProgram.TwoSideEnabled),
+ extra_ARB_vertex_program_NV_vertex_program },
+ { GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB, /* == GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV */
+ CONTEXT_INT(Const.MaxProgramMatrixStackDepth),
+ extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program },
+ { GL_MAX_PROGRAM_MATRICES_ARB, /* == GL_MAX_TRACK_MATRICES_NV */
+ CONTEXT_INT(Const.MaxProgramMatrices),
+ extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program },
+ { GL_CURRENT_MATRIX_STACK_DEPTH_ARB, /* == GL_CURRENT_MATRIX_STACK_DEPTH_NV */
+ LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program },
+
+ { GL_CURRENT_MATRIX_ARB, /* == GL_CURRENT_MATRIX_NV */
+ LOC_CUSTOM, TYPE_MATRIX, 0,
+ extra_ARB_vertex_program_ARB_fragment_program_NV_vertex_program },
+ { GL_TRANSPOSE_CURRENT_MATRIX_ARB, /* == GL_CURRENT_MATRIX_NV */
+ LOC_CUSTOM, TYPE_MATRIX, 0,
+ extra_ARB_vertex_program_ARB_fragment_program },
+
+ { GL_PROGRAM_ERROR_POSITION_ARB, /* == GL_PROGRAM_ERROR_POSITION_NV */
+ CONTEXT_INT(Program.ErrorPos),
+ extra_NV_vertex_program_ARB_vertex_program_ARB_fragment_program_NV_vertex_program },
+
+ /* GL_ARB_fragment_program */
+ { GL_FRAGMENT_PROGRAM_ARB, CONTEXT_BOOL(FragmentProgram.Enabled),
+ extra_ARB_fragment_program },
+
+ /* GL_EXT_depth_bounds_test */
+ { GL_DEPTH_BOUNDS_TEST_EXT, CONTEXT_BOOL(Depth.BoundsTest),
+ extra_EXT_depth_bounds_test },
+ { GL_DEPTH_BOUNDS_EXT, CONTEXT_FLOAT2(Depth.BoundsMin),
+ extra_EXT_depth_bounds_test },
+
+ /* GL_ARB_depth_clamp*/
+ { GL_DEPTH_CLAMP, CONTEXT_BOOL(Transform.DepthClamp),
+ extra_ARB_depth_clamp },
+
+ /* GL_ARB_draw_buffers */
+ { GL_DRAW_BUFFER0_ARB, BUFFER_ENUM(ColorDrawBuffer[0]), NO_EXTRA },
+ { GL_DRAW_BUFFER1_ARB, BUFFER_ENUM(ColorDrawBuffer[1]),
+ extra_valid_draw_buffer },
+ { GL_DRAW_BUFFER2_ARB, BUFFER_ENUM(ColorDrawBuffer[2]),
+ extra_valid_draw_buffer },
+ { GL_DRAW_BUFFER3_ARB, BUFFER_ENUM(ColorDrawBuffer[3]),
+ extra_valid_draw_buffer },
+ { GL_DRAW_BUFFER4_ARB, BUFFER_ENUM(ColorDrawBuffer[4]),
+ extra_valid_draw_buffer },
+ { GL_DRAW_BUFFER5_ARB, BUFFER_ENUM(ColorDrawBuffer[5]),
+ extra_valid_draw_buffer },
+ { GL_DRAW_BUFFER6_ARB, BUFFER_ENUM(ColorDrawBuffer[6]),
+ extra_valid_draw_buffer },
+ { GL_DRAW_BUFFER7_ARB, BUFFER_ENUM(ColorDrawBuffer[7]),
+ extra_valid_draw_buffer },
+
+ /* GL_ATI_fragment_shader */
+ { GL_NUM_FRAGMENT_REGISTERS_ATI, CONST(6), extra_ATI_fragment_shader },
+ { GL_NUM_FRAGMENT_CONSTANTS_ATI, CONST(8), extra_ATI_fragment_shader },
+ { GL_NUM_PASSES_ATI, CONST(2), extra_ATI_fragment_shader },
+ { GL_NUM_INSTRUCTIONS_PER_PASS_ATI, CONST(8), extra_ATI_fragment_shader },
+ { GL_NUM_INSTRUCTIONS_TOTAL_ATI, CONST(16), extra_ATI_fragment_shader },
+ { GL_COLOR_ALPHA_PAIRING_ATI, CONST(GL_TRUE), extra_ATI_fragment_shader },
+ { GL_NUM_LOOPBACK_COMPONENTS_ATI, CONST(3), extra_ATI_fragment_shader },
+ { GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI,
+ CONST(3), extra_ATI_fragment_shader },
+
+ /* GL_EXT_framebuffer_object */
+ { GL_MAX_COLOR_ATTACHMENTS_EXT, CONTEXT_INT(Const.MaxColorAttachments),
+ extra_EXT_framebuffer_object },
+
+ /* GL_EXT_framebuffer_blit
+ * NOTE: GL_DRAW_FRAMEBUFFER_BINDING_EXT == GL_FRAMEBUFFER_BINDING_EXT */
+ { GL_READ_FRAMEBUFFER_BINDING_EXT, LOC_CUSTOM, TYPE_INT, 0,
+ extra_EXT_framebuffer_blit },
+
+ /* GL_EXT_provoking_vertex */
+ { GL_PROVOKING_VERTEX_EXT,
+ CONTEXT_BOOL(Light.ProvokingVertex), extra_EXT_provoking_vertex },
+ { GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT,
+ CONTEXT_BOOL(Const.QuadsFollowProvokingVertexConvention),
+ extra_EXT_provoking_vertex },
+
+ /* GL_ARB_framebuffer_object */
+ { GL_MAX_SAMPLES, CONTEXT_INT(Const.MaxSamples),
+ extra_ARB_framebuffer_object_EXT_framebuffer_multisample },
+
+ /* GL_APPLE_vertex_array_object */
+ { GL_VERTEX_ARRAY_BINDING_APPLE, ARRAY_INT(Name),
+ extra_APPLE_vertex_array_object },
+
+ /* GL_ARB_seamless_cube_map */
+ { GL_TEXTURE_CUBE_MAP_SEAMLESS,
+ CONTEXT_BOOL(Texture.CubeMapSeamless), extra_ARB_seamless_cube_map },
+
+ /* GL_ARB_sync */
+ { GL_MAX_SERVER_WAIT_TIMEOUT,
+ CONTEXT_INT64(Const.MaxServerWaitTimeout), extra_ARB_sync },
+
+ /* GL_EXT_texture_integer */
+ { GL_RGBA_INTEGER_MODE_EXT, BUFFER_BOOL(_IntegerColor),
+ extra_EXT_texture_integer },
+
+ /* GL_EXT_transform_feedback */
+ { GL_TRANSFORM_FEEDBACK_BUFFER_BINDING, LOC_CUSTOM, TYPE_INT, 0,
+ extra_EXT_transform_feedback },
+ { GL_RASTERIZER_DISCARD, CONTEXT_BOOL(TransformFeedback.RasterDiscard),
+ extra_EXT_transform_feedback },
+ { GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS,
+ CONTEXT_INT(Const.MaxTransformFeedbackInterleavedComponents),
+ extra_EXT_transform_feedback },
+ { GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS,
+ CONTEXT_INT(Const.MaxTransformFeedbackSeparateAttribs),
+ extra_EXT_transform_feedback },
+ { GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS,
+ CONTEXT_INT(Const.MaxTransformFeedbackSeparateComponents),
+ extra_EXT_transform_feedback },
+
+ /* GL_ARB_transform_feedback2 */
+ { GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED, LOC_CUSTOM, TYPE_BOOLEAN, 0,
+ extra_ARB_transform_feedback2 },
+ { GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE, LOC_CUSTOM, TYPE_BOOLEAN, 0,
+ extra_ARB_transform_feedback2 },
+ { GL_TRANSFORM_FEEDBACK_BINDING, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_transform_feedback2 },
+
+ /* GL_ARB_geometry_shader4 */
+ { GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB,
+ CONTEXT_INT(Const.MaxGeometryTextureImageUnits),
+ extra_ARB_geometry_shader4 },
+ { GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB,
+ CONTEXT_INT(Const.MaxGeometryOutputVertices),
+ extra_ARB_geometry_shader4 },
+ { GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB,
+ CONTEXT_INT(Const.MaxGeometryTotalOutputComponents),
+ extra_ARB_geometry_shader4 },
+ { GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB,
+ CONTEXT_INT(Const.GeometryProgram.MaxUniformComponents),
+ extra_ARB_geometry_shader4 },
+ { GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB,
+ CONTEXT_INT(Const.MaxGeometryVaryingComponents),
+ extra_ARB_geometry_shader4 },
+ { GL_MAX_VERTEX_VARYING_COMPONENTS_ARB,
+ CONTEXT_INT(Const.MaxVertexVaryingComponents),
+ extra_ARB_geometry_shader4 },
+
+ /* GL_ARB_color_buffer_float */
+ { GL_RGBA_FLOAT_MODE_ARB, BUFFER_FIELD(Visual.floatMode, TYPE_BOOLEAN), 0 },
+
+ /* GL_EXT_gpu_shader4 / GL 3.0 */
+ { GL_MIN_PROGRAM_TEXEL_OFFSET,
+ CONTEXT_INT(Const.MinProgramTexelOffset),
+ extra_EXT_gpu_shader4 },
+ { GL_MAX_PROGRAM_TEXEL_OFFSET,
+ CONTEXT_INT(Const.MaxProgramTexelOffset),
+ extra_EXT_gpu_shader4 },
+
+ /* GL_ARB_texture_buffer_object */
+ { GL_MAX_TEXTURE_BUFFER_SIZE_ARB, CONTEXT_INT(Const.MaxTextureBufferSize),
+ extra_ARB_texture_buffer_object },
+ { GL_TEXTURE_BINDING_BUFFER_ARB, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_texture_buffer_object },
+ { GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB, LOC_CUSTOM, TYPE_INT,
+ TEXTURE_BUFFER_INDEX, extra_ARB_texture_buffer_object },
+ { GL_TEXTURE_BUFFER_FORMAT_ARB, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_texture_buffer_object },
+ { GL_TEXTURE_BUFFER_ARB, LOC_CUSTOM, TYPE_INT, 0,
+ extra_ARB_texture_buffer_object },
+
+ /* GL 3.0 */
+ { GL_NUM_EXTENSIONS, LOC_CUSTOM, TYPE_INT, 0, extra_version_30 },
+ { GL_MAJOR_VERSION, CONTEXT_INT(VersionMajor), extra_version_30 },
+ { GL_MINOR_VERSION, CONTEXT_INT(VersionMinor), extra_version_30 },
+ { GL_CONTEXT_FLAGS, CONTEXT_INT(Const.ContextFlags), extra_version_30 },
+
+ /* GL3.0 / GL_EXT_framebuffer_sRGB */
+ { GL_FRAMEBUFFER_SRGB_EXT, CONTEXT_BOOL(Color.sRGBEnabled), extra_EXT_framebuffer_sRGB },
+ { GL_FRAMEBUFFER_SRGB_CAPABLE_EXT, BUFFER_INT(Visual.sRGBCapable), extra_EXT_framebuffer_sRGB },
+
+ /* GL 3.1 */
+ /* NOTE: different enum values for GL_PRIMITIVE_RESTART_NV
+ * vs. GL_PRIMITIVE_RESTART!
+ */
+ { GL_PRIMITIVE_RESTART, CONTEXT_BOOL(Array.PrimitiveRestart),
+ extra_version_31 },
+ { GL_PRIMITIVE_RESTART_INDEX, CONTEXT_INT(Array.RestartIndex),
+ extra_version_31 },
+
+
+ /* GL 3.2 */
+ { GL_CONTEXT_PROFILE_MASK, CONTEXT_INT(Const.ProfileMask),
+ extra_version_32 },
+#endif /* FEATURE_GL */
+};
+
+/* All we need now is a way to look up the value struct from the enum.
+ * The code generated by gcc for the old generated big switch
+ * statement is a big, balanced, open coded if/else tree, essentially
+ * an unrolled binary search. It would be natural to sort the new
+ * enum table and use bsearch(), but we will use a read-only hash
+ * table instead. bsearch() has a nice guaranteed worst case
+ * performance, but we're also guaranteed to hit that worst case
+ * (log2(n) iterations) for about half the enums. Instead, using an
+ * open addressing hash table, we can find the enum on the first try
+ * for 80% of the enums, 1 collision for 10% and never more than 5
+ * collisions for any enum (typical numbers). And the code is very
+ * simple, even though it feels a little magic. */
+
+static unsigned short table[1024];
+static const int prime_factor = 89, prime_step = 281;
+
+#ifdef GET_DEBUG
+static void
+print_table_stats(void)
+{
+ int i, j, collisions[11], count, hash, mask;
+ const struct value_desc *d;
+
+ count = 0;
+ mask = Elements(table) - 1;
+ memset(collisions, 0, sizeof collisions);
+
+ for (i = 0; i < Elements(table); i++) {
+ if (!table[i])
+ continue;
+ count++;
+ d = &values[table[i]];
+ hash = (d->pname * prime_factor);
+ j = 0;
+ while (1) {
+ if (values[table[hash & mask]].pname == d->pname)
+ break;
+ hash += prime_step;
+ j++;
+ }
+
+ if (j < 10)
+ collisions[j]++;
+ else
+ collisions[10]++;
+ }
+
+ printf("number of enums: %d (total %d)\n", count, Elements(values));
+ for (i = 0; i < Elements(collisions) - 1; i++)
+ if (collisions[i] > 0)
+ printf(" %d enums with %d %scollisions\n",
+ collisions[i], i, i == 10 ? "or more " : "");
+}
+#endif
+
+/**
+ * Initialize the enum hash for a given API
+ *
+ * This is called from one_time_init() to insert the enum values that
+ * are valid for the API in question into the enum hash table.
+ *
+ * \param the current context, for determining the API in question
+ */
+void _mesa_init_get_hash(struct gl_context *ctx)
+{
+ int i, hash, index, mask;
+ int api_mask = 0, api_bit;
+
+ mask = Elements(table) - 1;
+ api_bit = 1 << ctx->API;
+
+ for (i = 0; i < Elements(values); i++) {
+ if (values[i].type == TYPE_API_MASK) {
+ api_mask = values[i].offset;
+ continue;
+ }
+ if (!(api_mask & api_bit))
+ continue;
+
+ hash = (values[i].pname * prime_factor) & mask;
+ while (1) {
+ index = hash & mask;
+ if (!table[index]) {
+ table[index] = i;
+ break;
+ }
+ hash += prime_step;
+ }
+ }
+
+#ifdef GET_DEBUG
+ print_table_stats();
+#endif
+}
+
+/**
+ * Handle irregular enums
+ *
+ * Some values don't conform to the "well-known type at context
+ * pointer + offset" pattern, so we have this function to catch all
+ * the corner cases. Typically, it's a computed value or a one-off
+ * pointer to a custom struct or something.
+ *
+ * In this case we can't return a pointer to the value, so we'll have
+ * to use the temporary variable 'v' declared back in the calling
+ * glGet*v() function to store the result.
+ *
+ * \param ctx the current context
+ * \param d the struct value_desc that describes the enum
+ * \param v pointer to the tmp declared in the calling glGet*v() function
+ */
+static void
+find_custom_value(struct gl_context *ctx, const struct value_desc *d, union value *v)
+{
+ struct gl_buffer_object **buffer_obj;
+ struct gl_client_array *array;
+ GLuint unit, *p;
+
+ switch (d->pname) {
+ case GL_TEXTURE_1D:
+ case GL_TEXTURE_2D:
+ case GL_TEXTURE_3D:
+ case GL_TEXTURE_1D_ARRAY_EXT:
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ case GL_TEXTURE_RECTANGLE_NV:
+ v->value_bool = _mesa_IsEnabled(d->pname);
+ break;
+
+ case GL_LINE_STIPPLE_PATTERN:
+ /* This is the only GLushort, special case it here by promoting
+ * to an int rather than introducing a new type. */
+ v->value_int = ctx->Line.StipplePattern;
+ break;
+
+ case GL_CURRENT_RASTER_TEXTURE_COORDS:
+ unit = ctx->Texture.CurrentUnit;
+ v->value_float_4[0] = ctx->Current.RasterTexCoords[unit][0];
+ v->value_float_4[1] = ctx->Current.RasterTexCoords[unit][1];
+ v->value_float_4[2] = ctx->Current.RasterTexCoords[unit][2];
+ v->value_float_4[3] = ctx->Current.RasterTexCoords[unit][3];
+ break;
+
+ case GL_CURRENT_TEXTURE_COORDS:
+ unit = ctx->Texture.CurrentUnit;
+ v->value_float_4[0] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][0];
+ v->value_float_4[1] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][1];
+ v->value_float_4[2] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][2];
+ v->value_float_4[3] = ctx->Current.Attrib[VERT_ATTRIB_TEX0 + unit][3];
+ break;
+
+ case GL_COLOR_WRITEMASK:
+ v->value_int_4[0] = ctx->Color.ColorMask[0][RCOMP] ? 1 : 0;
+ v->value_int_4[1] = ctx->Color.ColorMask[0][GCOMP] ? 1 : 0;
+ v->value_int_4[2] = ctx->Color.ColorMask[0][BCOMP] ? 1 : 0;
+ v->value_int_4[3] = ctx->Color.ColorMask[0][ACOMP] ? 1 : 0;
+ break;
+
+ case GL_EDGE_FLAG:
+ v->value_bool = ctx->Current.Attrib[VERT_ATTRIB_EDGEFLAG][0] == 1.0;
+ break;
+
+ case GL_READ_BUFFER:
+ v->value_enum = ctx->ReadBuffer->ColorReadBuffer;
+ break;
+
+ case GL_MAP2_GRID_DOMAIN:
+ v->value_float_4[0] = ctx->Eval.MapGrid2u1;
+ v->value_float_4[1] = ctx->Eval.MapGrid2u2;
+ v->value_float_4[2] = ctx->Eval.MapGrid2v1;
+ v->value_float_4[3] = ctx->Eval.MapGrid2v2;
+ break;
+
+ case GL_TEXTURE_STACK_DEPTH:
+ unit = ctx->Texture.CurrentUnit;
+ v->value_int = ctx->TextureMatrixStack[unit].Depth + 1;
+ break;
+ case GL_TEXTURE_MATRIX:
+ unit = ctx->Texture.CurrentUnit;
+ v->value_matrix = ctx->TextureMatrixStack[unit].Top;
+ break;
+
+ case GL_TEXTURE_COORD_ARRAY:
+ case GL_TEXTURE_COORD_ARRAY_SIZE:
+ case GL_TEXTURE_COORD_ARRAY_TYPE:
+ case GL_TEXTURE_COORD_ARRAY_STRIDE:
+ array = &ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture];
+ v->value_int = *(GLuint *) ((char *) array + d->offset);
+ break;
+
+ case GL_ACTIVE_TEXTURE_ARB:
+ v->value_int = GL_TEXTURE0_ARB + ctx->Texture.CurrentUnit;
+ break;
+ case GL_CLIENT_ACTIVE_TEXTURE_ARB:
+ v->value_int = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
+ break;
+
+ case GL_MODELVIEW_STACK_DEPTH:
+ case GL_PROJECTION_STACK_DEPTH:
+ v->value_int = *(GLint *) ((char *) ctx + d->offset) + 1;
+ break;
+
+ case GL_MAX_TEXTURE_SIZE:
+ case GL_MAX_3D_TEXTURE_SIZE:
+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
+ p = (GLuint *) ((char *) ctx + d->offset);
+ v->value_int = 1 << (*p - 1);
+ break;
+
+ case GL_SCISSOR_BOX:
+ v->value_int_4[0] = ctx->Scissor.X;
+ v->value_int_4[1] = ctx->Scissor.Y;
+ v->value_int_4[2] = ctx->Scissor.Width;
+ v->value_int_4[3] = ctx->Scissor.Height;
+ break;
+
+ case GL_LIST_INDEX:
+ v->value_int =
+ ctx->ListState.CurrentList ? ctx->ListState.CurrentList->Name : 0;
+ break;
+ case GL_LIST_MODE:
+ if (!ctx->CompileFlag)
+ v->value_enum = 0;
+ else if (ctx->ExecuteFlag)
+ v->value_enum = GL_COMPILE_AND_EXECUTE;
+ else
+ v->value_enum = GL_COMPILE;
+ break;
+
+ case GL_VIEWPORT:
+ v->value_int_4[0] = ctx->Viewport.X;
+ v->value_int_4[1] = ctx->Viewport.Y;
+ v->value_int_4[2] = ctx->Viewport.Width;
+ v->value_int_4[3] = ctx->Viewport.Height;
+ break;
+
+ case GL_ACTIVE_STENCIL_FACE_EXT:
+ v->value_enum = ctx->Stencil.ActiveFace ? GL_BACK : GL_FRONT;
+ break;
+
+ case GL_STENCIL_FAIL:
+ v->value_enum = ctx->Stencil.FailFunc[ctx->Stencil.ActiveFace];
+ break;
+ case GL_STENCIL_FUNC:
+ v->value_enum = ctx->Stencil.Function[ctx->Stencil.ActiveFace];
+ break;
+ case GL_STENCIL_PASS_DEPTH_FAIL:
+ v->value_enum = ctx->Stencil.ZFailFunc[ctx->Stencil.ActiveFace];
+ break;
+ case GL_STENCIL_PASS_DEPTH_PASS:
+ v->value_enum = ctx->Stencil.ZPassFunc[ctx->Stencil.ActiveFace];
+ break;
+ case GL_STENCIL_REF:
+ v->value_int = ctx->Stencil.Ref[ctx->Stencil.ActiveFace];
+ break;
+ case GL_STENCIL_VALUE_MASK:
+ v->value_int = ctx->Stencil.ValueMask[ctx->Stencil.ActiveFace];
+ break;
+ case GL_STENCIL_WRITEMASK:
+ v->value_int = ctx->Stencil.WriteMask[ctx->Stencil.ActiveFace];
+ break;
+
+ case GL_NUM_EXTENSIONS:
+ v->value_int = _mesa_get_extension_count(ctx);
+ break;
+
+ case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
+ v->value_int = _mesa_get_color_read_type(ctx);
+ break;
+ case GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES:
+ v->value_int = _mesa_get_color_read_format(ctx);
+ break;
+
+ case GL_CURRENT_MATRIX_STACK_DEPTH_ARB:
+ v->value_int = ctx->CurrentStack->Depth + 1;
+ break;
+ case GL_CURRENT_MATRIX_ARB:
+ case GL_TRANSPOSE_CURRENT_MATRIX_ARB:
+ v->value_matrix = ctx->CurrentStack->Top;
+ break;
+
+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
+ v->value_int = _mesa_get_compressed_formats(ctx, NULL, GL_FALSE);
+ break;
+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
+ v->value_int_n.n =
+ _mesa_get_compressed_formats(ctx, v->value_int_n.ints, GL_FALSE);
+ ASSERT(v->value_int_n.n <= 100);
+ break;
+
+ case GL_MAX_VARYING_FLOATS_ARB:
+ v->value_int = ctx->Const.MaxVarying * 4;
+ break;
+
+ /* Various object names */
+
+ case GL_TEXTURE_BINDING_1D:
+ case GL_TEXTURE_BINDING_2D:
+ case GL_TEXTURE_BINDING_3D:
+ case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
+ case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
+ case GL_TEXTURE_BINDING_RECTANGLE_NV:
+ unit = ctx->Texture.CurrentUnit;
+ v->value_int =
+ ctx->Texture.Unit[unit].CurrentTex[d->offset]->Name;
+ break;
+
+ /* GL_ARB_vertex_buffer_object */
+ case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB:
+ case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB:
+ case GL_COLOR_ARRAY_BUFFER_BINDING_ARB:
+ case GL_INDEX_ARRAY_BUFFER_BINDING_ARB:
+ case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB:
+ case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB:
+ case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB:
+ buffer_obj = (struct gl_buffer_object **)
+ ((char *) ctx->Array.ArrayObj + d->offset);
+ v->value_int = (*buffer_obj)->Name;
+ break;
+ case GL_ARRAY_BUFFER_BINDING_ARB:
+ v->value_int = ctx->Array.ArrayBufferObj->Name;
+ break;
+ case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB:
+ v->value_int =
+ ctx->Array.ArrayObj->TexCoord[ctx->Array.ActiveTexture].BufferObj->Name;
+ break;
+ case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB:
+ v->value_int = ctx->Array.ElementArrayBufferObj->Name;
+ break;
+
+ /* ARB_copy_buffer */
+ case GL_COPY_READ_BUFFER:
+ v->value_int = ctx->CopyReadBuffer->Name;
+ break;
+ case GL_COPY_WRITE_BUFFER:
+ v->value_int = ctx->CopyWriteBuffer->Name;
+ break;
+
+ case GL_FRAGMENT_PROGRAM_BINDING_NV:
+ v->value_int =
+ ctx->FragmentProgram.Current ? ctx->FragmentProgram.Current->Base.Id : 0;
+ break;
+ case GL_VERTEX_PROGRAM_BINDING_NV:
+ v->value_int =
+ ctx->VertexProgram.Current ? ctx->VertexProgram.Current->Base.Id : 0;
+ break;
+ case GL_PIXEL_PACK_BUFFER_BINDING_EXT:
+ v->value_int = ctx->Pack.BufferObj->Name;
+ break;
+ case GL_PIXEL_UNPACK_BUFFER_BINDING_EXT:
+ v->value_int = ctx->Unpack.BufferObj->Name;
+ break;
+ case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING:
+ v->value_int = ctx->TransformFeedback.CurrentBuffer->Name;
+ break;
+ case GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED:
+ v->value_int = ctx->TransformFeedback.CurrentObject->Paused;
+ break;
+ case GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE:
+ v->value_int = ctx->TransformFeedback.CurrentObject->Active;
+ break;
+ case GL_TRANSFORM_FEEDBACK_BINDING:
+ v->value_int = ctx->TransformFeedback.CurrentObject->Name;
+ break;
+ case GL_CURRENT_PROGRAM:
+ v->value_int =
+ ctx->Shader.ActiveProgram ? ctx->Shader.ActiveProgram->Name : 0;
+ break;
+ case GL_READ_FRAMEBUFFER_BINDING_EXT:
+ v->value_int = ctx->ReadBuffer->Name;
+ break;
+ case GL_RENDERBUFFER_BINDING_EXT:
+ v->value_int =
+ ctx->CurrentRenderbuffer ? ctx->CurrentRenderbuffer->Name : 0;
+ break;
+ case GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES:
+ v->value_int = ctx->Array.ArrayObj->PointSize.BufferObj->Name;
+ break;
+
+ case GL_FOG_COLOR:
+ if(ctx->Color._ClampFragmentColor)
+ COPY_4FV(v->value_float_4, ctx->Fog.Color);
+ else
+ COPY_4FV(v->value_float_4, ctx->Fog.ColorUnclamped);
+ break;
+ case GL_COLOR_CLEAR_VALUE:
+ if(ctx->Color._ClampFragmentColor)
+ COPY_4FV(v->value_float_4, ctx->Color.ClearColor);
+ else
+ COPY_4FV(v->value_float_4, ctx->Color.ClearColorUnclamped);
+ break;
+ case GL_BLEND_COLOR_EXT:
+ if(ctx->Color._ClampFragmentColor)
+ COPY_4FV(v->value_float_4, ctx->Color.BlendColor);
+ else
+ COPY_4FV(v->value_float_4, ctx->Color.BlendColorUnclamped);
+ break;
+ case GL_ALPHA_TEST_REF:
+ if(ctx->Color._ClampFragmentColor)
+ v->value_float = ctx->Color.AlphaRef;
+ else
+ v->value_float = ctx->Color.AlphaRefUnclamped;
+ break;
+ case GL_MAX_VERTEX_UNIFORM_VECTORS:
+ v->value_int = ctx->Const.VertexProgram.MaxUniformComponents / 4;
+ break;
+
+ case GL_MAX_FRAGMENT_UNIFORM_VECTORS:
+ v->value_int = ctx->Const.FragmentProgram.MaxUniformComponents / 4;
+ break;
+
+ /* GL_ARB_texture_buffer_object */
+ case GL_TEXTURE_BUFFER_ARB:
+ v->value_int = ctx->Texture.BufferObject->Name;
+ break;
+ case GL_TEXTURE_BINDING_BUFFER_ARB:
+ unit = ctx->Texture.CurrentUnit;
+ v->value_int =
+ ctx->Texture.Unit[unit].CurrentTex[TEXTURE_BUFFER_INDEX]->Name;
+ break;
+ case GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB:
+ {
+ struct gl_buffer_object *buf =
+ ctx->Texture.Unit[ctx->Texture.CurrentUnit]
+ .CurrentTex[TEXTURE_BUFFER_INDEX]->BufferObject;
+ v->value_int = buf ? buf->Name : 0;
+ }
+ break;
+ case GL_TEXTURE_BUFFER_FORMAT_ARB:
+ v->value_int = ctx->Texture.Unit[ctx->Texture.CurrentUnit]
+ .CurrentTex[TEXTURE_BUFFER_INDEX]->BufferObjectFormat;
+ break;
+
+ }
+}
+
+/**
+ * Check extra constraints on a struct value_desc descriptor
+ *
+ * If a struct value_desc has a non-NULL extra pointer, it means that
+ * there are a number of extra constraints to check or actions to
+ * perform. The extras is just an integer array where each integer
+ * encode different constraints or actions.
+ *
+ * \param ctx current context
+ * \param func name of calling glGet*v() function for error reporting
+ * \param d the struct value_desc that has the extra constraints
+ *
+ * \return GL_FALSE if one of the constraints was not satisfied,
+ * otherwise GL_TRUE.
+ */
+static GLboolean
+check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d)
+{
+ const GLuint version = ctx->VersionMajor * 10 + ctx->VersionMinor;
+ int total, enabled;
+ const int *e;
+
+ total = 0;
+ enabled = 0;
+ for (e = d->extra; *e != EXTRA_END; e++)
+ switch (*e) {
+ case EXTRA_VERSION_30:
+ if (version >= 30) {
+ total++;
+ enabled++;
+ }
+ break;
+ case EXTRA_VERSION_31:
+ if (version >= 31) {
+ total++;
+ enabled++;
+ }
+ break;
+ case EXTRA_VERSION_32:
+ if (version >= 32) {
+ total++;
+ enabled++;
+ }
+ break;
+ case EXTRA_NEW_FRAG_CLAMP:
+ if (ctx->NewState & (_NEW_BUFFERS | _NEW_FRAG_CLAMP))
+ _mesa_update_state(ctx);
+ break;
+ case EXTRA_VERSION_ES2:
+ if (ctx->API == API_OPENGLES2) {
+ total++;
+ enabled++;
+ }
+ break;
+ case EXTRA_NEW_BUFFERS:
+ if (ctx->NewState & _NEW_BUFFERS)
+ _mesa_update_state(ctx);
+ break;
+ case EXTRA_FLUSH_CURRENT:
+ FLUSH_CURRENT(ctx, 0);
+ break;
+ case EXTRA_VALID_DRAW_BUFFER:
+ if (d->pname - GL_DRAW_BUFFER0_ARB >= ctx->Const.MaxDrawBuffers) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(draw buffer %u)",
+ func, d->pname - GL_DRAW_BUFFER0_ARB);
+ return GL_FALSE;
+ }
+ break;
+ case EXTRA_VALID_TEXTURE_UNIT:
+ if (ctx->Texture.CurrentUnit >= ctx->Const.MaxTextureCoordUnits) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(texture %u)",
+ func, ctx->Texture.CurrentUnit);
+ return GL_FALSE;
+ }
+ break;
+ case EXTRA_END:
+ break;
+ default: /* *e is a offset into the extension struct */
+ total++;
+ if (*(GLboolean *) ((char *) &ctx->Extensions + *e))
+ enabled++;
+ break;
+ }
+
+ if (total > 0 && enabled == 0) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
+ _mesa_lookup_enum_by_nr(d->pname));
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
+
+static const struct value_desc error_value =
+ { 0, 0, TYPE_INVALID, NO_OFFSET, NO_EXTRA };
+
+/**
+ * Find the struct value_desc corresponding to the enum 'pname'.
+ *
+ * We hash the enum value to get an index into the 'table' array,
+ * which holds the index in the 'values' array of struct value_desc.
+ * Once we've found the entry, we do the extra checks, if any, then
+ * look up the value and return a pointer to it.
+ *
+ * If the value has to be computed (for example, it's the result of a
+ * function call or we need to add 1 to it), we use the tmp 'v' to
+ * store the result.
+ *
+ * \param func name of glGet*v() func for error reporting
+ * \param pname the enum value we're looking up
+ * \param p is were we return the pointer to the value
+ * \param v a tmp union value variable in the calling glGet*v() function
+ *
+ * \return the struct value_desc corresponding to the enum or a struct
+ * value_desc of TYPE_INVALID if not found. This lets the calling
+ * glGet*v() function jump right into a switch statement and
+ * handle errors there instead of having to check for NULL.
+ */
+static const struct value_desc *
+find_value(const char *func, GLenum pname, void **p, union value *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_texture_unit *unit;
+ int mask, hash;
+ const struct value_desc *d;
+
+ mask = Elements(table) - 1;
+ hash = (pname * prime_factor);
+ while (1) {
+ d = &values[table[hash & mask]];
+
+ /* If the enum isn't valid, the hash walk ends with index 0,
+ * which is the API mask entry at the beginning of values[]. */
+ if (unlikely(d->type == TYPE_API_MASK)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
+ _mesa_lookup_enum_by_nr(pname));
+ return &error_value;
+ }
+
+ if (likely(d->pname == pname))
+ break;
+
+ hash += prime_step;
+ }
+
+ if (unlikely(d->extra && !check_extra(ctx, func, d)))
+ return &error_value;
+
+ switch (d->location) {
+ case LOC_BUFFER:
+ *p = ((char *) ctx->DrawBuffer + d->offset);
+ return d;
+ case LOC_CONTEXT:
+ *p = ((char *) ctx + d->offset);
+ return d;
+ case LOC_ARRAY:
+ *p = ((char *) ctx->Array.ArrayObj + d->offset);
+ return d;
+ case LOC_TEXUNIT:
+ unit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ *p = ((char *) unit + d->offset);
+ return d;
+ case LOC_CUSTOM:
+ find_custom_value(ctx, d, v);
+ *p = v;
+ return d;
+ default:
+ assert(0);
+ break;
+ }
+
+ /* silence warning */
+ return &error_value;
+}
+
+static const int transpose[] = {
+ 0, 4, 8, 12,
+ 1, 5, 9, 13,
+ 2, 6, 10, 14,
+ 3, 7, 11, 15
+};
+
+void GLAPIENTRY
+_mesa_GetBooleanv(GLenum pname, GLboolean *params)
+{
+ const struct value_desc *d;
+ union value v;
+ GLmatrix *m;
+ int shift, i;
+ void *p;
+
+ d = find_value("glGetBooleanv", pname, &p, &v);
+ switch (d->type) {
+ case TYPE_INVALID:
+ break;
+ case TYPE_CONST:
+ params[0] = INT_TO_BOOLEAN(d->offset);
+ break;
+
+ case TYPE_FLOAT_4:
+ case TYPE_FLOATN_4:
+ params[3] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[3]);
+ case TYPE_FLOAT_3:
+ case TYPE_FLOATN_3:
+ params[2] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[2]);
+ case TYPE_FLOAT_2:
+ case TYPE_FLOATN_2:
+ params[1] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[1]);
+ case TYPE_FLOAT:
+ case TYPE_FLOATN:
+ params[0] = FLOAT_TO_BOOLEAN(((GLfloat *) p)[0]);
+ break;
+
+ case TYPE_DOUBLEN:
+ params[0] = FLOAT_TO_BOOLEAN(((GLdouble *) p)[0]);
+ break;
+
+ case TYPE_INT_4:
+ params[3] = INT_TO_BOOLEAN(((GLint *) p)[3]);
+ case TYPE_INT_3:
+ params[2] = INT_TO_BOOLEAN(((GLint *) p)[2]);
+ case TYPE_INT_2:
+ case TYPE_ENUM_2:
+ params[1] = INT_TO_BOOLEAN(((GLint *) p)[1]);
+ case TYPE_INT:
+ case TYPE_ENUM:
+ params[0] = INT_TO_BOOLEAN(((GLint *) p)[0]);
+ break;
+
+ case TYPE_INT_N:
+ for (i = 0; i < v.value_int_n.n; i++)
+ params[i] = INT_TO_BOOLEAN(v.value_int_n.ints[i]);
+ break;
+
+ case TYPE_INT64:
+ params[0] = INT64_TO_BOOLEAN(((GLint64 *) p)[0]);
+ break;
+
+ case TYPE_BOOLEAN:
+ params[0] = ((GLboolean*) p)[0];
+ break;
+
+ case TYPE_MATRIX:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_BOOLEAN(m->m[i]);
+ break;
+
+ case TYPE_MATRIX_T:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_BOOLEAN(m->m[transpose[i]]);
+ break;
+
+ case TYPE_BIT_0:
+ case TYPE_BIT_1:
+ case TYPE_BIT_2:
+ case TYPE_BIT_3:
+ case TYPE_BIT_4:
+ case TYPE_BIT_5:
+ shift = d->type - TYPE_BIT_0;
+ params[0] = (*(GLbitfield *) p >> shift) & 1;
+ break;
+ }
+}
+
+void GLAPIENTRY
+_mesa_GetFloatv(GLenum pname, GLfloat *params)
+{
+ const struct value_desc *d;
+ union value v;
+ GLmatrix *m;
+ int shift, i;
+ void *p;
+
+ d = find_value("glGetFloatv", pname, &p, &v);
+ switch (d->type) {
+ case TYPE_INVALID:
+ break;
+ case TYPE_CONST:
+ params[0] = (GLfloat) d->offset;
+ break;
+
+ case TYPE_FLOAT_4:
+ case TYPE_FLOATN_4:
+ params[3] = ((GLfloat *) p)[3];
+ case TYPE_FLOAT_3:
+ case TYPE_FLOATN_3:
+ params[2] = ((GLfloat *) p)[2];
+ case TYPE_FLOAT_2:
+ case TYPE_FLOATN_2:
+ params[1] = ((GLfloat *) p)[1];
+ case TYPE_FLOAT:
+ case TYPE_FLOATN:
+ params[0] = ((GLfloat *) p)[0];
+ break;
+
+ case TYPE_DOUBLEN:
+ params[0] = ((GLdouble *) p)[0];
+ break;
+
+ case TYPE_INT_4:
+ params[3] = (GLfloat) (((GLint *) p)[3]);
+ case TYPE_INT_3:
+ params[2] = (GLfloat) (((GLint *) p)[2]);
+ case TYPE_INT_2:
+ case TYPE_ENUM_2:
+ params[1] = (GLfloat) (((GLint *) p)[1]);
+ case TYPE_INT:
+ case TYPE_ENUM:
+ params[0] = (GLfloat) (((GLint *) p)[0]);
+ break;
+
+ case TYPE_INT_N:
+ for (i = 0; i < v.value_int_n.n; i++)
+ params[i] = INT_TO_FLOAT(v.value_int_n.ints[i]);
+ break;
+
+ case TYPE_INT64:
+ params[0] = ((GLint64 *) p)[0];
+ break;
+
+ case TYPE_BOOLEAN:
+ params[0] = BOOLEAN_TO_FLOAT(*(GLboolean*) p);
+ break;
+
+ case TYPE_MATRIX:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = m->m[i];
+ break;
+
+ case TYPE_MATRIX_T:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = m->m[transpose[i]];
+ break;
+
+ case TYPE_BIT_0:
+ case TYPE_BIT_1:
+ case TYPE_BIT_2:
+ case TYPE_BIT_3:
+ case TYPE_BIT_4:
+ case TYPE_BIT_5:
+ shift = d->type - TYPE_BIT_0;
+ params[0] = BOOLEAN_TO_FLOAT((*(GLbitfield *) p >> shift) & 1);
+ break;
+ }
+}
+
+void GLAPIENTRY
+_mesa_GetIntegerv(GLenum pname, GLint *params)
+{
+ const struct value_desc *d;
+ union value v;
+ GLmatrix *m;
+ int shift, i;
+ void *p;
+
+ d = find_value("glGetIntegerv", pname, &p, &v);
+ switch (d->type) {
+ case TYPE_INVALID:
+ break;
+ case TYPE_CONST:
+ params[0] = d->offset;
+ break;
+
+ case TYPE_FLOAT_4:
+ params[3] = IROUND(((GLfloat *) p)[3]);
+ case TYPE_FLOAT_3:
+ params[2] = IROUND(((GLfloat *) p)[2]);
+ case TYPE_FLOAT_2:
+ params[1] = IROUND(((GLfloat *) p)[1]);
+ case TYPE_FLOAT:
+ params[0] = IROUND(((GLfloat *) p)[0]);
+ break;
+
+ case TYPE_FLOATN_4:
+ params[3] = FLOAT_TO_INT(((GLfloat *) p)[3]);
+ case TYPE_FLOATN_3:
+ params[2] = FLOAT_TO_INT(((GLfloat *) p)[2]);
+ case TYPE_FLOATN_2:
+ params[1] = FLOAT_TO_INT(((GLfloat *) p)[1]);
+ case TYPE_FLOATN:
+ params[0] = FLOAT_TO_INT(((GLfloat *) p)[0]);
+ break;
+
+ case TYPE_DOUBLEN:
+ params[0] = FLOAT_TO_INT(((GLdouble *) p)[0]);
+ break;
+
+ case TYPE_INT_4:
+ params[3] = ((GLint *) p)[3];
+ case TYPE_INT_3:
+ params[2] = ((GLint *) p)[2];
+ case TYPE_INT_2:
+ case TYPE_ENUM_2:
+ params[1] = ((GLint *) p)[1];
+ case TYPE_INT:
+ case TYPE_ENUM:
+ params[0] = ((GLint *) p)[0];
+ break;
+
+ case TYPE_INT_N:
+ for (i = 0; i < v.value_int_n.n; i++)
+ params[i] = v.value_int_n.ints[i];
+ break;
+
+ case TYPE_INT64:
+ params[0] = INT64_TO_INT(((GLint64 *) p)[0]);
+ break;
+
+ case TYPE_BOOLEAN:
+ params[0] = BOOLEAN_TO_INT(*(GLboolean*) p);
+ break;
+
+ case TYPE_MATRIX:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_INT(m->m[i]);
+ break;
+
+ case TYPE_MATRIX_T:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_INT(m->m[transpose[i]]);
+ break;
+
+ case TYPE_BIT_0:
+ case TYPE_BIT_1:
+ case TYPE_BIT_2:
+ case TYPE_BIT_3:
+ case TYPE_BIT_4:
+ case TYPE_BIT_5:
+ shift = d->type - TYPE_BIT_0;
+ params[0] = (*(GLbitfield *) p >> shift) & 1;
+ break;
+ }
+}
+
+#if FEATURE_ARB_sync
+void GLAPIENTRY
+_mesa_GetInteger64v(GLenum pname, GLint64 *params)
+{
+ const struct value_desc *d;
+ union value v;
+ GLmatrix *m;
+ int shift, i;
+ void *p;
+
+ d = find_value("glGetInteger64v", pname, &p, &v);
+ switch (d->type) {
+ case TYPE_INVALID:
+ break;
+ case TYPE_CONST:
+ params[0] = d->offset;
+ break;
+
+ case TYPE_FLOAT_4:
+ params[3] = IROUND64(((GLfloat *) p)[3]);
+ case TYPE_FLOAT_3:
+ params[2] = IROUND64(((GLfloat *) p)[2]);
+ case TYPE_FLOAT_2:
+ params[1] = IROUND64(((GLfloat *) p)[1]);
+ case TYPE_FLOAT:
+ params[0] = IROUND64(((GLfloat *) p)[0]);
+ break;
+
+ case TYPE_FLOATN_4:
+ params[3] = FLOAT_TO_INT64(((GLfloat *) p)[3]);
+ case TYPE_FLOATN_3:
+ params[2] = FLOAT_TO_INT64(((GLfloat *) p)[2]);
+ case TYPE_FLOATN_2:
+ params[1] = FLOAT_TO_INT64(((GLfloat *) p)[1]);
+ case TYPE_FLOATN:
+ params[0] = FLOAT_TO_INT64(((GLfloat *) p)[0]);
+ break;
+
+ case TYPE_DOUBLEN:
+ params[0] = FLOAT_TO_INT64(((GLdouble *) p)[0]);
+ break;
+
+ case TYPE_INT_4:
+ params[3] = ((GLint *) p)[3];
+ case TYPE_INT_3:
+ params[2] = ((GLint *) p)[2];
+ case TYPE_INT_2:
+ case TYPE_ENUM_2:
+ params[1] = ((GLint *) p)[1];
+ case TYPE_INT:
+ case TYPE_ENUM:
+ params[0] = ((GLint *) p)[0];
+ break;
+
+ case TYPE_INT_N:
+ for (i = 0; i < v.value_int_n.n; i++)
+ params[i] = INT_TO_BOOLEAN(v.value_int_n.ints[i]);
+ break;
+
+ case TYPE_INT64:
+ params[0] = ((GLint64 *) p)[0];
+ break;
+
+ case TYPE_BOOLEAN:
+ params[0] = ((GLboolean*) p)[0];
+ break;
+
+ case TYPE_MATRIX:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_INT64(m->m[i]);
+ break;
+
+ case TYPE_MATRIX_T:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_INT64(m->m[transpose[i]]);
+ break;
+
+ case TYPE_BIT_0:
+ case TYPE_BIT_1:
+ case TYPE_BIT_2:
+ case TYPE_BIT_3:
+ case TYPE_BIT_4:
+ case TYPE_BIT_5:
+ shift = d->type - TYPE_BIT_0;
+ params[0] = (*(GLbitfield *) p >> shift) & 1;
+ break;
+ }
+}
+#endif /* FEATURE_ARB_sync */
+
+void GLAPIENTRY
+_mesa_GetDoublev(GLenum pname, GLdouble *params)
+{
+ const struct value_desc *d;
+ union value v;
+ GLmatrix *m;
+ int shift, i;
+ void *p;
+
+ d = find_value("glGetDoublev", pname, &p, &v);
+ switch (d->type) {
+ case TYPE_INVALID:
+ break;
+ case TYPE_CONST:
+ params[0] = d->offset;
+ break;
+
+ case TYPE_FLOAT_4:
+ case TYPE_FLOATN_4:
+ params[3] = ((GLfloat *) p)[3];
+ case TYPE_FLOAT_3:
+ case TYPE_FLOATN_3:
+ params[2] = ((GLfloat *) p)[2];
+ case TYPE_FLOAT_2:
+ case TYPE_FLOATN_2:
+ params[1] = ((GLfloat *) p)[1];
+ case TYPE_FLOAT:
+ case TYPE_FLOATN:
+ params[0] = ((GLfloat *) p)[0];
+ break;
+
+ case TYPE_DOUBLEN:
+ params[0] = ((GLdouble *) p)[0];
+ break;
+
+ case TYPE_INT_4:
+ params[3] = ((GLint *) p)[3];
+ case TYPE_INT_3:
+ params[2] = ((GLint *) p)[2];
+ case TYPE_INT_2:
+ case TYPE_ENUM_2:
+ params[1] = ((GLint *) p)[1];
+ case TYPE_INT:
+ case TYPE_ENUM:
+ params[0] = ((GLint *) p)[0];
+ break;
+
+ case TYPE_INT_N:
+ for (i = 0; i < v.value_int_n.n; i++)
+ params[i] = v.value_int_n.ints[i];
+ break;
+
+ case TYPE_INT64:
+ params[0] = ((GLint64 *) p)[0];
+ break;
+
+ case TYPE_BOOLEAN:
+ params[0] = *(GLboolean*) p;
+ break;
+
+ case TYPE_MATRIX:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = m->m[i];
+ break;
+
+ case TYPE_MATRIX_T:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = m->m[transpose[i]];
+ break;
+
+ case TYPE_BIT_0:
+ case TYPE_BIT_1:
+ case TYPE_BIT_2:
+ case TYPE_BIT_3:
+ case TYPE_BIT_4:
+ case TYPE_BIT_5:
+ shift = d->type - TYPE_BIT_0;
+ params[0] = (*(GLbitfield *) p >> shift) & 1;
+ break;
+ }
+}
+
+static enum value_type
+find_value_indexed(const char *func, GLenum pname, int index, union value *v)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ switch (pname) {
+
+ case GL_BLEND:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.EXT_draw_buffers2)
+ goto invalid_enum;
+ v->value_int = (ctx->Color.BlendEnabled >> index) & 1;
+ return TYPE_INT;
+
+ case GL_BLEND_SRC:
+ /* fall-through */
+ case GL_BLEND_SRC_RGB:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.ARB_draw_buffers_blend)
+ goto invalid_enum;
+ v->value_int = ctx->Color.Blend[index].SrcRGB;
+ return TYPE_INT;
+ case GL_BLEND_SRC_ALPHA:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.ARB_draw_buffers_blend)
+ goto invalid_enum;
+ v->value_int = ctx->Color.Blend[index].SrcA;
+ return TYPE_INT;
+ case GL_BLEND_DST:
+ /* fall-through */
+ case GL_BLEND_DST_RGB:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.ARB_draw_buffers_blend)
+ goto invalid_enum;
+ v->value_int = ctx->Color.Blend[index].DstRGB;
+ return TYPE_INT;
+ case GL_BLEND_DST_ALPHA:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.ARB_draw_buffers_blend)
+ goto invalid_enum;
+ v->value_int = ctx->Color.Blend[index].DstA;
+ return TYPE_INT;
+ case GL_BLEND_EQUATION_RGB:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.ARB_draw_buffers_blend)
+ goto invalid_enum;
+ v->value_int = ctx->Color.Blend[index].EquationRGB;
+ return TYPE_INT;
+ case GL_BLEND_EQUATION_ALPHA:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.ARB_draw_buffers_blend)
+ goto invalid_enum;
+ v->value_int = ctx->Color.Blend[index].EquationA;
+ return TYPE_INT;
+
+ case GL_COLOR_WRITEMASK:
+ if (index >= ctx->Const.MaxDrawBuffers)
+ goto invalid_value;
+ if (!ctx->Extensions.EXT_draw_buffers2)
+ goto invalid_enum;
+ v->value_int_4[0] = ctx->Color.ColorMask[index][RCOMP] ? 1 : 0;
+ v->value_int_4[1] = ctx->Color.ColorMask[index][GCOMP] ? 1 : 0;
+ v->value_int_4[2] = ctx->Color.ColorMask[index][BCOMP] ? 1 : 0;
+ v->value_int_4[3] = ctx->Color.ColorMask[index][ACOMP] ? 1 : 0;
+ return TYPE_INT_4;
+
+ case GL_TRANSFORM_FEEDBACK_BUFFER_START:
+ if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs)
+ goto invalid_value;
+ if (!ctx->Extensions.EXT_transform_feedback)
+ goto invalid_enum;
+ v->value_int64 = ctx->TransformFeedback.CurrentObject->Offset[index];
+ return TYPE_INT64;
+
+ case GL_TRANSFORM_FEEDBACK_BUFFER_SIZE:
+ if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs)
+ goto invalid_value;
+ if (!ctx->Extensions.EXT_transform_feedback)
+ goto invalid_enum;
+ v->value_int64 = ctx->TransformFeedback.CurrentObject->Size[index];
+ return TYPE_INT64;
+
+ case GL_TRANSFORM_FEEDBACK_BUFFER_BINDING:
+ if (index >= ctx->Const.MaxTransformFeedbackSeparateAttribs)
+ goto invalid_value;
+ if (!ctx->Extensions.EXT_transform_feedback)
+ goto invalid_enum;
+ v->value_int = ctx->TransformFeedback.CurrentObject->Buffers[index]->Name;
+ return TYPE_INT;
+ }
+
+ invalid_enum:
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s(pname=%s)", func,
+ _mesa_lookup_enum_by_nr(pname));
+ return TYPE_INVALID;
+ invalid_value:
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(pname=%s)", func,
+ _mesa_lookup_enum_by_nr(pname));
+ return TYPE_INVALID;
+}
+
+void GLAPIENTRY
+_mesa_GetBooleanIndexedv( GLenum pname, GLuint index, GLboolean *params )
+{
+ union value v;
+ enum value_type type =
+ find_value_indexed("glGetBooleanIndexedv", pname, index, &v);
+
+ switch (type) {
+ case TYPE_INT:
+ params[0] = INT_TO_BOOLEAN(v.value_int);
+ break;
+ case TYPE_INT_4:
+ params[0] = INT_TO_BOOLEAN(v.value_int_4[0]);
+ params[1] = INT_TO_BOOLEAN(v.value_int_4[1]);
+ params[2] = INT_TO_BOOLEAN(v.value_int_4[2]);
+ params[3] = INT_TO_BOOLEAN(v.value_int_4[3]);
+ break;
+ case TYPE_INT64:
+ params[0] = INT64_TO_BOOLEAN(v.value_int);
+ break;
+ default:
+ ; /* nothing - GL error was recorded */
+ }
+}
+
+void GLAPIENTRY
+_mesa_GetIntegerIndexedv( GLenum pname, GLuint index, GLint *params )
+{
+ union value v;
+ enum value_type type =
+ find_value_indexed("glGetIntegerIndexedv", pname, index, &v);
+
+ switch (type) {
+ case TYPE_INT:
+ params[0] = v.value_int;
+ break;
+ case TYPE_INT_4:
+ params[0] = v.value_int_4[0];
+ params[1] = v.value_int_4[1];
+ params[2] = v.value_int_4[2];
+ params[3] = v.value_int_4[3];
+ break;
+ case TYPE_INT64:
+ params[0] = INT64_TO_INT(v.value_int);
+ break;
+ default:
+ ; /* nothing - GL error was recorded */
+ }
+}
+
+#if FEATURE_ARB_sync
+void GLAPIENTRY
+_mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params )
+{
+ union value v;
+ enum value_type type =
+ find_value_indexed("glGetIntegerIndexedv", pname, index, &v);
+
+ switch (type) {
+ case TYPE_INT:
+ params[0] = v.value_int;
+ break;
+ case TYPE_INT_4:
+ params[0] = v.value_int_4[0];
+ params[1] = v.value_int_4[1];
+ params[2] = v.value_int_4[2];
+ params[3] = v.value_int_4[3];
+ break;
+ case TYPE_INT64:
+ params[0] = v.value_int;
+ break;
+ default:
+ ; /* nothing - GL error was recorded */
+ }
+}
+#endif /* FEATURE_ARB_sync */
+
+#if FEATURE_ES1
+void GLAPIENTRY
+_mesa_GetFixedv(GLenum pname, GLfixed *params)
+{
+ const struct value_desc *d;
+ union value v;
+ GLmatrix *m;
+ int shift, i;
+ void *p;
+
+ d = find_value("glGetDoublev", pname, &p, &v);
+ switch (d->type) {
+ case TYPE_INVALID:
+ break;
+ case TYPE_CONST:
+ params[0] = INT_TO_FIXED(d->offset);
+ break;
+
+ case TYPE_FLOAT_4:
+ case TYPE_FLOATN_4:
+ params[3] = FLOAT_TO_FIXED(((GLfloat *) p)[3]);
+ case TYPE_FLOAT_3:
+ case TYPE_FLOATN_3:
+ params[2] = FLOAT_TO_FIXED(((GLfloat *) p)[2]);
+ case TYPE_FLOAT_2:
+ case TYPE_FLOATN_2:
+ params[1] = FLOAT_TO_FIXED(((GLfloat *) p)[1]);
+ case TYPE_FLOAT:
+ case TYPE_FLOATN:
+ params[0] = FLOAT_TO_FIXED(((GLfloat *) p)[0]);
+ break;
+
+ case TYPE_DOUBLEN:
+ params[0] = FLOAT_TO_FIXED(((GLdouble *) p)[0]);
+ break;
+
+ case TYPE_INT_4:
+ params[3] = INT_TO_FIXED(((GLint *) p)[3]);
+ case TYPE_INT_3:
+ params[2] = INT_TO_FIXED(((GLint *) p)[2]);
+ case TYPE_INT_2:
+ case TYPE_ENUM_2:
+ params[1] = INT_TO_FIXED(((GLint *) p)[1]);
+ case TYPE_INT:
+ case TYPE_ENUM:
+ params[0] = INT_TO_FIXED(((GLint *) p)[0]);
+ break;
+
+ case TYPE_INT_N:
+ for (i = 0; i < v.value_int_n.n; i++)
+ params[i] = INT_TO_FIXED(v.value_int_n.ints[i]);
+ break;
+
+ case TYPE_INT64:
+ params[0] = ((GLint64 *) p)[0];
+ break;
+
+ case TYPE_BOOLEAN:
+ params[0] = BOOLEAN_TO_FIXED(((GLboolean*) p)[0]);
+ break;
+
+ case TYPE_MATRIX:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_FIXED(m->m[i]);
+ break;
+
+ case TYPE_MATRIX_T:
+ m = *(GLmatrix **) p;
+ for (i = 0; i < 16; i++)
+ params[i] = FLOAT_TO_FIXED(m->m[transpose[i]]);
+ break;
+
+ case TYPE_BIT_0:
+ case TYPE_BIT_1:
+ case TYPE_BIT_2:
+ case TYPE_BIT_3:
+ case TYPE_BIT_4:
+ case TYPE_BIT_5:
+ shift = d->type - TYPE_BIT_0;
+ params[0] = BOOLEAN_TO_FIXED((*(GLbitfield *) p >> shift) & 1);
+ break;
+ }
+}
+#endif
diff --git a/mesalib/src/mesa/main/glapidispatch.h b/mesalib/src/mesa/main/glapidispatch.h index e733a8d76..477f56a37 100644 --- a/mesalib/src/mesa/main/glapidispatch.h +++ b/mesalib/src/mesa/main/glapidispatch.h @@ -1,4620 +1,4626 @@ -/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * 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, sub license, - * 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 (including the next - * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS 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. - */ - -#if !defined( _GLAPI_DISPATCH_H_ ) -# define _GLAPI_DISPATCH_H_ - - -/* this file should not be included directly in mesa */ - -/** - * \file glapidispatch.h - * Macros for handling GL dispatch tables. - * - * For each known GL function, there are 3 macros in this file. The first - * macro is named CALL_FuncName and is used to call that GL function using - * the specified dispatch table. The other 2 macros, called GET_FuncName - * can SET_FuncName, are used to get and set the dispatch pointer for the - * named function in the specified dispatch table. - */ - -#define CALL_by_offset(disp, cast, offset, parameters) \ - (*(cast (GET_by_offset(disp, offset)))) parameters -#define GET_by_offset(disp, offset) \ - (offset >= 0) ? (((_glapi_proc *)(disp))[offset]) : NULL -#define SET_by_offset(disp, offset, fn) \ - do { \ - if ( (offset) < 0 ) { \ - /* fprintf( stderr, "[%s:%u] SET_by_offset(%p, %d, %s)!\n", */ \ - /* __func__, __LINE__, disp, offset, # fn); */ \ - /* abort(); */ \ - } \ - else { \ - ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \ - } \ - } while(0) - -/* total number of offsets below */ -#define _gloffset_COUNT 893 - -#define _gloffset_NewList 0 -#define _gloffset_EndList 1 -#define _gloffset_CallList 2 -#define _gloffset_CallLists 3 -#define _gloffset_DeleteLists 4 -#define _gloffset_GenLists 5 -#define _gloffset_ListBase 6 -#define _gloffset_Begin 7 -#define _gloffset_Bitmap 8 -#define _gloffset_Color3b 9 -#define _gloffset_Color3bv 10 -#define _gloffset_Color3d 11 -#define _gloffset_Color3dv 12 -#define _gloffset_Color3f 13 -#define _gloffset_Color3fv 14 -#define _gloffset_Color3i 15 -#define _gloffset_Color3iv 16 -#define _gloffset_Color3s 17 -#define _gloffset_Color3sv 18 -#define _gloffset_Color3ub 19 -#define _gloffset_Color3ubv 20 -#define _gloffset_Color3ui 21 -#define _gloffset_Color3uiv 22 -#define _gloffset_Color3us 23 -#define _gloffset_Color3usv 24 -#define _gloffset_Color4b 25 -#define _gloffset_Color4bv 26 -#define _gloffset_Color4d 27 -#define _gloffset_Color4dv 28 -#define _gloffset_Color4f 29 -#define _gloffset_Color4fv 30 -#define _gloffset_Color4i 31 -#define _gloffset_Color4iv 32 -#define _gloffset_Color4s 33 -#define _gloffset_Color4sv 34 -#define _gloffset_Color4ub 35 -#define _gloffset_Color4ubv 36 -#define _gloffset_Color4ui 37 -#define _gloffset_Color4uiv 38 -#define _gloffset_Color4us 39 -#define _gloffset_Color4usv 40 -#define _gloffset_EdgeFlag 41 -#define _gloffset_EdgeFlagv 42 -#define _gloffset_End 43 -#define _gloffset_Indexd 44 -#define _gloffset_Indexdv 45 -#define _gloffset_Indexf 46 -#define _gloffset_Indexfv 47 -#define _gloffset_Indexi 48 -#define _gloffset_Indexiv 49 -#define _gloffset_Indexs 50 -#define _gloffset_Indexsv 51 -#define _gloffset_Normal3b 52 -#define _gloffset_Normal3bv 53 -#define _gloffset_Normal3d 54 -#define _gloffset_Normal3dv 55 -#define _gloffset_Normal3f 56 -#define _gloffset_Normal3fv 57 -#define _gloffset_Normal3i 58 -#define _gloffset_Normal3iv 59 -#define _gloffset_Normal3s 60 -#define _gloffset_Normal3sv 61 -#define _gloffset_RasterPos2d 62 -#define _gloffset_RasterPos2dv 63 -#define _gloffset_RasterPos2f 64 -#define _gloffset_RasterPos2fv 65 -#define _gloffset_RasterPos2i 66 -#define _gloffset_RasterPos2iv 67 -#define _gloffset_RasterPos2s 68 -#define _gloffset_RasterPos2sv 69 -#define _gloffset_RasterPos3d 70 -#define _gloffset_RasterPos3dv 71 -#define _gloffset_RasterPos3f 72 -#define _gloffset_RasterPos3fv 73 -#define _gloffset_RasterPos3i 74 -#define _gloffset_RasterPos3iv 75 -#define _gloffset_RasterPos3s 76 -#define _gloffset_RasterPos3sv 77 -#define _gloffset_RasterPos4d 78 -#define _gloffset_RasterPos4dv 79 -#define _gloffset_RasterPos4f 80 -#define _gloffset_RasterPos4fv 81 -#define _gloffset_RasterPos4i 82 -#define _gloffset_RasterPos4iv 83 -#define _gloffset_RasterPos4s 84 -#define _gloffset_RasterPos4sv 85 -#define _gloffset_Rectd 86 -#define _gloffset_Rectdv 87 -#define _gloffset_Rectf 88 -#define _gloffset_Rectfv 89 -#define _gloffset_Recti 90 -#define _gloffset_Rectiv 91 -#define _gloffset_Rects 92 -#define _gloffset_Rectsv 93 -#define _gloffset_TexCoord1d 94 -#define _gloffset_TexCoord1dv 95 -#define _gloffset_TexCoord1f 96 -#define _gloffset_TexCoord1fv 97 -#define _gloffset_TexCoord1i 98 -#define _gloffset_TexCoord1iv 99 -#define _gloffset_TexCoord1s 100 -#define _gloffset_TexCoord1sv 101 -#define _gloffset_TexCoord2d 102 -#define _gloffset_TexCoord2dv 103 -#define _gloffset_TexCoord2f 104 -#define _gloffset_TexCoord2fv 105 -#define _gloffset_TexCoord2i 106 -#define _gloffset_TexCoord2iv 107 -#define _gloffset_TexCoord2s 108 -#define _gloffset_TexCoord2sv 109 -#define _gloffset_TexCoord3d 110 -#define _gloffset_TexCoord3dv 111 -#define _gloffset_TexCoord3f 112 -#define _gloffset_TexCoord3fv 113 -#define _gloffset_TexCoord3i 114 -#define _gloffset_TexCoord3iv 115 -#define _gloffset_TexCoord3s 116 -#define _gloffset_TexCoord3sv 117 -#define _gloffset_TexCoord4d 118 -#define _gloffset_TexCoord4dv 119 -#define _gloffset_TexCoord4f 120 -#define _gloffset_TexCoord4fv 121 -#define _gloffset_TexCoord4i 122 -#define _gloffset_TexCoord4iv 123 -#define _gloffset_TexCoord4s 124 -#define _gloffset_TexCoord4sv 125 -#define _gloffset_Vertex2d 126 -#define _gloffset_Vertex2dv 127 -#define _gloffset_Vertex2f 128 -#define _gloffset_Vertex2fv 129 -#define _gloffset_Vertex2i 130 -#define _gloffset_Vertex2iv 131 -#define _gloffset_Vertex2s 132 -#define _gloffset_Vertex2sv 133 -#define _gloffset_Vertex3d 134 -#define _gloffset_Vertex3dv 135 -#define _gloffset_Vertex3f 136 -#define _gloffset_Vertex3fv 137 -#define _gloffset_Vertex3i 138 -#define _gloffset_Vertex3iv 139 -#define _gloffset_Vertex3s 140 -#define _gloffset_Vertex3sv 141 -#define _gloffset_Vertex4d 142 -#define _gloffset_Vertex4dv 143 -#define _gloffset_Vertex4f 144 -#define _gloffset_Vertex4fv 145 -#define _gloffset_Vertex4i 146 -#define _gloffset_Vertex4iv 147 -#define _gloffset_Vertex4s 148 -#define _gloffset_Vertex4sv 149 -#define _gloffset_ClipPlane 150 -#define _gloffset_ColorMaterial 151 -#define _gloffset_CullFace 152 -#define _gloffset_Fogf 153 -#define _gloffset_Fogfv 154 -#define _gloffset_Fogi 155 -#define _gloffset_Fogiv 156 -#define _gloffset_FrontFace 157 -#define _gloffset_Hint 158 -#define _gloffset_Lightf 159 -#define _gloffset_Lightfv 160 -#define _gloffset_Lighti 161 -#define _gloffset_Lightiv 162 -#define _gloffset_LightModelf 163 -#define _gloffset_LightModelfv 164 -#define _gloffset_LightModeli 165 -#define _gloffset_LightModeliv 166 -#define _gloffset_LineStipple 167 -#define _gloffset_LineWidth 168 -#define _gloffset_Materialf 169 -#define _gloffset_Materialfv 170 -#define _gloffset_Materiali 171 -#define _gloffset_Materialiv 172 -#define _gloffset_PointSize 173 -#define _gloffset_PolygonMode 174 -#define _gloffset_PolygonStipple 175 -#define _gloffset_Scissor 176 -#define _gloffset_ShadeModel 177 -#define _gloffset_TexParameterf 178 -#define _gloffset_TexParameterfv 179 -#define _gloffset_TexParameteri 180 -#define _gloffset_TexParameteriv 181 -#define _gloffset_TexImage1D 182 -#define _gloffset_TexImage2D 183 -#define _gloffset_TexEnvf 184 -#define _gloffset_TexEnvfv 185 -#define _gloffset_TexEnvi 186 -#define _gloffset_TexEnviv 187 -#define _gloffset_TexGend 188 -#define _gloffset_TexGendv 189 -#define _gloffset_TexGenf 190 -#define _gloffset_TexGenfv 191 -#define _gloffset_TexGeni 192 -#define _gloffset_TexGeniv 193 -#define _gloffset_FeedbackBuffer 194 -#define _gloffset_SelectBuffer 195 -#define _gloffset_RenderMode 196 -#define _gloffset_InitNames 197 -#define _gloffset_LoadName 198 -#define _gloffset_PassThrough 199 -#define _gloffset_PopName 200 -#define _gloffset_PushName 201 -#define _gloffset_DrawBuffer 202 -#define _gloffset_Clear 203 -#define _gloffset_ClearAccum 204 -#define _gloffset_ClearIndex 205 -#define _gloffset_ClearColor 206 -#define _gloffset_ClearStencil 207 -#define _gloffset_ClearDepth 208 -#define _gloffset_StencilMask 209 -#define _gloffset_ColorMask 210 -#define _gloffset_DepthMask 211 -#define _gloffset_IndexMask 212 -#define _gloffset_Accum 213 -#define _gloffset_Disable 214 -#define _gloffset_Enable 215 -#define _gloffset_Finish 216 -#define _gloffset_Flush 217 -#define _gloffset_PopAttrib 218 -#define _gloffset_PushAttrib 219 -#define _gloffset_Map1d 220 -#define _gloffset_Map1f 221 -#define _gloffset_Map2d 222 -#define _gloffset_Map2f 223 -#define _gloffset_MapGrid1d 224 -#define _gloffset_MapGrid1f 225 -#define _gloffset_MapGrid2d 226 -#define _gloffset_MapGrid2f 227 -#define _gloffset_EvalCoord1d 228 -#define _gloffset_EvalCoord1dv 229 -#define _gloffset_EvalCoord1f 230 -#define _gloffset_EvalCoord1fv 231 -#define _gloffset_EvalCoord2d 232 -#define _gloffset_EvalCoord2dv 233 -#define _gloffset_EvalCoord2f 234 -#define _gloffset_EvalCoord2fv 235 -#define _gloffset_EvalMesh1 236 -#define _gloffset_EvalPoint1 237 -#define _gloffset_EvalMesh2 238 -#define _gloffset_EvalPoint2 239 -#define _gloffset_AlphaFunc 240 -#define _gloffset_BlendFunc 241 -#define _gloffset_LogicOp 242 -#define _gloffset_StencilFunc 243 -#define _gloffset_StencilOp 244 -#define _gloffset_DepthFunc 245 -#define _gloffset_PixelZoom 246 -#define _gloffset_PixelTransferf 247 -#define _gloffset_PixelTransferi 248 -#define _gloffset_PixelStoref 249 -#define _gloffset_PixelStorei 250 -#define _gloffset_PixelMapfv 251 -#define _gloffset_PixelMapuiv 252 -#define _gloffset_PixelMapusv 253 -#define _gloffset_ReadBuffer 254 -#define _gloffset_CopyPixels 255 -#define _gloffset_ReadPixels 256 -#define _gloffset_DrawPixels 257 -#define _gloffset_GetBooleanv 258 -#define _gloffset_GetClipPlane 259 -#define _gloffset_GetDoublev 260 -#define _gloffset_GetError 261 -#define _gloffset_GetFloatv 262 -#define _gloffset_GetIntegerv 263 -#define _gloffset_GetLightfv 264 -#define _gloffset_GetLightiv 265 -#define _gloffset_GetMapdv 266 -#define _gloffset_GetMapfv 267 -#define _gloffset_GetMapiv 268 -#define _gloffset_GetMaterialfv 269 -#define _gloffset_GetMaterialiv 270 -#define _gloffset_GetPixelMapfv 271 -#define _gloffset_GetPixelMapuiv 272 -#define _gloffset_GetPixelMapusv 273 -#define _gloffset_GetPolygonStipple 274 -#define _gloffset_GetString 275 -#define _gloffset_GetTexEnvfv 276 -#define _gloffset_GetTexEnviv 277 -#define _gloffset_GetTexGendv 278 -#define _gloffset_GetTexGenfv 279 -#define _gloffset_GetTexGeniv 280 -#define _gloffset_GetTexImage 281 -#define _gloffset_GetTexParameterfv 282 -#define _gloffset_GetTexParameteriv 283 -#define _gloffset_GetTexLevelParameterfv 284 -#define _gloffset_GetTexLevelParameteriv 285 -#define _gloffset_IsEnabled 286 -#define _gloffset_IsList 287 -#define _gloffset_DepthRange 288 -#define _gloffset_Frustum 289 -#define _gloffset_LoadIdentity 290 -#define _gloffset_LoadMatrixf 291 -#define _gloffset_LoadMatrixd 292 -#define _gloffset_MatrixMode 293 -#define _gloffset_MultMatrixf 294 -#define _gloffset_MultMatrixd 295 -#define _gloffset_Ortho 296 -#define _gloffset_PopMatrix 297 -#define _gloffset_PushMatrix 298 -#define _gloffset_Rotated 299 -#define _gloffset_Rotatef 300 -#define _gloffset_Scaled 301 -#define _gloffset_Scalef 302 -#define _gloffset_Translated 303 -#define _gloffset_Translatef 304 -#define _gloffset_Viewport 305 -#define _gloffset_ArrayElement 306 -#define _gloffset_BindTexture 307 -#define _gloffset_ColorPointer 308 -#define _gloffset_DisableClientState 309 -#define _gloffset_DrawArrays 310 -#define _gloffset_DrawElements 311 -#define _gloffset_EdgeFlagPointer 312 -#define _gloffset_EnableClientState 313 -#define _gloffset_IndexPointer 314 -#define _gloffset_Indexub 315 -#define _gloffset_Indexubv 316 -#define _gloffset_InterleavedArrays 317 -#define _gloffset_NormalPointer 318 -#define _gloffset_PolygonOffset 319 -#define _gloffset_TexCoordPointer 320 -#define _gloffset_VertexPointer 321 -#define _gloffset_AreTexturesResident 322 -#define _gloffset_CopyTexImage1D 323 -#define _gloffset_CopyTexImage2D 324 -#define _gloffset_CopyTexSubImage1D 325 -#define _gloffset_CopyTexSubImage2D 326 -#define _gloffset_DeleteTextures 327 -#define _gloffset_GenTextures 328 -#define _gloffset_GetPointerv 329 -#define _gloffset_IsTexture 330 -#define _gloffset_PrioritizeTextures 331 -#define _gloffset_TexSubImage1D 332 -#define _gloffset_TexSubImage2D 333 -#define _gloffset_PopClientAttrib 334 -#define _gloffset_PushClientAttrib 335 -#define _gloffset_BlendColor 336 -#define _gloffset_BlendEquation 337 -#define _gloffset_DrawRangeElements 338 -#define _gloffset_ColorTable 339 -#define _gloffset_ColorTableParameterfv 340 -#define _gloffset_ColorTableParameteriv 341 -#define _gloffset_CopyColorTable 342 -#define _gloffset_GetColorTable 343 -#define _gloffset_GetColorTableParameterfv 344 -#define _gloffset_GetColorTableParameteriv 345 -#define _gloffset_ColorSubTable 346 -#define _gloffset_CopyColorSubTable 347 -#define _gloffset_ConvolutionFilter1D 348 -#define _gloffset_ConvolutionFilter2D 349 -#define _gloffset_ConvolutionParameterf 350 -#define _gloffset_ConvolutionParameterfv 351 -#define _gloffset_ConvolutionParameteri 352 -#define _gloffset_ConvolutionParameteriv 353 -#define _gloffset_CopyConvolutionFilter1D 354 -#define _gloffset_CopyConvolutionFilter2D 355 -#define _gloffset_GetConvolutionFilter 356 -#define _gloffset_GetConvolutionParameterfv 357 -#define _gloffset_GetConvolutionParameteriv 358 -#define _gloffset_GetSeparableFilter 359 -#define _gloffset_SeparableFilter2D 360 -#define _gloffset_GetHistogram 361 -#define _gloffset_GetHistogramParameterfv 362 -#define _gloffset_GetHistogramParameteriv 363 -#define _gloffset_GetMinmax 364 -#define _gloffset_GetMinmaxParameterfv 365 -#define _gloffset_GetMinmaxParameteriv 366 -#define _gloffset_Histogram 367 -#define _gloffset_Minmax 368 -#define _gloffset_ResetHistogram 369 -#define _gloffset_ResetMinmax 370 -#define _gloffset_TexImage3D 371 -#define _gloffset_TexSubImage3D 372 -#define _gloffset_CopyTexSubImage3D 373 -#define _gloffset_ActiveTextureARB 374 -#define _gloffset_ClientActiveTextureARB 375 -#define _gloffset_MultiTexCoord1dARB 376 -#define _gloffset_MultiTexCoord1dvARB 377 -#define _gloffset_MultiTexCoord1fARB 378 -#define _gloffset_MultiTexCoord1fvARB 379 -#define _gloffset_MultiTexCoord1iARB 380 -#define _gloffset_MultiTexCoord1ivARB 381 -#define _gloffset_MultiTexCoord1sARB 382 -#define _gloffset_MultiTexCoord1svARB 383 -#define _gloffset_MultiTexCoord2dARB 384 -#define _gloffset_MultiTexCoord2dvARB 385 -#define _gloffset_MultiTexCoord2fARB 386 -#define _gloffset_MultiTexCoord2fvARB 387 -#define _gloffset_MultiTexCoord2iARB 388 -#define _gloffset_MultiTexCoord2ivARB 389 -#define _gloffset_MultiTexCoord2sARB 390 -#define _gloffset_MultiTexCoord2svARB 391 -#define _gloffset_MultiTexCoord3dARB 392 -#define _gloffset_MultiTexCoord3dvARB 393 -#define _gloffset_MultiTexCoord3fARB 394 -#define _gloffset_MultiTexCoord3fvARB 395 -#define _gloffset_MultiTexCoord3iARB 396 -#define _gloffset_MultiTexCoord3ivARB 397 -#define _gloffset_MultiTexCoord3sARB 398 -#define _gloffset_MultiTexCoord3svARB 399 -#define _gloffset_MultiTexCoord4dARB 400 -#define _gloffset_MultiTexCoord4dvARB 401 -#define _gloffset_MultiTexCoord4fARB 402 -#define _gloffset_MultiTexCoord4fvARB 403 -#define _gloffset_MultiTexCoord4iARB 404 -#define _gloffset_MultiTexCoord4ivARB 405 -#define _gloffset_MultiTexCoord4sARB 406 -#define _gloffset_MultiTexCoord4svARB 407 - -#if !defined(_GLAPI_USE_REMAP_TABLE) - -#define _gloffset_AttachShader 408 -#define _gloffset_CreateProgram 409 -#define _gloffset_CreateShader 410 -#define _gloffset_DeleteProgram 411 -#define _gloffset_DeleteShader 412 -#define _gloffset_DetachShader 413 -#define _gloffset_GetAttachedShaders 414 -#define _gloffset_GetProgramInfoLog 415 -#define _gloffset_GetProgramiv 416 -#define _gloffset_GetShaderInfoLog 417 -#define _gloffset_GetShaderiv 418 -#define _gloffset_IsProgram 419 -#define _gloffset_IsShader 420 -#define _gloffset_StencilFuncSeparate 421 -#define _gloffset_StencilMaskSeparate 422 -#define _gloffset_StencilOpSeparate 423 -#define _gloffset_UniformMatrix2x3fv 424 -#define _gloffset_UniformMatrix2x4fv 425 -#define _gloffset_UniformMatrix3x2fv 426 -#define _gloffset_UniformMatrix3x4fv 427 -#define _gloffset_UniformMatrix4x2fv 428 -#define _gloffset_UniformMatrix4x3fv 429 -#define _gloffset_ClampColor 430 -#define _gloffset_ClearBufferfi 431 -#define _gloffset_ClearBufferfv 432 -#define _gloffset_ClearBufferiv 433 -#define _gloffset_ClearBufferuiv 434 -#define _gloffset_GetStringi 435 -#define _gloffset_TexBuffer 436 -#define _gloffset_FramebufferTexture 437 -#define _gloffset_GetBufferParameteri64v 438 -#define _gloffset_GetInteger64i_v 439 -#define _gloffset_VertexAttribDivisor 440 -#define _gloffset_LoadTransposeMatrixdARB 441 -#define _gloffset_LoadTransposeMatrixfARB 442 -#define _gloffset_MultTransposeMatrixdARB 443 -#define _gloffset_MultTransposeMatrixfARB 444 -#define _gloffset_SampleCoverageARB 445 -#define _gloffset_CompressedTexImage1DARB 446 -#define _gloffset_CompressedTexImage2DARB 447 -#define _gloffset_CompressedTexImage3DARB 448 -#define _gloffset_CompressedTexSubImage1DARB 449 -#define _gloffset_CompressedTexSubImage2DARB 450 -#define _gloffset_CompressedTexSubImage3DARB 451 -#define _gloffset_GetCompressedTexImageARB 452 -#define _gloffset_DisableVertexAttribArrayARB 453 -#define _gloffset_EnableVertexAttribArrayARB 454 -#define _gloffset_GetProgramEnvParameterdvARB 455 -#define _gloffset_GetProgramEnvParameterfvARB 456 -#define _gloffset_GetProgramLocalParameterdvARB 457 -#define _gloffset_GetProgramLocalParameterfvARB 458 -#define _gloffset_GetProgramStringARB 459 -#define _gloffset_GetProgramivARB 460 -#define _gloffset_GetVertexAttribdvARB 461 -#define _gloffset_GetVertexAttribfvARB 462 -#define _gloffset_GetVertexAttribivARB 463 -#define _gloffset_ProgramEnvParameter4dARB 464 -#define _gloffset_ProgramEnvParameter4dvARB 465 -#define _gloffset_ProgramEnvParameter4fARB 466 -#define _gloffset_ProgramEnvParameter4fvARB 467 -#define _gloffset_ProgramLocalParameter4dARB 468 -#define _gloffset_ProgramLocalParameter4dvARB 469 -#define _gloffset_ProgramLocalParameter4fARB 470 -#define _gloffset_ProgramLocalParameter4fvARB 471 -#define _gloffset_ProgramStringARB 472 -#define _gloffset_VertexAttrib1dARB 473 -#define _gloffset_VertexAttrib1dvARB 474 -#define _gloffset_VertexAttrib1fARB 475 -#define _gloffset_VertexAttrib1fvARB 476 -#define _gloffset_VertexAttrib1sARB 477 -#define _gloffset_VertexAttrib1svARB 478 -#define _gloffset_VertexAttrib2dARB 479 -#define _gloffset_VertexAttrib2dvARB 480 -#define _gloffset_VertexAttrib2fARB 481 -#define _gloffset_VertexAttrib2fvARB 482 -#define _gloffset_VertexAttrib2sARB 483 -#define _gloffset_VertexAttrib2svARB 484 -#define _gloffset_VertexAttrib3dARB 485 -#define _gloffset_VertexAttrib3dvARB 486 -#define _gloffset_VertexAttrib3fARB 487 -#define _gloffset_VertexAttrib3fvARB 488 -#define _gloffset_VertexAttrib3sARB 489 -#define _gloffset_VertexAttrib3svARB 490 -#define _gloffset_VertexAttrib4NbvARB 491 -#define _gloffset_VertexAttrib4NivARB 492 -#define _gloffset_VertexAttrib4NsvARB 493 -#define _gloffset_VertexAttrib4NubARB 494 -#define _gloffset_VertexAttrib4NubvARB 495 -#define _gloffset_VertexAttrib4NuivARB 496 -#define _gloffset_VertexAttrib4NusvARB 497 -#define _gloffset_VertexAttrib4bvARB 498 -#define _gloffset_VertexAttrib4dARB 499 -#define _gloffset_VertexAttrib4dvARB 500 -#define _gloffset_VertexAttrib4fARB 501 -#define _gloffset_VertexAttrib4fvARB 502 -#define _gloffset_VertexAttrib4ivARB 503 -#define _gloffset_VertexAttrib4sARB 504 -#define _gloffset_VertexAttrib4svARB 505 -#define _gloffset_VertexAttrib4ubvARB 506 -#define _gloffset_VertexAttrib4uivARB 507 -#define _gloffset_VertexAttrib4usvARB 508 -#define _gloffset_VertexAttribPointerARB 509 -#define _gloffset_BindBufferARB 510 -#define _gloffset_BufferDataARB 511 -#define _gloffset_BufferSubDataARB 512 -#define _gloffset_DeleteBuffersARB 513 -#define _gloffset_GenBuffersARB 514 -#define _gloffset_GetBufferParameterivARB 515 -#define _gloffset_GetBufferPointervARB 516 -#define _gloffset_GetBufferSubDataARB 517 -#define _gloffset_IsBufferARB 518 -#define _gloffset_MapBufferARB 519 -#define _gloffset_UnmapBufferARB 520 -#define _gloffset_BeginQueryARB 521 -#define _gloffset_DeleteQueriesARB 522 -#define _gloffset_EndQueryARB 523 -#define _gloffset_GenQueriesARB 524 -#define _gloffset_GetQueryObjectivARB 525 -#define _gloffset_GetQueryObjectuivARB 526 -#define _gloffset_GetQueryivARB 527 -#define _gloffset_IsQueryARB 528 -#define _gloffset_AttachObjectARB 529 -#define _gloffset_CompileShaderARB 530 -#define _gloffset_CreateProgramObjectARB 531 -#define _gloffset_CreateShaderObjectARB 532 -#define _gloffset_DeleteObjectARB 533 -#define _gloffset_DetachObjectARB 534 -#define _gloffset_GetActiveUniformARB 535 -#define _gloffset_GetAttachedObjectsARB 536 -#define _gloffset_GetHandleARB 537 -#define _gloffset_GetInfoLogARB 538 -#define _gloffset_GetObjectParameterfvARB 539 -#define _gloffset_GetObjectParameterivARB 540 -#define _gloffset_GetShaderSourceARB 541 -#define _gloffset_GetUniformLocationARB 542 -#define _gloffset_GetUniformfvARB 543 -#define _gloffset_GetUniformivARB 544 -#define _gloffset_LinkProgramARB 545 -#define _gloffset_ShaderSourceARB 546 -#define _gloffset_Uniform1fARB 547 -#define _gloffset_Uniform1fvARB 548 -#define _gloffset_Uniform1iARB 549 -#define _gloffset_Uniform1ivARB 550 -#define _gloffset_Uniform2fARB 551 -#define _gloffset_Uniform2fvARB 552 -#define _gloffset_Uniform2iARB 553 -#define _gloffset_Uniform2ivARB 554 -#define _gloffset_Uniform3fARB 555 -#define _gloffset_Uniform3fvARB 556 -#define _gloffset_Uniform3iARB 557 -#define _gloffset_Uniform3ivARB 558 -#define _gloffset_Uniform4fARB 559 -#define _gloffset_Uniform4fvARB 560 -#define _gloffset_Uniform4iARB 561 -#define _gloffset_Uniform4ivARB 562 -#define _gloffset_UniformMatrix2fvARB 563 -#define _gloffset_UniformMatrix3fvARB 564 -#define _gloffset_UniformMatrix4fvARB 565 -#define _gloffset_UseProgramObjectARB 566 -#define _gloffset_ValidateProgramARB 567 -#define _gloffset_BindAttribLocationARB 568 -#define _gloffset_GetActiveAttribARB 569 -#define _gloffset_GetAttribLocationARB 570 -#define _gloffset_DrawBuffersARB 571 -#define _gloffset_ClampColorARB 572 -#define _gloffset_DrawArraysInstancedARB 573 -#define _gloffset_DrawElementsInstancedARB 574 -#define _gloffset_RenderbufferStorageMultisample 575 -#define _gloffset_FramebufferTextureARB 576 -#define _gloffset_FramebufferTextureFaceARB 577 -#define _gloffset_ProgramParameteriARB 578 -#define _gloffset_VertexAttribDivisorARB 579 -#define _gloffset_FlushMappedBufferRange 580 -#define _gloffset_MapBufferRange 581 -#define _gloffset_BindVertexArray 582 -#define _gloffset_GenVertexArrays 583 -#define _gloffset_CopyBufferSubData 584 -#define _gloffset_ClientWaitSync 585 -#define _gloffset_DeleteSync 586 -#define _gloffset_FenceSync 587 -#define _gloffset_GetInteger64v 588 -#define _gloffset_GetSynciv 589 -#define _gloffset_IsSync 590 -#define _gloffset_WaitSync 591 -#define _gloffset_DrawElementsBaseVertex 592 -#define _gloffset_DrawRangeElementsBaseVertex 593 -#define _gloffset_MultiDrawElementsBaseVertex 594 -#define _gloffset_BlendEquationSeparateiARB 595 -#define _gloffset_BlendEquationiARB 596 -#define _gloffset_BlendFuncSeparateiARB 597 -#define _gloffset_BlendFunciARB 598 -#define _gloffset_BindTransformFeedback 599 -#define _gloffset_DeleteTransformFeedbacks 600 -#define _gloffset_DrawTransformFeedback 601 -#define _gloffset_GenTransformFeedbacks 602 -#define _gloffset_IsTransformFeedback 603 -#define _gloffset_PauseTransformFeedback 604 -#define _gloffset_ResumeTransformFeedback 605 -#define _gloffset_ClearDepthf 606 -#define _gloffset_DepthRangef 607 -#define _gloffset_GetShaderPrecisionFormat 608 -#define _gloffset_ReleaseShaderCompiler 609 -#define _gloffset_ShaderBinary 610 -#define _gloffset_PolygonOffsetEXT 611 -#define _gloffset_GetPixelTexGenParameterfvSGIS 612 -#define _gloffset_GetPixelTexGenParameterivSGIS 613 -#define _gloffset_PixelTexGenParameterfSGIS 614 -#define _gloffset_PixelTexGenParameterfvSGIS 615 -#define _gloffset_PixelTexGenParameteriSGIS 616 -#define _gloffset_PixelTexGenParameterivSGIS 617 -#define _gloffset_SampleMaskSGIS 618 -#define _gloffset_SamplePatternSGIS 619 -#define _gloffset_ColorPointerEXT 620 -#define _gloffset_EdgeFlagPointerEXT 621 -#define _gloffset_IndexPointerEXT 622 -#define _gloffset_NormalPointerEXT 623 -#define _gloffset_TexCoordPointerEXT 624 -#define _gloffset_VertexPointerEXT 625 -#define _gloffset_PointParameterfEXT 626 -#define _gloffset_PointParameterfvEXT 627 -#define _gloffset_LockArraysEXT 628 -#define _gloffset_UnlockArraysEXT 629 -#define _gloffset_SecondaryColor3bEXT 630 -#define _gloffset_SecondaryColor3bvEXT 631 -#define _gloffset_SecondaryColor3dEXT 632 -#define _gloffset_SecondaryColor3dvEXT 633 -#define _gloffset_SecondaryColor3fEXT 634 -#define _gloffset_SecondaryColor3fvEXT 635 -#define _gloffset_SecondaryColor3iEXT 636 -#define _gloffset_SecondaryColor3ivEXT 637 -#define _gloffset_SecondaryColor3sEXT 638 -#define _gloffset_SecondaryColor3svEXT 639 -#define _gloffset_SecondaryColor3ubEXT 640 -#define _gloffset_SecondaryColor3ubvEXT 641 -#define _gloffset_SecondaryColor3uiEXT 642 -#define _gloffset_SecondaryColor3uivEXT 643 -#define _gloffset_SecondaryColor3usEXT 644 -#define _gloffset_SecondaryColor3usvEXT 645 -#define _gloffset_SecondaryColorPointerEXT 646 -#define _gloffset_MultiDrawArraysEXT 647 -#define _gloffset_MultiDrawElementsEXT 648 -#define _gloffset_FogCoordPointerEXT 649 -#define _gloffset_FogCoorddEXT 650 -#define _gloffset_FogCoorddvEXT 651 -#define _gloffset_FogCoordfEXT 652 -#define _gloffset_FogCoordfvEXT 653 -#define _gloffset_PixelTexGenSGIX 654 -#define _gloffset_BlendFuncSeparateEXT 655 -#define _gloffset_FlushVertexArrayRangeNV 656 -#define _gloffset_VertexArrayRangeNV 657 -#define _gloffset_CombinerInputNV 658 -#define _gloffset_CombinerOutputNV 659 -#define _gloffset_CombinerParameterfNV 660 -#define _gloffset_CombinerParameterfvNV 661 -#define _gloffset_CombinerParameteriNV 662 -#define _gloffset_CombinerParameterivNV 663 -#define _gloffset_FinalCombinerInputNV 664 -#define _gloffset_GetCombinerInputParameterfvNV 665 -#define _gloffset_GetCombinerInputParameterivNV 666 -#define _gloffset_GetCombinerOutputParameterfvNV 667 -#define _gloffset_GetCombinerOutputParameterivNV 668 -#define _gloffset_GetFinalCombinerInputParameterfvNV 669 -#define _gloffset_GetFinalCombinerInputParameterivNV 670 -#define _gloffset_ResizeBuffersMESA 671 -#define _gloffset_WindowPos2dMESA 672 -#define _gloffset_WindowPos2dvMESA 673 -#define _gloffset_WindowPos2fMESA 674 -#define _gloffset_WindowPos2fvMESA 675 -#define _gloffset_WindowPos2iMESA 676 -#define _gloffset_WindowPos2ivMESA 677 -#define _gloffset_WindowPos2sMESA 678 -#define _gloffset_WindowPos2svMESA 679 -#define _gloffset_WindowPos3dMESA 680 -#define _gloffset_WindowPos3dvMESA 681 -#define _gloffset_WindowPos3fMESA 682 -#define _gloffset_WindowPos3fvMESA 683 -#define _gloffset_WindowPos3iMESA 684 -#define _gloffset_WindowPos3ivMESA 685 -#define _gloffset_WindowPos3sMESA 686 -#define _gloffset_WindowPos3svMESA 687 -#define _gloffset_WindowPos4dMESA 688 -#define _gloffset_WindowPos4dvMESA 689 -#define _gloffset_WindowPos4fMESA 690 -#define _gloffset_WindowPos4fvMESA 691 -#define _gloffset_WindowPos4iMESA 692 -#define _gloffset_WindowPos4ivMESA 693 -#define _gloffset_WindowPos4sMESA 694 -#define _gloffset_WindowPos4svMESA 695 -#define _gloffset_MultiModeDrawArraysIBM 696 -#define _gloffset_MultiModeDrawElementsIBM 697 -#define _gloffset_DeleteFencesNV 698 -#define _gloffset_FinishFenceNV 699 -#define _gloffset_GenFencesNV 700 -#define _gloffset_GetFenceivNV 701 -#define _gloffset_IsFenceNV 702 -#define _gloffset_SetFenceNV 703 -#define _gloffset_TestFenceNV 704 -#define _gloffset_AreProgramsResidentNV 705 -#define _gloffset_BindProgramNV 706 -#define _gloffset_DeleteProgramsNV 707 -#define _gloffset_ExecuteProgramNV 708 -#define _gloffset_GenProgramsNV 709 -#define _gloffset_GetProgramParameterdvNV 710 -#define _gloffset_GetProgramParameterfvNV 711 -#define _gloffset_GetProgramStringNV 712 -#define _gloffset_GetProgramivNV 713 -#define _gloffset_GetTrackMatrixivNV 714 -#define _gloffset_GetVertexAttribPointervNV 715 -#define _gloffset_GetVertexAttribdvNV 716 -#define _gloffset_GetVertexAttribfvNV 717 -#define _gloffset_GetVertexAttribivNV 718 -#define _gloffset_IsProgramNV 719 -#define _gloffset_LoadProgramNV 720 -#define _gloffset_ProgramParameters4dvNV 721 -#define _gloffset_ProgramParameters4fvNV 722 -#define _gloffset_RequestResidentProgramsNV 723 -#define _gloffset_TrackMatrixNV 724 -#define _gloffset_VertexAttrib1dNV 725 -#define _gloffset_VertexAttrib1dvNV 726 -#define _gloffset_VertexAttrib1fNV 727 -#define _gloffset_VertexAttrib1fvNV 728 -#define _gloffset_VertexAttrib1sNV 729 -#define _gloffset_VertexAttrib1svNV 730 -#define _gloffset_VertexAttrib2dNV 731 -#define _gloffset_VertexAttrib2dvNV 732 -#define _gloffset_VertexAttrib2fNV 733 -#define _gloffset_VertexAttrib2fvNV 734 -#define _gloffset_VertexAttrib2sNV 735 -#define _gloffset_VertexAttrib2svNV 736 -#define _gloffset_VertexAttrib3dNV 737 -#define _gloffset_VertexAttrib3dvNV 738 -#define _gloffset_VertexAttrib3fNV 739 -#define _gloffset_VertexAttrib3fvNV 740 -#define _gloffset_VertexAttrib3sNV 741 -#define _gloffset_VertexAttrib3svNV 742 -#define _gloffset_VertexAttrib4dNV 743 -#define _gloffset_VertexAttrib4dvNV 744 -#define _gloffset_VertexAttrib4fNV 745 -#define _gloffset_VertexAttrib4fvNV 746 -#define _gloffset_VertexAttrib4sNV 747 -#define _gloffset_VertexAttrib4svNV 748 -#define _gloffset_VertexAttrib4ubNV 749 -#define _gloffset_VertexAttrib4ubvNV 750 -#define _gloffset_VertexAttribPointerNV 751 -#define _gloffset_VertexAttribs1dvNV 752 -#define _gloffset_VertexAttribs1fvNV 753 -#define _gloffset_VertexAttribs1svNV 754 -#define _gloffset_VertexAttribs2dvNV 755 -#define _gloffset_VertexAttribs2fvNV 756 -#define _gloffset_VertexAttribs2svNV 757 -#define _gloffset_VertexAttribs3dvNV 758 -#define _gloffset_VertexAttribs3fvNV 759 -#define _gloffset_VertexAttribs3svNV 760 -#define _gloffset_VertexAttribs4dvNV 761 -#define _gloffset_VertexAttribs4fvNV 762 -#define _gloffset_VertexAttribs4svNV 763 -#define _gloffset_VertexAttribs4ubvNV 764 -#define _gloffset_GetTexBumpParameterfvATI 765 -#define _gloffset_GetTexBumpParameterivATI 766 -#define _gloffset_TexBumpParameterfvATI 767 -#define _gloffset_TexBumpParameterivATI 768 -#define _gloffset_AlphaFragmentOp1ATI 769 -#define _gloffset_AlphaFragmentOp2ATI 770 -#define _gloffset_AlphaFragmentOp3ATI 771 -#define _gloffset_BeginFragmentShaderATI 772 -#define _gloffset_BindFragmentShaderATI 773 -#define _gloffset_ColorFragmentOp1ATI 774 -#define _gloffset_ColorFragmentOp2ATI 775 -#define _gloffset_ColorFragmentOp3ATI 776 -#define _gloffset_DeleteFragmentShaderATI 777 -#define _gloffset_EndFragmentShaderATI 778 -#define _gloffset_GenFragmentShadersATI 779 -#define _gloffset_PassTexCoordATI 780 -#define _gloffset_SampleMapATI 781 -#define _gloffset_SetFragmentShaderConstantATI 782 -#define _gloffset_PointParameteriNV 783 -#define _gloffset_PointParameterivNV 784 -#define _gloffset_ActiveStencilFaceEXT 785 -#define _gloffset_BindVertexArrayAPPLE 786 -#define _gloffset_DeleteVertexArraysAPPLE 787 -#define _gloffset_GenVertexArraysAPPLE 788 -#define _gloffset_IsVertexArrayAPPLE 789 -#define _gloffset_GetProgramNamedParameterdvNV 790 -#define _gloffset_GetProgramNamedParameterfvNV 791 -#define _gloffset_ProgramNamedParameter4dNV 792 -#define _gloffset_ProgramNamedParameter4dvNV 793 -#define _gloffset_ProgramNamedParameter4fNV 794 -#define _gloffset_ProgramNamedParameter4fvNV 795 -#define _gloffset_PrimitiveRestartIndexNV 796 -#define _gloffset_PrimitiveRestartNV 797 -#define _gloffset_DepthBoundsEXT 798 -#define _gloffset_BlendEquationSeparateEXT 799 -#define _gloffset_BindFramebufferEXT 800 -#define _gloffset_BindRenderbufferEXT 801 -#define _gloffset_CheckFramebufferStatusEXT 802 -#define _gloffset_DeleteFramebuffersEXT 803 -#define _gloffset_DeleteRenderbuffersEXT 804 -#define _gloffset_FramebufferRenderbufferEXT 805 -#define _gloffset_FramebufferTexture1DEXT 806 -#define _gloffset_FramebufferTexture2DEXT 807 -#define _gloffset_FramebufferTexture3DEXT 808 -#define _gloffset_GenFramebuffersEXT 809 -#define _gloffset_GenRenderbuffersEXT 810 -#define _gloffset_GenerateMipmapEXT 811 -#define _gloffset_GetFramebufferAttachmentParameterivEXT 812 -#define _gloffset_GetRenderbufferParameterivEXT 813 -#define _gloffset_IsFramebufferEXT 814 -#define _gloffset_IsRenderbufferEXT 815 -#define _gloffset_RenderbufferStorageEXT 816 -#define _gloffset_BlitFramebufferEXT 817 -#define _gloffset_BufferParameteriAPPLE 818 -#define _gloffset_FlushMappedBufferRangeAPPLE 819 -#define _gloffset_BindFragDataLocationEXT 820 -#define _gloffset_GetFragDataLocationEXT 821 -#define _gloffset_GetUniformuivEXT 822 -#define _gloffset_GetVertexAttribIivEXT 823 -#define _gloffset_GetVertexAttribIuivEXT 824 -#define _gloffset_Uniform1uiEXT 825 -#define _gloffset_Uniform1uivEXT 826 -#define _gloffset_Uniform2uiEXT 827 -#define _gloffset_Uniform2uivEXT 828 -#define _gloffset_Uniform3uiEXT 829 -#define _gloffset_Uniform3uivEXT 830 -#define _gloffset_Uniform4uiEXT 831 -#define _gloffset_Uniform4uivEXT 832 -#define _gloffset_VertexAttribI1iEXT 833 -#define _gloffset_VertexAttribI1ivEXT 834 -#define _gloffset_VertexAttribI1uiEXT 835 -#define _gloffset_VertexAttribI1uivEXT 836 -#define _gloffset_VertexAttribI2iEXT 837 -#define _gloffset_VertexAttribI2ivEXT 838 -#define _gloffset_VertexAttribI2uiEXT 839 -#define _gloffset_VertexAttribI2uivEXT 840 -#define _gloffset_VertexAttribI3iEXT 841 -#define _gloffset_VertexAttribI3ivEXT 842 -#define _gloffset_VertexAttribI3uiEXT 843 -#define _gloffset_VertexAttribI3uivEXT 844 -#define _gloffset_VertexAttribI4bvEXT 845 -#define _gloffset_VertexAttribI4iEXT 846 -#define _gloffset_VertexAttribI4ivEXT 847 -#define _gloffset_VertexAttribI4svEXT 848 -#define _gloffset_VertexAttribI4ubvEXT 849 -#define _gloffset_VertexAttribI4uiEXT 850 -#define _gloffset_VertexAttribI4uivEXT 851 -#define _gloffset_VertexAttribI4usvEXT 852 -#define _gloffset_VertexAttribIPointerEXT 853 -#define _gloffset_FramebufferTextureLayerEXT 854 -#define _gloffset_ColorMaskIndexedEXT 855 -#define _gloffset_DisableIndexedEXT 856 -#define _gloffset_EnableIndexedEXT 857 -#define _gloffset_GetBooleanIndexedvEXT 858 -#define _gloffset_GetIntegerIndexedvEXT 859 -#define _gloffset_IsEnabledIndexedEXT 860 -#define _gloffset_ClearColorIiEXT 861 -#define _gloffset_ClearColorIuiEXT 862 -#define _gloffset_GetTexParameterIivEXT 863 -#define _gloffset_GetTexParameterIuivEXT 864 -#define _gloffset_TexParameterIivEXT 865 -#define _gloffset_TexParameterIuivEXT 866 -#define _gloffset_BeginConditionalRenderNV 867 -#define _gloffset_EndConditionalRenderNV 868 -#define _gloffset_BeginTransformFeedbackEXT 869 -#define _gloffset_BindBufferBaseEXT 870 -#define _gloffset_BindBufferOffsetEXT 871 -#define _gloffset_BindBufferRangeEXT 872 -#define _gloffset_EndTransformFeedbackEXT 873 -#define _gloffset_GetTransformFeedbackVaryingEXT 874 -#define _gloffset_TransformFeedbackVaryingsEXT 875 -#define _gloffset_ProvokingVertexEXT 876 -#define _gloffset_GetTexParameterPointervAPPLE 877 -#define _gloffset_TextureRangeAPPLE 878 -#define _gloffset_GetObjectParameterivAPPLE 879 -#define _gloffset_ObjectPurgeableAPPLE 880 -#define _gloffset_ObjectUnpurgeableAPPLE 881 -#define _gloffset_ActiveProgramEXT 882 -#define _gloffset_CreateShaderProgramEXT 883 -#define _gloffset_UseShaderProgramEXT 884 -#define _gloffset_TextureBarrierNV 885 -#define _gloffset_StencilFuncSeparateATI 886 -#define _gloffset_ProgramEnvParameters4fvEXT 887 -#define _gloffset_ProgramLocalParameters4fvEXT 888 -#define _gloffset_GetQueryObjecti64vEXT 889 -#define _gloffset_GetQueryObjectui64vEXT 890 -#define _gloffset_EGLImageTargetRenderbufferStorageOES 891 -#define _gloffset_EGLImageTargetTexture2DOES 892 - -#else /* !_GLAPI_USE_REMAP_TABLE */ - -#define driDispatchRemapTable_size 485 -extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; - -#define AttachShader_remap_index 0 -#define CreateProgram_remap_index 1 -#define CreateShader_remap_index 2 -#define DeleteProgram_remap_index 3 -#define DeleteShader_remap_index 4 -#define DetachShader_remap_index 5 -#define GetAttachedShaders_remap_index 6 -#define GetProgramInfoLog_remap_index 7 -#define GetProgramiv_remap_index 8 -#define GetShaderInfoLog_remap_index 9 -#define GetShaderiv_remap_index 10 -#define IsProgram_remap_index 11 -#define IsShader_remap_index 12 -#define StencilFuncSeparate_remap_index 13 -#define StencilMaskSeparate_remap_index 14 -#define StencilOpSeparate_remap_index 15 -#define UniformMatrix2x3fv_remap_index 16 -#define UniformMatrix2x4fv_remap_index 17 -#define UniformMatrix3x2fv_remap_index 18 -#define UniformMatrix3x4fv_remap_index 19 -#define UniformMatrix4x2fv_remap_index 20 -#define UniformMatrix4x3fv_remap_index 21 -#define ClampColor_remap_index 22 -#define ClearBufferfi_remap_index 23 -#define ClearBufferfv_remap_index 24 -#define ClearBufferiv_remap_index 25 -#define ClearBufferuiv_remap_index 26 -#define GetStringi_remap_index 27 -#define TexBuffer_remap_index 28 -#define FramebufferTexture_remap_index 29 -#define GetBufferParameteri64v_remap_index 30 -#define GetInteger64i_v_remap_index 31 -#define VertexAttribDivisor_remap_index 32 -#define LoadTransposeMatrixdARB_remap_index 33 -#define LoadTransposeMatrixfARB_remap_index 34 -#define MultTransposeMatrixdARB_remap_index 35 -#define MultTransposeMatrixfARB_remap_index 36 -#define SampleCoverageARB_remap_index 37 -#define CompressedTexImage1DARB_remap_index 38 -#define CompressedTexImage2DARB_remap_index 39 -#define CompressedTexImage3DARB_remap_index 40 -#define CompressedTexSubImage1DARB_remap_index 41 -#define CompressedTexSubImage2DARB_remap_index 42 -#define CompressedTexSubImage3DARB_remap_index 43 -#define GetCompressedTexImageARB_remap_index 44 -#define DisableVertexAttribArrayARB_remap_index 45 -#define EnableVertexAttribArrayARB_remap_index 46 -#define GetProgramEnvParameterdvARB_remap_index 47 -#define GetProgramEnvParameterfvARB_remap_index 48 -#define GetProgramLocalParameterdvARB_remap_index 49 -#define GetProgramLocalParameterfvARB_remap_index 50 -#define GetProgramStringARB_remap_index 51 -#define GetProgramivARB_remap_index 52 -#define GetVertexAttribdvARB_remap_index 53 -#define GetVertexAttribfvARB_remap_index 54 -#define GetVertexAttribivARB_remap_index 55 -#define ProgramEnvParameter4dARB_remap_index 56 -#define ProgramEnvParameter4dvARB_remap_index 57 -#define ProgramEnvParameter4fARB_remap_index 58 -#define ProgramEnvParameter4fvARB_remap_index 59 -#define ProgramLocalParameter4dARB_remap_index 60 -#define ProgramLocalParameter4dvARB_remap_index 61 -#define ProgramLocalParameter4fARB_remap_index 62 -#define ProgramLocalParameter4fvARB_remap_index 63 -#define ProgramStringARB_remap_index 64 -#define VertexAttrib1dARB_remap_index 65 -#define VertexAttrib1dvARB_remap_index 66 -#define VertexAttrib1fARB_remap_index 67 -#define VertexAttrib1fvARB_remap_index 68 -#define VertexAttrib1sARB_remap_index 69 -#define VertexAttrib1svARB_remap_index 70 -#define VertexAttrib2dARB_remap_index 71 -#define VertexAttrib2dvARB_remap_index 72 -#define VertexAttrib2fARB_remap_index 73 -#define VertexAttrib2fvARB_remap_index 74 -#define VertexAttrib2sARB_remap_index 75 -#define VertexAttrib2svARB_remap_index 76 -#define VertexAttrib3dARB_remap_index 77 -#define VertexAttrib3dvARB_remap_index 78 -#define VertexAttrib3fARB_remap_index 79 -#define VertexAttrib3fvARB_remap_index 80 -#define VertexAttrib3sARB_remap_index 81 -#define VertexAttrib3svARB_remap_index 82 -#define VertexAttrib4NbvARB_remap_index 83 -#define VertexAttrib4NivARB_remap_index 84 -#define VertexAttrib4NsvARB_remap_index 85 -#define VertexAttrib4NubARB_remap_index 86 -#define VertexAttrib4NubvARB_remap_index 87 -#define VertexAttrib4NuivARB_remap_index 88 -#define VertexAttrib4NusvARB_remap_index 89 -#define VertexAttrib4bvARB_remap_index 90 -#define VertexAttrib4dARB_remap_index 91 -#define VertexAttrib4dvARB_remap_index 92 -#define VertexAttrib4fARB_remap_index 93 -#define VertexAttrib4fvARB_remap_index 94 -#define VertexAttrib4ivARB_remap_index 95 -#define VertexAttrib4sARB_remap_index 96 -#define VertexAttrib4svARB_remap_index 97 -#define VertexAttrib4ubvARB_remap_index 98 -#define VertexAttrib4uivARB_remap_index 99 -#define VertexAttrib4usvARB_remap_index 100 -#define VertexAttribPointerARB_remap_index 101 -#define BindBufferARB_remap_index 102 -#define BufferDataARB_remap_index 103 -#define BufferSubDataARB_remap_index 104 -#define DeleteBuffersARB_remap_index 105 -#define GenBuffersARB_remap_index 106 -#define GetBufferParameterivARB_remap_index 107 -#define GetBufferPointervARB_remap_index 108 -#define GetBufferSubDataARB_remap_index 109 -#define IsBufferARB_remap_index 110 -#define MapBufferARB_remap_index 111 -#define UnmapBufferARB_remap_index 112 -#define BeginQueryARB_remap_index 113 -#define DeleteQueriesARB_remap_index 114 -#define EndQueryARB_remap_index 115 -#define GenQueriesARB_remap_index 116 -#define GetQueryObjectivARB_remap_index 117 -#define GetQueryObjectuivARB_remap_index 118 -#define GetQueryivARB_remap_index 119 -#define IsQueryARB_remap_index 120 -#define AttachObjectARB_remap_index 121 -#define CompileShaderARB_remap_index 122 -#define CreateProgramObjectARB_remap_index 123 -#define CreateShaderObjectARB_remap_index 124 -#define DeleteObjectARB_remap_index 125 -#define DetachObjectARB_remap_index 126 -#define GetActiveUniformARB_remap_index 127 -#define GetAttachedObjectsARB_remap_index 128 -#define GetHandleARB_remap_index 129 -#define GetInfoLogARB_remap_index 130 -#define GetObjectParameterfvARB_remap_index 131 -#define GetObjectParameterivARB_remap_index 132 -#define GetShaderSourceARB_remap_index 133 -#define GetUniformLocationARB_remap_index 134 -#define GetUniformfvARB_remap_index 135 -#define GetUniformivARB_remap_index 136 -#define LinkProgramARB_remap_index 137 -#define ShaderSourceARB_remap_index 138 -#define Uniform1fARB_remap_index 139 -#define Uniform1fvARB_remap_index 140 -#define Uniform1iARB_remap_index 141 -#define Uniform1ivARB_remap_index 142 -#define Uniform2fARB_remap_index 143 -#define Uniform2fvARB_remap_index 144 -#define Uniform2iARB_remap_index 145 -#define Uniform2ivARB_remap_index 146 -#define Uniform3fARB_remap_index 147 -#define Uniform3fvARB_remap_index 148 -#define Uniform3iARB_remap_index 149 -#define Uniform3ivARB_remap_index 150 -#define Uniform4fARB_remap_index 151 -#define Uniform4fvARB_remap_index 152 -#define Uniform4iARB_remap_index 153 -#define Uniform4ivARB_remap_index 154 -#define UniformMatrix2fvARB_remap_index 155 -#define UniformMatrix3fvARB_remap_index 156 -#define UniformMatrix4fvARB_remap_index 157 -#define UseProgramObjectARB_remap_index 158 -#define ValidateProgramARB_remap_index 159 -#define BindAttribLocationARB_remap_index 160 -#define GetActiveAttribARB_remap_index 161 -#define GetAttribLocationARB_remap_index 162 -#define DrawBuffersARB_remap_index 163 -#define ClampColorARB_remap_index 164 -#define DrawArraysInstancedARB_remap_index 165 -#define DrawElementsInstancedARB_remap_index 166 -#define RenderbufferStorageMultisample_remap_index 167 -#define FramebufferTextureARB_remap_index 168 -#define FramebufferTextureFaceARB_remap_index 169 -#define ProgramParameteriARB_remap_index 170 -#define VertexAttribDivisorARB_remap_index 171 -#define FlushMappedBufferRange_remap_index 172 -#define MapBufferRange_remap_index 173 -#define BindVertexArray_remap_index 174 -#define GenVertexArrays_remap_index 175 -#define CopyBufferSubData_remap_index 176 -#define ClientWaitSync_remap_index 177 -#define DeleteSync_remap_index 178 -#define FenceSync_remap_index 179 -#define GetInteger64v_remap_index 180 -#define GetSynciv_remap_index 181 -#define IsSync_remap_index 182 -#define WaitSync_remap_index 183 -#define DrawElementsBaseVertex_remap_index 184 -#define DrawRangeElementsBaseVertex_remap_index 185 -#define MultiDrawElementsBaseVertex_remap_index 186 -#define BlendEquationSeparateiARB_remap_index 187 -#define BlendEquationiARB_remap_index 188 -#define BlendFuncSeparateiARB_remap_index 189 -#define BlendFunciARB_remap_index 190 -#define BindTransformFeedback_remap_index 191 -#define DeleteTransformFeedbacks_remap_index 192 -#define DrawTransformFeedback_remap_index 193 -#define GenTransformFeedbacks_remap_index 194 -#define IsTransformFeedback_remap_index 195 -#define PauseTransformFeedback_remap_index 196 -#define ResumeTransformFeedback_remap_index 197 -#define ClearDepthf_remap_index 198 -#define DepthRangef_remap_index 199 -#define GetShaderPrecisionFormat_remap_index 200 -#define ReleaseShaderCompiler_remap_index 201 -#define ShaderBinary_remap_index 202 -#define PolygonOffsetEXT_remap_index 203 -#define GetPixelTexGenParameterfvSGIS_remap_index 204 -#define GetPixelTexGenParameterivSGIS_remap_index 205 -#define PixelTexGenParameterfSGIS_remap_index 206 -#define PixelTexGenParameterfvSGIS_remap_index 207 -#define PixelTexGenParameteriSGIS_remap_index 208 -#define PixelTexGenParameterivSGIS_remap_index 209 -#define SampleMaskSGIS_remap_index 210 -#define SamplePatternSGIS_remap_index 211 -#define ColorPointerEXT_remap_index 212 -#define EdgeFlagPointerEXT_remap_index 213 -#define IndexPointerEXT_remap_index 214 -#define NormalPointerEXT_remap_index 215 -#define TexCoordPointerEXT_remap_index 216 -#define VertexPointerEXT_remap_index 217 -#define PointParameterfEXT_remap_index 218 -#define PointParameterfvEXT_remap_index 219 -#define LockArraysEXT_remap_index 220 -#define UnlockArraysEXT_remap_index 221 -#define SecondaryColor3bEXT_remap_index 222 -#define SecondaryColor3bvEXT_remap_index 223 -#define SecondaryColor3dEXT_remap_index 224 -#define SecondaryColor3dvEXT_remap_index 225 -#define SecondaryColor3fEXT_remap_index 226 -#define SecondaryColor3fvEXT_remap_index 227 -#define SecondaryColor3iEXT_remap_index 228 -#define SecondaryColor3ivEXT_remap_index 229 -#define SecondaryColor3sEXT_remap_index 230 -#define SecondaryColor3svEXT_remap_index 231 -#define SecondaryColor3ubEXT_remap_index 232 -#define SecondaryColor3ubvEXT_remap_index 233 -#define SecondaryColor3uiEXT_remap_index 234 -#define SecondaryColor3uivEXT_remap_index 235 -#define SecondaryColor3usEXT_remap_index 236 -#define SecondaryColor3usvEXT_remap_index 237 -#define SecondaryColorPointerEXT_remap_index 238 -#define MultiDrawArraysEXT_remap_index 239 -#define MultiDrawElementsEXT_remap_index 240 -#define FogCoordPointerEXT_remap_index 241 -#define FogCoorddEXT_remap_index 242 -#define FogCoorddvEXT_remap_index 243 -#define FogCoordfEXT_remap_index 244 -#define FogCoordfvEXT_remap_index 245 -#define PixelTexGenSGIX_remap_index 246 -#define BlendFuncSeparateEXT_remap_index 247 -#define FlushVertexArrayRangeNV_remap_index 248 -#define VertexArrayRangeNV_remap_index 249 -#define CombinerInputNV_remap_index 250 -#define CombinerOutputNV_remap_index 251 -#define CombinerParameterfNV_remap_index 252 -#define CombinerParameterfvNV_remap_index 253 -#define CombinerParameteriNV_remap_index 254 -#define CombinerParameterivNV_remap_index 255 -#define FinalCombinerInputNV_remap_index 256 -#define GetCombinerInputParameterfvNV_remap_index 257 -#define GetCombinerInputParameterivNV_remap_index 258 -#define GetCombinerOutputParameterfvNV_remap_index 259 -#define GetCombinerOutputParameterivNV_remap_index 260 -#define GetFinalCombinerInputParameterfvNV_remap_index 261 -#define GetFinalCombinerInputParameterivNV_remap_index 262 -#define ResizeBuffersMESA_remap_index 263 -#define WindowPos2dMESA_remap_index 264 -#define WindowPos2dvMESA_remap_index 265 -#define WindowPos2fMESA_remap_index 266 -#define WindowPos2fvMESA_remap_index 267 -#define WindowPos2iMESA_remap_index 268 -#define WindowPos2ivMESA_remap_index 269 -#define WindowPos2sMESA_remap_index 270 -#define WindowPos2svMESA_remap_index 271 -#define WindowPos3dMESA_remap_index 272 -#define WindowPos3dvMESA_remap_index 273 -#define WindowPos3fMESA_remap_index 274 -#define WindowPos3fvMESA_remap_index 275 -#define WindowPos3iMESA_remap_index 276 -#define WindowPos3ivMESA_remap_index 277 -#define WindowPos3sMESA_remap_index 278 -#define WindowPos3svMESA_remap_index 279 -#define WindowPos4dMESA_remap_index 280 -#define WindowPos4dvMESA_remap_index 281 -#define WindowPos4fMESA_remap_index 282 -#define WindowPos4fvMESA_remap_index 283 -#define WindowPos4iMESA_remap_index 284 -#define WindowPos4ivMESA_remap_index 285 -#define WindowPos4sMESA_remap_index 286 -#define WindowPos4svMESA_remap_index 287 -#define MultiModeDrawArraysIBM_remap_index 288 -#define MultiModeDrawElementsIBM_remap_index 289 -#define DeleteFencesNV_remap_index 290 -#define FinishFenceNV_remap_index 291 -#define GenFencesNV_remap_index 292 -#define GetFenceivNV_remap_index 293 -#define IsFenceNV_remap_index 294 -#define SetFenceNV_remap_index 295 -#define TestFenceNV_remap_index 296 -#define AreProgramsResidentNV_remap_index 297 -#define BindProgramNV_remap_index 298 -#define DeleteProgramsNV_remap_index 299 -#define ExecuteProgramNV_remap_index 300 -#define GenProgramsNV_remap_index 301 -#define GetProgramParameterdvNV_remap_index 302 -#define GetProgramParameterfvNV_remap_index 303 -#define GetProgramStringNV_remap_index 304 -#define GetProgramivNV_remap_index 305 -#define GetTrackMatrixivNV_remap_index 306 -#define GetVertexAttribPointervNV_remap_index 307 -#define GetVertexAttribdvNV_remap_index 308 -#define GetVertexAttribfvNV_remap_index 309 -#define GetVertexAttribivNV_remap_index 310 -#define IsProgramNV_remap_index 311 -#define LoadProgramNV_remap_index 312 -#define ProgramParameters4dvNV_remap_index 313 -#define ProgramParameters4fvNV_remap_index 314 -#define RequestResidentProgramsNV_remap_index 315 -#define TrackMatrixNV_remap_index 316 -#define VertexAttrib1dNV_remap_index 317 -#define VertexAttrib1dvNV_remap_index 318 -#define VertexAttrib1fNV_remap_index 319 -#define VertexAttrib1fvNV_remap_index 320 -#define VertexAttrib1sNV_remap_index 321 -#define VertexAttrib1svNV_remap_index 322 -#define VertexAttrib2dNV_remap_index 323 -#define VertexAttrib2dvNV_remap_index 324 -#define VertexAttrib2fNV_remap_index 325 -#define VertexAttrib2fvNV_remap_index 326 -#define VertexAttrib2sNV_remap_index 327 -#define VertexAttrib2svNV_remap_index 328 -#define VertexAttrib3dNV_remap_index 329 -#define VertexAttrib3dvNV_remap_index 330 -#define VertexAttrib3fNV_remap_index 331 -#define VertexAttrib3fvNV_remap_index 332 -#define VertexAttrib3sNV_remap_index 333 -#define VertexAttrib3svNV_remap_index 334 -#define VertexAttrib4dNV_remap_index 335 -#define VertexAttrib4dvNV_remap_index 336 -#define VertexAttrib4fNV_remap_index 337 -#define VertexAttrib4fvNV_remap_index 338 -#define VertexAttrib4sNV_remap_index 339 -#define VertexAttrib4svNV_remap_index 340 -#define VertexAttrib4ubNV_remap_index 341 -#define VertexAttrib4ubvNV_remap_index 342 -#define VertexAttribPointerNV_remap_index 343 -#define VertexAttribs1dvNV_remap_index 344 -#define VertexAttribs1fvNV_remap_index 345 -#define VertexAttribs1svNV_remap_index 346 -#define VertexAttribs2dvNV_remap_index 347 -#define VertexAttribs2fvNV_remap_index 348 -#define VertexAttribs2svNV_remap_index 349 -#define VertexAttribs3dvNV_remap_index 350 -#define VertexAttribs3fvNV_remap_index 351 -#define VertexAttribs3svNV_remap_index 352 -#define VertexAttribs4dvNV_remap_index 353 -#define VertexAttribs4fvNV_remap_index 354 -#define VertexAttribs4svNV_remap_index 355 -#define VertexAttribs4ubvNV_remap_index 356 -#define GetTexBumpParameterfvATI_remap_index 357 -#define GetTexBumpParameterivATI_remap_index 358 -#define TexBumpParameterfvATI_remap_index 359 -#define TexBumpParameterivATI_remap_index 360 -#define AlphaFragmentOp1ATI_remap_index 361 -#define AlphaFragmentOp2ATI_remap_index 362 -#define AlphaFragmentOp3ATI_remap_index 363 -#define BeginFragmentShaderATI_remap_index 364 -#define BindFragmentShaderATI_remap_index 365 -#define ColorFragmentOp1ATI_remap_index 366 -#define ColorFragmentOp2ATI_remap_index 367 -#define ColorFragmentOp3ATI_remap_index 368 -#define DeleteFragmentShaderATI_remap_index 369 -#define EndFragmentShaderATI_remap_index 370 -#define GenFragmentShadersATI_remap_index 371 -#define PassTexCoordATI_remap_index 372 -#define SampleMapATI_remap_index 373 -#define SetFragmentShaderConstantATI_remap_index 374 -#define PointParameteriNV_remap_index 375 -#define PointParameterivNV_remap_index 376 -#define ActiveStencilFaceEXT_remap_index 377 -#define BindVertexArrayAPPLE_remap_index 378 -#define DeleteVertexArraysAPPLE_remap_index 379 -#define GenVertexArraysAPPLE_remap_index 380 -#define IsVertexArrayAPPLE_remap_index 381 -#define GetProgramNamedParameterdvNV_remap_index 382 -#define GetProgramNamedParameterfvNV_remap_index 383 -#define ProgramNamedParameter4dNV_remap_index 384 -#define ProgramNamedParameter4dvNV_remap_index 385 -#define ProgramNamedParameter4fNV_remap_index 386 -#define ProgramNamedParameter4fvNV_remap_index 387 -#define PrimitiveRestartIndexNV_remap_index 388 -#define PrimitiveRestartNV_remap_index 389 -#define DepthBoundsEXT_remap_index 390 -#define BlendEquationSeparateEXT_remap_index 391 -#define BindFramebufferEXT_remap_index 392 -#define BindRenderbufferEXT_remap_index 393 -#define CheckFramebufferStatusEXT_remap_index 394 -#define DeleteFramebuffersEXT_remap_index 395 -#define DeleteRenderbuffersEXT_remap_index 396 -#define FramebufferRenderbufferEXT_remap_index 397 -#define FramebufferTexture1DEXT_remap_index 398 -#define FramebufferTexture2DEXT_remap_index 399 -#define FramebufferTexture3DEXT_remap_index 400 -#define GenFramebuffersEXT_remap_index 401 -#define GenRenderbuffersEXT_remap_index 402 -#define GenerateMipmapEXT_remap_index 403 -#define GetFramebufferAttachmentParameterivEXT_remap_index 404 -#define GetRenderbufferParameterivEXT_remap_index 405 -#define IsFramebufferEXT_remap_index 406 -#define IsRenderbufferEXT_remap_index 407 -#define RenderbufferStorageEXT_remap_index 408 -#define BlitFramebufferEXT_remap_index 409 -#define BufferParameteriAPPLE_remap_index 410 -#define FlushMappedBufferRangeAPPLE_remap_index 411 -#define BindFragDataLocationEXT_remap_index 412 -#define GetFragDataLocationEXT_remap_index 413 -#define GetUniformuivEXT_remap_index 414 -#define GetVertexAttribIivEXT_remap_index 415 -#define GetVertexAttribIuivEXT_remap_index 416 -#define Uniform1uiEXT_remap_index 417 -#define Uniform1uivEXT_remap_index 418 -#define Uniform2uiEXT_remap_index 419 -#define Uniform2uivEXT_remap_index 420 -#define Uniform3uiEXT_remap_index 421 -#define Uniform3uivEXT_remap_index 422 -#define Uniform4uiEXT_remap_index 423 -#define Uniform4uivEXT_remap_index 424 -#define VertexAttribI1iEXT_remap_index 425 -#define VertexAttribI1ivEXT_remap_index 426 -#define VertexAttribI1uiEXT_remap_index 427 -#define VertexAttribI1uivEXT_remap_index 428 -#define VertexAttribI2iEXT_remap_index 429 -#define VertexAttribI2ivEXT_remap_index 430 -#define VertexAttribI2uiEXT_remap_index 431 -#define VertexAttribI2uivEXT_remap_index 432 -#define VertexAttribI3iEXT_remap_index 433 -#define VertexAttribI3ivEXT_remap_index 434 -#define VertexAttribI3uiEXT_remap_index 435 -#define VertexAttribI3uivEXT_remap_index 436 -#define VertexAttribI4bvEXT_remap_index 437 -#define VertexAttribI4iEXT_remap_index 438 -#define VertexAttribI4ivEXT_remap_index 439 -#define VertexAttribI4svEXT_remap_index 440 -#define VertexAttribI4ubvEXT_remap_index 441 -#define VertexAttribI4uiEXT_remap_index 442 -#define VertexAttribI4uivEXT_remap_index 443 -#define VertexAttribI4usvEXT_remap_index 444 -#define VertexAttribIPointerEXT_remap_index 445 -#define FramebufferTextureLayerEXT_remap_index 446 -#define ColorMaskIndexedEXT_remap_index 447 -#define DisableIndexedEXT_remap_index 448 -#define EnableIndexedEXT_remap_index 449 -#define GetBooleanIndexedvEXT_remap_index 450 -#define GetIntegerIndexedvEXT_remap_index 451 -#define IsEnabledIndexedEXT_remap_index 452 -#define ClearColorIiEXT_remap_index 453 -#define ClearColorIuiEXT_remap_index 454 -#define GetTexParameterIivEXT_remap_index 455 -#define GetTexParameterIuivEXT_remap_index 456 -#define TexParameterIivEXT_remap_index 457 -#define TexParameterIuivEXT_remap_index 458 -#define BeginConditionalRenderNV_remap_index 459 -#define EndConditionalRenderNV_remap_index 460 -#define BeginTransformFeedbackEXT_remap_index 461 -#define BindBufferBaseEXT_remap_index 462 -#define BindBufferOffsetEXT_remap_index 463 -#define BindBufferRangeEXT_remap_index 464 -#define EndTransformFeedbackEXT_remap_index 465 -#define GetTransformFeedbackVaryingEXT_remap_index 466 -#define TransformFeedbackVaryingsEXT_remap_index 467 -#define ProvokingVertexEXT_remap_index 468 -#define GetTexParameterPointervAPPLE_remap_index 469 -#define TextureRangeAPPLE_remap_index 470 -#define GetObjectParameterivAPPLE_remap_index 471 -#define ObjectPurgeableAPPLE_remap_index 472 -#define ObjectUnpurgeableAPPLE_remap_index 473 -#define ActiveProgramEXT_remap_index 474 -#define CreateShaderProgramEXT_remap_index 475 -#define UseShaderProgramEXT_remap_index 476 -#define TextureBarrierNV_remap_index 477 -#define StencilFuncSeparateATI_remap_index 478 -#define ProgramEnvParameters4fvEXT_remap_index 479 -#define ProgramLocalParameters4fvEXT_remap_index 480 -#define GetQueryObjecti64vEXT_remap_index 481 -#define GetQueryObjectui64vEXT_remap_index 482 -#define EGLImageTargetRenderbufferStorageOES_remap_index 483 -#define EGLImageTargetTexture2DOES_remap_index 484 - -#define _gloffset_AttachShader driDispatchRemapTable[AttachShader_remap_index] -#define _gloffset_CreateProgram driDispatchRemapTable[CreateProgram_remap_index] -#define _gloffset_CreateShader driDispatchRemapTable[CreateShader_remap_index] -#define _gloffset_DeleteProgram driDispatchRemapTable[DeleteProgram_remap_index] -#define _gloffset_DeleteShader driDispatchRemapTable[DeleteShader_remap_index] -#define _gloffset_DetachShader driDispatchRemapTable[DetachShader_remap_index] -#define _gloffset_GetAttachedShaders driDispatchRemapTable[GetAttachedShaders_remap_index] -#define _gloffset_GetProgramInfoLog driDispatchRemapTable[GetProgramInfoLog_remap_index] -#define _gloffset_GetProgramiv driDispatchRemapTable[GetProgramiv_remap_index] -#define _gloffset_GetShaderInfoLog driDispatchRemapTable[GetShaderInfoLog_remap_index] -#define _gloffset_GetShaderiv driDispatchRemapTable[GetShaderiv_remap_index] -#define _gloffset_IsProgram driDispatchRemapTable[IsProgram_remap_index] -#define _gloffset_IsShader driDispatchRemapTable[IsShader_remap_index] -#define _gloffset_StencilFuncSeparate driDispatchRemapTable[StencilFuncSeparate_remap_index] -#define _gloffset_StencilMaskSeparate driDispatchRemapTable[StencilMaskSeparate_remap_index] -#define _gloffset_StencilOpSeparate driDispatchRemapTable[StencilOpSeparate_remap_index] -#define _gloffset_UniformMatrix2x3fv driDispatchRemapTable[UniformMatrix2x3fv_remap_index] -#define _gloffset_UniformMatrix2x4fv driDispatchRemapTable[UniformMatrix2x4fv_remap_index] -#define _gloffset_UniformMatrix3x2fv driDispatchRemapTable[UniformMatrix3x2fv_remap_index] -#define _gloffset_UniformMatrix3x4fv driDispatchRemapTable[UniformMatrix3x4fv_remap_index] -#define _gloffset_UniformMatrix4x2fv driDispatchRemapTable[UniformMatrix4x2fv_remap_index] -#define _gloffset_UniformMatrix4x3fv driDispatchRemapTable[UniformMatrix4x3fv_remap_index] -#define _gloffset_ClampColor driDispatchRemapTable[ClampColor_remap_index] -#define _gloffset_ClearBufferfi driDispatchRemapTable[ClearBufferfi_remap_index] -#define _gloffset_ClearBufferfv driDispatchRemapTable[ClearBufferfv_remap_index] -#define _gloffset_ClearBufferiv driDispatchRemapTable[ClearBufferiv_remap_index] -#define _gloffset_ClearBufferuiv driDispatchRemapTable[ClearBufferuiv_remap_index] -#define _gloffset_GetStringi driDispatchRemapTable[GetStringi_remap_index] -#define _gloffset_TexBuffer driDispatchRemapTable[TexBuffer_remap_index] -#define _gloffset_FramebufferTexture driDispatchRemapTable[FramebufferTexture_remap_index] -#define _gloffset_GetBufferParameteri64v driDispatchRemapTable[GetBufferParameteri64v_remap_index] -#define _gloffset_GetInteger64i_v driDispatchRemapTable[GetInteger64i_v_remap_index] -#define _gloffset_VertexAttribDivisor driDispatchRemapTable[VertexAttribDivisor_remap_index] -#define _gloffset_LoadTransposeMatrixdARB driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index] -#define _gloffset_LoadTransposeMatrixfARB driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index] -#define _gloffset_MultTransposeMatrixdARB driDispatchRemapTable[MultTransposeMatrixdARB_remap_index] -#define _gloffset_MultTransposeMatrixfARB driDispatchRemapTable[MultTransposeMatrixfARB_remap_index] -#define _gloffset_SampleCoverageARB driDispatchRemapTable[SampleCoverageARB_remap_index] -#define _gloffset_CompressedTexImage1DARB driDispatchRemapTable[CompressedTexImage1DARB_remap_index] -#define _gloffset_CompressedTexImage2DARB driDispatchRemapTable[CompressedTexImage2DARB_remap_index] -#define _gloffset_CompressedTexImage3DARB driDispatchRemapTable[CompressedTexImage3DARB_remap_index] -#define _gloffset_CompressedTexSubImage1DARB driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index] -#define _gloffset_CompressedTexSubImage2DARB driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index] -#define _gloffset_CompressedTexSubImage3DARB driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index] -#define _gloffset_GetCompressedTexImageARB driDispatchRemapTable[GetCompressedTexImageARB_remap_index] -#define _gloffset_DisableVertexAttribArrayARB driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index] -#define _gloffset_EnableVertexAttribArrayARB driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index] -#define _gloffset_GetProgramEnvParameterdvARB driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index] -#define _gloffset_GetProgramEnvParameterfvARB driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index] -#define _gloffset_GetProgramLocalParameterdvARB driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index] -#define _gloffset_GetProgramLocalParameterfvARB driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index] -#define _gloffset_GetProgramStringARB driDispatchRemapTable[GetProgramStringARB_remap_index] -#define _gloffset_GetProgramivARB driDispatchRemapTable[GetProgramivARB_remap_index] -#define _gloffset_GetVertexAttribdvARB driDispatchRemapTable[GetVertexAttribdvARB_remap_index] -#define _gloffset_GetVertexAttribfvARB driDispatchRemapTable[GetVertexAttribfvARB_remap_index] -#define _gloffset_GetVertexAttribivARB driDispatchRemapTable[GetVertexAttribivARB_remap_index] -#define _gloffset_ProgramEnvParameter4dARB driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index] -#define _gloffset_ProgramEnvParameter4dvARB driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index] -#define _gloffset_ProgramEnvParameter4fARB driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index] -#define _gloffset_ProgramEnvParameter4fvARB driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index] -#define _gloffset_ProgramLocalParameter4dARB driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index] -#define _gloffset_ProgramLocalParameter4dvARB driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index] -#define _gloffset_ProgramLocalParameter4fARB driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index] -#define _gloffset_ProgramLocalParameter4fvARB driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index] -#define _gloffset_ProgramStringARB driDispatchRemapTable[ProgramStringARB_remap_index] -#define _gloffset_VertexAttrib1dARB driDispatchRemapTable[VertexAttrib1dARB_remap_index] -#define _gloffset_VertexAttrib1dvARB driDispatchRemapTable[VertexAttrib1dvARB_remap_index] -#define _gloffset_VertexAttrib1fARB driDispatchRemapTable[VertexAttrib1fARB_remap_index] -#define _gloffset_VertexAttrib1fvARB driDispatchRemapTable[VertexAttrib1fvARB_remap_index] -#define _gloffset_VertexAttrib1sARB driDispatchRemapTable[VertexAttrib1sARB_remap_index] -#define _gloffset_VertexAttrib1svARB driDispatchRemapTable[VertexAttrib1svARB_remap_index] -#define _gloffset_VertexAttrib2dARB driDispatchRemapTable[VertexAttrib2dARB_remap_index] -#define _gloffset_VertexAttrib2dvARB driDispatchRemapTable[VertexAttrib2dvARB_remap_index] -#define _gloffset_VertexAttrib2fARB driDispatchRemapTable[VertexAttrib2fARB_remap_index] -#define _gloffset_VertexAttrib2fvARB driDispatchRemapTable[VertexAttrib2fvARB_remap_index] -#define _gloffset_VertexAttrib2sARB driDispatchRemapTable[VertexAttrib2sARB_remap_index] -#define _gloffset_VertexAttrib2svARB driDispatchRemapTable[VertexAttrib2svARB_remap_index] -#define _gloffset_VertexAttrib3dARB driDispatchRemapTable[VertexAttrib3dARB_remap_index] -#define _gloffset_VertexAttrib3dvARB driDispatchRemapTable[VertexAttrib3dvARB_remap_index] -#define _gloffset_VertexAttrib3fARB driDispatchRemapTable[VertexAttrib3fARB_remap_index] -#define _gloffset_VertexAttrib3fvARB driDispatchRemapTable[VertexAttrib3fvARB_remap_index] -#define _gloffset_VertexAttrib3sARB driDispatchRemapTable[VertexAttrib3sARB_remap_index] -#define _gloffset_VertexAttrib3svARB driDispatchRemapTable[VertexAttrib3svARB_remap_index] -#define _gloffset_VertexAttrib4NbvARB driDispatchRemapTable[VertexAttrib4NbvARB_remap_index] -#define _gloffset_VertexAttrib4NivARB driDispatchRemapTable[VertexAttrib4NivARB_remap_index] -#define _gloffset_VertexAttrib4NsvARB driDispatchRemapTable[VertexAttrib4NsvARB_remap_index] -#define _gloffset_VertexAttrib4NubARB driDispatchRemapTable[VertexAttrib4NubARB_remap_index] -#define _gloffset_VertexAttrib4NubvARB driDispatchRemapTable[VertexAttrib4NubvARB_remap_index] -#define _gloffset_VertexAttrib4NuivARB driDispatchRemapTable[VertexAttrib4NuivARB_remap_index] -#define _gloffset_VertexAttrib4NusvARB driDispatchRemapTable[VertexAttrib4NusvARB_remap_index] -#define _gloffset_VertexAttrib4bvARB driDispatchRemapTable[VertexAttrib4bvARB_remap_index] -#define _gloffset_VertexAttrib4dARB driDispatchRemapTable[VertexAttrib4dARB_remap_index] -#define _gloffset_VertexAttrib4dvARB driDispatchRemapTable[VertexAttrib4dvARB_remap_index] -#define _gloffset_VertexAttrib4fARB driDispatchRemapTable[VertexAttrib4fARB_remap_index] -#define _gloffset_VertexAttrib4fvARB driDispatchRemapTable[VertexAttrib4fvARB_remap_index] -#define _gloffset_VertexAttrib4ivARB driDispatchRemapTable[VertexAttrib4ivARB_remap_index] -#define _gloffset_VertexAttrib4sARB driDispatchRemapTable[VertexAttrib4sARB_remap_index] -#define _gloffset_VertexAttrib4svARB driDispatchRemapTable[VertexAttrib4svARB_remap_index] -#define _gloffset_VertexAttrib4ubvARB driDispatchRemapTable[VertexAttrib4ubvARB_remap_index] -#define _gloffset_VertexAttrib4uivARB driDispatchRemapTable[VertexAttrib4uivARB_remap_index] -#define _gloffset_VertexAttrib4usvARB driDispatchRemapTable[VertexAttrib4usvARB_remap_index] -#define _gloffset_VertexAttribPointerARB driDispatchRemapTable[VertexAttribPointerARB_remap_index] -#define _gloffset_BindBufferARB driDispatchRemapTable[BindBufferARB_remap_index] -#define _gloffset_BufferDataARB driDispatchRemapTable[BufferDataARB_remap_index] -#define _gloffset_BufferSubDataARB driDispatchRemapTable[BufferSubDataARB_remap_index] -#define _gloffset_DeleteBuffersARB driDispatchRemapTable[DeleteBuffersARB_remap_index] -#define _gloffset_GenBuffersARB driDispatchRemapTable[GenBuffersARB_remap_index] -#define _gloffset_GetBufferParameterivARB driDispatchRemapTable[GetBufferParameterivARB_remap_index] -#define _gloffset_GetBufferPointervARB driDispatchRemapTable[GetBufferPointervARB_remap_index] -#define _gloffset_GetBufferSubDataARB driDispatchRemapTable[GetBufferSubDataARB_remap_index] -#define _gloffset_IsBufferARB driDispatchRemapTable[IsBufferARB_remap_index] -#define _gloffset_MapBufferARB driDispatchRemapTable[MapBufferARB_remap_index] -#define _gloffset_UnmapBufferARB driDispatchRemapTable[UnmapBufferARB_remap_index] -#define _gloffset_BeginQueryARB driDispatchRemapTable[BeginQueryARB_remap_index] -#define _gloffset_DeleteQueriesARB driDispatchRemapTable[DeleteQueriesARB_remap_index] -#define _gloffset_EndQueryARB driDispatchRemapTable[EndQueryARB_remap_index] -#define _gloffset_GenQueriesARB driDispatchRemapTable[GenQueriesARB_remap_index] -#define _gloffset_GetQueryObjectivARB driDispatchRemapTable[GetQueryObjectivARB_remap_index] -#define _gloffset_GetQueryObjectuivARB driDispatchRemapTable[GetQueryObjectuivARB_remap_index] -#define _gloffset_GetQueryivARB driDispatchRemapTable[GetQueryivARB_remap_index] -#define _gloffset_IsQueryARB driDispatchRemapTable[IsQueryARB_remap_index] -#define _gloffset_AttachObjectARB driDispatchRemapTable[AttachObjectARB_remap_index] -#define _gloffset_CompileShaderARB driDispatchRemapTable[CompileShaderARB_remap_index] -#define _gloffset_CreateProgramObjectARB driDispatchRemapTable[CreateProgramObjectARB_remap_index] -#define _gloffset_CreateShaderObjectARB driDispatchRemapTable[CreateShaderObjectARB_remap_index] -#define _gloffset_DeleteObjectARB driDispatchRemapTable[DeleteObjectARB_remap_index] -#define _gloffset_DetachObjectARB driDispatchRemapTable[DetachObjectARB_remap_index] -#define _gloffset_GetActiveUniformARB driDispatchRemapTable[GetActiveUniformARB_remap_index] -#define _gloffset_GetAttachedObjectsARB driDispatchRemapTable[GetAttachedObjectsARB_remap_index] -#define _gloffset_GetHandleARB driDispatchRemapTable[GetHandleARB_remap_index] -#define _gloffset_GetInfoLogARB driDispatchRemapTable[GetInfoLogARB_remap_index] -#define _gloffset_GetObjectParameterfvARB driDispatchRemapTable[GetObjectParameterfvARB_remap_index] -#define _gloffset_GetObjectParameterivARB driDispatchRemapTable[GetObjectParameterivARB_remap_index] -#define _gloffset_GetShaderSourceARB driDispatchRemapTable[GetShaderSourceARB_remap_index] -#define _gloffset_GetUniformLocationARB driDispatchRemapTable[GetUniformLocationARB_remap_index] -#define _gloffset_GetUniformfvARB driDispatchRemapTable[GetUniformfvARB_remap_index] -#define _gloffset_GetUniformivARB driDispatchRemapTable[GetUniformivARB_remap_index] -#define _gloffset_LinkProgramARB driDispatchRemapTable[LinkProgramARB_remap_index] -#define _gloffset_ShaderSourceARB driDispatchRemapTable[ShaderSourceARB_remap_index] -#define _gloffset_Uniform1fARB driDispatchRemapTable[Uniform1fARB_remap_index] -#define _gloffset_Uniform1fvARB driDispatchRemapTable[Uniform1fvARB_remap_index] -#define _gloffset_Uniform1iARB driDispatchRemapTable[Uniform1iARB_remap_index] -#define _gloffset_Uniform1ivARB driDispatchRemapTable[Uniform1ivARB_remap_index] -#define _gloffset_Uniform2fARB driDispatchRemapTable[Uniform2fARB_remap_index] -#define _gloffset_Uniform2fvARB driDispatchRemapTable[Uniform2fvARB_remap_index] -#define _gloffset_Uniform2iARB driDispatchRemapTable[Uniform2iARB_remap_index] -#define _gloffset_Uniform2ivARB driDispatchRemapTable[Uniform2ivARB_remap_index] -#define _gloffset_Uniform3fARB driDispatchRemapTable[Uniform3fARB_remap_index] -#define _gloffset_Uniform3fvARB driDispatchRemapTable[Uniform3fvARB_remap_index] -#define _gloffset_Uniform3iARB driDispatchRemapTable[Uniform3iARB_remap_index] -#define _gloffset_Uniform3ivARB driDispatchRemapTable[Uniform3ivARB_remap_index] -#define _gloffset_Uniform4fARB driDispatchRemapTable[Uniform4fARB_remap_index] -#define _gloffset_Uniform4fvARB driDispatchRemapTable[Uniform4fvARB_remap_index] -#define _gloffset_Uniform4iARB driDispatchRemapTable[Uniform4iARB_remap_index] -#define _gloffset_Uniform4ivARB driDispatchRemapTable[Uniform4ivARB_remap_index] -#define _gloffset_UniformMatrix2fvARB driDispatchRemapTable[UniformMatrix2fvARB_remap_index] -#define _gloffset_UniformMatrix3fvARB driDispatchRemapTable[UniformMatrix3fvARB_remap_index] -#define _gloffset_UniformMatrix4fvARB driDispatchRemapTable[UniformMatrix4fvARB_remap_index] -#define _gloffset_UseProgramObjectARB driDispatchRemapTable[UseProgramObjectARB_remap_index] -#define _gloffset_ValidateProgramARB driDispatchRemapTable[ValidateProgramARB_remap_index] -#define _gloffset_BindAttribLocationARB driDispatchRemapTable[BindAttribLocationARB_remap_index] -#define _gloffset_GetActiveAttribARB driDispatchRemapTable[GetActiveAttribARB_remap_index] -#define _gloffset_GetAttribLocationARB driDispatchRemapTable[GetAttribLocationARB_remap_index] -#define _gloffset_DrawBuffersARB driDispatchRemapTable[DrawBuffersARB_remap_index] -#define _gloffset_ClampColorARB driDispatchRemapTable[ClampColorARB_remap_index] -#define _gloffset_DrawArraysInstancedARB driDispatchRemapTable[DrawArraysInstancedARB_remap_index] -#define _gloffset_DrawElementsInstancedARB driDispatchRemapTable[DrawElementsInstancedARB_remap_index] -#define _gloffset_RenderbufferStorageMultisample driDispatchRemapTable[RenderbufferStorageMultisample_remap_index] -#define _gloffset_FramebufferTextureARB driDispatchRemapTable[FramebufferTextureARB_remap_index] -#define _gloffset_FramebufferTextureFaceARB driDispatchRemapTable[FramebufferTextureFaceARB_remap_index] -#define _gloffset_ProgramParameteriARB driDispatchRemapTable[ProgramParameteriARB_remap_index] -#define _gloffset_VertexAttribDivisorARB driDispatchRemapTable[VertexAttribDivisorARB_remap_index] -#define _gloffset_FlushMappedBufferRange driDispatchRemapTable[FlushMappedBufferRange_remap_index] -#define _gloffset_MapBufferRange driDispatchRemapTable[MapBufferRange_remap_index] -#define _gloffset_BindVertexArray driDispatchRemapTable[BindVertexArray_remap_index] -#define _gloffset_GenVertexArrays driDispatchRemapTable[GenVertexArrays_remap_index] -#define _gloffset_CopyBufferSubData driDispatchRemapTable[CopyBufferSubData_remap_index] -#define _gloffset_ClientWaitSync driDispatchRemapTable[ClientWaitSync_remap_index] -#define _gloffset_DeleteSync driDispatchRemapTable[DeleteSync_remap_index] -#define _gloffset_FenceSync driDispatchRemapTable[FenceSync_remap_index] -#define _gloffset_GetInteger64v driDispatchRemapTable[GetInteger64v_remap_index] -#define _gloffset_GetSynciv driDispatchRemapTable[GetSynciv_remap_index] -#define _gloffset_IsSync driDispatchRemapTable[IsSync_remap_index] -#define _gloffset_WaitSync driDispatchRemapTable[WaitSync_remap_index] -#define _gloffset_DrawElementsBaseVertex driDispatchRemapTable[DrawElementsBaseVertex_remap_index] -#define _gloffset_DrawRangeElementsBaseVertex driDispatchRemapTable[DrawRangeElementsBaseVertex_remap_index] -#define _gloffset_MultiDrawElementsBaseVertex driDispatchRemapTable[MultiDrawElementsBaseVertex_remap_index] -#define _gloffset_BlendEquationSeparateiARB driDispatchRemapTable[BlendEquationSeparateiARB_remap_index] -#define _gloffset_BlendEquationiARB driDispatchRemapTable[BlendEquationiARB_remap_index] -#define _gloffset_BlendFuncSeparateiARB driDispatchRemapTable[BlendFuncSeparateiARB_remap_index] -#define _gloffset_BlendFunciARB driDispatchRemapTable[BlendFunciARB_remap_index] -#define _gloffset_BindTransformFeedback driDispatchRemapTable[BindTransformFeedback_remap_index] -#define _gloffset_DeleteTransformFeedbacks driDispatchRemapTable[DeleteTransformFeedbacks_remap_index] -#define _gloffset_DrawTransformFeedback driDispatchRemapTable[DrawTransformFeedback_remap_index] -#define _gloffset_GenTransformFeedbacks driDispatchRemapTable[GenTransformFeedbacks_remap_index] -#define _gloffset_IsTransformFeedback driDispatchRemapTable[IsTransformFeedback_remap_index] -#define _gloffset_PauseTransformFeedback driDispatchRemapTable[PauseTransformFeedback_remap_index] -#define _gloffset_ResumeTransformFeedback driDispatchRemapTable[ResumeTransformFeedback_remap_index] -#define _gloffset_ClearDepthf driDispatchRemapTable[ClearDepthf_remap_index] -#define _gloffset_DepthRangef driDispatchRemapTable[DepthRangef_remap_index] -#define _gloffset_GetShaderPrecisionFormat driDispatchRemapTable[GetShaderPrecisionFormat_remap_index] -#define _gloffset_ReleaseShaderCompiler driDispatchRemapTable[ReleaseShaderCompiler_remap_index] -#define _gloffset_ShaderBinary driDispatchRemapTable[ShaderBinary_remap_index] -#define _gloffset_PolygonOffsetEXT driDispatchRemapTable[PolygonOffsetEXT_remap_index] -#define _gloffset_GetPixelTexGenParameterfvSGIS driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index] -#define _gloffset_GetPixelTexGenParameterivSGIS driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index] -#define _gloffset_PixelTexGenParameterfSGIS driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index] -#define _gloffset_PixelTexGenParameterfvSGIS driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index] -#define _gloffset_PixelTexGenParameteriSGIS driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index] -#define _gloffset_PixelTexGenParameterivSGIS driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index] -#define _gloffset_SampleMaskSGIS driDispatchRemapTable[SampleMaskSGIS_remap_index] -#define _gloffset_SamplePatternSGIS driDispatchRemapTable[SamplePatternSGIS_remap_index] -#define _gloffset_ColorPointerEXT driDispatchRemapTable[ColorPointerEXT_remap_index] -#define _gloffset_EdgeFlagPointerEXT driDispatchRemapTable[EdgeFlagPointerEXT_remap_index] -#define _gloffset_IndexPointerEXT driDispatchRemapTable[IndexPointerEXT_remap_index] -#define _gloffset_NormalPointerEXT driDispatchRemapTable[NormalPointerEXT_remap_index] -#define _gloffset_TexCoordPointerEXT driDispatchRemapTable[TexCoordPointerEXT_remap_index] -#define _gloffset_VertexPointerEXT driDispatchRemapTable[VertexPointerEXT_remap_index] -#define _gloffset_PointParameterfEXT driDispatchRemapTable[PointParameterfEXT_remap_index] -#define _gloffset_PointParameterfvEXT driDispatchRemapTable[PointParameterfvEXT_remap_index] -#define _gloffset_LockArraysEXT driDispatchRemapTable[LockArraysEXT_remap_index] -#define _gloffset_UnlockArraysEXT driDispatchRemapTable[UnlockArraysEXT_remap_index] -#define _gloffset_SecondaryColor3bEXT driDispatchRemapTable[SecondaryColor3bEXT_remap_index] -#define _gloffset_SecondaryColor3bvEXT driDispatchRemapTable[SecondaryColor3bvEXT_remap_index] -#define _gloffset_SecondaryColor3dEXT driDispatchRemapTable[SecondaryColor3dEXT_remap_index] -#define _gloffset_SecondaryColor3dvEXT driDispatchRemapTable[SecondaryColor3dvEXT_remap_index] -#define _gloffset_SecondaryColor3fEXT driDispatchRemapTable[SecondaryColor3fEXT_remap_index] -#define _gloffset_SecondaryColor3fvEXT driDispatchRemapTable[SecondaryColor3fvEXT_remap_index] -#define _gloffset_SecondaryColor3iEXT driDispatchRemapTable[SecondaryColor3iEXT_remap_index] -#define _gloffset_SecondaryColor3ivEXT driDispatchRemapTable[SecondaryColor3ivEXT_remap_index] -#define _gloffset_SecondaryColor3sEXT driDispatchRemapTable[SecondaryColor3sEXT_remap_index] -#define _gloffset_SecondaryColor3svEXT driDispatchRemapTable[SecondaryColor3svEXT_remap_index] -#define _gloffset_SecondaryColor3ubEXT driDispatchRemapTable[SecondaryColor3ubEXT_remap_index] -#define _gloffset_SecondaryColor3ubvEXT driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index] -#define _gloffset_SecondaryColor3uiEXT driDispatchRemapTable[SecondaryColor3uiEXT_remap_index] -#define _gloffset_SecondaryColor3uivEXT driDispatchRemapTable[SecondaryColor3uivEXT_remap_index] -#define _gloffset_SecondaryColor3usEXT driDispatchRemapTable[SecondaryColor3usEXT_remap_index] -#define _gloffset_SecondaryColor3usvEXT driDispatchRemapTable[SecondaryColor3usvEXT_remap_index] -#define _gloffset_SecondaryColorPointerEXT driDispatchRemapTable[SecondaryColorPointerEXT_remap_index] -#define _gloffset_MultiDrawArraysEXT driDispatchRemapTable[MultiDrawArraysEXT_remap_index] -#define _gloffset_MultiDrawElementsEXT driDispatchRemapTable[MultiDrawElementsEXT_remap_index] -#define _gloffset_FogCoordPointerEXT driDispatchRemapTable[FogCoordPointerEXT_remap_index] -#define _gloffset_FogCoorddEXT driDispatchRemapTable[FogCoorddEXT_remap_index] -#define _gloffset_FogCoorddvEXT driDispatchRemapTable[FogCoorddvEXT_remap_index] -#define _gloffset_FogCoordfEXT driDispatchRemapTable[FogCoordfEXT_remap_index] -#define _gloffset_FogCoordfvEXT driDispatchRemapTable[FogCoordfvEXT_remap_index] -#define _gloffset_PixelTexGenSGIX driDispatchRemapTable[PixelTexGenSGIX_remap_index] -#define _gloffset_BlendFuncSeparateEXT driDispatchRemapTable[BlendFuncSeparateEXT_remap_index] -#define _gloffset_FlushVertexArrayRangeNV driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index] -#define _gloffset_VertexArrayRangeNV driDispatchRemapTable[VertexArrayRangeNV_remap_index] -#define _gloffset_CombinerInputNV driDispatchRemapTable[CombinerInputNV_remap_index] -#define _gloffset_CombinerOutputNV driDispatchRemapTable[CombinerOutputNV_remap_index] -#define _gloffset_CombinerParameterfNV driDispatchRemapTable[CombinerParameterfNV_remap_index] -#define _gloffset_CombinerParameterfvNV driDispatchRemapTable[CombinerParameterfvNV_remap_index] -#define _gloffset_CombinerParameteriNV driDispatchRemapTable[CombinerParameteriNV_remap_index] -#define _gloffset_CombinerParameterivNV driDispatchRemapTable[CombinerParameterivNV_remap_index] -#define _gloffset_FinalCombinerInputNV driDispatchRemapTable[FinalCombinerInputNV_remap_index] -#define _gloffset_GetCombinerInputParameterfvNV driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index] -#define _gloffset_GetCombinerInputParameterivNV driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index] -#define _gloffset_GetCombinerOutputParameterfvNV driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index] -#define _gloffset_GetCombinerOutputParameterivNV driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index] -#define _gloffset_GetFinalCombinerInputParameterfvNV driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index] -#define _gloffset_GetFinalCombinerInputParameterivNV driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index] -#define _gloffset_ResizeBuffersMESA driDispatchRemapTable[ResizeBuffersMESA_remap_index] -#define _gloffset_WindowPos2dMESA driDispatchRemapTable[WindowPos2dMESA_remap_index] -#define _gloffset_WindowPos2dvMESA driDispatchRemapTable[WindowPos2dvMESA_remap_index] -#define _gloffset_WindowPos2fMESA driDispatchRemapTable[WindowPos2fMESA_remap_index] -#define _gloffset_WindowPos2fvMESA driDispatchRemapTable[WindowPos2fvMESA_remap_index] -#define _gloffset_WindowPos2iMESA driDispatchRemapTable[WindowPos2iMESA_remap_index] -#define _gloffset_WindowPos2ivMESA driDispatchRemapTable[WindowPos2ivMESA_remap_index] -#define _gloffset_WindowPos2sMESA driDispatchRemapTable[WindowPos2sMESA_remap_index] -#define _gloffset_WindowPos2svMESA driDispatchRemapTable[WindowPos2svMESA_remap_index] -#define _gloffset_WindowPos3dMESA driDispatchRemapTable[WindowPos3dMESA_remap_index] -#define _gloffset_WindowPos3dvMESA driDispatchRemapTable[WindowPos3dvMESA_remap_index] -#define _gloffset_WindowPos3fMESA driDispatchRemapTable[WindowPos3fMESA_remap_index] -#define _gloffset_WindowPos3fvMESA driDispatchRemapTable[WindowPos3fvMESA_remap_index] -#define _gloffset_WindowPos3iMESA driDispatchRemapTable[WindowPos3iMESA_remap_index] -#define _gloffset_WindowPos3ivMESA driDispatchRemapTable[WindowPos3ivMESA_remap_index] -#define _gloffset_WindowPos3sMESA driDispatchRemapTable[WindowPos3sMESA_remap_index] -#define _gloffset_WindowPos3svMESA driDispatchRemapTable[WindowPos3svMESA_remap_index] -#define _gloffset_WindowPos4dMESA driDispatchRemapTable[WindowPos4dMESA_remap_index] -#define _gloffset_WindowPos4dvMESA driDispatchRemapTable[WindowPos4dvMESA_remap_index] -#define _gloffset_WindowPos4fMESA driDispatchRemapTable[WindowPos4fMESA_remap_index] -#define _gloffset_WindowPos4fvMESA driDispatchRemapTable[WindowPos4fvMESA_remap_index] -#define _gloffset_WindowPos4iMESA driDispatchRemapTable[WindowPos4iMESA_remap_index] -#define _gloffset_WindowPos4ivMESA driDispatchRemapTable[WindowPos4ivMESA_remap_index] -#define _gloffset_WindowPos4sMESA driDispatchRemapTable[WindowPos4sMESA_remap_index] -#define _gloffset_WindowPos4svMESA driDispatchRemapTable[WindowPos4svMESA_remap_index] -#define _gloffset_MultiModeDrawArraysIBM driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index] -#define _gloffset_MultiModeDrawElementsIBM driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index] -#define _gloffset_DeleteFencesNV driDispatchRemapTable[DeleteFencesNV_remap_index] -#define _gloffset_FinishFenceNV driDispatchRemapTable[FinishFenceNV_remap_index] -#define _gloffset_GenFencesNV driDispatchRemapTable[GenFencesNV_remap_index] -#define _gloffset_GetFenceivNV driDispatchRemapTable[GetFenceivNV_remap_index] -#define _gloffset_IsFenceNV driDispatchRemapTable[IsFenceNV_remap_index] -#define _gloffset_SetFenceNV driDispatchRemapTable[SetFenceNV_remap_index] -#define _gloffset_TestFenceNV driDispatchRemapTable[TestFenceNV_remap_index] -#define _gloffset_AreProgramsResidentNV driDispatchRemapTable[AreProgramsResidentNV_remap_index] -#define _gloffset_BindProgramNV driDispatchRemapTable[BindProgramNV_remap_index] -#define _gloffset_DeleteProgramsNV driDispatchRemapTable[DeleteProgramsNV_remap_index] -#define _gloffset_ExecuteProgramNV driDispatchRemapTable[ExecuteProgramNV_remap_index] -#define _gloffset_GenProgramsNV driDispatchRemapTable[GenProgramsNV_remap_index] -#define _gloffset_GetProgramParameterdvNV driDispatchRemapTable[GetProgramParameterdvNV_remap_index] -#define _gloffset_GetProgramParameterfvNV driDispatchRemapTable[GetProgramParameterfvNV_remap_index] -#define _gloffset_GetProgramStringNV driDispatchRemapTable[GetProgramStringNV_remap_index] -#define _gloffset_GetProgramivNV driDispatchRemapTable[GetProgramivNV_remap_index] -#define _gloffset_GetTrackMatrixivNV driDispatchRemapTable[GetTrackMatrixivNV_remap_index] -#define _gloffset_GetVertexAttribPointervNV driDispatchRemapTable[GetVertexAttribPointervNV_remap_index] -#define _gloffset_GetVertexAttribdvNV driDispatchRemapTable[GetVertexAttribdvNV_remap_index] -#define _gloffset_GetVertexAttribfvNV driDispatchRemapTable[GetVertexAttribfvNV_remap_index] -#define _gloffset_GetVertexAttribivNV driDispatchRemapTable[GetVertexAttribivNV_remap_index] -#define _gloffset_IsProgramNV driDispatchRemapTable[IsProgramNV_remap_index] -#define _gloffset_LoadProgramNV driDispatchRemapTable[LoadProgramNV_remap_index] -#define _gloffset_ProgramParameters4dvNV driDispatchRemapTable[ProgramParameters4dvNV_remap_index] -#define _gloffset_ProgramParameters4fvNV driDispatchRemapTable[ProgramParameters4fvNV_remap_index] -#define _gloffset_RequestResidentProgramsNV driDispatchRemapTable[RequestResidentProgramsNV_remap_index] -#define _gloffset_TrackMatrixNV driDispatchRemapTable[TrackMatrixNV_remap_index] -#define _gloffset_VertexAttrib1dNV driDispatchRemapTable[VertexAttrib1dNV_remap_index] -#define _gloffset_VertexAttrib1dvNV driDispatchRemapTable[VertexAttrib1dvNV_remap_index] -#define _gloffset_VertexAttrib1fNV driDispatchRemapTable[VertexAttrib1fNV_remap_index] -#define _gloffset_VertexAttrib1fvNV driDispatchRemapTable[VertexAttrib1fvNV_remap_index] -#define _gloffset_VertexAttrib1sNV driDispatchRemapTable[VertexAttrib1sNV_remap_index] -#define _gloffset_VertexAttrib1svNV driDispatchRemapTable[VertexAttrib1svNV_remap_index] -#define _gloffset_VertexAttrib2dNV driDispatchRemapTable[VertexAttrib2dNV_remap_index] -#define _gloffset_VertexAttrib2dvNV driDispatchRemapTable[VertexAttrib2dvNV_remap_index] -#define _gloffset_VertexAttrib2fNV driDispatchRemapTable[VertexAttrib2fNV_remap_index] -#define _gloffset_VertexAttrib2fvNV driDispatchRemapTable[VertexAttrib2fvNV_remap_index] -#define _gloffset_VertexAttrib2sNV driDispatchRemapTable[VertexAttrib2sNV_remap_index] -#define _gloffset_VertexAttrib2svNV driDispatchRemapTable[VertexAttrib2svNV_remap_index] -#define _gloffset_VertexAttrib3dNV driDispatchRemapTable[VertexAttrib3dNV_remap_index] -#define _gloffset_VertexAttrib3dvNV driDispatchRemapTable[VertexAttrib3dvNV_remap_index] -#define _gloffset_VertexAttrib3fNV driDispatchRemapTable[VertexAttrib3fNV_remap_index] -#define _gloffset_VertexAttrib3fvNV driDispatchRemapTable[VertexAttrib3fvNV_remap_index] -#define _gloffset_VertexAttrib3sNV driDispatchRemapTable[VertexAttrib3sNV_remap_index] -#define _gloffset_VertexAttrib3svNV driDispatchRemapTable[VertexAttrib3svNV_remap_index] -#define _gloffset_VertexAttrib4dNV driDispatchRemapTable[VertexAttrib4dNV_remap_index] -#define _gloffset_VertexAttrib4dvNV driDispatchRemapTable[VertexAttrib4dvNV_remap_index] -#define _gloffset_VertexAttrib4fNV driDispatchRemapTable[VertexAttrib4fNV_remap_index] -#define _gloffset_VertexAttrib4fvNV driDispatchRemapTable[VertexAttrib4fvNV_remap_index] -#define _gloffset_VertexAttrib4sNV driDispatchRemapTable[VertexAttrib4sNV_remap_index] -#define _gloffset_VertexAttrib4svNV driDispatchRemapTable[VertexAttrib4svNV_remap_index] -#define _gloffset_VertexAttrib4ubNV driDispatchRemapTable[VertexAttrib4ubNV_remap_index] -#define _gloffset_VertexAttrib4ubvNV driDispatchRemapTable[VertexAttrib4ubvNV_remap_index] -#define _gloffset_VertexAttribPointerNV driDispatchRemapTable[VertexAttribPointerNV_remap_index] -#define _gloffset_VertexAttribs1dvNV driDispatchRemapTable[VertexAttribs1dvNV_remap_index] -#define _gloffset_VertexAttribs1fvNV driDispatchRemapTable[VertexAttribs1fvNV_remap_index] -#define _gloffset_VertexAttribs1svNV driDispatchRemapTable[VertexAttribs1svNV_remap_index] -#define _gloffset_VertexAttribs2dvNV driDispatchRemapTable[VertexAttribs2dvNV_remap_index] -#define _gloffset_VertexAttribs2fvNV driDispatchRemapTable[VertexAttribs2fvNV_remap_index] -#define _gloffset_VertexAttribs2svNV driDispatchRemapTable[VertexAttribs2svNV_remap_index] -#define _gloffset_VertexAttribs3dvNV driDispatchRemapTable[VertexAttribs3dvNV_remap_index] -#define _gloffset_VertexAttribs3fvNV driDispatchRemapTable[VertexAttribs3fvNV_remap_index] -#define _gloffset_VertexAttribs3svNV driDispatchRemapTable[VertexAttribs3svNV_remap_index] -#define _gloffset_VertexAttribs4dvNV driDispatchRemapTable[VertexAttribs4dvNV_remap_index] -#define _gloffset_VertexAttribs4fvNV driDispatchRemapTable[VertexAttribs4fvNV_remap_index] -#define _gloffset_VertexAttribs4svNV driDispatchRemapTable[VertexAttribs4svNV_remap_index] -#define _gloffset_VertexAttribs4ubvNV driDispatchRemapTable[VertexAttribs4ubvNV_remap_index] -#define _gloffset_GetTexBumpParameterfvATI driDispatchRemapTable[GetTexBumpParameterfvATI_remap_index] -#define _gloffset_GetTexBumpParameterivATI driDispatchRemapTable[GetTexBumpParameterivATI_remap_index] -#define _gloffset_TexBumpParameterfvATI driDispatchRemapTable[TexBumpParameterfvATI_remap_index] -#define _gloffset_TexBumpParameterivATI driDispatchRemapTable[TexBumpParameterivATI_remap_index] -#define _gloffset_AlphaFragmentOp1ATI driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index] -#define _gloffset_AlphaFragmentOp2ATI driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index] -#define _gloffset_AlphaFragmentOp3ATI driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index] -#define _gloffset_BeginFragmentShaderATI driDispatchRemapTable[BeginFragmentShaderATI_remap_index] -#define _gloffset_BindFragmentShaderATI driDispatchRemapTable[BindFragmentShaderATI_remap_index] -#define _gloffset_ColorFragmentOp1ATI driDispatchRemapTable[ColorFragmentOp1ATI_remap_index] -#define _gloffset_ColorFragmentOp2ATI driDispatchRemapTable[ColorFragmentOp2ATI_remap_index] -#define _gloffset_ColorFragmentOp3ATI driDispatchRemapTable[ColorFragmentOp3ATI_remap_index] -#define _gloffset_DeleteFragmentShaderATI driDispatchRemapTable[DeleteFragmentShaderATI_remap_index] -#define _gloffset_EndFragmentShaderATI driDispatchRemapTable[EndFragmentShaderATI_remap_index] -#define _gloffset_GenFragmentShadersATI driDispatchRemapTable[GenFragmentShadersATI_remap_index] -#define _gloffset_PassTexCoordATI driDispatchRemapTable[PassTexCoordATI_remap_index] -#define _gloffset_SampleMapATI driDispatchRemapTable[SampleMapATI_remap_index] -#define _gloffset_SetFragmentShaderConstantATI driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index] -#define _gloffset_PointParameteriNV driDispatchRemapTable[PointParameteriNV_remap_index] -#define _gloffset_PointParameterivNV driDispatchRemapTable[PointParameterivNV_remap_index] -#define _gloffset_ActiveStencilFaceEXT driDispatchRemapTable[ActiveStencilFaceEXT_remap_index] -#define _gloffset_BindVertexArrayAPPLE driDispatchRemapTable[BindVertexArrayAPPLE_remap_index] -#define _gloffset_DeleteVertexArraysAPPLE driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index] -#define _gloffset_GenVertexArraysAPPLE driDispatchRemapTable[GenVertexArraysAPPLE_remap_index] -#define _gloffset_IsVertexArrayAPPLE driDispatchRemapTable[IsVertexArrayAPPLE_remap_index] -#define _gloffset_GetProgramNamedParameterdvNV driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index] -#define _gloffset_GetProgramNamedParameterfvNV driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index] -#define _gloffset_ProgramNamedParameter4dNV driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index] -#define _gloffset_ProgramNamedParameter4dvNV driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index] -#define _gloffset_ProgramNamedParameter4fNV driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index] -#define _gloffset_ProgramNamedParameter4fvNV driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index] -#define _gloffset_PrimitiveRestartIndexNV driDispatchRemapTable[PrimitiveRestartIndexNV_remap_index] -#define _gloffset_PrimitiveRestartNV driDispatchRemapTable[PrimitiveRestartNV_remap_index] -#define _gloffset_DepthBoundsEXT driDispatchRemapTable[DepthBoundsEXT_remap_index] -#define _gloffset_BlendEquationSeparateEXT driDispatchRemapTable[BlendEquationSeparateEXT_remap_index] -#define _gloffset_BindFramebufferEXT driDispatchRemapTable[BindFramebufferEXT_remap_index] -#define _gloffset_BindRenderbufferEXT driDispatchRemapTable[BindRenderbufferEXT_remap_index] -#define _gloffset_CheckFramebufferStatusEXT driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index] -#define _gloffset_DeleteFramebuffersEXT driDispatchRemapTable[DeleteFramebuffersEXT_remap_index] -#define _gloffset_DeleteRenderbuffersEXT driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index] -#define _gloffset_FramebufferRenderbufferEXT driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index] -#define _gloffset_FramebufferTexture1DEXT driDispatchRemapTable[FramebufferTexture1DEXT_remap_index] -#define _gloffset_FramebufferTexture2DEXT driDispatchRemapTable[FramebufferTexture2DEXT_remap_index] -#define _gloffset_FramebufferTexture3DEXT driDispatchRemapTable[FramebufferTexture3DEXT_remap_index] -#define _gloffset_GenFramebuffersEXT driDispatchRemapTable[GenFramebuffersEXT_remap_index] -#define _gloffset_GenRenderbuffersEXT driDispatchRemapTable[GenRenderbuffersEXT_remap_index] -#define _gloffset_GenerateMipmapEXT driDispatchRemapTable[GenerateMipmapEXT_remap_index] -#define _gloffset_GetFramebufferAttachmentParameterivEXT driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index] -#define _gloffset_GetRenderbufferParameterivEXT driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index] -#define _gloffset_IsFramebufferEXT driDispatchRemapTable[IsFramebufferEXT_remap_index] -#define _gloffset_IsRenderbufferEXT driDispatchRemapTable[IsRenderbufferEXT_remap_index] -#define _gloffset_RenderbufferStorageEXT driDispatchRemapTable[RenderbufferStorageEXT_remap_index] -#define _gloffset_BlitFramebufferEXT driDispatchRemapTable[BlitFramebufferEXT_remap_index] -#define _gloffset_BufferParameteriAPPLE driDispatchRemapTable[BufferParameteriAPPLE_remap_index] -#define _gloffset_FlushMappedBufferRangeAPPLE driDispatchRemapTable[FlushMappedBufferRangeAPPLE_remap_index] -#define _gloffset_BindFragDataLocationEXT driDispatchRemapTable[BindFragDataLocationEXT_remap_index] -#define _gloffset_GetFragDataLocationEXT driDispatchRemapTable[GetFragDataLocationEXT_remap_index] -#define _gloffset_GetUniformuivEXT driDispatchRemapTable[GetUniformuivEXT_remap_index] -#define _gloffset_GetVertexAttribIivEXT driDispatchRemapTable[GetVertexAttribIivEXT_remap_index] -#define _gloffset_GetVertexAttribIuivEXT driDispatchRemapTable[GetVertexAttribIuivEXT_remap_index] -#define _gloffset_Uniform1uiEXT driDispatchRemapTable[Uniform1uiEXT_remap_index] -#define _gloffset_Uniform1uivEXT driDispatchRemapTable[Uniform1uivEXT_remap_index] -#define _gloffset_Uniform2uiEXT driDispatchRemapTable[Uniform2uiEXT_remap_index] -#define _gloffset_Uniform2uivEXT driDispatchRemapTable[Uniform2uivEXT_remap_index] -#define _gloffset_Uniform3uiEXT driDispatchRemapTable[Uniform3uiEXT_remap_index] -#define _gloffset_Uniform3uivEXT driDispatchRemapTable[Uniform3uivEXT_remap_index] -#define _gloffset_Uniform4uiEXT driDispatchRemapTable[Uniform4uiEXT_remap_index] -#define _gloffset_Uniform4uivEXT driDispatchRemapTable[Uniform4uivEXT_remap_index] -#define _gloffset_VertexAttribI1iEXT driDispatchRemapTable[VertexAttribI1iEXT_remap_index] -#define _gloffset_VertexAttribI1ivEXT driDispatchRemapTable[VertexAttribI1ivEXT_remap_index] -#define _gloffset_VertexAttribI1uiEXT driDispatchRemapTable[VertexAttribI1uiEXT_remap_index] -#define _gloffset_VertexAttribI1uivEXT driDispatchRemapTable[VertexAttribI1uivEXT_remap_index] -#define _gloffset_VertexAttribI2iEXT driDispatchRemapTable[VertexAttribI2iEXT_remap_index] -#define _gloffset_VertexAttribI2ivEXT driDispatchRemapTable[VertexAttribI2ivEXT_remap_index] -#define _gloffset_VertexAttribI2uiEXT driDispatchRemapTable[VertexAttribI2uiEXT_remap_index] -#define _gloffset_VertexAttribI2uivEXT driDispatchRemapTable[VertexAttribI2uivEXT_remap_index] -#define _gloffset_VertexAttribI3iEXT driDispatchRemapTable[VertexAttribI3iEXT_remap_index] -#define _gloffset_VertexAttribI3ivEXT driDispatchRemapTable[VertexAttribI3ivEXT_remap_index] -#define _gloffset_VertexAttribI3uiEXT driDispatchRemapTable[VertexAttribI3uiEXT_remap_index] -#define _gloffset_VertexAttribI3uivEXT driDispatchRemapTable[VertexAttribI3uivEXT_remap_index] -#define _gloffset_VertexAttribI4bvEXT driDispatchRemapTable[VertexAttribI4bvEXT_remap_index] -#define _gloffset_VertexAttribI4iEXT driDispatchRemapTable[VertexAttribI4iEXT_remap_index] -#define _gloffset_VertexAttribI4ivEXT driDispatchRemapTable[VertexAttribI4ivEXT_remap_index] -#define _gloffset_VertexAttribI4svEXT driDispatchRemapTable[VertexAttribI4svEXT_remap_index] -#define _gloffset_VertexAttribI4ubvEXT driDispatchRemapTable[VertexAttribI4ubvEXT_remap_index] -#define _gloffset_VertexAttribI4uiEXT driDispatchRemapTable[VertexAttribI4uiEXT_remap_index] -#define _gloffset_VertexAttribI4uivEXT driDispatchRemapTable[VertexAttribI4uivEXT_remap_index] -#define _gloffset_VertexAttribI4usvEXT driDispatchRemapTable[VertexAttribI4usvEXT_remap_index] -#define _gloffset_VertexAttribIPointerEXT driDispatchRemapTable[VertexAttribIPointerEXT_remap_index] -#define _gloffset_FramebufferTextureLayerEXT driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index] -#define _gloffset_ColorMaskIndexedEXT driDispatchRemapTable[ColorMaskIndexedEXT_remap_index] -#define _gloffset_DisableIndexedEXT driDispatchRemapTable[DisableIndexedEXT_remap_index] -#define _gloffset_EnableIndexedEXT driDispatchRemapTable[EnableIndexedEXT_remap_index] -#define _gloffset_GetBooleanIndexedvEXT driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index] -#define _gloffset_GetIntegerIndexedvEXT driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index] -#define _gloffset_IsEnabledIndexedEXT driDispatchRemapTable[IsEnabledIndexedEXT_remap_index] -#define _gloffset_ClearColorIiEXT driDispatchRemapTable[ClearColorIiEXT_remap_index] -#define _gloffset_ClearColorIuiEXT driDispatchRemapTable[ClearColorIuiEXT_remap_index] -#define _gloffset_GetTexParameterIivEXT driDispatchRemapTable[GetTexParameterIivEXT_remap_index] -#define _gloffset_GetTexParameterIuivEXT driDispatchRemapTable[GetTexParameterIuivEXT_remap_index] -#define _gloffset_TexParameterIivEXT driDispatchRemapTable[TexParameterIivEXT_remap_index] -#define _gloffset_TexParameterIuivEXT driDispatchRemapTable[TexParameterIuivEXT_remap_index] -#define _gloffset_BeginConditionalRenderNV driDispatchRemapTable[BeginConditionalRenderNV_remap_index] -#define _gloffset_EndConditionalRenderNV driDispatchRemapTable[EndConditionalRenderNV_remap_index] -#define _gloffset_BeginTransformFeedbackEXT driDispatchRemapTable[BeginTransformFeedbackEXT_remap_index] -#define _gloffset_BindBufferBaseEXT driDispatchRemapTable[BindBufferBaseEXT_remap_index] -#define _gloffset_BindBufferOffsetEXT driDispatchRemapTable[BindBufferOffsetEXT_remap_index] -#define _gloffset_BindBufferRangeEXT driDispatchRemapTable[BindBufferRangeEXT_remap_index] -#define _gloffset_EndTransformFeedbackEXT driDispatchRemapTable[EndTransformFeedbackEXT_remap_index] -#define _gloffset_GetTransformFeedbackVaryingEXT driDispatchRemapTable[GetTransformFeedbackVaryingEXT_remap_index] -#define _gloffset_TransformFeedbackVaryingsEXT driDispatchRemapTable[TransformFeedbackVaryingsEXT_remap_index] -#define _gloffset_ProvokingVertexEXT driDispatchRemapTable[ProvokingVertexEXT_remap_index] -#define _gloffset_GetTexParameterPointervAPPLE driDispatchRemapTable[GetTexParameterPointervAPPLE_remap_index] -#define _gloffset_TextureRangeAPPLE driDispatchRemapTable[TextureRangeAPPLE_remap_index] -#define _gloffset_GetObjectParameterivAPPLE driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index] -#define _gloffset_ObjectPurgeableAPPLE driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index] -#define _gloffset_ObjectUnpurgeableAPPLE driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index] -#define _gloffset_ActiveProgramEXT driDispatchRemapTable[ActiveProgramEXT_remap_index] -#define _gloffset_CreateShaderProgramEXT driDispatchRemapTable[CreateShaderProgramEXT_remap_index] -#define _gloffset_UseShaderProgramEXT driDispatchRemapTable[UseShaderProgramEXT_remap_index] -#define _gloffset_TextureBarrierNV driDispatchRemapTable[TextureBarrierNV_remap_index] -#define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index] -#define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index] -#define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index] -#define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index] -#define _gloffset_GetQueryObjectui64vEXT driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index] -#define _gloffset_EGLImageTargetRenderbufferStorageOES driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index] -#define _gloffset_EGLImageTargetTexture2DOES driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index] - -#endif /* _GLAPI_USE_REMAP_TABLE */ - -#define CALL_NewList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_NewList, parameters) -#define GET_NewList(disp) GET_by_offset(disp, _gloffset_NewList) -#define SET_NewList(disp, fn) SET_by_offset(disp, _gloffset_NewList, fn) -#define CALL_EndList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndList, parameters) -#define GET_EndList(disp) GET_by_offset(disp, _gloffset_EndList) -#define SET_EndList(disp, fn) SET_by_offset(disp, _gloffset_EndList, fn) -#define CALL_CallList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_CallList, parameters) -#define GET_CallList(disp) GET_by_offset(disp, _gloffset_CallList) -#define SET_CallList(disp, fn) SET_by_offset(disp, _gloffset_CallList, fn) -#define CALL_CallLists(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLenum, const GLvoid *)), _gloffset_CallLists, parameters) -#define GET_CallLists(disp) GET_by_offset(disp, _gloffset_CallLists) -#define SET_CallLists(disp, fn) SET_by_offset(disp, _gloffset_CallLists, fn) -#define CALL_DeleteLists(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei)), _gloffset_DeleteLists, parameters) -#define GET_DeleteLists(disp) GET_by_offset(disp, _gloffset_DeleteLists) -#define SET_DeleteLists(disp, fn) SET_by_offset(disp, _gloffset_DeleteLists, fn) -#define CALL_GenLists(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLsizei)), _gloffset_GenLists, parameters) -#define GET_GenLists(disp) GET_by_offset(disp, _gloffset_GenLists) -#define SET_GenLists(disp, fn) SET_by_offset(disp, _gloffset_GenLists, fn) -#define CALL_ListBase(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_ListBase, parameters) -#define GET_ListBase(disp) GET_by_offset(disp, _gloffset_ListBase) -#define SET_ListBase(disp, fn) SET_by_offset(disp, _gloffset_ListBase, fn) -#define CALL_Begin(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Begin, parameters) -#define GET_Begin(disp) GET_by_offset(disp, _gloffset_Begin) -#define SET_Begin(disp, fn) SET_by_offset(disp, _gloffset_Begin, fn) -#define CALL_Bitmap(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *)), _gloffset_Bitmap, parameters) -#define GET_Bitmap(disp) GET_by_offset(disp, _gloffset_Bitmap) -#define SET_Bitmap(disp, fn) SET_by_offset(disp, _gloffset_Bitmap, fn) -#define CALL_Color3b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_Color3b, parameters) -#define GET_Color3b(disp) GET_by_offset(disp, _gloffset_Color3b) -#define SET_Color3b(disp, fn) SET_by_offset(disp, _gloffset_Color3b, fn) -#define CALL_Color3bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Color3bv, parameters) -#define GET_Color3bv(disp) GET_by_offset(disp, _gloffset_Color3bv) -#define SET_Color3bv(disp, fn) SET_by_offset(disp, _gloffset_Color3bv, fn) -#define CALL_Color3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Color3d, parameters) -#define GET_Color3d(disp) GET_by_offset(disp, _gloffset_Color3d) -#define SET_Color3d(disp, fn) SET_by_offset(disp, _gloffset_Color3d, fn) -#define CALL_Color3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Color3dv, parameters) -#define GET_Color3dv(disp) GET_by_offset(disp, _gloffset_Color3dv) -#define SET_Color3dv(disp, fn) SET_by_offset(disp, _gloffset_Color3dv, fn) -#define CALL_Color3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Color3f, parameters) -#define GET_Color3f(disp) GET_by_offset(disp, _gloffset_Color3f) -#define SET_Color3f(disp, fn) SET_by_offset(disp, _gloffset_Color3f, fn) -#define CALL_Color3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Color3fv, parameters) -#define GET_Color3fv(disp) GET_by_offset(disp, _gloffset_Color3fv) -#define SET_Color3fv(disp, fn) SET_by_offset(disp, _gloffset_Color3fv, fn) -#define CALL_Color3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Color3i, parameters) -#define GET_Color3i(disp) GET_by_offset(disp, _gloffset_Color3i) -#define SET_Color3i(disp, fn) SET_by_offset(disp, _gloffset_Color3i, fn) -#define CALL_Color3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Color3iv, parameters) -#define GET_Color3iv(disp) GET_by_offset(disp, _gloffset_Color3iv) -#define SET_Color3iv(disp, fn) SET_by_offset(disp, _gloffset_Color3iv, fn) -#define CALL_Color3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Color3s, parameters) -#define GET_Color3s(disp) GET_by_offset(disp, _gloffset_Color3s) -#define SET_Color3s(disp, fn) SET_by_offset(disp, _gloffset_Color3s, fn) -#define CALL_Color3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Color3sv, parameters) -#define GET_Color3sv(disp) GET_by_offset(disp, _gloffset_Color3sv) -#define SET_Color3sv(disp, fn) SET_by_offset(disp, _gloffset_Color3sv, fn) -#define CALL_Color3ub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), _gloffset_Color3ub, parameters) -#define GET_Color3ub(disp) GET_by_offset(disp, _gloffset_Color3ub) -#define SET_Color3ub(disp, fn) SET_by_offset(disp, _gloffset_Color3ub, fn) -#define CALL_Color3ubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Color3ubv, parameters) -#define GET_Color3ubv(disp) GET_by_offset(disp, _gloffset_Color3ubv) -#define SET_Color3ubv(disp, fn) SET_by_offset(disp, _gloffset_Color3ubv, fn) -#define CALL_Color3ui(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_Color3ui, parameters) -#define GET_Color3ui(disp) GET_by_offset(disp, _gloffset_Color3ui) -#define SET_Color3ui(disp, fn) SET_by_offset(disp, _gloffset_Color3ui, fn) -#define CALL_Color3uiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_Color3uiv, parameters) -#define GET_Color3uiv(disp) GET_by_offset(disp, _gloffset_Color3uiv) -#define SET_Color3uiv(disp, fn) SET_by_offset(disp, _gloffset_Color3uiv, fn) -#define CALL_Color3us(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), _gloffset_Color3us, parameters) -#define GET_Color3us(disp) GET_by_offset(disp, _gloffset_Color3us) -#define SET_Color3us(disp, fn) SET_by_offset(disp, _gloffset_Color3us, fn) -#define CALL_Color3usv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_Color3usv, parameters) -#define GET_Color3usv(disp) GET_by_offset(disp, _gloffset_Color3usv) -#define SET_Color3usv(disp, fn) SET_by_offset(disp, _gloffset_Color3usv, fn) -#define CALL_Color4b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte, GLbyte)), _gloffset_Color4b, parameters) -#define GET_Color4b(disp) GET_by_offset(disp, _gloffset_Color4b) -#define SET_Color4b(disp, fn) SET_by_offset(disp, _gloffset_Color4b, fn) -#define CALL_Color4bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Color4bv, parameters) -#define GET_Color4bv(disp) GET_by_offset(disp, _gloffset_Color4bv) -#define SET_Color4bv(disp, fn) SET_by_offset(disp, _gloffset_Color4bv, fn) -#define CALL_Color4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Color4d, parameters) -#define GET_Color4d(disp) GET_by_offset(disp, _gloffset_Color4d) -#define SET_Color4d(disp, fn) SET_by_offset(disp, _gloffset_Color4d, fn) -#define CALL_Color4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Color4dv, parameters) -#define GET_Color4dv(disp) GET_by_offset(disp, _gloffset_Color4dv) -#define SET_Color4dv(disp, fn) SET_by_offset(disp, _gloffset_Color4dv, fn) -#define CALL_Color4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Color4f, parameters) -#define GET_Color4f(disp) GET_by_offset(disp, _gloffset_Color4f) -#define SET_Color4f(disp, fn) SET_by_offset(disp, _gloffset_Color4f, fn) -#define CALL_Color4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Color4fv, parameters) -#define GET_Color4fv(disp) GET_by_offset(disp, _gloffset_Color4fv) -#define SET_Color4fv(disp, fn) SET_by_offset(disp, _gloffset_Color4fv, fn) -#define CALL_Color4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Color4i, parameters) -#define GET_Color4i(disp) GET_by_offset(disp, _gloffset_Color4i) -#define SET_Color4i(disp, fn) SET_by_offset(disp, _gloffset_Color4i, fn) -#define CALL_Color4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Color4iv, parameters) -#define GET_Color4iv(disp) GET_by_offset(disp, _gloffset_Color4iv) -#define SET_Color4iv(disp, fn) SET_by_offset(disp, _gloffset_Color4iv, fn) -#define CALL_Color4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Color4s, parameters) -#define GET_Color4s(disp) GET_by_offset(disp, _gloffset_Color4s) -#define SET_Color4s(disp, fn) SET_by_offset(disp, _gloffset_Color4s, fn) -#define CALL_Color4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Color4sv, parameters) -#define GET_Color4sv(disp) GET_by_offset(disp, _gloffset_Color4sv) -#define SET_Color4sv(disp, fn) SET_by_offset(disp, _gloffset_Color4sv, fn) -#define CALL_Color4ub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_Color4ub, parameters) -#define GET_Color4ub(disp) GET_by_offset(disp, _gloffset_Color4ub) -#define SET_Color4ub(disp, fn) SET_by_offset(disp, _gloffset_Color4ub, fn) -#define CALL_Color4ubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Color4ubv, parameters) -#define GET_Color4ubv(disp) GET_by_offset(disp, _gloffset_Color4ubv) -#define SET_Color4ubv(disp, fn) SET_by_offset(disp, _gloffset_Color4ubv, fn) -#define CALL_Color4ui(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_Color4ui, parameters) -#define GET_Color4ui(disp) GET_by_offset(disp, _gloffset_Color4ui) -#define SET_Color4ui(disp, fn) SET_by_offset(disp, _gloffset_Color4ui, fn) -#define CALL_Color4uiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_Color4uiv, parameters) -#define GET_Color4uiv(disp) GET_by_offset(disp, _gloffset_Color4uiv) -#define SET_Color4uiv(disp, fn) SET_by_offset(disp, _gloffset_Color4uiv, fn) -#define CALL_Color4us(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort, GLushort)), _gloffset_Color4us, parameters) -#define GET_Color4us(disp) GET_by_offset(disp, _gloffset_Color4us) -#define SET_Color4us(disp, fn) SET_by_offset(disp, _gloffset_Color4us, fn) -#define CALL_Color4usv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_Color4usv, parameters) -#define GET_Color4usv(disp) GET_by_offset(disp, _gloffset_Color4usv) -#define SET_Color4usv(disp, fn) SET_by_offset(disp, _gloffset_Color4usv, fn) -#define CALL_EdgeFlag(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean)), _gloffset_EdgeFlag, parameters) -#define GET_EdgeFlag(disp) GET_by_offset(disp, _gloffset_EdgeFlag) -#define SET_EdgeFlag(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlag, fn) -#define CALL_EdgeFlagv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLboolean *)), _gloffset_EdgeFlagv, parameters) -#define GET_EdgeFlagv(disp) GET_by_offset(disp, _gloffset_EdgeFlagv) -#define SET_EdgeFlagv(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagv, fn) -#define CALL_End(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_End, parameters) -#define GET_End(disp) GET_by_offset(disp, _gloffset_End) -#define SET_End(disp, fn) SET_by_offset(disp, _gloffset_End, fn) -#define CALL_Indexd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_Indexd, parameters) -#define GET_Indexd(disp) GET_by_offset(disp, _gloffset_Indexd) -#define SET_Indexd(disp, fn) SET_by_offset(disp, _gloffset_Indexd, fn) -#define CALL_Indexdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Indexdv, parameters) -#define GET_Indexdv(disp) GET_by_offset(disp, _gloffset_Indexdv) -#define SET_Indexdv(disp, fn) SET_by_offset(disp, _gloffset_Indexdv, fn) -#define CALL_Indexf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_Indexf, parameters) -#define GET_Indexf(disp) GET_by_offset(disp, _gloffset_Indexf) -#define SET_Indexf(disp, fn) SET_by_offset(disp, _gloffset_Indexf, fn) -#define CALL_Indexfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Indexfv, parameters) -#define GET_Indexfv(disp) GET_by_offset(disp, _gloffset_Indexfv) -#define SET_Indexfv(disp, fn) SET_by_offset(disp, _gloffset_Indexfv, fn) -#define CALL_Indexi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_Indexi, parameters) -#define GET_Indexi(disp) GET_by_offset(disp, _gloffset_Indexi) -#define SET_Indexi(disp, fn) SET_by_offset(disp, _gloffset_Indexi, fn) -#define CALL_Indexiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Indexiv, parameters) -#define GET_Indexiv(disp) GET_by_offset(disp, _gloffset_Indexiv) -#define SET_Indexiv(disp, fn) SET_by_offset(disp, _gloffset_Indexiv, fn) -#define CALL_Indexs(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort)), _gloffset_Indexs, parameters) -#define GET_Indexs(disp) GET_by_offset(disp, _gloffset_Indexs) -#define SET_Indexs(disp, fn) SET_by_offset(disp, _gloffset_Indexs, fn) -#define CALL_Indexsv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Indexsv, parameters) -#define GET_Indexsv(disp) GET_by_offset(disp, _gloffset_Indexsv) -#define SET_Indexsv(disp, fn) SET_by_offset(disp, _gloffset_Indexsv, fn) -#define CALL_Normal3b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_Normal3b, parameters) -#define GET_Normal3b(disp) GET_by_offset(disp, _gloffset_Normal3b) -#define SET_Normal3b(disp, fn) SET_by_offset(disp, _gloffset_Normal3b, fn) -#define CALL_Normal3bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Normal3bv, parameters) -#define GET_Normal3bv(disp) GET_by_offset(disp, _gloffset_Normal3bv) -#define SET_Normal3bv(disp, fn) SET_by_offset(disp, _gloffset_Normal3bv, fn) -#define CALL_Normal3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Normal3d, parameters) -#define GET_Normal3d(disp) GET_by_offset(disp, _gloffset_Normal3d) -#define SET_Normal3d(disp, fn) SET_by_offset(disp, _gloffset_Normal3d, fn) -#define CALL_Normal3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Normal3dv, parameters) -#define GET_Normal3dv(disp) GET_by_offset(disp, _gloffset_Normal3dv) -#define SET_Normal3dv(disp, fn) SET_by_offset(disp, _gloffset_Normal3dv, fn) -#define CALL_Normal3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Normal3f, parameters) -#define GET_Normal3f(disp) GET_by_offset(disp, _gloffset_Normal3f) -#define SET_Normal3f(disp, fn) SET_by_offset(disp, _gloffset_Normal3f, fn) -#define CALL_Normal3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Normal3fv, parameters) -#define GET_Normal3fv(disp) GET_by_offset(disp, _gloffset_Normal3fv) -#define SET_Normal3fv(disp, fn) SET_by_offset(disp, _gloffset_Normal3fv, fn) -#define CALL_Normal3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Normal3i, parameters) -#define GET_Normal3i(disp) GET_by_offset(disp, _gloffset_Normal3i) -#define SET_Normal3i(disp, fn) SET_by_offset(disp, _gloffset_Normal3i, fn) -#define CALL_Normal3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Normal3iv, parameters) -#define GET_Normal3iv(disp) GET_by_offset(disp, _gloffset_Normal3iv) -#define SET_Normal3iv(disp, fn) SET_by_offset(disp, _gloffset_Normal3iv, fn) -#define CALL_Normal3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Normal3s, parameters) -#define GET_Normal3s(disp) GET_by_offset(disp, _gloffset_Normal3s) -#define SET_Normal3s(disp, fn) SET_by_offset(disp, _gloffset_Normal3s, fn) -#define CALL_Normal3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Normal3sv, parameters) -#define GET_Normal3sv(disp) GET_by_offset(disp, _gloffset_Normal3sv) -#define SET_Normal3sv(disp, fn) SET_by_offset(disp, _gloffset_Normal3sv, fn) -#define CALL_RasterPos2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_RasterPos2d, parameters) -#define GET_RasterPos2d(disp) GET_by_offset(disp, _gloffset_RasterPos2d) -#define SET_RasterPos2d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2d, fn) -#define CALL_RasterPos2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos2dv, parameters) -#define GET_RasterPos2dv(disp) GET_by_offset(disp, _gloffset_RasterPos2dv) -#define SET_RasterPos2dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2dv, fn) -#define CALL_RasterPos2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_RasterPos2f, parameters) -#define GET_RasterPos2f(disp) GET_by_offset(disp, _gloffset_RasterPos2f) -#define SET_RasterPos2f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2f, fn) -#define CALL_RasterPos2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos2fv, parameters) -#define GET_RasterPos2fv(disp) GET_by_offset(disp, _gloffset_RasterPos2fv) -#define SET_RasterPos2fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2fv, fn) -#define CALL_RasterPos2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_RasterPos2i, parameters) -#define GET_RasterPos2i(disp) GET_by_offset(disp, _gloffset_RasterPos2i) -#define SET_RasterPos2i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2i, fn) -#define CALL_RasterPos2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos2iv, parameters) -#define GET_RasterPos2iv(disp) GET_by_offset(disp, _gloffset_RasterPos2iv) -#define SET_RasterPos2iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2iv, fn) -#define CALL_RasterPos2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_RasterPos2s, parameters) -#define GET_RasterPos2s(disp) GET_by_offset(disp, _gloffset_RasterPos2s) -#define SET_RasterPos2s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2s, fn) -#define CALL_RasterPos2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos2sv, parameters) -#define GET_RasterPos2sv(disp) GET_by_offset(disp, _gloffset_RasterPos2sv) -#define SET_RasterPos2sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2sv, fn) -#define CALL_RasterPos3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_RasterPos3d, parameters) -#define GET_RasterPos3d(disp) GET_by_offset(disp, _gloffset_RasterPos3d) -#define SET_RasterPos3d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3d, fn) -#define CALL_RasterPos3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos3dv, parameters) -#define GET_RasterPos3dv(disp) GET_by_offset(disp, _gloffset_RasterPos3dv) -#define SET_RasterPos3dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3dv, fn) -#define CALL_RasterPos3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_RasterPos3f, parameters) -#define GET_RasterPos3f(disp) GET_by_offset(disp, _gloffset_RasterPos3f) -#define SET_RasterPos3f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3f, fn) -#define CALL_RasterPos3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos3fv, parameters) -#define GET_RasterPos3fv(disp) GET_by_offset(disp, _gloffset_RasterPos3fv) -#define SET_RasterPos3fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3fv, fn) -#define CALL_RasterPos3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_RasterPos3i, parameters) -#define GET_RasterPos3i(disp) GET_by_offset(disp, _gloffset_RasterPos3i) -#define SET_RasterPos3i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3i, fn) -#define CALL_RasterPos3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos3iv, parameters) -#define GET_RasterPos3iv(disp) GET_by_offset(disp, _gloffset_RasterPos3iv) -#define SET_RasterPos3iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3iv, fn) -#define CALL_RasterPos3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_RasterPos3s, parameters) -#define GET_RasterPos3s(disp) GET_by_offset(disp, _gloffset_RasterPos3s) -#define SET_RasterPos3s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3s, fn) -#define CALL_RasterPos3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos3sv, parameters) -#define GET_RasterPos3sv(disp) GET_by_offset(disp, _gloffset_RasterPos3sv) -#define SET_RasterPos3sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3sv, fn) -#define CALL_RasterPos4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_RasterPos4d, parameters) -#define GET_RasterPos4d(disp) GET_by_offset(disp, _gloffset_RasterPos4d) -#define SET_RasterPos4d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4d, fn) -#define CALL_RasterPos4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos4dv, parameters) -#define GET_RasterPos4dv(disp) GET_by_offset(disp, _gloffset_RasterPos4dv) -#define SET_RasterPos4dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4dv, fn) -#define CALL_RasterPos4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_RasterPos4f, parameters) -#define GET_RasterPos4f(disp) GET_by_offset(disp, _gloffset_RasterPos4f) -#define SET_RasterPos4f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4f, fn) -#define CALL_RasterPos4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos4fv, parameters) -#define GET_RasterPos4fv(disp) GET_by_offset(disp, _gloffset_RasterPos4fv) -#define SET_RasterPos4fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4fv, fn) -#define CALL_RasterPos4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_RasterPos4i, parameters) -#define GET_RasterPos4i(disp) GET_by_offset(disp, _gloffset_RasterPos4i) -#define SET_RasterPos4i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4i, fn) -#define CALL_RasterPos4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos4iv, parameters) -#define GET_RasterPos4iv(disp) GET_by_offset(disp, _gloffset_RasterPos4iv) -#define SET_RasterPos4iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4iv, fn) -#define CALL_RasterPos4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_RasterPos4s, parameters) -#define GET_RasterPos4s(disp) GET_by_offset(disp, _gloffset_RasterPos4s) -#define SET_RasterPos4s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4s, fn) -#define CALL_RasterPos4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos4sv, parameters) -#define GET_RasterPos4sv(disp) GET_by_offset(disp, _gloffset_RasterPos4sv) -#define SET_RasterPos4sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4sv, fn) -#define CALL_Rectd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Rectd, parameters) -#define GET_Rectd(disp) GET_by_offset(disp, _gloffset_Rectd) -#define SET_Rectd(disp, fn) SET_by_offset(disp, _gloffset_Rectd, fn) -#define CALL_Rectdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *, const GLdouble *)), _gloffset_Rectdv, parameters) -#define GET_Rectdv(disp) GET_by_offset(disp, _gloffset_Rectdv) -#define SET_Rectdv(disp, fn) SET_by_offset(disp, _gloffset_Rectdv, fn) -#define CALL_Rectf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Rectf, parameters) -#define GET_Rectf(disp) GET_by_offset(disp, _gloffset_Rectf) -#define SET_Rectf(disp, fn) SET_by_offset(disp, _gloffset_Rectf, fn) -#define CALL_Rectfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *, const GLfloat *)), _gloffset_Rectfv, parameters) -#define GET_Rectfv(disp) GET_by_offset(disp, _gloffset_Rectfv) -#define SET_Rectfv(disp, fn) SET_by_offset(disp, _gloffset_Rectfv, fn) -#define CALL_Recti(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Recti, parameters) -#define GET_Recti(disp) GET_by_offset(disp, _gloffset_Recti) -#define SET_Recti(disp, fn) SET_by_offset(disp, _gloffset_Recti, fn) -#define CALL_Rectiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *, const GLint *)), _gloffset_Rectiv, parameters) -#define GET_Rectiv(disp) GET_by_offset(disp, _gloffset_Rectiv) -#define SET_Rectiv(disp, fn) SET_by_offset(disp, _gloffset_Rectiv, fn) -#define CALL_Rects(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Rects, parameters) -#define GET_Rects(disp) GET_by_offset(disp, _gloffset_Rects) -#define SET_Rects(disp, fn) SET_by_offset(disp, _gloffset_Rects, fn) -#define CALL_Rectsv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *, const GLshort *)), _gloffset_Rectsv, parameters) -#define GET_Rectsv(disp) GET_by_offset(disp, _gloffset_Rectsv) -#define SET_Rectsv(disp, fn) SET_by_offset(disp, _gloffset_Rectsv, fn) -#define CALL_TexCoord1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_TexCoord1d, parameters) -#define GET_TexCoord1d(disp) GET_by_offset(disp, _gloffset_TexCoord1d) -#define SET_TexCoord1d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1d, fn) -#define CALL_TexCoord1dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord1dv, parameters) -#define GET_TexCoord1dv(disp) GET_by_offset(disp, _gloffset_TexCoord1dv) -#define SET_TexCoord1dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1dv, fn) -#define CALL_TexCoord1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_TexCoord1f, parameters) -#define GET_TexCoord1f(disp) GET_by_offset(disp, _gloffset_TexCoord1f) -#define SET_TexCoord1f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1f, fn) -#define CALL_TexCoord1fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord1fv, parameters) -#define GET_TexCoord1fv(disp) GET_by_offset(disp, _gloffset_TexCoord1fv) -#define SET_TexCoord1fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1fv, fn) -#define CALL_TexCoord1i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_TexCoord1i, parameters) -#define GET_TexCoord1i(disp) GET_by_offset(disp, _gloffset_TexCoord1i) -#define SET_TexCoord1i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1i, fn) -#define CALL_TexCoord1iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord1iv, parameters) -#define GET_TexCoord1iv(disp) GET_by_offset(disp, _gloffset_TexCoord1iv) -#define SET_TexCoord1iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1iv, fn) -#define CALL_TexCoord1s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort)), _gloffset_TexCoord1s, parameters) -#define GET_TexCoord1s(disp) GET_by_offset(disp, _gloffset_TexCoord1s) -#define SET_TexCoord1s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1s, fn) -#define CALL_TexCoord1sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord1sv, parameters) -#define GET_TexCoord1sv(disp) GET_by_offset(disp, _gloffset_TexCoord1sv) -#define SET_TexCoord1sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1sv, fn) -#define CALL_TexCoord2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_TexCoord2d, parameters) -#define GET_TexCoord2d(disp) GET_by_offset(disp, _gloffset_TexCoord2d) -#define SET_TexCoord2d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2d, fn) -#define CALL_TexCoord2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord2dv, parameters) -#define GET_TexCoord2dv(disp) GET_by_offset(disp, _gloffset_TexCoord2dv) -#define SET_TexCoord2dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2dv, fn) -#define CALL_TexCoord2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_TexCoord2f, parameters) -#define GET_TexCoord2f(disp) GET_by_offset(disp, _gloffset_TexCoord2f) -#define SET_TexCoord2f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2f, fn) -#define CALL_TexCoord2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord2fv, parameters) -#define GET_TexCoord2fv(disp) GET_by_offset(disp, _gloffset_TexCoord2fv) -#define SET_TexCoord2fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2fv, fn) -#define CALL_TexCoord2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_TexCoord2i, parameters) -#define GET_TexCoord2i(disp) GET_by_offset(disp, _gloffset_TexCoord2i) -#define SET_TexCoord2i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2i, fn) -#define CALL_TexCoord2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord2iv, parameters) -#define GET_TexCoord2iv(disp) GET_by_offset(disp, _gloffset_TexCoord2iv) -#define SET_TexCoord2iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2iv, fn) -#define CALL_TexCoord2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_TexCoord2s, parameters) -#define GET_TexCoord2s(disp) GET_by_offset(disp, _gloffset_TexCoord2s) -#define SET_TexCoord2s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2s, fn) -#define CALL_TexCoord2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord2sv, parameters) -#define GET_TexCoord2sv(disp) GET_by_offset(disp, _gloffset_TexCoord2sv) -#define SET_TexCoord2sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2sv, fn) -#define CALL_TexCoord3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_TexCoord3d, parameters) -#define GET_TexCoord3d(disp) GET_by_offset(disp, _gloffset_TexCoord3d) -#define SET_TexCoord3d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3d, fn) -#define CALL_TexCoord3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord3dv, parameters) -#define GET_TexCoord3dv(disp) GET_by_offset(disp, _gloffset_TexCoord3dv) -#define SET_TexCoord3dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3dv, fn) -#define CALL_TexCoord3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_TexCoord3f, parameters) -#define GET_TexCoord3f(disp) GET_by_offset(disp, _gloffset_TexCoord3f) -#define SET_TexCoord3f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3f, fn) -#define CALL_TexCoord3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord3fv, parameters) -#define GET_TexCoord3fv(disp) GET_by_offset(disp, _gloffset_TexCoord3fv) -#define SET_TexCoord3fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3fv, fn) -#define CALL_TexCoord3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_TexCoord3i, parameters) -#define GET_TexCoord3i(disp) GET_by_offset(disp, _gloffset_TexCoord3i) -#define SET_TexCoord3i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3i, fn) -#define CALL_TexCoord3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord3iv, parameters) -#define GET_TexCoord3iv(disp) GET_by_offset(disp, _gloffset_TexCoord3iv) -#define SET_TexCoord3iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3iv, fn) -#define CALL_TexCoord3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_TexCoord3s, parameters) -#define GET_TexCoord3s(disp) GET_by_offset(disp, _gloffset_TexCoord3s) -#define SET_TexCoord3s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3s, fn) -#define CALL_TexCoord3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord3sv, parameters) -#define GET_TexCoord3sv(disp) GET_by_offset(disp, _gloffset_TexCoord3sv) -#define SET_TexCoord3sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3sv, fn) -#define CALL_TexCoord4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_TexCoord4d, parameters) -#define GET_TexCoord4d(disp) GET_by_offset(disp, _gloffset_TexCoord4d) -#define SET_TexCoord4d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4d, fn) -#define CALL_TexCoord4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord4dv, parameters) -#define GET_TexCoord4dv(disp) GET_by_offset(disp, _gloffset_TexCoord4dv) -#define SET_TexCoord4dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4dv, fn) -#define CALL_TexCoord4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_TexCoord4f, parameters) -#define GET_TexCoord4f(disp) GET_by_offset(disp, _gloffset_TexCoord4f) -#define SET_TexCoord4f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4f, fn) -#define CALL_TexCoord4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord4fv, parameters) -#define GET_TexCoord4fv(disp) GET_by_offset(disp, _gloffset_TexCoord4fv) -#define SET_TexCoord4fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4fv, fn) -#define CALL_TexCoord4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_TexCoord4i, parameters) -#define GET_TexCoord4i(disp) GET_by_offset(disp, _gloffset_TexCoord4i) -#define SET_TexCoord4i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4i, fn) -#define CALL_TexCoord4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord4iv, parameters) -#define GET_TexCoord4iv(disp) GET_by_offset(disp, _gloffset_TexCoord4iv) -#define SET_TexCoord4iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4iv, fn) -#define CALL_TexCoord4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_TexCoord4s, parameters) -#define GET_TexCoord4s(disp) GET_by_offset(disp, _gloffset_TexCoord4s) -#define SET_TexCoord4s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4s, fn) -#define CALL_TexCoord4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord4sv, parameters) -#define GET_TexCoord4sv(disp) GET_by_offset(disp, _gloffset_TexCoord4sv) -#define SET_TexCoord4sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4sv, fn) -#define CALL_Vertex2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_Vertex2d, parameters) -#define GET_Vertex2d(disp) GET_by_offset(disp, _gloffset_Vertex2d) -#define SET_Vertex2d(disp, fn) SET_by_offset(disp, _gloffset_Vertex2d, fn) -#define CALL_Vertex2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex2dv, parameters) -#define GET_Vertex2dv(disp) GET_by_offset(disp, _gloffset_Vertex2dv) -#define SET_Vertex2dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2dv, fn) -#define CALL_Vertex2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_Vertex2f, parameters) -#define GET_Vertex2f(disp) GET_by_offset(disp, _gloffset_Vertex2f) -#define SET_Vertex2f(disp, fn) SET_by_offset(disp, _gloffset_Vertex2f, fn) -#define CALL_Vertex2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex2fv, parameters) -#define GET_Vertex2fv(disp) GET_by_offset(disp, _gloffset_Vertex2fv) -#define SET_Vertex2fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2fv, fn) -#define CALL_Vertex2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_Vertex2i, parameters) -#define GET_Vertex2i(disp) GET_by_offset(disp, _gloffset_Vertex2i) -#define SET_Vertex2i(disp, fn) SET_by_offset(disp, _gloffset_Vertex2i, fn) -#define CALL_Vertex2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex2iv, parameters) -#define GET_Vertex2iv(disp) GET_by_offset(disp, _gloffset_Vertex2iv) -#define SET_Vertex2iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2iv, fn) -#define CALL_Vertex2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_Vertex2s, parameters) -#define GET_Vertex2s(disp) GET_by_offset(disp, _gloffset_Vertex2s) -#define SET_Vertex2s(disp, fn) SET_by_offset(disp, _gloffset_Vertex2s, fn) -#define CALL_Vertex2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex2sv, parameters) -#define GET_Vertex2sv(disp) GET_by_offset(disp, _gloffset_Vertex2sv) -#define SET_Vertex2sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2sv, fn) -#define CALL_Vertex3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Vertex3d, parameters) -#define GET_Vertex3d(disp) GET_by_offset(disp, _gloffset_Vertex3d) -#define SET_Vertex3d(disp, fn) SET_by_offset(disp, _gloffset_Vertex3d, fn) -#define CALL_Vertex3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex3dv, parameters) -#define GET_Vertex3dv(disp) GET_by_offset(disp, _gloffset_Vertex3dv) -#define SET_Vertex3dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3dv, fn) -#define CALL_Vertex3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Vertex3f, parameters) -#define GET_Vertex3f(disp) GET_by_offset(disp, _gloffset_Vertex3f) -#define SET_Vertex3f(disp, fn) SET_by_offset(disp, _gloffset_Vertex3f, fn) -#define CALL_Vertex3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex3fv, parameters) -#define GET_Vertex3fv(disp) GET_by_offset(disp, _gloffset_Vertex3fv) -#define SET_Vertex3fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3fv, fn) -#define CALL_Vertex3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Vertex3i, parameters) -#define GET_Vertex3i(disp) GET_by_offset(disp, _gloffset_Vertex3i) -#define SET_Vertex3i(disp, fn) SET_by_offset(disp, _gloffset_Vertex3i, fn) -#define CALL_Vertex3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex3iv, parameters) -#define GET_Vertex3iv(disp) GET_by_offset(disp, _gloffset_Vertex3iv) -#define SET_Vertex3iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3iv, fn) -#define CALL_Vertex3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Vertex3s, parameters) -#define GET_Vertex3s(disp) GET_by_offset(disp, _gloffset_Vertex3s) -#define SET_Vertex3s(disp, fn) SET_by_offset(disp, _gloffset_Vertex3s, fn) -#define CALL_Vertex3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex3sv, parameters) -#define GET_Vertex3sv(disp) GET_by_offset(disp, _gloffset_Vertex3sv) -#define SET_Vertex3sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3sv, fn) -#define CALL_Vertex4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Vertex4d, parameters) -#define GET_Vertex4d(disp) GET_by_offset(disp, _gloffset_Vertex4d) -#define SET_Vertex4d(disp, fn) SET_by_offset(disp, _gloffset_Vertex4d, fn) -#define CALL_Vertex4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex4dv, parameters) -#define GET_Vertex4dv(disp) GET_by_offset(disp, _gloffset_Vertex4dv) -#define SET_Vertex4dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4dv, fn) -#define CALL_Vertex4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Vertex4f, parameters) -#define GET_Vertex4f(disp) GET_by_offset(disp, _gloffset_Vertex4f) -#define SET_Vertex4f(disp, fn) SET_by_offset(disp, _gloffset_Vertex4f, fn) -#define CALL_Vertex4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex4fv, parameters) -#define GET_Vertex4fv(disp) GET_by_offset(disp, _gloffset_Vertex4fv) -#define SET_Vertex4fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4fv, fn) -#define CALL_Vertex4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Vertex4i, parameters) -#define GET_Vertex4i(disp) GET_by_offset(disp, _gloffset_Vertex4i) -#define SET_Vertex4i(disp, fn) SET_by_offset(disp, _gloffset_Vertex4i, fn) -#define CALL_Vertex4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex4iv, parameters) -#define GET_Vertex4iv(disp) GET_by_offset(disp, _gloffset_Vertex4iv) -#define SET_Vertex4iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4iv, fn) -#define CALL_Vertex4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Vertex4s, parameters) -#define GET_Vertex4s(disp) GET_by_offset(disp, _gloffset_Vertex4s) -#define SET_Vertex4s(disp, fn) SET_by_offset(disp, _gloffset_Vertex4s, fn) -#define CALL_Vertex4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex4sv, parameters) -#define GET_Vertex4sv(disp) GET_by_offset(disp, _gloffset_Vertex4sv) -#define SET_Vertex4sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4sv, fn) -#define CALL_ClipPlane(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_ClipPlane, parameters) -#define GET_ClipPlane(disp) GET_by_offset(disp, _gloffset_ClipPlane) -#define SET_ClipPlane(disp, fn) SET_by_offset(disp, _gloffset_ClipPlane, fn) -#define CALL_ColorMaterial(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ColorMaterial, parameters) -#define GET_ColorMaterial(disp) GET_by_offset(disp, _gloffset_ColorMaterial) -#define SET_ColorMaterial(disp, fn) SET_by_offset(disp, _gloffset_ColorMaterial, fn) -#define CALL_CullFace(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_CullFace, parameters) -#define GET_CullFace(disp) GET_by_offset(disp, _gloffset_CullFace) -#define SET_CullFace(disp, fn) SET_by_offset(disp, _gloffset_CullFace, fn) -#define CALL_Fogf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_Fogf, parameters) -#define GET_Fogf(disp) GET_by_offset(disp, _gloffset_Fogf) -#define SET_Fogf(disp, fn) SET_by_offset(disp, _gloffset_Fogf, fn) -#define CALL_Fogfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_Fogfv, parameters) -#define GET_Fogfv(disp) GET_by_offset(disp, _gloffset_Fogfv) -#define SET_Fogfv(disp, fn) SET_by_offset(disp, _gloffset_Fogfv, fn) -#define CALL_Fogi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_Fogi, parameters) -#define GET_Fogi(disp) GET_by_offset(disp, _gloffset_Fogi) -#define SET_Fogi(disp, fn) SET_by_offset(disp, _gloffset_Fogi, fn) -#define CALL_Fogiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_Fogiv, parameters) -#define GET_Fogiv(disp) GET_by_offset(disp, _gloffset_Fogiv) -#define SET_Fogiv(disp, fn) SET_by_offset(disp, _gloffset_Fogiv, fn) -#define CALL_FrontFace(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_FrontFace, parameters) -#define GET_FrontFace(disp) GET_by_offset(disp, _gloffset_FrontFace) -#define SET_FrontFace(disp, fn) SET_by_offset(disp, _gloffset_FrontFace, fn) -#define CALL_Hint(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_Hint, parameters) -#define GET_Hint(disp) GET_by_offset(disp, _gloffset_Hint) -#define SET_Hint(disp, fn) SET_by_offset(disp, _gloffset_Hint, fn) -#define CALL_Lightf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_Lightf, parameters) -#define GET_Lightf(disp) GET_by_offset(disp, _gloffset_Lightf) -#define SET_Lightf(disp, fn) SET_by_offset(disp, _gloffset_Lightf, fn) -#define CALL_Lightfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_Lightfv, parameters) -#define GET_Lightfv(disp) GET_by_offset(disp, _gloffset_Lightfv) -#define SET_Lightfv(disp, fn) SET_by_offset(disp, _gloffset_Lightfv, fn) -#define CALL_Lighti(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_Lighti, parameters) -#define GET_Lighti(disp) GET_by_offset(disp, _gloffset_Lighti) -#define SET_Lighti(disp, fn) SET_by_offset(disp, _gloffset_Lighti, fn) -#define CALL_Lightiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_Lightiv, parameters) -#define GET_Lightiv(disp) GET_by_offset(disp, _gloffset_Lightiv) -#define SET_Lightiv(disp, fn) SET_by_offset(disp, _gloffset_Lightiv, fn) -#define CALL_LightModelf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_LightModelf, parameters) -#define GET_LightModelf(disp) GET_by_offset(disp, _gloffset_LightModelf) -#define SET_LightModelf(disp, fn) SET_by_offset(disp, _gloffset_LightModelf, fn) -#define CALL_LightModelfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_LightModelfv, parameters) -#define GET_LightModelfv(disp) GET_by_offset(disp, _gloffset_LightModelfv) -#define SET_LightModelfv(disp, fn) SET_by_offset(disp, _gloffset_LightModelfv, fn) -#define CALL_LightModeli(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_LightModeli, parameters) -#define GET_LightModeli(disp) GET_by_offset(disp, _gloffset_LightModeli) -#define SET_LightModeli(disp, fn) SET_by_offset(disp, _gloffset_LightModeli, fn) -#define CALL_LightModeliv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_LightModeliv, parameters) -#define GET_LightModeliv(disp) GET_by_offset(disp, _gloffset_LightModeliv) -#define SET_LightModeliv(disp, fn) SET_by_offset(disp, _gloffset_LightModeliv, fn) -#define CALL_LineStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLushort)), _gloffset_LineStipple, parameters) -#define GET_LineStipple(disp) GET_by_offset(disp, _gloffset_LineStipple) -#define SET_LineStipple(disp, fn) SET_by_offset(disp, _gloffset_LineStipple, fn) -#define CALL_LineWidth(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_LineWidth, parameters) -#define GET_LineWidth(disp) GET_by_offset(disp, _gloffset_LineWidth) -#define SET_LineWidth(disp, fn) SET_by_offset(disp, _gloffset_LineWidth, fn) -#define CALL_Materialf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_Materialf, parameters) -#define GET_Materialf(disp) GET_by_offset(disp, _gloffset_Materialf) -#define SET_Materialf(disp, fn) SET_by_offset(disp, _gloffset_Materialf, fn) -#define CALL_Materialfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_Materialfv, parameters) -#define GET_Materialfv(disp) GET_by_offset(disp, _gloffset_Materialfv) -#define SET_Materialfv(disp, fn) SET_by_offset(disp, _gloffset_Materialfv, fn) -#define CALL_Materiali(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_Materiali, parameters) -#define GET_Materiali(disp) GET_by_offset(disp, _gloffset_Materiali) -#define SET_Materiali(disp, fn) SET_by_offset(disp, _gloffset_Materiali, fn) -#define CALL_Materialiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_Materialiv, parameters) -#define GET_Materialiv(disp) GET_by_offset(disp, _gloffset_Materialiv) -#define SET_Materialiv(disp, fn) SET_by_offset(disp, _gloffset_Materialiv, fn) -#define CALL_PointSize(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_PointSize, parameters) -#define GET_PointSize(disp) GET_by_offset(disp, _gloffset_PointSize) -#define SET_PointSize(disp, fn) SET_by_offset(disp, _gloffset_PointSize, fn) -#define CALL_PolygonMode(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_PolygonMode, parameters) -#define GET_PolygonMode(disp) GET_by_offset(disp, _gloffset_PolygonMode) -#define SET_PolygonMode(disp, fn) SET_by_offset(disp, _gloffset_PolygonMode, fn) -#define CALL_PolygonStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_PolygonStipple, parameters) -#define GET_PolygonStipple(disp) GET_by_offset(disp, _gloffset_PolygonStipple) -#define SET_PolygonStipple(disp, fn) SET_by_offset(disp, _gloffset_PolygonStipple, fn) -#define CALL_Scissor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei)), _gloffset_Scissor, parameters) -#define GET_Scissor(disp) GET_by_offset(disp, _gloffset_Scissor) -#define SET_Scissor(disp, fn) SET_by_offset(disp, _gloffset_Scissor, fn) -#define CALL_ShadeModel(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ShadeModel, parameters) -#define GET_ShadeModel(disp) GET_by_offset(disp, _gloffset_ShadeModel) -#define SET_ShadeModel(disp, fn) SET_by_offset(disp, _gloffset_ShadeModel, fn) -#define CALL_TexParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexParameterf, parameters) -#define GET_TexParameterf(disp) GET_by_offset(disp, _gloffset_TexParameterf) -#define SET_TexParameterf(disp, fn) SET_by_offset(disp, _gloffset_TexParameterf, fn) -#define CALL_TexParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexParameterfv, parameters) -#define GET_TexParameterfv(disp) GET_by_offset(disp, _gloffset_TexParameterfv) -#define SET_TexParameterfv(disp, fn) SET_by_offset(disp, _gloffset_TexParameterfv, fn) -#define CALL_TexParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexParameteri, parameters) -#define GET_TexParameteri(disp) GET_by_offset(disp, _gloffset_TexParameteri) -#define SET_TexParameteri(disp, fn) SET_by_offset(disp, _gloffset_TexParameteri, fn) -#define CALL_TexParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexParameteriv, parameters) -#define GET_TexParameteriv(disp) GET_by_offset(disp, _gloffset_TexParameteriv) -#define SET_TexParameteriv(disp, fn) SET_by_offset(disp, _gloffset_TexParameteriv, fn) -#define CALL_TexImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage1D, parameters) -#define GET_TexImage1D(disp) GET_by_offset(disp, _gloffset_TexImage1D) -#define SET_TexImage1D(disp, fn) SET_by_offset(disp, _gloffset_TexImage1D, fn) -#define CALL_TexImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage2D, parameters) -#define GET_TexImage2D(disp) GET_by_offset(disp, _gloffset_TexImage2D) -#define SET_TexImage2D(disp, fn) SET_by_offset(disp, _gloffset_TexImage2D, fn) -#define CALL_TexEnvf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexEnvf, parameters) -#define GET_TexEnvf(disp) GET_by_offset(disp, _gloffset_TexEnvf) -#define SET_TexEnvf(disp, fn) SET_by_offset(disp, _gloffset_TexEnvf, fn) -#define CALL_TexEnvfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexEnvfv, parameters) -#define GET_TexEnvfv(disp) GET_by_offset(disp, _gloffset_TexEnvfv) -#define SET_TexEnvfv(disp, fn) SET_by_offset(disp, _gloffset_TexEnvfv, fn) -#define CALL_TexEnvi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexEnvi, parameters) -#define GET_TexEnvi(disp) GET_by_offset(disp, _gloffset_TexEnvi) -#define SET_TexEnvi(disp, fn) SET_by_offset(disp, _gloffset_TexEnvi, fn) -#define CALL_TexEnviv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexEnviv, parameters) -#define GET_TexEnviv(disp) GET_by_offset(disp, _gloffset_TexEnviv) -#define SET_TexEnviv(disp, fn) SET_by_offset(disp, _gloffset_TexEnviv, fn) -#define CALL_TexGend(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble)), _gloffset_TexGend, parameters) -#define GET_TexGend(disp) GET_by_offset(disp, _gloffset_TexGend) -#define SET_TexGend(disp, fn) SET_by_offset(disp, _gloffset_TexGend, fn) -#define CALL_TexGendv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLdouble *)), _gloffset_TexGendv, parameters) -#define GET_TexGendv(disp) GET_by_offset(disp, _gloffset_TexGendv) -#define SET_TexGendv(disp, fn) SET_by_offset(disp, _gloffset_TexGendv, fn) -#define CALL_TexGenf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexGenf, parameters) -#define GET_TexGenf(disp) GET_by_offset(disp, _gloffset_TexGenf) -#define SET_TexGenf(disp, fn) SET_by_offset(disp, _gloffset_TexGenf, fn) -#define CALL_TexGenfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexGenfv, parameters) -#define GET_TexGenfv(disp) GET_by_offset(disp, _gloffset_TexGenfv) -#define SET_TexGenfv(disp, fn) SET_by_offset(disp, _gloffset_TexGenfv, fn) -#define CALL_TexGeni(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexGeni, parameters) -#define GET_TexGeni(disp) GET_by_offset(disp, _gloffset_TexGeni) -#define SET_TexGeni(disp, fn) SET_by_offset(disp, _gloffset_TexGeni, fn) -#define CALL_TexGeniv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexGeniv, parameters) -#define GET_TexGeniv(disp) GET_by_offset(disp, _gloffset_TexGeniv) -#define SET_TexGeniv(disp, fn) SET_by_offset(disp, _gloffset_TexGeniv, fn) -#define CALL_FeedbackBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLenum, GLfloat *)), _gloffset_FeedbackBuffer, parameters) -#define GET_FeedbackBuffer(disp) GET_by_offset(disp, _gloffset_FeedbackBuffer) -#define SET_FeedbackBuffer(disp, fn) SET_by_offset(disp, _gloffset_FeedbackBuffer, fn) -#define CALL_SelectBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_SelectBuffer, parameters) -#define GET_SelectBuffer(disp) GET_by_offset(disp, _gloffset_SelectBuffer) -#define SET_SelectBuffer(disp, fn) SET_by_offset(disp, _gloffset_SelectBuffer, fn) -#define CALL_RenderMode(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLenum)), _gloffset_RenderMode, parameters) -#define GET_RenderMode(disp) GET_by_offset(disp, _gloffset_RenderMode) -#define SET_RenderMode(disp, fn) SET_by_offset(disp, _gloffset_RenderMode, fn) -#define CALL_InitNames(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_InitNames, parameters) -#define GET_InitNames(disp) GET_by_offset(disp, _gloffset_InitNames) -#define SET_InitNames(disp, fn) SET_by_offset(disp, _gloffset_InitNames, fn) -#define CALL_LoadName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_LoadName, parameters) -#define GET_LoadName(disp) GET_by_offset(disp, _gloffset_LoadName) -#define SET_LoadName(disp, fn) SET_by_offset(disp, _gloffset_LoadName, fn) -#define CALL_PassThrough(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_PassThrough, parameters) -#define GET_PassThrough(disp) GET_by_offset(disp, _gloffset_PassThrough) -#define SET_PassThrough(disp, fn) SET_by_offset(disp, _gloffset_PassThrough, fn) -#define CALL_PopName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopName, parameters) -#define GET_PopName(disp) GET_by_offset(disp, _gloffset_PopName) -#define SET_PopName(disp, fn) SET_by_offset(disp, _gloffset_PopName, fn) -#define CALL_PushName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_PushName, parameters) -#define GET_PushName(disp) GET_by_offset(disp, _gloffset_PushName) -#define SET_PushName(disp, fn) SET_by_offset(disp, _gloffset_PushName, fn) -#define CALL_DrawBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DrawBuffer, parameters) -#define GET_DrawBuffer(disp) GET_by_offset(disp, _gloffset_DrawBuffer) -#define SET_DrawBuffer(disp, fn) SET_by_offset(disp, _gloffset_DrawBuffer, fn) -#define CALL_Clear(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_Clear, parameters) -#define GET_Clear(disp) GET_by_offset(disp, _gloffset_Clear) -#define SET_Clear(disp, fn) SET_by_offset(disp, _gloffset_Clear, fn) -#define CALL_ClearAccum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ClearAccum, parameters) -#define GET_ClearAccum(disp) GET_by_offset(disp, _gloffset_ClearAccum) -#define SET_ClearAccum(disp, fn) SET_by_offset(disp, _gloffset_ClearAccum, fn) -#define CALL_ClearIndex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_ClearIndex, parameters) -#define GET_ClearIndex(disp) GET_by_offset(disp, _gloffset_ClearIndex) -#define SET_ClearIndex(disp, fn) SET_by_offset(disp, _gloffset_ClearIndex, fn) -#define CALL_ClearColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf, GLclampf, GLclampf)), _gloffset_ClearColor, parameters) -#define GET_ClearColor(disp) GET_by_offset(disp, _gloffset_ClearColor) -#define SET_ClearColor(disp, fn) SET_by_offset(disp, _gloffset_ClearColor, fn) -#define CALL_ClearStencil(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_ClearStencil, parameters) -#define GET_ClearStencil(disp) GET_by_offset(disp, _gloffset_ClearStencil) -#define SET_ClearStencil(disp, fn) SET_by_offset(disp, _gloffset_ClearStencil, fn) -#define CALL_ClearDepth(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd)), _gloffset_ClearDepth, parameters) -#define GET_ClearDepth(disp) GET_by_offset(disp, _gloffset_ClearDepth) -#define SET_ClearDepth(disp, fn) SET_by_offset(disp, _gloffset_ClearDepth, fn) -#define CALL_StencilMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_StencilMask, parameters) -#define GET_StencilMask(disp) GET_by_offset(disp, _gloffset_StencilMask) -#define SET_StencilMask(disp, fn) SET_by_offset(disp, _gloffset_StencilMask, fn) -#define CALL_ColorMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean, GLboolean, GLboolean, GLboolean)), _gloffset_ColorMask, parameters) -#define GET_ColorMask(disp) GET_by_offset(disp, _gloffset_ColorMask) -#define SET_ColorMask(disp, fn) SET_by_offset(disp, _gloffset_ColorMask, fn) -#define CALL_DepthMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean)), _gloffset_DepthMask, parameters) -#define GET_DepthMask(disp) GET_by_offset(disp, _gloffset_DepthMask) -#define SET_DepthMask(disp, fn) SET_by_offset(disp, _gloffset_DepthMask, fn) -#define CALL_IndexMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_IndexMask, parameters) -#define GET_IndexMask(disp) GET_by_offset(disp, _gloffset_IndexMask) -#define SET_IndexMask(disp, fn) SET_by_offset(disp, _gloffset_IndexMask, fn) -#define CALL_Accum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_Accum, parameters) -#define GET_Accum(disp) GET_by_offset(disp, _gloffset_Accum) -#define SET_Accum(disp, fn) SET_by_offset(disp, _gloffset_Accum, fn) -#define CALL_Disable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Disable, parameters) -#define GET_Disable(disp) GET_by_offset(disp, _gloffset_Disable) -#define SET_Disable(disp, fn) SET_by_offset(disp, _gloffset_Disable, fn) -#define CALL_Enable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Enable, parameters) -#define GET_Enable(disp) GET_by_offset(disp, _gloffset_Enable) -#define SET_Enable(disp, fn) SET_by_offset(disp, _gloffset_Enable, fn) -#define CALL_Finish(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_Finish, parameters) -#define GET_Finish(disp) GET_by_offset(disp, _gloffset_Finish) -#define SET_Finish(disp, fn) SET_by_offset(disp, _gloffset_Finish, fn) -#define CALL_Flush(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_Flush, parameters) -#define GET_Flush(disp) GET_by_offset(disp, _gloffset_Flush) -#define SET_Flush(disp, fn) SET_by_offset(disp, _gloffset_Flush, fn) -#define CALL_PopAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopAttrib, parameters) -#define GET_PopAttrib(disp) GET_by_offset(disp, _gloffset_PopAttrib) -#define SET_PopAttrib(disp, fn) SET_by_offset(disp, _gloffset_PopAttrib, fn) -#define CALL_PushAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_PushAttrib, parameters) -#define GET_PushAttrib(disp) GET_by_offset(disp, _gloffset_PushAttrib) -#define SET_PushAttrib(disp, fn) SET_by_offset(disp, _gloffset_PushAttrib, fn) -#define CALL_Map1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble *)), _gloffset_Map1d, parameters) -#define GET_Map1d(disp) GET_by_offset(disp, _gloffset_Map1d) -#define SET_Map1d(disp, fn) SET_by_offset(disp, _gloffset_Map1d, fn) -#define CALL_Map1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat *)), _gloffset_Map1f, parameters) -#define GET_Map1f(disp) GET_by_offset(disp, _gloffset_Map1f) -#define SET_Map1f(disp, fn) SET_by_offset(disp, _gloffset_Map1f, fn) -#define CALL_Map2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *)), _gloffset_Map2d, parameters) -#define GET_Map2d(disp) GET_by_offset(disp, _gloffset_Map2d) -#define SET_Map2d(disp, fn) SET_by_offset(disp, _gloffset_Map2d, fn) -#define CALL_Map2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *)), _gloffset_Map2f, parameters) -#define GET_Map2f(disp) GET_by_offset(disp, _gloffset_Map2f) -#define SET_Map2f(disp, fn) SET_by_offset(disp, _gloffset_Map2f, fn) -#define CALL_MapGrid1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLdouble, GLdouble)), _gloffset_MapGrid1d, parameters) -#define GET_MapGrid1d(disp) GET_by_offset(disp, _gloffset_MapGrid1d) -#define SET_MapGrid1d(disp, fn) SET_by_offset(disp, _gloffset_MapGrid1d, fn) -#define CALL_MapGrid1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), _gloffset_MapGrid1f, parameters) -#define GET_MapGrid1f(disp) GET_by_offset(disp, _gloffset_MapGrid1f) -#define SET_MapGrid1f(disp, fn) SET_by_offset(disp, _gloffset_MapGrid1f, fn) -#define CALL_MapGrid2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble)), _gloffset_MapGrid2d, parameters) -#define GET_MapGrid2d(disp) GET_by_offset(disp, _gloffset_MapGrid2d) -#define SET_MapGrid2d(disp, fn) SET_by_offset(disp, _gloffset_MapGrid2d, fn) -#define CALL_MapGrid2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat)), _gloffset_MapGrid2f, parameters) -#define GET_MapGrid2f(disp) GET_by_offset(disp, _gloffset_MapGrid2f) -#define SET_MapGrid2f(disp, fn) SET_by_offset(disp, _gloffset_MapGrid2f, fn) -#define CALL_EvalCoord1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_EvalCoord1d, parameters) -#define GET_EvalCoord1d(disp) GET_by_offset(disp, _gloffset_EvalCoord1d) -#define SET_EvalCoord1d(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1d, fn) -#define CALL_EvalCoord1dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_EvalCoord1dv, parameters) -#define GET_EvalCoord1dv(disp) GET_by_offset(disp, _gloffset_EvalCoord1dv) -#define SET_EvalCoord1dv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1dv, fn) -#define CALL_EvalCoord1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_EvalCoord1f, parameters) -#define GET_EvalCoord1f(disp) GET_by_offset(disp, _gloffset_EvalCoord1f) -#define SET_EvalCoord1f(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1f, fn) -#define CALL_EvalCoord1fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_EvalCoord1fv, parameters) -#define GET_EvalCoord1fv(disp) GET_by_offset(disp, _gloffset_EvalCoord1fv) -#define SET_EvalCoord1fv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1fv, fn) -#define CALL_EvalCoord2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_EvalCoord2d, parameters) -#define GET_EvalCoord2d(disp) GET_by_offset(disp, _gloffset_EvalCoord2d) -#define SET_EvalCoord2d(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2d, fn) -#define CALL_EvalCoord2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_EvalCoord2dv, parameters) -#define GET_EvalCoord2dv(disp) GET_by_offset(disp, _gloffset_EvalCoord2dv) -#define SET_EvalCoord2dv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2dv, fn) -#define CALL_EvalCoord2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_EvalCoord2f, parameters) -#define GET_EvalCoord2f(disp) GET_by_offset(disp, _gloffset_EvalCoord2f) -#define SET_EvalCoord2f(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2f, fn) -#define CALL_EvalCoord2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_EvalCoord2fv, parameters) -#define GET_EvalCoord2fv(disp) GET_by_offset(disp, _gloffset_EvalCoord2fv) -#define SET_EvalCoord2fv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2fv, fn) -#define CALL_EvalMesh1(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint)), _gloffset_EvalMesh1, parameters) -#define GET_EvalMesh1(disp) GET_by_offset(disp, _gloffset_EvalMesh1) -#define SET_EvalMesh1(disp, fn) SET_by_offset(disp, _gloffset_EvalMesh1, fn) -#define CALL_EvalPoint1(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_EvalPoint1, parameters) -#define GET_EvalPoint1(disp) GET_by_offset(disp, _gloffset_EvalPoint1) -#define SET_EvalPoint1(disp, fn) SET_by_offset(disp, _gloffset_EvalPoint1, fn) -#define CALL_EvalMesh2(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint)), _gloffset_EvalMesh2, parameters) -#define GET_EvalMesh2(disp) GET_by_offset(disp, _gloffset_EvalMesh2) -#define SET_EvalMesh2(disp, fn) SET_by_offset(disp, _gloffset_EvalMesh2, fn) -#define CALL_EvalPoint2(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_EvalPoint2, parameters) -#define GET_EvalPoint2(disp) GET_by_offset(disp, _gloffset_EvalPoint2) -#define SET_EvalPoint2(disp, fn) SET_by_offset(disp, _gloffset_EvalPoint2, fn) -#define CALL_AlphaFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLclampf)), _gloffset_AlphaFunc, parameters) -#define GET_AlphaFunc(disp) GET_by_offset(disp, _gloffset_AlphaFunc) -#define SET_AlphaFunc(disp, fn) SET_by_offset(disp, _gloffset_AlphaFunc, fn) -#define CALL_BlendFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_BlendFunc, parameters) -#define GET_BlendFunc(disp) GET_by_offset(disp, _gloffset_BlendFunc) -#define SET_BlendFunc(disp, fn) SET_by_offset(disp, _gloffset_BlendFunc, fn) -#define CALL_LogicOp(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_LogicOp, parameters) -#define GET_LogicOp(disp) GET_by_offset(disp, _gloffset_LogicOp) -#define SET_LogicOp(disp, fn) SET_by_offset(disp, _gloffset_LogicOp, fn) -#define CALL_StencilFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLuint)), _gloffset_StencilFunc, parameters) -#define GET_StencilFunc(disp) GET_by_offset(disp, _gloffset_StencilFunc) -#define SET_StencilFunc(disp, fn) SET_by_offset(disp, _gloffset_StencilFunc, fn) -#define CALL_StencilOp(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum)), _gloffset_StencilOp, parameters) -#define GET_StencilOp(disp) GET_by_offset(disp, _gloffset_StencilOp) -#define SET_StencilOp(disp, fn) SET_by_offset(disp, _gloffset_StencilOp, fn) -#define CALL_DepthFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DepthFunc, parameters) -#define GET_DepthFunc(disp) GET_by_offset(disp, _gloffset_DepthFunc) -#define SET_DepthFunc(disp, fn) SET_by_offset(disp, _gloffset_DepthFunc, fn) -#define CALL_PixelZoom(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PixelZoom, parameters) -#define GET_PixelZoom(disp) GET_by_offset(disp, _gloffset_PixelZoom) -#define SET_PixelZoom(disp, fn) SET_by_offset(disp, _gloffset_PixelZoom, fn) -#define CALL_PixelTransferf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelTransferf, parameters) -#define GET_PixelTransferf(disp) GET_by_offset(disp, _gloffset_PixelTransferf) -#define SET_PixelTransferf(disp, fn) SET_by_offset(disp, _gloffset_PixelTransferf, fn) -#define CALL_PixelTransferi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelTransferi, parameters) -#define GET_PixelTransferi(disp) GET_by_offset(disp, _gloffset_PixelTransferi) -#define SET_PixelTransferi(disp, fn) SET_by_offset(disp, _gloffset_PixelTransferi, fn) -#define CALL_PixelStoref(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelStoref, parameters) -#define GET_PixelStoref(disp) GET_by_offset(disp, _gloffset_PixelStoref) -#define SET_PixelStoref(disp, fn) SET_by_offset(disp, _gloffset_PixelStoref, fn) -#define CALL_PixelStorei(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelStorei, parameters) -#define GET_PixelStorei(disp) GET_by_offset(disp, _gloffset_PixelStorei) -#define SET_PixelStorei(disp, fn) SET_by_offset(disp, _gloffset_PixelStorei, fn) -#define CALL_PixelMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLfloat *)), _gloffset_PixelMapfv, parameters) -#define GET_PixelMapfv(disp) GET_by_offset(disp, _gloffset_PixelMapfv) -#define SET_PixelMapfv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapfv, fn) -#define CALL_PixelMapuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLuint *)), _gloffset_PixelMapuiv, parameters) -#define GET_PixelMapuiv(disp) GET_by_offset(disp, _gloffset_PixelMapuiv) -#define SET_PixelMapuiv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapuiv, fn) -#define CALL_PixelMapusv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLushort *)), _gloffset_PixelMapusv, parameters) -#define GET_PixelMapusv(disp) GET_by_offset(disp, _gloffset_PixelMapusv) -#define SET_PixelMapusv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapusv, fn) -#define CALL_ReadBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ReadBuffer, parameters) -#define GET_ReadBuffer(disp) GET_by_offset(disp, _gloffset_ReadBuffer) -#define SET_ReadBuffer(disp, fn) SET_by_offset(disp, _gloffset_ReadBuffer, fn) -#define CALL_CopyPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum)), _gloffset_CopyPixels, parameters) -#define GET_CopyPixels(disp) GET_by_offset(disp, _gloffset_CopyPixels) -#define SET_CopyPixels(disp, fn) SET_by_offset(disp, _gloffset_CopyPixels, fn) -#define CALL_ReadPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *)), _gloffset_ReadPixels, parameters) -#define GET_ReadPixels(disp) GET_by_offset(disp, _gloffset_ReadPixels) -#define SET_ReadPixels(disp, fn) SET_by_offset(disp, _gloffset_ReadPixels, fn) -#define CALL_DrawPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_DrawPixels, parameters) -#define GET_DrawPixels(disp) GET_by_offset(disp, _gloffset_DrawPixels) -#define SET_DrawPixels(disp, fn) SET_by_offset(disp, _gloffset_DrawPixels, fn) -#define CALL_GetBooleanv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean *)), _gloffset_GetBooleanv, parameters) -#define GET_GetBooleanv(disp) GET_by_offset(disp, _gloffset_GetBooleanv) -#define SET_GetBooleanv(disp, fn) SET_by_offset(disp, _gloffset_GetBooleanv, fn) -#define CALL_GetClipPlane(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), _gloffset_GetClipPlane, parameters) -#define GET_GetClipPlane(disp) GET_by_offset(disp, _gloffset_GetClipPlane) -#define SET_GetClipPlane(disp, fn) SET_by_offset(disp, _gloffset_GetClipPlane, fn) -#define CALL_GetDoublev(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), _gloffset_GetDoublev, parameters) -#define GET_GetDoublev(disp) GET_by_offset(disp, _gloffset_GetDoublev) -#define SET_GetDoublev(disp, fn) SET_by_offset(disp, _gloffset_GetDoublev, fn) -#define CALL_GetError(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(void)), _gloffset_GetError, parameters) -#define GET_GetError(disp) GET_by_offset(disp, _gloffset_GetError) -#define SET_GetError(disp, fn) SET_by_offset(disp, _gloffset_GetError, fn) -#define CALL_GetFloatv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetFloatv, parameters) -#define GET_GetFloatv(disp) GET_by_offset(disp, _gloffset_GetFloatv) -#define SET_GetFloatv(disp, fn) SET_by_offset(disp, _gloffset_GetFloatv, fn) -#define CALL_GetIntegerv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetIntegerv, parameters) -#define GET_GetIntegerv(disp) GET_by_offset(disp, _gloffset_GetIntegerv) -#define SET_GetIntegerv(disp, fn) SET_by_offset(disp, _gloffset_GetIntegerv, fn) -#define CALL_GetLightfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetLightfv, parameters) -#define GET_GetLightfv(disp) GET_by_offset(disp, _gloffset_GetLightfv) -#define SET_GetLightfv(disp, fn) SET_by_offset(disp, _gloffset_GetLightfv, fn) -#define CALL_GetLightiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetLightiv, parameters) -#define GET_GetLightiv(disp) GET_by_offset(disp, _gloffset_GetLightiv) -#define SET_GetLightiv(disp, fn) SET_by_offset(disp, _gloffset_GetLightiv, fn) -#define CALL_GetMapdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble *)), _gloffset_GetMapdv, parameters) -#define GET_GetMapdv(disp) GET_by_offset(disp, _gloffset_GetMapdv) -#define SET_GetMapdv(disp, fn) SET_by_offset(disp, _gloffset_GetMapdv, fn) -#define CALL_GetMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMapfv, parameters) -#define GET_GetMapfv(disp) GET_by_offset(disp, _gloffset_GetMapfv) -#define SET_GetMapfv(disp, fn) SET_by_offset(disp, _gloffset_GetMapfv, fn) -#define CALL_GetMapiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMapiv, parameters) -#define GET_GetMapiv(disp) GET_by_offset(disp, _gloffset_GetMapiv) -#define SET_GetMapiv(disp, fn) SET_by_offset(disp, _gloffset_GetMapiv, fn) -#define CALL_GetMaterialfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMaterialfv, parameters) -#define GET_GetMaterialfv(disp) GET_by_offset(disp, _gloffset_GetMaterialfv) -#define SET_GetMaterialfv(disp, fn) SET_by_offset(disp, _gloffset_GetMaterialfv, fn) -#define CALL_GetMaterialiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMaterialiv, parameters) -#define GET_GetMaterialiv(disp) GET_by_offset(disp, _gloffset_GetMaterialiv) -#define SET_GetMaterialiv(disp, fn) SET_by_offset(disp, _gloffset_GetMaterialiv, fn) -#define CALL_GetPixelMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetPixelMapfv, parameters) -#define GET_GetPixelMapfv(disp) GET_by_offset(disp, _gloffset_GetPixelMapfv) -#define SET_GetPixelMapfv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapfv, fn) -#define CALL_GetPixelMapuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint *)), _gloffset_GetPixelMapuiv, parameters) -#define GET_GetPixelMapuiv(disp) GET_by_offset(disp, _gloffset_GetPixelMapuiv) -#define SET_GetPixelMapuiv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapuiv, fn) -#define CALL_GetPixelMapusv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLushort *)), _gloffset_GetPixelMapusv, parameters) -#define GET_GetPixelMapusv(disp) GET_by_offset(disp, _gloffset_GetPixelMapusv) -#define SET_GetPixelMapusv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapusv, fn) -#define CALL_GetPolygonStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte *)), _gloffset_GetPolygonStipple, parameters) -#define GET_GetPolygonStipple(disp) GET_by_offset(disp, _gloffset_GetPolygonStipple) -#define SET_GetPolygonStipple(disp, fn) SET_by_offset(disp, _gloffset_GetPolygonStipple, fn) -#define CALL_GetString(disp, parameters) CALL_by_offset(disp, (const GLubyte * (GLAPIENTRYP)(GLenum)), _gloffset_GetString, parameters) -#define GET_GetString(disp) GET_by_offset(disp, _gloffset_GetString) -#define SET_GetString(disp, fn) SET_by_offset(disp, _gloffset_GetString, fn) -#define CALL_GetTexEnvfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexEnvfv, parameters) -#define GET_GetTexEnvfv(disp) GET_by_offset(disp, _gloffset_GetTexEnvfv) -#define SET_GetTexEnvfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexEnvfv, fn) -#define CALL_GetTexEnviv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexEnviv, parameters) -#define GET_GetTexEnviv(disp) GET_by_offset(disp, _gloffset_GetTexEnviv) -#define SET_GetTexEnviv(disp, fn) SET_by_offset(disp, _gloffset_GetTexEnviv, fn) -#define CALL_GetTexGendv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble *)), _gloffset_GetTexGendv, parameters) -#define GET_GetTexGendv(disp) GET_by_offset(disp, _gloffset_GetTexGendv) -#define SET_GetTexGendv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGendv, fn) -#define CALL_GetTexGenfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexGenfv, parameters) -#define GET_GetTexGenfv(disp) GET_by_offset(disp, _gloffset_GetTexGenfv) -#define SET_GetTexGenfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGenfv, fn) -#define CALL_GetTexGeniv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexGeniv, parameters) -#define GET_GetTexGeniv(disp) GET_by_offset(disp, _gloffset_GetTexGeniv) -#define SET_GetTexGeniv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGeniv, fn) -#define CALL_GetTexImage(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLenum, GLvoid *)), _gloffset_GetTexImage, parameters) -#define GET_GetTexImage(disp) GET_by_offset(disp, _gloffset_GetTexImage) -#define SET_GetTexImage(disp, fn) SET_by_offset(disp, _gloffset_GetTexImage, fn) -#define CALL_GetTexParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexParameterfv, parameters) -#define GET_GetTexParameterfv(disp) GET_by_offset(disp, _gloffset_GetTexParameterfv) -#define SET_GetTexParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterfv, fn) -#define CALL_GetTexParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexParameteriv, parameters) -#define GET_GetTexParameteriv(disp) GET_by_offset(disp, _gloffset_GetTexParameteriv) -#define SET_GetTexParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameteriv, fn) -#define CALL_GetTexLevelParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLfloat *)), _gloffset_GetTexLevelParameterfv, parameters) -#define GET_GetTexLevelParameterfv(disp) GET_by_offset(disp, _gloffset_GetTexLevelParameterfv) -#define SET_GetTexLevelParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexLevelParameterfv, fn) -#define CALL_GetTexLevelParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint *)), _gloffset_GetTexLevelParameteriv, parameters) -#define GET_GetTexLevelParameteriv(disp) GET_by_offset(disp, _gloffset_GetTexLevelParameteriv) -#define SET_GetTexLevelParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetTexLevelParameteriv, fn) -#define CALL_IsEnabled(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), _gloffset_IsEnabled, parameters) -#define GET_IsEnabled(disp) GET_by_offset(disp, _gloffset_IsEnabled) -#define SET_IsEnabled(disp, fn) SET_by_offset(disp, _gloffset_IsEnabled, fn) -#define CALL_IsList(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsList, parameters) -#define GET_IsList(disp) GET_by_offset(disp, _gloffset_IsList) -#define SET_IsList(disp, fn) SET_by_offset(disp, _gloffset_IsList, fn) -#define CALL_DepthRange(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), _gloffset_DepthRange, parameters) -#define GET_DepthRange(disp) GET_by_offset(disp, _gloffset_DepthRange) -#define SET_DepthRange(disp, fn) SET_by_offset(disp, _gloffset_DepthRange, fn) -#define CALL_Frustum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Frustum, parameters) -#define GET_Frustum(disp) GET_by_offset(disp, _gloffset_Frustum) -#define SET_Frustum(disp, fn) SET_by_offset(disp, _gloffset_Frustum, fn) -#define CALL_LoadIdentity(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_LoadIdentity, parameters) -#define GET_LoadIdentity(disp) GET_by_offset(disp, _gloffset_LoadIdentity) -#define SET_LoadIdentity(disp, fn) SET_by_offset(disp, _gloffset_LoadIdentity, fn) -#define CALL_LoadMatrixf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_LoadMatrixf, parameters) -#define GET_LoadMatrixf(disp) GET_by_offset(disp, _gloffset_LoadMatrixf) -#define SET_LoadMatrixf(disp, fn) SET_by_offset(disp, _gloffset_LoadMatrixf, fn) -#define CALL_LoadMatrixd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_LoadMatrixd, parameters) -#define GET_LoadMatrixd(disp) GET_by_offset(disp, _gloffset_LoadMatrixd) -#define SET_LoadMatrixd(disp, fn) SET_by_offset(disp, _gloffset_LoadMatrixd, fn) -#define CALL_MatrixMode(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_MatrixMode, parameters) -#define GET_MatrixMode(disp) GET_by_offset(disp, _gloffset_MatrixMode) -#define SET_MatrixMode(disp, fn) SET_by_offset(disp, _gloffset_MatrixMode, fn) -#define CALL_MultMatrixf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_MultMatrixf, parameters) -#define GET_MultMatrixf(disp) GET_by_offset(disp, _gloffset_MultMatrixf) -#define SET_MultMatrixf(disp, fn) SET_by_offset(disp, _gloffset_MultMatrixf, fn) -#define CALL_MultMatrixd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_MultMatrixd, parameters) -#define GET_MultMatrixd(disp) GET_by_offset(disp, _gloffset_MultMatrixd) -#define SET_MultMatrixd(disp, fn) SET_by_offset(disp, _gloffset_MultMatrixd, fn) -#define CALL_Ortho(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Ortho, parameters) -#define GET_Ortho(disp) GET_by_offset(disp, _gloffset_Ortho) -#define SET_Ortho(disp, fn) SET_by_offset(disp, _gloffset_Ortho, fn) -#define CALL_PopMatrix(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopMatrix, parameters) -#define GET_PopMatrix(disp) GET_by_offset(disp, _gloffset_PopMatrix) -#define SET_PopMatrix(disp, fn) SET_by_offset(disp, _gloffset_PopMatrix, fn) -#define CALL_PushMatrix(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PushMatrix, parameters) -#define GET_PushMatrix(disp) GET_by_offset(disp, _gloffset_PushMatrix) -#define SET_PushMatrix(disp, fn) SET_by_offset(disp, _gloffset_PushMatrix, fn) -#define CALL_Rotated(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Rotated, parameters) -#define GET_Rotated(disp) GET_by_offset(disp, _gloffset_Rotated) -#define SET_Rotated(disp, fn) SET_by_offset(disp, _gloffset_Rotated, fn) -#define CALL_Rotatef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Rotatef, parameters) -#define GET_Rotatef(disp) GET_by_offset(disp, _gloffset_Rotatef) -#define SET_Rotatef(disp, fn) SET_by_offset(disp, _gloffset_Rotatef, fn) -#define CALL_Scaled(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Scaled, parameters) -#define GET_Scaled(disp) GET_by_offset(disp, _gloffset_Scaled) -#define SET_Scaled(disp, fn) SET_by_offset(disp, _gloffset_Scaled, fn) -#define CALL_Scalef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Scalef, parameters) -#define GET_Scalef(disp) GET_by_offset(disp, _gloffset_Scalef) -#define SET_Scalef(disp, fn) SET_by_offset(disp, _gloffset_Scalef, fn) -#define CALL_Translated(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Translated, parameters) -#define GET_Translated(disp) GET_by_offset(disp, _gloffset_Translated) -#define SET_Translated(disp, fn) SET_by_offset(disp, _gloffset_Translated, fn) -#define CALL_Translatef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Translatef, parameters) -#define GET_Translatef(disp) GET_by_offset(disp, _gloffset_Translatef) -#define SET_Translatef(disp, fn) SET_by_offset(disp, _gloffset_Translatef, fn) -#define CALL_Viewport(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei)), _gloffset_Viewport, parameters) -#define GET_Viewport(disp) GET_by_offset(disp, _gloffset_Viewport) -#define SET_Viewport(disp, fn) SET_by_offset(disp, _gloffset_Viewport, fn) -#define CALL_ArrayElement(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_ArrayElement, parameters) -#define GET_ArrayElement(disp) GET_by_offset(disp, _gloffset_ArrayElement) -#define SET_ArrayElement(disp, fn) SET_by_offset(disp, _gloffset_ArrayElement, fn) -#define CALL_BindTexture(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindTexture, parameters) -#define GET_BindTexture(disp) GET_by_offset(disp, _gloffset_BindTexture) -#define SET_BindTexture(disp, fn) SET_by_offset(disp, _gloffset_BindTexture, fn) -#define CALL_ColorPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_ColorPointer, parameters) -#define GET_ColorPointer(disp) GET_by_offset(disp, _gloffset_ColorPointer) -#define SET_ColorPointer(disp, fn) SET_by_offset(disp, _gloffset_ColorPointer, fn) -#define CALL_DisableClientState(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DisableClientState, parameters) -#define GET_DisableClientState(disp) GET_by_offset(disp, _gloffset_DisableClientState) -#define SET_DisableClientState(disp, fn) SET_by_offset(disp, _gloffset_DisableClientState, fn) -#define CALL_DrawArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei)), _gloffset_DrawArrays, parameters) -#define GET_DrawArrays(disp) GET_by_offset(disp, _gloffset_DrawArrays) -#define SET_DrawArrays(disp, fn) SET_by_offset(disp, _gloffset_DrawArrays, fn) -#define CALL_DrawElements(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *)), _gloffset_DrawElements, parameters) -#define GET_DrawElements(disp) GET_by_offset(disp, _gloffset_DrawElements) -#define SET_DrawElements(disp, fn) SET_by_offset(disp, _gloffset_DrawElements, fn) -#define CALL_EdgeFlagPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), _gloffset_EdgeFlagPointer, parameters) -#define GET_EdgeFlagPointer(disp) GET_by_offset(disp, _gloffset_EdgeFlagPointer) -#define SET_EdgeFlagPointer(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagPointer, fn) -#define CALL_EnableClientState(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_EnableClientState, parameters) -#define GET_EnableClientState(disp) GET_by_offset(disp, _gloffset_EnableClientState) -#define SET_EnableClientState(disp, fn) SET_by_offset(disp, _gloffset_EnableClientState, fn) -#define CALL_IndexPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_IndexPointer, parameters) -#define GET_IndexPointer(disp) GET_by_offset(disp, _gloffset_IndexPointer) -#define SET_IndexPointer(disp, fn) SET_by_offset(disp, _gloffset_IndexPointer, fn) -#define CALL_Indexub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte)), _gloffset_Indexub, parameters) -#define GET_Indexub(disp) GET_by_offset(disp, _gloffset_Indexub) -#define SET_Indexub(disp, fn) SET_by_offset(disp, _gloffset_Indexub, fn) -#define CALL_Indexubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Indexubv, parameters) -#define GET_Indexubv(disp) GET_by_offset(disp, _gloffset_Indexubv) -#define SET_Indexubv(disp, fn) SET_by_offset(disp, _gloffset_Indexubv, fn) -#define CALL_InterleavedArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_InterleavedArrays, parameters) -#define GET_InterleavedArrays(disp) GET_by_offset(disp, _gloffset_InterleavedArrays) -#define SET_InterleavedArrays(disp, fn) SET_by_offset(disp, _gloffset_InterleavedArrays, fn) -#define CALL_NormalPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_NormalPointer, parameters) -#define GET_NormalPointer(disp) GET_by_offset(disp, _gloffset_NormalPointer) -#define SET_NormalPointer(disp, fn) SET_by_offset(disp, _gloffset_NormalPointer, fn) -#define CALL_PolygonOffset(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PolygonOffset, parameters) -#define GET_PolygonOffset(disp) GET_by_offset(disp, _gloffset_PolygonOffset) -#define SET_PolygonOffset(disp, fn) SET_by_offset(disp, _gloffset_PolygonOffset, fn) -#define CALL_TexCoordPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_TexCoordPointer, parameters) -#define GET_TexCoordPointer(disp) GET_by_offset(disp, _gloffset_TexCoordPointer) -#define SET_TexCoordPointer(disp, fn) SET_by_offset(disp, _gloffset_TexCoordPointer, fn) -#define CALL_VertexPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexPointer, parameters) -#define GET_VertexPointer(disp) GET_by_offset(disp, _gloffset_VertexPointer) -#define SET_VertexPointer(disp, fn) SET_by_offset(disp, _gloffset_VertexPointer, fn) -#define CALL_AreTexturesResident(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), _gloffset_AreTexturesResident, parameters) -#define GET_AreTexturesResident(disp) GET_by_offset(disp, _gloffset_AreTexturesResident) -#define SET_AreTexturesResident(disp, fn) SET_by_offset(disp, _gloffset_AreTexturesResident, fn) -#define CALL_CopyTexImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint)), _gloffset_CopyTexImage1D, parameters) -#define GET_CopyTexImage1D(disp) GET_by_offset(disp, _gloffset_CopyTexImage1D) -#define SET_CopyTexImage1D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexImage1D, fn) -#define CALL_CopyTexImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)), _gloffset_CopyTexImage2D, parameters) -#define GET_CopyTexImage2D(disp) GET_by_offset(disp, _gloffset_CopyTexImage2D) -#define SET_CopyTexImage2D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexImage2D, fn) -#define CALL_CopyTexSubImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei)), _gloffset_CopyTexSubImage1D, parameters) -#define GET_CopyTexSubImage1D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage1D) -#define SET_CopyTexSubImage1D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage1D, fn) -#define CALL_CopyTexSubImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyTexSubImage2D, parameters) -#define GET_CopyTexSubImage2D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage2D) -#define SET_CopyTexSubImage2D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage2D, fn) -#define CALL_DeleteTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteTextures, parameters) -#define GET_DeleteTextures(disp) GET_by_offset(disp, _gloffset_DeleteTextures) -#define SET_DeleteTextures(disp, fn) SET_by_offset(disp, _gloffset_DeleteTextures, fn) -#define CALL_GenTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenTextures, parameters) -#define GET_GenTextures(disp) GET_by_offset(disp, _gloffset_GenTextures) -#define SET_GenTextures(disp, fn) SET_by_offset(disp, _gloffset_GenTextures, fn) -#define CALL_GetPointerv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid **)), _gloffset_GetPointerv, parameters) -#define GET_GetPointerv(disp) GET_by_offset(disp, _gloffset_GetPointerv) -#define SET_GetPointerv(disp, fn) SET_by_offset(disp, _gloffset_GetPointerv, fn) -#define CALL_IsTexture(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsTexture, parameters) -#define GET_IsTexture(disp) GET_by_offset(disp, _gloffset_IsTexture) -#define SET_IsTexture(disp, fn) SET_by_offset(disp, _gloffset_IsTexture, fn) -#define CALL_PrioritizeTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *, const GLclampf *)), _gloffset_PrioritizeTextures, parameters) -#define GET_PrioritizeTextures(disp) GET_by_offset(disp, _gloffset_PrioritizeTextures) -#define SET_PrioritizeTextures(disp, fn) SET_by_offset(disp, _gloffset_PrioritizeTextures, fn) -#define CALL_TexSubImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage1D, parameters) -#define GET_TexSubImage1D(disp) GET_by_offset(disp, _gloffset_TexSubImage1D) -#define SET_TexSubImage1D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage1D, fn) -#define CALL_TexSubImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage2D, parameters) -#define GET_TexSubImage2D(disp) GET_by_offset(disp, _gloffset_TexSubImage2D) -#define SET_TexSubImage2D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage2D, fn) -#define CALL_PopClientAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopClientAttrib, parameters) -#define GET_PopClientAttrib(disp) GET_by_offset(disp, _gloffset_PopClientAttrib) -#define SET_PopClientAttrib(disp, fn) SET_by_offset(disp, _gloffset_PopClientAttrib, fn) -#define CALL_PushClientAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_PushClientAttrib, parameters) -#define GET_PushClientAttrib(disp) GET_by_offset(disp, _gloffset_PushClientAttrib) -#define SET_PushClientAttrib(disp, fn) SET_by_offset(disp, _gloffset_PushClientAttrib, fn) -#define CALL_BlendColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf, GLclampf, GLclampf)), _gloffset_BlendColor, parameters) -#define GET_BlendColor(disp) GET_by_offset(disp, _gloffset_BlendColor) -#define SET_BlendColor(disp, fn) SET_by_offset(disp, _gloffset_BlendColor, fn) -#define CALL_BlendEquation(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_BlendEquation, parameters) -#define GET_BlendEquation(disp) GET_by_offset(disp, _gloffset_BlendEquation) -#define SET_BlendEquation(disp, fn) SET_by_offset(disp, _gloffset_BlendEquation, fn) -#define CALL_DrawRangeElements(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *)), _gloffset_DrawRangeElements, parameters) -#define GET_DrawRangeElements(disp) GET_by_offset(disp, _gloffset_DrawRangeElements) -#define SET_DrawRangeElements(disp, fn) SET_by_offset(disp, _gloffset_DrawRangeElements, fn) -#define CALL_ColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ColorTable, parameters) -#define GET_ColorTable(disp) GET_by_offset(disp, _gloffset_ColorTable) -#define SET_ColorTable(disp, fn) SET_by_offset(disp, _gloffset_ColorTable, fn) -#define CALL_ColorTableParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_ColorTableParameterfv, parameters) -#define GET_ColorTableParameterfv(disp) GET_by_offset(disp, _gloffset_ColorTableParameterfv) -#define SET_ColorTableParameterfv(disp, fn) SET_by_offset(disp, _gloffset_ColorTableParameterfv, fn) -#define CALL_ColorTableParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_ColorTableParameteriv, parameters) -#define GET_ColorTableParameteriv(disp) GET_by_offset(disp, _gloffset_ColorTableParameteriv) -#define SET_ColorTableParameteriv(disp, fn) SET_by_offset(disp, _gloffset_ColorTableParameteriv, fn) -#define CALL_CopyColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei)), _gloffset_CopyColorTable, parameters) -#define GET_CopyColorTable(disp) GET_by_offset(disp, _gloffset_CopyColorTable) -#define SET_CopyColorTable(disp, fn) SET_by_offset(disp, _gloffset_CopyColorTable, fn) -#define CALL_GetColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *)), _gloffset_GetColorTable, parameters) -#define GET_GetColorTable(disp) GET_by_offset(disp, _gloffset_GetColorTable) -#define SET_GetColorTable(disp, fn) SET_by_offset(disp, _gloffset_GetColorTable, fn) -#define CALL_GetColorTableParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetColorTableParameterfv, parameters) -#define GET_GetColorTableParameterfv(disp) GET_by_offset(disp, _gloffset_GetColorTableParameterfv) -#define SET_GetColorTableParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetColorTableParameterfv, fn) -#define CALL_GetColorTableParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetColorTableParameteriv, parameters) -#define GET_GetColorTableParameteriv(disp) GET_by_offset(disp, _gloffset_GetColorTableParameteriv) -#define SET_GetColorTableParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetColorTableParameteriv, fn) -#define CALL_ColorSubTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ColorSubTable, parameters) -#define GET_ColorSubTable(disp) GET_by_offset(disp, _gloffset_ColorSubTable) -#define SET_ColorSubTable(disp, fn) SET_by_offset(disp, _gloffset_ColorSubTable, fn) -#define CALL_CopyColorSubTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLint, GLint, GLsizei)), _gloffset_CopyColorSubTable, parameters) -#define GET_CopyColorSubTable(disp) GET_by_offset(disp, _gloffset_CopyColorSubTable) -#define SET_CopyColorSubTable(disp, fn) SET_by_offset(disp, _gloffset_CopyColorSubTable, fn) -#define CALL_ConvolutionFilter1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ConvolutionFilter1D, parameters) -#define GET_ConvolutionFilter1D(disp) GET_by_offset(disp, _gloffset_ConvolutionFilter1D) -#define SET_ConvolutionFilter1D(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionFilter1D, fn) -#define CALL_ConvolutionFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ConvolutionFilter2D, parameters) -#define GET_ConvolutionFilter2D(disp) GET_by_offset(disp, _gloffset_ConvolutionFilter2D) -#define SET_ConvolutionFilter2D(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionFilter2D, fn) -#define CALL_ConvolutionParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_ConvolutionParameterf, parameters) -#define GET_ConvolutionParameterf(disp) GET_by_offset(disp, _gloffset_ConvolutionParameterf) -#define SET_ConvolutionParameterf(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameterf, fn) -#define CALL_ConvolutionParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_ConvolutionParameterfv, parameters) -#define GET_ConvolutionParameterfv(disp) GET_by_offset(disp, _gloffset_ConvolutionParameterfv) -#define SET_ConvolutionParameterfv(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameterfv, fn) -#define CALL_ConvolutionParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_ConvolutionParameteri, parameters) -#define GET_ConvolutionParameteri(disp) GET_by_offset(disp, _gloffset_ConvolutionParameteri) -#define SET_ConvolutionParameteri(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameteri, fn) -#define CALL_ConvolutionParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_ConvolutionParameteriv, parameters) -#define GET_ConvolutionParameteriv(disp) GET_by_offset(disp, _gloffset_ConvolutionParameteriv) -#define SET_ConvolutionParameteriv(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameteriv, fn) -#define CALL_CopyConvolutionFilter1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei)), _gloffset_CopyConvolutionFilter1D, parameters) -#define GET_CopyConvolutionFilter1D(disp) GET_by_offset(disp, _gloffset_CopyConvolutionFilter1D) -#define SET_CopyConvolutionFilter1D(disp, fn) SET_by_offset(disp, _gloffset_CopyConvolutionFilter1D, fn) -#define CALL_CopyConvolutionFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyConvolutionFilter2D, parameters) -#define GET_CopyConvolutionFilter2D(disp) GET_by_offset(disp, _gloffset_CopyConvolutionFilter2D) -#define SET_CopyConvolutionFilter2D(disp, fn) SET_by_offset(disp, _gloffset_CopyConvolutionFilter2D, fn) -#define CALL_GetConvolutionFilter(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *)), _gloffset_GetConvolutionFilter, parameters) -#define GET_GetConvolutionFilter(disp) GET_by_offset(disp, _gloffset_GetConvolutionFilter) -#define SET_GetConvolutionFilter(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionFilter, fn) -#define CALL_GetConvolutionParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetConvolutionParameterfv, parameters) -#define GET_GetConvolutionParameterfv(disp) GET_by_offset(disp, _gloffset_GetConvolutionParameterfv) -#define SET_GetConvolutionParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionParameterfv, fn) -#define CALL_GetConvolutionParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetConvolutionParameteriv, parameters) -#define GET_GetConvolutionParameteriv(disp) GET_by_offset(disp, _gloffset_GetConvolutionParameteriv) -#define SET_GetConvolutionParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionParameteriv, fn) -#define CALL_GetSeparableFilter(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *)), _gloffset_GetSeparableFilter, parameters) -#define GET_GetSeparableFilter(disp) GET_by_offset(disp, _gloffset_GetSeparableFilter) -#define SET_GetSeparableFilter(disp, fn) SET_by_offset(disp, _gloffset_GetSeparableFilter, fn) -#define CALL_SeparableFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *)), _gloffset_SeparableFilter2D, parameters) -#define GET_SeparableFilter2D(disp) GET_by_offset(disp, _gloffset_SeparableFilter2D) -#define SET_SeparableFilter2D(disp, fn) SET_by_offset(disp, _gloffset_SeparableFilter2D, fn) -#define CALL_GetHistogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)), _gloffset_GetHistogram, parameters) -#define GET_GetHistogram(disp) GET_by_offset(disp, _gloffset_GetHistogram) -#define SET_GetHistogram(disp, fn) SET_by_offset(disp, _gloffset_GetHistogram, fn) -#define CALL_GetHistogramParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetHistogramParameterfv, parameters) -#define GET_GetHistogramParameterfv(disp) GET_by_offset(disp, _gloffset_GetHistogramParameterfv) -#define SET_GetHistogramParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetHistogramParameterfv, fn) -#define CALL_GetHistogramParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetHistogramParameteriv, parameters) -#define GET_GetHistogramParameteriv(disp) GET_by_offset(disp, _gloffset_GetHistogramParameteriv) -#define SET_GetHistogramParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetHistogramParameteriv, fn) -#define CALL_GetMinmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)), _gloffset_GetMinmax, parameters) -#define GET_GetMinmax(disp) GET_by_offset(disp, _gloffset_GetMinmax) -#define SET_GetMinmax(disp, fn) SET_by_offset(disp, _gloffset_GetMinmax, fn) -#define CALL_GetMinmaxParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMinmaxParameterfv, parameters) -#define GET_GetMinmaxParameterfv(disp) GET_by_offset(disp, _gloffset_GetMinmaxParameterfv) -#define SET_GetMinmaxParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetMinmaxParameterfv, fn) -#define CALL_GetMinmaxParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMinmaxParameteriv, parameters) -#define GET_GetMinmaxParameteriv(disp) GET_by_offset(disp, _gloffset_GetMinmaxParameteriv) -#define SET_GetMinmaxParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetMinmaxParameteriv, fn) -#define CALL_Histogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, GLboolean)), _gloffset_Histogram, parameters) -#define GET_Histogram(disp) GET_by_offset(disp, _gloffset_Histogram) -#define SET_Histogram(disp, fn) SET_by_offset(disp, _gloffset_Histogram, fn) -#define CALL_Minmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLboolean)), _gloffset_Minmax, parameters) -#define GET_Minmax(disp) GET_by_offset(disp, _gloffset_Minmax) -#define SET_Minmax(disp, fn) SET_by_offset(disp, _gloffset_Minmax, fn) -#define CALL_ResetHistogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ResetHistogram, parameters) -#define GET_ResetHistogram(disp) GET_by_offset(disp, _gloffset_ResetHistogram) -#define SET_ResetHistogram(disp, fn) SET_by_offset(disp, _gloffset_ResetHistogram, fn) -#define CALL_ResetMinmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ResetMinmax, parameters) -#define GET_ResetMinmax(disp) GET_by_offset(disp, _gloffset_ResetMinmax) -#define SET_ResetMinmax(disp, fn) SET_by_offset(disp, _gloffset_ResetMinmax, fn) -#define CALL_TexImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage3D, parameters) -#define GET_TexImage3D(disp) GET_by_offset(disp, _gloffset_TexImage3D) -#define SET_TexImage3D(disp, fn) SET_by_offset(disp, _gloffset_TexImage3D, fn) -#define CALL_TexSubImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage3D, parameters) -#define GET_TexSubImage3D(disp) GET_by_offset(disp, _gloffset_TexSubImage3D) -#define SET_TexSubImage3D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage3D, fn) -#define CALL_CopyTexSubImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyTexSubImage3D, parameters) -#define GET_CopyTexSubImage3D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage3D) -#define SET_CopyTexSubImage3D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage3D, fn) -#define CALL_ActiveTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ActiveTextureARB, parameters) -#define GET_ActiveTextureARB(disp) GET_by_offset(disp, _gloffset_ActiveTextureARB) -#define SET_ActiveTextureARB(disp, fn) SET_by_offset(disp, _gloffset_ActiveTextureARB, fn) -#define CALL_ClientActiveTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ClientActiveTextureARB, parameters) -#define GET_ClientActiveTextureARB(disp) GET_by_offset(disp, _gloffset_ClientActiveTextureARB) -#define SET_ClientActiveTextureARB(disp, fn) SET_by_offset(disp, _gloffset_ClientActiveTextureARB, fn) -#define CALL_MultiTexCoord1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble)), _gloffset_MultiTexCoord1dARB, parameters) -#define GET_MultiTexCoord1dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1dARB) -#define SET_MultiTexCoord1dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1dARB, fn) -#define CALL_MultiTexCoord1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord1dvARB, parameters) -#define GET_MultiTexCoord1dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1dvARB) -#define SET_MultiTexCoord1dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1dvARB, fn) -#define CALL_MultiTexCoord1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_MultiTexCoord1fARB, parameters) -#define GET_MultiTexCoord1fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1fARB) -#define SET_MultiTexCoord1fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1fARB, fn) -#define CALL_MultiTexCoord1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord1fvARB, parameters) -#define GET_MultiTexCoord1fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1fvARB) -#define SET_MultiTexCoord1fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1fvARB, fn) -#define CALL_MultiTexCoord1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_MultiTexCoord1iARB, parameters) -#define GET_MultiTexCoord1iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1iARB) -#define SET_MultiTexCoord1iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1iARB, fn) -#define CALL_MultiTexCoord1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord1ivARB, parameters) -#define GET_MultiTexCoord1ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1ivARB) -#define SET_MultiTexCoord1ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1ivARB, fn) -#define CALL_MultiTexCoord1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort)), _gloffset_MultiTexCoord1sARB, parameters) -#define GET_MultiTexCoord1sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1sARB) -#define SET_MultiTexCoord1sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1sARB, fn) -#define CALL_MultiTexCoord1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord1svARB, parameters) -#define GET_MultiTexCoord1svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1svARB) -#define SET_MultiTexCoord1svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1svARB, fn) -#define CALL_MultiTexCoord2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble)), _gloffset_MultiTexCoord2dARB, parameters) -#define GET_MultiTexCoord2dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2dARB) -#define SET_MultiTexCoord2dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2dARB, fn) -#define CALL_MultiTexCoord2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord2dvARB, parameters) -#define GET_MultiTexCoord2dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2dvARB) -#define SET_MultiTexCoord2dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2dvARB, fn) -#define CALL_MultiTexCoord2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat)), _gloffset_MultiTexCoord2fARB, parameters) -#define GET_MultiTexCoord2fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2fARB) -#define SET_MultiTexCoord2fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2fARB, fn) -#define CALL_MultiTexCoord2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord2fvARB, parameters) -#define GET_MultiTexCoord2fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2fvARB) -#define SET_MultiTexCoord2fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2fvARB, fn) -#define CALL_MultiTexCoord2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint)), _gloffset_MultiTexCoord2iARB, parameters) -#define GET_MultiTexCoord2iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2iARB) -#define SET_MultiTexCoord2iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2iARB, fn) -#define CALL_MultiTexCoord2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord2ivARB, parameters) -#define GET_MultiTexCoord2ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2ivARB) -#define SET_MultiTexCoord2ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2ivARB, fn) -#define CALL_MultiTexCoord2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort)), _gloffset_MultiTexCoord2sARB, parameters) -#define GET_MultiTexCoord2sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2sARB) -#define SET_MultiTexCoord2sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2sARB, fn) -#define CALL_MultiTexCoord2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord2svARB, parameters) -#define GET_MultiTexCoord2svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2svARB) -#define SET_MultiTexCoord2svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2svARB, fn) -#define CALL_MultiTexCoord3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLdouble)), _gloffset_MultiTexCoord3dARB, parameters) -#define GET_MultiTexCoord3dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3dARB) -#define SET_MultiTexCoord3dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3dARB, fn) -#define CALL_MultiTexCoord3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord3dvARB, parameters) -#define GET_MultiTexCoord3dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3dvARB) -#define SET_MultiTexCoord3dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3dvARB, fn) -#define CALL_MultiTexCoord3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLfloat)), _gloffset_MultiTexCoord3fARB, parameters) -#define GET_MultiTexCoord3fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3fARB) -#define SET_MultiTexCoord3fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3fARB, fn) -#define CALL_MultiTexCoord3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord3fvARB, parameters) -#define GET_MultiTexCoord3fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3fvARB) -#define SET_MultiTexCoord3fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3fvARB, fn) -#define CALL_MultiTexCoord3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint)), _gloffset_MultiTexCoord3iARB, parameters) -#define GET_MultiTexCoord3iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3iARB) -#define SET_MultiTexCoord3iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3iARB, fn) -#define CALL_MultiTexCoord3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord3ivARB, parameters) -#define GET_MultiTexCoord3ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3ivARB) -#define SET_MultiTexCoord3ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3ivARB, fn) -#define CALL_MultiTexCoord3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort, GLshort)), _gloffset_MultiTexCoord3sARB, parameters) -#define GET_MultiTexCoord3sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3sARB) -#define SET_MultiTexCoord3sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3sARB, fn) -#define CALL_MultiTexCoord3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord3svARB, parameters) -#define GET_MultiTexCoord3svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3svARB) -#define SET_MultiTexCoord3svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3svARB, fn) -#define CALL_MultiTexCoord4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_MultiTexCoord4dARB, parameters) -#define GET_MultiTexCoord4dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4dARB) -#define SET_MultiTexCoord4dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4dARB, fn) -#define CALL_MultiTexCoord4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord4dvARB, parameters) -#define GET_MultiTexCoord4dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4dvARB) -#define SET_MultiTexCoord4dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4dvARB, fn) -#define CALL_MultiTexCoord4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_MultiTexCoord4fARB, parameters) -#define GET_MultiTexCoord4fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4fARB) -#define SET_MultiTexCoord4fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4fARB, fn) -#define CALL_MultiTexCoord4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord4fvARB, parameters) -#define GET_MultiTexCoord4fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4fvARB) -#define SET_MultiTexCoord4fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4fvARB, fn) -#define CALL_MultiTexCoord4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint)), _gloffset_MultiTexCoord4iARB, parameters) -#define GET_MultiTexCoord4iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4iARB) -#define SET_MultiTexCoord4iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4iARB, fn) -#define CALL_MultiTexCoord4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord4ivARB, parameters) -#define GET_MultiTexCoord4ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4ivARB) -#define SET_MultiTexCoord4ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4ivARB, fn) -#define CALL_MultiTexCoord4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort, GLshort, GLshort)), _gloffset_MultiTexCoord4sARB, parameters) -#define GET_MultiTexCoord4sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4sARB) -#define SET_MultiTexCoord4sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4sARB, fn) -#define CALL_MultiTexCoord4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord4svARB, parameters) -#define GET_MultiTexCoord4svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4svARB) -#define SET_MultiTexCoord4svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4svARB, fn) -#define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_AttachShader, parameters) -#define GET_AttachShader(disp) GET_by_offset(disp, _gloffset_AttachShader) -#define SET_AttachShader(disp, fn) SET_by_offset(disp, _gloffset_AttachShader, fn) -#define CALL_CreateProgram(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(void)), _gloffset_CreateProgram, parameters) -#define GET_CreateProgram(disp) GET_by_offset(disp, _gloffset_CreateProgram) -#define SET_CreateProgram(disp, fn) SET_by_offset(disp, _gloffset_CreateProgram, fn) -#define CALL_CreateShader(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum)), _gloffset_CreateShader, parameters) -#define GET_CreateShader(disp) GET_by_offset(disp, _gloffset_CreateShader) -#define SET_CreateShader(disp, fn) SET_by_offset(disp, _gloffset_CreateShader, fn) -#define CALL_DeleteProgram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteProgram, parameters) -#define GET_DeleteProgram(disp) GET_by_offset(disp, _gloffset_DeleteProgram) -#define SET_DeleteProgram(disp, fn) SET_by_offset(disp, _gloffset_DeleteProgram, fn) -#define CALL_DeleteShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteShader, parameters) -#define GET_DeleteShader(disp) GET_by_offset(disp, _gloffset_DeleteShader) -#define SET_DeleteShader(disp, fn) SET_by_offset(disp, _gloffset_DeleteShader, fn) -#define CALL_DetachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_DetachShader, parameters) -#define GET_DetachShader(disp) GET_by_offset(disp, _gloffset_DetachShader) -#define SET_DetachShader(disp, fn) SET_by_offset(disp, _gloffset_DetachShader, fn) -#define CALL_GetAttachedShaders(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLuint *)), _gloffset_GetAttachedShaders, parameters) -#define GET_GetAttachedShaders(disp) GET_by_offset(disp, _gloffset_GetAttachedShaders) -#define SET_GetAttachedShaders(disp, fn) SET_by_offset(disp, _gloffset_GetAttachedShaders, fn) -#define CALL_GetProgramInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), _gloffset_GetProgramInfoLog, parameters) -#define GET_GetProgramInfoLog(disp) GET_by_offset(disp, _gloffset_GetProgramInfoLog) -#define SET_GetProgramInfoLog(disp, fn) SET_by_offset(disp, _gloffset_GetProgramInfoLog, fn) -#define CALL_GetProgramiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetProgramiv, parameters) -#define GET_GetProgramiv(disp) GET_by_offset(disp, _gloffset_GetProgramiv) -#define SET_GetProgramiv(disp, fn) SET_by_offset(disp, _gloffset_GetProgramiv, fn) -#define CALL_GetShaderInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), _gloffset_GetShaderInfoLog, parameters) -#define GET_GetShaderInfoLog(disp) GET_by_offset(disp, _gloffset_GetShaderInfoLog) -#define SET_GetShaderInfoLog(disp, fn) SET_by_offset(disp, _gloffset_GetShaderInfoLog, fn) -#define CALL_GetShaderiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetShaderiv, parameters) -#define GET_GetShaderiv(disp) GET_by_offset(disp, _gloffset_GetShaderiv) -#define SET_GetShaderiv(disp, fn) SET_by_offset(disp, _gloffset_GetShaderiv, fn) -#define CALL_IsProgram(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsProgram, parameters) -#define GET_IsProgram(disp) GET_by_offset(disp, _gloffset_IsProgram) -#define SET_IsProgram(disp, fn) SET_by_offset(disp, _gloffset_IsProgram, fn) -#define CALL_IsShader(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsShader, parameters) -#define GET_IsShader(disp) GET_by_offset(disp, _gloffset_IsShader) -#define SET_IsShader(disp, fn) SET_by_offset(disp, _gloffset_IsShader, fn) -#define CALL_StencilFuncSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), _gloffset_StencilFuncSeparate, parameters) -#define GET_StencilFuncSeparate(disp) GET_by_offset(disp, _gloffset_StencilFuncSeparate) -#define SET_StencilFuncSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilFuncSeparate, fn) -#define CALL_StencilMaskSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_StencilMaskSeparate, parameters) -#define GET_StencilMaskSeparate(disp) GET_by_offset(disp, _gloffset_StencilMaskSeparate) -#define SET_StencilMaskSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilMaskSeparate, fn) -#define CALL_StencilOpSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_StencilOpSeparate, parameters) -#define GET_StencilOpSeparate(disp) GET_by_offset(disp, _gloffset_StencilOpSeparate) -#define SET_StencilOpSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilOpSeparate, fn) -#define CALL_UniformMatrix2x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2x3fv, parameters) -#define GET_UniformMatrix2x3fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix2x3fv) -#define SET_UniformMatrix2x3fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2x3fv, fn) -#define CALL_UniformMatrix2x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2x4fv, parameters) -#define GET_UniformMatrix2x4fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix2x4fv) -#define SET_UniformMatrix2x4fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2x4fv, fn) -#define CALL_UniformMatrix3x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3x2fv, parameters) -#define GET_UniformMatrix3x2fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix3x2fv) -#define SET_UniformMatrix3x2fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3x2fv, fn) -#define CALL_UniformMatrix3x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3x4fv, parameters) -#define GET_UniformMatrix3x4fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix3x4fv) -#define SET_UniformMatrix3x4fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3x4fv, fn) -#define CALL_UniformMatrix4x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4x2fv, parameters) -#define GET_UniformMatrix4x2fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix4x2fv) -#define SET_UniformMatrix4x2fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4x2fv, fn) -#define CALL_UniformMatrix4x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4x3fv, parameters) -#define GET_UniformMatrix4x3fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix4x3fv) -#define SET_UniformMatrix4x3fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4x3fv, fn) -#define CALL_ClampColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ClampColor, parameters) -#define GET_ClampColor(disp) GET_by_offset(disp, _gloffset_ClampColor) -#define SET_ClampColor(disp, fn) SET_by_offset(disp, _gloffset_ClampColor, fn) -#define CALL_ClearBufferfi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLfloat, GLint)), _gloffset_ClearBufferfi, parameters) -#define GET_ClearBufferfi(disp) GET_by_offset(disp, _gloffset_ClearBufferfi) -#define SET_ClearBufferfi(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferfi, fn) -#define CALL_ClearBufferfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLfloat *)), _gloffset_ClearBufferfv, parameters) -#define GET_ClearBufferfv(disp) GET_by_offset(disp, _gloffset_ClearBufferfv) -#define SET_ClearBufferfv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferfv, fn) -#define CALL_ClearBufferiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLint *)), _gloffset_ClearBufferiv, parameters) -#define GET_ClearBufferiv(disp) GET_by_offset(disp, _gloffset_ClearBufferiv) -#define SET_ClearBufferiv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferiv, fn) -#define CALL_ClearBufferuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLuint *)), _gloffset_ClearBufferuiv, parameters) -#define GET_ClearBufferuiv(disp) GET_by_offset(disp, _gloffset_ClearBufferuiv) -#define SET_ClearBufferuiv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferuiv, fn) -#define CALL_GetStringi(disp, parameters) CALL_by_offset(disp, (const GLubyte * (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_GetStringi, parameters) -#define GET_GetStringi(disp) GET_by_offset(disp, _gloffset_GetStringi) -#define SET_GetStringi(disp, fn) SET_by_offset(disp, _gloffset_GetStringi, fn) -#define CALL_TexBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint)), _gloffset_TexBuffer, parameters) -#define GET_TexBuffer(disp) GET_by_offset(disp, _gloffset_TexBuffer) -#define SET_TexBuffer(disp, fn) SET_by_offset(disp, _gloffset_TexBuffer, fn) -#define CALL_FramebufferTexture(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture, parameters) -#define GET_FramebufferTexture(disp) GET_by_offset(disp, _gloffset_FramebufferTexture) -#define SET_FramebufferTexture(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture, fn) -#define CALL_GetBufferParameteri64v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint64 *)), _gloffset_GetBufferParameteri64v, parameters) -#define GET_GetBufferParameteri64v(disp) GET_by_offset(disp, _gloffset_GetBufferParameteri64v) -#define SET_GetBufferParameteri64v(disp, fn) SET_by_offset(disp, _gloffset_GetBufferParameteri64v, fn) -#define CALL_GetInteger64i_v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint64 *)), _gloffset_GetInteger64i_v, parameters) -#define GET_GetInteger64i_v(disp) GET_by_offset(disp, _gloffset_GetInteger64i_v) -#define SET_GetInteger64i_v(disp, fn) SET_by_offset(disp, _gloffset_GetInteger64i_v, fn) -#define CALL_VertexAttribDivisor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribDivisor, parameters) -#define GET_VertexAttribDivisor(disp) GET_by_offset(disp, _gloffset_VertexAttribDivisor) -#define SET_VertexAttribDivisor(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribDivisor, fn) -#define CALL_LoadTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_LoadTransposeMatrixdARB, parameters) -#define GET_LoadTransposeMatrixdARB(disp) GET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB) -#define SET_LoadTransposeMatrixdARB(disp, fn) SET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB, fn) -#define CALL_LoadTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_LoadTransposeMatrixfARB, parameters) -#define GET_LoadTransposeMatrixfARB(disp) GET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB) -#define SET_LoadTransposeMatrixfARB(disp, fn) SET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB, fn) -#define CALL_MultTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_MultTransposeMatrixdARB, parameters) -#define GET_MultTransposeMatrixdARB(disp) GET_by_offset(disp, _gloffset_MultTransposeMatrixdARB) -#define SET_MultTransposeMatrixdARB(disp, fn) SET_by_offset(disp, _gloffset_MultTransposeMatrixdARB, fn) -#define CALL_MultTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_MultTransposeMatrixfARB, parameters) -#define GET_MultTransposeMatrixfARB(disp) GET_by_offset(disp, _gloffset_MultTransposeMatrixfARB) -#define SET_MultTransposeMatrixfARB(disp, fn) SET_by_offset(disp, _gloffset_MultTransposeMatrixfARB, fn) -#define CALL_SampleCoverageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), _gloffset_SampleCoverageARB, parameters) -#define GET_SampleCoverageARB(disp) GET_by_offset(disp, _gloffset_SampleCoverageARB) -#define SET_SampleCoverageARB(disp, fn) SET_by_offset(disp, _gloffset_SampleCoverageARB, fn) -#define CALL_CompressedTexImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage1DARB, parameters) -#define GET_CompressedTexImage1DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage1DARB) -#define SET_CompressedTexImage1DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage1DARB, fn) -#define CALL_CompressedTexImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage2DARB, parameters) -#define GET_CompressedTexImage2DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage2DARB) -#define SET_CompressedTexImage2DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage2DARB, fn) -#define CALL_CompressedTexImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage3DARB, parameters) -#define GET_CompressedTexImage3DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage3DARB) -#define SET_CompressedTexImage3DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage3DARB, fn) -#define CALL_CompressedTexSubImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage1DARB, parameters) -#define GET_CompressedTexSubImage1DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB) -#define SET_CompressedTexSubImage1DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB, fn) -#define CALL_CompressedTexSubImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage2DARB, parameters) -#define GET_CompressedTexSubImage2DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB) -#define SET_CompressedTexSubImage2DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB, fn) -#define CALL_CompressedTexSubImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage3DARB, parameters) -#define GET_CompressedTexSubImage3DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB) -#define SET_CompressedTexSubImage3DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB, fn) -#define CALL_GetCompressedTexImageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLvoid *)), _gloffset_GetCompressedTexImageARB, parameters) -#define GET_GetCompressedTexImageARB(disp) GET_by_offset(disp, _gloffset_GetCompressedTexImageARB) -#define SET_GetCompressedTexImageARB(disp, fn) SET_by_offset(disp, _gloffset_GetCompressedTexImageARB, fn) -#define CALL_DisableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DisableVertexAttribArrayARB, parameters) -#define GET_DisableVertexAttribArrayARB(disp) GET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB) -#define SET_DisableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB, fn) -#define CALL_EnableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_EnableVertexAttribArrayARB, parameters) -#define GET_EnableVertexAttribArrayARB(disp) GET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB) -#define SET_EnableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB, fn) -#define CALL_GetProgramEnvParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), _gloffset_GetProgramEnvParameterdvARB, parameters) -#define GET_GetProgramEnvParameterdvARB(disp) GET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB) -#define SET_GetProgramEnvParameterdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB, fn) -#define CALL_GetProgramEnvParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), _gloffset_GetProgramEnvParameterfvARB, parameters) -#define GET_GetProgramEnvParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB) -#define SET_GetProgramEnvParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB, fn) -#define CALL_GetProgramLocalParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), _gloffset_GetProgramLocalParameterdvARB, parameters) -#define GET_GetProgramLocalParameterdvARB(disp) GET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB) -#define SET_GetProgramLocalParameterdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB, fn) -#define CALL_GetProgramLocalParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), _gloffset_GetProgramLocalParameterfvARB, parameters) -#define GET_GetProgramLocalParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB) -#define SET_GetProgramLocalParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB, fn) -#define CALL_GetProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid *)), _gloffset_GetProgramStringARB, parameters) -#define GET_GetProgramStringARB(disp) GET_by_offset(disp, _gloffset_GetProgramStringARB) -#define SET_GetProgramStringARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramStringARB, fn) -#define CALL_GetProgramivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetProgramivARB, parameters) -#define GET_GetProgramivARB(disp) GET_by_offset(disp, _gloffset_GetProgramivARB) -#define SET_GetProgramivARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramivARB, fn) -#define CALL_GetVertexAttribdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), _gloffset_GetVertexAttribdvARB, parameters) -#define GET_GetVertexAttribdvARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribdvARB) -#define SET_GetVertexAttribdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribdvARB, fn) -#define CALL_GetVertexAttribfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetVertexAttribfvARB, parameters) -#define GET_GetVertexAttribfvARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribfvARB) -#define SET_GetVertexAttribfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribfvARB, fn) -#define CALL_GetVertexAttribivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribivARB, parameters) -#define GET_GetVertexAttribivARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribivARB) -#define SET_GetVertexAttribivARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribivARB, fn) -#define CALL_ProgramEnvParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramEnvParameter4dARB, parameters) -#define GET_ProgramEnvParameter4dARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB) -#define SET_ProgramEnvParameter4dARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB, fn) -#define CALL_ProgramEnvParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), _gloffset_ProgramEnvParameter4dvARB, parameters) -#define GET_ProgramEnvParameter4dvARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB) -#define SET_ProgramEnvParameter4dvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB, fn) -#define CALL_ProgramEnvParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramEnvParameter4fARB, parameters) -#define GET_ProgramEnvParameter4fARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB) -#define SET_ProgramEnvParameter4fARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB, fn) -#define CALL_ProgramEnvParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ProgramEnvParameter4fvARB, parameters) -#define GET_ProgramEnvParameter4fvARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB) -#define SET_ProgramEnvParameter4fvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB, fn) -#define CALL_ProgramLocalParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramLocalParameter4dARB, parameters) -#define GET_ProgramLocalParameter4dARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB) -#define SET_ProgramLocalParameter4dARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB, fn) -#define CALL_ProgramLocalParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), _gloffset_ProgramLocalParameter4dvARB, parameters) -#define GET_ProgramLocalParameter4dvARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB) -#define SET_ProgramLocalParameter4dvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB, fn) -#define CALL_ProgramLocalParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramLocalParameter4fARB, parameters) -#define GET_ProgramLocalParameter4fARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB) -#define SET_ProgramLocalParameter4fARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB, fn) -#define CALL_ProgramLocalParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ProgramLocalParameter4fvARB, parameters) -#define GET_ProgramLocalParameter4fvARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB) -#define SET_ProgramLocalParameter4fvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB, fn) -#define CALL_ProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, const GLvoid *)), _gloffset_ProgramStringARB, parameters) -#define GET_ProgramStringARB(disp) GET_by_offset(disp, _gloffset_ProgramStringARB) -#define SET_ProgramStringARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramStringARB, fn) -#define CALL_VertexAttrib1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), _gloffset_VertexAttrib1dARB, parameters) -#define GET_VertexAttrib1dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dARB) -#define SET_VertexAttrib1dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dARB, fn) -#define CALL_VertexAttrib1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib1dvARB, parameters) -#define GET_VertexAttrib1dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dvARB) -#define SET_VertexAttrib1dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dvARB, fn) -#define CALL_VertexAttrib1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), _gloffset_VertexAttrib1fARB, parameters) -#define GET_VertexAttrib1fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fARB) -#define SET_VertexAttrib1fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fARB, fn) -#define CALL_VertexAttrib1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib1fvARB, parameters) -#define GET_VertexAttrib1fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fvARB) -#define SET_VertexAttrib1fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fvARB, fn) -#define CALL_VertexAttrib1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), _gloffset_VertexAttrib1sARB, parameters) -#define GET_VertexAttrib1sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1sARB) -#define SET_VertexAttrib1sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1sARB, fn) -#define CALL_VertexAttrib1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib1svARB, parameters) -#define GET_VertexAttrib1svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1svARB) -#define SET_VertexAttrib1svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1svARB, fn) -#define CALL_VertexAttrib2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), _gloffset_VertexAttrib2dARB, parameters) -#define GET_VertexAttrib2dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dARB) -#define SET_VertexAttrib2dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dARB, fn) -#define CALL_VertexAttrib2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib2dvARB, parameters) -#define GET_VertexAttrib2dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dvARB) -#define SET_VertexAttrib2dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dvARB, fn) -#define CALL_VertexAttrib2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), _gloffset_VertexAttrib2fARB, parameters) -#define GET_VertexAttrib2fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fARB) -#define SET_VertexAttrib2fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fARB, fn) -#define CALL_VertexAttrib2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib2fvARB, parameters) -#define GET_VertexAttrib2fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fvARB) -#define SET_VertexAttrib2fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fvARB, fn) -#define CALL_VertexAttrib2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), _gloffset_VertexAttrib2sARB, parameters) -#define GET_VertexAttrib2sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2sARB) -#define SET_VertexAttrib2sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2sARB, fn) -#define CALL_VertexAttrib2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib2svARB, parameters) -#define GET_VertexAttrib2svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2svARB) -#define SET_VertexAttrib2svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2svARB, fn) -#define CALL_VertexAttrib3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib3dARB, parameters) -#define GET_VertexAttrib3dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dARB) -#define SET_VertexAttrib3dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dARB, fn) -#define CALL_VertexAttrib3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib3dvARB, parameters) -#define GET_VertexAttrib3dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dvARB) -#define SET_VertexAttrib3dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dvARB, fn) -#define CALL_VertexAttrib3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib3fARB, parameters) -#define GET_VertexAttrib3fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fARB) -#define SET_VertexAttrib3fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fARB, fn) -#define CALL_VertexAttrib3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib3fvARB, parameters) -#define GET_VertexAttrib3fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fvARB) -#define SET_VertexAttrib3fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fvARB, fn) -#define CALL_VertexAttrib3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib3sARB, parameters) -#define GET_VertexAttrib3sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3sARB) -#define SET_VertexAttrib3sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3sARB, fn) -#define CALL_VertexAttrib3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib3svARB, parameters) -#define GET_VertexAttrib3svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3svARB) -#define SET_VertexAttrib3svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3svARB, fn) -#define CALL_VertexAttrib4NbvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttrib4NbvARB, parameters) -#define GET_VertexAttrib4NbvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NbvARB) -#define SET_VertexAttrib4NbvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NbvARB, fn) -#define CALL_VertexAttrib4NivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttrib4NivARB, parameters) -#define GET_VertexAttrib4NivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NivARB) -#define SET_VertexAttrib4NivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NivARB, fn) -#define CALL_VertexAttrib4NsvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4NsvARB, parameters) -#define GET_VertexAttrib4NsvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NsvARB) -#define SET_VertexAttrib4NsvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NsvARB, fn) -#define CALL_VertexAttrib4NubARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_VertexAttrib4NubARB, parameters) -#define GET_VertexAttrib4NubARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NubARB) -#define SET_VertexAttrib4NubARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NubARB, fn) -#define CALL_VertexAttrib4NubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4NubvARB, parameters) -#define GET_VertexAttrib4NubvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NubvARB) -#define SET_VertexAttrib4NubvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NubvARB, fn) -#define CALL_VertexAttrib4NuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttrib4NuivARB, parameters) -#define GET_VertexAttrib4NuivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NuivARB) -#define SET_VertexAttrib4NuivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NuivARB, fn) -#define CALL_VertexAttrib4NusvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttrib4NusvARB, parameters) -#define GET_VertexAttrib4NusvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NusvARB) -#define SET_VertexAttrib4NusvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NusvARB, fn) -#define CALL_VertexAttrib4bvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttrib4bvARB, parameters) -#define GET_VertexAttrib4bvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4bvARB) -#define SET_VertexAttrib4bvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4bvARB, fn) -#define CALL_VertexAttrib4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib4dARB, parameters) -#define GET_VertexAttrib4dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dARB) -#define SET_VertexAttrib4dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dARB, fn) -#define CALL_VertexAttrib4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib4dvARB, parameters) -#define GET_VertexAttrib4dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dvARB) -#define SET_VertexAttrib4dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dvARB, fn) -#define CALL_VertexAttrib4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib4fARB, parameters) -#define GET_VertexAttrib4fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fARB) -#define SET_VertexAttrib4fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fARB, fn) -#define CALL_VertexAttrib4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib4fvARB, parameters) -#define GET_VertexAttrib4fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fvARB) -#define SET_VertexAttrib4fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fvARB, fn) -#define CALL_VertexAttrib4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttrib4ivARB, parameters) -#define GET_VertexAttrib4ivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ivARB) -#define SET_VertexAttrib4ivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ivARB, fn) -#define CALL_VertexAttrib4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib4sARB, parameters) -#define GET_VertexAttrib4sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4sARB) -#define SET_VertexAttrib4sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4sARB, fn) -#define CALL_VertexAttrib4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4svARB, parameters) -#define GET_VertexAttrib4svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4svARB) -#define SET_VertexAttrib4svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4svARB, fn) -#define CALL_VertexAttrib4ubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4ubvARB, parameters) -#define GET_VertexAttrib4ubvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubvARB) -#define SET_VertexAttrib4ubvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubvARB, fn) -#define CALL_VertexAttrib4uivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttrib4uivARB, parameters) -#define GET_VertexAttrib4uivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4uivARB) -#define SET_VertexAttrib4uivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4uivARB, fn) -#define CALL_VertexAttrib4usvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttrib4usvARB, parameters) -#define GET_VertexAttrib4usvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4usvARB) -#define SET_VertexAttrib4usvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4usvARB, fn) -#define CALL_VertexAttribPointerARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)), _gloffset_VertexAttribPointerARB, parameters) -#define GET_VertexAttribPointerARB(disp) GET_by_offset(disp, _gloffset_VertexAttribPointerARB) -#define SET_VertexAttribPointerARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribPointerARB, fn) -#define CALL_BindBufferARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindBufferARB, parameters) -#define GET_BindBufferARB(disp) GET_by_offset(disp, _gloffset_BindBufferARB) -#define SET_BindBufferARB(disp, fn) SET_by_offset(disp, _gloffset_BindBufferARB, fn) -#define CALL_BufferDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizeiptrARB, const GLvoid *, GLenum)), _gloffset_BufferDataARB, parameters) -#define GET_BufferDataARB(disp) GET_by_offset(disp, _gloffset_BufferDataARB) -#define SET_BufferDataARB(disp, fn) SET_by_offset(disp, _gloffset_BufferDataARB, fn) -#define CALL_BufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *)), _gloffset_BufferSubDataARB, parameters) -#define GET_BufferSubDataARB(disp) GET_by_offset(disp, _gloffset_BufferSubDataARB) -#define SET_BufferSubDataARB(disp, fn) SET_by_offset(disp, _gloffset_BufferSubDataARB, fn) -#define CALL_DeleteBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteBuffersARB, parameters) -#define GET_DeleteBuffersARB(disp) GET_by_offset(disp, _gloffset_DeleteBuffersARB) -#define SET_DeleteBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteBuffersARB, fn) -#define CALL_GenBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenBuffersARB, parameters) -#define GET_GenBuffersARB(disp) GET_by_offset(disp, _gloffset_GenBuffersARB) -#define SET_GenBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_GenBuffersARB, fn) -#define CALL_GetBufferParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetBufferParameterivARB, parameters) -#define GET_GetBufferParameterivARB(disp) GET_by_offset(disp, _gloffset_GetBufferParameterivARB) -#define SET_GetBufferParameterivARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferParameterivARB, fn) -#define CALL_GetBufferPointervARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), _gloffset_GetBufferPointervARB, parameters) -#define GET_GetBufferPointervARB(disp) GET_by_offset(disp, _gloffset_GetBufferPointervARB) -#define SET_GetBufferPointervARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferPointervARB, fn) -#define CALL_GetBufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *)), _gloffset_GetBufferSubDataARB, parameters) -#define GET_GetBufferSubDataARB(disp) GET_by_offset(disp, _gloffset_GetBufferSubDataARB) -#define SET_GetBufferSubDataARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferSubDataARB, fn) -#define CALL_IsBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsBufferARB, parameters) -#define GET_IsBufferARB(disp) GET_by_offset(disp, _gloffset_IsBufferARB) -#define SET_IsBufferARB(disp, fn) SET_by_offset(disp, _gloffset_IsBufferARB, fn) -#define CALL_MapBufferARB(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_MapBufferARB, parameters) -#define GET_MapBufferARB(disp) GET_by_offset(disp, _gloffset_MapBufferARB) -#define SET_MapBufferARB(disp, fn) SET_by_offset(disp, _gloffset_MapBufferARB, fn) -#define CALL_UnmapBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), _gloffset_UnmapBufferARB, parameters) -#define GET_UnmapBufferARB(disp) GET_by_offset(disp, _gloffset_UnmapBufferARB) -#define SET_UnmapBufferARB(disp, fn) SET_by_offset(disp, _gloffset_UnmapBufferARB, fn) -#define CALL_BeginQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BeginQueryARB, parameters) -#define GET_BeginQueryARB(disp) GET_by_offset(disp, _gloffset_BeginQueryARB) -#define SET_BeginQueryARB(disp, fn) SET_by_offset(disp, _gloffset_BeginQueryARB, fn) -#define CALL_DeleteQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteQueriesARB, parameters) -#define GET_DeleteQueriesARB(disp) GET_by_offset(disp, _gloffset_DeleteQueriesARB) -#define SET_DeleteQueriesARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteQueriesARB, fn) -#define CALL_EndQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_EndQueryARB, parameters) -#define GET_EndQueryARB(disp) GET_by_offset(disp, _gloffset_EndQueryARB) -#define SET_EndQueryARB(disp, fn) SET_by_offset(disp, _gloffset_EndQueryARB, fn) -#define CALL_GenQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenQueriesARB, parameters) -#define GET_GenQueriesARB(disp) GET_by_offset(disp, _gloffset_GenQueriesARB) -#define SET_GenQueriesARB(disp, fn) SET_by_offset(disp, _gloffset_GenQueriesARB, fn) -#define CALL_GetQueryObjectivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetQueryObjectivARB, parameters) -#define GET_GetQueryObjectivARB(disp) GET_by_offset(disp, _gloffset_GetQueryObjectivARB) -#define SET_GetQueryObjectivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectivARB, fn) -#define CALL_GetQueryObjectuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetQueryObjectuivARB, parameters) -#define GET_GetQueryObjectuivARB(disp) GET_by_offset(disp, _gloffset_GetQueryObjectuivARB) -#define SET_GetQueryObjectuivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectuivARB, fn) -#define CALL_GetQueryivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetQueryivARB, parameters) -#define GET_GetQueryivARB(disp) GET_by_offset(disp, _gloffset_GetQueryivARB) -#define SET_GetQueryivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryivARB, fn) -#define CALL_IsQueryARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsQueryARB, parameters) -#define GET_IsQueryARB(disp) GET_by_offset(disp, _gloffset_IsQueryARB) -#define SET_IsQueryARB(disp, fn) SET_by_offset(disp, _gloffset_IsQueryARB, fn) -#define CALL_AttachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), _gloffset_AttachObjectARB, parameters) -#define GET_AttachObjectARB(disp) GET_by_offset(disp, _gloffset_AttachObjectARB) -#define SET_AttachObjectARB(disp, fn) SET_by_offset(disp, _gloffset_AttachObjectARB, fn) -#define CALL_CompileShaderARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_CompileShaderARB, parameters) -#define GET_CompileShaderARB(disp) GET_by_offset(disp, _gloffset_CompileShaderARB) -#define SET_CompileShaderARB(disp, fn) SET_by_offset(disp, _gloffset_CompileShaderARB, fn) -#define CALL_CreateProgramObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(void)), _gloffset_CreateProgramObjectARB, parameters) -#define GET_CreateProgramObjectARB(disp) GET_by_offset(disp, _gloffset_CreateProgramObjectARB) -#define SET_CreateProgramObjectARB(disp, fn) SET_by_offset(disp, _gloffset_CreateProgramObjectARB, fn) -#define CALL_CreateShaderObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), _gloffset_CreateShaderObjectARB, parameters) -#define GET_CreateShaderObjectARB(disp) GET_by_offset(disp, _gloffset_CreateShaderObjectARB) -#define SET_CreateShaderObjectARB(disp, fn) SET_by_offset(disp, _gloffset_CreateShaderObjectARB, fn) -#define CALL_DeleteObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_DeleteObjectARB, parameters) -#define GET_DeleteObjectARB(disp) GET_by_offset(disp, _gloffset_DeleteObjectARB) -#define SET_DeleteObjectARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteObjectARB, fn) -#define CALL_DetachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), _gloffset_DetachObjectARB, parameters) -#define GET_DetachObjectARB(disp) GET_by_offset(disp, _gloffset_DetachObjectARB) -#define SET_DetachObjectARB(disp, fn) SET_by_offset(disp, _gloffset_DetachObjectARB, fn) -#define CALL_GetActiveUniformARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), _gloffset_GetActiveUniformARB, parameters) -#define GET_GetActiveUniformARB(disp) GET_by_offset(disp, _gloffset_GetActiveUniformARB) -#define SET_GetActiveUniformARB(disp, fn) SET_by_offset(disp, _gloffset_GetActiveUniformARB, fn) -#define CALL_GetAttachedObjectsARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *)), _gloffset_GetAttachedObjectsARB, parameters) -#define GET_GetAttachedObjectsARB(disp) GET_by_offset(disp, _gloffset_GetAttachedObjectsARB) -#define SET_GetAttachedObjectsARB(disp, fn) SET_by_offset(disp, _gloffset_GetAttachedObjectsARB, fn) -#define CALL_GetHandleARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), _gloffset_GetHandleARB, parameters) -#define GET_GetHandleARB(disp) GET_by_offset(disp, _gloffset_GetHandleARB) -#define SET_GetHandleARB(disp, fn) SET_by_offset(disp, _gloffset_GetHandleARB, fn) -#define CALL_GetInfoLogARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), _gloffset_GetInfoLogARB, parameters) -#define GET_GetInfoLogARB(disp) GET_by_offset(disp, _gloffset_GetInfoLogARB) -#define SET_GetInfoLogARB(disp, fn) SET_by_offset(disp, _gloffset_GetInfoLogARB, fn) -#define CALL_GetObjectParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLfloat *)), _gloffset_GetObjectParameterfvARB, parameters) -#define GET_GetObjectParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetObjectParameterfvARB) -#define SET_GetObjectParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterfvARB, fn) -#define CALL_GetObjectParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLint *)), _gloffset_GetObjectParameterivARB, parameters) -#define GET_GetObjectParameterivARB(disp) GET_by_offset(disp, _gloffset_GetObjectParameterivARB) -#define SET_GetObjectParameterivARB(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterivARB, fn) -#define CALL_GetShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), _gloffset_GetShaderSourceARB, parameters) -#define GET_GetShaderSourceARB(disp) GET_by_offset(disp, _gloffset_GetShaderSourceARB) -#define SET_GetShaderSourceARB(disp, fn) SET_by_offset(disp, _gloffset_GetShaderSourceARB, fn) -#define CALL_GetUniformLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), _gloffset_GetUniformLocationARB, parameters) -#define GET_GetUniformLocationARB(disp) GET_by_offset(disp, _gloffset_GetUniformLocationARB) -#define SET_GetUniformLocationARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformLocationARB, fn) -#define CALL_GetUniformfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLfloat *)), _gloffset_GetUniformfvARB, parameters) -#define GET_GetUniformfvARB(disp) GET_by_offset(disp, _gloffset_GetUniformfvARB) -#define SET_GetUniformfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformfvARB, fn) -#define CALL_GetUniformivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLint *)), _gloffset_GetUniformivARB, parameters) -#define GET_GetUniformivARB(disp) GET_by_offset(disp, _gloffset_GetUniformivARB) -#define SET_GetUniformivARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformivARB, fn) -#define CALL_LinkProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_LinkProgramARB, parameters) -#define GET_LinkProgramARB(disp) GET_by_offset(disp, _gloffset_LinkProgramARB) -#define SET_LinkProgramARB(disp, fn) SET_by_offset(disp, _gloffset_LinkProgramARB, fn) -#define CALL_ShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *)), _gloffset_ShaderSourceARB, parameters) -#define GET_ShaderSourceARB(disp) GET_by_offset(disp, _gloffset_ShaderSourceARB) -#define SET_ShaderSourceARB(disp, fn) SET_by_offset(disp, _gloffset_ShaderSourceARB, fn) -#define CALL_Uniform1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat)), _gloffset_Uniform1fARB, parameters) -#define GET_Uniform1fARB(disp) GET_by_offset(disp, _gloffset_Uniform1fARB) -#define SET_Uniform1fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1fARB, fn) -#define CALL_Uniform1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform1fvARB, parameters) -#define GET_Uniform1fvARB(disp) GET_by_offset(disp, _gloffset_Uniform1fvARB) -#define SET_Uniform1fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1fvARB, fn) -#define CALL_Uniform1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_Uniform1iARB, parameters) -#define GET_Uniform1iARB(disp) GET_by_offset(disp, _gloffset_Uniform1iARB) -#define SET_Uniform1iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1iARB, fn) -#define CALL_Uniform1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform1ivARB, parameters) -#define GET_Uniform1ivARB(disp) GET_by_offset(disp, _gloffset_Uniform1ivARB) -#define SET_Uniform1ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1ivARB, fn) -#define CALL_Uniform2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), _gloffset_Uniform2fARB, parameters) -#define GET_Uniform2fARB(disp) GET_by_offset(disp, _gloffset_Uniform2fARB) -#define SET_Uniform2fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2fARB, fn) -#define CALL_Uniform2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform2fvARB, parameters) -#define GET_Uniform2fvARB(disp) GET_by_offset(disp, _gloffset_Uniform2fvARB) -#define SET_Uniform2fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2fvARB, fn) -#define CALL_Uniform2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Uniform2iARB, parameters) -#define GET_Uniform2iARB(disp) GET_by_offset(disp, _gloffset_Uniform2iARB) -#define SET_Uniform2iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2iARB, fn) -#define CALL_Uniform2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform2ivARB, parameters) -#define GET_Uniform2ivARB(disp) GET_by_offset(disp, _gloffset_Uniform2ivARB) -#define SET_Uniform2ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2ivARB, fn) -#define CALL_Uniform3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat)), _gloffset_Uniform3fARB, parameters) -#define GET_Uniform3fARB(disp) GET_by_offset(disp, _gloffset_Uniform3fARB) -#define SET_Uniform3fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3fARB, fn) -#define CALL_Uniform3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform3fvARB, parameters) -#define GET_Uniform3fvARB(disp) GET_by_offset(disp, _gloffset_Uniform3fvARB) -#define SET_Uniform3fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3fvARB, fn) -#define CALL_Uniform3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Uniform3iARB, parameters) -#define GET_Uniform3iARB(disp) GET_by_offset(disp, _gloffset_Uniform3iARB) -#define SET_Uniform3iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3iARB, fn) -#define CALL_Uniform3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform3ivARB, parameters) -#define GET_Uniform3ivARB(disp) GET_by_offset(disp, _gloffset_Uniform3ivARB) -#define SET_Uniform3ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3ivARB, fn) -#define CALL_Uniform4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Uniform4fARB, parameters) -#define GET_Uniform4fARB(disp) GET_by_offset(disp, _gloffset_Uniform4fARB) -#define SET_Uniform4fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4fARB, fn) -#define CALL_Uniform4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform4fvARB, parameters) -#define GET_Uniform4fvARB(disp) GET_by_offset(disp, _gloffset_Uniform4fvARB) -#define SET_Uniform4fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4fvARB, fn) -#define CALL_Uniform4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint)), _gloffset_Uniform4iARB, parameters) -#define GET_Uniform4iARB(disp) GET_by_offset(disp, _gloffset_Uniform4iARB) -#define SET_Uniform4iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4iARB, fn) -#define CALL_Uniform4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform4ivARB, parameters) -#define GET_Uniform4ivARB(disp) GET_by_offset(disp, _gloffset_Uniform4ivARB) -#define SET_Uniform4ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4ivARB, fn) -#define CALL_UniformMatrix2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2fvARB, parameters) -#define GET_UniformMatrix2fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix2fvARB) -#define SET_UniformMatrix2fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2fvARB, fn) -#define CALL_UniformMatrix3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3fvARB, parameters) -#define GET_UniformMatrix3fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix3fvARB) -#define SET_UniformMatrix3fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3fvARB, fn) -#define CALL_UniformMatrix4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4fvARB, parameters) -#define GET_UniformMatrix4fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix4fvARB) -#define SET_UniformMatrix4fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4fvARB, fn) -#define CALL_UseProgramObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_UseProgramObjectARB, parameters) -#define GET_UseProgramObjectARB(disp) GET_by_offset(disp, _gloffset_UseProgramObjectARB) -#define SET_UseProgramObjectARB(disp, fn) SET_by_offset(disp, _gloffset_UseProgramObjectARB, fn) -#define CALL_ValidateProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_ValidateProgramARB, parameters) -#define GET_ValidateProgramARB(disp) GET_by_offset(disp, _gloffset_ValidateProgramARB) -#define SET_ValidateProgramARB(disp, fn) SET_by_offset(disp, _gloffset_ValidateProgramARB, fn) -#define CALL_BindAttribLocationARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, const GLcharARB *)), _gloffset_BindAttribLocationARB, parameters) -#define GET_BindAttribLocationARB(disp) GET_by_offset(disp, _gloffset_BindAttribLocationARB) -#define SET_BindAttribLocationARB(disp, fn) SET_by_offset(disp, _gloffset_BindAttribLocationARB, fn) -#define CALL_GetActiveAttribARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), _gloffset_GetActiveAttribARB, parameters) -#define GET_GetActiveAttribARB(disp) GET_by_offset(disp, _gloffset_GetActiveAttribARB) -#define SET_GetActiveAttribARB(disp, fn) SET_by_offset(disp, _gloffset_GetActiveAttribARB, fn) -#define CALL_GetAttribLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), _gloffset_GetAttribLocationARB, parameters) -#define GET_GetAttribLocationARB(disp) GET_by_offset(disp, _gloffset_GetAttribLocationARB) -#define SET_GetAttribLocationARB(disp, fn) SET_by_offset(disp, _gloffset_GetAttribLocationARB, fn) -#define CALL_DrawBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLenum *)), _gloffset_DrawBuffersARB, parameters) -#define GET_DrawBuffersARB(disp) GET_by_offset(disp, _gloffset_DrawBuffersARB) -#define SET_DrawBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_DrawBuffersARB, fn) -#define CALL_ClampColorARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ClampColorARB, parameters) -#define GET_ClampColorARB(disp) GET_by_offset(disp, _gloffset_ClampColorARB) -#define SET_ClampColorARB(disp, fn) SET_by_offset(disp, _gloffset_ClampColorARB, fn) -#define CALL_DrawArraysInstancedARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei, GLsizei)), _gloffset_DrawArraysInstancedARB, parameters) -#define GET_DrawArraysInstancedARB(disp) GET_by_offset(disp, _gloffset_DrawArraysInstancedARB) -#define SET_DrawArraysInstancedARB(disp, fn) SET_by_offset(disp, _gloffset_DrawArraysInstancedARB, fn) -#define CALL_DrawElementsInstancedARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei)), _gloffset_DrawElementsInstancedARB, parameters) -#define GET_DrawElementsInstancedARB(disp) GET_by_offset(disp, _gloffset_DrawElementsInstancedARB) -#define SET_DrawElementsInstancedARB(disp, fn) SET_by_offset(disp, _gloffset_DrawElementsInstancedARB, fn) -#define CALL_RenderbufferStorageMultisample(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, GLsizei, GLsizei)), _gloffset_RenderbufferStorageMultisample, parameters) -#define GET_RenderbufferStorageMultisample(disp) GET_by_offset(disp, _gloffset_RenderbufferStorageMultisample) -#define SET_RenderbufferStorageMultisample(disp, fn) SET_by_offset(disp, _gloffset_RenderbufferStorageMultisample, fn) -#define CALL_FramebufferTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTextureARB, parameters) -#define GET_FramebufferTextureARB(disp) GET_by_offset(disp, _gloffset_FramebufferTextureARB) -#define SET_FramebufferTextureARB(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureARB, fn) -#define CALL_FramebufferTextureFaceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLenum)), _gloffset_FramebufferTextureFaceARB, parameters) -#define GET_FramebufferTextureFaceARB(disp) GET_by_offset(disp, _gloffset_FramebufferTextureFaceARB) -#define SET_FramebufferTextureFaceARB(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureFaceARB, fn) -#define CALL_ProgramParameteriARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint)), _gloffset_ProgramParameteriARB, parameters) -#define GET_ProgramParameteriARB(disp) GET_by_offset(disp, _gloffset_ProgramParameteriARB) -#define SET_ProgramParameteriARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameteriARB, fn) -#define CALL_VertexAttribDivisorARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribDivisorARB, parameters) -#define GET_VertexAttribDivisorARB(disp) GET_by_offset(disp, _gloffset_VertexAttribDivisorARB) -#define SET_VertexAttribDivisorARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribDivisorARB, fn) -#define CALL_FlushMappedBufferRange(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr)), _gloffset_FlushMappedBufferRange, parameters) -#define GET_FlushMappedBufferRange(disp) GET_by_offset(disp, _gloffset_FlushMappedBufferRange) -#define SET_FlushMappedBufferRange(disp, fn) SET_by_offset(disp, _gloffset_FlushMappedBufferRange, fn) -#define CALL_MapBufferRange(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr, GLbitfield)), _gloffset_MapBufferRange, parameters) -#define GET_MapBufferRange(disp) GET_by_offset(disp, _gloffset_MapBufferRange) -#define SET_MapBufferRange(disp, fn) SET_by_offset(disp, _gloffset_MapBufferRange, fn) -#define CALL_BindVertexArray(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindVertexArray, parameters) -#define GET_BindVertexArray(disp) GET_by_offset(disp, _gloffset_BindVertexArray) -#define SET_BindVertexArray(disp, fn) SET_by_offset(disp, _gloffset_BindVertexArray, fn) -#define CALL_GenVertexArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenVertexArrays, parameters) -#define GET_GenVertexArrays(disp) GET_by_offset(disp, _gloffset_GenVertexArrays) -#define SET_GenVertexArrays(disp, fn) SET_by_offset(disp, _gloffset_GenVertexArrays, fn) -#define CALL_CopyBufferSubData(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr)), _gloffset_CopyBufferSubData, parameters) -#define GET_CopyBufferSubData(disp) GET_by_offset(disp, _gloffset_CopyBufferSubData) -#define SET_CopyBufferSubData(disp, fn) SET_by_offset(disp, _gloffset_CopyBufferSubData, fn) -#define CALL_ClientWaitSync(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLsync, GLbitfield, GLuint64)), _gloffset_ClientWaitSync, parameters) -#define GET_ClientWaitSync(disp) GET_by_offset(disp, _gloffset_ClientWaitSync) -#define SET_ClientWaitSync(disp, fn) SET_by_offset(disp, _gloffset_ClientWaitSync, fn) -#define CALL_DeleteSync(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync)), _gloffset_DeleteSync, parameters) -#define GET_DeleteSync(disp) GET_by_offset(disp, _gloffset_DeleteSync) -#define SET_DeleteSync(disp, fn) SET_by_offset(disp, _gloffset_DeleteSync, fn) -#define CALL_FenceSync(disp, parameters) CALL_by_offset(disp, (GLsync (GLAPIENTRYP)(GLenum, GLbitfield)), _gloffset_FenceSync, parameters) -#define GET_FenceSync(disp) GET_by_offset(disp, _gloffset_FenceSync) -#define SET_FenceSync(disp, fn) SET_by_offset(disp, _gloffset_FenceSync, fn) -#define CALL_GetInteger64v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint64 *)), _gloffset_GetInteger64v, parameters) -#define GET_GetInteger64v(disp) GET_by_offset(disp, _gloffset_GetInteger64v) -#define SET_GetInteger64v(disp, fn) SET_by_offset(disp, _gloffset_GetInteger64v, fn) -#define CALL_GetSynciv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync, GLenum, GLsizei, GLsizei *, GLint *)), _gloffset_GetSynciv, parameters) -#define GET_GetSynciv(disp) GET_by_offset(disp, _gloffset_GetSynciv) -#define SET_GetSynciv(disp, fn) SET_by_offset(disp, _gloffset_GetSynciv, fn) -#define CALL_IsSync(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsync)), _gloffset_IsSync, parameters) -#define GET_IsSync(disp) GET_by_offset(disp, _gloffset_IsSync) -#define SET_IsSync(disp, fn) SET_by_offset(disp, _gloffset_IsSync, fn) -#define CALL_WaitSync(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync, GLbitfield, GLuint64)), _gloffset_WaitSync, parameters) -#define GET_WaitSync(disp) GET_by_offset(disp, _gloffset_WaitSync) -#define SET_WaitSync(disp, fn) SET_by_offset(disp, _gloffset_WaitSync, fn) -#define CALL_DrawElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *, GLint)), _gloffset_DrawElementsBaseVertex, parameters) -#define GET_DrawElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_DrawElementsBaseVertex) -#define SET_DrawElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_DrawElementsBaseVertex, fn) -#define CALL_DrawRangeElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *, GLint)), _gloffset_DrawRangeElementsBaseVertex, parameters) -#define GET_DrawRangeElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex) -#define SET_DrawRangeElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex, fn) -#define CALL_MultiDrawElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *)), _gloffset_MultiDrawElementsBaseVertex, parameters) -#define GET_MultiDrawElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex) -#define SET_MultiDrawElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex, fn) -#define CALL_BlendEquationSeparateiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum)), _gloffset_BlendEquationSeparateiARB, parameters) -#define GET_BlendEquationSeparateiARB(disp) GET_by_offset(disp, _gloffset_BlendEquationSeparateiARB) -#define SET_BlendEquationSeparateiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationSeparateiARB, fn) -#define CALL_BlendEquationiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_BlendEquationiARB, parameters) -#define GET_BlendEquationiARB(disp) GET_by_offset(disp, _gloffset_BlendEquationiARB) -#define SET_BlendEquationiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationiARB, fn) -#define CALL_BlendFuncSeparateiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum, GLenum, GLenum)), _gloffset_BlendFuncSeparateiARB, parameters) -#define GET_BlendFuncSeparateiARB(disp) GET_by_offset(disp, _gloffset_BlendFuncSeparateiARB) -#define SET_BlendFuncSeparateiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendFuncSeparateiARB, fn) -#define CALL_BlendFunciARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum)), _gloffset_BlendFunciARB, parameters) -#define GET_BlendFunciARB(disp) GET_by_offset(disp, _gloffset_BlendFunciARB) -#define SET_BlendFunciARB(disp, fn) SET_by_offset(disp, _gloffset_BlendFunciARB, fn) -#define CALL_BindTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindTransformFeedback, parameters) -#define GET_BindTransformFeedback(disp) GET_by_offset(disp, _gloffset_BindTransformFeedback) -#define SET_BindTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_BindTransformFeedback, fn) -#define CALL_DeleteTransformFeedbacks(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteTransformFeedbacks, parameters) -#define GET_DeleteTransformFeedbacks(disp) GET_by_offset(disp, _gloffset_DeleteTransformFeedbacks) -#define SET_DeleteTransformFeedbacks(disp, fn) SET_by_offset(disp, _gloffset_DeleteTransformFeedbacks, fn) -#define CALL_DrawTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_DrawTransformFeedback, parameters) -#define GET_DrawTransformFeedback(disp) GET_by_offset(disp, _gloffset_DrawTransformFeedback) -#define SET_DrawTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_DrawTransformFeedback, fn) -#define CALL_GenTransformFeedbacks(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenTransformFeedbacks, parameters) -#define GET_GenTransformFeedbacks(disp) GET_by_offset(disp, _gloffset_GenTransformFeedbacks) -#define SET_GenTransformFeedbacks(disp, fn) SET_by_offset(disp, _gloffset_GenTransformFeedbacks, fn) -#define CALL_IsTransformFeedback(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsTransformFeedback, parameters) -#define GET_IsTransformFeedback(disp) GET_by_offset(disp, _gloffset_IsTransformFeedback) -#define SET_IsTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_IsTransformFeedback, fn) -#define CALL_PauseTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PauseTransformFeedback, parameters) -#define GET_PauseTransformFeedback(disp) GET_by_offset(disp, _gloffset_PauseTransformFeedback) -#define SET_PauseTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_PauseTransformFeedback, fn) -#define CALL_ResumeTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ResumeTransformFeedback, parameters) -#define GET_ResumeTransformFeedback(disp) GET_by_offset(disp, _gloffset_ResumeTransformFeedback) -#define SET_ResumeTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_ResumeTransformFeedback, fn) -#define CALL_ClearDepthf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf)), _gloffset_ClearDepthf, parameters) -#define GET_ClearDepthf(disp) GET_by_offset(disp, _gloffset_ClearDepthf) -#define SET_ClearDepthf(disp, fn) SET_by_offset(disp, _gloffset_ClearDepthf, fn) -#define CALL_DepthRangef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf)), _gloffset_DepthRangef, parameters) -#define GET_DepthRangef(disp) GET_by_offset(disp, _gloffset_DepthRangef) -#define SET_DepthRangef(disp, fn) SET_by_offset(disp, _gloffset_DepthRangef, fn) -#define CALL_GetShaderPrecisionFormat(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *, GLint *)), _gloffset_GetShaderPrecisionFormat, parameters) -#define GET_GetShaderPrecisionFormat(disp) GET_by_offset(disp, _gloffset_GetShaderPrecisionFormat) -#define SET_GetShaderPrecisionFormat(disp, fn) SET_by_offset(disp, _gloffset_GetShaderPrecisionFormat, fn) -#define CALL_ReleaseShaderCompiler(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ReleaseShaderCompiler, parameters) -#define GET_ReleaseShaderCompiler(disp) GET_by_offset(disp, _gloffset_ReleaseShaderCompiler) -#define SET_ReleaseShaderCompiler(disp, fn) SET_by_offset(disp, _gloffset_ReleaseShaderCompiler, fn) -#define CALL_ShaderBinary(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *, GLenum, const GLvoid *, GLsizei)), _gloffset_ShaderBinary, parameters) -#define GET_ShaderBinary(disp) GET_by_offset(disp, _gloffset_ShaderBinary) -#define SET_ShaderBinary(disp, fn) SET_by_offset(disp, _gloffset_ShaderBinary, fn) -#define CALL_PolygonOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PolygonOffsetEXT, parameters) -#define GET_PolygonOffsetEXT(disp) GET_by_offset(disp, _gloffset_PolygonOffsetEXT) -#define SET_PolygonOffsetEXT(disp, fn) SET_by_offset(disp, _gloffset_PolygonOffsetEXT, fn) -#define CALL_GetPixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetPixelTexGenParameterfvSGIS, parameters) -#define GET_GetPixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS) -#define SET_GetPixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS, fn) -#define CALL_GetPixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetPixelTexGenParameterivSGIS, parameters) -#define GET_GetPixelTexGenParameterivSGIS(disp) GET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS) -#define SET_GetPixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS, fn) -#define CALL_PixelTexGenParameterfSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelTexGenParameterfSGIS, parameters) -#define GET_PixelTexGenParameterfSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS) -#define SET_PixelTexGenParameterfSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS, fn) -#define CALL_PixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_PixelTexGenParameterfvSGIS, parameters) -#define GET_PixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS) -#define SET_PixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS, fn) -#define CALL_PixelTexGenParameteriSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelTexGenParameteriSGIS, parameters) -#define GET_PixelTexGenParameteriSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS) -#define SET_PixelTexGenParameteriSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS, fn) -#define CALL_PixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_PixelTexGenParameterivSGIS, parameters) -#define GET_PixelTexGenParameterivSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS) -#define SET_PixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS, fn) -#define CALL_SampleMaskSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), _gloffset_SampleMaskSGIS, parameters) -#define GET_SampleMaskSGIS(disp) GET_by_offset(disp, _gloffset_SampleMaskSGIS) -#define SET_SampleMaskSGIS(disp, fn) SET_by_offset(disp, _gloffset_SampleMaskSGIS, fn) -#define CALL_SamplePatternSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_SamplePatternSGIS, parameters) -#define GET_SamplePatternSGIS(disp) GET_by_offset(disp, _gloffset_SamplePatternSGIS) -#define SET_SamplePatternSGIS(disp, fn) SET_by_offset(disp, _gloffset_SamplePatternSGIS, fn) -#define CALL_ColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_ColorPointerEXT, parameters) -#define GET_ColorPointerEXT(disp) GET_by_offset(disp, _gloffset_ColorPointerEXT) -#define SET_ColorPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_ColorPointerEXT, fn) -#define CALL_EdgeFlagPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, const GLboolean *)), _gloffset_EdgeFlagPointerEXT, parameters) -#define GET_EdgeFlagPointerEXT(disp) GET_by_offset(disp, _gloffset_EdgeFlagPointerEXT) -#define SET_EdgeFlagPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagPointerEXT, fn) -#define CALL_IndexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_IndexPointerEXT, parameters) -#define GET_IndexPointerEXT(disp) GET_by_offset(disp, _gloffset_IndexPointerEXT) -#define SET_IndexPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_IndexPointerEXT, fn) -#define CALL_NormalPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_NormalPointerEXT, parameters) -#define GET_NormalPointerEXT(disp) GET_by_offset(disp, _gloffset_NormalPointerEXT) -#define SET_NormalPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_NormalPointerEXT, fn) -#define CALL_TexCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_TexCoordPointerEXT, parameters) -#define GET_TexCoordPointerEXT(disp) GET_by_offset(disp, _gloffset_TexCoordPointerEXT) -#define SET_TexCoordPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_TexCoordPointerEXT, fn) -#define CALL_VertexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_VertexPointerEXT, parameters) -#define GET_VertexPointerEXT(disp) GET_by_offset(disp, _gloffset_VertexPointerEXT) -#define SET_VertexPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexPointerEXT, fn) -#define CALL_PointParameterfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PointParameterfEXT, parameters) -#define GET_PointParameterfEXT(disp) GET_by_offset(disp, _gloffset_PointParameterfEXT) -#define SET_PointParameterfEXT(disp, fn) SET_by_offset(disp, _gloffset_PointParameterfEXT, fn) -#define CALL_PointParameterfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_PointParameterfvEXT, parameters) -#define GET_PointParameterfvEXT(disp) GET_by_offset(disp, _gloffset_PointParameterfvEXT) -#define SET_PointParameterfvEXT(disp, fn) SET_by_offset(disp, _gloffset_PointParameterfvEXT, fn) -#define CALL_LockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei)), _gloffset_LockArraysEXT, parameters) -#define GET_LockArraysEXT(disp) GET_by_offset(disp, _gloffset_LockArraysEXT) -#define SET_LockArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_LockArraysEXT, fn) -#define CALL_UnlockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_UnlockArraysEXT, parameters) -#define GET_UnlockArraysEXT(disp) GET_by_offset(disp, _gloffset_UnlockArraysEXT) -#define SET_UnlockArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_UnlockArraysEXT, fn) -#define CALL_SecondaryColor3bEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_SecondaryColor3bEXT, parameters) -#define GET_SecondaryColor3bEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3bEXT) -#define SET_SecondaryColor3bEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3bEXT, fn) -#define CALL_SecondaryColor3bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_SecondaryColor3bvEXT, parameters) -#define GET_SecondaryColor3bvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3bvEXT) -#define SET_SecondaryColor3bvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3bvEXT, fn) -#define CALL_SecondaryColor3dEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_SecondaryColor3dEXT, parameters) -#define GET_SecondaryColor3dEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3dEXT) -#define SET_SecondaryColor3dEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3dEXT, fn) -#define CALL_SecondaryColor3dvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_SecondaryColor3dvEXT, parameters) -#define GET_SecondaryColor3dvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3dvEXT) -#define SET_SecondaryColor3dvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3dvEXT, fn) -#define CALL_SecondaryColor3fEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_SecondaryColor3fEXT, parameters) -#define GET_SecondaryColor3fEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3fEXT) -#define SET_SecondaryColor3fEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3fEXT, fn) -#define CALL_SecondaryColor3fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_SecondaryColor3fvEXT, parameters) -#define GET_SecondaryColor3fvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3fvEXT) -#define SET_SecondaryColor3fvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3fvEXT, fn) -#define CALL_SecondaryColor3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_SecondaryColor3iEXT, parameters) -#define GET_SecondaryColor3iEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3iEXT) -#define SET_SecondaryColor3iEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3iEXT, fn) -#define CALL_SecondaryColor3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_SecondaryColor3ivEXT, parameters) -#define GET_SecondaryColor3ivEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ivEXT) -#define SET_SecondaryColor3ivEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ivEXT, fn) -#define CALL_SecondaryColor3sEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_SecondaryColor3sEXT, parameters) -#define GET_SecondaryColor3sEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3sEXT) -#define SET_SecondaryColor3sEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3sEXT, fn) -#define CALL_SecondaryColor3svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_SecondaryColor3svEXT, parameters) -#define GET_SecondaryColor3svEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3svEXT) -#define SET_SecondaryColor3svEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3svEXT, fn) -#define CALL_SecondaryColor3ubEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), _gloffset_SecondaryColor3ubEXT, parameters) -#define GET_SecondaryColor3ubEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ubEXT) -#define SET_SecondaryColor3ubEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ubEXT, fn) -#define CALL_SecondaryColor3ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_SecondaryColor3ubvEXT, parameters) -#define GET_SecondaryColor3ubvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT) -#define SET_SecondaryColor3ubvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT, fn) -#define CALL_SecondaryColor3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_SecondaryColor3uiEXT, parameters) -#define GET_SecondaryColor3uiEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3uiEXT) -#define SET_SecondaryColor3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3uiEXT, fn) -#define CALL_SecondaryColor3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_SecondaryColor3uivEXT, parameters) -#define GET_SecondaryColor3uivEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3uivEXT) -#define SET_SecondaryColor3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3uivEXT, fn) -#define CALL_SecondaryColor3usEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), _gloffset_SecondaryColor3usEXT, parameters) -#define GET_SecondaryColor3usEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3usEXT) -#define SET_SecondaryColor3usEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3usEXT, fn) -#define CALL_SecondaryColor3usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_SecondaryColor3usvEXT, parameters) -#define GET_SecondaryColor3usvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3usvEXT) -#define SET_SecondaryColor3usvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3usvEXT, fn) -#define CALL_SecondaryColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_SecondaryColorPointerEXT, parameters) -#define GET_SecondaryColorPointerEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColorPointerEXT) -#define SET_SecondaryColorPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColorPointerEXT, fn) -#define CALL_MultiDrawArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *, const GLsizei *, GLsizei)), _gloffset_MultiDrawArraysEXT, parameters) -#define GET_MultiDrawArraysEXT(disp) GET_by_offset(disp, _gloffset_MultiDrawArraysEXT) -#define SET_MultiDrawArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawArraysEXT, fn) -#define CALL_MultiDrawElementsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)), _gloffset_MultiDrawElementsEXT, parameters) -#define GET_MultiDrawElementsEXT(disp) GET_by_offset(disp, _gloffset_MultiDrawElementsEXT) -#define SET_MultiDrawElementsEXT(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawElementsEXT, fn) -#define CALL_FogCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_FogCoordPointerEXT, parameters) -#define GET_FogCoordPointerEXT(disp) GET_by_offset(disp, _gloffset_FogCoordPointerEXT) -#define SET_FogCoordPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordPointerEXT, fn) -#define CALL_FogCoorddEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_FogCoorddEXT, parameters) -#define GET_FogCoorddEXT(disp) GET_by_offset(disp, _gloffset_FogCoorddEXT) -#define SET_FogCoorddEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoorddEXT, fn) -#define CALL_FogCoorddvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_FogCoorddvEXT, parameters) -#define GET_FogCoorddvEXT(disp) GET_by_offset(disp, _gloffset_FogCoorddvEXT) -#define SET_FogCoorddvEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoorddvEXT, fn) -#define CALL_FogCoordfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_FogCoordfEXT, parameters) -#define GET_FogCoordfEXT(disp) GET_by_offset(disp, _gloffset_FogCoordfEXT) -#define SET_FogCoordfEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordfEXT, fn) -#define CALL_FogCoordfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_FogCoordfvEXT, parameters) -#define GET_FogCoordfvEXT(disp) GET_by_offset(disp, _gloffset_FogCoordfvEXT) -#define SET_FogCoordfvEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordfvEXT, fn) -#define CALL_PixelTexGenSGIX(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_PixelTexGenSGIX, parameters) -#define GET_PixelTexGenSGIX(disp) GET_by_offset(disp, _gloffset_PixelTexGenSGIX) -#define SET_PixelTexGenSGIX(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenSGIX, fn) -#define CALL_BlendFuncSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_BlendFuncSeparateEXT, parameters) -#define GET_BlendFuncSeparateEXT(disp) GET_by_offset(disp, _gloffset_BlendFuncSeparateEXT) -#define SET_BlendFuncSeparateEXT(disp, fn) SET_by_offset(disp, _gloffset_BlendFuncSeparateEXT, fn) -#define CALL_FlushVertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_FlushVertexArrayRangeNV, parameters) -#define GET_FlushVertexArrayRangeNV(disp) GET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV) -#define SET_FlushVertexArrayRangeNV(disp, fn) SET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV, fn) -#define CALL_VertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), _gloffset_VertexArrayRangeNV, parameters) -#define GET_VertexArrayRangeNV(disp) GET_by_offset(disp, _gloffset_VertexArrayRangeNV) -#define SET_VertexArrayRangeNV(disp, fn) SET_by_offset(disp, _gloffset_VertexArrayRangeNV, fn) -#define CALL_CombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum)), _gloffset_CombinerInputNV, parameters) -#define GET_CombinerInputNV(disp) GET_by_offset(disp, _gloffset_CombinerInputNV) -#define SET_CombinerInputNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerInputNV, fn) -#define CALL_CombinerOutputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean)), _gloffset_CombinerOutputNV, parameters) -#define GET_CombinerOutputNV(disp) GET_by_offset(disp, _gloffset_CombinerOutputNV) -#define SET_CombinerOutputNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerOutputNV, fn) -#define CALL_CombinerParameterfNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_CombinerParameterfNV, parameters) -#define GET_CombinerParameterfNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterfNV) -#define SET_CombinerParameterfNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterfNV, fn) -#define CALL_CombinerParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_CombinerParameterfvNV, parameters) -#define GET_CombinerParameterfvNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterfvNV) -#define SET_CombinerParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterfvNV, fn) -#define CALL_CombinerParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_CombinerParameteriNV, parameters) -#define GET_CombinerParameteriNV(disp) GET_by_offset(disp, _gloffset_CombinerParameteriNV) -#define SET_CombinerParameteriNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameteriNV, fn) -#define CALL_CombinerParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_CombinerParameterivNV, parameters) -#define GET_CombinerParameterivNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterivNV) -#define SET_CombinerParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterivNV, fn) -#define CALL_FinalCombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_FinalCombinerInputNV, parameters) -#define GET_FinalCombinerInputNV(disp) GET_by_offset(disp, _gloffset_FinalCombinerInputNV) -#define SET_FinalCombinerInputNV(disp, fn) SET_by_offset(disp, _gloffset_FinalCombinerInputNV, fn) -#define CALL_GetCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLfloat *)), _gloffset_GetCombinerInputParameterfvNV, parameters) -#define GET_GetCombinerInputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV) -#define SET_GetCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV, fn) -#define CALL_GetCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLint *)), _gloffset_GetCombinerInputParameterivNV, parameters) -#define GET_GetCombinerInputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV) -#define SET_GetCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV, fn) -#define CALL_GetCombinerOutputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLfloat *)), _gloffset_GetCombinerOutputParameterfvNV, parameters) -#define GET_GetCombinerOutputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV) -#define SET_GetCombinerOutputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV, fn) -#define CALL_GetCombinerOutputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), _gloffset_GetCombinerOutputParameterivNV, parameters) -#define GET_GetCombinerOutputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV) -#define SET_GetCombinerOutputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV, fn) -#define CALL_GetFinalCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetFinalCombinerInputParameterfvNV, parameters) -#define GET_GetFinalCombinerInputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV) -#define SET_GetFinalCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV, fn) -#define CALL_GetFinalCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetFinalCombinerInputParameterivNV, parameters) -#define GET_GetFinalCombinerInputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV) -#define SET_GetFinalCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV, fn) -#define CALL_ResizeBuffersMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ResizeBuffersMESA, parameters) -#define GET_ResizeBuffersMESA(disp) GET_by_offset(disp, _gloffset_ResizeBuffersMESA) -#define SET_ResizeBuffersMESA(disp, fn) SET_by_offset(disp, _gloffset_ResizeBuffersMESA, fn) -#define CALL_WindowPos2dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_WindowPos2dMESA, parameters) -#define GET_WindowPos2dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2dMESA) -#define SET_WindowPos2dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2dMESA, fn) -#define CALL_WindowPos2dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos2dvMESA, parameters) -#define GET_WindowPos2dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2dvMESA) -#define SET_WindowPos2dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2dvMESA, fn) -#define CALL_WindowPos2fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_WindowPos2fMESA, parameters) -#define GET_WindowPos2fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2fMESA) -#define SET_WindowPos2fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2fMESA, fn) -#define CALL_WindowPos2fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos2fvMESA, parameters) -#define GET_WindowPos2fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2fvMESA) -#define SET_WindowPos2fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2fvMESA, fn) -#define CALL_WindowPos2iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_WindowPos2iMESA, parameters) -#define GET_WindowPos2iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2iMESA) -#define SET_WindowPos2iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2iMESA, fn) -#define CALL_WindowPos2ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos2ivMESA, parameters) -#define GET_WindowPos2ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2ivMESA) -#define SET_WindowPos2ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2ivMESA, fn) -#define CALL_WindowPos2sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_WindowPos2sMESA, parameters) -#define GET_WindowPos2sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2sMESA) -#define SET_WindowPos2sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2sMESA, fn) -#define CALL_WindowPos2svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos2svMESA, parameters) -#define GET_WindowPos2svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2svMESA) -#define SET_WindowPos2svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2svMESA, fn) -#define CALL_WindowPos3dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_WindowPos3dMESA, parameters) -#define GET_WindowPos3dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3dMESA) -#define SET_WindowPos3dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3dMESA, fn) -#define CALL_WindowPos3dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos3dvMESA, parameters) -#define GET_WindowPos3dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3dvMESA) -#define SET_WindowPos3dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3dvMESA, fn) -#define CALL_WindowPos3fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_WindowPos3fMESA, parameters) -#define GET_WindowPos3fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3fMESA) -#define SET_WindowPos3fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3fMESA, fn) -#define CALL_WindowPos3fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos3fvMESA, parameters) -#define GET_WindowPos3fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3fvMESA) -#define SET_WindowPos3fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3fvMESA, fn) -#define CALL_WindowPos3iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_WindowPos3iMESA, parameters) -#define GET_WindowPos3iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3iMESA) -#define SET_WindowPos3iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3iMESA, fn) -#define CALL_WindowPos3ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos3ivMESA, parameters) -#define GET_WindowPos3ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3ivMESA) -#define SET_WindowPos3ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3ivMESA, fn) -#define CALL_WindowPos3sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_WindowPos3sMESA, parameters) -#define GET_WindowPos3sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3sMESA) -#define SET_WindowPos3sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3sMESA, fn) -#define CALL_WindowPos3svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos3svMESA, parameters) -#define GET_WindowPos3svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3svMESA) -#define SET_WindowPos3svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3svMESA, fn) -#define CALL_WindowPos4dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_WindowPos4dMESA, parameters) -#define GET_WindowPos4dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4dMESA) -#define SET_WindowPos4dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4dMESA, fn) -#define CALL_WindowPos4dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos4dvMESA, parameters) -#define GET_WindowPos4dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4dvMESA) -#define SET_WindowPos4dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4dvMESA, fn) -#define CALL_WindowPos4fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_WindowPos4fMESA, parameters) -#define GET_WindowPos4fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4fMESA) -#define SET_WindowPos4fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4fMESA, fn) -#define CALL_WindowPos4fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos4fvMESA, parameters) -#define GET_WindowPos4fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4fvMESA) -#define SET_WindowPos4fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4fvMESA, fn) -#define CALL_WindowPos4iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_WindowPos4iMESA, parameters) -#define GET_WindowPos4iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4iMESA) -#define SET_WindowPos4iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4iMESA, fn) -#define CALL_WindowPos4ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos4ivMESA, parameters) -#define GET_WindowPos4ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4ivMESA) -#define SET_WindowPos4ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4ivMESA, fn) -#define CALL_WindowPos4sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_WindowPos4sMESA, parameters) -#define GET_WindowPos4sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4sMESA) -#define SET_WindowPos4sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4sMESA, fn) -#define CALL_WindowPos4svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos4svMESA, parameters) -#define GET_WindowPos4svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4svMESA) -#define SET_WindowPos4svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4svMESA, fn) -#define CALL_MultiModeDrawArraysIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint)), _gloffset_MultiModeDrawArraysIBM, parameters) -#define GET_MultiModeDrawArraysIBM(disp) GET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM) -#define SET_MultiModeDrawArraysIBM(disp, fn) SET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM, fn) -#define CALL_MultiModeDrawElementsIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLsizei *, GLenum, const GLvoid * const *, GLsizei, GLint)), _gloffset_MultiModeDrawElementsIBM, parameters) -#define GET_MultiModeDrawElementsIBM(disp) GET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM) -#define SET_MultiModeDrawElementsIBM(disp, fn) SET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM, fn) -#define CALL_DeleteFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteFencesNV, parameters) -#define GET_DeleteFencesNV(disp) GET_by_offset(disp, _gloffset_DeleteFencesNV) -#define SET_DeleteFencesNV(disp, fn) SET_by_offset(disp, _gloffset_DeleteFencesNV, fn) -#define CALL_FinishFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_FinishFenceNV, parameters) -#define GET_FinishFenceNV(disp) GET_by_offset(disp, _gloffset_FinishFenceNV) -#define SET_FinishFenceNV(disp, fn) SET_by_offset(disp, _gloffset_FinishFenceNV, fn) -#define CALL_GenFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenFencesNV, parameters) -#define GET_GenFencesNV(disp) GET_by_offset(disp, _gloffset_GenFencesNV) -#define SET_GenFencesNV(disp, fn) SET_by_offset(disp, _gloffset_GenFencesNV, fn) -#define CALL_GetFenceivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetFenceivNV, parameters) -#define GET_GetFenceivNV(disp) GET_by_offset(disp, _gloffset_GetFenceivNV) -#define SET_GetFenceivNV(disp, fn) SET_by_offset(disp, _gloffset_GetFenceivNV, fn) -#define CALL_IsFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsFenceNV, parameters) -#define GET_IsFenceNV(disp) GET_by_offset(disp, _gloffset_IsFenceNV) -#define SET_IsFenceNV(disp, fn) SET_by_offset(disp, _gloffset_IsFenceNV, fn) -#define CALL_SetFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_SetFenceNV, parameters) -#define GET_SetFenceNV(disp) GET_by_offset(disp, _gloffset_SetFenceNV) -#define SET_SetFenceNV(disp, fn) SET_by_offset(disp, _gloffset_SetFenceNV, fn) -#define CALL_TestFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_TestFenceNV, parameters) -#define GET_TestFenceNV(disp) GET_by_offset(disp, _gloffset_TestFenceNV) -#define SET_TestFenceNV(disp, fn) SET_by_offset(disp, _gloffset_TestFenceNV, fn) -#define CALL_AreProgramsResidentNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), _gloffset_AreProgramsResidentNV, parameters) -#define GET_AreProgramsResidentNV(disp) GET_by_offset(disp, _gloffset_AreProgramsResidentNV) -#define SET_AreProgramsResidentNV(disp, fn) SET_by_offset(disp, _gloffset_AreProgramsResidentNV, fn) -#define CALL_BindProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindProgramNV, parameters) -#define GET_BindProgramNV(disp) GET_by_offset(disp, _gloffset_BindProgramNV) -#define SET_BindProgramNV(disp, fn) SET_by_offset(disp, _gloffset_BindProgramNV, fn) -#define CALL_DeleteProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteProgramsNV, parameters) -#define GET_DeleteProgramsNV(disp) GET_by_offset(disp, _gloffset_DeleteProgramsNV) -#define SET_DeleteProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_DeleteProgramsNV, fn) -#define CALL_ExecuteProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ExecuteProgramNV, parameters) -#define GET_ExecuteProgramNV(disp) GET_by_offset(disp, _gloffset_ExecuteProgramNV) -#define SET_ExecuteProgramNV(disp, fn) SET_by_offset(disp, _gloffset_ExecuteProgramNV, fn) -#define CALL_GenProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenProgramsNV, parameters) -#define GET_GenProgramsNV(disp) GET_by_offset(disp, _gloffset_GenProgramsNV) -#define SET_GenProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_GenProgramsNV, fn) -#define CALL_GetProgramParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLdouble *)), _gloffset_GetProgramParameterdvNV, parameters) -#define GET_GetProgramParameterdvNV(disp) GET_by_offset(disp, _gloffset_GetProgramParameterdvNV) -#define SET_GetProgramParameterdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramParameterdvNV, fn) -#define CALL_GetProgramParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLfloat *)), _gloffset_GetProgramParameterfvNV, parameters) -#define GET_GetProgramParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetProgramParameterfvNV) -#define SET_GetProgramParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramParameterfvNV, fn) -#define CALL_GetProgramStringNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLubyte *)), _gloffset_GetProgramStringNV, parameters) -#define GET_GetProgramStringNV(disp) GET_by_offset(disp, _gloffset_GetProgramStringNV) -#define SET_GetProgramStringNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramStringNV, fn) -#define CALL_GetProgramivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetProgramivNV, parameters) -#define GET_GetProgramivNV(disp) GET_by_offset(disp, _gloffset_GetProgramivNV) -#define SET_GetProgramivNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramivNV, fn) -#define CALL_GetTrackMatrixivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), _gloffset_GetTrackMatrixivNV, parameters) -#define GET_GetTrackMatrixivNV(disp) GET_by_offset(disp, _gloffset_GetTrackMatrixivNV) -#define SET_GetTrackMatrixivNV(disp, fn) SET_by_offset(disp, _gloffset_GetTrackMatrixivNV, fn) -#define CALL_GetVertexAttribPointervNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLvoid **)), _gloffset_GetVertexAttribPointervNV, parameters) -#define GET_GetVertexAttribPointervNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribPointervNV) -#define SET_GetVertexAttribPointervNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribPointervNV, fn) -#define CALL_GetVertexAttribdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), _gloffset_GetVertexAttribdvNV, parameters) -#define GET_GetVertexAttribdvNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribdvNV) -#define SET_GetVertexAttribdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribdvNV, fn) -#define CALL_GetVertexAttribfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetVertexAttribfvNV, parameters) -#define GET_GetVertexAttribfvNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribfvNV) -#define SET_GetVertexAttribfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribfvNV, fn) -#define CALL_GetVertexAttribivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribivNV, parameters) -#define GET_GetVertexAttribivNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribivNV) -#define SET_GetVertexAttribivNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribivNV, fn) -#define CALL_IsProgramNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsProgramNV, parameters) -#define GET_IsProgramNV(disp) GET_by_offset(disp, _gloffset_IsProgramNV) -#define SET_IsProgramNV(disp, fn) SET_by_offset(disp, _gloffset_IsProgramNV, fn) -#define CALL_LoadProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLubyte *)), _gloffset_LoadProgramNV, parameters) -#define GET_LoadProgramNV(disp) GET_by_offset(disp, _gloffset_LoadProgramNV) -#define SET_LoadProgramNV(disp, fn) SET_by_offset(disp, _gloffset_LoadProgramNV, fn) -#define CALL_ProgramParameters4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLdouble *)), _gloffset_ProgramParameters4dvNV, parameters) -#define GET_ProgramParameters4dvNV(disp) GET_by_offset(disp, _gloffset_ProgramParameters4dvNV) -#define SET_ProgramParameters4dvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameters4dvNV, fn) -#define CALL_ProgramParameters4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramParameters4fvNV, parameters) -#define GET_ProgramParameters4fvNV(disp) GET_by_offset(disp, _gloffset_ProgramParameters4fvNV) -#define SET_ProgramParameters4fvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameters4fvNV, fn) -#define CALL_RequestResidentProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_RequestResidentProgramsNV, parameters) -#define GET_RequestResidentProgramsNV(disp) GET_by_offset(disp, _gloffset_RequestResidentProgramsNV) -#define SET_RequestResidentProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_RequestResidentProgramsNV, fn) -#define CALL_TrackMatrixNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLenum)), _gloffset_TrackMatrixNV, parameters) -#define GET_TrackMatrixNV(disp) GET_by_offset(disp, _gloffset_TrackMatrixNV) -#define SET_TrackMatrixNV(disp, fn) SET_by_offset(disp, _gloffset_TrackMatrixNV, fn) -#define CALL_VertexAttrib1dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), _gloffset_VertexAttrib1dNV, parameters) -#define GET_VertexAttrib1dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dNV) -#define SET_VertexAttrib1dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dNV, fn) -#define CALL_VertexAttrib1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib1dvNV, parameters) -#define GET_VertexAttrib1dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dvNV) -#define SET_VertexAttrib1dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dvNV, fn) -#define CALL_VertexAttrib1fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), _gloffset_VertexAttrib1fNV, parameters) -#define GET_VertexAttrib1fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fNV) -#define SET_VertexAttrib1fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fNV, fn) -#define CALL_VertexAttrib1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib1fvNV, parameters) -#define GET_VertexAttrib1fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fvNV) -#define SET_VertexAttrib1fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fvNV, fn) -#define CALL_VertexAttrib1sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), _gloffset_VertexAttrib1sNV, parameters) -#define GET_VertexAttrib1sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1sNV) -#define SET_VertexAttrib1sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1sNV, fn) -#define CALL_VertexAttrib1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib1svNV, parameters) -#define GET_VertexAttrib1svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1svNV) -#define SET_VertexAttrib1svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1svNV, fn) -#define CALL_VertexAttrib2dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), _gloffset_VertexAttrib2dNV, parameters) -#define GET_VertexAttrib2dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dNV) -#define SET_VertexAttrib2dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dNV, fn) -#define CALL_VertexAttrib2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib2dvNV, parameters) -#define GET_VertexAttrib2dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dvNV) -#define SET_VertexAttrib2dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dvNV, fn) -#define CALL_VertexAttrib2fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), _gloffset_VertexAttrib2fNV, parameters) -#define GET_VertexAttrib2fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fNV) -#define SET_VertexAttrib2fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fNV, fn) -#define CALL_VertexAttrib2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib2fvNV, parameters) -#define GET_VertexAttrib2fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fvNV) -#define SET_VertexAttrib2fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fvNV, fn) -#define CALL_VertexAttrib2sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), _gloffset_VertexAttrib2sNV, parameters) -#define GET_VertexAttrib2sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2sNV) -#define SET_VertexAttrib2sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2sNV, fn) -#define CALL_VertexAttrib2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib2svNV, parameters) -#define GET_VertexAttrib2svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2svNV) -#define SET_VertexAttrib2svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2svNV, fn) -#define CALL_VertexAttrib3dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib3dNV, parameters) -#define GET_VertexAttrib3dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dNV) -#define SET_VertexAttrib3dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dNV, fn) -#define CALL_VertexAttrib3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib3dvNV, parameters) -#define GET_VertexAttrib3dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dvNV) -#define SET_VertexAttrib3dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dvNV, fn) -#define CALL_VertexAttrib3fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib3fNV, parameters) -#define GET_VertexAttrib3fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fNV) -#define SET_VertexAttrib3fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fNV, fn) -#define CALL_VertexAttrib3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib3fvNV, parameters) -#define GET_VertexAttrib3fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fvNV) -#define SET_VertexAttrib3fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fvNV, fn) -#define CALL_VertexAttrib3sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib3sNV, parameters) -#define GET_VertexAttrib3sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3sNV) -#define SET_VertexAttrib3sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3sNV, fn) -#define CALL_VertexAttrib3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib3svNV, parameters) -#define GET_VertexAttrib3svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3svNV) -#define SET_VertexAttrib3svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3svNV, fn) -#define CALL_VertexAttrib4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib4dNV, parameters) -#define GET_VertexAttrib4dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dNV) -#define SET_VertexAttrib4dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dNV, fn) -#define CALL_VertexAttrib4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib4dvNV, parameters) -#define GET_VertexAttrib4dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dvNV) -#define SET_VertexAttrib4dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dvNV, fn) -#define CALL_VertexAttrib4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib4fNV, parameters) -#define GET_VertexAttrib4fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fNV) -#define SET_VertexAttrib4fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fNV, fn) -#define CALL_VertexAttrib4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib4fvNV, parameters) -#define GET_VertexAttrib4fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fvNV) -#define SET_VertexAttrib4fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fvNV, fn) -#define CALL_VertexAttrib4sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib4sNV, parameters) -#define GET_VertexAttrib4sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4sNV) -#define SET_VertexAttrib4sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4sNV, fn) -#define CALL_VertexAttrib4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4svNV, parameters) -#define GET_VertexAttrib4svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4svNV) -#define SET_VertexAttrib4svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4svNV, fn) -#define CALL_VertexAttrib4ubNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_VertexAttrib4ubNV, parameters) -#define GET_VertexAttrib4ubNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubNV) -#define SET_VertexAttrib4ubNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubNV, fn) -#define CALL_VertexAttrib4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4ubvNV, parameters) -#define GET_VertexAttrib4ubvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubvNV) -#define SET_VertexAttrib4ubvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubvNV, fn) -#define CALL_VertexAttribPointerNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexAttribPointerNV, parameters) -#define GET_VertexAttribPointerNV(disp) GET_by_offset(disp, _gloffset_VertexAttribPointerNV) -#define SET_VertexAttribPointerNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribPointerNV, fn) -#define CALL_VertexAttribs1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs1dvNV, parameters) -#define GET_VertexAttribs1dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1dvNV) -#define SET_VertexAttribs1dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1dvNV, fn) -#define CALL_VertexAttribs1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs1fvNV, parameters) -#define GET_VertexAttribs1fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1fvNV) -#define SET_VertexAttribs1fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1fvNV, fn) -#define CALL_VertexAttribs1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs1svNV, parameters) -#define GET_VertexAttribs1svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1svNV) -#define SET_VertexAttribs1svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1svNV, fn) -#define CALL_VertexAttribs2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs2dvNV, parameters) -#define GET_VertexAttribs2dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2dvNV) -#define SET_VertexAttribs2dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2dvNV, fn) -#define CALL_VertexAttribs2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs2fvNV, parameters) -#define GET_VertexAttribs2fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2fvNV) -#define SET_VertexAttribs2fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2fvNV, fn) -#define CALL_VertexAttribs2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs2svNV, parameters) -#define GET_VertexAttribs2svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2svNV) -#define SET_VertexAttribs2svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2svNV, fn) -#define CALL_VertexAttribs3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs3dvNV, parameters) -#define GET_VertexAttribs3dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3dvNV) -#define SET_VertexAttribs3dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3dvNV, fn) -#define CALL_VertexAttribs3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs3fvNV, parameters) -#define GET_VertexAttribs3fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3fvNV) -#define SET_VertexAttribs3fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3fvNV, fn) -#define CALL_VertexAttribs3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs3svNV, parameters) -#define GET_VertexAttribs3svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3svNV) -#define SET_VertexAttribs3svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3svNV, fn) -#define CALL_VertexAttribs4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs4dvNV, parameters) -#define GET_VertexAttribs4dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4dvNV) -#define SET_VertexAttribs4dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4dvNV, fn) -#define CALL_VertexAttribs4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs4fvNV, parameters) -#define GET_VertexAttribs4fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4fvNV) -#define SET_VertexAttribs4fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4fvNV, fn) -#define CALL_VertexAttribs4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs4svNV, parameters) -#define GET_VertexAttribs4svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4svNV) -#define SET_VertexAttribs4svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4svNV, fn) -#define CALL_VertexAttribs4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *)), _gloffset_VertexAttribs4ubvNV, parameters) -#define GET_VertexAttribs4ubvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4ubvNV) -#define SET_VertexAttribs4ubvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4ubvNV, fn) -#define CALL_GetTexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetTexBumpParameterfvATI, parameters) -#define GET_GetTexBumpParameterfvATI(disp) GET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI) -#define SET_GetTexBumpParameterfvATI(disp, fn) SET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI, fn) -#define CALL_GetTexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetTexBumpParameterivATI, parameters) -#define GET_GetTexBumpParameterivATI(disp) GET_by_offset(disp, _gloffset_GetTexBumpParameterivATI) -#define SET_GetTexBumpParameterivATI(disp, fn) SET_by_offset(disp, _gloffset_GetTexBumpParameterivATI, fn) -#define CALL_TexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_TexBumpParameterfvATI, parameters) -#define GET_TexBumpParameterfvATI(disp) GET_by_offset(disp, _gloffset_TexBumpParameterfvATI) -#define SET_TexBumpParameterfvATI(disp, fn) SET_by_offset(disp, _gloffset_TexBumpParameterfvATI, fn) -#define CALL_TexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_TexBumpParameterivATI, parameters) -#define GET_TexBumpParameterivATI(disp) GET_by_offset(disp, _gloffset_TexBumpParameterivATI) -#define SET_TexBumpParameterivATI(disp, fn) SET_by_offset(disp, _gloffset_TexBumpParameterivATI, fn) -#define CALL_AlphaFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp1ATI, parameters) -#define GET_AlphaFragmentOp1ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI) -#define SET_AlphaFragmentOp1ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI, fn) -#define CALL_AlphaFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp2ATI, parameters) -#define GET_AlphaFragmentOp2ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI) -#define SET_AlphaFragmentOp2ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI, fn) -#define CALL_AlphaFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp3ATI, parameters) -#define GET_AlphaFragmentOp3ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI) -#define SET_AlphaFragmentOp3ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI, fn) -#define CALL_BeginFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_BeginFragmentShaderATI, parameters) -#define GET_BeginFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_BeginFragmentShaderATI) -#define SET_BeginFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_BeginFragmentShaderATI, fn) -#define CALL_BindFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindFragmentShaderATI, parameters) -#define GET_BindFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_BindFragmentShaderATI) -#define SET_BindFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_BindFragmentShaderATI, fn) -#define CALL_ColorFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp1ATI, parameters) -#define GET_ColorFragmentOp1ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp1ATI) -#define SET_ColorFragmentOp1ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp1ATI, fn) -#define CALL_ColorFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp2ATI, parameters) -#define GET_ColorFragmentOp2ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp2ATI) -#define SET_ColorFragmentOp2ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp2ATI, fn) -#define CALL_ColorFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp3ATI, parameters) -#define GET_ColorFragmentOp3ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp3ATI) -#define SET_ColorFragmentOp3ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp3ATI, fn) -#define CALL_DeleteFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteFragmentShaderATI, parameters) -#define GET_DeleteFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_DeleteFragmentShaderATI) -#define SET_DeleteFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_DeleteFragmentShaderATI, fn) -#define CALL_EndFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndFragmentShaderATI, parameters) -#define GET_EndFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_EndFragmentShaderATI) -#define SET_EndFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_EndFragmentShaderATI, fn) -#define CALL_GenFragmentShadersATI(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLuint)), _gloffset_GenFragmentShadersATI, parameters) -#define GET_GenFragmentShadersATI(disp) GET_by_offset(disp, _gloffset_GenFragmentShadersATI) -#define SET_GenFragmentShadersATI(disp, fn) SET_by_offset(disp, _gloffset_GenFragmentShadersATI, fn) -#define CALL_PassTexCoordATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), _gloffset_PassTexCoordATI, parameters) -#define GET_PassTexCoordATI(disp) GET_by_offset(disp, _gloffset_PassTexCoordATI) -#define SET_PassTexCoordATI(disp, fn) SET_by_offset(disp, _gloffset_PassTexCoordATI, fn) -#define CALL_SampleMapATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), _gloffset_SampleMapATI, parameters) -#define GET_SampleMapATI(disp) GET_by_offset(disp, _gloffset_SampleMapATI) -#define SET_SampleMapATI(disp, fn) SET_by_offset(disp, _gloffset_SampleMapATI, fn) -#define CALL_SetFragmentShaderConstantATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_SetFragmentShaderConstantATI, parameters) -#define GET_SetFragmentShaderConstantATI(disp) GET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI) -#define SET_SetFragmentShaderConstantATI(disp, fn) SET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI, fn) -#define CALL_PointParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PointParameteriNV, parameters) -#define GET_PointParameteriNV(disp) GET_by_offset(disp, _gloffset_PointParameteriNV) -#define SET_PointParameteriNV(disp, fn) SET_by_offset(disp, _gloffset_PointParameteriNV, fn) -#define CALL_PointParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_PointParameterivNV, parameters) -#define GET_PointParameterivNV(disp) GET_by_offset(disp, _gloffset_PointParameterivNV) -#define SET_PointParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_PointParameterivNV, fn) -#define CALL_ActiveStencilFaceEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ActiveStencilFaceEXT, parameters) -#define GET_ActiveStencilFaceEXT(disp) GET_by_offset(disp, _gloffset_ActiveStencilFaceEXT) -#define SET_ActiveStencilFaceEXT(disp, fn) SET_by_offset(disp, _gloffset_ActiveStencilFaceEXT, fn) -#define CALL_BindVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindVertexArrayAPPLE, parameters) -#define GET_BindVertexArrayAPPLE(disp) GET_by_offset(disp, _gloffset_BindVertexArrayAPPLE) -#define SET_BindVertexArrayAPPLE(disp, fn) SET_by_offset(disp, _gloffset_BindVertexArrayAPPLE, fn) -#define CALL_DeleteVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteVertexArraysAPPLE, parameters) -#define GET_DeleteVertexArraysAPPLE(disp) GET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE) -#define SET_DeleteVertexArraysAPPLE(disp, fn) SET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE, fn) -#define CALL_GenVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenVertexArraysAPPLE, parameters) -#define GET_GenVertexArraysAPPLE(disp) GET_by_offset(disp, _gloffset_GenVertexArraysAPPLE) -#define SET_GenVertexArraysAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GenVertexArraysAPPLE, fn) -#define CALL_IsVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsVertexArrayAPPLE, parameters) -#define GET_IsVertexArrayAPPLE(disp) GET_by_offset(disp, _gloffset_IsVertexArrayAPPLE) -#define SET_IsVertexArrayAPPLE(disp, fn) SET_by_offset(disp, _gloffset_IsVertexArrayAPPLE, fn) -#define CALL_GetProgramNamedParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble *)), _gloffset_GetProgramNamedParameterdvNV, parameters) -#define GET_GetProgramNamedParameterdvNV(disp) GET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV) -#define SET_GetProgramNamedParameterdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV, fn) -#define CALL_GetProgramNamedParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat *)), _gloffset_GetProgramNamedParameterfvNV, parameters) -#define GET_GetProgramNamedParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV) -#define SET_GetProgramNamedParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV, fn) -#define CALL_ProgramNamedParameter4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramNamedParameter4dNV, parameters) -#define GET_ProgramNamedParameter4dNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV) -#define SET_ProgramNamedParameter4dNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV, fn) -#define CALL_ProgramNamedParameter4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLdouble *)), _gloffset_ProgramNamedParameter4dvNV, parameters) -#define GET_ProgramNamedParameter4dvNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV) -#define SET_ProgramNamedParameter4dvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV, fn) -#define CALL_ProgramNamedParameter4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramNamedParameter4fNV, parameters) -#define GET_ProgramNamedParameter4fNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV) -#define SET_ProgramNamedParameter4fNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV, fn) -#define CALL_ProgramNamedParameter4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLfloat *)), _gloffset_ProgramNamedParameter4fvNV, parameters) -#define GET_ProgramNamedParameter4fvNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV) -#define SET_ProgramNamedParameter4fvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV, fn) -#define CALL_PrimitiveRestartIndexNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_PrimitiveRestartIndexNV, parameters) -#define GET_PrimitiveRestartIndexNV(disp) GET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV) -#define SET_PrimitiveRestartIndexNV(disp, fn) SET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV, fn) -#define CALL_PrimitiveRestartNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PrimitiveRestartNV, parameters) -#define GET_PrimitiveRestartNV(disp) GET_by_offset(disp, _gloffset_PrimitiveRestartNV) -#define SET_PrimitiveRestartNV(disp, fn) SET_by_offset(disp, _gloffset_PrimitiveRestartNV, fn) -#define CALL_DepthBoundsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), _gloffset_DepthBoundsEXT, parameters) -#define GET_DepthBoundsEXT(disp) GET_by_offset(disp, _gloffset_DepthBoundsEXT) -#define SET_DepthBoundsEXT(disp, fn) SET_by_offset(disp, _gloffset_DepthBoundsEXT, fn) -#define CALL_BlendEquationSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_BlendEquationSeparateEXT, parameters) -#define GET_BlendEquationSeparateEXT(disp) GET_by_offset(disp, _gloffset_BlendEquationSeparateEXT) -#define SET_BlendEquationSeparateEXT(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationSeparateEXT, fn) -#define CALL_BindFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindFramebufferEXT, parameters) -#define GET_BindFramebufferEXT(disp) GET_by_offset(disp, _gloffset_BindFramebufferEXT) -#define SET_BindFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BindFramebufferEXT, fn) -#define CALL_BindRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindRenderbufferEXT, parameters) -#define GET_BindRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_BindRenderbufferEXT) -#define SET_BindRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BindRenderbufferEXT, fn) -#define CALL_CheckFramebufferStatusEXT(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum)), _gloffset_CheckFramebufferStatusEXT, parameters) -#define GET_CheckFramebufferStatusEXT(disp) GET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT) -#define SET_CheckFramebufferStatusEXT(disp, fn) SET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT, fn) -#define CALL_DeleteFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteFramebuffersEXT, parameters) -#define GET_DeleteFramebuffersEXT(disp) GET_by_offset(disp, _gloffset_DeleteFramebuffersEXT) -#define SET_DeleteFramebuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_DeleteFramebuffersEXT, fn) -#define CALL_DeleteRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteRenderbuffersEXT, parameters) -#define GET_DeleteRenderbuffersEXT(disp) GET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT) -#define SET_DeleteRenderbuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT, fn) -#define CALL_FramebufferRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint)), _gloffset_FramebufferRenderbufferEXT, parameters) -#define GET_FramebufferRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT) -#define SET_FramebufferRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT, fn) -#define CALL_FramebufferTexture1DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture1DEXT, parameters) -#define GET_FramebufferTexture1DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture1DEXT) -#define SET_FramebufferTexture1DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture1DEXT, fn) -#define CALL_FramebufferTexture2DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture2DEXT, parameters) -#define GET_FramebufferTexture2DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture2DEXT) -#define SET_FramebufferTexture2DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture2DEXT, fn) -#define CALL_FramebufferTexture3DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint, GLint)), _gloffset_FramebufferTexture3DEXT, parameters) -#define GET_FramebufferTexture3DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture3DEXT) -#define SET_FramebufferTexture3DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture3DEXT, fn) -#define CALL_GenFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenFramebuffersEXT, parameters) -#define GET_GenFramebuffersEXT(disp) GET_by_offset(disp, _gloffset_GenFramebuffersEXT) -#define SET_GenFramebuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_GenFramebuffersEXT, fn) -#define CALL_GenRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenRenderbuffersEXT, parameters) -#define GET_GenRenderbuffersEXT(disp) GET_by_offset(disp, _gloffset_GenRenderbuffersEXT) -#define SET_GenRenderbuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_GenRenderbuffersEXT, fn) -#define CALL_GenerateMipmapEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_GenerateMipmapEXT, parameters) -#define GET_GenerateMipmapEXT(disp) GET_by_offset(disp, _gloffset_GenerateMipmapEXT) -#define SET_GenerateMipmapEXT(disp, fn) SET_by_offset(disp, _gloffset_GenerateMipmapEXT, fn) -#define CALL_GetFramebufferAttachmentParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), _gloffset_GetFramebufferAttachmentParameterivEXT, parameters) -#define GET_GetFramebufferAttachmentParameterivEXT(disp) GET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT) -#define SET_GetFramebufferAttachmentParameterivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT, fn) -#define CALL_GetRenderbufferParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetRenderbufferParameterivEXT, parameters) -#define GET_GetRenderbufferParameterivEXT(disp) GET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT) -#define SET_GetRenderbufferParameterivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT, fn) -#define CALL_IsFramebufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsFramebufferEXT, parameters) -#define GET_IsFramebufferEXT(disp) GET_by_offset(disp, _gloffset_IsFramebufferEXT) -#define SET_IsFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_IsFramebufferEXT, fn) -#define CALL_IsRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsRenderbufferEXT, parameters) -#define GET_IsRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_IsRenderbufferEXT) -#define SET_IsRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_IsRenderbufferEXT, fn) -#define CALL_RenderbufferStorageEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei)), _gloffset_RenderbufferStorageEXT, parameters) -#define GET_RenderbufferStorageEXT(disp) GET_by_offset(disp, _gloffset_RenderbufferStorageEXT) -#define SET_RenderbufferStorageEXT(disp, fn) SET_by_offset(disp, _gloffset_RenderbufferStorageEXT, fn) -#define CALL_BlitFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)), _gloffset_BlitFramebufferEXT, parameters) -#define GET_BlitFramebufferEXT(disp) GET_by_offset(disp, _gloffset_BlitFramebufferEXT) -#define SET_BlitFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BlitFramebufferEXT, fn) -#define CALL_BufferParameteriAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_BufferParameteriAPPLE, parameters) -#define GET_BufferParameteriAPPLE(disp) GET_by_offset(disp, _gloffset_BufferParameteriAPPLE) -#define SET_BufferParameteriAPPLE(disp, fn) SET_by_offset(disp, _gloffset_BufferParameteriAPPLE, fn) -#define CALL_FlushMappedBufferRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr)), _gloffset_FlushMappedBufferRangeAPPLE, parameters) -#define GET_FlushMappedBufferRangeAPPLE(disp) GET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE) -#define SET_FlushMappedBufferRangeAPPLE(disp, fn) SET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE, fn) -#define CALL_BindFragDataLocationEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, const GLchar *)), _gloffset_BindFragDataLocationEXT, parameters) -#define GET_BindFragDataLocationEXT(disp) GET_by_offset(disp, _gloffset_BindFragDataLocationEXT) -#define SET_BindFragDataLocationEXT(disp, fn) SET_by_offset(disp, _gloffset_BindFragDataLocationEXT, fn) -#define CALL_GetFragDataLocationEXT(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLuint, const GLchar *)), _gloffset_GetFragDataLocationEXT, parameters) -#define GET_GetFragDataLocationEXT(disp) GET_by_offset(disp, _gloffset_GetFragDataLocationEXT) -#define SET_GetFragDataLocationEXT(disp, fn) SET_by_offset(disp, _gloffset_GetFragDataLocationEXT, fn) -#define CALL_GetUniformuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLuint *)), _gloffset_GetUniformuivEXT, parameters) -#define GET_GetUniformuivEXT(disp) GET_by_offset(disp, _gloffset_GetUniformuivEXT) -#define SET_GetUniformuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetUniformuivEXT, fn) -#define CALL_GetVertexAttribIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribIivEXT, parameters) -#define GET_GetVertexAttribIivEXT(disp) GET_by_offset(disp, _gloffset_GetVertexAttribIivEXT) -#define SET_GetVertexAttribIivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribIivEXT, fn) -#define CALL_GetVertexAttribIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetVertexAttribIuivEXT, parameters) -#define GET_GetVertexAttribIuivEXT(disp) GET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT) -#define SET_GetVertexAttribIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT, fn) -#define CALL_Uniform1uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint)), _gloffset_Uniform1uiEXT, parameters) -#define GET_Uniform1uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform1uiEXT) -#define SET_Uniform1uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform1uiEXT, fn) -#define CALL_Uniform1uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform1uivEXT, parameters) -#define GET_Uniform1uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform1uivEXT) -#define SET_Uniform1uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform1uivEXT, fn) -#define CALL_Uniform2uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint)), _gloffset_Uniform2uiEXT, parameters) -#define GET_Uniform2uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform2uiEXT) -#define SET_Uniform2uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform2uiEXT, fn) -#define CALL_Uniform2uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform2uivEXT, parameters) -#define GET_Uniform2uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform2uivEXT) -#define SET_Uniform2uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform2uivEXT, fn) -#define CALL_Uniform3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint, GLuint)), _gloffset_Uniform3uiEXT, parameters) -#define GET_Uniform3uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform3uiEXT) -#define SET_Uniform3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform3uiEXT, fn) -#define CALL_Uniform3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform3uivEXT, parameters) -#define GET_Uniform3uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform3uivEXT) -#define SET_Uniform3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform3uivEXT, fn) -#define CALL_Uniform4uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint, GLuint, GLuint)), _gloffset_Uniform4uiEXT, parameters) -#define GET_Uniform4uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform4uiEXT) -#define SET_Uniform4uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform4uiEXT, fn) -#define CALL_Uniform4uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform4uivEXT, parameters) -#define GET_Uniform4uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform4uivEXT) -#define SET_Uniform4uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform4uivEXT, fn) -#define CALL_VertexAttribI1iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint)), _gloffset_VertexAttribI1iEXT, parameters) -#define GET_VertexAttribI1iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1iEXT) -#define SET_VertexAttribI1iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1iEXT, fn) -#define CALL_VertexAttribI1ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI1ivEXT, parameters) -#define GET_VertexAttribI1ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1ivEXT) -#define SET_VertexAttribI1ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1ivEXT, fn) -#define CALL_VertexAttribI1uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribI1uiEXT, parameters) -#define GET_VertexAttribI1uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1uiEXT) -#define SET_VertexAttribI1uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1uiEXT, fn) -#define CALL_VertexAttribI1uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI1uivEXT, parameters) -#define GET_VertexAttribI1uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1uivEXT) -#define SET_VertexAttribI1uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1uivEXT, fn) -#define CALL_VertexAttribI2iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint)), _gloffset_VertexAttribI2iEXT, parameters) -#define GET_VertexAttribI2iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2iEXT) -#define SET_VertexAttribI2iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2iEXT, fn) -#define CALL_VertexAttribI2ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI2ivEXT, parameters) -#define GET_VertexAttribI2ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2ivEXT) -#define SET_VertexAttribI2ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2ivEXT, fn) -#define CALL_VertexAttribI2uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_VertexAttribI2uiEXT, parameters) -#define GET_VertexAttribI2uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2uiEXT) -#define SET_VertexAttribI2uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2uiEXT, fn) -#define CALL_VertexAttribI2uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI2uivEXT, parameters) -#define GET_VertexAttribI2uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2uivEXT) -#define SET_VertexAttribI2uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2uivEXT, fn) -#define CALL_VertexAttribI3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint, GLint)), _gloffset_VertexAttribI3iEXT, parameters) -#define GET_VertexAttribI3iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3iEXT) -#define SET_VertexAttribI3iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3iEXT, fn) -#define CALL_VertexAttribI3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI3ivEXT, parameters) -#define GET_VertexAttribI3ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3ivEXT) -#define SET_VertexAttribI3ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3ivEXT, fn) -#define CALL_VertexAttribI3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_VertexAttribI3uiEXT, parameters) -#define GET_VertexAttribI3uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3uiEXT) -#define SET_VertexAttribI3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3uiEXT, fn) -#define CALL_VertexAttribI3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI3uivEXT, parameters) -#define GET_VertexAttribI3uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3uivEXT) -#define SET_VertexAttribI3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3uivEXT, fn) -#define CALL_VertexAttribI4bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttribI4bvEXT, parameters) -#define GET_VertexAttribI4bvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4bvEXT) -#define SET_VertexAttribI4bvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4bvEXT, fn) -#define CALL_VertexAttribI4iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint, GLint, GLint)), _gloffset_VertexAttribI4iEXT, parameters) -#define GET_VertexAttribI4iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4iEXT) -#define SET_VertexAttribI4iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4iEXT, fn) -#define CALL_VertexAttribI4ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI4ivEXT, parameters) -#define GET_VertexAttribI4ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4ivEXT) -#define SET_VertexAttribI4ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4ivEXT, fn) -#define CALL_VertexAttribI4svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttribI4svEXT, parameters) -#define GET_VertexAttribI4svEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4svEXT) -#define SET_VertexAttribI4svEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4svEXT, fn) -#define CALL_VertexAttribI4ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttribI4ubvEXT, parameters) -#define GET_VertexAttribI4ubvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT) -#define SET_VertexAttribI4ubvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT, fn) -#define CALL_VertexAttribI4uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_VertexAttribI4uiEXT, parameters) -#define GET_VertexAttribI4uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4uiEXT) -#define SET_VertexAttribI4uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4uiEXT, fn) -#define CALL_VertexAttribI4uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI4uivEXT, parameters) -#define GET_VertexAttribI4uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4uivEXT) -#define SET_VertexAttribI4uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4uivEXT, fn) -#define CALL_VertexAttribI4usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttribI4usvEXT, parameters) -#define GET_VertexAttribI4usvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4usvEXT) -#define SET_VertexAttribI4usvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4usvEXT, fn) -#define CALL_VertexAttribIPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexAttribIPointerEXT, parameters) -#define GET_VertexAttribIPointerEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribIPointerEXT) -#define SET_VertexAttribIPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribIPointerEXT, fn) -#define CALL_FramebufferTextureLayerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLint)), _gloffset_FramebufferTextureLayerEXT, parameters) -#define GET_FramebufferTextureLayerEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT) -#define SET_FramebufferTextureLayerEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT, fn) -#define CALL_ColorMaskIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean)), _gloffset_ColorMaskIndexedEXT, parameters) -#define GET_ColorMaskIndexedEXT(disp) GET_by_offset(disp, _gloffset_ColorMaskIndexedEXT) -#define SET_ColorMaskIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_ColorMaskIndexedEXT, fn) -#define CALL_DisableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_DisableIndexedEXT, parameters) -#define GET_DisableIndexedEXT(disp) GET_by_offset(disp, _gloffset_DisableIndexedEXT) -#define SET_DisableIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_DisableIndexedEXT, fn) -#define CALL_EnableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_EnableIndexedEXT, parameters) -#define GET_EnableIndexedEXT(disp) GET_by_offset(disp, _gloffset_EnableIndexedEXT) -#define SET_EnableIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_EnableIndexedEXT, fn) -#define CALL_GetBooleanIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLboolean *)), _gloffset_GetBooleanIndexedvEXT, parameters) -#define GET_GetBooleanIndexedvEXT(disp) GET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT) -#define SET_GetBooleanIndexedvEXT(disp, fn) SET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT, fn) -#define CALL_GetIntegerIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint *)), _gloffset_GetIntegerIndexedvEXT, parameters) -#define GET_GetIntegerIndexedvEXT(disp) GET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT) -#define SET_GetIntegerIndexedvEXT(disp, fn) SET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT, fn) -#define CALL_IsEnabledIndexedEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_IsEnabledIndexedEXT, parameters) -#define GET_IsEnabledIndexedEXT(disp) GET_by_offset(disp, _gloffset_IsEnabledIndexedEXT) -#define SET_IsEnabledIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_IsEnabledIndexedEXT, fn) -#define CALL_ClearColorIiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_ClearColorIiEXT, parameters) -#define GET_ClearColorIiEXT(disp) GET_by_offset(disp, _gloffset_ClearColorIiEXT) -#define SET_ClearColorIiEXT(disp, fn) SET_by_offset(disp, _gloffset_ClearColorIiEXT, fn) -#define CALL_ClearColorIuiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_ClearColorIuiEXT, parameters) -#define GET_ClearColorIuiEXT(disp) GET_by_offset(disp, _gloffset_ClearColorIuiEXT) -#define SET_ClearColorIuiEXT(disp, fn) SET_by_offset(disp, _gloffset_ClearColorIuiEXT, fn) -#define CALL_GetTexParameterIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexParameterIivEXT, parameters) -#define GET_GetTexParameterIivEXT(disp) GET_by_offset(disp, _gloffset_GetTexParameterIivEXT) -#define SET_GetTexParameterIivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterIivEXT, fn) -#define CALL_GetTexParameterIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint *)), _gloffset_GetTexParameterIuivEXT, parameters) -#define GET_GetTexParameterIuivEXT(disp) GET_by_offset(disp, _gloffset_GetTexParameterIuivEXT) -#define SET_GetTexParameterIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterIuivEXT, fn) -#define CALL_TexParameterIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexParameterIivEXT, parameters) -#define GET_TexParameterIivEXT(disp) GET_by_offset(disp, _gloffset_TexParameterIivEXT) -#define SET_TexParameterIivEXT(disp, fn) SET_by_offset(disp, _gloffset_TexParameterIivEXT, fn) -#define CALL_TexParameterIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLuint *)), _gloffset_TexParameterIuivEXT, parameters) -#define GET_TexParameterIuivEXT(disp) GET_by_offset(disp, _gloffset_TexParameterIuivEXT) -#define SET_TexParameterIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_TexParameterIuivEXT, fn) -#define CALL_BeginConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_BeginConditionalRenderNV, parameters) -#define GET_BeginConditionalRenderNV(disp) GET_by_offset(disp, _gloffset_BeginConditionalRenderNV) -#define SET_BeginConditionalRenderNV(disp, fn) SET_by_offset(disp, _gloffset_BeginConditionalRenderNV, fn) -#define CALL_EndConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndConditionalRenderNV, parameters) -#define GET_EndConditionalRenderNV(disp) GET_by_offset(disp, _gloffset_EndConditionalRenderNV) -#define SET_EndConditionalRenderNV(disp, fn) SET_by_offset(disp, _gloffset_EndConditionalRenderNV, fn) -#define CALL_BeginTransformFeedbackEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_BeginTransformFeedbackEXT, parameters) -#define GET_BeginTransformFeedbackEXT(disp) GET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT) -#define SET_BeginTransformFeedbackEXT(disp, fn) SET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT, fn) -#define CALL_BindBufferBaseEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint)), _gloffset_BindBufferBaseEXT, parameters) -#define GET_BindBufferBaseEXT(disp) GET_by_offset(disp, _gloffset_BindBufferBaseEXT) -#define SET_BindBufferBaseEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferBaseEXT, fn) -#define CALL_BindBufferOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLintptr)), _gloffset_BindBufferOffsetEXT, parameters) -#define GET_BindBufferOffsetEXT(disp) GET_by_offset(disp, _gloffset_BindBufferOffsetEXT) -#define SET_BindBufferOffsetEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferOffsetEXT, fn) -#define CALL_BindBufferRangeEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr)), _gloffset_BindBufferRangeEXT, parameters) -#define GET_BindBufferRangeEXT(disp) GET_by_offset(disp, _gloffset_BindBufferRangeEXT) -#define SET_BindBufferRangeEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferRangeEXT, fn) -#define CALL_EndTransformFeedbackEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndTransformFeedbackEXT, parameters) -#define GET_EndTransformFeedbackEXT(disp) GET_by_offset(disp, _gloffset_EndTransformFeedbackEXT) -#define SET_EndTransformFeedbackEXT(disp, fn) SET_by_offset(disp, _gloffset_EndTransformFeedbackEXT, fn) -#define CALL_GetTransformFeedbackVaryingEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *)), _gloffset_GetTransformFeedbackVaryingEXT, parameters) -#define GET_GetTransformFeedbackVaryingEXT(disp) GET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT) -#define SET_GetTransformFeedbackVaryingEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT, fn) -#define CALL_TransformFeedbackVaryingsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const char **, GLenum)), _gloffset_TransformFeedbackVaryingsEXT, parameters) -#define GET_TransformFeedbackVaryingsEXT(disp) GET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT) -#define SET_TransformFeedbackVaryingsEXT(disp, fn) SET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT, fn) -#define CALL_ProvokingVertexEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ProvokingVertexEXT, parameters) -#define GET_ProvokingVertexEXT(disp) GET_by_offset(disp, _gloffset_ProvokingVertexEXT) -#define SET_ProvokingVertexEXT(disp, fn) SET_by_offset(disp, _gloffset_ProvokingVertexEXT, fn) -#define CALL_GetTexParameterPointervAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), _gloffset_GetTexParameterPointervAPPLE, parameters) -#define GET_GetTexParameterPointervAPPLE(disp) GET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE) -#define SET_GetTexParameterPointervAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE, fn) -#define CALL_TextureRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLvoid *)), _gloffset_TextureRangeAPPLE, parameters) -#define GET_TextureRangeAPPLE(disp) GET_by_offset(disp, _gloffset_TextureRangeAPPLE) -#define SET_TextureRangeAPPLE(disp, fn) SET_by_offset(disp, _gloffset_TextureRangeAPPLE, fn) -#define CALL_GetObjectParameterivAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), _gloffset_GetObjectParameterivAPPLE, parameters) -#define GET_GetObjectParameterivAPPLE(disp) GET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE) -#define SET_GetObjectParameterivAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE, fn) -#define CALL_ObjectPurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), _gloffset_ObjectPurgeableAPPLE, parameters) -#define GET_ObjectPurgeableAPPLE(disp) GET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE) -#define SET_ObjectPurgeableAPPLE(disp, fn) SET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE, fn) -#define CALL_ObjectUnpurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), _gloffset_ObjectUnpurgeableAPPLE, parameters) -#define GET_ObjectUnpurgeableAPPLE(disp) GET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE) -#define SET_ObjectUnpurgeableAPPLE(disp, fn) SET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE, fn) -#define CALL_ActiveProgramEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_ActiveProgramEXT, parameters) -#define GET_ActiveProgramEXT(disp) GET_by_offset(disp, _gloffset_ActiveProgramEXT) -#define SET_ActiveProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_ActiveProgramEXT, fn) -#define CALL_CreateShaderProgramEXT(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum, const GLchar *)), _gloffset_CreateShaderProgramEXT, parameters) -#define GET_CreateShaderProgramEXT(disp) GET_by_offset(disp, _gloffset_CreateShaderProgramEXT) -#define SET_CreateShaderProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_CreateShaderProgramEXT, fn) -#define CALL_UseShaderProgramEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_UseShaderProgramEXT, parameters) -#define GET_UseShaderProgramEXT(disp) GET_by_offset(disp, _gloffset_UseShaderProgramEXT) -#define SET_UseShaderProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_UseShaderProgramEXT, fn) -#define CALL_TextureBarrierNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_TextureBarrierNV, parameters) -#define GET_TextureBarrierNV(disp) GET_by_offset(disp, _gloffset_TextureBarrierNV) -#define SET_TextureBarrierNV(disp, fn) SET_by_offset(disp, _gloffset_TextureBarrierNV, fn) -#define CALL_StencilFuncSeparateATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), _gloffset_StencilFuncSeparateATI, parameters) -#define GET_StencilFuncSeparateATI(disp) GET_by_offset(disp, _gloffset_StencilFuncSeparateATI) -#define SET_StencilFuncSeparateATI(disp, fn) SET_by_offset(disp, _gloffset_StencilFuncSeparateATI, fn) -#define CALL_ProgramEnvParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramEnvParameters4fvEXT, parameters) -#define GET_ProgramEnvParameters4fvEXT(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT) -#define SET_ProgramEnvParameters4fvEXT(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT, fn) -#define CALL_ProgramLocalParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramLocalParameters4fvEXT, parameters) -#define GET_ProgramLocalParameters4fvEXT(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT) -#define SET_ProgramLocalParameters4fvEXT(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT, fn) -#define CALL_GetQueryObjecti64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint64EXT *)), _gloffset_GetQueryObjecti64vEXT, parameters) -#define GET_GetQueryObjecti64vEXT(disp) GET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT) -#define SET_GetQueryObjecti64vEXT(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT, fn) -#define CALL_GetQueryObjectui64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint64EXT *)), _gloffset_GetQueryObjectui64vEXT, parameters) -#define GET_GetQueryObjectui64vEXT(disp) GET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT) -#define SET_GetQueryObjectui64vEXT(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT, fn) -#define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), _gloffset_EGLImageTargetRenderbufferStorageOES, parameters) -#define GET_EGLImageTargetRenderbufferStorageOES(disp) GET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES) -#define SET_EGLImageTargetRenderbufferStorageOES(disp, fn) SET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES, fn) -#define CALL_EGLImageTargetTexture2DOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), _gloffset_EGLImageTargetTexture2DOES, parameters) -#define GET_EGLImageTargetTexture2DOES(disp) GET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES) -#define SET_EGLImageTargetTexture2DOES(disp, fn) SET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES, fn) - -#endif /* !defined( _GLAPI_DISPATCH_H_ ) */ +/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */
+
+/*
+ * (C) Copyright IBM Corporation 2005
+ * All Rights Reserved.
+ *
+ * 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, sub license,
+ * 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 (including the next
+ * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL
+ * IBM,
+ * AND/OR THEIR SUPPLIERS 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.
+ */
+
+#if !defined( _GLAPI_DISPATCH_H_ )
+# define _GLAPI_DISPATCH_H_
+
+
+/* this file should not be included directly in mesa */
+
+/**
+ * \file glapidispatch.h
+ * Macros for handling GL dispatch tables.
+ *
+ * For each known GL function, there are 3 macros in this file. The first
+ * macro is named CALL_FuncName and is used to call that GL function using
+ * the specified dispatch table. The other 2 macros, called GET_FuncName
+ * can SET_FuncName, are used to get and set the dispatch pointer for the
+ * named function in the specified dispatch table.
+ */
+
+#define CALL_by_offset(disp, cast, offset, parameters) \
+ (*(cast (GET_by_offset(disp, offset)))) parameters
+#define GET_by_offset(disp, offset) \
+ (offset >= 0) ? (((_glapi_proc *)(disp))[offset]) : NULL
+#define SET_by_offset(disp, offset, fn) \
+ do { \
+ if ( (offset) < 0 ) { \
+ /* fprintf( stderr, "[%s:%u] SET_by_offset(%p, %d, %s)!\n", */ \
+ /* __func__, __LINE__, disp, offset, # fn); */ \
+ /* abort(); */ \
+ } \
+ else { \
+ ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \
+ } \
+ } while(0)
+
+/* total number of offsets below */
+#define _gloffset_COUNT 894
+
+#define _gloffset_NewList 0
+#define _gloffset_EndList 1
+#define _gloffset_CallList 2
+#define _gloffset_CallLists 3
+#define _gloffset_DeleteLists 4
+#define _gloffset_GenLists 5
+#define _gloffset_ListBase 6
+#define _gloffset_Begin 7
+#define _gloffset_Bitmap 8
+#define _gloffset_Color3b 9
+#define _gloffset_Color3bv 10
+#define _gloffset_Color3d 11
+#define _gloffset_Color3dv 12
+#define _gloffset_Color3f 13
+#define _gloffset_Color3fv 14
+#define _gloffset_Color3i 15
+#define _gloffset_Color3iv 16
+#define _gloffset_Color3s 17
+#define _gloffset_Color3sv 18
+#define _gloffset_Color3ub 19
+#define _gloffset_Color3ubv 20
+#define _gloffset_Color3ui 21
+#define _gloffset_Color3uiv 22
+#define _gloffset_Color3us 23
+#define _gloffset_Color3usv 24
+#define _gloffset_Color4b 25
+#define _gloffset_Color4bv 26
+#define _gloffset_Color4d 27
+#define _gloffset_Color4dv 28
+#define _gloffset_Color4f 29
+#define _gloffset_Color4fv 30
+#define _gloffset_Color4i 31
+#define _gloffset_Color4iv 32
+#define _gloffset_Color4s 33
+#define _gloffset_Color4sv 34
+#define _gloffset_Color4ub 35
+#define _gloffset_Color4ubv 36
+#define _gloffset_Color4ui 37
+#define _gloffset_Color4uiv 38
+#define _gloffset_Color4us 39
+#define _gloffset_Color4usv 40
+#define _gloffset_EdgeFlag 41
+#define _gloffset_EdgeFlagv 42
+#define _gloffset_End 43
+#define _gloffset_Indexd 44
+#define _gloffset_Indexdv 45
+#define _gloffset_Indexf 46
+#define _gloffset_Indexfv 47
+#define _gloffset_Indexi 48
+#define _gloffset_Indexiv 49
+#define _gloffset_Indexs 50
+#define _gloffset_Indexsv 51
+#define _gloffset_Normal3b 52
+#define _gloffset_Normal3bv 53
+#define _gloffset_Normal3d 54
+#define _gloffset_Normal3dv 55
+#define _gloffset_Normal3f 56
+#define _gloffset_Normal3fv 57
+#define _gloffset_Normal3i 58
+#define _gloffset_Normal3iv 59
+#define _gloffset_Normal3s 60
+#define _gloffset_Normal3sv 61
+#define _gloffset_RasterPos2d 62
+#define _gloffset_RasterPos2dv 63
+#define _gloffset_RasterPos2f 64
+#define _gloffset_RasterPos2fv 65
+#define _gloffset_RasterPos2i 66
+#define _gloffset_RasterPos2iv 67
+#define _gloffset_RasterPos2s 68
+#define _gloffset_RasterPos2sv 69
+#define _gloffset_RasterPos3d 70
+#define _gloffset_RasterPos3dv 71
+#define _gloffset_RasterPos3f 72
+#define _gloffset_RasterPos3fv 73
+#define _gloffset_RasterPos3i 74
+#define _gloffset_RasterPos3iv 75
+#define _gloffset_RasterPos3s 76
+#define _gloffset_RasterPos3sv 77
+#define _gloffset_RasterPos4d 78
+#define _gloffset_RasterPos4dv 79
+#define _gloffset_RasterPos4f 80
+#define _gloffset_RasterPos4fv 81
+#define _gloffset_RasterPos4i 82
+#define _gloffset_RasterPos4iv 83
+#define _gloffset_RasterPos4s 84
+#define _gloffset_RasterPos4sv 85
+#define _gloffset_Rectd 86
+#define _gloffset_Rectdv 87
+#define _gloffset_Rectf 88
+#define _gloffset_Rectfv 89
+#define _gloffset_Recti 90
+#define _gloffset_Rectiv 91
+#define _gloffset_Rects 92
+#define _gloffset_Rectsv 93
+#define _gloffset_TexCoord1d 94
+#define _gloffset_TexCoord1dv 95
+#define _gloffset_TexCoord1f 96
+#define _gloffset_TexCoord1fv 97
+#define _gloffset_TexCoord1i 98
+#define _gloffset_TexCoord1iv 99
+#define _gloffset_TexCoord1s 100
+#define _gloffset_TexCoord1sv 101
+#define _gloffset_TexCoord2d 102
+#define _gloffset_TexCoord2dv 103
+#define _gloffset_TexCoord2f 104
+#define _gloffset_TexCoord2fv 105
+#define _gloffset_TexCoord2i 106
+#define _gloffset_TexCoord2iv 107
+#define _gloffset_TexCoord2s 108
+#define _gloffset_TexCoord2sv 109
+#define _gloffset_TexCoord3d 110
+#define _gloffset_TexCoord3dv 111
+#define _gloffset_TexCoord3f 112
+#define _gloffset_TexCoord3fv 113
+#define _gloffset_TexCoord3i 114
+#define _gloffset_TexCoord3iv 115
+#define _gloffset_TexCoord3s 116
+#define _gloffset_TexCoord3sv 117
+#define _gloffset_TexCoord4d 118
+#define _gloffset_TexCoord4dv 119
+#define _gloffset_TexCoord4f 120
+#define _gloffset_TexCoord4fv 121
+#define _gloffset_TexCoord4i 122
+#define _gloffset_TexCoord4iv 123
+#define _gloffset_TexCoord4s 124
+#define _gloffset_TexCoord4sv 125
+#define _gloffset_Vertex2d 126
+#define _gloffset_Vertex2dv 127
+#define _gloffset_Vertex2f 128
+#define _gloffset_Vertex2fv 129
+#define _gloffset_Vertex2i 130
+#define _gloffset_Vertex2iv 131
+#define _gloffset_Vertex2s 132
+#define _gloffset_Vertex2sv 133
+#define _gloffset_Vertex3d 134
+#define _gloffset_Vertex3dv 135
+#define _gloffset_Vertex3f 136
+#define _gloffset_Vertex3fv 137
+#define _gloffset_Vertex3i 138
+#define _gloffset_Vertex3iv 139
+#define _gloffset_Vertex3s 140
+#define _gloffset_Vertex3sv 141
+#define _gloffset_Vertex4d 142
+#define _gloffset_Vertex4dv 143
+#define _gloffset_Vertex4f 144
+#define _gloffset_Vertex4fv 145
+#define _gloffset_Vertex4i 146
+#define _gloffset_Vertex4iv 147
+#define _gloffset_Vertex4s 148
+#define _gloffset_Vertex4sv 149
+#define _gloffset_ClipPlane 150
+#define _gloffset_ColorMaterial 151
+#define _gloffset_CullFace 152
+#define _gloffset_Fogf 153
+#define _gloffset_Fogfv 154
+#define _gloffset_Fogi 155
+#define _gloffset_Fogiv 156
+#define _gloffset_FrontFace 157
+#define _gloffset_Hint 158
+#define _gloffset_Lightf 159
+#define _gloffset_Lightfv 160
+#define _gloffset_Lighti 161
+#define _gloffset_Lightiv 162
+#define _gloffset_LightModelf 163
+#define _gloffset_LightModelfv 164
+#define _gloffset_LightModeli 165
+#define _gloffset_LightModeliv 166
+#define _gloffset_LineStipple 167
+#define _gloffset_LineWidth 168
+#define _gloffset_Materialf 169
+#define _gloffset_Materialfv 170
+#define _gloffset_Materiali 171
+#define _gloffset_Materialiv 172
+#define _gloffset_PointSize 173
+#define _gloffset_PolygonMode 174
+#define _gloffset_PolygonStipple 175
+#define _gloffset_Scissor 176
+#define _gloffset_ShadeModel 177
+#define _gloffset_TexParameterf 178
+#define _gloffset_TexParameterfv 179
+#define _gloffset_TexParameteri 180
+#define _gloffset_TexParameteriv 181
+#define _gloffset_TexImage1D 182
+#define _gloffset_TexImage2D 183
+#define _gloffset_TexEnvf 184
+#define _gloffset_TexEnvfv 185
+#define _gloffset_TexEnvi 186
+#define _gloffset_TexEnviv 187
+#define _gloffset_TexGend 188
+#define _gloffset_TexGendv 189
+#define _gloffset_TexGenf 190
+#define _gloffset_TexGenfv 191
+#define _gloffset_TexGeni 192
+#define _gloffset_TexGeniv 193
+#define _gloffset_FeedbackBuffer 194
+#define _gloffset_SelectBuffer 195
+#define _gloffset_RenderMode 196
+#define _gloffset_InitNames 197
+#define _gloffset_LoadName 198
+#define _gloffset_PassThrough 199
+#define _gloffset_PopName 200
+#define _gloffset_PushName 201
+#define _gloffset_DrawBuffer 202
+#define _gloffset_Clear 203
+#define _gloffset_ClearAccum 204
+#define _gloffset_ClearIndex 205
+#define _gloffset_ClearColor 206
+#define _gloffset_ClearStencil 207
+#define _gloffset_ClearDepth 208
+#define _gloffset_StencilMask 209
+#define _gloffset_ColorMask 210
+#define _gloffset_DepthMask 211
+#define _gloffset_IndexMask 212
+#define _gloffset_Accum 213
+#define _gloffset_Disable 214
+#define _gloffset_Enable 215
+#define _gloffset_Finish 216
+#define _gloffset_Flush 217
+#define _gloffset_PopAttrib 218
+#define _gloffset_PushAttrib 219
+#define _gloffset_Map1d 220
+#define _gloffset_Map1f 221
+#define _gloffset_Map2d 222
+#define _gloffset_Map2f 223
+#define _gloffset_MapGrid1d 224
+#define _gloffset_MapGrid1f 225
+#define _gloffset_MapGrid2d 226
+#define _gloffset_MapGrid2f 227
+#define _gloffset_EvalCoord1d 228
+#define _gloffset_EvalCoord1dv 229
+#define _gloffset_EvalCoord1f 230
+#define _gloffset_EvalCoord1fv 231
+#define _gloffset_EvalCoord2d 232
+#define _gloffset_EvalCoord2dv 233
+#define _gloffset_EvalCoord2f 234
+#define _gloffset_EvalCoord2fv 235
+#define _gloffset_EvalMesh1 236
+#define _gloffset_EvalPoint1 237
+#define _gloffset_EvalMesh2 238
+#define _gloffset_EvalPoint2 239
+#define _gloffset_AlphaFunc 240
+#define _gloffset_BlendFunc 241
+#define _gloffset_LogicOp 242
+#define _gloffset_StencilFunc 243
+#define _gloffset_StencilOp 244
+#define _gloffset_DepthFunc 245
+#define _gloffset_PixelZoom 246
+#define _gloffset_PixelTransferf 247
+#define _gloffset_PixelTransferi 248
+#define _gloffset_PixelStoref 249
+#define _gloffset_PixelStorei 250
+#define _gloffset_PixelMapfv 251
+#define _gloffset_PixelMapuiv 252
+#define _gloffset_PixelMapusv 253
+#define _gloffset_ReadBuffer 254
+#define _gloffset_CopyPixels 255
+#define _gloffset_ReadPixels 256
+#define _gloffset_DrawPixels 257
+#define _gloffset_GetBooleanv 258
+#define _gloffset_GetClipPlane 259
+#define _gloffset_GetDoublev 260
+#define _gloffset_GetError 261
+#define _gloffset_GetFloatv 262
+#define _gloffset_GetIntegerv 263
+#define _gloffset_GetLightfv 264
+#define _gloffset_GetLightiv 265
+#define _gloffset_GetMapdv 266
+#define _gloffset_GetMapfv 267
+#define _gloffset_GetMapiv 268
+#define _gloffset_GetMaterialfv 269
+#define _gloffset_GetMaterialiv 270
+#define _gloffset_GetPixelMapfv 271
+#define _gloffset_GetPixelMapuiv 272
+#define _gloffset_GetPixelMapusv 273
+#define _gloffset_GetPolygonStipple 274
+#define _gloffset_GetString 275
+#define _gloffset_GetTexEnvfv 276
+#define _gloffset_GetTexEnviv 277
+#define _gloffset_GetTexGendv 278
+#define _gloffset_GetTexGenfv 279
+#define _gloffset_GetTexGeniv 280
+#define _gloffset_GetTexImage 281
+#define _gloffset_GetTexParameterfv 282
+#define _gloffset_GetTexParameteriv 283
+#define _gloffset_GetTexLevelParameterfv 284
+#define _gloffset_GetTexLevelParameteriv 285
+#define _gloffset_IsEnabled 286
+#define _gloffset_IsList 287
+#define _gloffset_DepthRange 288
+#define _gloffset_Frustum 289
+#define _gloffset_LoadIdentity 290
+#define _gloffset_LoadMatrixf 291
+#define _gloffset_LoadMatrixd 292
+#define _gloffset_MatrixMode 293
+#define _gloffset_MultMatrixf 294
+#define _gloffset_MultMatrixd 295
+#define _gloffset_Ortho 296
+#define _gloffset_PopMatrix 297
+#define _gloffset_PushMatrix 298
+#define _gloffset_Rotated 299
+#define _gloffset_Rotatef 300
+#define _gloffset_Scaled 301
+#define _gloffset_Scalef 302
+#define _gloffset_Translated 303
+#define _gloffset_Translatef 304
+#define _gloffset_Viewport 305
+#define _gloffset_ArrayElement 306
+#define _gloffset_BindTexture 307
+#define _gloffset_ColorPointer 308
+#define _gloffset_DisableClientState 309
+#define _gloffset_DrawArrays 310
+#define _gloffset_DrawElements 311
+#define _gloffset_EdgeFlagPointer 312
+#define _gloffset_EnableClientState 313
+#define _gloffset_IndexPointer 314
+#define _gloffset_Indexub 315
+#define _gloffset_Indexubv 316
+#define _gloffset_InterleavedArrays 317
+#define _gloffset_NormalPointer 318
+#define _gloffset_PolygonOffset 319
+#define _gloffset_TexCoordPointer 320
+#define _gloffset_VertexPointer 321
+#define _gloffset_AreTexturesResident 322
+#define _gloffset_CopyTexImage1D 323
+#define _gloffset_CopyTexImage2D 324
+#define _gloffset_CopyTexSubImage1D 325
+#define _gloffset_CopyTexSubImage2D 326
+#define _gloffset_DeleteTextures 327
+#define _gloffset_GenTextures 328
+#define _gloffset_GetPointerv 329
+#define _gloffset_IsTexture 330
+#define _gloffset_PrioritizeTextures 331
+#define _gloffset_TexSubImage1D 332
+#define _gloffset_TexSubImage2D 333
+#define _gloffset_PopClientAttrib 334
+#define _gloffset_PushClientAttrib 335
+#define _gloffset_BlendColor 336
+#define _gloffset_BlendEquation 337
+#define _gloffset_DrawRangeElements 338
+#define _gloffset_ColorTable 339
+#define _gloffset_ColorTableParameterfv 340
+#define _gloffset_ColorTableParameteriv 341
+#define _gloffset_CopyColorTable 342
+#define _gloffset_GetColorTable 343
+#define _gloffset_GetColorTableParameterfv 344
+#define _gloffset_GetColorTableParameteriv 345
+#define _gloffset_ColorSubTable 346
+#define _gloffset_CopyColorSubTable 347
+#define _gloffset_ConvolutionFilter1D 348
+#define _gloffset_ConvolutionFilter2D 349
+#define _gloffset_ConvolutionParameterf 350
+#define _gloffset_ConvolutionParameterfv 351
+#define _gloffset_ConvolutionParameteri 352
+#define _gloffset_ConvolutionParameteriv 353
+#define _gloffset_CopyConvolutionFilter1D 354
+#define _gloffset_CopyConvolutionFilter2D 355
+#define _gloffset_GetConvolutionFilter 356
+#define _gloffset_GetConvolutionParameterfv 357
+#define _gloffset_GetConvolutionParameteriv 358
+#define _gloffset_GetSeparableFilter 359
+#define _gloffset_SeparableFilter2D 360
+#define _gloffset_GetHistogram 361
+#define _gloffset_GetHistogramParameterfv 362
+#define _gloffset_GetHistogramParameteriv 363
+#define _gloffset_GetMinmax 364
+#define _gloffset_GetMinmaxParameterfv 365
+#define _gloffset_GetMinmaxParameteriv 366
+#define _gloffset_Histogram 367
+#define _gloffset_Minmax 368
+#define _gloffset_ResetHistogram 369
+#define _gloffset_ResetMinmax 370
+#define _gloffset_TexImage3D 371
+#define _gloffset_TexSubImage3D 372
+#define _gloffset_CopyTexSubImage3D 373
+#define _gloffset_ActiveTextureARB 374
+#define _gloffset_ClientActiveTextureARB 375
+#define _gloffset_MultiTexCoord1dARB 376
+#define _gloffset_MultiTexCoord1dvARB 377
+#define _gloffset_MultiTexCoord1fARB 378
+#define _gloffset_MultiTexCoord1fvARB 379
+#define _gloffset_MultiTexCoord1iARB 380
+#define _gloffset_MultiTexCoord1ivARB 381
+#define _gloffset_MultiTexCoord1sARB 382
+#define _gloffset_MultiTexCoord1svARB 383
+#define _gloffset_MultiTexCoord2dARB 384
+#define _gloffset_MultiTexCoord2dvARB 385
+#define _gloffset_MultiTexCoord2fARB 386
+#define _gloffset_MultiTexCoord2fvARB 387
+#define _gloffset_MultiTexCoord2iARB 388
+#define _gloffset_MultiTexCoord2ivARB 389
+#define _gloffset_MultiTexCoord2sARB 390
+#define _gloffset_MultiTexCoord2svARB 391
+#define _gloffset_MultiTexCoord3dARB 392
+#define _gloffset_MultiTexCoord3dvARB 393
+#define _gloffset_MultiTexCoord3fARB 394
+#define _gloffset_MultiTexCoord3fvARB 395
+#define _gloffset_MultiTexCoord3iARB 396
+#define _gloffset_MultiTexCoord3ivARB 397
+#define _gloffset_MultiTexCoord3sARB 398
+#define _gloffset_MultiTexCoord3svARB 399
+#define _gloffset_MultiTexCoord4dARB 400
+#define _gloffset_MultiTexCoord4dvARB 401
+#define _gloffset_MultiTexCoord4fARB 402
+#define _gloffset_MultiTexCoord4fvARB 403
+#define _gloffset_MultiTexCoord4iARB 404
+#define _gloffset_MultiTexCoord4ivARB 405
+#define _gloffset_MultiTexCoord4sARB 406
+#define _gloffset_MultiTexCoord4svARB 407
+
+#if !defined(_GLAPI_USE_REMAP_TABLE)
+
+#define _gloffset_AttachShader 408
+#define _gloffset_CreateProgram 409
+#define _gloffset_CreateShader 410
+#define _gloffset_DeleteProgram 411
+#define _gloffset_DeleteShader 412
+#define _gloffset_DetachShader 413
+#define _gloffset_GetAttachedShaders 414
+#define _gloffset_GetProgramInfoLog 415
+#define _gloffset_GetProgramiv 416
+#define _gloffset_GetShaderInfoLog 417
+#define _gloffset_GetShaderiv 418
+#define _gloffset_IsProgram 419
+#define _gloffset_IsShader 420
+#define _gloffset_StencilFuncSeparate 421
+#define _gloffset_StencilMaskSeparate 422
+#define _gloffset_StencilOpSeparate 423
+#define _gloffset_UniformMatrix2x3fv 424
+#define _gloffset_UniformMatrix2x4fv 425
+#define _gloffset_UniformMatrix3x2fv 426
+#define _gloffset_UniformMatrix3x4fv 427
+#define _gloffset_UniformMatrix4x2fv 428
+#define _gloffset_UniformMatrix4x3fv 429
+#define _gloffset_ClampColor 430
+#define _gloffset_ClearBufferfi 431
+#define _gloffset_ClearBufferfv 432
+#define _gloffset_ClearBufferiv 433
+#define _gloffset_ClearBufferuiv 434
+#define _gloffset_GetStringi 435
+#define _gloffset_TexBuffer 436
+#define _gloffset_FramebufferTexture 437
+#define _gloffset_GetBufferParameteri64v 438
+#define _gloffset_GetInteger64i_v 439
+#define _gloffset_VertexAttribDivisor 440
+#define _gloffset_LoadTransposeMatrixdARB 441
+#define _gloffset_LoadTransposeMatrixfARB 442
+#define _gloffset_MultTransposeMatrixdARB 443
+#define _gloffset_MultTransposeMatrixfARB 444
+#define _gloffset_SampleCoverageARB 445
+#define _gloffset_CompressedTexImage1DARB 446
+#define _gloffset_CompressedTexImage2DARB 447
+#define _gloffset_CompressedTexImage3DARB 448
+#define _gloffset_CompressedTexSubImage1DARB 449
+#define _gloffset_CompressedTexSubImage2DARB 450
+#define _gloffset_CompressedTexSubImage3DARB 451
+#define _gloffset_GetCompressedTexImageARB 452
+#define _gloffset_DisableVertexAttribArrayARB 453
+#define _gloffset_EnableVertexAttribArrayARB 454
+#define _gloffset_GetProgramEnvParameterdvARB 455
+#define _gloffset_GetProgramEnvParameterfvARB 456
+#define _gloffset_GetProgramLocalParameterdvARB 457
+#define _gloffset_GetProgramLocalParameterfvARB 458
+#define _gloffset_GetProgramStringARB 459
+#define _gloffset_GetProgramivARB 460
+#define _gloffset_GetVertexAttribdvARB 461
+#define _gloffset_GetVertexAttribfvARB 462
+#define _gloffset_GetVertexAttribivARB 463
+#define _gloffset_ProgramEnvParameter4dARB 464
+#define _gloffset_ProgramEnvParameter4dvARB 465
+#define _gloffset_ProgramEnvParameter4fARB 466
+#define _gloffset_ProgramEnvParameter4fvARB 467
+#define _gloffset_ProgramLocalParameter4dARB 468
+#define _gloffset_ProgramLocalParameter4dvARB 469
+#define _gloffset_ProgramLocalParameter4fARB 470
+#define _gloffset_ProgramLocalParameter4fvARB 471
+#define _gloffset_ProgramStringARB 472
+#define _gloffset_VertexAttrib1dARB 473
+#define _gloffset_VertexAttrib1dvARB 474
+#define _gloffset_VertexAttrib1fARB 475
+#define _gloffset_VertexAttrib1fvARB 476
+#define _gloffset_VertexAttrib1sARB 477
+#define _gloffset_VertexAttrib1svARB 478
+#define _gloffset_VertexAttrib2dARB 479
+#define _gloffset_VertexAttrib2dvARB 480
+#define _gloffset_VertexAttrib2fARB 481
+#define _gloffset_VertexAttrib2fvARB 482
+#define _gloffset_VertexAttrib2sARB 483
+#define _gloffset_VertexAttrib2svARB 484
+#define _gloffset_VertexAttrib3dARB 485
+#define _gloffset_VertexAttrib3dvARB 486
+#define _gloffset_VertexAttrib3fARB 487
+#define _gloffset_VertexAttrib3fvARB 488
+#define _gloffset_VertexAttrib3sARB 489
+#define _gloffset_VertexAttrib3svARB 490
+#define _gloffset_VertexAttrib4NbvARB 491
+#define _gloffset_VertexAttrib4NivARB 492
+#define _gloffset_VertexAttrib4NsvARB 493
+#define _gloffset_VertexAttrib4NubARB 494
+#define _gloffset_VertexAttrib4NubvARB 495
+#define _gloffset_VertexAttrib4NuivARB 496
+#define _gloffset_VertexAttrib4NusvARB 497
+#define _gloffset_VertexAttrib4bvARB 498
+#define _gloffset_VertexAttrib4dARB 499
+#define _gloffset_VertexAttrib4dvARB 500
+#define _gloffset_VertexAttrib4fARB 501
+#define _gloffset_VertexAttrib4fvARB 502
+#define _gloffset_VertexAttrib4ivARB 503
+#define _gloffset_VertexAttrib4sARB 504
+#define _gloffset_VertexAttrib4svARB 505
+#define _gloffset_VertexAttrib4ubvARB 506
+#define _gloffset_VertexAttrib4uivARB 507
+#define _gloffset_VertexAttrib4usvARB 508
+#define _gloffset_VertexAttribPointerARB 509
+#define _gloffset_BindBufferARB 510
+#define _gloffset_BufferDataARB 511
+#define _gloffset_BufferSubDataARB 512
+#define _gloffset_DeleteBuffersARB 513
+#define _gloffset_GenBuffersARB 514
+#define _gloffset_GetBufferParameterivARB 515
+#define _gloffset_GetBufferPointervARB 516
+#define _gloffset_GetBufferSubDataARB 517
+#define _gloffset_IsBufferARB 518
+#define _gloffset_MapBufferARB 519
+#define _gloffset_UnmapBufferARB 520
+#define _gloffset_BeginQueryARB 521
+#define _gloffset_DeleteQueriesARB 522
+#define _gloffset_EndQueryARB 523
+#define _gloffset_GenQueriesARB 524
+#define _gloffset_GetQueryObjectivARB 525
+#define _gloffset_GetQueryObjectuivARB 526
+#define _gloffset_GetQueryivARB 527
+#define _gloffset_IsQueryARB 528
+#define _gloffset_AttachObjectARB 529
+#define _gloffset_CompileShaderARB 530
+#define _gloffset_CreateProgramObjectARB 531
+#define _gloffset_CreateShaderObjectARB 532
+#define _gloffset_DeleteObjectARB 533
+#define _gloffset_DetachObjectARB 534
+#define _gloffset_GetActiveUniformARB 535
+#define _gloffset_GetAttachedObjectsARB 536
+#define _gloffset_GetHandleARB 537
+#define _gloffset_GetInfoLogARB 538
+#define _gloffset_GetObjectParameterfvARB 539
+#define _gloffset_GetObjectParameterivARB 540
+#define _gloffset_GetShaderSourceARB 541
+#define _gloffset_GetUniformLocationARB 542
+#define _gloffset_GetUniformfvARB 543
+#define _gloffset_GetUniformivARB 544
+#define _gloffset_LinkProgramARB 545
+#define _gloffset_ShaderSourceARB 546
+#define _gloffset_Uniform1fARB 547
+#define _gloffset_Uniform1fvARB 548
+#define _gloffset_Uniform1iARB 549
+#define _gloffset_Uniform1ivARB 550
+#define _gloffset_Uniform2fARB 551
+#define _gloffset_Uniform2fvARB 552
+#define _gloffset_Uniform2iARB 553
+#define _gloffset_Uniform2ivARB 554
+#define _gloffset_Uniform3fARB 555
+#define _gloffset_Uniform3fvARB 556
+#define _gloffset_Uniform3iARB 557
+#define _gloffset_Uniform3ivARB 558
+#define _gloffset_Uniform4fARB 559
+#define _gloffset_Uniform4fvARB 560
+#define _gloffset_Uniform4iARB 561
+#define _gloffset_Uniform4ivARB 562
+#define _gloffset_UniformMatrix2fvARB 563
+#define _gloffset_UniformMatrix3fvARB 564
+#define _gloffset_UniformMatrix4fvARB 565
+#define _gloffset_UseProgramObjectARB 566
+#define _gloffset_ValidateProgramARB 567
+#define _gloffset_BindAttribLocationARB 568
+#define _gloffset_GetActiveAttribARB 569
+#define _gloffset_GetAttribLocationARB 570
+#define _gloffset_DrawBuffersARB 571
+#define _gloffset_ClampColorARB 572
+#define _gloffset_DrawArraysInstancedARB 573
+#define _gloffset_DrawElementsInstancedARB 574
+#define _gloffset_RenderbufferStorageMultisample 575
+#define _gloffset_FramebufferTextureARB 576
+#define _gloffset_FramebufferTextureFaceARB 577
+#define _gloffset_ProgramParameteriARB 578
+#define _gloffset_VertexAttribDivisorARB 579
+#define _gloffset_FlushMappedBufferRange 580
+#define _gloffset_MapBufferRange 581
+#define _gloffset_TexBufferARB 582
+#define _gloffset_BindVertexArray 583
+#define _gloffset_GenVertexArrays 584
+#define _gloffset_CopyBufferSubData 585
+#define _gloffset_ClientWaitSync 586
+#define _gloffset_DeleteSync 587
+#define _gloffset_FenceSync 588
+#define _gloffset_GetInteger64v 589
+#define _gloffset_GetSynciv 590
+#define _gloffset_IsSync 591
+#define _gloffset_WaitSync 592
+#define _gloffset_DrawElementsBaseVertex 593
+#define _gloffset_DrawRangeElementsBaseVertex 594
+#define _gloffset_MultiDrawElementsBaseVertex 595
+#define _gloffset_BlendEquationSeparateiARB 596
+#define _gloffset_BlendEquationiARB 597
+#define _gloffset_BlendFuncSeparateiARB 598
+#define _gloffset_BlendFunciARB 599
+#define _gloffset_BindTransformFeedback 600
+#define _gloffset_DeleteTransformFeedbacks 601
+#define _gloffset_DrawTransformFeedback 602
+#define _gloffset_GenTransformFeedbacks 603
+#define _gloffset_IsTransformFeedback 604
+#define _gloffset_PauseTransformFeedback 605
+#define _gloffset_ResumeTransformFeedback 606
+#define _gloffset_ClearDepthf 607
+#define _gloffset_DepthRangef 608
+#define _gloffset_GetShaderPrecisionFormat 609
+#define _gloffset_ReleaseShaderCompiler 610
+#define _gloffset_ShaderBinary 611
+#define _gloffset_PolygonOffsetEXT 612
+#define _gloffset_GetPixelTexGenParameterfvSGIS 613
+#define _gloffset_GetPixelTexGenParameterivSGIS 614
+#define _gloffset_PixelTexGenParameterfSGIS 615
+#define _gloffset_PixelTexGenParameterfvSGIS 616
+#define _gloffset_PixelTexGenParameteriSGIS 617
+#define _gloffset_PixelTexGenParameterivSGIS 618
+#define _gloffset_SampleMaskSGIS 619
+#define _gloffset_SamplePatternSGIS 620
+#define _gloffset_ColorPointerEXT 621
+#define _gloffset_EdgeFlagPointerEXT 622
+#define _gloffset_IndexPointerEXT 623
+#define _gloffset_NormalPointerEXT 624
+#define _gloffset_TexCoordPointerEXT 625
+#define _gloffset_VertexPointerEXT 626
+#define _gloffset_PointParameterfEXT 627
+#define _gloffset_PointParameterfvEXT 628
+#define _gloffset_LockArraysEXT 629
+#define _gloffset_UnlockArraysEXT 630
+#define _gloffset_SecondaryColor3bEXT 631
+#define _gloffset_SecondaryColor3bvEXT 632
+#define _gloffset_SecondaryColor3dEXT 633
+#define _gloffset_SecondaryColor3dvEXT 634
+#define _gloffset_SecondaryColor3fEXT 635
+#define _gloffset_SecondaryColor3fvEXT 636
+#define _gloffset_SecondaryColor3iEXT 637
+#define _gloffset_SecondaryColor3ivEXT 638
+#define _gloffset_SecondaryColor3sEXT 639
+#define _gloffset_SecondaryColor3svEXT 640
+#define _gloffset_SecondaryColor3ubEXT 641
+#define _gloffset_SecondaryColor3ubvEXT 642
+#define _gloffset_SecondaryColor3uiEXT 643
+#define _gloffset_SecondaryColor3uivEXT 644
+#define _gloffset_SecondaryColor3usEXT 645
+#define _gloffset_SecondaryColor3usvEXT 646
+#define _gloffset_SecondaryColorPointerEXT 647
+#define _gloffset_MultiDrawArraysEXT 648
+#define _gloffset_MultiDrawElementsEXT 649
+#define _gloffset_FogCoordPointerEXT 650
+#define _gloffset_FogCoorddEXT 651
+#define _gloffset_FogCoorddvEXT 652
+#define _gloffset_FogCoordfEXT 653
+#define _gloffset_FogCoordfvEXT 654
+#define _gloffset_PixelTexGenSGIX 655
+#define _gloffset_BlendFuncSeparateEXT 656
+#define _gloffset_FlushVertexArrayRangeNV 657
+#define _gloffset_VertexArrayRangeNV 658
+#define _gloffset_CombinerInputNV 659
+#define _gloffset_CombinerOutputNV 660
+#define _gloffset_CombinerParameterfNV 661
+#define _gloffset_CombinerParameterfvNV 662
+#define _gloffset_CombinerParameteriNV 663
+#define _gloffset_CombinerParameterivNV 664
+#define _gloffset_FinalCombinerInputNV 665
+#define _gloffset_GetCombinerInputParameterfvNV 666
+#define _gloffset_GetCombinerInputParameterivNV 667
+#define _gloffset_GetCombinerOutputParameterfvNV 668
+#define _gloffset_GetCombinerOutputParameterivNV 669
+#define _gloffset_GetFinalCombinerInputParameterfvNV 670
+#define _gloffset_GetFinalCombinerInputParameterivNV 671
+#define _gloffset_ResizeBuffersMESA 672
+#define _gloffset_WindowPos2dMESA 673
+#define _gloffset_WindowPos2dvMESA 674
+#define _gloffset_WindowPos2fMESA 675
+#define _gloffset_WindowPos2fvMESA 676
+#define _gloffset_WindowPos2iMESA 677
+#define _gloffset_WindowPos2ivMESA 678
+#define _gloffset_WindowPos2sMESA 679
+#define _gloffset_WindowPos2svMESA 680
+#define _gloffset_WindowPos3dMESA 681
+#define _gloffset_WindowPos3dvMESA 682
+#define _gloffset_WindowPos3fMESA 683
+#define _gloffset_WindowPos3fvMESA 684
+#define _gloffset_WindowPos3iMESA 685
+#define _gloffset_WindowPos3ivMESA 686
+#define _gloffset_WindowPos3sMESA 687
+#define _gloffset_WindowPos3svMESA 688
+#define _gloffset_WindowPos4dMESA 689
+#define _gloffset_WindowPos4dvMESA 690
+#define _gloffset_WindowPos4fMESA 691
+#define _gloffset_WindowPos4fvMESA 692
+#define _gloffset_WindowPos4iMESA 693
+#define _gloffset_WindowPos4ivMESA 694
+#define _gloffset_WindowPos4sMESA 695
+#define _gloffset_WindowPos4svMESA 696
+#define _gloffset_MultiModeDrawArraysIBM 697
+#define _gloffset_MultiModeDrawElementsIBM 698
+#define _gloffset_DeleteFencesNV 699
+#define _gloffset_FinishFenceNV 700
+#define _gloffset_GenFencesNV 701
+#define _gloffset_GetFenceivNV 702
+#define _gloffset_IsFenceNV 703
+#define _gloffset_SetFenceNV 704
+#define _gloffset_TestFenceNV 705
+#define _gloffset_AreProgramsResidentNV 706
+#define _gloffset_BindProgramNV 707
+#define _gloffset_DeleteProgramsNV 708
+#define _gloffset_ExecuteProgramNV 709
+#define _gloffset_GenProgramsNV 710
+#define _gloffset_GetProgramParameterdvNV 711
+#define _gloffset_GetProgramParameterfvNV 712
+#define _gloffset_GetProgramStringNV 713
+#define _gloffset_GetProgramivNV 714
+#define _gloffset_GetTrackMatrixivNV 715
+#define _gloffset_GetVertexAttribPointervNV 716
+#define _gloffset_GetVertexAttribdvNV 717
+#define _gloffset_GetVertexAttribfvNV 718
+#define _gloffset_GetVertexAttribivNV 719
+#define _gloffset_IsProgramNV 720
+#define _gloffset_LoadProgramNV 721
+#define _gloffset_ProgramParameters4dvNV 722
+#define _gloffset_ProgramParameters4fvNV 723
+#define _gloffset_RequestResidentProgramsNV 724
+#define _gloffset_TrackMatrixNV 725
+#define _gloffset_VertexAttrib1dNV 726
+#define _gloffset_VertexAttrib1dvNV 727
+#define _gloffset_VertexAttrib1fNV 728
+#define _gloffset_VertexAttrib1fvNV 729
+#define _gloffset_VertexAttrib1sNV 730
+#define _gloffset_VertexAttrib1svNV 731
+#define _gloffset_VertexAttrib2dNV 732
+#define _gloffset_VertexAttrib2dvNV 733
+#define _gloffset_VertexAttrib2fNV 734
+#define _gloffset_VertexAttrib2fvNV 735
+#define _gloffset_VertexAttrib2sNV 736
+#define _gloffset_VertexAttrib2svNV 737
+#define _gloffset_VertexAttrib3dNV 738
+#define _gloffset_VertexAttrib3dvNV 739
+#define _gloffset_VertexAttrib3fNV 740
+#define _gloffset_VertexAttrib3fvNV 741
+#define _gloffset_VertexAttrib3sNV 742
+#define _gloffset_VertexAttrib3svNV 743
+#define _gloffset_VertexAttrib4dNV 744
+#define _gloffset_VertexAttrib4dvNV 745
+#define _gloffset_VertexAttrib4fNV 746
+#define _gloffset_VertexAttrib4fvNV 747
+#define _gloffset_VertexAttrib4sNV 748
+#define _gloffset_VertexAttrib4svNV 749
+#define _gloffset_VertexAttrib4ubNV 750
+#define _gloffset_VertexAttrib4ubvNV 751
+#define _gloffset_VertexAttribPointerNV 752
+#define _gloffset_VertexAttribs1dvNV 753
+#define _gloffset_VertexAttribs1fvNV 754
+#define _gloffset_VertexAttribs1svNV 755
+#define _gloffset_VertexAttribs2dvNV 756
+#define _gloffset_VertexAttribs2fvNV 757
+#define _gloffset_VertexAttribs2svNV 758
+#define _gloffset_VertexAttribs3dvNV 759
+#define _gloffset_VertexAttribs3fvNV 760
+#define _gloffset_VertexAttribs3svNV 761
+#define _gloffset_VertexAttribs4dvNV 762
+#define _gloffset_VertexAttribs4fvNV 763
+#define _gloffset_VertexAttribs4svNV 764
+#define _gloffset_VertexAttribs4ubvNV 765
+#define _gloffset_GetTexBumpParameterfvATI 766
+#define _gloffset_GetTexBumpParameterivATI 767
+#define _gloffset_TexBumpParameterfvATI 768
+#define _gloffset_TexBumpParameterivATI 769
+#define _gloffset_AlphaFragmentOp1ATI 770
+#define _gloffset_AlphaFragmentOp2ATI 771
+#define _gloffset_AlphaFragmentOp3ATI 772
+#define _gloffset_BeginFragmentShaderATI 773
+#define _gloffset_BindFragmentShaderATI 774
+#define _gloffset_ColorFragmentOp1ATI 775
+#define _gloffset_ColorFragmentOp2ATI 776
+#define _gloffset_ColorFragmentOp3ATI 777
+#define _gloffset_DeleteFragmentShaderATI 778
+#define _gloffset_EndFragmentShaderATI 779
+#define _gloffset_GenFragmentShadersATI 780
+#define _gloffset_PassTexCoordATI 781
+#define _gloffset_SampleMapATI 782
+#define _gloffset_SetFragmentShaderConstantATI 783
+#define _gloffset_PointParameteriNV 784
+#define _gloffset_PointParameterivNV 785
+#define _gloffset_ActiveStencilFaceEXT 786
+#define _gloffset_BindVertexArrayAPPLE 787
+#define _gloffset_DeleteVertexArraysAPPLE 788
+#define _gloffset_GenVertexArraysAPPLE 789
+#define _gloffset_IsVertexArrayAPPLE 790
+#define _gloffset_GetProgramNamedParameterdvNV 791
+#define _gloffset_GetProgramNamedParameterfvNV 792
+#define _gloffset_ProgramNamedParameter4dNV 793
+#define _gloffset_ProgramNamedParameter4dvNV 794
+#define _gloffset_ProgramNamedParameter4fNV 795
+#define _gloffset_ProgramNamedParameter4fvNV 796
+#define _gloffset_PrimitiveRestartIndexNV 797
+#define _gloffset_PrimitiveRestartNV 798
+#define _gloffset_DepthBoundsEXT 799
+#define _gloffset_BlendEquationSeparateEXT 800
+#define _gloffset_BindFramebufferEXT 801
+#define _gloffset_BindRenderbufferEXT 802
+#define _gloffset_CheckFramebufferStatusEXT 803
+#define _gloffset_DeleteFramebuffersEXT 804
+#define _gloffset_DeleteRenderbuffersEXT 805
+#define _gloffset_FramebufferRenderbufferEXT 806
+#define _gloffset_FramebufferTexture1DEXT 807
+#define _gloffset_FramebufferTexture2DEXT 808
+#define _gloffset_FramebufferTexture3DEXT 809
+#define _gloffset_GenFramebuffersEXT 810
+#define _gloffset_GenRenderbuffersEXT 811
+#define _gloffset_GenerateMipmapEXT 812
+#define _gloffset_GetFramebufferAttachmentParameterivEXT 813
+#define _gloffset_GetRenderbufferParameterivEXT 814
+#define _gloffset_IsFramebufferEXT 815
+#define _gloffset_IsRenderbufferEXT 816
+#define _gloffset_RenderbufferStorageEXT 817
+#define _gloffset_BlitFramebufferEXT 818
+#define _gloffset_BufferParameteriAPPLE 819
+#define _gloffset_FlushMappedBufferRangeAPPLE 820
+#define _gloffset_BindFragDataLocationEXT 821
+#define _gloffset_GetFragDataLocationEXT 822
+#define _gloffset_GetUniformuivEXT 823
+#define _gloffset_GetVertexAttribIivEXT 824
+#define _gloffset_GetVertexAttribIuivEXT 825
+#define _gloffset_Uniform1uiEXT 826
+#define _gloffset_Uniform1uivEXT 827
+#define _gloffset_Uniform2uiEXT 828
+#define _gloffset_Uniform2uivEXT 829
+#define _gloffset_Uniform3uiEXT 830
+#define _gloffset_Uniform3uivEXT 831
+#define _gloffset_Uniform4uiEXT 832
+#define _gloffset_Uniform4uivEXT 833
+#define _gloffset_VertexAttribI1iEXT 834
+#define _gloffset_VertexAttribI1ivEXT 835
+#define _gloffset_VertexAttribI1uiEXT 836
+#define _gloffset_VertexAttribI1uivEXT 837
+#define _gloffset_VertexAttribI2iEXT 838
+#define _gloffset_VertexAttribI2ivEXT 839
+#define _gloffset_VertexAttribI2uiEXT 840
+#define _gloffset_VertexAttribI2uivEXT 841
+#define _gloffset_VertexAttribI3iEXT 842
+#define _gloffset_VertexAttribI3ivEXT 843
+#define _gloffset_VertexAttribI3uiEXT 844
+#define _gloffset_VertexAttribI3uivEXT 845
+#define _gloffset_VertexAttribI4bvEXT 846
+#define _gloffset_VertexAttribI4iEXT 847
+#define _gloffset_VertexAttribI4ivEXT 848
+#define _gloffset_VertexAttribI4svEXT 849
+#define _gloffset_VertexAttribI4ubvEXT 850
+#define _gloffset_VertexAttribI4uiEXT 851
+#define _gloffset_VertexAttribI4uivEXT 852
+#define _gloffset_VertexAttribI4usvEXT 853
+#define _gloffset_VertexAttribIPointerEXT 854
+#define _gloffset_FramebufferTextureLayerEXT 855
+#define _gloffset_ColorMaskIndexedEXT 856
+#define _gloffset_DisableIndexedEXT 857
+#define _gloffset_EnableIndexedEXT 858
+#define _gloffset_GetBooleanIndexedvEXT 859
+#define _gloffset_GetIntegerIndexedvEXT 860
+#define _gloffset_IsEnabledIndexedEXT 861
+#define _gloffset_ClearColorIiEXT 862
+#define _gloffset_ClearColorIuiEXT 863
+#define _gloffset_GetTexParameterIivEXT 864
+#define _gloffset_GetTexParameterIuivEXT 865
+#define _gloffset_TexParameterIivEXT 866
+#define _gloffset_TexParameterIuivEXT 867
+#define _gloffset_BeginConditionalRenderNV 868
+#define _gloffset_EndConditionalRenderNV 869
+#define _gloffset_BeginTransformFeedbackEXT 870
+#define _gloffset_BindBufferBaseEXT 871
+#define _gloffset_BindBufferOffsetEXT 872
+#define _gloffset_BindBufferRangeEXT 873
+#define _gloffset_EndTransformFeedbackEXT 874
+#define _gloffset_GetTransformFeedbackVaryingEXT 875
+#define _gloffset_TransformFeedbackVaryingsEXT 876
+#define _gloffset_ProvokingVertexEXT 877
+#define _gloffset_GetTexParameterPointervAPPLE 878
+#define _gloffset_TextureRangeAPPLE 879
+#define _gloffset_GetObjectParameterivAPPLE 880
+#define _gloffset_ObjectPurgeableAPPLE 881
+#define _gloffset_ObjectUnpurgeableAPPLE 882
+#define _gloffset_ActiveProgramEXT 883
+#define _gloffset_CreateShaderProgramEXT 884
+#define _gloffset_UseShaderProgramEXT 885
+#define _gloffset_TextureBarrierNV 886
+#define _gloffset_StencilFuncSeparateATI 887
+#define _gloffset_ProgramEnvParameters4fvEXT 888
+#define _gloffset_ProgramLocalParameters4fvEXT 889
+#define _gloffset_GetQueryObjecti64vEXT 890
+#define _gloffset_GetQueryObjectui64vEXT 891
+#define _gloffset_EGLImageTargetRenderbufferStorageOES 892
+#define _gloffset_EGLImageTargetTexture2DOES 893
+
+#else /* !_GLAPI_USE_REMAP_TABLE */
+
+#define driDispatchRemapTable_size 486
+extern int driDispatchRemapTable[ driDispatchRemapTable_size ];
+
+#define AttachShader_remap_index 0
+#define CreateProgram_remap_index 1
+#define CreateShader_remap_index 2
+#define DeleteProgram_remap_index 3
+#define DeleteShader_remap_index 4
+#define DetachShader_remap_index 5
+#define GetAttachedShaders_remap_index 6
+#define GetProgramInfoLog_remap_index 7
+#define GetProgramiv_remap_index 8
+#define GetShaderInfoLog_remap_index 9
+#define GetShaderiv_remap_index 10
+#define IsProgram_remap_index 11
+#define IsShader_remap_index 12
+#define StencilFuncSeparate_remap_index 13
+#define StencilMaskSeparate_remap_index 14
+#define StencilOpSeparate_remap_index 15
+#define UniformMatrix2x3fv_remap_index 16
+#define UniformMatrix2x4fv_remap_index 17
+#define UniformMatrix3x2fv_remap_index 18
+#define UniformMatrix3x4fv_remap_index 19
+#define UniformMatrix4x2fv_remap_index 20
+#define UniformMatrix4x3fv_remap_index 21
+#define ClampColor_remap_index 22
+#define ClearBufferfi_remap_index 23
+#define ClearBufferfv_remap_index 24
+#define ClearBufferiv_remap_index 25
+#define ClearBufferuiv_remap_index 26
+#define GetStringi_remap_index 27
+#define TexBuffer_remap_index 28
+#define FramebufferTexture_remap_index 29
+#define GetBufferParameteri64v_remap_index 30
+#define GetInteger64i_v_remap_index 31
+#define VertexAttribDivisor_remap_index 32
+#define LoadTransposeMatrixdARB_remap_index 33
+#define LoadTransposeMatrixfARB_remap_index 34
+#define MultTransposeMatrixdARB_remap_index 35
+#define MultTransposeMatrixfARB_remap_index 36
+#define SampleCoverageARB_remap_index 37
+#define CompressedTexImage1DARB_remap_index 38
+#define CompressedTexImage2DARB_remap_index 39
+#define CompressedTexImage3DARB_remap_index 40
+#define CompressedTexSubImage1DARB_remap_index 41
+#define CompressedTexSubImage2DARB_remap_index 42
+#define CompressedTexSubImage3DARB_remap_index 43
+#define GetCompressedTexImageARB_remap_index 44
+#define DisableVertexAttribArrayARB_remap_index 45
+#define EnableVertexAttribArrayARB_remap_index 46
+#define GetProgramEnvParameterdvARB_remap_index 47
+#define GetProgramEnvParameterfvARB_remap_index 48
+#define GetProgramLocalParameterdvARB_remap_index 49
+#define GetProgramLocalParameterfvARB_remap_index 50
+#define GetProgramStringARB_remap_index 51
+#define GetProgramivARB_remap_index 52
+#define GetVertexAttribdvARB_remap_index 53
+#define GetVertexAttribfvARB_remap_index 54
+#define GetVertexAttribivARB_remap_index 55
+#define ProgramEnvParameter4dARB_remap_index 56
+#define ProgramEnvParameter4dvARB_remap_index 57
+#define ProgramEnvParameter4fARB_remap_index 58
+#define ProgramEnvParameter4fvARB_remap_index 59
+#define ProgramLocalParameter4dARB_remap_index 60
+#define ProgramLocalParameter4dvARB_remap_index 61
+#define ProgramLocalParameter4fARB_remap_index 62
+#define ProgramLocalParameter4fvARB_remap_index 63
+#define ProgramStringARB_remap_index 64
+#define VertexAttrib1dARB_remap_index 65
+#define VertexAttrib1dvARB_remap_index 66
+#define VertexAttrib1fARB_remap_index 67
+#define VertexAttrib1fvARB_remap_index 68
+#define VertexAttrib1sARB_remap_index 69
+#define VertexAttrib1svARB_remap_index 70
+#define VertexAttrib2dARB_remap_index 71
+#define VertexAttrib2dvARB_remap_index 72
+#define VertexAttrib2fARB_remap_index 73
+#define VertexAttrib2fvARB_remap_index 74
+#define VertexAttrib2sARB_remap_index 75
+#define VertexAttrib2svARB_remap_index 76
+#define VertexAttrib3dARB_remap_index 77
+#define VertexAttrib3dvARB_remap_index 78
+#define VertexAttrib3fARB_remap_index 79
+#define VertexAttrib3fvARB_remap_index 80
+#define VertexAttrib3sARB_remap_index 81
+#define VertexAttrib3svARB_remap_index 82
+#define VertexAttrib4NbvARB_remap_index 83
+#define VertexAttrib4NivARB_remap_index 84
+#define VertexAttrib4NsvARB_remap_index 85
+#define VertexAttrib4NubARB_remap_index 86
+#define VertexAttrib4NubvARB_remap_index 87
+#define VertexAttrib4NuivARB_remap_index 88
+#define VertexAttrib4NusvARB_remap_index 89
+#define VertexAttrib4bvARB_remap_index 90
+#define VertexAttrib4dARB_remap_index 91
+#define VertexAttrib4dvARB_remap_index 92
+#define VertexAttrib4fARB_remap_index 93
+#define VertexAttrib4fvARB_remap_index 94
+#define VertexAttrib4ivARB_remap_index 95
+#define VertexAttrib4sARB_remap_index 96
+#define VertexAttrib4svARB_remap_index 97
+#define VertexAttrib4ubvARB_remap_index 98
+#define VertexAttrib4uivARB_remap_index 99
+#define VertexAttrib4usvARB_remap_index 100
+#define VertexAttribPointerARB_remap_index 101
+#define BindBufferARB_remap_index 102
+#define BufferDataARB_remap_index 103
+#define BufferSubDataARB_remap_index 104
+#define DeleteBuffersARB_remap_index 105
+#define GenBuffersARB_remap_index 106
+#define GetBufferParameterivARB_remap_index 107
+#define GetBufferPointervARB_remap_index 108
+#define GetBufferSubDataARB_remap_index 109
+#define IsBufferARB_remap_index 110
+#define MapBufferARB_remap_index 111
+#define UnmapBufferARB_remap_index 112
+#define BeginQueryARB_remap_index 113
+#define DeleteQueriesARB_remap_index 114
+#define EndQueryARB_remap_index 115
+#define GenQueriesARB_remap_index 116
+#define GetQueryObjectivARB_remap_index 117
+#define GetQueryObjectuivARB_remap_index 118
+#define GetQueryivARB_remap_index 119
+#define IsQueryARB_remap_index 120
+#define AttachObjectARB_remap_index 121
+#define CompileShaderARB_remap_index 122
+#define CreateProgramObjectARB_remap_index 123
+#define CreateShaderObjectARB_remap_index 124
+#define DeleteObjectARB_remap_index 125
+#define DetachObjectARB_remap_index 126
+#define GetActiveUniformARB_remap_index 127
+#define GetAttachedObjectsARB_remap_index 128
+#define GetHandleARB_remap_index 129
+#define GetInfoLogARB_remap_index 130
+#define GetObjectParameterfvARB_remap_index 131
+#define GetObjectParameterivARB_remap_index 132
+#define GetShaderSourceARB_remap_index 133
+#define GetUniformLocationARB_remap_index 134
+#define GetUniformfvARB_remap_index 135
+#define GetUniformivARB_remap_index 136
+#define LinkProgramARB_remap_index 137
+#define ShaderSourceARB_remap_index 138
+#define Uniform1fARB_remap_index 139
+#define Uniform1fvARB_remap_index 140
+#define Uniform1iARB_remap_index 141
+#define Uniform1ivARB_remap_index 142
+#define Uniform2fARB_remap_index 143
+#define Uniform2fvARB_remap_index 144
+#define Uniform2iARB_remap_index 145
+#define Uniform2ivARB_remap_index 146
+#define Uniform3fARB_remap_index 147
+#define Uniform3fvARB_remap_index 148
+#define Uniform3iARB_remap_index 149
+#define Uniform3ivARB_remap_index 150
+#define Uniform4fARB_remap_index 151
+#define Uniform4fvARB_remap_index 152
+#define Uniform4iARB_remap_index 153
+#define Uniform4ivARB_remap_index 154
+#define UniformMatrix2fvARB_remap_index 155
+#define UniformMatrix3fvARB_remap_index 156
+#define UniformMatrix4fvARB_remap_index 157
+#define UseProgramObjectARB_remap_index 158
+#define ValidateProgramARB_remap_index 159
+#define BindAttribLocationARB_remap_index 160
+#define GetActiveAttribARB_remap_index 161
+#define GetAttribLocationARB_remap_index 162
+#define DrawBuffersARB_remap_index 163
+#define ClampColorARB_remap_index 164
+#define DrawArraysInstancedARB_remap_index 165
+#define DrawElementsInstancedARB_remap_index 166
+#define RenderbufferStorageMultisample_remap_index 167
+#define FramebufferTextureARB_remap_index 168
+#define FramebufferTextureFaceARB_remap_index 169
+#define ProgramParameteriARB_remap_index 170
+#define VertexAttribDivisorARB_remap_index 171
+#define FlushMappedBufferRange_remap_index 172
+#define MapBufferRange_remap_index 173
+#define TexBufferARB_remap_index 174
+#define BindVertexArray_remap_index 175
+#define GenVertexArrays_remap_index 176
+#define CopyBufferSubData_remap_index 177
+#define ClientWaitSync_remap_index 178
+#define DeleteSync_remap_index 179
+#define FenceSync_remap_index 180
+#define GetInteger64v_remap_index 181
+#define GetSynciv_remap_index 182
+#define IsSync_remap_index 183
+#define WaitSync_remap_index 184
+#define DrawElementsBaseVertex_remap_index 185
+#define DrawRangeElementsBaseVertex_remap_index 186
+#define MultiDrawElementsBaseVertex_remap_index 187
+#define BlendEquationSeparateiARB_remap_index 188
+#define BlendEquationiARB_remap_index 189
+#define BlendFuncSeparateiARB_remap_index 190
+#define BlendFunciARB_remap_index 191
+#define BindTransformFeedback_remap_index 192
+#define DeleteTransformFeedbacks_remap_index 193
+#define DrawTransformFeedback_remap_index 194
+#define GenTransformFeedbacks_remap_index 195
+#define IsTransformFeedback_remap_index 196
+#define PauseTransformFeedback_remap_index 197
+#define ResumeTransformFeedback_remap_index 198
+#define ClearDepthf_remap_index 199
+#define DepthRangef_remap_index 200
+#define GetShaderPrecisionFormat_remap_index 201
+#define ReleaseShaderCompiler_remap_index 202
+#define ShaderBinary_remap_index 203
+#define PolygonOffsetEXT_remap_index 204
+#define GetPixelTexGenParameterfvSGIS_remap_index 205
+#define GetPixelTexGenParameterivSGIS_remap_index 206
+#define PixelTexGenParameterfSGIS_remap_index 207
+#define PixelTexGenParameterfvSGIS_remap_index 208
+#define PixelTexGenParameteriSGIS_remap_index 209
+#define PixelTexGenParameterivSGIS_remap_index 210
+#define SampleMaskSGIS_remap_index 211
+#define SamplePatternSGIS_remap_index 212
+#define ColorPointerEXT_remap_index 213
+#define EdgeFlagPointerEXT_remap_index 214
+#define IndexPointerEXT_remap_index 215
+#define NormalPointerEXT_remap_index 216
+#define TexCoordPointerEXT_remap_index 217
+#define VertexPointerEXT_remap_index 218
+#define PointParameterfEXT_remap_index 219
+#define PointParameterfvEXT_remap_index 220
+#define LockArraysEXT_remap_index 221
+#define UnlockArraysEXT_remap_index 222
+#define SecondaryColor3bEXT_remap_index 223
+#define SecondaryColor3bvEXT_remap_index 224
+#define SecondaryColor3dEXT_remap_index 225
+#define SecondaryColor3dvEXT_remap_index 226
+#define SecondaryColor3fEXT_remap_index 227
+#define SecondaryColor3fvEXT_remap_index 228
+#define SecondaryColor3iEXT_remap_index 229
+#define SecondaryColor3ivEXT_remap_index 230
+#define SecondaryColor3sEXT_remap_index 231
+#define SecondaryColor3svEXT_remap_index 232
+#define SecondaryColor3ubEXT_remap_index 233
+#define SecondaryColor3ubvEXT_remap_index 234
+#define SecondaryColor3uiEXT_remap_index 235
+#define SecondaryColor3uivEXT_remap_index 236
+#define SecondaryColor3usEXT_remap_index 237
+#define SecondaryColor3usvEXT_remap_index 238
+#define SecondaryColorPointerEXT_remap_index 239
+#define MultiDrawArraysEXT_remap_index 240
+#define MultiDrawElementsEXT_remap_index 241
+#define FogCoordPointerEXT_remap_index 242
+#define FogCoorddEXT_remap_index 243
+#define FogCoorddvEXT_remap_index 244
+#define FogCoordfEXT_remap_index 245
+#define FogCoordfvEXT_remap_index 246
+#define PixelTexGenSGIX_remap_index 247
+#define BlendFuncSeparateEXT_remap_index 248
+#define FlushVertexArrayRangeNV_remap_index 249
+#define VertexArrayRangeNV_remap_index 250
+#define CombinerInputNV_remap_index 251
+#define CombinerOutputNV_remap_index 252
+#define CombinerParameterfNV_remap_index 253
+#define CombinerParameterfvNV_remap_index 254
+#define CombinerParameteriNV_remap_index 255
+#define CombinerParameterivNV_remap_index 256
+#define FinalCombinerInputNV_remap_index 257
+#define GetCombinerInputParameterfvNV_remap_index 258
+#define GetCombinerInputParameterivNV_remap_index 259
+#define GetCombinerOutputParameterfvNV_remap_index 260
+#define GetCombinerOutputParameterivNV_remap_index 261
+#define GetFinalCombinerInputParameterfvNV_remap_index 262
+#define GetFinalCombinerInputParameterivNV_remap_index 263
+#define ResizeBuffersMESA_remap_index 264
+#define WindowPos2dMESA_remap_index 265
+#define WindowPos2dvMESA_remap_index 266
+#define WindowPos2fMESA_remap_index 267
+#define WindowPos2fvMESA_remap_index 268
+#define WindowPos2iMESA_remap_index 269
+#define WindowPos2ivMESA_remap_index 270
+#define WindowPos2sMESA_remap_index 271
+#define WindowPos2svMESA_remap_index 272
+#define WindowPos3dMESA_remap_index 273
+#define WindowPos3dvMESA_remap_index 274
+#define WindowPos3fMESA_remap_index 275
+#define WindowPos3fvMESA_remap_index 276
+#define WindowPos3iMESA_remap_index 277
+#define WindowPos3ivMESA_remap_index 278
+#define WindowPos3sMESA_remap_index 279
+#define WindowPos3svMESA_remap_index 280
+#define WindowPos4dMESA_remap_index 281
+#define WindowPos4dvMESA_remap_index 282
+#define WindowPos4fMESA_remap_index 283
+#define WindowPos4fvMESA_remap_index 284
+#define WindowPos4iMESA_remap_index 285
+#define WindowPos4ivMESA_remap_index 286
+#define WindowPos4sMESA_remap_index 287
+#define WindowPos4svMESA_remap_index 288
+#define MultiModeDrawArraysIBM_remap_index 289
+#define MultiModeDrawElementsIBM_remap_index 290
+#define DeleteFencesNV_remap_index 291
+#define FinishFenceNV_remap_index 292
+#define GenFencesNV_remap_index 293
+#define GetFenceivNV_remap_index 294
+#define IsFenceNV_remap_index 295
+#define SetFenceNV_remap_index 296
+#define TestFenceNV_remap_index 297
+#define AreProgramsResidentNV_remap_index 298
+#define BindProgramNV_remap_index 299
+#define DeleteProgramsNV_remap_index 300
+#define ExecuteProgramNV_remap_index 301
+#define GenProgramsNV_remap_index 302
+#define GetProgramParameterdvNV_remap_index 303
+#define GetProgramParameterfvNV_remap_index 304
+#define GetProgramStringNV_remap_index 305
+#define GetProgramivNV_remap_index 306
+#define GetTrackMatrixivNV_remap_index 307
+#define GetVertexAttribPointervNV_remap_index 308
+#define GetVertexAttribdvNV_remap_index 309
+#define GetVertexAttribfvNV_remap_index 310
+#define GetVertexAttribivNV_remap_index 311
+#define IsProgramNV_remap_index 312
+#define LoadProgramNV_remap_index 313
+#define ProgramParameters4dvNV_remap_index 314
+#define ProgramParameters4fvNV_remap_index 315
+#define RequestResidentProgramsNV_remap_index 316
+#define TrackMatrixNV_remap_index 317
+#define VertexAttrib1dNV_remap_index 318
+#define VertexAttrib1dvNV_remap_index 319
+#define VertexAttrib1fNV_remap_index 320
+#define VertexAttrib1fvNV_remap_index 321
+#define VertexAttrib1sNV_remap_index 322
+#define VertexAttrib1svNV_remap_index 323
+#define VertexAttrib2dNV_remap_index 324
+#define VertexAttrib2dvNV_remap_index 325
+#define VertexAttrib2fNV_remap_index 326
+#define VertexAttrib2fvNV_remap_index 327
+#define VertexAttrib2sNV_remap_index 328
+#define VertexAttrib2svNV_remap_index 329
+#define VertexAttrib3dNV_remap_index 330
+#define VertexAttrib3dvNV_remap_index 331
+#define VertexAttrib3fNV_remap_index 332
+#define VertexAttrib3fvNV_remap_index 333
+#define VertexAttrib3sNV_remap_index 334
+#define VertexAttrib3svNV_remap_index 335
+#define VertexAttrib4dNV_remap_index 336
+#define VertexAttrib4dvNV_remap_index 337
+#define VertexAttrib4fNV_remap_index 338
+#define VertexAttrib4fvNV_remap_index 339
+#define VertexAttrib4sNV_remap_index 340
+#define VertexAttrib4svNV_remap_index 341
+#define VertexAttrib4ubNV_remap_index 342
+#define VertexAttrib4ubvNV_remap_index 343
+#define VertexAttribPointerNV_remap_index 344
+#define VertexAttribs1dvNV_remap_index 345
+#define VertexAttribs1fvNV_remap_index 346
+#define VertexAttribs1svNV_remap_index 347
+#define VertexAttribs2dvNV_remap_index 348
+#define VertexAttribs2fvNV_remap_index 349
+#define VertexAttribs2svNV_remap_index 350
+#define VertexAttribs3dvNV_remap_index 351
+#define VertexAttribs3fvNV_remap_index 352
+#define VertexAttribs3svNV_remap_index 353
+#define VertexAttribs4dvNV_remap_index 354
+#define VertexAttribs4fvNV_remap_index 355
+#define VertexAttribs4svNV_remap_index 356
+#define VertexAttribs4ubvNV_remap_index 357
+#define GetTexBumpParameterfvATI_remap_index 358
+#define GetTexBumpParameterivATI_remap_index 359
+#define TexBumpParameterfvATI_remap_index 360
+#define TexBumpParameterivATI_remap_index 361
+#define AlphaFragmentOp1ATI_remap_index 362
+#define AlphaFragmentOp2ATI_remap_index 363
+#define AlphaFragmentOp3ATI_remap_index 364
+#define BeginFragmentShaderATI_remap_index 365
+#define BindFragmentShaderATI_remap_index 366
+#define ColorFragmentOp1ATI_remap_index 367
+#define ColorFragmentOp2ATI_remap_index 368
+#define ColorFragmentOp3ATI_remap_index 369
+#define DeleteFragmentShaderATI_remap_index 370
+#define EndFragmentShaderATI_remap_index 371
+#define GenFragmentShadersATI_remap_index 372
+#define PassTexCoordATI_remap_index 373
+#define SampleMapATI_remap_index 374
+#define SetFragmentShaderConstantATI_remap_index 375
+#define PointParameteriNV_remap_index 376
+#define PointParameterivNV_remap_index 377
+#define ActiveStencilFaceEXT_remap_index 378
+#define BindVertexArrayAPPLE_remap_index 379
+#define DeleteVertexArraysAPPLE_remap_index 380
+#define GenVertexArraysAPPLE_remap_index 381
+#define IsVertexArrayAPPLE_remap_index 382
+#define GetProgramNamedParameterdvNV_remap_index 383
+#define GetProgramNamedParameterfvNV_remap_index 384
+#define ProgramNamedParameter4dNV_remap_index 385
+#define ProgramNamedParameter4dvNV_remap_index 386
+#define ProgramNamedParameter4fNV_remap_index 387
+#define ProgramNamedParameter4fvNV_remap_index 388
+#define PrimitiveRestartIndexNV_remap_index 389
+#define PrimitiveRestartNV_remap_index 390
+#define DepthBoundsEXT_remap_index 391
+#define BlendEquationSeparateEXT_remap_index 392
+#define BindFramebufferEXT_remap_index 393
+#define BindRenderbufferEXT_remap_index 394
+#define CheckFramebufferStatusEXT_remap_index 395
+#define DeleteFramebuffersEXT_remap_index 396
+#define DeleteRenderbuffersEXT_remap_index 397
+#define FramebufferRenderbufferEXT_remap_index 398
+#define FramebufferTexture1DEXT_remap_index 399
+#define FramebufferTexture2DEXT_remap_index 400
+#define FramebufferTexture3DEXT_remap_index 401
+#define GenFramebuffersEXT_remap_index 402
+#define GenRenderbuffersEXT_remap_index 403
+#define GenerateMipmapEXT_remap_index 404
+#define GetFramebufferAttachmentParameterivEXT_remap_index 405
+#define GetRenderbufferParameterivEXT_remap_index 406
+#define IsFramebufferEXT_remap_index 407
+#define IsRenderbufferEXT_remap_index 408
+#define RenderbufferStorageEXT_remap_index 409
+#define BlitFramebufferEXT_remap_index 410
+#define BufferParameteriAPPLE_remap_index 411
+#define FlushMappedBufferRangeAPPLE_remap_index 412
+#define BindFragDataLocationEXT_remap_index 413
+#define GetFragDataLocationEXT_remap_index 414
+#define GetUniformuivEXT_remap_index 415
+#define GetVertexAttribIivEXT_remap_index 416
+#define GetVertexAttribIuivEXT_remap_index 417
+#define Uniform1uiEXT_remap_index 418
+#define Uniform1uivEXT_remap_index 419
+#define Uniform2uiEXT_remap_index 420
+#define Uniform2uivEXT_remap_index 421
+#define Uniform3uiEXT_remap_index 422
+#define Uniform3uivEXT_remap_index 423
+#define Uniform4uiEXT_remap_index 424
+#define Uniform4uivEXT_remap_index 425
+#define VertexAttribI1iEXT_remap_index 426
+#define VertexAttribI1ivEXT_remap_index 427
+#define VertexAttribI1uiEXT_remap_index 428
+#define VertexAttribI1uivEXT_remap_index 429
+#define VertexAttribI2iEXT_remap_index 430
+#define VertexAttribI2ivEXT_remap_index 431
+#define VertexAttribI2uiEXT_remap_index 432
+#define VertexAttribI2uivEXT_remap_index 433
+#define VertexAttribI3iEXT_remap_index 434
+#define VertexAttribI3ivEXT_remap_index 435
+#define VertexAttribI3uiEXT_remap_index 436
+#define VertexAttribI3uivEXT_remap_index 437
+#define VertexAttribI4bvEXT_remap_index 438
+#define VertexAttribI4iEXT_remap_index 439
+#define VertexAttribI4ivEXT_remap_index 440
+#define VertexAttribI4svEXT_remap_index 441
+#define VertexAttribI4ubvEXT_remap_index 442
+#define VertexAttribI4uiEXT_remap_index 443
+#define VertexAttribI4uivEXT_remap_index 444
+#define VertexAttribI4usvEXT_remap_index 445
+#define VertexAttribIPointerEXT_remap_index 446
+#define FramebufferTextureLayerEXT_remap_index 447
+#define ColorMaskIndexedEXT_remap_index 448
+#define DisableIndexedEXT_remap_index 449
+#define EnableIndexedEXT_remap_index 450
+#define GetBooleanIndexedvEXT_remap_index 451
+#define GetIntegerIndexedvEXT_remap_index 452
+#define IsEnabledIndexedEXT_remap_index 453
+#define ClearColorIiEXT_remap_index 454
+#define ClearColorIuiEXT_remap_index 455
+#define GetTexParameterIivEXT_remap_index 456
+#define GetTexParameterIuivEXT_remap_index 457
+#define TexParameterIivEXT_remap_index 458
+#define TexParameterIuivEXT_remap_index 459
+#define BeginConditionalRenderNV_remap_index 460
+#define EndConditionalRenderNV_remap_index 461
+#define BeginTransformFeedbackEXT_remap_index 462
+#define BindBufferBaseEXT_remap_index 463
+#define BindBufferOffsetEXT_remap_index 464
+#define BindBufferRangeEXT_remap_index 465
+#define EndTransformFeedbackEXT_remap_index 466
+#define GetTransformFeedbackVaryingEXT_remap_index 467
+#define TransformFeedbackVaryingsEXT_remap_index 468
+#define ProvokingVertexEXT_remap_index 469
+#define GetTexParameterPointervAPPLE_remap_index 470
+#define TextureRangeAPPLE_remap_index 471
+#define GetObjectParameterivAPPLE_remap_index 472
+#define ObjectPurgeableAPPLE_remap_index 473
+#define ObjectUnpurgeableAPPLE_remap_index 474
+#define ActiveProgramEXT_remap_index 475
+#define CreateShaderProgramEXT_remap_index 476
+#define UseShaderProgramEXT_remap_index 477
+#define TextureBarrierNV_remap_index 478
+#define StencilFuncSeparateATI_remap_index 479
+#define ProgramEnvParameters4fvEXT_remap_index 480
+#define ProgramLocalParameters4fvEXT_remap_index 481
+#define GetQueryObjecti64vEXT_remap_index 482
+#define GetQueryObjectui64vEXT_remap_index 483
+#define EGLImageTargetRenderbufferStorageOES_remap_index 484
+#define EGLImageTargetTexture2DOES_remap_index 485
+
+#define _gloffset_AttachShader driDispatchRemapTable[AttachShader_remap_index]
+#define _gloffset_CreateProgram driDispatchRemapTable[CreateProgram_remap_index]
+#define _gloffset_CreateShader driDispatchRemapTable[CreateShader_remap_index]
+#define _gloffset_DeleteProgram driDispatchRemapTable[DeleteProgram_remap_index]
+#define _gloffset_DeleteShader driDispatchRemapTable[DeleteShader_remap_index]
+#define _gloffset_DetachShader driDispatchRemapTable[DetachShader_remap_index]
+#define _gloffset_GetAttachedShaders driDispatchRemapTable[GetAttachedShaders_remap_index]
+#define _gloffset_GetProgramInfoLog driDispatchRemapTable[GetProgramInfoLog_remap_index]
+#define _gloffset_GetProgramiv driDispatchRemapTable[GetProgramiv_remap_index]
+#define _gloffset_GetShaderInfoLog driDispatchRemapTable[GetShaderInfoLog_remap_index]
+#define _gloffset_GetShaderiv driDispatchRemapTable[GetShaderiv_remap_index]
+#define _gloffset_IsProgram driDispatchRemapTable[IsProgram_remap_index]
+#define _gloffset_IsShader driDispatchRemapTable[IsShader_remap_index]
+#define _gloffset_StencilFuncSeparate driDispatchRemapTable[StencilFuncSeparate_remap_index]
+#define _gloffset_StencilMaskSeparate driDispatchRemapTable[StencilMaskSeparate_remap_index]
+#define _gloffset_StencilOpSeparate driDispatchRemapTable[StencilOpSeparate_remap_index]
+#define _gloffset_UniformMatrix2x3fv driDispatchRemapTable[UniformMatrix2x3fv_remap_index]
+#define _gloffset_UniformMatrix2x4fv driDispatchRemapTable[UniformMatrix2x4fv_remap_index]
+#define _gloffset_UniformMatrix3x2fv driDispatchRemapTable[UniformMatrix3x2fv_remap_index]
+#define _gloffset_UniformMatrix3x4fv driDispatchRemapTable[UniformMatrix3x4fv_remap_index]
+#define _gloffset_UniformMatrix4x2fv driDispatchRemapTable[UniformMatrix4x2fv_remap_index]
+#define _gloffset_UniformMatrix4x3fv driDispatchRemapTable[UniformMatrix4x3fv_remap_index]
+#define _gloffset_ClampColor driDispatchRemapTable[ClampColor_remap_index]
+#define _gloffset_ClearBufferfi driDispatchRemapTable[ClearBufferfi_remap_index]
+#define _gloffset_ClearBufferfv driDispatchRemapTable[ClearBufferfv_remap_index]
+#define _gloffset_ClearBufferiv driDispatchRemapTable[ClearBufferiv_remap_index]
+#define _gloffset_ClearBufferuiv driDispatchRemapTable[ClearBufferuiv_remap_index]
+#define _gloffset_GetStringi driDispatchRemapTable[GetStringi_remap_index]
+#define _gloffset_TexBuffer driDispatchRemapTable[TexBuffer_remap_index]
+#define _gloffset_FramebufferTexture driDispatchRemapTable[FramebufferTexture_remap_index]
+#define _gloffset_GetBufferParameteri64v driDispatchRemapTable[GetBufferParameteri64v_remap_index]
+#define _gloffset_GetInteger64i_v driDispatchRemapTable[GetInteger64i_v_remap_index]
+#define _gloffset_VertexAttribDivisor driDispatchRemapTable[VertexAttribDivisor_remap_index]
+#define _gloffset_LoadTransposeMatrixdARB driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index]
+#define _gloffset_LoadTransposeMatrixfARB driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index]
+#define _gloffset_MultTransposeMatrixdARB driDispatchRemapTable[MultTransposeMatrixdARB_remap_index]
+#define _gloffset_MultTransposeMatrixfARB driDispatchRemapTable[MultTransposeMatrixfARB_remap_index]
+#define _gloffset_SampleCoverageARB driDispatchRemapTable[SampleCoverageARB_remap_index]
+#define _gloffset_CompressedTexImage1DARB driDispatchRemapTable[CompressedTexImage1DARB_remap_index]
+#define _gloffset_CompressedTexImage2DARB driDispatchRemapTable[CompressedTexImage2DARB_remap_index]
+#define _gloffset_CompressedTexImage3DARB driDispatchRemapTable[CompressedTexImage3DARB_remap_index]
+#define _gloffset_CompressedTexSubImage1DARB driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index]
+#define _gloffset_CompressedTexSubImage2DARB driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index]
+#define _gloffset_CompressedTexSubImage3DARB driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index]
+#define _gloffset_GetCompressedTexImageARB driDispatchRemapTable[GetCompressedTexImageARB_remap_index]
+#define _gloffset_DisableVertexAttribArrayARB driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index]
+#define _gloffset_EnableVertexAttribArrayARB driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index]
+#define _gloffset_GetProgramEnvParameterdvARB driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index]
+#define _gloffset_GetProgramEnvParameterfvARB driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index]
+#define _gloffset_GetProgramLocalParameterdvARB driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index]
+#define _gloffset_GetProgramLocalParameterfvARB driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index]
+#define _gloffset_GetProgramStringARB driDispatchRemapTable[GetProgramStringARB_remap_index]
+#define _gloffset_GetProgramivARB driDispatchRemapTable[GetProgramivARB_remap_index]
+#define _gloffset_GetVertexAttribdvARB driDispatchRemapTable[GetVertexAttribdvARB_remap_index]
+#define _gloffset_GetVertexAttribfvARB driDispatchRemapTable[GetVertexAttribfvARB_remap_index]
+#define _gloffset_GetVertexAttribivARB driDispatchRemapTable[GetVertexAttribivARB_remap_index]
+#define _gloffset_ProgramEnvParameter4dARB driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index]
+#define _gloffset_ProgramEnvParameter4dvARB driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index]
+#define _gloffset_ProgramEnvParameter4fARB driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index]
+#define _gloffset_ProgramEnvParameter4fvARB driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index]
+#define _gloffset_ProgramLocalParameter4dARB driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index]
+#define _gloffset_ProgramLocalParameter4dvARB driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index]
+#define _gloffset_ProgramLocalParameter4fARB driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index]
+#define _gloffset_ProgramLocalParameter4fvARB driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index]
+#define _gloffset_ProgramStringARB driDispatchRemapTable[ProgramStringARB_remap_index]
+#define _gloffset_VertexAttrib1dARB driDispatchRemapTable[VertexAttrib1dARB_remap_index]
+#define _gloffset_VertexAttrib1dvARB driDispatchRemapTable[VertexAttrib1dvARB_remap_index]
+#define _gloffset_VertexAttrib1fARB driDispatchRemapTable[VertexAttrib1fARB_remap_index]
+#define _gloffset_VertexAttrib1fvARB driDispatchRemapTable[VertexAttrib1fvARB_remap_index]
+#define _gloffset_VertexAttrib1sARB driDispatchRemapTable[VertexAttrib1sARB_remap_index]
+#define _gloffset_VertexAttrib1svARB driDispatchRemapTable[VertexAttrib1svARB_remap_index]
+#define _gloffset_VertexAttrib2dARB driDispatchRemapTable[VertexAttrib2dARB_remap_index]
+#define _gloffset_VertexAttrib2dvARB driDispatchRemapTable[VertexAttrib2dvARB_remap_index]
+#define _gloffset_VertexAttrib2fARB driDispatchRemapTable[VertexAttrib2fARB_remap_index]
+#define _gloffset_VertexAttrib2fvARB driDispatchRemapTable[VertexAttrib2fvARB_remap_index]
+#define _gloffset_VertexAttrib2sARB driDispatchRemapTable[VertexAttrib2sARB_remap_index]
+#define _gloffset_VertexAttrib2svARB driDispatchRemapTable[VertexAttrib2svARB_remap_index]
+#define _gloffset_VertexAttrib3dARB driDispatchRemapTable[VertexAttrib3dARB_remap_index]
+#define _gloffset_VertexAttrib3dvARB driDispatchRemapTable[VertexAttrib3dvARB_remap_index]
+#define _gloffset_VertexAttrib3fARB driDispatchRemapTable[VertexAttrib3fARB_remap_index]
+#define _gloffset_VertexAttrib3fvARB driDispatchRemapTable[VertexAttrib3fvARB_remap_index]
+#define _gloffset_VertexAttrib3sARB driDispatchRemapTable[VertexAttrib3sARB_remap_index]
+#define _gloffset_VertexAttrib3svARB driDispatchRemapTable[VertexAttrib3svARB_remap_index]
+#define _gloffset_VertexAttrib4NbvARB driDispatchRemapTable[VertexAttrib4NbvARB_remap_index]
+#define _gloffset_VertexAttrib4NivARB driDispatchRemapTable[VertexAttrib4NivARB_remap_index]
+#define _gloffset_VertexAttrib4NsvARB driDispatchRemapTable[VertexAttrib4NsvARB_remap_index]
+#define _gloffset_VertexAttrib4NubARB driDispatchRemapTable[VertexAttrib4NubARB_remap_index]
+#define _gloffset_VertexAttrib4NubvARB driDispatchRemapTable[VertexAttrib4NubvARB_remap_index]
+#define _gloffset_VertexAttrib4NuivARB driDispatchRemapTable[VertexAttrib4NuivARB_remap_index]
+#define _gloffset_VertexAttrib4NusvARB driDispatchRemapTable[VertexAttrib4NusvARB_remap_index]
+#define _gloffset_VertexAttrib4bvARB driDispatchRemapTable[VertexAttrib4bvARB_remap_index]
+#define _gloffset_VertexAttrib4dARB driDispatchRemapTable[VertexAttrib4dARB_remap_index]
+#define _gloffset_VertexAttrib4dvARB driDispatchRemapTable[VertexAttrib4dvARB_remap_index]
+#define _gloffset_VertexAttrib4fARB driDispatchRemapTable[VertexAttrib4fARB_remap_index]
+#define _gloffset_VertexAttrib4fvARB driDispatchRemapTable[VertexAttrib4fvARB_remap_index]
+#define _gloffset_VertexAttrib4ivARB driDispatchRemapTable[VertexAttrib4ivARB_remap_index]
+#define _gloffset_VertexAttrib4sARB driDispatchRemapTable[VertexAttrib4sARB_remap_index]
+#define _gloffset_VertexAttrib4svARB driDispatchRemapTable[VertexAttrib4svARB_remap_index]
+#define _gloffset_VertexAttrib4ubvARB driDispatchRemapTable[VertexAttrib4ubvARB_remap_index]
+#define _gloffset_VertexAttrib4uivARB driDispatchRemapTable[VertexAttrib4uivARB_remap_index]
+#define _gloffset_VertexAttrib4usvARB driDispatchRemapTable[VertexAttrib4usvARB_remap_index]
+#define _gloffset_VertexAttribPointerARB driDispatchRemapTable[VertexAttribPointerARB_remap_index]
+#define _gloffset_BindBufferARB driDispatchRemapTable[BindBufferARB_remap_index]
+#define _gloffset_BufferDataARB driDispatchRemapTable[BufferDataARB_remap_index]
+#define _gloffset_BufferSubDataARB driDispatchRemapTable[BufferSubDataARB_remap_index]
+#define _gloffset_DeleteBuffersARB driDispatchRemapTable[DeleteBuffersARB_remap_index]
+#define _gloffset_GenBuffersARB driDispatchRemapTable[GenBuffersARB_remap_index]
+#define _gloffset_GetBufferParameterivARB driDispatchRemapTable[GetBufferParameterivARB_remap_index]
+#define _gloffset_GetBufferPointervARB driDispatchRemapTable[GetBufferPointervARB_remap_index]
+#define _gloffset_GetBufferSubDataARB driDispatchRemapTable[GetBufferSubDataARB_remap_index]
+#define _gloffset_IsBufferARB driDispatchRemapTable[IsBufferARB_remap_index]
+#define _gloffset_MapBufferARB driDispatchRemapTable[MapBufferARB_remap_index]
+#define _gloffset_UnmapBufferARB driDispatchRemapTable[UnmapBufferARB_remap_index]
+#define _gloffset_BeginQueryARB driDispatchRemapTable[BeginQueryARB_remap_index]
+#define _gloffset_DeleteQueriesARB driDispatchRemapTable[DeleteQueriesARB_remap_index]
+#define _gloffset_EndQueryARB driDispatchRemapTable[EndQueryARB_remap_index]
+#define _gloffset_GenQueriesARB driDispatchRemapTable[GenQueriesARB_remap_index]
+#define _gloffset_GetQueryObjectivARB driDispatchRemapTable[GetQueryObjectivARB_remap_index]
+#define _gloffset_GetQueryObjectuivARB driDispatchRemapTable[GetQueryObjectuivARB_remap_index]
+#define _gloffset_GetQueryivARB driDispatchRemapTable[GetQueryivARB_remap_index]
+#define _gloffset_IsQueryARB driDispatchRemapTable[IsQueryARB_remap_index]
+#define _gloffset_AttachObjectARB driDispatchRemapTable[AttachObjectARB_remap_index]
+#define _gloffset_CompileShaderARB driDispatchRemapTable[CompileShaderARB_remap_index]
+#define _gloffset_CreateProgramObjectARB driDispatchRemapTable[CreateProgramObjectARB_remap_index]
+#define _gloffset_CreateShaderObjectARB driDispatchRemapTable[CreateShaderObjectARB_remap_index]
+#define _gloffset_DeleteObjectARB driDispatchRemapTable[DeleteObjectARB_remap_index]
+#define _gloffset_DetachObjectARB driDispatchRemapTable[DetachObjectARB_remap_index]
+#define _gloffset_GetActiveUniformARB driDispatchRemapTable[GetActiveUniformARB_remap_index]
+#define _gloffset_GetAttachedObjectsARB driDispatchRemapTable[GetAttachedObjectsARB_remap_index]
+#define _gloffset_GetHandleARB driDispatchRemapTable[GetHandleARB_remap_index]
+#define _gloffset_GetInfoLogARB driDispatchRemapTable[GetInfoLogARB_remap_index]
+#define _gloffset_GetObjectParameterfvARB driDispatchRemapTable[GetObjectParameterfvARB_remap_index]
+#define _gloffset_GetObjectParameterivARB driDispatchRemapTable[GetObjectParameterivARB_remap_index]
+#define _gloffset_GetShaderSourceARB driDispatchRemapTable[GetShaderSourceARB_remap_index]
+#define _gloffset_GetUniformLocationARB driDispatchRemapTable[GetUniformLocationARB_remap_index]
+#define _gloffset_GetUniformfvARB driDispatchRemapTable[GetUniformfvARB_remap_index]
+#define _gloffset_GetUniformivARB driDispatchRemapTable[GetUniformivARB_remap_index]
+#define _gloffset_LinkProgramARB driDispatchRemapTable[LinkProgramARB_remap_index]
+#define _gloffset_ShaderSourceARB driDispatchRemapTable[ShaderSourceARB_remap_index]
+#define _gloffset_Uniform1fARB driDispatchRemapTable[Uniform1fARB_remap_index]
+#define _gloffset_Uniform1fvARB driDispatchRemapTable[Uniform1fvARB_remap_index]
+#define _gloffset_Uniform1iARB driDispatchRemapTable[Uniform1iARB_remap_index]
+#define _gloffset_Uniform1ivARB driDispatchRemapTable[Uniform1ivARB_remap_index]
+#define _gloffset_Uniform2fARB driDispatchRemapTable[Uniform2fARB_remap_index]
+#define _gloffset_Uniform2fvARB driDispatchRemapTable[Uniform2fvARB_remap_index]
+#define _gloffset_Uniform2iARB driDispatchRemapTable[Uniform2iARB_remap_index]
+#define _gloffset_Uniform2ivARB driDispatchRemapTable[Uniform2ivARB_remap_index]
+#define _gloffset_Uniform3fARB driDispatchRemapTable[Uniform3fARB_remap_index]
+#define _gloffset_Uniform3fvARB driDispatchRemapTable[Uniform3fvARB_remap_index]
+#define _gloffset_Uniform3iARB driDispatchRemapTable[Uniform3iARB_remap_index]
+#define _gloffset_Uniform3ivARB driDispatchRemapTable[Uniform3ivARB_remap_index]
+#define _gloffset_Uniform4fARB driDispatchRemapTable[Uniform4fARB_remap_index]
+#define _gloffset_Uniform4fvARB driDispatchRemapTable[Uniform4fvARB_remap_index]
+#define _gloffset_Uniform4iARB driDispatchRemapTable[Uniform4iARB_remap_index]
+#define _gloffset_Uniform4ivARB driDispatchRemapTable[Uniform4ivARB_remap_index]
+#define _gloffset_UniformMatrix2fvARB driDispatchRemapTable[UniformMatrix2fvARB_remap_index]
+#define _gloffset_UniformMatrix3fvARB driDispatchRemapTable[UniformMatrix3fvARB_remap_index]
+#define _gloffset_UniformMatrix4fvARB driDispatchRemapTable[UniformMatrix4fvARB_remap_index]
+#define _gloffset_UseProgramObjectARB driDispatchRemapTable[UseProgramObjectARB_remap_index]
+#define _gloffset_ValidateProgramARB driDispatchRemapTable[ValidateProgramARB_remap_index]
+#define _gloffset_BindAttribLocationARB driDispatchRemapTable[BindAttribLocationARB_remap_index]
+#define _gloffset_GetActiveAttribARB driDispatchRemapTable[GetActiveAttribARB_remap_index]
+#define _gloffset_GetAttribLocationARB driDispatchRemapTable[GetAttribLocationARB_remap_index]
+#define _gloffset_DrawBuffersARB driDispatchRemapTable[DrawBuffersARB_remap_index]
+#define _gloffset_ClampColorARB driDispatchRemapTable[ClampColorARB_remap_index]
+#define _gloffset_DrawArraysInstancedARB driDispatchRemapTable[DrawArraysInstancedARB_remap_index]
+#define _gloffset_DrawElementsInstancedARB driDispatchRemapTable[DrawElementsInstancedARB_remap_index]
+#define _gloffset_RenderbufferStorageMultisample driDispatchRemapTable[RenderbufferStorageMultisample_remap_index]
+#define _gloffset_FramebufferTextureARB driDispatchRemapTable[FramebufferTextureARB_remap_index]
+#define _gloffset_FramebufferTextureFaceARB driDispatchRemapTable[FramebufferTextureFaceARB_remap_index]
+#define _gloffset_ProgramParameteriARB driDispatchRemapTable[ProgramParameteriARB_remap_index]
+#define _gloffset_VertexAttribDivisorARB driDispatchRemapTable[VertexAttribDivisorARB_remap_index]
+#define _gloffset_FlushMappedBufferRange driDispatchRemapTable[FlushMappedBufferRange_remap_index]
+#define _gloffset_MapBufferRange driDispatchRemapTable[MapBufferRange_remap_index]
+#define _gloffset_TexBufferARB driDispatchRemapTable[TexBufferARB_remap_index]
+#define _gloffset_BindVertexArray driDispatchRemapTable[BindVertexArray_remap_index]
+#define _gloffset_GenVertexArrays driDispatchRemapTable[GenVertexArrays_remap_index]
+#define _gloffset_CopyBufferSubData driDispatchRemapTable[CopyBufferSubData_remap_index]
+#define _gloffset_ClientWaitSync driDispatchRemapTable[ClientWaitSync_remap_index]
+#define _gloffset_DeleteSync driDispatchRemapTable[DeleteSync_remap_index]
+#define _gloffset_FenceSync driDispatchRemapTable[FenceSync_remap_index]
+#define _gloffset_GetInteger64v driDispatchRemapTable[GetInteger64v_remap_index]
+#define _gloffset_GetSynciv driDispatchRemapTable[GetSynciv_remap_index]
+#define _gloffset_IsSync driDispatchRemapTable[IsSync_remap_index]
+#define _gloffset_WaitSync driDispatchRemapTable[WaitSync_remap_index]
+#define _gloffset_DrawElementsBaseVertex driDispatchRemapTable[DrawElementsBaseVertex_remap_index]
+#define _gloffset_DrawRangeElementsBaseVertex driDispatchRemapTable[DrawRangeElementsBaseVertex_remap_index]
+#define _gloffset_MultiDrawElementsBaseVertex driDispatchRemapTable[MultiDrawElementsBaseVertex_remap_index]
+#define _gloffset_BlendEquationSeparateiARB driDispatchRemapTable[BlendEquationSeparateiARB_remap_index]
+#define _gloffset_BlendEquationiARB driDispatchRemapTable[BlendEquationiARB_remap_index]
+#define _gloffset_BlendFuncSeparateiARB driDispatchRemapTable[BlendFuncSeparateiARB_remap_index]
+#define _gloffset_BlendFunciARB driDispatchRemapTable[BlendFunciARB_remap_index]
+#define _gloffset_BindTransformFeedback driDispatchRemapTable[BindTransformFeedback_remap_index]
+#define _gloffset_DeleteTransformFeedbacks driDispatchRemapTable[DeleteTransformFeedbacks_remap_index]
+#define _gloffset_DrawTransformFeedback driDispatchRemapTable[DrawTransformFeedback_remap_index]
+#define _gloffset_GenTransformFeedbacks driDispatchRemapTable[GenTransformFeedbacks_remap_index]
+#define _gloffset_IsTransformFeedback driDispatchRemapTable[IsTransformFeedback_remap_index]
+#define _gloffset_PauseTransformFeedback driDispatchRemapTable[PauseTransformFeedback_remap_index]
+#define _gloffset_ResumeTransformFeedback driDispatchRemapTable[ResumeTransformFeedback_remap_index]
+#define _gloffset_ClearDepthf driDispatchRemapTable[ClearDepthf_remap_index]
+#define _gloffset_DepthRangef driDispatchRemapTable[DepthRangef_remap_index]
+#define _gloffset_GetShaderPrecisionFormat driDispatchRemapTable[GetShaderPrecisionFormat_remap_index]
+#define _gloffset_ReleaseShaderCompiler driDispatchRemapTable[ReleaseShaderCompiler_remap_index]
+#define _gloffset_ShaderBinary driDispatchRemapTable[ShaderBinary_remap_index]
+#define _gloffset_PolygonOffsetEXT driDispatchRemapTable[PolygonOffsetEXT_remap_index]
+#define _gloffset_GetPixelTexGenParameterfvSGIS driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index]
+#define _gloffset_GetPixelTexGenParameterivSGIS driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index]
+#define _gloffset_PixelTexGenParameterfSGIS driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index]
+#define _gloffset_PixelTexGenParameterfvSGIS driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index]
+#define _gloffset_PixelTexGenParameteriSGIS driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index]
+#define _gloffset_PixelTexGenParameterivSGIS driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index]
+#define _gloffset_SampleMaskSGIS driDispatchRemapTable[SampleMaskSGIS_remap_index]
+#define _gloffset_SamplePatternSGIS driDispatchRemapTable[SamplePatternSGIS_remap_index]
+#define _gloffset_ColorPointerEXT driDispatchRemapTable[ColorPointerEXT_remap_index]
+#define _gloffset_EdgeFlagPointerEXT driDispatchRemapTable[EdgeFlagPointerEXT_remap_index]
+#define _gloffset_IndexPointerEXT driDispatchRemapTable[IndexPointerEXT_remap_index]
+#define _gloffset_NormalPointerEXT driDispatchRemapTable[NormalPointerEXT_remap_index]
+#define _gloffset_TexCoordPointerEXT driDispatchRemapTable[TexCoordPointerEXT_remap_index]
+#define _gloffset_VertexPointerEXT driDispatchRemapTable[VertexPointerEXT_remap_index]
+#define _gloffset_PointParameterfEXT driDispatchRemapTable[PointParameterfEXT_remap_index]
+#define _gloffset_PointParameterfvEXT driDispatchRemapTable[PointParameterfvEXT_remap_index]
+#define _gloffset_LockArraysEXT driDispatchRemapTable[LockArraysEXT_remap_index]
+#define _gloffset_UnlockArraysEXT driDispatchRemapTable[UnlockArraysEXT_remap_index]
+#define _gloffset_SecondaryColor3bEXT driDispatchRemapTable[SecondaryColor3bEXT_remap_index]
+#define _gloffset_SecondaryColor3bvEXT driDispatchRemapTable[SecondaryColor3bvEXT_remap_index]
+#define _gloffset_SecondaryColor3dEXT driDispatchRemapTable[SecondaryColor3dEXT_remap_index]
+#define _gloffset_SecondaryColor3dvEXT driDispatchRemapTable[SecondaryColor3dvEXT_remap_index]
+#define _gloffset_SecondaryColor3fEXT driDispatchRemapTable[SecondaryColor3fEXT_remap_index]
+#define _gloffset_SecondaryColor3fvEXT driDispatchRemapTable[SecondaryColor3fvEXT_remap_index]
+#define _gloffset_SecondaryColor3iEXT driDispatchRemapTable[SecondaryColor3iEXT_remap_index]
+#define _gloffset_SecondaryColor3ivEXT driDispatchRemapTable[SecondaryColor3ivEXT_remap_index]
+#define _gloffset_SecondaryColor3sEXT driDispatchRemapTable[SecondaryColor3sEXT_remap_index]
+#define _gloffset_SecondaryColor3svEXT driDispatchRemapTable[SecondaryColor3svEXT_remap_index]
+#define _gloffset_SecondaryColor3ubEXT driDispatchRemapTable[SecondaryColor3ubEXT_remap_index]
+#define _gloffset_SecondaryColor3ubvEXT driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index]
+#define _gloffset_SecondaryColor3uiEXT driDispatchRemapTable[SecondaryColor3uiEXT_remap_index]
+#define _gloffset_SecondaryColor3uivEXT driDispatchRemapTable[SecondaryColor3uivEXT_remap_index]
+#define _gloffset_SecondaryColor3usEXT driDispatchRemapTable[SecondaryColor3usEXT_remap_index]
+#define _gloffset_SecondaryColor3usvEXT driDispatchRemapTable[SecondaryColor3usvEXT_remap_index]
+#define _gloffset_SecondaryColorPointerEXT driDispatchRemapTable[SecondaryColorPointerEXT_remap_index]
+#define _gloffset_MultiDrawArraysEXT driDispatchRemapTable[MultiDrawArraysEXT_remap_index]
+#define _gloffset_MultiDrawElementsEXT driDispatchRemapTable[MultiDrawElementsEXT_remap_index]
+#define _gloffset_FogCoordPointerEXT driDispatchRemapTable[FogCoordPointerEXT_remap_index]
+#define _gloffset_FogCoorddEXT driDispatchRemapTable[FogCoorddEXT_remap_index]
+#define _gloffset_FogCoorddvEXT driDispatchRemapTable[FogCoorddvEXT_remap_index]
+#define _gloffset_FogCoordfEXT driDispatchRemapTable[FogCoordfEXT_remap_index]
+#define _gloffset_FogCoordfvEXT driDispatchRemapTable[FogCoordfvEXT_remap_index]
+#define _gloffset_PixelTexGenSGIX driDispatchRemapTable[PixelTexGenSGIX_remap_index]
+#define _gloffset_BlendFuncSeparateEXT driDispatchRemapTable[BlendFuncSeparateEXT_remap_index]
+#define _gloffset_FlushVertexArrayRangeNV driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index]
+#define _gloffset_VertexArrayRangeNV driDispatchRemapTable[VertexArrayRangeNV_remap_index]
+#define _gloffset_CombinerInputNV driDispatchRemapTable[CombinerInputNV_remap_index]
+#define _gloffset_CombinerOutputNV driDispatchRemapTable[CombinerOutputNV_remap_index]
+#define _gloffset_CombinerParameterfNV driDispatchRemapTable[CombinerParameterfNV_remap_index]
+#define _gloffset_CombinerParameterfvNV driDispatchRemapTable[CombinerParameterfvNV_remap_index]
+#define _gloffset_CombinerParameteriNV driDispatchRemapTable[CombinerParameteriNV_remap_index]
+#define _gloffset_CombinerParameterivNV driDispatchRemapTable[CombinerParameterivNV_remap_index]
+#define _gloffset_FinalCombinerInputNV driDispatchRemapTable[FinalCombinerInputNV_remap_index]
+#define _gloffset_GetCombinerInputParameterfvNV driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index]
+#define _gloffset_GetCombinerInputParameterivNV driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index]
+#define _gloffset_GetCombinerOutputParameterfvNV driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index]
+#define _gloffset_GetCombinerOutputParameterivNV driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index]
+#define _gloffset_GetFinalCombinerInputParameterfvNV driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index]
+#define _gloffset_GetFinalCombinerInputParameterivNV driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index]
+#define _gloffset_ResizeBuffersMESA driDispatchRemapTable[ResizeBuffersMESA_remap_index]
+#define _gloffset_WindowPos2dMESA driDispatchRemapTable[WindowPos2dMESA_remap_index]
+#define _gloffset_WindowPos2dvMESA driDispatchRemapTable[WindowPos2dvMESA_remap_index]
+#define _gloffset_WindowPos2fMESA driDispatchRemapTable[WindowPos2fMESA_remap_index]
+#define _gloffset_WindowPos2fvMESA driDispatchRemapTable[WindowPos2fvMESA_remap_index]
+#define _gloffset_WindowPos2iMESA driDispatchRemapTable[WindowPos2iMESA_remap_index]
+#define _gloffset_WindowPos2ivMESA driDispatchRemapTable[WindowPos2ivMESA_remap_index]
+#define _gloffset_WindowPos2sMESA driDispatchRemapTable[WindowPos2sMESA_remap_index]
+#define _gloffset_WindowPos2svMESA driDispatchRemapTable[WindowPos2svMESA_remap_index]
+#define _gloffset_WindowPos3dMESA driDispatchRemapTable[WindowPos3dMESA_remap_index]
+#define _gloffset_WindowPos3dvMESA driDispatchRemapTable[WindowPos3dvMESA_remap_index]
+#define _gloffset_WindowPos3fMESA driDispatchRemapTable[WindowPos3fMESA_remap_index]
+#define _gloffset_WindowPos3fvMESA driDispatchRemapTable[WindowPos3fvMESA_remap_index]
+#define _gloffset_WindowPos3iMESA driDispatchRemapTable[WindowPos3iMESA_remap_index]
+#define _gloffset_WindowPos3ivMESA driDispatchRemapTable[WindowPos3ivMESA_remap_index]
+#define _gloffset_WindowPos3sMESA driDispatchRemapTable[WindowPos3sMESA_remap_index]
+#define _gloffset_WindowPos3svMESA driDispatchRemapTable[WindowPos3svMESA_remap_index]
+#define _gloffset_WindowPos4dMESA driDispatchRemapTable[WindowPos4dMESA_remap_index]
+#define _gloffset_WindowPos4dvMESA driDispatchRemapTable[WindowPos4dvMESA_remap_index]
+#define _gloffset_WindowPos4fMESA driDispatchRemapTable[WindowPos4fMESA_remap_index]
+#define _gloffset_WindowPos4fvMESA driDispatchRemapTable[WindowPos4fvMESA_remap_index]
+#define _gloffset_WindowPos4iMESA driDispatchRemapTable[WindowPos4iMESA_remap_index]
+#define _gloffset_WindowPos4ivMESA driDispatchRemapTable[WindowPos4ivMESA_remap_index]
+#define _gloffset_WindowPos4sMESA driDispatchRemapTable[WindowPos4sMESA_remap_index]
+#define _gloffset_WindowPos4svMESA driDispatchRemapTable[WindowPos4svMESA_remap_index]
+#define _gloffset_MultiModeDrawArraysIBM driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index]
+#define _gloffset_MultiModeDrawElementsIBM driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index]
+#define _gloffset_DeleteFencesNV driDispatchRemapTable[DeleteFencesNV_remap_index]
+#define _gloffset_FinishFenceNV driDispatchRemapTable[FinishFenceNV_remap_index]
+#define _gloffset_GenFencesNV driDispatchRemapTable[GenFencesNV_remap_index]
+#define _gloffset_GetFenceivNV driDispatchRemapTable[GetFenceivNV_remap_index]
+#define _gloffset_IsFenceNV driDispatchRemapTable[IsFenceNV_remap_index]
+#define _gloffset_SetFenceNV driDispatchRemapTable[SetFenceNV_remap_index]
+#define _gloffset_TestFenceNV driDispatchRemapTable[TestFenceNV_remap_index]
+#define _gloffset_AreProgramsResidentNV driDispatchRemapTable[AreProgramsResidentNV_remap_index]
+#define _gloffset_BindProgramNV driDispatchRemapTable[BindProgramNV_remap_index]
+#define _gloffset_DeleteProgramsNV driDispatchRemapTable[DeleteProgramsNV_remap_index]
+#define _gloffset_ExecuteProgramNV driDispatchRemapTable[ExecuteProgramNV_remap_index]
+#define _gloffset_GenProgramsNV driDispatchRemapTable[GenProgramsNV_remap_index]
+#define _gloffset_GetProgramParameterdvNV driDispatchRemapTable[GetProgramParameterdvNV_remap_index]
+#define _gloffset_GetProgramParameterfvNV driDispatchRemapTable[GetProgramParameterfvNV_remap_index]
+#define _gloffset_GetProgramStringNV driDispatchRemapTable[GetProgramStringNV_remap_index]
+#define _gloffset_GetProgramivNV driDispatchRemapTable[GetProgramivNV_remap_index]
+#define _gloffset_GetTrackMatrixivNV driDispatchRemapTable[GetTrackMatrixivNV_remap_index]
+#define _gloffset_GetVertexAttribPointervNV driDispatchRemapTable[GetVertexAttribPointervNV_remap_index]
+#define _gloffset_GetVertexAttribdvNV driDispatchRemapTable[GetVertexAttribdvNV_remap_index]
+#define _gloffset_GetVertexAttribfvNV driDispatchRemapTable[GetVertexAttribfvNV_remap_index]
+#define _gloffset_GetVertexAttribivNV driDispatchRemapTable[GetVertexAttribivNV_remap_index]
+#define _gloffset_IsProgramNV driDispatchRemapTable[IsProgramNV_remap_index]
+#define _gloffset_LoadProgramNV driDispatchRemapTable[LoadProgramNV_remap_index]
+#define _gloffset_ProgramParameters4dvNV driDispatchRemapTable[ProgramParameters4dvNV_remap_index]
+#define _gloffset_ProgramParameters4fvNV driDispatchRemapTable[ProgramParameters4fvNV_remap_index]
+#define _gloffset_RequestResidentProgramsNV driDispatchRemapTable[RequestResidentProgramsNV_remap_index]
+#define _gloffset_TrackMatrixNV driDispatchRemapTable[TrackMatrixNV_remap_index]
+#define _gloffset_VertexAttrib1dNV driDispatchRemapTable[VertexAttrib1dNV_remap_index]
+#define _gloffset_VertexAttrib1dvNV driDispatchRemapTable[VertexAttrib1dvNV_remap_index]
+#define _gloffset_VertexAttrib1fNV driDispatchRemapTable[VertexAttrib1fNV_remap_index]
+#define _gloffset_VertexAttrib1fvNV driDispatchRemapTable[VertexAttrib1fvNV_remap_index]
+#define _gloffset_VertexAttrib1sNV driDispatchRemapTable[VertexAttrib1sNV_remap_index]
+#define _gloffset_VertexAttrib1svNV driDispatchRemapTable[VertexAttrib1svNV_remap_index]
+#define _gloffset_VertexAttrib2dNV driDispatchRemapTable[VertexAttrib2dNV_remap_index]
+#define _gloffset_VertexAttrib2dvNV driDispatchRemapTable[VertexAttrib2dvNV_remap_index]
+#define _gloffset_VertexAttrib2fNV driDispatchRemapTable[VertexAttrib2fNV_remap_index]
+#define _gloffset_VertexAttrib2fvNV driDispatchRemapTable[VertexAttrib2fvNV_remap_index]
+#define _gloffset_VertexAttrib2sNV driDispatchRemapTable[VertexAttrib2sNV_remap_index]
+#define _gloffset_VertexAttrib2svNV driDispatchRemapTable[VertexAttrib2svNV_remap_index]
+#define _gloffset_VertexAttrib3dNV driDispatchRemapTable[VertexAttrib3dNV_remap_index]
+#define _gloffset_VertexAttrib3dvNV driDispatchRemapTable[VertexAttrib3dvNV_remap_index]
+#define _gloffset_VertexAttrib3fNV driDispatchRemapTable[VertexAttrib3fNV_remap_index]
+#define _gloffset_VertexAttrib3fvNV driDispatchRemapTable[VertexAttrib3fvNV_remap_index]
+#define _gloffset_VertexAttrib3sNV driDispatchRemapTable[VertexAttrib3sNV_remap_index]
+#define _gloffset_VertexAttrib3svNV driDispatchRemapTable[VertexAttrib3svNV_remap_index]
+#define _gloffset_VertexAttrib4dNV driDispatchRemapTable[VertexAttrib4dNV_remap_index]
+#define _gloffset_VertexAttrib4dvNV driDispatchRemapTable[VertexAttrib4dvNV_remap_index]
+#define _gloffset_VertexAttrib4fNV driDispatchRemapTable[VertexAttrib4fNV_remap_index]
+#define _gloffset_VertexAttrib4fvNV driDispatchRemapTable[VertexAttrib4fvNV_remap_index]
+#define _gloffset_VertexAttrib4sNV driDispatchRemapTable[VertexAttrib4sNV_remap_index]
+#define _gloffset_VertexAttrib4svNV driDispatchRemapTable[VertexAttrib4svNV_remap_index]
+#define _gloffset_VertexAttrib4ubNV driDispatchRemapTable[VertexAttrib4ubNV_remap_index]
+#define _gloffset_VertexAttrib4ubvNV driDispatchRemapTable[VertexAttrib4ubvNV_remap_index]
+#define _gloffset_VertexAttribPointerNV driDispatchRemapTable[VertexAttribPointerNV_remap_index]
+#define _gloffset_VertexAttribs1dvNV driDispatchRemapTable[VertexAttribs1dvNV_remap_index]
+#define _gloffset_VertexAttribs1fvNV driDispatchRemapTable[VertexAttribs1fvNV_remap_index]
+#define _gloffset_VertexAttribs1svNV driDispatchRemapTable[VertexAttribs1svNV_remap_index]
+#define _gloffset_VertexAttribs2dvNV driDispatchRemapTable[VertexAttribs2dvNV_remap_index]
+#define _gloffset_VertexAttribs2fvNV driDispatchRemapTable[VertexAttribs2fvNV_remap_index]
+#define _gloffset_VertexAttribs2svNV driDispatchRemapTable[VertexAttribs2svNV_remap_index]
+#define _gloffset_VertexAttribs3dvNV driDispatchRemapTable[VertexAttribs3dvNV_remap_index]
+#define _gloffset_VertexAttribs3fvNV driDispatchRemapTable[VertexAttribs3fvNV_remap_index]
+#define _gloffset_VertexAttribs3svNV driDispatchRemapTable[VertexAttribs3svNV_remap_index]
+#define _gloffset_VertexAttribs4dvNV driDispatchRemapTable[VertexAttribs4dvNV_remap_index]
+#define _gloffset_VertexAttribs4fvNV driDispatchRemapTable[VertexAttribs4fvNV_remap_index]
+#define _gloffset_VertexAttribs4svNV driDispatchRemapTable[VertexAttribs4svNV_remap_index]
+#define _gloffset_VertexAttribs4ubvNV driDispatchRemapTable[VertexAttribs4ubvNV_remap_index]
+#define _gloffset_GetTexBumpParameterfvATI driDispatchRemapTable[GetTexBumpParameterfvATI_remap_index]
+#define _gloffset_GetTexBumpParameterivATI driDispatchRemapTable[GetTexBumpParameterivATI_remap_index]
+#define _gloffset_TexBumpParameterfvATI driDispatchRemapTable[TexBumpParameterfvATI_remap_index]
+#define _gloffset_TexBumpParameterivATI driDispatchRemapTable[TexBumpParameterivATI_remap_index]
+#define _gloffset_AlphaFragmentOp1ATI driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index]
+#define _gloffset_AlphaFragmentOp2ATI driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index]
+#define _gloffset_AlphaFragmentOp3ATI driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index]
+#define _gloffset_BeginFragmentShaderATI driDispatchRemapTable[BeginFragmentShaderATI_remap_index]
+#define _gloffset_BindFragmentShaderATI driDispatchRemapTable[BindFragmentShaderATI_remap_index]
+#define _gloffset_ColorFragmentOp1ATI driDispatchRemapTable[ColorFragmentOp1ATI_remap_index]
+#define _gloffset_ColorFragmentOp2ATI driDispatchRemapTable[ColorFragmentOp2ATI_remap_index]
+#define _gloffset_ColorFragmentOp3ATI driDispatchRemapTable[ColorFragmentOp3ATI_remap_index]
+#define _gloffset_DeleteFragmentShaderATI driDispatchRemapTable[DeleteFragmentShaderATI_remap_index]
+#define _gloffset_EndFragmentShaderATI driDispatchRemapTable[EndFragmentShaderATI_remap_index]
+#define _gloffset_GenFragmentShadersATI driDispatchRemapTable[GenFragmentShadersATI_remap_index]
+#define _gloffset_PassTexCoordATI driDispatchRemapTable[PassTexCoordATI_remap_index]
+#define _gloffset_SampleMapATI driDispatchRemapTable[SampleMapATI_remap_index]
+#define _gloffset_SetFragmentShaderConstantATI driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index]
+#define _gloffset_PointParameteriNV driDispatchRemapTable[PointParameteriNV_remap_index]
+#define _gloffset_PointParameterivNV driDispatchRemapTable[PointParameterivNV_remap_index]
+#define _gloffset_ActiveStencilFaceEXT driDispatchRemapTable[ActiveStencilFaceEXT_remap_index]
+#define _gloffset_BindVertexArrayAPPLE driDispatchRemapTable[BindVertexArrayAPPLE_remap_index]
+#define _gloffset_DeleteVertexArraysAPPLE driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index]
+#define _gloffset_GenVertexArraysAPPLE driDispatchRemapTable[GenVertexArraysAPPLE_remap_index]
+#define _gloffset_IsVertexArrayAPPLE driDispatchRemapTable[IsVertexArrayAPPLE_remap_index]
+#define _gloffset_GetProgramNamedParameterdvNV driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index]
+#define _gloffset_GetProgramNamedParameterfvNV driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index]
+#define _gloffset_ProgramNamedParameter4dNV driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index]
+#define _gloffset_ProgramNamedParameter4dvNV driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index]
+#define _gloffset_ProgramNamedParameter4fNV driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index]
+#define _gloffset_ProgramNamedParameter4fvNV driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index]
+#define _gloffset_PrimitiveRestartIndexNV driDispatchRemapTable[PrimitiveRestartIndexNV_remap_index]
+#define _gloffset_PrimitiveRestartNV driDispatchRemapTable[PrimitiveRestartNV_remap_index]
+#define _gloffset_DepthBoundsEXT driDispatchRemapTable[DepthBoundsEXT_remap_index]
+#define _gloffset_BlendEquationSeparateEXT driDispatchRemapTable[BlendEquationSeparateEXT_remap_index]
+#define _gloffset_BindFramebufferEXT driDispatchRemapTable[BindFramebufferEXT_remap_index]
+#define _gloffset_BindRenderbufferEXT driDispatchRemapTable[BindRenderbufferEXT_remap_index]
+#define _gloffset_CheckFramebufferStatusEXT driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index]
+#define _gloffset_DeleteFramebuffersEXT driDispatchRemapTable[DeleteFramebuffersEXT_remap_index]
+#define _gloffset_DeleteRenderbuffersEXT driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index]
+#define _gloffset_FramebufferRenderbufferEXT driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index]
+#define _gloffset_FramebufferTexture1DEXT driDispatchRemapTable[FramebufferTexture1DEXT_remap_index]
+#define _gloffset_FramebufferTexture2DEXT driDispatchRemapTable[FramebufferTexture2DEXT_remap_index]
+#define _gloffset_FramebufferTexture3DEXT driDispatchRemapTable[FramebufferTexture3DEXT_remap_index]
+#define _gloffset_GenFramebuffersEXT driDispatchRemapTable[GenFramebuffersEXT_remap_index]
+#define _gloffset_GenRenderbuffersEXT driDispatchRemapTable[GenRenderbuffersEXT_remap_index]
+#define _gloffset_GenerateMipmapEXT driDispatchRemapTable[GenerateMipmapEXT_remap_index]
+#define _gloffset_GetFramebufferAttachmentParameterivEXT driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index]
+#define _gloffset_GetRenderbufferParameterivEXT driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index]
+#define _gloffset_IsFramebufferEXT driDispatchRemapTable[IsFramebufferEXT_remap_index]
+#define _gloffset_IsRenderbufferEXT driDispatchRemapTable[IsRenderbufferEXT_remap_index]
+#define _gloffset_RenderbufferStorageEXT driDispatchRemapTable[RenderbufferStorageEXT_remap_index]
+#define _gloffset_BlitFramebufferEXT driDispatchRemapTable[BlitFramebufferEXT_remap_index]
+#define _gloffset_BufferParameteriAPPLE driDispatchRemapTable[BufferParameteriAPPLE_remap_index]
+#define _gloffset_FlushMappedBufferRangeAPPLE driDispatchRemapTable[FlushMappedBufferRangeAPPLE_remap_index]
+#define _gloffset_BindFragDataLocationEXT driDispatchRemapTable[BindFragDataLocationEXT_remap_index]
+#define _gloffset_GetFragDataLocationEXT driDispatchRemapTable[GetFragDataLocationEXT_remap_index]
+#define _gloffset_GetUniformuivEXT driDispatchRemapTable[GetUniformuivEXT_remap_index]
+#define _gloffset_GetVertexAttribIivEXT driDispatchRemapTable[GetVertexAttribIivEXT_remap_index]
+#define _gloffset_GetVertexAttribIuivEXT driDispatchRemapTable[GetVertexAttribIuivEXT_remap_index]
+#define _gloffset_Uniform1uiEXT driDispatchRemapTable[Uniform1uiEXT_remap_index]
+#define _gloffset_Uniform1uivEXT driDispatchRemapTable[Uniform1uivEXT_remap_index]
+#define _gloffset_Uniform2uiEXT driDispatchRemapTable[Uniform2uiEXT_remap_index]
+#define _gloffset_Uniform2uivEXT driDispatchRemapTable[Uniform2uivEXT_remap_index]
+#define _gloffset_Uniform3uiEXT driDispatchRemapTable[Uniform3uiEXT_remap_index]
+#define _gloffset_Uniform3uivEXT driDispatchRemapTable[Uniform3uivEXT_remap_index]
+#define _gloffset_Uniform4uiEXT driDispatchRemapTable[Uniform4uiEXT_remap_index]
+#define _gloffset_Uniform4uivEXT driDispatchRemapTable[Uniform4uivEXT_remap_index]
+#define _gloffset_VertexAttribI1iEXT driDispatchRemapTable[VertexAttribI1iEXT_remap_index]
+#define _gloffset_VertexAttribI1ivEXT driDispatchRemapTable[VertexAttribI1ivEXT_remap_index]
+#define _gloffset_VertexAttribI1uiEXT driDispatchRemapTable[VertexAttribI1uiEXT_remap_index]
+#define _gloffset_VertexAttribI1uivEXT driDispatchRemapTable[VertexAttribI1uivEXT_remap_index]
+#define _gloffset_VertexAttribI2iEXT driDispatchRemapTable[VertexAttribI2iEXT_remap_index]
+#define _gloffset_VertexAttribI2ivEXT driDispatchRemapTable[VertexAttribI2ivEXT_remap_index]
+#define _gloffset_VertexAttribI2uiEXT driDispatchRemapTable[VertexAttribI2uiEXT_remap_index]
+#define _gloffset_VertexAttribI2uivEXT driDispatchRemapTable[VertexAttribI2uivEXT_remap_index]
+#define _gloffset_VertexAttribI3iEXT driDispatchRemapTable[VertexAttribI3iEXT_remap_index]
+#define _gloffset_VertexAttribI3ivEXT driDispatchRemapTable[VertexAttribI3ivEXT_remap_index]
+#define _gloffset_VertexAttribI3uiEXT driDispatchRemapTable[VertexAttribI3uiEXT_remap_index]
+#define _gloffset_VertexAttribI3uivEXT driDispatchRemapTable[VertexAttribI3uivEXT_remap_index]
+#define _gloffset_VertexAttribI4bvEXT driDispatchRemapTable[VertexAttribI4bvEXT_remap_index]
+#define _gloffset_VertexAttribI4iEXT driDispatchRemapTable[VertexAttribI4iEXT_remap_index]
+#define _gloffset_VertexAttribI4ivEXT driDispatchRemapTable[VertexAttribI4ivEXT_remap_index]
+#define _gloffset_VertexAttribI4svEXT driDispatchRemapTable[VertexAttribI4svEXT_remap_index]
+#define _gloffset_VertexAttribI4ubvEXT driDispatchRemapTable[VertexAttribI4ubvEXT_remap_index]
+#define _gloffset_VertexAttribI4uiEXT driDispatchRemapTable[VertexAttribI4uiEXT_remap_index]
+#define _gloffset_VertexAttribI4uivEXT driDispatchRemapTable[VertexAttribI4uivEXT_remap_index]
+#define _gloffset_VertexAttribI4usvEXT driDispatchRemapTable[VertexAttribI4usvEXT_remap_index]
+#define _gloffset_VertexAttribIPointerEXT driDispatchRemapTable[VertexAttribIPointerEXT_remap_index]
+#define _gloffset_FramebufferTextureLayerEXT driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index]
+#define _gloffset_ColorMaskIndexedEXT driDispatchRemapTable[ColorMaskIndexedEXT_remap_index]
+#define _gloffset_DisableIndexedEXT driDispatchRemapTable[DisableIndexedEXT_remap_index]
+#define _gloffset_EnableIndexedEXT driDispatchRemapTable[EnableIndexedEXT_remap_index]
+#define _gloffset_GetBooleanIndexedvEXT driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index]
+#define _gloffset_GetIntegerIndexedvEXT driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index]
+#define _gloffset_IsEnabledIndexedEXT driDispatchRemapTable[IsEnabledIndexedEXT_remap_index]
+#define _gloffset_ClearColorIiEXT driDispatchRemapTable[ClearColorIiEXT_remap_index]
+#define _gloffset_ClearColorIuiEXT driDispatchRemapTable[ClearColorIuiEXT_remap_index]
+#define _gloffset_GetTexParameterIivEXT driDispatchRemapTable[GetTexParameterIivEXT_remap_index]
+#define _gloffset_GetTexParameterIuivEXT driDispatchRemapTable[GetTexParameterIuivEXT_remap_index]
+#define _gloffset_TexParameterIivEXT driDispatchRemapTable[TexParameterIivEXT_remap_index]
+#define _gloffset_TexParameterIuivEXT driDispatchRemapTable[TexParameterIuivEXT_remap_index]
+#define _gloffset_BeginConditionalRenderNV driDispatchRemapTable[BeginConditionalRenderNV_remap_index]
+#define _gloffset_EndConditionalRenderNV driDispatchRemapTable[EndConditionalRenderNV_remap_index]
+#define _gloffset_BeginTransformFeedbackEXT driDispatchRemapTable[BeginTransformFeedbackEXT_remap_index]
+#define _gloffset_BindBufferBaseEXT driDispatchRemapTable[BindBufferBaseEXT_remap_index]
+#define _gloffset_BindBufferOffsetEXT driDispatchRemapTable[BindBufferOffsetEXT_remap_index]
+#define _gloffset_BindBufferRangeEXT driDispatchRemapTable[BindBufferRangeEXT_remap_index]
+#define _gloffset_EndTransformFeedbackEXT driDispatchRemapTable[EndTransformFeedbackEXT_remap_index]
+#define _gloffset_GetTransformFeedbackVaryingEXT driDispatchRemapTable[GetTransformFeedbackVaryingEXT_remap_index]
+#define _gloffset_TransformFeedbackVaryingsEXT driDispatchRemapTable[TransformFeedbackVaryingsEXT_remap_index]
+#define _gloffset_ProvokingVertexEXT driDispatchRemapTable[ProvokingVertexEXT_remap_index]
+#define _gloffset_GetTexParameterPointervAPPLE driDispatchRemapTable[GetTexParameterPointervAPPLE_remap_index]
+#define _gloffset_TextureRangeAPPLE driDispatchRemapTable[TextureRangeAPPLE_remap_index]
+#define _gloffset_GetObjectParameterivAPPLE driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index]
+#define _gloffset_ObjectPurgeableAPPLE driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index]
+#define _gloffset_ObjectUnpurgeableAPPLE driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index]
+#define _gloffset_ActiveProgramEXT driDispatchRemapTable[ActiveProgramEXT_remap_index]
+#define _gloffset_CreateShaderProgramEXT driDispatchRemapTable[CreateShaderProgramEXT_remap_index]
+#define _gloffset_UseShaderProgramEXT driDispatchRemapTable[UseShaderProgramEXT_remap_index]
+#define _gloffset_TextureBarrierNV driDispatchRemapTable[TextureBarrierNV_remap_index]
+#define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index]
+#define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index]
+#define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index]
+#define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index]
+#define _gloffset_GetQueryObjectui64vEXT driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index]
+#define _gloffset_EGLImageTargetRenderbufferStorageOES driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index]
+#define _gloffset_EGLImageTargetTexture2DOES driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index]
+
+#endif /* _GLAPI_USE_REMAP_TABLE */
+
+#define CALL_NewList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_NewList, parameters)
+#define GET_NewList(disp) GET_by_offset(disp, _gloffset_NewList)
+#define SET_NewList(disp, fn) SET_by_offset(disp, _gloffset_NewList, fn)
+#define CALL_EndList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndList, parameters)
+#define GET_EndList(disp) GET_by_offset(disp, _gloffset_EndList)
+#define SET_EndList(disp, fn) SET_by_offset(disp, _gloffset_EndList, fn)
+#define CALL_CallList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_CallList, parameters)
+#define GET_CallList(disp) GET_by_offset(disp, _gloffset_CallList)
+#define SET_CallList(disp, fn) SET_by_offset(disp, _gloffset_CallList, fn)
+#define CALL_CallLists(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLenum, const GLvoid *)), _gloffset_CallLists, parameters)
+#define GET_CallLists(disp) GET_by_offset(disp, _gloffset_CallLists)
+#define SET_CallLists(disp, fn) SET_by_offset(disp, _gloffset_CallLists, fn)
+#define CALL_DeleteLists(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei)), _gloffset_DeleteLists, parameters)
+#define GET_DeleteLists(disp) GET_by_offset(disp, _gloffset_DeleteLists)
+#define SET_DeleteLists(disp, fn) SET_by_offset(disp, _gloffset_DeleteLists, fn)
+#define CALL_GenLists(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLsizei)), _gloffset_GenLists, parameters)
+#define GET_GenLists(disp) GET_by_offset(disp, _gloffset_GenLists)
+#define SET_GenLists(disp, fn) SET_by_offset(disp, _gloffset_GenLists, fn)
+#define CALL_ListBase(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_ListBase, parameters)
+#define GET_ListBase(disp) GET_by_offset(disp, _gloffset_ListBase)
+#define SET_ListBase(disp, fn) SET_by_offset(disp, _gloffset_ListBase, fn)
+#define CALL_Begin(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Begin, parameters)
+#define GET_Begin(disp) GET_by_offset(disp, _gloffset_Begin)
+#define SET_Begin(disp, fn) SET_by_offset(disp, _gloffset_Begin, fn)
+#define CALL_Bitmap(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *)), _gloffset_Bitmap, parameters)
+#define GET_Bitmap(disp) GET_by_offset(disp, _gloffset_Bitmap)
+#define SET_Bitmap(disp, fn) SET_by_offset(disp, _gloffset_Bitmap, fn)
+#define CALL_Color3b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_Color3b, parameters)
+#define GET_Color3b(disp) GET_by_offset(disp, _gloffset_Color3b)
+#define SET_Color3b(disp, fn) SET_by_offset(disp, _gloffset_Color3b, fn)
+#define CALL_Color3bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Color3bv, parameters)
+#define GET_Color3bv(disp) GET_by_offset(disp, _gloffset_Color3bv)
+#define SET_Color3bv(disp, fn) SET_by_offset(disp, _gloffset_Color3bv, fn)
+#define CALL_Color3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Color3d, parameters)
+#define GET_Color3d(disp) GET_by_offset(disp, _gloffset_Color3d)
+#define SET_Color3d(disp, fn) SET_by_offset(disp, _gloffset_Color3d, fn)
+#define CALL_Color3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Color3dv, parameters)
+#define GET_Color3dv(disp) GET_by_offset(disp, _gloffset_Color3dv)
+#define SET_Color3dv(disp, fn) SET_by_offset(disp, _gloffset_Color3dv, fn)
+#define CALL_Color3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Color3f, parameters)
+#define GET_Color3f(disp) GET_by_offset(disp, _gloffset_Color3f)
+#define SET_Color3f(disp, fn) SET_by_offset(disp, _gloffset_Color3f, fn)
+#define CALL_Color3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Color3fv, parameters)
+#define GET_Color3fv(disp) GET_by_offset(disp, _gloffset_Color3fv)
+#define SET_Color3fv(disp, fn) SET_by_offset(disp, _gloffset_Color3fv, fn)
+#define CALL_Color3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Color3i, parameters)
+#define GET_Color3i(disp) GET_by_offset(disp, _gloffset_Color3i)
+#define SET_Color3i(disp, fn) SET_by_offset(disp, _gloffset_Color3i, fn)
+#define CALL_Color3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Color3iv, parameters)
+#define GET_Color3iv(disp) GET_by_offset(disp, _gloffset_Color3iv)
+#define SET_Color3iv(disp, fn) SET_by_offset(disp, _gloffset_Color3iv, fn)
+#define CALL_Color3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Color3s, parameters)
+#define GET_Color3s(disp) GET_by_offset(disp, _gloffset_Color3s)
+#define SET_Color3s(disp, fn) SET_by_offset(disp, _gloffset_Color3s, fn)
+#define CALL_Color3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Color3sv, parameters)
+#define GET_Color3sv(disp) GET_by_offset(disp, _gloffset_Color3sv)
+#define SET_Color3sv(disp, fn) SET_by_offset(disp, _gloffset_Color3sv, fn)
+#define CALL_Color3ub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), _gloffset_Color3ub, parameters)
+#define GET_Color3ub(disp) GET_by_offset(disp, _gloffset_Color3ub)
+#define SET_Color3ub(disp, fn) SET_by_offset(disp, _gloffset_Color3ub, fn)
+#define CALL_Color3ubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Color3ubv, parameters)
+#define GET_Color3ubv(disp) GET_by_offset(disp, _gloffset_Color3ubv)
+#define SET_Color3ubv(disp, fn) SET_by_offset(disp, _gloffset_Color3ubv, fn)
+#define CALL_Color3ui(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_Color3ui, parameters)
+#define GET_Color3ui(disp) GET_by_offset(disp, _gloffset_Color3ui)
+#define SET_Color3ui(disp, fn) SET_by_offset(disp, _gloffset_Color3ui, fn)
+#define CALL_Color3uiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_Color3uiv, parameters)
+#define GET_Color3uiv(disp) GET_by_offset(disp, _gloffset_Color3uiv)
+#define SET_Color3uiv(disp, fn) SET_by_offset(disp, _gloffset_Color3uiv, fn)
+#define CALL_Color3us(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), _gloffset_Color3us, parameters)
+#define GET_Color3us(disp) GET_by_offset(disp, _gloffset_Color3us)
+#define SET_Color3us(disp, fn) SET_by_offset(disp, _gloffset_Color3us, fn)
+#define CALL_Color3usv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_Color3usv, parameters)
+#define GET_Color3usv(disp) GET_by_offset(disp, _gloffset_Color3usv)
+#define SET_Color3usv(disp, fn) SET_by_offset(disp, _gloffset_Color3usv, fn)
+#define CALL_Color4b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte, GLbyte)), _gloffset_Color4b, parameters)
+#define GET_Color4b(disp) GET_by_offset(disp, _gloffset_Color4b)
+#define SET_Color4b(disp, fn) SET_by_offset(disp, _gloffset_Color4b, fn)
+#define CALL_Color4bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Color4bv, parameters)
+#define GET_Color4bv(disp) GET_by_offset(disp, _gloffset_Color4bv)
+#define SET_Color4bv(disp, fn) SET_by_offset(disp, _gloffset_Color4bv, fn)
+#define CALL_Color4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Color4d, parameters)
+#define GET_Color4d(disp) GET_by_offset(disp, _gloffset_Color4d)
+#define SET_Color4d(disp, fn) SET_by_offset(disp, _gloffset_Color4d, fn)
+#define CALL_Color4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Color4dv, parameters)
+#define GET_Color4dv(disp) GET_by_offset(disp, _gloffset_Color4dv)
+#define SET_Color4dv(disp, fn) SET_by_offset(disp, _gloffset_Color4dv, fn)
+#define CALL_Color4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Color4f, parameters)
+#define GET_Color4f(disp) GET_by_offset(disp, _gloffset_Color4f)
+#define SET_Color4f(disp, fn) SET_by_offset(disp, _gloffset_Color4f, fn)
+#define CALL_Color4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Color4fv, parameters)
+#define GET_Color4fv(disp) GET_by_offset(disp, _gloffset_Color4fv)
+#define SET_Color4fv(disp, fn) SET_by_offset(disp, _gloffset_Color4fv, fn)
+#define CALL_Color4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Color4i, parameters)
+#define GET_Color4i(disp) GET_by_offset(disp, _gloffset_Color4i)
+#define SET_Color4i(disp, fn) SET_by_offset(disp, _gloffset_Color4i, fn)
+#define CALL_Color4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Color4iv, parameters)
+#define GET_Color4iv(disp) GET_by_offset(disp, _gloffset_Color4iv)
+#define SET_Color4iv(disp, fn) SET_by_offset(disp, _gloffset_Color4iv, fn)
+#define CALL_Color4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Color4s, parameters)
+#define GET_Color4s(disp) GET_by_offset(disp, _gloffset_Color4s)
+#define SET_Color4s(disp, fn) SET_by_offset(disp, _gloffset_Color4s, fn)
+#define CALL_Color4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Color4sv, parameters)
+#define GET_Color4sv(disp) GET_by_offset(disp, _gloffset_Color4sv)
+#define SET_Color4sv(disp, fn) SET_by_offset(disp, _gloffset_Color4sv, fn)
+#define CALL_Color4ub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_Color4ub, parameters)
+#define GET_Color4ub(disp) GET_by_offset(disp, _gloffset_Color4ub)
+#define SET_Color4ub(disp, fn) SET_by_offset(disp, _gloffset_Color4ub, fn)
+#define CALL_Color4ubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Color4ubv, parameters)
+#define GET_Color4ubv(disp) GET_by_offset(disp, _gloffset_Color4ubv)
+#define SET_Color4ubv(disp, fn) SET_by_offset(disp, _gloffset_Color4ubv, fn)
+#define CALL_Color4ui(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_Color4ui, parameters)
+#define GET_Color4ui(disp) GET_by_offset(disp, _gloffset_Color4ui)
+#define SET_Color4ui(disp, fn) SET_by_offset(disp, _gloffset_Color4ui, fn)
+#define CALL_Color4uiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_Color4uiv, parameters)
+#define GET_Color4uiv(disp) GET_by_offset(disp, _gloffset_Color4uiv)
+#define SET_Color4uiv(disp, fn) SET_by_offset(disp, _gloffset_Color4uiv, fn)
+#define CALL_Color4us(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort, GLushort)), _gloffset_Color4us, parameters)
+#define GET_Color4us(disp) GET_by_offset(disp, _gloffset_Color4us)
+#define SET_Color4us(disp, fn) SET_by_offset(disp, _gloffset_Color4us, fn)
+#define CALL_Color4usv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_Color4usv, parameters)
+#define GET_Color4usv(disp) GET_by_offset(disp, _gloffset_Color4usv)
+#define SET_Color4usv(disp, fn) SET_by_offset(disp, _gloffset_Color4usv, fn)
+#define CALL_EdgeFlag(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean)), _gloffset_EdgeFlag, parameters)
+#define GET_EdgeFlag(disp) GET_by_offset(disp, _gloffset_EdgeFlag)
+#define SET_EdgeFlag(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlag, fn)
+#define CALL_EdgeFlagv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLboolean *)), _gloffset_EdgeFlagv, parameters)
+#define GET_EdgeFlagv(disp) GET_by_offset(disp, _gloffset_EdgeFlagv)
+#define SET_EdgeFlagv(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagv, fn)
+#define CALL_End(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_End, parameters)
+#define GET_End(disp) GET_by_offset(disp, _gloffset_End)
+#define SET_End(disp, fn) SET_by_offset(disp, _gloffset_End, fn)
+#define CALL_Indexd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_Indexd, parameters)
+#define GET_Indexd(disp) GET_by_offset(disp, _gloffset_Indexd)
+#define SET_Indexd(disp, fn) SET_by_offset(disp, _gloffset_Indexd, fn)
+#define CALL_Indexdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Indexdv, parameters)
+#define GET_Indexdv(disp) GET_by_offset(disp, _gloffset_Indexdv)
+#define SET_Indexdv(disp, fn) SET_by_offset(disp, _gloffset_Indexdv, fn)
+#define CALL_Indexf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_Indexf, parameters)
+#define GET_Indexf(disp) GET_by_offset(disp, _gloffset_Indexf)
+#define SET_Indexf(disp, fn) SET_by_offset(disp, _gloffset_Indexf, fn)
+#define CALL_Indexfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Indexfv, parameters)
+#define GET_Indexfv(disp) GET_by_offset(disp, _gloffset_Indexfv)
+#define SET_Indexfv(disp, fn) SET_by_offset(disp, _gloffset_Indexfv, fn)
+#define CALL_Indexi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_Indexi, parameters)
+#define GET_Indexi(disp) GET_by_offset(disp, _gloffset_Indexi)
+#define SET_Indexi(disp, fn) SET_by_offset(disp, _gloffset_Indexi, fn)
+#define CALL_Indexiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Indexiv, parameters)
+#define GET_Indexiv(disp) GET_by_offset(disp, _gloffset_Indexiv)
+#define SET_Indexiv(disp, fn) SET_by_offset(disp, _gloffset_Indexiv, fn)
+#define CALL_Indexs(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort)), _gloffset_Indexs, parameters)
+#define GET_Indexs(disp) GET_by_offset(disp, _gloffset_Indexs)
+#define SET_Indexs(disp, fn) SET_by_offset(disp, _gloffset_Indexs, fn)
+#define CALL_Indexsv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Indexsv, parameters)
+#define GET_Indexsv(disp) GET_by_offset(disp, _gloffset_Indexsv)
+#define SET_Indexsv(disp, fn) SET_by_offset(disp, _gloffset_Indexsv, fn)
+#define CALL_Normal3b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_Normal3b, parameters)
+#define GET_Normal3b(disp) GET_by_offset(disp, _gloffset_Normal3b)
+#define SET_Normal3b(disp, fn) SET_by_offset(disp, _gloffset_Normal3b, fn)
+#define CALL_Normal3bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Normal3bv, parameters)
+#define GET_Normal3bv(disp) GET_by_offset(disp, _gloffset_Normal3bv)
+#define SET_Normal3bv(disp, fn) SET_by_offset(disp, _gloffset_Normal3bv, fn)
+#define CALL_Normal3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Normal3d, parameters)
+#define GET_Normal3d(disp) GET_by_offset(disp, _gloffset_Normal3d)
+#define SET_Normal3d(disp, fn) SET_by_offset(disp, _gloffset_Normal3d, fn)
+#define CALL_Normal3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Normal3dv, parameters)
+#define GET_Normal3dv(disp) GET_by_offset(disp, _gloffset_Normal3dv)
+#define SET_Normal3dv(disp, fn) SET_by_offset(disp, _gloffset_Normal3dv, fn)
+#define CALL_Normal3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Normal3f, parameters)
+#define GET_Normal3f(disp) GET_by_offset(disp, _gloffset_Normal3f)
+#define SET_Normal3f(disp, fn) SET_by_offset(disp, _gloffset_Normal3f, fn)
+#define CALL_Normal3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Normal3fv, parameters)
+#define GET_Normal3fv(disp) GET_by_offset(disp, _gloffset_Normal3fv)
+#define SET_Normal3fv(disp, fn) SET_by_offset(disp, _gloffset_Normal3fv, fn)
+#define CALL_Normal3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Normal3i, parameters)
+#define GET_Normal3i(disp) GET_by_offset(disp, _gloffset_Normal3i)
+#define SET_Normal3i(disp, fn) SET_by_offset(disp, _gloffset_Normal3i, fn)
+#define CALL_Normal3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Normal3iv, parameters)
+#define GET_Normal3iv(disp) GET_by_offset(disp, _gloffset_Normal3iv)
+#define SET_Normal3iv(disp, fn) SET_by_offset(disp, _gloffset_Normal3iv, fn)
+#define CALL_Normal3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Normal3s, parameters)
+#define GET_Normal3s(disp) GET_by_offset(disp, _gloffset_Normal3s)
+#define SET_Normal3s(disp, fn) SET_by_offset(disp, _gloffset_Normal3s, fn)
+#define CALL_Normal3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Normal3sv, parameters)
+#define GET_Normal3sv(disp) GET_by_offset(disp, _gloffset_Normal3sv)
+#define SET_Normal3sv(disp, fn) SET_by_offset(disp, _gloffset_Normal3sv, fn)
+#define CALL_RasterPos2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_RasterPos2d, parameters)
+#define GET_RasterPos2d(disp) GET_by_offset(disp, _gloffset_RasterPos2d)
+#define SET_RasterPos2d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2d, fn)
+#define CALL_RasterPos2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos2dv, parameters)
+#define GET_RasterPos2dv(disp) GET_by_offset(disp, _gloffset_RasterPos2dv)
+#define SET_RasterPos2dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2dv, fn)
+#define CALL_RasterPos2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_RasterPos2f, parameters)
+#define GET_RasterPos2f(disp) GET_by_offset(disp, _gloffset_RasterPos2f)
+#define SET_RasterPos2f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2f, fn)
+#define CALL_RasterPos2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos2fv, parameters)
+#define GET_RasterPos2fv(disp) GET_by_offset(disp, _gloffset_RasterPos2fv)
+#define SET_RasterPos2fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2fv, fn)
+#define CALL_RasterPos2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_RasterPos2i, parameters)
+#define GET_RasterPos2i(disp) GET_by_offset(disp, _gloffset_RasterPos2i)
+#define SET_RasterPos2i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2i, fn)
+#define CALL_RasterPos2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos2iv, parameters)
+#define GET_RasterPos2iv(disp) GET_by_offset(disp, _gloffset_RasterPos2iv)
+#define SET_RasterPos2iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2iv, fn)
+#define CALL_RasterPos2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_RasterPos2s, parameters)
+#define GET_RasterPos2s(disp) GET_by_offset(disp, _gloffset_RasterPos2s)
+#define SET_RasterPos2s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2s, fn)
+#define CALL_RasterPos2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos2sv, parameters)
+#define GET_RasterPos2sv(disp) GET_by_offset(disp, _gloffset_RasterPos2sv)
+#define SET_RasterPos2sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2sv, fn)
+#define CALL_RasterPos3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_RasterPos3d, parameters)
+#define GET_RasterPos3d(disp) GET_by_offset(disp, _gloffset_RasterPos3d)
+#define SET_RasterPos3d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3d, fn)
+#define CALL_RasterPos3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos3dv, parameters)
+#define GET_RasterPos3dv(disp) GET_by_offset(disp, _gloffset_RasterPos3dv)
+#define SET_RasterPos3dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3dv, fn)
+#define CALL_RasterPos3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_RasterPos3f, parameters)
+#define GET_RasterPos3f(disp) GET_by_offset(disp, _gloffset_RasterPos3f)
+#define SET_RasterPos3f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3f, fn)
+#define CALL_RasterPos3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos3fv, parameters)
+#define GET_RasterPos3fv(disp) GET_by_offset(disp, _gloffset_RasterPos3fv)
+#define SET_RasterPos3fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3fv, fn)
+#define CALL_RasterPos3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_RasterPos3i, parameters)
+#define GET_RasterPos3i(disp) GET_by_offset(disp, _gloffset_RasterPos3i)
+#define SET_RasterPos3i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3i, fn)
+#define CALL_RasterPos3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos3iv, parameters)
+#define GET_RasterPos3iv(disp) GET_by_offset(disp, _gloffset_RasterPos3iv)
+#define SET_RasterPos3iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3iv, fn)
+#define CALL_RasterPos3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_RasterPos3s, parameters)
+#define GET_RasterPos3s(disp) GET_by_offset(disp, _gloffset_RasterPos3s)
+#define SET_RasterPos3s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3s, fn)
+#define CALL_RasterPos3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos3sv, parameters)
+#define GET_RasterPos3sv(disp) GET_by_offset(disp, _gloffset_RasterPos3sv)
+#define SET_RasterPos3sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3sv, fn)
+#define CALL_RasterPos4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_RasterPos4d, parameters)
+#define GET_RasterPos4d(disp) GET_by_offset(disp, _gloffset_RasterPos4d)
+#define SET_RasterPos4d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4d, fn)
+#define CALL_RasterPos4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos4dv, parameters)
+#define GET_RasterPos4dv(disp) GET_by_offset(disp, _gloffset_RasterPos4dv)
+#define SET_RasterPos4dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4dv, fn)
+#define CALL_RasterPos4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_RasterPos4f, parameters)
+#define GET_RasterPos4f(disp) GET_by_offset(disp, _gloffset_RasterPos4f)
+#define SET_RasterPos4f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4f, fn)
+#define CALL_RasterPos4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos4fv, parameters)
+#define GET_RasterPos4fv(disp) GET_by_offset(disp, _gloffset_RasterPos4fv)
+#define SET_RasterPos4fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4fv, fn)
+#define CALL_RasterPos4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_RasterPos4i, parameters)
+#define GET_RasterPos4i(disp) GET_by_offset(disp, _gloffset_RasterPos4i)
+#define SET_RasterPos4i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4i, fn)
+#define CALL_RasterPos4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos4iv, parameters)
+#define GET_RasterPos4iv(disp) GET_by_offset(disp, _gloffset_RasterPos4iv)
+#define SET_RasterPos4iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4iv, fn)
+#define CALL_RasterPos4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_RasterPos4s, parameters)
+#define GET_RasterPos4s(disp) GET_by_offset(disp, _gloffset_RasterPos4s)
+#define SET_RasterPos4s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4s, fn)
+#define CALL_RasterPos4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos4sv, parameters)
+#define GET_RasterPos4sv(disp) GET_by_offset(disp, _gloffset_RasterPos4sv)
+#define SET_RasterPos4sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4sv, fn)
+#define CALL_Rectd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Rectd, parameters)
+#define GET_Rectd(disp) GET_by_offset(disp, _gloffset_Rectd)
+#define SET_Rectd(disp, fn) SET_by_offset(disp, _gloffset_Rectd, fn)
+#define CALL_Rectdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *, const GLdouble *)), _gloffset_Rectdv, parameters)
+#define GET_Rectdv(disp) GET_by_offset(disp, _gloffset_Rectdv)
+#define SET_Rectdv(disp, fn) SET_by_offset(disp, _gloffset_Rectdv, fn)
+#define CALL_Rectf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Rectf, parameters)
+#define GET_Rectf(disp) GET_by_offset(disp, _gloffset_Rectf)
+#define SET_Rectf(disp, fn) SET_by_offset(disp, _gloffset_Rectf, fn)
+#define CALL_Rectfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *, const GLfloat *)), _gloffset_Rectfv, parameters)
+#define GET_Rectfv(disp) GET_by_offset(disp, _gloffset_Rectfv)
+#define SET_Rectfv(disp, fn) SET_by_offset(disp, _gloffset_Rectfv, fn)
+#define CALL_Recti(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Recti, parameters)
+#define GET_Recti(disp) GET_by_offset(disp, _gloffset_Recti)
+#define SET_Recti(disp, fn) SET_by_offset(disp, _gloffset_Recti, fn)
+#define CALL_Rectiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *, const GLint *)), _gloffset_Rectiv, parameters)
+#define GET_Rectiv(disp) GET_by_offset(disp, _gloffset_Rectiv)
+#define SET_Rectiv(disp, fn) SET_by_offset(disp, _gloffset_Rectiv, fn)
+#define CALL_Rects(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Rects, parameters)
+#define GET_Rects(disp) GET_by_offset(disp, _gloffset_Rects)
+#define SET_Rects(disp, fn) SET_by_offset(disp, _gloffset_Rects, fn)
+#define CALL_Rectsv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *, const GLshort *)), _gloffset_Rectsv, parameters)
+#define GET_Rectsv(disp) GET_by_offset(disp, _gloffset_Rectsv)
+#define SET_Rectsv(disp, fn) SET_by_offset(disp, _gloffset_Rectsv, fn)
+#define CALL_TexCoord1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_TexCoord1d, parameters)
+#define GET_TexCoord1d(disp) GET_by_offset(disp, _gloffset_TexCoord1d)
+#define SET_TexCoord1d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1d, fn)
+#define CALL_TexCoord1dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord1dv, parameters)
+#define GET_TexCoord1dv(disp) GET_by_offset(disp, _gloffset_TexCoord1dv)
+#define SET_TexCoord1dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1dv, fn)
+#define CALL_TexCoord1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_TexCoord1f, parameters)
+#define GET_TexCoord1f(disp) GET_by_offset(disp, _gloffset_TexCoord1f)
+#define SET_TexCoord1f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1f, fn)
+#define CALL_TexCoord1fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord1fv, parameters)
+#define GET_TexCoord1fv(disp) GET_by_offset(disp, _gloffset_TexCoord1fv)
+#define SET_TexCoord1fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1fv, fn)
+#define CALL_TexCoord1i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_TexCoord1i, parameters)
+#define GET_TexCoord1i(disp) GET_by_offset(disp, _gloffset_TexCoord1i)
+#define SET_TexCoord1i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1i, fn)
+#define CALL_TexCoord1iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord1iv, parameters)
+#define GET_TexCoord1iv(disp) GET_by_offset(disp, _gloffset_TexCoord1iv)
+#define SET_TexCoord1iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1iv, fn)
+#define CALL_TexCoord1s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort)), _gloffset_TexCoord1s, parameters)
+#define GET_TexCoord1s(disp) GET_by_offset(disp, _gloffset_TexCoord1s)
+#define SET_TexCoord1s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1s, fn)
+#define CALL_TexCoord1sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord1sv, parameters)
+#define GET_TexCoord1sv(disp) GET_by_offset(disp, _gloffset_TexCoord1sv)
+#define SET_TexCoord1sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1sv, fn)
+#define CALL_TexCoord2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_TexCoord2d, parameters)
+#define GET_TexCoord2d(disp) GET_by_offset(disp, _gloffset_TexCoord2d)
+#define SET_TexCoord2d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2d, fn)
+#define CALL_TexCoord2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord2dv, parameters)
+#define GET_TexCoord2dv(disp) GET_by_offset(disp, _gloffset_TexCoord2dv)
+#define SET_TexCoord2dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2dv, fn)
+#define CALL_TexCoord2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_TexCoord2f, parameters)
+#define GET_TexCoord2f(disp) GET_by_offset(disp, _gloffset_TexCoord2f)
+#define SET_TexCoord2f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2f, fn)
+#define CALL_TexCoord2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord2fv, parameters)
+#define GET_TexCoord2fv(disp) GET_by_offset(disp, _gloffset_TexCoord2fv)
+#define SET_TexCoord2fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2fv, fn)
+#define CALL_TexCoord2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_TexCoord2i, parameters)
+#define GET_TexCoord2i(disp) GET_by_offset(disp, _gloffset_TexCoord2i)
+#define SET_TexCoord2i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2i, fn)
+#define CALL_TexCoord2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord2iv, parameters)
+#define GET_TexCoord2iv(disp) GET_by_offset(disp, _gloffset_TexCoord2iv)
+#define SET_TexCoord2iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2iv, fn)
+#define CALL_TexCoord2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_TexCoord2s, parameters)
+#define GET_TexCoord2s(disp) GET_by_offset(disp, _gloffset_TexCoord2s)
+#define SET_TexCoord2s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2s, fn)
+#define CALL_TexCoord2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord2sv, parameters)
+#define GET_TexCoord2sv(disp) GET_by_offset(disp, _gloffset_TexCoord2sv)
+#define SET_TexCoord2sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2sv, fn)
+#define CALL_TexCoord3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_TexCoord3d, parameters)
+#define GET_TexCoord3d(disp) GET_by_offset(disp, _gloffset_TexCoord3d)
+#define SET_TexCoord3d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3d, fn)
+#define CALL_TexCoord3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord3dv, parameters)
+#define GET_TexCoord3dv(disp) GET_by_offset(disp, _gloffset_TexCoord3dv)
+#define SET_TexCoord3dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3dv, fn)
+#define CALL_TexCoord3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_TexCoord3f, parameters)
+#define GET_TexCoord3f(disp) GET_by_offset(disp, _gloffset_TexCoord3f)
+#define SET_TexCoord3f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3f, fn)
+#define CALL_TexCoord3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord3fv, parameters)
+#define GET_TexCoord3fv(disp) GET_by_offset(disp, _gloffset_TexCoord3fv)
+#define SET_TexCoord3fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3fv, fn)
+#define CALL_TexCoord3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_TexCoord3i, parameters)
+#define GET_TexCoord3i(disp) GET_by_offset(disp, _gloffset_TexCoord3i)
+#define SET_TexCoord3i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3i, fn)
+#define CALL_TexCoord3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord3iv, parameters)
+#define GET_TexCoord3iv(disp) GET_by_offset(disp, _gloffset_TexCoord3iv)
+#define SET_TexCoord3iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3iv, fn)
+#define CALL_TexCoord3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_TexCoord3s, parameters)
+#define GET_TexCoord3s(disp) GET_by_offset(disp, _gloffset_TexCoord3s)
+#define SET_TexCoord3s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3s, fn)
+#define CALL_TexCoord3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord3sv, parameters)
+#define GET_TexCoord3sv(disp) GET_by_offset(disp, _gloffset_TexCoord3sv)
+#define SET_TexCoord3sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3sv, fn)
+#define CALL_TexCoord4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_TexCoord4d, parameters)
+#define GET_TexCoord4d(disp) GET_by_offset(disp, _gloffset_TexCoord4d)
+#define SET_TexCoord4d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4d, fn)
+#define CALL_TexCoord4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord4dv, parameters)
+#define GET_TexCoord4dv(disp) GET_by_offset(disp, _gloffset_TexCoord4dv)
+#define SET_TexCoord4dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4dv, fn)
+#define CALL_TexCoord4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_TexCoord4f, parameters)
+#define GET_TexCoord4f(disp) GET_by_offset(disp, _gloffset_TexCoord4f)
+#define SET_TexCoord4f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4f, fn)
+#define CALL_TexCoord4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord4fv, parameters)
+#define GET_TexCoord4fv(disp) GET_by_offset(disp, _gloffset_TexCoord4fv)
+#define SET_TexCoord4fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4fv, fn)
+#define CALL_TexCoord4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_TexCoord4i, parameters)
+#define GET_TexCoord4i(disp) GET_by_offset(disp, _gloffset_TexCoord4i)
+#define SET_TexCoord4i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4i, fn)
+#define CALL_TexCoord4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord4iv, parameters)
+#define GET_TexCoord4iv(disp) GET_by_offset(disp, _gloffset_TexCoord4iv)
+#define SET_TexCoord4iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4iv, fn)
+#define CALL_TexCoord4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_TexCoord4s, parameters)
+#define GET_TexCoord4s(disp) GET_by_offset(disp, _gloffset_TexCoord4s)
+#define SET_TexCoord4s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4s, fn)
+#define CALL_TexCoord4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord4sv, parameters)
+#define GET_TexCoord4sv(disp) GET_by_offset(disp, _gloffset_TexCoord4sv)
+#define SET_TexCoord4sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4sv, fn)
+#define CALL_Vertex2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_Vertex2d, parameters)
+#define GET_Vertex2d(disp) GET_by_offset(disp, _gloffset_Vertex2d)
+#define SET_Vertex2d(disp, fn) SET_by_offset(disp, _gloffset_Vertex2d, fn)
+#define CALL_Vertex2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex2dv, parameters)
+#define GET_Vertex2dv(disp) GET_by_offset(disp, _gloffset_Vertex2dv)
+#define SET_Vertex2dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2dv, fn)
+#define CALL_Vertex2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_Vertex2f, parameters)
+#define GET_Vertex2f(disp) GET_by_offset(disp, _gloffset_Vertex2f)
+#define SET_Vertex2f(disp, fn) SET_by_offset(disp, _gloffset_Vertex2f, fn)
+#define CALL_Vertex2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex2fv, parameters)
+#define GET_Vertex2fv(disp) GET_by_offset(disp, _gloffset_Vertex2fv)
+#define SET_Vertex2fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2fv, fn)
+#define CALL_Vertex2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_Vertex2i, parameters)
+#define GET_Vertex2i(disp) GET_by_offset(disp, _gloffset_Vertex2i)
+#define SET_Vertex2i(disp, fn) SET_by_offset(disp, _gloffset_Vertex2i, fn)
+#define CALL_Vertex2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex2iv, parameters)
+#define GET_Vertex2iv(disp) GET_by_offset(disp, _gloffset_Vertex2iv)
+#define SET_Vertex2iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2iv, fn)
+#define CALL_Vertex2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_Vertex2s, parameters)
+#define GET_Vertex2s(disp) GET_by_offset(disp, _gloffset_Vertex2s)
+#define SET_Vertex2s(disp, fn) SET_by_offset(disp, _gloffset_Vertex2s, fn)
+#define CALL_Vertex2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex2sv, parameters)
+#define GET_Vertex2sv(disp) GET_by_offset(disp, _gloffset_Vertex2sv)
+#define SET_Vertex2sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2sv, fn)
+#define CALL_Vertex3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Vertex3d, parameters)
+#define GET_Vertex3d(disp) GET_by_offset(disp, _gloffset_Vertex3d)
+#define SET_Vertex3d(disp, fn) SET_by_offset(disp, _gloffset_Vertex3d, fn)
+#define CALL_Vertex3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex3dv, parameters)
+#define GET_Vertex3dv(disp) GET_by_offset(disp, _gloffset_Vertex3dv)
+#define SET_Vertex3dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3dv, fn)
+#define CALL_Vertex3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Vertex3f, parameters)
+#define GET_Vertex3f(disp) GET_by_offset(disp, _gloffset_Vertex3f)
+#define SET_Vertex3f(disp, fn) SET_by_offset(disp, _gloffset_Vertex3f, fn)
+#define CALL_Vertex3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex3fv, parameters)
+#define GET_Vertex3fv(disp) GET_by_offset(disp, _gloffset_Vertex3fv)
+#define SET_Vertex3fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3fv, fn)
+#define CALL_Vertex3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Vertex3i, parameters)
+#define GET_Vertex3i(disp) GET_by_offset(disp, _gloffset_Vertex3i)
+#define SET_Vertex3i(disp, fn) SET_by_offset(disp, _gloffset_Vertex3i, fn)
+#define CALL_Vertex3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex3iv, parameters)
+#define GET_Vertex3iv(disp) GET_by_offset(disp, _gloffset_Vertex3iv)
+#define SET_Vertex3iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3iv, fn)
+#define CALL_Vertex3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Vertex3s, parameters)
+#define GET_Vertex3s(disp) GET_by_offset(disp, _gloffset_Vertex3s)
+#define SET_Vertex3s(disp, fn) SET_by_offset(disp, _gloffset_Vertex3s, fn)
+#define CALL_Vertex3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex3sv, parameters)
+#define GET_Vertex3sv(disp) GET_by_offset(disp, _gloffset_Vertex3sv)
+#define SET_Vertex3sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3sv, fn)
+#define CALL_Vertex4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Vertex4d, parameters)
+#define GET_Vertex4d(disp) GET_by_offset(disp, _gloffset_Vertex4d)
+#define SET_Vertex4d(disp, fn) SET_by_offset(disp, _gloffset_Vertex4d, fn)
+#define CALL_Vertex4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex4dv, parameters)
+#define GET_Vertex4dv(disp) GET_by_offset(disp, _gloffset_Vertex4dv)
+#define SET_Vertex4dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4dv, fn)
+#define CALL_Vertex4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Vertex4f, parameters)
+#define GET_Vertex4f(disp) GET_by_offset(disp, _gloffset_Vertex4f)
+#define SET_Vertex4f(disp, fn) SET_by_offset(disp, _gloffset_Vertex4f, fn)
+#define CALL_Vertex4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex4fv, parameters)
+#define GET_Vertex4fv(disp) GET_by_offset(disp, _gloffset_Vertex4fv)
+#define SET_Vertex4fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4fv, fn)
+#define CALL_Vertex4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Vertex4i, parameters)
+#define GET_Vertex4i(disp) GET_by_offset(disp, _gloffset_Vertex4i)
+#define SET_Vertex4i(disp, fn) SET_by_offset(disp, _gloffset_Vertex4i, fn)
+#define CALL_Vertex4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex4iv, parameters)
+#define GET_Vertex4iv(disp) GET_by_offset(disp, _gloffset_Vertex4iv)
+#define SET_Vertex4iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4iv, fn)
+#define CALL_Vertex4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Vertex4s, parameters)
+#define GET_Vertex4s(disp) GET_by_offset(disp, _gloffset_Vertex4s)
+#define SET_Vertex4s(disp, fn) SET_by_offset(disp, _gloffset_Vertex4s, fn)
+#define CALL_Vertex4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex4sv, parameters)
+#define GET_Vertex4sv(disp) GET_by_offset(disp, _gloffset_Vertex4sv)
+#define SET_Vertex4sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4sv, fn)
+#define CALL_ClipPlane(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_ClipPlane, parameters)
+#define GET_ClipPlane(disp) GET_by_offset(disp, _gloffset_ClipPlane)
+#define SET_ClipPlane(disp, fn) SET_by_offset(disp, _gloffset_ClipPlane, fn)
+#define CALL_ColorMaterial(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ColorMaterial, parameters)
+#define GET_ColorMaterial(disp) GET_by_offset(disp, _gloffset_ColorMaterial)
+#define SET_ColorMaterial(disp, fn) SET_by_offset(disp, _gloffset_ColorMaterial, fn)
+#define CALL_CullFace(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_CullFace, parameters)
+#define GET_CullFace(disp) GET_by_offset(disp, _gloffset_CullFace)
+#define SET_CullFace(disp, fn) SET_by_offset(disp, _gloffset_CullFace, fn)
+#define CALL_Fogf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_Fogf, parameters)
+#define GET_Fogf(disp) GET_by_offset(disp, _gloffset_Fogf)
+#define SET_Fogf(disp, fn) SET_by_offset(disp, _gloffset_Fogf, fn)
+#define CALL_Fogfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_Fogfv, parameters)
+#define GET_Fogfv(disp) GET_by_offset(disp, _gloffset_Fogfv)
+#define SET_Fogfv(disp, fn) SET_by_offset(disp, _gloffset_Fogfv, fn)
+#define CALL_Fogi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_Fogi, parameters)
+#define GET_Fogi(disp) GET_by_offset(disp, _gloffset_Fogi)
+#define SET_Fogi(disp, fn) SET_by_offset(disp, _gloffset_Fogi, fn)
+#define CALL_Fogiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_Fogiv, parameters)
+#define GET_Fogiv(disp) GET_by_offset(disp, _gloffset_Fogiv)
+#define SET_Fogiv(disp, fn) SET_by_offset(disp, _gloffset_Fogiv, fn)
+#define CALL_FrontFace(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_FrontFace, parameters)
+#define GET_FrontFace(disp) GET_by_offset(disp, _gloffset_FrontFace)
+#define SET_FrontFace(disp, fn) SET_by_offset(disp, _gloffset_FrontFace, fn)
+#define CALL_Hint(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_Hint, parameters)
+#define GET_Hint(disp) GET_by_offset(disp, _gloffset_Hint)
+#define SET_Hint(disp, fn) SET_by_offset(disp, _gloffset_Hint, fn)
+#define CALL_Lightf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_Lightf, parameters)
+#define GET_Lightf(disp) GET_by_offset(disp, _gloffset_Lightf)
+#define SET_Lightf(disp, fn) SET_by_offset(disp, _gloffset_Lightf, fn)
+#define CALL_Lightfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_Lightfv, parameters)
+#define GET_Lightfv(disp) GET_by_offset(disp, _gloffset_Lightfv)
+#define SET_Lightfv(disp, fn) SET_by_offset(disp, _gloffset_Lightfv, fn)
+#define CALL_Lighti(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_Lighti, parameters)
+#define GET_Lighti(disp) GET_by_offset(disp, _gloffset_Lighti)
+#define SET_Lighti(disp, fn) SET_by_offset(disp, _gloffset_Lighti, fn)
+#define CALL_Lightiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_Lightiv, parameters)
+#define GET_Lightiv(disp) GET_by_offset(disp, _gloffset_Lightiv)
+#define SET_Lightiv(disp, fn) SET_by_offset(disp, _gloffset_Lightiv, fn)
+#define CALL_LightModelf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_LightModelf, parameters)
+#define GET_LightModelf(disp) GET_by_offset(disp, _gloffset_LightModelf)
+#define SET_LightModelf(disp, fn) SET_by_offset(disp, _gloffset_LightModelf, fn)
+#define CALL_LightModelfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_LightModelfv, parameters)
+#define GET_LightModelfv(disp) GET_by_offset(disp, _gloffset_LightModelfv)
+#define SET_LightModelfv(disp, fn) SET_by_offset(disp, _gloffset_LightModelfv, fn)
+#define CALL_LightModeli(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_LightModeli, parameters)
+#define GET_LightModeli(disp) GET_by_offset(disp, _gloffset_LightModeli)
+#define SET_LightModeli(disp, fn) SET_by_offset(disp, _gloffset_LightModeli, fn)
+#define CALL_LightModeliv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_LightModeliv, parameters)
+#define GET_LightModeliv(disp) GET_by_offset(disp, _gloffset_LightModeliv)
+#define SET_LightModeliv(disp, fn) SET_by_offset(disp, _gloffset_LightModeliv, fn)
+#define CALL_LineStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLushort)), _gloffset_LineStipple, parameters)
+#define GET_LineStipple(disp) GET_by_offset(disp, _gloffset_LineStipple)
+#define SET_LineStipple(disp, fn) SET_by_offset(disp, _gloffset_LineStipple, fn)
+#define CALL_LineWidth(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_LineWidth, parameters)
+#define GET_LineWidth(disp) GET_by_offset(disp, _gloffset_LineWidth)
+#define SET_LineWidth(disp, fn) SET_by_offset(disp, _gloffset_LineWidth, fn)
+#define CALL_Materialf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_Materialf, parameters)
+#define GET_Materialf(disp) GET_by_offset(disp, _gloffset_Materialf)
+#define SET_Materialf(disp, fn) SET_by_offset(disp, _gloffset_Materialf, fn)
+#define CALL_Materialfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_Materialfv, parameters)
+#define GET_Materialfv(disp) GET_by_offset(disp, _gloffset_Materialfv)
+#define SET_Materialfv(disp, fn) SET_by_offset(disp, _gloffset_Materialfv, fn)
+#define CALL_Materiali(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_Materiali, parameters)
+#define GET_Materiali(disp) GET_by_offset(disp, _gloffset_Materiali)
+#define SET_Materiali(disp, fn) SET_by_offset(disp, _gloffset_Materiali, fn)
+#define CALL_Materialiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_Materialiv, parameters)
+#define GET_Materialiv(disp) GET_by_offset(disp, _gloffset_Materialiv)
+#define SET_Materialiv(disp, fn) SET_by_offset(disp, _gloffset_Materialiv, fn)
+#define CALL_PointSize(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_PointSize, parameters)
+#define GET_PointSize(disp) GET_by_offset(disp, _gloffset_PointSize)
+#define SET_PointSize(disp, fn) SET_by_offset(disp, _gloffset_PointSize, fn)
+#define CALL_PolygonMode(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_PolygonMode, parameters)
+#define GET_PolygonMode(disp) GET_by_offset(disp, _gloffset_PolygonMode)
+#define SET_PolygonMode(disp, fn) SET_by_offset(disp, _gloffset_PolygonMode, fn)
+#define CALL_PolygonStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_PolygonStipple, parameters)
+#define GET_PolygonStipple(disp) GET_by_offset(disp, _gloffset_PolygonStipple)
+#define SET_PolygonStipple(disp, fn) SET_by_offset(disp, _gloffset_PolygonStipple, fn)
+#define CALL_Scissor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei)), _gloffset_Scissor, parameters)
+#define GET_Scissor(disp) GET_by_offset(disp, _gloffset_Scissor)
+#define SET_Scissor(disp, fn) SET_by_offset(disp, _gloffset_Scissor, fn)
+#define CALL_ShadeModel(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ShadeModel, parameters)
+#define GET_ShadeModel(disp) GET_by_offset(disp, _gloffset_ShadeModel)
+#define SET_ShadeModel(disp, fn) SET_by_offset(disp, _gloffset_ShadeModel, fn)
+#define CALL_TexParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexParameterf, parameters)
+#define GET_TexParameterf(disp) GET_by_offset(disp, _gloffset_TexParameterf)
+#define SET_TexParameterf(disp, fn) SET_by_offset(disp, _gloffset_TexParameterf, fn)
+#define CALL_TexParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexParameterfv, parameters)
+#define GET_TexParameterfv(disp) GET_by_offset(disp, _gloffset_TexParameterfv)
+#define SET_TexParameterfv(disp, fn) SET_by_offset(disp, _gloffset_TexParameterfv, fn)
+#define CALL_TexParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexParameteri, parameters)
+#define GET_TexParameteri(disp) GET_by_offset(disp, _gloffset_TexParameteri)
+#define SET_TexParameteri(disp, fn) SET_by_offset(disp, _gloffset_TexParameteri, fn)
+#define CALL_TexParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexParameteriv, parameters)
+#define GET_TexParameteriv(disp) GET_by_offset(disp, _gloffset_TexParameteriv)
+#define SET_TexParameteriv(disp, fn) SET_by_offset(disp, _gloffset_TexParameteriv, fn)
+#define CALL_TexImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage1D, parameters)
+#define GET_TexImage1D(disp) GET_by_offset(disp, _gloffset_TexImage1D)
+#define SET_TexImage1D(disp, fn) SET_by_offset(disp, _gloffset_TexImage1D, fn)
+#define CALL_TexImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage2D, parameters)
+#define GET_TexImage2D(disp) GET_by_offset(disp, _gloffset_TexImage2D)
+#define SET_TexImage2D(disp, fn) SET_by_offset(disp, _gloffset_TexImage2D, fn)
+#define CALL_TexEnvf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexEnvf, parameters)
+#define GET_TexEnvf(disp) GET_by_offset(disp, _gloffset_TexEnvf)
+#define SET_TexEnvf(disp, fn) SET_by_offset(disp, _gloffset_TexEnvf, fn)
+#define CALL_TexEnvfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexEnvfv, parameters)
+#define GET_TexEnvfv(disp) GET_by_offset(disp, _gloffset_TexEnvfv)
+#define SET_TexEnvfv(disp, fn) SET_by_offset(disp, _gloffset_TexEnvfv, fn)
+#define CALL_TexEnvi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexEnvi, parameters)
+#define GET_TexEnvi(disp) GET_by_offset(disp, _gloffset_TexEnvi)
+#define SET_TexEnvi(disp, fn) SET_by_offset(disp, _gloffset_TexEnvi, fn)
+#define CALL_TexEnviv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexEnviv, parameters)
+#define GET_TexEnviv(disp) GET_by_offset(disp, _gloffset_TexEnviv)
+#define SET_TexEnviv(disp, fn) SET_by_offset(disp, _gloffset_TexEnviv, fn)
+#define CALL_TexGend(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble)), _gloffset_TexGend, parameters)
+#define GET_TexGend(disp) GET_by_offset(disp, _gloffset_TexGend)
+#define SET_TexGend(disp, fn) SET_by_offset(disp, _gloffset_TexGend, fn)
+#define CALL_TexGendv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLdouble *)), _gloffset_TexGendv, parameters)
+#define GET_TexGendv(disp) GET_by_offset(disp, _gloffset_TexGendv)
+#define SET_TexGendv(disp, fn) SET_by_offset(disp, _gloffset_TexGendv, fn)
+#define CALL_TexGenf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexGenf, parameters)
+#define GET_TexGenf(disp) GET_by_offset(disp, _gloffset_TexGenf)
+#define SET_TexGenf(disp, fn) SET_by_offset(disp, _gloffset_TexGenf, fn)
+#define CALL_TexGenfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexGenfv, parameters)
+#define GET_TexGenfv(disp) GET_by_offset(disp, _gloffset_TexGenfv)
+#define SET_TexGenfv(disp, fn) SET_by_offset(disp, _gloffset_TexGenfv, fn)
+#define CALL_TexGeni(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexGeni, parameters)
+#define GET_TexGeni(disp) GET_by_offset(disp, _gloffset_TexGeni)
+#define SET_TexGeni(disp, fn) SET_by_offset(disp, _gloffset_TexGeni, fn)
+#define CALL_TexGeniv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexGeniv, parameters)
+#define GET_TexGeniv(disp) GET_by_offset(disp, _gloffset_TexGeniv)
+#define SET_TexGeniv(disp, fn) SET_by_offset(disp, _gloffset_TexGeniv, fn)
+#define CALL_FeedbackBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLenum, GLfloat *)), _gloffset_FeedbackBuffer, parameters)
+#define GET_FeedbackBuffer(disp) GET_by_offset(disp, _gloffset_FeedbackBuffer)
+#define SET_FeedbackBuffer(disp, fn) SET_by_offset(disp, _gloffset_FeedbackBuffer, fn)
+#define CALL_SelectBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_SelectBuffer, parameters)
+#define GET_SelectBuffer(disp) GET_by_offset(disp, _gloffset_SelectBuffer)
+#define SET_SelectBuffer(disp, fn) SET_by_offset(disp, _gloffset_SelectBuffer, fn)
+#define CALL_RenderMode(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLenum)), _gloffset_RenderMode, parameters)
+#define GET_RenderMode(disp) GET_by_offset(disp, _gloffset_RenderMode)
+#define SET_RenderMode(disp, fn) SET_by_offset(disp, _gloffset_RenderMode, fn)
+#define CALL_InitNames(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_InitNames, parameters)
+#define GET_InitNames(disp) GET_by_offset(disp, _gloffset_InitNames)
+#define SET_InitNames(disp, fn) SET_by_offset(disp, _gloffset_InitNames, fn)
+#define CALL_LoadName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_LoadName, parameters)
+#define GET_LoadName(disp) GET_by_offset(disp, _gloffset_LoadName)
+#define SET_LoadName(disp, fn) SET_by_offset(disp, _gloffset_LoadName, fn)
+#define CALL_PassThrough(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_PassThrough, parameters)
+#define GET_PassThrough(disp) GET_by_offset(disp, _gloffset_PassThrough)
+#define SET_PassThrough(disp, fn) SET_by_offset(disp, _gloffset_PassThrough, fn)
+#define CALL_PopName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopName, parameters)
+#define GET_PopName(disp) GET_by_offset(disp, _gloffset_PopName)
+#define SET_PopName(disp, fn) SET_by_offset(disp, _gloffset_PopName, fn)
+#define CALL_PushName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_PushName, parameters)
+#define GET_PushName(disp) GET_by_offset(disp, _gloffset_PushName)
+#define SET_PushName(disp, fn) SET_by_offset(disp, _gloffset_PushName, fn)
+#define CALL_DrawBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DrawBuffer, parameters)
+#define GET_DrawBuffer(disp) GET_by_offset(disp, _gloffset_DrawBuffer)
+#define SET_DrawBuffer(disp, fn) SET_by_offset(disp, _gloffset_DrawBuffer, fn)
+#define CALL_Clear(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_Clear, parameters)
+#define GET_Clear(disp) GET_by_offset(disp, _gloffset_Clear)
+#define SET_Clear(disp, fn) SET_by_offset(disp, _gloffset_Clear, fn)
+#define CALL_ClearAccum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ClearAccum, parameters)
+#define GET_ClearAccum(disp) GET_by_offset(disp, _gloffset_ClearAccum)
+#define SET_ClearAccum(disp, fn) SET_by_offset(disp, _gloffset_ClearAccum, fn)
+#define CALL_ClearIndex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_ClearIndex, parameters)
+#define GET_ClearIndex(disp) GET_by_offset(disp, _gloffset_ClearIndex)
+#define SET_ClearIndex(disp, fn) SET_by_offset(disp, _gloffset_ClearIndex, fn)
+#define CALL_ClearColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf, GLclampf, GLclampf)), _gloffset_ClearColor, parameters)
+#define GET_ClearColor(disp) GET_by_offset(disp, _gloffset_ClearColor)
+#define SET_ClearColor(disp, fn) SET_by_offset(disp, _gloffset_ClearColor, fn)
+#define CALL_ClearStencil(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_ClearStencil, parameters)
+#define GET_ClearStencil(disp) GET_by_offset(disp, _gloffset_ClearStencil)
+#define SET_ClearStencil(disp, fn) SET_by_offset(disp, _gloffset_ClearStencil, fn)
+#define CALL_ClearDepth(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd)), _gloffset_ClearDepth, parameters)
+#define GET_ClearDepth(disp) GET_by_offset(disp, _gloffset_ClearDepth)
+#define SET_ClearDepth(disp, fn) SET_by_offset(disp, _gloffset_ClearDepth, fn)
+#define CALL_StencilMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_StencilMask, parameters)
+#define GET_StencilMask(disp) GET_by_offset(disp, _gloffset_StencilMask)
+#define SET_StencilMask(disp, fn) SET_by_offset(disp, _gloffset_StencilMask, fn)
+#define CALL_ColorMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean, GLboolean, GLboolean, GLboolean)), _gloffset_ColorMask, parameters)
+#define GET_ColorMask(disp) GET_by_offset(disp, _gloffset_ColorMask)
+#define SET_ColorMask(disp, fn) SET_by_offset(disp, _gloffset_ColorMask, fn)
+#define CALL_DepthMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean)), _gloffset_DepthMask, parameters)
+#define GET_DepthMask(disp) GET_by_offset(disp, _gloffset_DepthMask)
+#define SET_DepthMask(disp, fn) SET_by_offset(disp, _gloffset_DepthMask, fn)
+#define CALL_IndexMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_IndexMask, parameters)
+#define GET_IndexMask(disp) GET_by_offset(disp, _gloffset_IndexMask)
+#define SET_IndexMask(disp, fn) SET_by_offset(disp, _gloffset_IndexMask, fn)
+#define CALL_Accum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_Accum, parameters)
+#define GET_Accum(disp) GET_by_offset(disp, _gloffset_Accum)
+#define SET_Accum(disp, fn) SET_by_offset(disp, _gloffset_Accum, fn)
+#define CALL_Disable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Disable, parameters)
+#define GET_Disable(disp) GET_by_offset(disp, _gloffset_Disable)
+#define SET_Disable(disp, fn) SET_by_offset(disp, _gloffset_Disable, fn)
+#define CALL_Enable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Enable, parameters)
+#define GET_Enable(disp) GET_by_offset(disp, _gloffset_Enable)
+#define SET_Enable(disp, fn) SET_by_offset(disp, _gloffset_Enable, fn)
+#define CALL_Finish(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_Finish, parameters)
+#define GET_Finish(disp) GET_by_offset(disp, _gloffset_Finish)
+#define SET_Finish(disp, fn) SET_by_offset(disp, _gloffset_Finish, fn)
+#define CALL_Flush(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_Flush, parameters)
+#define GET_Flush(disp) GET_by_offset(disp, _gloffset_Flush)
+#define SET_Flush(disp, fn) SET_by_offset(disp, _gloffset_Flush, fn)
+#define CALL_PopAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopAttrib, parameters)
+#define GET_PopAttrib(disp) GET_by_offset(disp, _gloffset_PopAttrib)
+#define SET_PopAttrib(disp, fn) SET_by_offset(disp, _gloffset_PopAttrib, fn)
+#define CALL_PushAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_PushAttrib, parameters)
+#define GET_PushAttrib(disp) GET_by_offset(disp, _gloffset_PushAttrib)
+#define SET_PushAttrib(disp, fn) SET_by_offset(disp, _gloffset_PushAttrib, fn)
+#define CALL_Map1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble *)), _gloffset_Map1d, parameters)
+#define GET_Map1d(disp) GET_by_offset(disp, _gloffset_Map1d)
+#define SET_Map1d(disp, fn) SET_by_offset(disp, _gloffset_Map1d, fn)
+#define CALL_Map1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat *)), _gloffset_Map1f, parameters)
+#define GET_Map1f(disp) GET_by_offset(disp, _gloffset_Map1f)
+#define SET_Map1f(disp, fn) SET_by_offset(disp, _gloffset_Map1f, fn)
+#define CALL_Map2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *)), _gloffset_Map2d, parameters)
+#define GET_Map2d(disp) GET_by_offset(disp, _gloffset_Map2d)
+#define SET_Map2d(disp, fn) SET_by_offset(disp, _gloffset_Map2d, fn)
+#define CALL_Map2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *)), _gloffset_Map2f, parameters)
+#define GET_Map2f(disp) GET_by_offset(disp, _gloffset_Map2f)
+#define SET_Map2f(disp, fn) SET_by_offset(disp, _gloffset_Map2f, fn)
+#define CALL_MapGrid1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLdouble, GLdouble)), _gloffset_MapGrid1d, parameters)
+#define GET_MapGrid1d(disp) GET_by_offset(disp, _gloffset_MapGrid1d)
+#define SET_MapGrid1d(disp, fn) SET_by_offset(disp, _gloffset_MapGrid1d, fn)
+#define CALL_MapGrid1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), _gloffset_MapGrid1f, parameters)
+#define GET_MapGrid1f(disp) GET_by_offset(disp, _gloffset_MapGrid1f)
+#define SET_MapGrid1f(disp, fn) SET_by_offset(disp, _gloffset_MapGrid1f, fn)
+#define CALL_MapGrid2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble)), _gloffset_MapGrid2d, parameters)
+#define GET_MapGrid2d(disp) GET_by_offset(disp, _gloffset_MapGrid2d)
+#define SET_MapGrid2d(disp, fn) SET_by_offset(disp, _gloffset_MapGrid2d, fn)
+#define CALL_MapGrid2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat)), _gloffset_MapGrid2f, parameters)
+#define GET_MapGrid2f(disp) GET_by_offset(disp, _gloffset_MapGrid2f)
+#define SET_MapGrid2f(disp, fn) SET_by_offset(disp, _gloffset_MapGrid2f, fn)
+#define CALL_EvalCoord1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_EvalCoord1d, parameters)
+#define GET_EvalCoord1d(disp) GET_by_offset(disp, _gloffset_EvalCoord1d)
+#define SET_EvalCoord1d(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1d, fn)
+#define CALL_EvalCoord1dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_EvalCoord1dv, parameters)
+#define GET_EvalCoord1dv(disp) GET_by_offset(disp, _gloffset_EvalCoord1dv)
+#define SET_EvalCoord1dv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1dv, fn)
+#define CALL_EvalCoord1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_EvalCoord1f, parameters)
+#define GET_EvalCoord1f(disp) GET_by_offset(disp, _gloffset_EvalCoord1f)
+#define SET_EvalCoord1f(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1f, fn)
+#define CALL_EvalCoord1fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_EvalCoord1fv, parameters)
+#define GET_EvalCoord1fv(disp) GET_by_offset(disp, _gloffset_EvalCoord1fv)
+#define SET_EvalCoord1fv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1fv, fn)
+#define CALL_EvalCoord2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_EvalCoord2d, parameters)
+#define GET_EvalCoord2d(disp) GET_by_offset(disp, _gloffset_EvalCoord2d)
+#define SET_EvalCoord2d(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2d, fn)
+#define CALL_EvalCoord2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_EvalCoord2dv, parameters)
+#define GET_EvalCoord2dv(disp) GET_by_offset(disp, _gloffset_EvalCoord2dv)
+#define SET_EvalCoord2dv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2dv, fn)
+#define CALL_EvalCoord2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_EvalCoord2f, parameters)
+#define GET_EvalCoord2f(disp) GET_by_offset(disp, _gloffset_EvalCoord2f)
+#define SET_EvalCoord2f(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2f, fn)
+#define CALL_EvalCoord2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_EvalCoord2fv, parameters)
+#define GET_EvalCoord2fv(disp) GET_by_offset(disp, _gloffset_EvalCoord2fv)
+#define SET_EvalCoord2fv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2fv, fn)
+#define CALL_EvalMesh1(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint)), _gloffset_EvalMesh1, parameters)
+#define GET_EvalMesh1(disp) GET_by_offset(disp, _gloffset_EvalMesh1)
+#define SET_EvalMesh1(disp, fn) SET_by_offset(disp, _gloffset_EvalMesh1, fn)
+#define CALL_EvalPoint1(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_EvalPoint1, parameters)
+#define GET_EvalPoint1(disp) GET_by_offset(disp, _gloffset_EvalPoint1)
+#define SET_EvalPoint1(disp, fn) SET_by_offset(disp, _gloffset_EvalPoint1, fn)
+#define CALL_EvalMesh2(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint)), _gloffset_EvalMesh2, parameters)
+#define GET_EvalMesh2(disp) GET_by_offset(disp, _gloffset_EvalMesh2)
+#define SET_EvalMesh2(disp, fn) SET_by_offset(disp, _gloffset_EvalMesh2, fn)
+#define CALL_EvalPoint2(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_EvalPoint2, parameters)
+#define GET_EvalPoint2(disp) GET_by_offset(disp, _gloffset_EvalPoint2)
+#define SET_EvalPoint2(disp, fn) SET_by_offset(disp, _gloffset_EvalPoint2, fn)
+#define CALL_AlphaFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLclampf)), _gloffset_AlphaFunc, parameters)
+#define GET_AlphaFunc(disp) GET_by_offset(disp, _gloffset_AlphaFunc)
+#define SET_AlphaFunc(disp, fn) SET_by_offset(disp, _gloffset_AlphaFunc, fn)
+#define CALL_BlendFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_BlendFunc, parameters)
+#define GET_BlendFunc(disp) GET_by_offset(disp, _gloffset_BlendFunc)
+#define SET_BlendFunc(disp, fn) SET_by_offset(disp, _gloffset_BlendFunc, fn)
+#define CALL_LogicOp(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_LogicOp, parameters)
+#define GET_LogicOp(disp) GET_by_offset(disp, _gloffset_LogicOp)
+#define SET_LogicOp(disp, fn) SET_by_offset(disp, _gloffset_LogicOp, fn)
+#define CALL_StencilFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLuint)), _gloffset_StencilFunc, parameters)
+#define GET_StencilFunc(disp) GET_by_offset(disp, _gloffset_StencilFunc)
+#define SET_StencilFunc(disp, fn) SET_by_offset(disp, _gloffset_StencilFunc, fn)
+#define CALL_StencilOp(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum)), _gloffset_StencilOp, parameters)
+#define GET_StencilOp(disp) GET_by_offset(disp, _gloffset_StencilOp)
+#define SET_StencilOp(disp, fn) SET_by_offset(disp, _gloffset_StencilOp, fn)
+#define CALL_DepthFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DepthFunc, parameters)
+#define GET_DepthFunc(disp) GET_by_offset(disp, _gloffset_DepthFunc)
+#define SET_DepthFunc(disp, fn) SET_by_offset(disp, _gloffset_DepthFunc, fn)
+#define CALL_PixelZoom(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PixelZoom, parameters)
+#define GET_PixelZoom(disp) GET_by_offset(disp, _gloffset_PixelZoom)
+#define SET_PixelZoom(disp, fn) SET_by_offset(disp, _gloffset_PixelZoom, fn)
+#define CALL_PixelTransferf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelTransferf, parameters)
+#define GET_PixelTransferf(disp) GET_by_offset(disp, _gloffset_PixelTransferf)
+#define SET_PixelTransferf(disp, fn) SET_by_offset(disp, _gloffset_PixelTransferf, fn)
+#define CALL_PixelTransferi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelTransferi, parameters)
+#define GET_PixelTransferi(disp) GET_by_offset(disp, _gloffset_PixelTransferi)
+#define SET_PixelTransferi(disp, fn) SET_by_offset(disp, _gloffset_PixelTransferi, fn)
+#define CALL_PixelStoref(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelStoref, parameters)
+#define GET_PixelStoref(disp) GET_by_offset(disp, _gloffset_PixelStoref)
+#define SET_PixelStoref(disp, fn) SET_by_offset(disp, _gloffset_PixelStoref, fn)
+#define CALL_PixelStorei(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelStorei, parameters)
+#define GET_PixelStorei(disp) GET_by_offset(disp, _gloffset_PixelStorei)
+#define SET_PixelStorei(disp, fn) SET_by_offset(disp, _gloffset_PixelStorei, fn)
+#define CALL_PixelMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLfloat *)), _gloffset_PixelMapfv, parameters)
+#define GET_PixelMapfv(disp) GET_by_offset(disp, _gloffset_PixelMapfv)
+#define SET_PixelMapfv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapfv, fn)
+#define CALL_PixelMapuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLuint *)), _gloffset_PixelMapuiv, parameters)
+#define GET_PixelMapuiv(disp) GET_by_offset(disp, _gloffset_PixelMapuiv)
+#define SET_PixelMapuiv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapuiv, fn)
+#define CALL_PixelMapusv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLushort *)), _gloffset_PixelMapusv, parameters)
+#define GET_PixelMapusv(disp) GET_by_offset(disp, _gloffset_PixelMapusv)
+#define SET_PixelMapusv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapusv, fn)
+#define CALL_ReadBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ReadBuffer, parameters)
+#define GET_ReadBuffer(disp) GET_by_offset(disp, _gloffset_ReadBuffer)
+#define SET_ReadBuffer(disp, fn) SET_by_offset(disp, _gloffset_ReadBuffer, fn)
+#define CALL_CopyPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum)), _gloffset_CopyPixels, parameters)
+#define GET_CopyPixels(disp) GET_by_offset(disp, _gloffset_CopyPixels)
+#define SET_CopyPixels(disp, fn) SET_by_offset(disp, _gloffset_CopyPixels, fn)
+#define CALL_ReadPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *)), _gloffset_ReadPixels, parameters)
+#define GET_ReadPixels(disp) GET_by_offset(disp, _gloffset_ReadPixels)
+#define SET_ReadPixels(disp, fn) SET_by_offset(disp, _gloffset_ReadPixels, fn)
+#define CALL_DrawPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_DrawPixels, parameters)
+#define GET_DrawPixels(disp) GET_by_offset(disp, _gloffset_DrawPixels)
+#define SET_DrawPixels(disp, fn) SET_by_offset(disp, _gloffset_DrawPixels, fn)
+#define CALL_GetBooleanv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean *)), _gloffset_GetBooleanv, parameters)
+#define GET_GetBooleanv(disp) GET_by_offset(disp, _gloffset_GetBooleanv)
+#define SET_GetBooleanv(disp, fn) SET_by_offset(disp, _gloffset_GetBooleanv, fn)
+#define CALL_GetClipPlane(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), _gloffset_GetClipPlane, parameters)
+#define GET_GetClipPlane(disp) GET_by_offset(disp, _gloffset_GetClipPlane)
+#define SET_GetClipPlane(disp, fn) SET_by_offset(disp, _gloffset_GetClipPlane, fn)
+#define CALL_GetDoublev(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), _gloffset_GetDoublev, parameters)
+#define GET_GetDoublev(disp) GET_by_offset(disp, _gloffset_GetDoublev)
+#define SET_GetDoublev(disp, fn) SET_by_offset(disp, _gloffset_GetDoublev, fn)
+#define CALL_GetError(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(void)), _gloffset_GetError, parameters)
+#define GET_GetError(disp) GET_by_offset(disp, _gloffset_GetError)
+#define SET_GetError(disp, fn) SET_by_offset(disp, _gloffset_GetError, fn)
+#define CALL_GetFloatv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetFloatv, parameters)
+#define GET_GetFloatv(disp) GET_by_offset(disp, _gloffset_GetFloatv)
+#define SET_GetFloatv(disp, fn) SET_by_offset(disp, _gloffset_GetFloatv, fn)
+#define CALL_GetIntegerv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetIntegerv, parameters)
+#define GET_GetIntegerv(disp) GET_by_offset(disp, _gloffset_GetIntegerv)
+#define SET_GetIntegerv(disp, fn) SET_by_offset(disp, _gloffset_GetIntegerv, fn)
+#define CALL_GetLightfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetLightfv, parameters)
+#define GET_GetLightfv(disp) GET_by_offset(disp, _gloffset_GetLightfv)
+#define SET_GetLightfv(disp, fn) SET_by_offset(disp, _gloffset_GetLightfv, fn)
+#define CALL_GetLightiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetLightiv, parameters)
+#define GET_GetLightiv(disp) GET_by_offset(disp, _gloffset_GetLightiv)
+#define SET_GetLightiv(disp, fn) SET_by_offset(disp, _gloffset_GetLightiv, fn)
+#define CALL_GetMapdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble *)), _gloffset_GetMapdv, parameters)
+#define GET_GetMapdv(disp) GET_by_offset(disp, _gloffset_GetMapdv)
+#define SET_GetMapdv(disp, fn) SET_by_offset(disp, _gloffset_GetMapdv, fn)
+#define CALL_GetMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMapfv, parameters)
+#define GET_GetMapfv(disp) GET_by_offset(disp, _gloffset_GetMapfv)
+#define SET_GetMapfv(disp, fn) SET_by_offset(disp, _gloffset_GetMapfv, fn)
+#define CALL_GetMapiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMapiv, parameters)
+#define GET_GetMapiv(disp) GET_by_offset(disp, _gloffset_GetMapiv)
+#define SET_GetMapiv(disp, fn) SET_by_offset(disp, _gloffset_GetMapiv, fn)
+#define CALL_GetMaterialfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMaterialfv, parameters)
+#define GET_GetMaterialfv(disp) GET_by_offset(disp, _gloffset_GetMaterialfv)
+#define SET_GetMaterialfv(disp, fn) SET_by_offset(disp, _gloffset_GetMaterialfv, fn)
+#define CALL_GetMaterialiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMaterialiv, parameters)
+#define GET_GetMaterialiv(disp) GET_by_offset(disp, _gloffset_GetMaterialiv)
+#define SET_GetMaterialiv(disp, fn) SET_by_offset(disp, _gloffset_GetMaterialiv, fn)
+#define CALL_GetPixelMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetPixelMapfv, parameters)
+#define GET_GetPixelMapfv(disp) GET_by_offset(disp, _gloffset_GetPixelMapfv)
+#define SET_GetPixelMapfv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapfv, fn)
+#define CALL_GetPixelMapuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint *)), _gloffset_GetPixelMapuiv, parameters)
+#define GET_GetPixelMapuiv(disp) GET_by_offset(disp, _gloffset_GetPixelMapuiv)
+#define SET_GetPixelMapuiv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapuiv, fn)
+#define CALL_GetPixelMapusv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLushort *)), _gloffset_GetPixelMapusv, parameters)
+#define GET_GetPixelMapusv(disp) GET_by_offset(disp, _gloffset_GetPixelMapusv)
+#define SET_GetPixelMapusv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapusv, fn)
+#define CALL_GetPolygonStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte *)), _gloffset_GetPolygonStipple, parameters)
+#define GET_GetPolygonStipple(disp) GET_by_offset(disp, _gloffset_GetPolygonStipple)
+#define SET_GetPolygonStipple(disp, fn) SET_by_offset(disp, _gloffset_GetPolygonStipple, fn)
+#define CALL_GetString(disp, parameters) CALL_by_offset(disp, (const GLubyte * (GLAPIENTRYP)(GLenum)), _gloffset_GetString, parameters)
+#define GET_GetString(disp) GET_by_offset(disp, _gloffset_GetString)
+#define SET_GetString(disp, fn) SET_by_offset(disp, _gloffset_GetString, fn)
+#define CALL_GetTexEnvfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexEnvfv, parameters)
+#define GET_GetTexEnvfv(disp) GET_by_offset(disp, _gloffset_GetTexEnvfv)
+#define SET_GetTexEnvfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexEnvfv, fn)
+#define CALL_GetTexEnviv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexEnviv, parameters)
+#define GET_GetTexEnviv(disp) GET_by_offset(disp, _gloffset_GetTexEnviv)
+#define SET_GetTexEnviv(disp, fn) SET_by_offset(disp, _gloffset_GetTexEnviv, fn)
+#define CALL_GetTexGendv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble *)), _gloffset_GetTexGendv, parameters)
+#define GET_GetTexGendv(disp) GET_by_offset(disp, _gloffset_GetTexGendv)
+#define SET_GetTexGendv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGendv, fn)
+#define CALL_GetTexGenfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexGenfv, parameters)
+#define GET_GetTexGenfv(disp) GET_by_offset(disp, _gloffset_GetTexGenfv)
+#define SET_GetTexGenfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGenfv, fn)
+#define CALL_GetTexGeniv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexGeniv, parameters)
+#define GET_GetTexGeniv(disp) GET_by_offset(disp, _gloffset_GetTexGeniv)
+#define SET_GetTexGeniv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGeniv, fn)
+#define CALL_GetTexImage(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLenum, GLvoid *)), _gloffset_GetTexImage, parameters)
+#define GET_GetTexImage(disp) GET_by_offset(disp, _gloffset_GetTexImage)
+#define SET_GetTexImage(disp, fn) SET_by_offset(disp, _gloffset_GetTexImage, fn)
+#define CALL_GetTexParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexParameterfv, parameters)
+#define GET_GetTexParameterfv(disp) GET_by_offset(disp, _gloffset_GetTexParameterfv)
+#define SET_GetTexParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterfv, fn)
+#define CALL_GetTexParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexParameteriv, parameters)
+#define GET_GetTexParameteriv(disp) GET_by_offset(disp, _gloffset_GetTexParameteriv)
+#define SET_GetTexParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameteriv, fn)
+#define CALL_GetTexLevelParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLfloat *)), _gloffset_GetTexLevelParameterfv, parameters)
+#define GET_GetTexLevelParameterfv(disp) GET_by_offset(disp, _gloffset_GetTexLevelParameterfv)
+#define SET_GetTexLevelParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexLevelParameterfv, fn)
+#define CALL_GetTexLevelParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint *)), _gloffset_GetTexLevelParameteriv, parameters)
+#define GET_GetTexLevelParameteriv(disp) GET_by_offset(disp, _gloffset_GetTexLevelParameteriv)
+#define SET_GetTexLevelParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetTexLevelParameteriv, fn)
+#define CALL_IsEnabled(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), _gloffset_IsEnabled, parameters)
+#define GET_IsEnabled(disp) GET_by_offset(disp, _gloffset_IsEnabled)
+#define SET_IsEnabled(disp, fn) SET_by_offset(disp, _gloffset_IsEnabled, fn)
+#define CALL_IsList(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsList, parameters)
+#define GET_IsList(disp) GET_by_offset(disp, _gloffset_IsList)
+#define SET_IsList(disp, fn) SET_by_offset(disp, _gloffset_IsList, fn)
+#define CALL_DepthRange(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), _gloffset_DepthRange, parameters)
+#define GET_DepthRange(disp) GET_by_offset(disp, _gloffset_DepthRange)
+#define SET_DepthRange(disp, fn) SET_by_offset(disp, _gloffset_DepthRange, fn)
+#define CALL_Frustum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Frustum, parameters)
+#define GET_Frustum(disp) GET_by_offset(disp, _gloffset_Frustum)
+#define SET_Frustum(disp, fn) SET_by_offset(disp, _gloffset_Frustum, fn)
+#define CALL_LoadIdentity(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_LoadIdentity, parameters)
+#define GET_LoadIdentity(disp) GET_by_offset(disp, _gloffset_LoadIdentity)
+#define SET_LoadIdentity(disp, fn) SET_by_offset(disp, _gloffset_LoadIdentity, fn)
+#define CALL_LoadMatrixf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_LoadMatrixf, parameters)
+#define GET_LoadMatrixf(disp) GET_by_offset(disp, _gloffset_LoadMatrixf)
+#define SET_LoadMatrixf(disp, fn) SET_by_offset(disp, _gloffset_LoadMatrixf, fn)
+#define CALL_LoadMatrixd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_LoadMatrixd, parameters)
+#define GET_LoadMatrixd(disp) GET_by_offset(disp, _gloffset_LoadMatrixd)
+#define SET_LoadMatrixd(disp, fn) SET_by_offset(disp, _gloffset_LoadMatrixd, fn)
+#define CALL_MatrixMode(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_MatrixMode, parameters)
+#define GET_MatrixMode(disp) GET_by_offset(disp, _gloffset_MatrixMode)
+#define SET_MatrixMode(disp, fn) SET_by_offset(disp, _gloffset_MatrixMode, fn)
+#define CALL_MultMatrixf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_MultMatrixf, parameters)
+#define GET_MultMatrixf(disp) GET_by_offset(disp, _gloffset_MultMatrixf)
+#define SET_MultMatrixf(disp, fn) SET_by_offset(disp, _gloffset_MultMatrixf, fn)
+#define CALL_MultMatrixd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_MultMatrixd, parameters)
+#define GET_MultMatrixd(disp) GET_by_offset(disp, _gloffset_MultMatrixd)
+#define SET_MultMatrixd(disp, fn) SET_by_offset(disp, _gloffset_MultMatrixd, fn)
+#define CALL_Ortho(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Ortho, parameters)
+#define GET_Ortho(disp) GET_by_offset(disp, _gloffset_Ortho)
+#define SET_Ortho(disp, fn) SET_by_offset(disp, _gloffset_Ortho, fn)
+#define CALL_PopMatrix(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopMatrix, parameters)
+#define GET_PopMatrix(disp) GET_by_offset(disp, _gloffset_PopMatrix)
+#define SET_PopMatrix(disp, fn) SET_by_offset(disp, _gloffset_PopMatrix, fn)
+#define CALL_PushMatrix(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PushMatrix, parameters)
+#define GET_PushMatrix(disp) GET_by_offset(disp, _gloffset_PushMatrix)
+#define SET_PushMatrix(disp, fn) SET_by_offset(disp, _gloffset_PushMatrix, fn)
+#define CALL_Rotated(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Rotated, parameters)
+#define GET_Rotated(disp) GET_by_offset(disp, _gloffset_Rotated)
+#define SET_Rotated(disp, fn) SET_by_offset(disp, _gloffset_Rotated, fn)
+#define CALL_Rotatef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Rotatef, parameters)
+#define GET_Rotatef(disp) GET_by_offset(disp, _gloffset_Rotatef)
+#define SET_Rotatef(disp, fn) SET_by_offset(disp, _gloffset_Rotatef, fn)
+#define CALL_Scaled(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Scaled, parameters)
+#define GET_Scaled(disp) GET_by_offset(disp, _gloffset_Scaled)
+#define SET_Scaled(disp, fn) SET_by_offset(disp, _gloffset_Scaled, fn)
+#define CALL_Scalef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Scalef, parameters)
+#define GET_Scalef(disp) GET_by_offset(disp, _gloffset_Scalef)
+#define SET_Scalef(disp, fn) SET_by_offset(disp, _gloffset_Scalef, fn)
+#define CALL_Translated(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Translated, parameters)
+#define GET_Translated(disp) GET_by_offset(disp, _gloffset_Translated)
+#define SET_Translated(disp, fn) SET_by_offset(disp, _gloffset_Translated, fn)
+#define CALL_Translatef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Translatef, parameters)
+#define GET_Translatef(disp) GET_by_offset(disp, _gloffset_Translatef)
+#define SET_Translatef(disp, fn) SET_by_offset(disp, _gloffset_Translatef, fn)
+#define CALL_Viewport(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei)), _gloffset_Viewport, parameters)
+#define GET_Viewport(disp) GET_by_offset(disp, _gloffset_Viewport)
+#define SET_Viewport(disp, fn) SET_by_offset(disp, _gloffset_Viewport, fn)
+#define CALL_ArrayElement(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_ArrayElement, parameters)
+#define GET_ArrayElement(disp) GET_by_offset(disp, _gloffset_ArrayElement)
+#define SET_ArrayElement(disp, fn) SET_by_offset(disp, _gloffset_ArrayElement, fn)
+#define CALL_BindTexture(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindTexture, parameters)
+#define GET_BindTexture(disp) GET_by_offset(disp, _gloffset_BindTexture)
+#define SET_BindTexture(disp, fn) SET_by_offset(disp, _gloffset_BindTexture, fn)
+#define CALL_ColorPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_ColorPointer, parameters)
+#define GET_ColorPointer(disp) GET_by_offset(disp, _gloffset_ColorPointer)
+#define SET_ColorPointer(disp, fn) SET_by_offset(disp, _gloffset_ColorPointer, fn)
+#define CALL_DisableClientState(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DisableClientState, parameters)
+#define GET_DisableClientState(disp) GET_by_offset(disp, _gloffset_DisableClientState)
+#define SET_DisableClientState(disp, fn) SET_by_offset(disp, _gloffset_DisableClientState, fn)
+#define CALL_DrawArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei)), _gloffset_DrawArrays, parameters)
+#define GET_DrawArrays(disp) GET_by_offset(disp, _gloffset_DrawArrays)
+#define SET_DrawArrays(disp, fn) SET_by_offset(disp, _gloffset_DrawArrays, fn)
+#define CALL_DrawElements(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *)), _gloffset_DrawElements, parameters)
+#define GET_DrawElements(disp) GET_by_offset(disp, _gloffset_DrawElements)
+#define SET_DrawElements(disp, fn) SET_by_offset(disp, _gloffset_DrawElements, fn)
+#define CALL_EdgeFlagPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), _gloffset_EdgeFlagPointer, parameters)
+#define GET_EdgeFlagPointer(disp) GET_by_offset(disp, _gloffset_EdgeFlagPointer)
+#define SET_EdgeFlagPointer(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagPointer, fn)
+#define CALL_EnableClientState(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_EnableClientState, parameters)
+#define GET_EnableClientState(disp) GET_by_offset(disp, _gloffset_EnableClientState)
+#define SET_EnableClientState(disp, fn) SET_by_offset(disp, _gloffset_EnableClientState, fn)
+#define CALL_IndexPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_IndexPointer, parameters)
+#define GET_IndexPointer(disp) GET_by_offset(disp, _gloffset_IndexPointer)
+#define SET_IndexPointer(disp, fn) SET_by_offset(disp, _gloffset_IndexPointer, fn)
+#define CALL_Indexub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte)), _gloffset_Indexub, parameters)
+#define GET_Indexub(disp) GET_by_offset(disp, _gloffset_Indexub)
+#define SET_Indexub(disp, fn) SET_by_offset(disp, _gloffset_Indexub, fn)
+#define CALL_Indexubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Indexubv, parameters)
+#define GET_Indexubv(disp) GET_by_offset(disp, _gloffset_Indexubv)
+#define SET_Indexubv(disp, fn) SET_by_offset(disp, _gloffset_Indexubv, fn)
+#define CALL_InterleavedArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_InterleavedArrays, parameters)
+#define GET_InterleavedArrays(disp) GET_by_offset(disp, _gloffset_InterleavedArrays)
+#define SET_InterleavedArrays(disp, fn) SET_by_offset(disp, _gloffset_InterleavedArrays, fn)
+#define CALL_NormalPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_NormalPointer, parameters)
+#define GET_NormalPointer(disp) GET_by_offset(disp, _gloffset_NormalPointer)
+#define SET_NormalPointer(disp, fn) SET_by_offset(disp, _gloffset_NormalPointer, fn)
+#define CALL_PolygonOffset(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PolygonOffset, parameters)
+#define GET_PolygonOffset(disp) GET_by_offset(disp, _gloffset_PolygonOffset)
+#define SET_PolygonOffset(disp, fn) SET_by_offset(disp, _gloffset_PolygonOffset, fn)
+#define CALL_TexCoordPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_TexCoordPointer, parameters)
+#define GET_TexCoordPointer(disp) GET_by_offset(disp, _gloffset_TexCoordPointer)
+#define SET_TexCoordPointer(disp, fn) SET_by_offset(disp, _gloffset_TexCoordPointer, fn)
+#define CALL_VertexPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexPointer, parameters)
+#define GET_VertexPointer(disp) GET_by_offset(disp, _gloffset_VertexPointer)
+#define SET_VertexPointer(disp, fn) SET_by_offset(disp, _gloffset_VertexPointer, fn)
+#define CALL_AreTexturesResident(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), _gloffset_AreTexturesResident, parameters)
+#define GET_AreTexturesResident(disp) GET_by_offset(disp, _gloffset_AreTexturesResident)
+#define SET_AreTexturesResident(disp, fn) SET_by_offset(disp, _gloffset_AreTexturesResident, fn)
+#define CALL_CopyTexImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint)), _gloffset_CopyTexImage1D, parameters)
+#define GET_CopyTexImage1D(disp) GET_by_offset(disp, _gloffset_CopyTexImage1D)
+#define SET_CopyTexImage1D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexImage1D, fn)
+#define CALL_CopyTexImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)), _gloffset_CopyTexImage2D, parameters)
+#define GET_CopyTexImage2D(disp) GET_by_offset(disp, _gloffset_CopyTexImage2D)
+#define SET_CopyTexImage2D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexImage2D, fn)
+#define CALL_CopyTexSubImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei)), _gloffset_CopyTexSubImage1D, parameters)
+#define GET_CopyTexSubImage1D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage1D)
+#define SET_CopyTexSubImage1D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage1D, fn)
+#define CALL_CopyTexSubImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyTexSubImage2D, parameters)
+#define GET_CopyTexSubImage2D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage2D)
+#define SET_CopyTexSubImage2D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage2D, fn)
+#define CALL_DeleteTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteTextures, parameters)
+#define GET_DeleteTextures(disp) GET_by_offset(disp, _gloffset_DeleteTextures)
+#define SET_DeleteTextures(disp, fn) SET_by_offset(disp, _gloffset_DeleteTextures, fn)
+#define CALL_GenTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenTextures, parameters)
+#define GET_GenTextures(disp) GET_by_offset(disp, _gloffset_GenTextures)
+#define SET_GenTextures(disp, fn) SET_by_offset(disp, _gloffset_GenTextures, fn)
+#define CALL_GetPointerv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid **)), _gloffset_GetPointerv, parameters)
+#define GET_GetPointerv(disp) GET_by_offset(disp, _gloffset_GetPointerv)
+#define SET_GetPointerv(disp, fn) SET_by_offset(disp, _gloffset_GetPointerv, fn)
+#define CALL_IsTexture(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsTexture, parameters)
+#define GET_IsTexture(disp) GET_by_offset(disp, _gloffset_IsTexture)
+#define SET_IsTexture(disp, fn) SET_by_offset(disp, _gloffset_IsTexture, fn)
+#define CALL_PrioritizeTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *, const GLclampf *)), _gloffset_PrioritizeTextures, parameters)
+#define GET_PrioritizeTextures(disp) GET_by_offset(disp, _gloffset_PrioritizeTextures)
+#define SET_PrioritizeTextures(disp, fn) SET_by_offset(disp, _gloffset_PrioritizeTextures, fn)
+#define CALL_TexSubImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage1D, parameters)
+#define GET_TexSubImage1D(disp) GET_by_offset(disp, _gloffset_TexSubImage1D)
+#define SET_TexSubImage1D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage1D, fn)
+#define CALL_TexSubImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage2D, parameters)
+#define GET_TexSubImage2D(disp) GET_by_offset(disp, _gloffset_TexSubImage2D)
+#define SET_TexSubImage2D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage2D, fn)
+#define CALL_PopClientAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopClientAttrib, parameters)
+#define GET_PopClientAttrib(disp) GET_by_offset(disp, _gloffset_PopClientAttrib)
+#define SET_PopClientAttrib(disp, fn) SET_by_offset(disp, _gloffset_PopClientAttrib, fn)
+#define CALL_PushClientAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_PushClientAttrib, parameters)
+#define GET_PushClientAttrib(disp) GET_by_offset(disp, _gloffset_PushClientAttrib)
+#define SET_PushClientAttrib(disp, fn) SET_by_offset(disp, _gloffset_PushClientAttrib, fn)
+#define CALL_BlendColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf, GLclampf, GLclampf)), _gloffset_BlendColor, parameters)
+#define GET_BlendColor(disp) GET_by_offset(disp, _gloffset_BlendColor)
+#define SET_BlendColor(disp, fn) SET_by_offset(disp, _gloffset_BlendColor, fn)
+#define CALL_BlendEquation(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_BlendEquation, parameters)
+#define GET_BlendEquation(disp) GET_by_offset(disp, _gloffset_BlendEquation)
+#define SET_BlendEquation(disp, fn) SET_by_offset(disp, _gloffset_BlendEquation, fn)
+#define CALL_DrawRangeElements(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *)), _gloffset_DrawRangeElements, parameters)
+#define GET_DrawRangeElements(disp) GET_by_offset(disp, _gloffset_DrawRangeElements)
+#define SET_DrawRangeElements(disp, fn) SET_by_offset(disp, _gloffset_DrawRangeElements, fn)
+#define CALL_ColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ColorTable, parameters)
+#define GET_ColorTable(disp) GET_by_offset(disp, _gloffset_ColorTable)
+#define SET_ColorTable(disp, fn) SET_by_offset(disp, _gloffset_ColorTable, fn)
+#define CALL_ColorTableParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_ColorTableParameterfv, parameters)
+#define GET_ColorTableParameterfv(disp) GET_by_offset(disp, _gloffset_ColorTableParameterfv)
+#define SET_ColorTableParameterfv(disp, fn) SET_by_offset(disp, _gloffset_ColorTableParameterfv, fn)
+#define CALL_ColorTableParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_ColorTableParameteriv, parameters)
+#define GET_ColorTableParameteriv(disp) GET_by_offset(disp, _gloffset_ColorTableParameteriv)
+#define SET_ColorTableParameteriv(disp, fn) SET_by_offset(disp, _gloffset_ColorTableParameteriv, fn)
+#define CALL_CopyColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei)), _gloffset_CopyColorTable, parameters)
+#define GET_CopyColorTable(disp) GET_by_offset(disp, _gloffset_CopyColorTable)
+#define SET_CopyColorTable(disp, fn) SET_by_offset(disp, _gloffset_CopyColorTable, fn)
+#define CALL_GetColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *)), _gloffset_GetColorTable, parameters)
+#define GET_GetColorTable(disp) GET_by_offset(disp, _gloffset_GetColorTable)
+#define SET_GetColorTable(disp, fn) SET_by_offset(disp, _gloffset_GetColorTable, fn)
+#define CALL_GetColorTableParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetColorTableParameterfv, parameters)
+#define GET_GetColorTableParameterfv(disp) GET_by_offset(disp, _gloffset_GetColorTableParameterfv)
+#define SET_GetColorTableParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetColorTableParameterfv, fn)
+#define CALL_GetColorTableParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetColorTableParameteriv, parameters)
+#define GET_GetColorTableParameteriv(disp) GET_by_offset(disp, _gloffset_GetColorTableParameteriv)
+#define SET_GetColorTableParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetColorTableParameteriv, fn)
+#define CALL_ColorSubTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ColorSubTable, parameters)
+#define GET_ColorSubTable(disp) GET_by_offset(disp, _gloffset_ColorSubTable)
+#define SET_ColorSubTable(disp, fn) SET_by_offset(disp, _gloffset_ColorSubTable, fn)
+#define CALL_CopyColorSubTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLint, GLint, GLsizei)), _gloffset_CopyColorSubTable, parameters)
+#define GET_CopyColorSubTable(disp) GET_by_offset(disp, _gloffset_CopyColorSubTable)
+#define SET_CopyColorSubTable(disp, fn) SET_by_offset(disp, _gloffset_CopyColorSubTable, fn)
+#define CALL_ConvolutionFilter1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ConvolutionFilter1D, parameters)
+#define GET_ConvolutionFilter1D(disp) GET_by_offset(disp, _gloffset_ConvolutionFilter1D)
+#define SET_ConvolutionFilter1D(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionFilter1D, fn)
+#define CALL_ConvolutionFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ConvolutionFilter2D, parameters)
+#define GET_ConvolutionFilter2D(disp) GET_by_offset(disp, _gloffset_ConvolutionFilter2D)
+#define SET_ConvolutionFilter2D(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionFilter2D, fn)
+#define CALL_ConvolutionParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_ConvolutionParameterf, parameters)
+#define GET_ConvolutionParameterf(disp) GET_by_offset(disp, _gloffset_ConvolutionParameterf)
+#define SET_ConvolutionParameterf(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameterf, fn)
+#define CALL_ConvolutionParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_ConvolutionParameterfv, parameters)
+#define GET_ConvolutionParameterfv(disp) GET_by_offset(disp, _gloffset_ConvolutionParameterfv)
+#define SET_ConvolutionParameterfv(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameterfv, fn)
+#define CALL_ConvolutionParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_ConvolutionParameteri, parameters)
+#define GET_ConvolutionParameteri(disp) GET_by_offset(disp, _gloffset_ConvolutionParameteri)
+#define SET_ConvolutionParameteri(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameteri, fn)
+#define CALL_ConvolutionParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_ConvolutionParameteriv, parameters)
+#define GET_ConvolutionParameteriv(disp) GET_by_offset(disp, _gloffset_ConvolutionParameteriv)
+#define SET_ConvolutionParameteriv(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameteriv, fn)
+#define CALL_CopyConvolutionFilter1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei)), _gloffset_CopyConvolutionFilter1D, parameters)
+#define GET_CopyConvolutionFilter1D(disp) GET_by_offset(disp, _gloffset_CopyConvolutionFilter1D)
+#define SET_CopyConvolutionFilter1D(disp, fn) SET_by_offset(disp, _gloffset_CopyConvolutionFilter1D, fn)
+#define CALL_CopyConvolutionFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyConvolutionFilter2D, parameters)
+#define GET_CopyConvolutionFilter2D(disp) GET_by_offset(disp, _gloffset_CopyConvolutionFilter2D)
+#define SET_CopyConvolutionFilter2D(disp, fn) SET_by_offset(disp, _gloffset_CopyConvolutionFilter2D, fn)
+#define CALL_GetConvolutionFilter(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *)), _gloffset_GetConvolutionFilter, parameters)
+#define GET_GetConvolutionFilter(disp) GET_by_offset(disp, _gloffset_GetConvolutionFilter)
+#define SET_GetConvolutionFilter(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionFilter, fn)
+#define CALL_GetConvolutionParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetConvolutionParameterfv, parameters)
+#define GET_GetConvolutionParameterfv(disp) GET_by_offset(disp, _gloffset_GetConvolutionParameterfv)
+#define SET_GetConvolutionParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionParameterfv, fn)
+#define CALL_GetConvolutionParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetConvolutionParameteriv, parameters)
+#define GET_GetConvolutionParameteriv(disp) GET_by_offset(disp, _gloffset_GetConvolutionParameteriv)
+#define SET_GetConvolutionParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionParameteriv, fn)
+#define CALL_GetSeparableFilter(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *)), _gloffset_GetSeparableFilter, parameters)
+#define GET_GetSeparableFilter(disp) GET_by_offset(disp, _gloffset_GetSeparableFilter)
+#define SET_GetSeparableFilter(disp, fn) SET_by_offset(disp, _gloffset_GetSeparableFilter, fn)
+#define CALL_SeparableFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *)), _gloffset_SeparableFilter2D, parameters)
+#define GET_SeparableFilter2D(disp) GET_by_offset(disp, _gloffset_SeparableFilter2D)
+#define SET_SeparableFilter2D(disp, fn) SET_by_offset(disp, _gloffset_SeparableFilter2D, fn)
+#define CALL_GetHistogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)), _gloffset_GetHistogram, parameters)
+#define GET_GetHistogram(disp) GET_by_offset(disp, _gloffset_GetHistogram)
+#define SET_GetHistogram(disp, fn) SET_by_offset(disp, _gloffset_GetHistogram, fn)
+#define CALL_GetHistogramParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetHistogramParameterfv, parameters)
+#define GET_GetHistogramParameterfv(disp) GET_by_offset(disp, _gloffset_GetHistogramParameterfv)
+#define SET_GetHistogramParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetHistogramParameterfv, fn)
+#define CALL_GetHistogramParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetHistogramParameteriv, parameters)
+#define GET_GetHistogramParameteriv(disp) GET_by_offset(disp, _gloffset_GetHistogramParameteriv)
+#define SET_GetHistogramParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetHistogramParameteriv, fn)
+#define CALL_GetMinmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)), _gloffset_GetMinmax, parameters)
+#define GET_GetMinmax(disp) GET_by_offset(disp, _gloffset_GetMinmax)
+#define SET_GetMinmax(disp, fn) SET_by_offset(disp, _gloffset_GetMinmax, fn)
+#define CALL_GetMinmaxParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMinmaxParameterfv, parameters)
+#define GET_GetMinmaxParameterfv(disp) GET_by_offset(disp, _gloffset_GetMinmaxParameterfv)
+#define SET_GetMinmaxParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetMinmaxParameterfv, fn)
+#define CALL_GetMinmaxParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMinmaxParameteriv, parameters)
+#define GET_GetMinmaxParameteriv(disp) GET_by_offset(disp, _gloffset_GetMinmaxParameteriv)
+#define SET_GetMinmaxParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetMinmaxParameteriv, fn)
+#define CALL_Histogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, GLboolean)), _gloffset_Histogram, parameters)
+#define GET_Histogram(disp) GET_by_offset(disp, _gloffset_Histogram)
+#define SET_Histogram(disp, fn) SET_by_offset(disp, _gloffset_Histogram, fn)
+#define CALL_Minmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLboolean)), _gloffset_Minmax, parameters)
+#define GET_Minmax(disp) GET_by_offset(disp, _gloffset_Minmax)
+#define SET_Minmax(disp, fn) SET_by_offset(disp, _gloffset_Minmax, fn)
+#define CALL_ResetHistogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ResetHistogram, parameters)
+#define GET_ResetHistogram(disp) GET_by_offset(disp, _gloffset_ResetHistogram)
+#define SET_ResetHistogram(disp, fn) SET_by_offset(disp, _gloffset_ResetHistogram, fn)
+#define CALL_ResetMinmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ResetMinmax, parameters)
+#define GET_ResetMinmax(disp) GET_by_offset(disp, _gloffset_ResetMinmax)
+#define SET_ResetMinmax(disp, fn) SET_by_offset(disp, _gloffset_ResetMinmax, fn)
+#define CALL_TexImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage3D, parameters)
+#define GET_TexImage3D(disp) GET_by_offset(disp, _gloffset_TexImage3D)
+#define SET_TexImage3D(disp, fn) SET_by_offset(disp, _gloffset_TexImage3D, fn)
+#define CALL_TexSubImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage3D, parameters)
+#define GET_TexSubImage3D(disp) GET_by_offset(disp, _gloffset_TexSubImage3D)
+#define SET_TexSubImage3D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage3D, fn)
+#define CALL_CopyTexSubImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyTexSubImage3D, parameters)
+#define GET_CopyTexSubImage3D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage3D)
+#define SET_CopyTexSubImage3D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage3D, fn)
+#define CALL_ActiveTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ActiveTextureARB, parameters)
+#define GET_ActiveTextureARB(disp) GET_by_offset(disp, _gloffset_ActiveTextureARB)
+#define SET_ActiveTextureARB(disp, fn) SET_by_offset(disp, _gloffset_ActiveTextureARB, fn)
+#define CALL_ClientActiveTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ClientActiveTextureARB, parameters)
+#define GET_ClientActiveTextureARB(disp) GET_by_offset(disp, _gloffset_ClientActiveTextureARB)
+#define SET_ClientActiveTextureARB(disp, fn) SET_by_offset(disp, _gloffset_ClientActiveTextureARB, fn)
+#define CALL_MultiTexCoord1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble)), _gloffset_MultiTexCoord1dARB, parameters)
+#define GET_MultiTexCoord1dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1dARB)
+#define SET_MultiTexCoord1dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1dARB, fn)
+#define CALL_MultiTexCoord1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord1dvARB, parameters)
+#define GET_MultiTexCoord1dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1dvARB)
+#define SET_MultiTexCoord1dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1dvARB, fn)
+#define CALL_MultiTexCoord1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_MultiTexCoord1fARB, parameters)
+#define GET_MultiTexCoord1fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1fARB)
+#define SET_MultiTexCoord1fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1fARB, fn)
+#define CALL_MultiTexCoord1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord1fvARB, parameters)
+#define GET_MultiTexCoord1fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1fvARB)
+#define SET_MultiTexCoord1fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1fvARB, fn)
+#define CALL_MultiTexCoord1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_MultiTexCoord1iARB, parameters)
+#define GET_MultiTexCoord1iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1iARB)
+#define SET_MultiTexCoord1iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1iARB, fn)
+#define CALL_MultiTexCoord1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord1ivARB, parameters)
+#define GET_MultiTexCoord1ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1ivARB)
+#define SET_MultiTexCoord1ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1ivARB, fn)
+#define CALL_MultiTexCoord1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort)), _gloffset_MultiTexCoord1sARB, parameters)
+#define GET_MultiTexCoord1sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1sARB)
+#define SET_MultiTexCoord1sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1sARB, fn)
+#define CALL_MultiTexCoord1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord1svARB, parameters)
+#define GET_MultiTexCoord1svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1svARB)
+#define SET_MultiTexCoord1svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1svARB, fn)
+#define CALL_MultiTexCoord2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble)), _gloffset_MultiTexCoord2dARB, parameters)
+#define GET_MultiTexCoord2dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2dARB)
+#define SET_MultiTexCoord2dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2dARB, fn)
+#define CALL_MultiTexCoord2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord2dvARB, parameters)
+#define GET_MultiTexCoord2dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2dvARB)
+#define SET_MultiTexCoord2dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2dvARB, fn)
+#define CALL_MultiTexCoord2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat)), _gloffset_MultiTexCoord2fARB, parameters)
+#define GET_MultiTexCoord2fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2fARB)
+#define SET_MultiTexCoord2fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2fARB, fn)
+#define CALL_MultiTexCoord2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord2fvARB, parameters)
+#define GET_MultiTexCoord2fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2fvARB)
+#define SET_MultiTexCoord2fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2fvARB, fn)
+#define CALL_MultiTexCoord2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint)), _gloffset_MultiTexCoord2iARB, parameters)
+#define GET_MultiTexCoord2iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2iARB)
+#define SET_MultiTexCoord2iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2iARB, fn)
+#define CALL_MultiTexCoord2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord2ivARB, parameters)
+#define GET_MultiTexCoord2ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2ivARB)
+#define SET_MultiTexCoord2ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2ivARB, fn)
+#define CALL_MultiTexCoord2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort)), _gloffset_MultiTexCoord2sARB, parameters)
+#define GET_MultiTexCoord2sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2sARB)
+#define SET_MultiTexCoord2sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2sARB, fn)
+#define CALL_MultiTexCoord2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord2svARB, parameters)
+#define GET_MultiTexCoord2svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2svARB)
+#define SET_MultiTexCoord2svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2svARB, fn)
+#define CALL_MultiTexCoord3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLdouble)), _gloffset_MultiTexCoord3dARB, parameters)
+#define GET_MultiTexCoord3dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3dARB)
+#define SET_MultiTexCoord3dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3dARB, fn)
+#define CALL_MultiTexCoord3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord3dvARB, parameters)
+#define GET_MultiTexCoord3dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3dvARB)
+#define SET_MultiTexCoord3dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3dvARB, fn)
+#define CALL_MultiTexCoord3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLfloat)), _gloffset_MultiTexCoord3fARB, parameters)
+#define GET_MultiTexCoord3fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3fARB)
+#define SET_MultiTexCoord3fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3fARB, fn)
+#define CALL_MultiTexCoord3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord3fvARB, parameters)
+#define GET_MultiTexCoord3fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3fvARB)
+#define SET_MultiTexCoord3fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3fvARB, fn)
+#define CALL_MultiTexCoord3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint)), _gloffset_MultiTexCoord3iARB, parameters)
+#define GET_MultiTexCoord3iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3iARB)
+#define SET_MultiTexCoord3iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3iARB, fn)
+#define CALL_MultiTexCoord3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord3ivARB, parameters)
+#define GET_MultiTexCoord3ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3ivARB)
+#define SET_MultiTexCoord3ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3ivARB, fn)
+#define CALL_MultiTexCoord3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort, GLshort)), _gloffset_MultiTexCoord3sARB, parameters)
+#define GET_MultiTexCoord3sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3sARB)
+#define SET_MultiTexCoord3sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3sARB, fn)
+#define CALL_MultiTexCoord3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord3svARB, parameters)
+#define GET_MultiTexCoord3svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3svARB)
+#define SET_MultiTexCoord3svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3svARB, fn)
+#define CALL_MultiTexCoord4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_MultiTexCoord4dARB, parameters)
+#define GET_MultiTexCoord4dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4dARB)
+#define SET_MultiTexCoord4dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4dARB, fn)
+#define CALL_MultiTexCoord4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord4dvARB, parameters)
+#define GET_MultiTexCoord4dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4dvARB)
+#define SET_MultiTexCoord4dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4dvARB, fn)
+#define CALL_MultiTexCoord4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_MultiTexCoord4fARB, parameters)
+#define GET_MultiTexCoord4fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4fARB)
+#define SET_MultiTexCoord4fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4fARB, fn)
+#define CALL_MultiTexCoord4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord4fvARB, parameters)
+#define GET_MultiTexCoord4fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4fvARB)
+#define SET_MultiTexCoord4fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4fvARB, fn)
+#define CALL_MultiTexCoord4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint)), _gloffset_MultiTexCoord4iARB, parameters)
+#define GET_MultiTexCoord4iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4iARB)
+#define SET_MultiTexCoord4iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4iARB, fn)
+#define CALL_MultiTexCoord4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord4ivARB, parameters)
+#define GET_MultiTexCoord4ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4ivARB)
+#define SET_MultiTexCoord4ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4ivARB, fn)
+#define CALL_MultiTexCoord4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort, GLshort, GLshort)), _gloffset_MultiTexCoord4sARB, parameters)
+#define GET_MultiTexCoord4sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4sARB)
+#define SET_MultiTexCoord4sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4sARB, fn)
+#define CALL_MultiTexCoord4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord4svARB, parameters)
+#define GET_MultiTexCoord4svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4svARB)
+#define SET_MultiTexCoord4svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4svARB, fn)
+#define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_AttachShader, parameters)
+#define GET_AttachShader(disp) GET_by_offset(disp, _gloffset_AttachShader)
+#define SET_AttachShader(disp, fn) SET_by_offset(disp, _gloffset_AttachShader, fn)
+#define CALL_CreateProgram(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(void)), _gloffset_CreateProgram, parameters)
+#define GET_CreateProgram(disp) GET_by_offset(disp, _gloffset_CreateProgram)
+#define SET_CreateProgram(disp, fn) SET_by_offset(disp, _gloffset_CreateProgram, fn)
+#define CALL_CreateShader(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum)), _gloffset_CreateShader, parameters)
+#define GET_CreateShader(disp) GET_by_offset(disp, _gloffset_CreateShader)
+#define SET_CreateShader(disp, fn) SET_by_offset(disp, _gloffset_CreateShader, fn)
+#define CALL_DeleteProgram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteProgram, parameters)
+#define GET_DeleteProgram(disp) GET_by_offset(disp, _gloffset_DeleteProgram)
+#define SET_DeleteProgram(disp, fn) SET_by_offset(disp, _gloffset_DeleteProgram, fn)
+#define CALL_DeleteShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteShader, parameters)
+#define GET_DeleteShader(disp) GET_by_offset(disp, _gloffset_DeleteShader)
+#define SET_DeleteShader(disp, fn) SET_by_offset(disp, _gloffset_DeleteShader, fn)
+#define CALL_DetachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_DetachShader, parameters)
+#define GET_DetachShader(disp) GET_by_offset(disp, _gloffset_DetachShader)
+#define SET_DetachShader(disp, fn) SET_by_offset(disp, _gloffset_DetachShader, fn)
+#define CALL_GetAttachedShaders(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLuint *)), _gloffset_GetAttachedShaders, parameters)
+#define GET_GetAttachedShaders(disp) GET_by_offset(disp, _gloffset_GetAttachedShaders)
+#define SET_GetAttachedShaders(disp, fn) SET_by_offset(disp, _gloffset_GetAttachedShaders, fn)
+#define CALL_GetProgramInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), _gloffset_GetProgramInfoLog, parameters)
+#define GET_GetProgramInfoLog(disp) GET_by_offset(disp, _gloffset_GetProgramInfoLog)
+#define SET_GetProgramInfoLog(disp, fn) SET_by_offset(disp, _gloffset_GetProgramInfoLog, fn)
+#define CALL_GetProgramiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetProgramiv, parameters)
+#define GET_GetProgramiv(disp) GET_by_offset(disp, _gloffset_GetProgramiv)
+#define SET_GetProgramiv(disp, fn) SET_by_offset(disp, _gloffset_GetProgramiv, fn)
+#define CALL_GetShaderInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), _gloffset_GetShaderInfoLog, parameters)
+#define GET_GetShaderInfoLog(disp) GET_by_offset(disp, _gloffset_GetShaderInfoLog)
+#define SET_GetShaderInfoLog(disp, fn) SET_by_offset(disp, _gloffset_GetShaderInfoLog, fn)
+#define CALL_GetShaderiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetShaderiv, parameters)
+#define GET_GetShaderiv(disp) GET_by_offset(disp, _gloffset_GetShaderiv)
+#define SET_GetShaderiv(disp, fn) SET_by_offset(disp, _gloffset_GetShaderiv, fn)
+#define CALL_IsProgram(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsProgram, parameters)
+#define GET_IsProgram(disp) GET_by_offset(disp, _gloffset_IsProgram)
+#define SET_IsProgram(disp, fn) SET_by_offset(disp, _gloffset_IsProgram, fn)
+#define CALL_IsShader(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsShader, parameters)
+#define GET_IsShader(disp) GET_by_offset(disp, _gloffset_IsShader)
+#define SET_IsShader(disp, fn) SET_by_offset(disp, _gloffset_IsShader, fn)
+#define CALL_StencilFuncSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), _gloffset_StencilFuncSeparate, parameters)
+#define GET_StencilFuncSeparate(disp) GET_by_offset(disp, _gloffset_StencilFuncSeparate)
+#define SET_StencilFuncSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilFuncSeparate, fn)
+#define CALL_StencilMaskSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_StencilMaskSeparate, parameters)
+#define GET_StencilMaskSeparate(disp) GET_by_offset(disp, _gloffset_StencilMaskSeparate)
+#define SET_StencilMaskSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilMaskSeparate, fn)
+#define CALL_StencilOpSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_StencilOpSeparate, parameters)
+#define GET_StencilOpSeparate(disp) GET_by_offset(disp, _gloffset_StencilOpSeparate)
+#define SET_StencilOpSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilOpSeparate, fn)
+#define CALL_UniformMatrix2x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2x3fv, parameters)
+#define GET_UniformMatrix2x3fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix2x3fv)
+#define SET_UniformMatrix2x3fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2x3fv, fn)
+#define CALL_UniformMatrix2x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2x4fv, parameters)
+#define GET_UniformMatrix2x4fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix2x4fv)
+#define SET_UniformMatrix2x4fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2x4fv, fn)
+#define CALL_UniformMatrix3x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3x2fv, parameters)
+#define GET_UniformMatrix3x2fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix3x2fv)
+#define SET_UniformMatrix3x2fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3x2fv, fn)
+#define CALL_UniformMatrix3x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3x4fv, parameters)
+#define GET_UniformMatrix3x4fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix3x4fv)
+#define SET_UniformMatrix3x4fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3x4fv, fn)
+#define CALL_UniformMatrix4x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4x2fv, parameters)
+#define GET_UniformMatrix4x2fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix4x2fv)
+#define SET_UniformMatrix4x2fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4x2fv, fn)
+#define CALL_UniformMatrix4x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4x3fv, parameters)
+#define GET_UniformMatrix4x3fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix4x3fv)
+#define SET_UniformMatrix4x3fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4x3fv, fn)
+#define CALL_ClampColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ClampColor, parameters)
+#define GET_ClampColor(disp) GET_by_offset(disp, _gloffset_ClampColor)
+#define SET_ClampColor(disp, fn) SET_by_offset(disp, _gloffset_ClampColor, fn)
+#define CALL_ClearBufferfi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLfloat, GLint)), _gloffset_ClearBufferfi, parameters)
+#define GET_ClearBufferfi(disp) GET_by_offset(disp, _gloffset_ClearBufferfi)
+#define SET_ClearBufferfi(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferfi, fn)
+#define CALL_ClearBufferfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLfloat *)), _gloffset_ClearBufferfv, parameters)
+#define GET_ClearBufferfv(disp) GET_by_offset(disp, _gloffset_ClearBufferfv)
+#define SET_ClearBufferfv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferfv, fn)
+#define CALL_ClearBufferiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLint *)), _gloffset_ClearBufferiv, parameters)
+#define GET_ClearBufferiv(disp) GET_by_offset(disp, _gloffset_ClearBufferiv)
+#define SET_ClearBufferiv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferiv, fn)
+#define CALL_ClearBufferuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLuint *)), _gloffset_ClearBufferuiv, parameters)
+#define GET_ClearBufferuiv(disp) GET_by_offset(disp, _gloffset_ClearBufferuiv)
+#define SET_ClearBufferuiv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferuiv, fn)
+#define CALL_GetStringi(disp, parameters) CALL_by_offset(disp, (const GLubyte * (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_GetStringi, parameters)
+#define GET_GetStringi(disp) GET_by_offset(disp, _gloffset_GetStringi)
+#define SET_GetStringi(disp, fn) SET_by_offset(disp, _gloffset_GetStringi, fn)
+#define CALL_TexBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint)), _gloffset_TexBuffer, parameters)
+#define GET_TexBuffer(disp) GET_by_offset(disp, _gloffset_TexBuffer)
+#define SET_TexBuffer(disp, fn) SET_by_offset(disp, _gloffset_TexBuffer, fn)
+#define CALL_FramebufferTexture(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture, parameters)
+#define GET_FramebufferTexture(disp) GET_by_offset(disp, _gloffset_FramebufferTexture)
+#define SET_FramebufferTexture(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture, fn)
+#define CALL_GetBufferParameteri64v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint64 *)), _gloffset_GetBufferParameteri64v, parameters)
+#define GET_GetBufferParameteri64v(disp) GET_by_offset(disp, _gloffset_GetBufferParameteri64v)
+#define SET_GetBufferParameteri64v(disp, fn) SET_by_offset(disp, _gloffset_GetBufferParameteri64v, fn)
+#define CALL_GetInteger64i_v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint64 *)), _gloffset_GetInteger64i_v, parameters)
+#define GET_GetInteger64i_v(disp) GET_by_offset(disp, _gloffset_GetInteger64i_v)
+#define SET_GetInteger64i_v(disp, fn) SET_by_offset(disp, _gloffset_GetInteger64i_v, fn)
+#define CALL_VertexAttribDivisor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribDivisor, parameters)
+#define GET_VertexAttribDivisor(disp) GET_by_offset(disp, _gloffset_VertexAttribDivisor)
+#define SET_VertexAttribDivisor(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribDivisor, fn)
+#define CALL_LoadTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_LoadTransposeMatrixdARB, parameters)
+#define GET_LoadTransposeMatrixdARB(disp) GET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB)
+#define SET_LoadTransposeMatrixdARB(disp, fn) SET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB, fn)
+#define CALL_LoadTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_LoadTransposeMatrixfARB, parameters)
+#define GET_LoadTransposeMatrixfARB(disp) GET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB)
+#define SET_LoadTransposeMatrixfARB(disp, fn) SET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB, fn)
+#define CALL_MultTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_MultTransposeMatrixdARB, parameters)
+#define GET_MultTransposeMatrixdARB(disp) GET_by_offset(disp, _gloffset_MultTransposeMatrixdARB)
+#define SET_MultTransposeMatrixdARB(disp, fn) SET_by_offset(disp, _gloffset_MultTransposeMatrixdARB, fn)
+#define CALL_MultTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_MultTransposeMatrixfARB, parameters)
+#define GET_MultTransposeMatrixfARB(disp) GET_by_offset(disp, _gloffset_MultTransposeMatrixfARB)
+#define SET_MultTransposeMatrixfARB(disp, fn) SET_by_offset(disp, _gloffset_MultTransposeMatrixfARB, fn)
+#define CALL_SampleCoverageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), _gloffset_SampleCoverageARB, parameters)
+#define GET_SampleCoverageARB(disp) GET_by_offset(disp, _gloffset_SampleCoverageARB)
+#define SET_SampleCoverageARB(disp, fn) SET_by_offset(disp, _gloffset_SampleCoverageARB, fn)
+#define CALL_CompressedTexImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage1DARB, parameters)
+#define GET_CompressedTexImage1DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage1DARB)
+#define SET_CompressedTexImage1DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage1DARB, fn)
+#define CALL_CompressedTexImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage2DARB, parameters)
+#define GET_CompressedTexImage2DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage2DARB)
+#define SET_CompressedTexImage2DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage2DARB, fn)
+#define CALL_CompressedTexImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage3DARB, parameters)
+#define GET_CompressedTexImage3DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage3DARB)
+#define SET_CompressedTexImage3DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage3DARB, fn)
+#define CALL_CompressedTexSubImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage1DARB, parameters)
+#define GET_CompressedTexSubImage1DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB)
+#define SET_CompressedTexSubImage1DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB, fn)
+#define CALL_CompressedTexSubImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage2DARB, parameters)
+#define GET_CompressedTexSubImage2DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB)
+#define SET_CompressedTexSubImage2DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB, fn)
+#define CALL_CompressedTexSubImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage3DARB, parameters)
+#define GET_CompressedTexSubImage3DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB)
+#define SET_CompressedTexSubImage3DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB, fn)
+#define CALL_GetCompressedTexImageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLvoid *)), _gloffset_GetCompressedTexImageARB, parameters)
+#define GET_GetCompressedTexImageARB(disp) GET_by_offset(disp, _gloffset_GetCompressedTexImageARB)
+#define SET_GetCompressedTexImageARB(disp, fn) SET_by_offset(disp, _gloffset_GetCompressedTexImageARB, fn)
+#define CALL_DisableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DisableVertexAttribArrayARB, parameters)
+#define GET_DisableVertexAttribArrayARB(disp) GET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB)
+#define SET_DisableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB, fn)
+#define CALL_EnableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_EnableVertexAttribArrayARB, parameters)
+#define GET_EnableVertexAttribArrayARB(disp) GET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB)
+#define SET_EnableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB, fn)
+#define CALL_GetProgramEnvParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), _gloffset_GetProgramEnvParameterdvARB, parameters)
+#define GET_GetProgramEnvParameterdvARB(disp) GET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB)
+#define SET_GetProgramEnvParameterdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB, fn)
+#define CALL_GetProgramEnvParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), _gloffset_GetProgramEnvParameterfvARB, parameters)
+#define GET_GetProgramEnvParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB)
+#define SET_GetProgramEnvParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB, fn)
+#define CALL_GetProgramLocalParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), _gloffset_GetProgramLocalParameterdvARB, parameters)
+#define GET_GetProgramLocalParameterdvARB(disp) GET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB)
+#define SET_GetProgramLocalParameterdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB, fn)
+#define CALL_GetProgramLocalParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), _gloffset_GetProgramLocalParameterfvARB, parameters)
+#define GET_GetProgramLocalParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB)
+#define SET_GetProgramLocalParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB, fn)
+#define CALL_GetProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid *)), _gloffset_GetProgramStringARB, parameters)
+#define GET_GetProgramStringARB(disp) GET_by_offset(disp, _gloffset_GetProgramStringARB)
+#define SET_GetProgramStringARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramStringARB, fn)
+#define CALL_GetProgramivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetProgramivARB, parameters)
+#define GET_GetProgramivARB(disp) GET_by_offset(disp, _gloffset_GetProgramivARB)
+#define SET_GetProgramivARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramivARB, fn)
+#define CALL_GetVertexAttribdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), _gloffset_GetVertexAttribdvARB, parameters)
+#define GET_GetVertexAttribdvARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribdvARB)
+#define SET_GetVertexAttribdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribdvARB, fn)
+#define CALL_GetVertexAttribfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetVertexAttribfvARB, parameters)
+#define GET_GetVertexAttribfvARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribfvARB)
+#define SET_GetVertexAttribfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribfvARB, fn)
+#define CALL_GetVertexAttribivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribivARB, parameters)
+#define GET_GetVertexAttribivARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribivARB)
+#define SET_GetVertexAttribivARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribivARB, fn)
+#define CALL_ProgramEnvParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramEnvParameter4dARB, parameters)
+#define GET_ProgramEnvParameter4dARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB)
+#define SET_ProgramEnvParameter4dARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB, fn)
+#define CALL_ProgramEnvParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), _gloffset_ProgramEnvParameter4dvARB, parameters)
+#define GET_ProgramEnvParameter4dvARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB)
+#define SET_ProgramEnvParameter4dvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB, fn)
+#define CALL_ProgramEnvParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramEnvParameter4fARB, parameters)
+#define GET_ProgramEnvParameter4fARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB)
+#define SET_ProgramEnvParameter4fARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB, fn)
+#define CALL_ProgramEnvParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ProgramEnvParameter4fvARB, parameters)
+#define GET_ProgramEnvParameter4fvARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB)
+#define SET_ProgramEnvParameter4fvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB, fn)
+#define CALL_ProgramLocalParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramLocalParameter4dARB, parameters)
+#define GET_ProgramLocalParameter4dARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB)
+#define SET_ProgramLocalParameter4dARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB, fn)
+#define CALL_ProgramLocalParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), _gloffset_ProgramLocalParameter4dvARB, parameters)
+#define GET_ProgramLocalParameter4dvARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB)
+#define SET_ProgramLocalParameter4dvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB, fn)
+#define CALL_ProgramLocalParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramLocalParameter4fARB, parameters)
+#define GET_ProgramLocalParameter4fARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB)
+#define SET_ProgramLocalParameter4fARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB, fn)
+#define CALL_ProgramLocalParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ProgramLocalParameter4fvARB, parameters)
+#define GET_ProgramLocalParameter4fvARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB)
+#define SET_ProgramLocalParameter4fvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB, fn)
+#define CALL_ProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, const GLvoid *)), _gloffset_ProgramStringARB, parameters)
+#define GET_ProgramStringARB(disp) GET_by_offset(disp, _gloffset_ProgramStringARB)
+#define SET_ProgramStringARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramStringARB, fn)
+#define CALL_VertexAttrib1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), _gloffset_VertexAttrib1dARB, parameters)
+#define GET_VertexAttrib1dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dARB)
+#define SET_VertexAttrib1dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dARB, fn)
+#define CALL_VertexAttrib1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib1dvARB, parameters)
+#define GET_VertexAttrib1dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dvARB)
+#define SET_VertexAttrib1dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dvARB, fn)
+#define CALL_VertexAttrib1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), _gloffset_VertexAttrib1fARB, parameters)
+#define GET_VertexAttrib1fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fARB)
+#define SET_VertexAttrib1fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fARB, fn)
+#define CALL_VertexAttrib1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib1fvARB, parameters)
+#define GET_VertexAttrib1fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fvARB)
+#define SET_VertexAttrib1fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fvARB, fn)
+#define CALL_VertexAttrib1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), _gloffset_VertexAttrib1sARB, parameters)
+#define GET_VertexAttrib1sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1sARB)
+#define SET_VertexAttrib1sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1sARB, fn)
+#define CALL_VertexAttrib1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib1svARB, parameters)
+#define GET_VertexAttrib1svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1svARB)
+#define SET_VertexAttrib1svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1svARB, fn)
+#define CALL_VertexAttrib2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), _gloffset_VertexAttrib2dARB, parameters)
+#define GET_VertexAttrib2dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dARB)
+#define SET_VertexAttrib2dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dARB, fn)
+#define CALL_VertexAttrib2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib2dvARB, parameters)
+#define GET_VertexAttrib2dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dvARB)
+#define SET_VertexAttrib2dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dvARB, fn)
+#define CALL_VertexAttrib2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), _gloffset_VertexAttrib2fARB, parameters)
+#define GET_VertexAttrib2fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fARB)
+#define SET_VertexAttrib2fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fARB, fn)
+#define CALL_VertexAttrib2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib2fvARB, parameters)
+#define GET_VertexAttrib2fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fvARB)
+#define SET_VertexAttrib2fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fvARB, fn)
+#define CALL_VertexAttrib2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), _gloffset_VertexAttrib2sARB, parameters)
+#define GET_VertexAttrib2sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2sARB)
+#define SET_VertexAttrib2sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2sARB, fn)
+#define CALL_VertexAttrib2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib2svARB, parameters)
+#define GET_VertexAttrib2svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2svARB)
+#define SET_VertexAttrib2svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2svARB, fn)
+#define CALL_VertexAttrib3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib3dARB, parameters)
+#define GET_VertexAttrib3dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dARB)
+#define SET_VertexAttrib3dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dARB, fn)
+#define CALL_VertexAttrib3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib3dvARB, parameters)
+#define GET_VertexAttrib3dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dvARB)
+#define SET_VertexAttrib3dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dvARB, fn)
+#define CALL_VertexAttrib3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib3fARB, parameters)
+#define GET_VertexAttrib3fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fARB)
+#define SET_VertexAttrib3fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fARB, fn)
+#define CALL_VertexAttrib3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib3fvARB, parameters)
+#define GET_VertexAttrib3fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fvARB)
+#define SET_VertexAttrib3fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fvARB, fn)
+#define CALL_VertexAttrib3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib3sARB, parameters)
+#define GET_VertexAttrib3sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3sARB)
+#define SET_VertexAttrib3sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3sARB, fn)
+#define CALL_VertexAttrib3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib3svARB, parameters)
+#define GET_VertexAttrib3svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3svARB)
+#define SET_VertexAttrib3svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3svARB, fn)
+#define CALL_VertexAttrib4NbvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttrib4NbvARB, parameters)
+#define GET_VertexAttrib4NbvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NbvARB)
+#define SET_VertexAttrib4NbvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NbvARB, fn)
+#define CALL_VertexAttrib4NivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttrib4NivARB, parameters)
+#define GET_VertexAttrib4NivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NivARB)
+#define SET_VertexAttrib4NivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NivARB, fn)
+#define CALL_VertexAttrib4NsvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4NsvARB, parameters)
+#define GET_VertexAttrib4NsvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NsvARB)
+#define SET_VertexAttrib4NsvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NsvARB, fn)
+#define CALL_VertexAttrib4NubARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_VertexAttrib4NubARB, parameters)
+#define GET_VertexAttrib4NubARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NubARB)
+#define SET_VertexAttrib4NubARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NubARB, fn)
+#define CALL_VertexAttrib4NubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4NubvARB, parameters)
+#define GET_VertexAttrib4NubvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NubvARB)
+#define SET_VertexAttrib4NubvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NubvARB, fn)
+#define CALL_VertexAttrib4NuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttrib4NuivARB, parameters)
+#define GET_VertexAttrib4NuivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NuivARB)
+#define SET_VertexAttrib4NuivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NuivARB, fn)
+#define CALL_VertexAttrib4NusvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttrib4NusvARB, parameters)
+#define GET_VertexAttrib4NusvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NusvARB)
+#define SET_VertexAttrib4NusvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NusvARB, fn)
+#define CALL_VertexAttrib4bvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttrib4bvARB, parameters)
+#define GET_VertexAttrib4bvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4bvARB)
+#define SET_VertexAttrib4bvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4bvARB, fn)
+#define CALL_VertexAttrib4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib4dARB, parameters)
+#define GET_VertexAttrib4dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dARB)
+#define SET_VertexAttrib4dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dARB, fn)
+#define CALL_VertexAttrib4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib4dvARB, parameters)
+#define GET_VertexAttrib4dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dvARB)
+#define SET_VertexAttrib4dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dvARB, fn)
+#define CALL_VertexAttrib4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib4fARB, parameters)
+#define GET_VertexAttrib4fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fARB)
+#define SET_VertexAttrib4fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fARB, fn)
+#define CALL_VertexAttrib4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib4fvARB, parameters)
+#define GET_VertexAttrib4fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fvARB)
+#define SET_VertexAttrib4fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fvARB, fn)
+#define CALL_VertexAttrib4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttrib4ivARB, parameters)
+#define GET_VertexAttrib4ivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ivARB)
+#define SET_VertexAttrib4ivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ivARB, fn)
+#define CALL_VertexAttrib4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib4sARB, parameters)
+#define GET_VertexAttrib4sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4sARB)
+#define SET_VertexAttrib4sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4sARB, fn)
+#define CALL_VertexAttrib4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4svARB, parameters)
+#define GET_VertexAttrib4svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4svARB)
+#define SET_VertexAttrib4svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4svARB, fn)
+#define CALL_VertexAttrib4ubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4ubvARB, parameters)
+#define GET_VertexAttrib4ubvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubvARB)
+#define SET_VertexAttrib4ubvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubvARB, fn)
+#define CALL_VertexAttrib4uivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttrib4uivARB, parameters)
+#define GET_VertexAttrib4uivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4uivARB)
+#define SET_VertexAttrib4uivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4uivARB, fn)
+#define CALL_VertexAttrib4usvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttrib4usvARB, parameters)
+#define GET_VertexAttrib4usvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4usvARB)
+#define SET_VertexAttrib4usvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4usvARB, fn)
+#define CALL_VertexAttribPointerARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)), _gloffset_VertexAttribPointerARB, parameters)
+#define GET_VertexAttribPointerARB(disp) GET_by_offset(disp, _gloffset_VertexAttribPointerARB)
+#define SET_VertexAttribPointerARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribPointerARB, fn)
+#define CALL_BindBufferARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindBufferARB, parameters)
+#define GET_BindBufferARB(disp) GET_by_offset(disp, _gloffset_BindBufferARB)
+#define SET_BindBufferARB(disp, fn) SET_by_offset(disp, _gloffset_BindBufferARB, fn)
+#define CALL_BufferDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizeiptrARB, const GLvoid *, GLenum)), _gloffset_BufferDataARB, parameters)
+#define GET_BufferDataARB(disp) GET_by_offset(disp, _gloffset_BufferDataARB)
+#define SET_BufferDataARB(disp, fn) SET_by_offset(disp, _gloffset_BufferDataARB, fn)
+#define CALL_BufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *)), _gloffset_BufferSubDataARB, parameters)
+#define GET_BufferSubDataARB(disp) GET_by_offset(disp, _gloffset_BufferSubDataARB)
+#define SET_BufferSubDataARB(disp, fn) SET_by_offset(disp, _gloffset_BufferSubDataARB, fn)
+#define CALL_DeleteBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteBuffersARB, parameters)
+#define GET_DeleteBuffersARB(disp) GET_by_offset(disp, _gloffset_DeleteBuffersARB)
+#define SET_DeleteBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteBuffersARB, fn)
+#define CALL_GenBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenBuffersARB, parameters)
+#define GET_GenBuffersARB(disp) GET_by_offset(disp, _gloffset_GenBuffersARB)
+#define SET_GenBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_GenBuffersARB, fn)
+#define CALL_GetBufferParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetBufferParameterivARB, parameters)
+#define GET_GetBufferParameterivARB(disp) GET_by_offset(disp, _gloffset_GetBufferParameterivARB)
+#define SET_GetBufferParameterivARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferParameterivARB, fn)
+#define CALL_GetBufferPointervARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), _gloffset_GetBufferPointervARB, parameters)
+#define GET_GetBufferPointervARB(disp) GET_by_offset(disp, _gloffset_GetBufferPointervARB)
+#define SET_GetBufferPointervARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferPointervARB, fn)
+#define CALL_GetBufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *)), _gloffset_GetBufferSubDataARB, parameters)
+#define GET_GetBufferSubDataARB(disp) GET_by_offset(disp, _gloffset_GetBufferSubDataARB)
+#define SET_GetBufferSubDataARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferSubDataARB, fn)
+#define CALL_IsBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsBufferARB, parameters)
+#define GET_IsBufferARB(disp) GET_by_offset(disp, _gloffset_IsBufferARB)
+#define SET_IsBufferARB(disp, fn) SET_by_offset(disp, _gloffset_IsBufferARB, fn)
+#define CALL_MapBufferARB(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_MapBufferARB, parameters)
+#define GET_MapBufferARB(disp) GET_by_offset(disp, _gloffset_MapBufferARB)
+#define SET_MapBufferARB(disp, fn) SET_by_offset(disp, _gloffset_MapBufferARB, fn)
+#define CALL_UnmapBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), _gloffset_UnmapBufferARB, parameters)
+#define GET_UnmapBufferARB(disp) GET_by_offset(disp, _gloffset_UnmapBufferARB)
+#define SET_UnmapBufferARB(disp, fn) SET_by_offset(disp, _gloffset_UnmapBufferARB, fn)
+#define CALL_BeginQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BeginQueryARB, parameters)
+#define GET_BeginQueryARB(disp) GET_by_offset(disp, _gloffset_BeginQueryARB)
+#define SET_BeginQueryARB(disp, fn) SET_by_offset(disp, _gloffset_BeginQueryARB, fn)
+#define CALL_DeleteQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteQueriesARB, parameters)
+#define GET_DeleteQueriesARB(disp) GET_by_offset(disp, _gloffset_DeleteQueriesARB)
+#define SET_DeleteQueriesARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteQueriesARB, fn)
+#define CALL_EndQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_EndQueryARB, parameters)
+#define GET_EndQueryARB(disp) GET_by_offset(disp, _gloffset_EndQueryARB)
+#define SET_EndQueryARB(disp, fn) SET_by_offset(disp, _gloffset_EndQueryARB, fn)
+#define CALL_GenQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenQueriesARB, parameters)
+#define GET_GenQueriesARB(disp) GET_by_offset(disp, _gloffset_GenQueriesARB)
+#define SET_GenQueriesARB(disp, fn) SET_by_offset(disp, _gloffset_GenQueriesARB, fn)
+#define CALL_GetQueryObjectivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetQueryObjectivARB, parameters)
+#define GET_GetQueryObjectivARB(disp) GET_by_offset(disp, _gloffset_GetQueryObjectivARB)
+#define SET_GetQueryObjectivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectivARB, fn)
+#define CALL_GetQueryObjectuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetQueryObjectuivARB, parameters)
+#define GET_GetQueryObjectuivARB(disp) GET_by_offset(disp, _gloffset_GetQueryObjectuivARB)
+#define SET_GetQueryObjectuivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectuivARB, fn)
+#define CALL_GetQueryivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetQueryivARB, parameters)
+#define GET_GetQueryivARB(disp) GET_by_offset(disp, _gloffset_GetQueryivARB)
+#define SET_GetQueryivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryivARB, fn)
+#define CALL_IsQueryARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsQueryARB, parameters)
+#define GET_IsQueryARB(disp) GET_by_offset(disp, _gloffset_IsQueryARB)
+#define SET_IsQueryARB(disp, fn) SET_by_offset(disp, _gloffset_IsQueryARB, fn)
+#define CALL_AttachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), _gloffset_AttachObjectARB, parameters)
+#define GET_AttachObjectARB(disp) GET_by_offset(disp, _gloffset_AttachObjectARB)
+#define SET_AttachObjectARB(disp, fn) SET_by_offset(disp, _gloffset_AttachObjectARB, fn)
+#define CALL_CompileShaderARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_CompileShaderARB, parameters)
+#define GET_CompileShaderARB(disp) GET_by_offset(disp, _gloffset_CompileShaderARB)
+#define SET_CompileShaderARB(disp, fn) SET_by_offset(disp, _gloffset_CompileShaderARB, fn)
+#define CALL_CreateProgramObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(void)), _gloffset_CreateProgramObjectARB, parameters)
+#define GET_CreateProgramObjectARB(disp) GET_by_offset(disp, _gloffset_CreateProgramObjectARB)
+#define SET_CreateProgramObjectARB(disp, fn) SET_by_offset(disp, _gloffset_CreateProgramObjectARB, fn)
+#define CALL_CreateShaderObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), _gloffset_CreateShaderObjectARB, parameters)
+#define GET_CreateShaderObjectARB(disp) GET_by_offset(disp, _gloffset_CreateShaderObjectARB)
+#define SET_CreateShaderObjectARB(disp, fn) SET_by_offset(disp, _gloffset_CreateShaderObjectARB, fn)
+#define CALL_DeleteObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_DeleteObjectARB, parameters)
+#define GET_DeleteObjectARB(disp) GET_by_offset(disp, _gloffset_DeleteObjectARB)
+#define SET_DeleteObjectARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteObjectARB, fn)
+#define CALL_DetachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), _gloffset_DetachObjectARB, parameters)
+#define GET_DetachObjectARB(disp) GET_by_offset(disp, _gloffset_DetachObjectARB)
+#define SET_DetachObjectARB(disp, fn) SET_by_offset(disp, _gloffset_DetachObjectARB, fn)
+#define CALL_GetActiveUniformARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), _gloffset_GetActiveUniformARB, parameters)
+#define GET_GetActiveUniformARB(disp) GET_by_offset(disp, _gloffset_GetActiveUniformARB)
+#define SET_GetActiveUniformARB(disp, fn) SET_by_offset(disp, _gloffset_GetActiveUniformARB, fn)
+#define CALL_GetAttachedObjectsARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *)), _gloffset_GetAttachedObjectsARB, parameters)
+#define GET_GetAttachedObjectsARB(disp) GET_by_offset(disp, _gloffset_GetAttachedObjectsARB)
+#define SET_GetAttachedObjectsARB(disp, fn) SET_by_offset(disp, _gloffset_GetAttachedObjectsARB, fn)
+#define CALL_GetHandleARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), _gloffset_GetHandleARB, parameters)
+#define GET_GetHandleARB(disp) GET_by_offset(disp, _gloffset_GetHandleARB)
+#define SET_GetHandleARB(disp, fn) SET_by_offset(disp, _gloffset_GetHandleARB, fn)
+#define CALL_GetInfoLogARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), _gloffset_GetInfoLogARB, parameters)
+#define GET_GetInfoLogARB(disp) GET_by_offset(disp, _gloffset_GetInfoLogARB)
+#define SET_GetInfoLogARB(disp, fn) SET_by_offset(disp, _gloffset_GetInfoLogARB, fn)
+#define CALL_GetObjectParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLfloat *)), _gloffset_GetObjectParameterfvARB, parameters)
+#define GET_GetObjectParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetObjectParameterfvARB)
+#define SET_GetObjectParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterfvARB, fn)
+#define CALL_GetObjectParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLint *)), _gloffset_GetObjectParameterivARB, parameters)
+#define GET_GetObjectParameterivARB(disp) GET_by_offset(disp, _gloffset_GetObjectParameterivARB)
+#define SET_GetObjectParameterivARB(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterivARB, fn)
+#define CALL_GetShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), _gloffset_GetShaderSourceARB, parameters)
+#define GET_GetShaderSourceARB(disp) GET_by_offset(disp, _gloffset_GetShaderSourceARB)
+#define SET_GetShaderSourceARB(disp, fn) SET_by_offset(disp, _gloffset_GetShaderSourceARB, fn)
+#define CALL_GetUniformLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), _gloffset_GetUniformLocationARB, parameters)
+#define GET_GetUniformLocationARB(disp) GET_by_offset(disp, _gloffset_GetUniformLocationARB)
+#define SET_GetUniformLocationARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformLocationARB, fn)
+#define CALL_GetUniformfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLfloat *)), _gloffset_GetUniformfvARB, parameters)
+#define GET_GetUniformfvARB(disp) GET_by_offset(disp, _gloffset_GetUniformfvARB)
+#define SET_GetUniformfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformfvARB, fn)
+#define CALL_GetUniformivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLint *)), _gloffset_GetUniformivARB, parameters)
+#define GET_GetUniformivARB(disp) GET_by_offset(disp, _gloffset_GetUniformivARB)
+#define SET_GetUniformivARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformivARB, fn)
+#define CALL_LinkProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_LinkProgramARB, parameters)
+#define GET_LinkProgramARB(disp) GET_by_offset(disp, _gloffset_LinkProgramARB)
+#define SET_LinkProgramARB(disp, fn) SET_by_offset(disp, _gloffset_LinkProgramARB, fn)
+#define CALL_ShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *)), _gloffset_ShaderSourceARB, parameters)
+#define GET_ShaderSourceARB(disp) GET_by_offset(disp, _gloffset_ShaderSourceARB)
+#define SET_ShaderSourceARB(disp, fn) SET_by_offset(disp, _gloffset_ShaderSourceARB, fn)
+#define CALL_Uniform1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat)), _gloffset_Uniform1fARB, parameters)
+#define GET_Uniform1fARB(disp) GET_by_offset(disp, _gloffset_Uniform1fARB)
+#define SET_Uniform1fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1fARB, fn)
+#define CALL_Uniform1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform1fvARB, parameters)
+#define GET_Uniform1fvARB(disp) GET_by_offset(disp, _gloffset_Uniform1fvARB)
+#define SET_Uniform1fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1fvARB, fn)
+#define CALL_Uniform1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_Uniform1iARB, parameters)
+#define GET_Uniform1iARB(disp) GET_by_offset(disp, _gloffset_Uniform1iARB)
+#define SET_Uniform1iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1iARB, fn)
+#define CALL_Uniform1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform1ivARB, parameters)
+#define GET_Uniform1ivARB(disp) GET_by_offset(disp, _gloffset_Uniform1ivARB)
+#define SET_Uniform1ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1ivARB, fn)
+#define CALL_Uniform2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), _gloffset_Uniform2fARB, parameters)
+#define GET_Uniform2fARB(disp) GET_by_offset(disp, _gloffset_Uniform2fARB)
+#define SET_Uniform2fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2fARB, fn)
+#define CALL_Uniform2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform2fvARB, parameters)
+#define GET_Uniform2fvARB(disp) GET_by_offset(disp, _gloffset_Uniform2fvARB)
+#define SET_Uniform2fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2fvARB, fn)
+#define CALL_Uniform2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Uniform2iARB, parameters)
+#define GET_Uniform2iARB(disp) GET_by_offset(disp, _gloffset_Uniform2iARB)
+#define SET_Uniform2iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2iARB, fn)
+#define CALL_Uniform2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform2ivARB, parameters)
+#define GET_Uniform2ivARB(disp) GET_by_offset(disp, _gloffset_Uniform2ivARB)
+#define SET_Uniform2ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2ivARB, fn)
+#define CALL_Uniform3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat)), _gloffset_Uniform3fARB, parameters)
+#define GET_Uniform3fARB(disp) GET_by_offset(disp, _gloffset_Uniform3fARB)
+#define SET_Uniform3fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3fARB, fn)
+#define CALL_Uniform3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform3fvARB, parameters)
+#define GET_Uniform3fvARB(disp) GET_by_offset(disp, _gloffset_Uniform3fvARB)
+#define SET_Uniform3fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3fvARB, fn)
+#define CALL_Uniform3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Uniform3iARB, parameters)
+#define GET_Uniform3iARB(disp) GET_by_offset(disp, _gloffset_Uniform3iARB)
+#define SET_Uniform3iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3iARB, fn)
+#define CALL_Uniform3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform3ivARB, parameters)
+#define GET_Uniform3ivARB(disp) GET_by_offset(disp, _gloffset_Uniform3ivARB)
+#define SET_Uniform3ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3ivARB, fn)
+#define CALL_Uniform4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Uniform4fARB, parameters)
+#define GET_Uniform4fARB(disp) GET_by_offset(disp, _gloffset_Uniform4fARB)
+#define SET_Uniform4fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4fARB, fn)
+#define CALL_Uniform4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform4fvARB, parameters)
+#define GET_Uniform4fvARB(disp) GET_by_offset(disp, _gloffset_Uniform4fvARB)
+#define SET_Uniform4fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4fvARB, fn)
+#define CALL_Uniform4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint)), _gloffset_Uniform4iARB, parameters)
+#define GET_Uniform4iARB(disp) GET_by_offset(disp, _gloffset_Uniform4iARB)
+#define SET_Uniform4iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4iARB, fn)
+#define CALL_Uniform4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform4ivARB, parameters)
+#define GET_Uniform4ivARB(disp) GET_by_offset(disp, _gloffset_Uniform4ivARB)
+#define SET_Uniform4ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4ivARB, fn)
+#define CALL_UniformMatrix2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2fvARB, parameters)
+#define GET_UniformMatrix2fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix2fvARB)
+#define SET_UniformMatrix2fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2fvARB, fn)
+#define CALL_UniformMatrix3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3fvARB, parameters)
+#define GET_UniformMatrix3fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix3fvARB)
+#define SET_UniformMatrix3fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3fvARB, fn)
+#define CALL_UniformMatrix4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4fvARB, parameters)
+#define GET_UniformMatrix4fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix4fvARB)
+#define SET_UniformMatrix4fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4fvARB, fn)
+#define CALL_UseProgramObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_UseProgramObjectARB, parameters)
+#define GET_UseProgramObjectARB(disp) GET_by_offset(disp, _gloffset_UseProgramObjectARB)
+#define SET_UseProgramObjectARB(disp, fn) SET_by_offset(disp, _gloffset_UseProgramObjectARB, fn)
+#define CALL_ValidateProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_ValidateProgramARB, parameters)
+#define GET_ValidateProgramARB(disp) GET_by_offset(disp, _gloffset_ValidateProgramARB)
+#define SET_ValidateProgramARB(disp, fn) SET_by_offset(disp, _gloffset_ValidateProgramARB, fn)
+#define CALL_BindAttribLocationARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, const GLcharARB *)), _gloffset_BindAttribLocationARB, parameters)
+#define GET_BindAttribLocationARB(disp) GET_by_offset(disp, _gloffset_BindAttribLocationARB)
+#define SET_BindAttribLocationARB(disp, fn) SET_by_offset(disp, _gloffset_BindAttribLocationARB, fn)
+#define CALL_GetActiveAttribARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), _gloffset_GetActiveAttribARB, parameters)
+#define GET_GetActiveAttribARB(disp) GET_by_offset(disp, _gloffset_GetActiveAttribARB)
+#define SET_GetActiveAttribARB(disp, fn) SET_by_offset(disp, _gloffset_GetActiveAttribARB, fn)
+#define CALL_GetAttribLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), _gloffset_GetAttribLocationARB, parameters)
+#define GET_GetAttribLocationARB(disp) GET_by_offset(disp, _gloffset_GetAttribLocationARB)
+#define SET_GetAttribLocationARB(disp, fn) SET_by_offset(disp, _gloffset_GetAttribLocationARB, fn)
+#define CALL_DrawBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLenum *)), _gloffset_DrawBuffersARB, parameters)
+#define GET_DrawBuffersARB(disp) GET_by_offset(disp, _gloffset_DrawBuffersARB)
+#define SET_DrawBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_DrawBuffersARB, fn)
+#define CALL_ClampColorARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ClampColorARB, parameters)
+#define GET_ClampColorARB(disp) GET_by_offset(disp, _gloffset_ClampColorARB)
+#define SET_ClampColorARB(disp, fn) SET_by_offset(disp, _gloffset_ClampColorARB, fn)
+#define CALL_DrawArraysInstancedARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei, GLsizei)), _gloffset_DrawArraysInstancedARB, parameters)
+#define GET_DrawArraysInstancedARB(disp) GET_by_offset(disp, _gloffset_DrawArraysInstancedARB)
+#define SET_DrawArraysInstancedARB(disp, fn) SET_by_offset(disp, _gloffset_DrawArraysInstancedARB, fn)
+#define CALL_DrawElementsInstancedARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei)), _gloffset_DrawElementsInstancedARB, parameters)
+#define GET_DrawElementsInstancedARB(disp) GET_by_offset(disp, _gloffset_DrawElementsInstancedARB)
+#define SET_DrawElementsInstancedARB(disp, fn) SET_by_offset(disp, _gloffset_DrawElementsInstancedARB, fn)
+#define CALL_RenderbufferStorageMultisample(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, GLsizei, GLsizei)), _gloffset_RenderbufferStorageMultisample, parameters)
+#define GET_RenderbufferStorageMultisample(disp) GET_by_offset(disp, _gloffset_RenderbufferStorageMultisample)
+#define SET_RenderbufferStorageMultisample(disp, fn) SET_by_offset(disp, _gloffset_RenderbufferStorageMultisample, fn)
+#define CALL_FramebufferTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTextureARB, parameters)
+#define GET_FramebufferTextureARB(disp) GET_by_offset(disp, _gloffset_FramebufferTextureARB)
+#define SET_FramebufferTextureARB(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureARB, fn)
+#define CALL_FramebufferTextureFaceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLenum)), _gloffset_FramebufferTextureFaceARB, parameters)
+#define GET_FramebufferTextureFaceARB(disp) GET_by_offset(disp, _gloffset_FramebufferTextureFaceARB)
+#define SET_FramebufferTextureFaceARB(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureFaceARB, fn)
+#define CALL_ProgramParameteriARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint)), _gloffset_ProgramParameteriARB, parameters)
+#define GET_ProgramParameteriARB(disp) GET_by_offset(disp, _gloffset_ProgramParameteriARB)
+#define SET_ProgramParameteriARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameteriARB, fn)
+#define CALL_VertexAttribDivisorARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribDivisorARB, parameters)
+#define GET_VertexAttribDivisorARB(disp) GET_by_offset(disp, _gloffset_VertexAttribDivisorARB)
+#define SET_VertexAttribDivisorARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribDivisorARB, fn)
+#define CALL_FlushMappedBufferRange(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr)), _gloffset_FlushMappedBufferRange, parameters)
+#define GET_FlushMappedBufferRange(disp) GET_by_offset(disp, _gloffset_FlushMappedBufferRange)
+#define SET_FlushMappedBufferRange(disp, fn) SET_by_offset(disp, _gloffset_FlushMappedBufferRange, fn)
+#define CALL_MapBufferRange(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr, GLbitfield)), _gloffset_MapBufferRange, parameters)
+#define GET_MapBufferRange(disp) GET_by_offset(disp, _gloffset_MapBufferRange)
+#define SET_MapBufferRange(disp, fn) SET_by_offset(disp, _gloffset_MapBufferRange, fn)
+#define CALL_TexBufferARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint)), _gloffset_TexBufferARB, parameters)
+#define GET_TexBufferARB(disp) GET_by_offset(disp, _gloffset_TexBufferARB)
+#define SET_TexBufferARB(disp, fn) SET_by_offset(disp, _gloffset_TexBufferARB, fn)
+#define CALL_BindVertexArray(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindVertexArray, parameters)
+#define GET_BindVertexArray(disp) GET_by_offset(disp, _gloffset_BindVertexArray)
+#define SET_BindVertexArray(disp, fn) SET_by_offset(disp, _gloffset_BindVertexArray, fn)
+#define CALL_GenVertexArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenVertexArrays, parameters)
+#define GET_GenVertexArrays(disp) GET_by_offset(disp, _gloffset_GenVertexArrays)
+#define SET_GenVertexArrays(disp, fn) SET_by_offset(disp, _gloffset_GenVertexArrays, fn)
+#define CALL_CopyBufferSubData(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr)), _gloffset_CopyBufferSubData, parameters)
+#define GET_CopyBufferSubData(disp) GET_by_offset(disp, _gloffset_CopyBufferSubData)
+#define SET_CopyBufferSubData(disp, fn) SET_by_offset(disp, _gloffset_CopyBufferSubData, fn)
+#define CALL_ClientWaitSync(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLsync, GLbitfield, GLuint64)), _gloffset_ClientWaitSync, parameters)
+#define GET_ClientWaitSync(disp) GET_by_offset(disp, _gloffset_ClientWaitSync)
+#define SET_ClientWaitSync(disp, fn) SET_by_offset(disp, _gloffset_ClientWaitSync, fn)
+#define CALL_DeleteSync(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync)), _gloffset_DeleteSync, parameters)
+#define GET_DeleteSync(disp) GET_by_offset(disp, _gloffset_DeleteSync)
+#define SET_DeleteSync(disp, fn) SET_by_offset(disp, _gloffset_DeleteSync, fn)
+#define CALL_FenceSync(disp, parameters) CALL_by_offset(disp, (GLsync (GLAPIENTRYP)(GLenum, GLbitfield)), _gloffset_FenceSync, parameters)
+#define GET_FenceSync(disp) GET_by_offset(disp, _gloffset_FenceSync)
+#define SET_FenceSync(disp, fn) SET_by_offset(disp, _gloffset_FenceSync, fn)
+#define CALL_GetInteger64v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint64 *)), _gloffset_GetInteger64v, parameters)
+#define GET_GetInteger64v(disp) GET_by_offset(disp, _gloffset_GetInteger64v)
+#define SET_GetInteger64v(disp, fn) SET_by_offset(disp, _gloffset_GetInteger64v, fn)
+#define CALL_GetSynciv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync, GLenum, GLsizei, GLsizei *, GLint *)), _gloffset_GetSynciv, parameters)
+#define GET_GetSynciv(disp) GET_by_offset(disp, _gloffset_GetSynciv)
+#define SET_GetSynciv(disp, fn) SET_by_offset(disp, _gloffset_GetSynciv, fn)
+#define CALL_IsSync(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsync)), _gloffset_IsSync, parameters)
+#define GET_IsSync(disp) GET_by_offset(disp, _gloffset_IsSync)
+#define SET_IsSync(disp, fn) SET_by_offset(disp, _gloffset_IsSync, fn)
+#define CALL_WaitSync(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync, GLbitfield, GLuint64)), _gloffset_WaitSync, parameters)
+#define GET_WaitSync(disp) GET_by_offset(disp, _gloffset_WaitSync)
+#define SET_WaitSync(disp, fn) SET_by_offset(disp, _gloffset_WaitSync, fn)
+#define CALL_DrawElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *, GLint)), _gloffset_DrawElementsBaseVertex, parameters)
+#define GET_DrawElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_DrawElementsBaseVertex)
+#define SET_DrawElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_DrawElementsBaseVertex, fn)
+#define CALL_DrawRangeElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *, GLint)), _gloffset_DrawRangeElementsBaseVertex, parameters)
+#define GET_DrawRangeElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex)
+#define SET_DrawRangeElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex, fn)
+#define CALL_MultiDrawElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *)), _gloffset_MultiDrawElementsBaseVertex, parameters)
+#define GET_MultiDrawElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex)
+#define SET_MultiDrawElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex, fn)
+#define CALL_BlendEquationSeparateiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum)), _gloffset_BlendEquationSeparateiARB, parameters)
+#define GET_BlendEquationSeparateiARB(disp) GET_by_offset(disp, _gloffset_BlendEquationSeparateiARB)
+#define SET_BlendEquationSeparateiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationSeparateiARB, fn)
+#define CALL_BlendEquationiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_BlendEquationiARB, parameters)
+#define GET_BlendEquationiARB(disp) GET_by_offset(disp, _gloffset_BlendEquationiARB)
+#define SET_BlendEquationiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationiARB, fn)
+#define CALL_BlendFuncSeparateiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum, GLenum, GLenum)), _gloffset_BlendFuncSeparateiARB, parameters)
+#define GET_BlendFuncSeparateiARB(disp) GET_by_offset(disp, _gloffset_BlendFuncSeparateiARB)
+#define SET_BlendFuncSeparateiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendFuncSeparateiARB, fn)
+#define CALL_BlendFunciARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum)), _gloffset_BlendFunciARB, parameters)
+#define GET_BlendFunciARB(disp) GET_by_offset(disp, _gloffset_BlendFunciARB)
+#define SET_BlendFunciARB(disp, fn) SET_by_offset(disp, _gloffset_BlendFunciARB, fn)
+#define CALL_BindTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindTransformFeedback, parameters)
+#define GET_BindTransformFeedback(disp) GET_by_offset(disp, _gloffset_BindTransformFeedback)
+#define SET_BindTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_BindTransformFeedback, fn)
+#define CALL_DeleteTransformFeedbacks(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteTransformFeedbacks, parameters)
+#define GET_DeleteTransformFeedbacks(disp) GET_by_offset(disp, _gloffset_DeleteTransformFeedbacks)
+#define SET_DeleteTransformFeedbacks(disp, fn) SET_by_offset(disp, _gloffset_DeleteTransformFeedbacks, fn)
+#define CALL_DrawTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_DrawTransformFeedback, parameters)
+#define GET_DrawTransformFeedback(disp) GET_by_offset(disp, _gloffset_DrawTransformFeedback)
+#define SET_DrawTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_DrawTransformFeedback, fn)
+#define CALL_GenTransformFeedbacks(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenTransformFeedbacks, parameters)
+#define GET_GenTransformFeedbacks(disp) GET_by_offset(disp, _gloffset_GenTransformFeedbacks)
+#define SET_GenTransformFeedbacks(disp, fn) SET_by_offset(disp, _gloffset_GenTransformFeedbacks, fn)
+#define CALL_IsTransformFeedback(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsTransformFeedback, parameters)
+#define GET_IsTransformFeedback(disp) GET_by_offset(disp, _gloffset_IsTransformFeedback)
+#define SET_IsTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_IsTransformFeedback, fn)
+#define CALL_PauseTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PauseTransformFeedback, parameters)
+#define GET_PauseTransformFeedback(disp) GET_by_offset(disp, _gloffset_PauseTransformFeedback)
+#define SET_PauseTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_PauseTransformFeedback, fn)
+#define CALL_ResumeTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ResumeTransformFeedback, parameters)
+#define GET_ResumeTransformFeedback(disp) GET_by_offset(disp, _gloffset_ResumeTransformFeedback)
+#define SET_ResumeTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_ResumeTransformFeedback, fn)
+#define CALL_ClearDepthf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf)), _gloffset_ClearDepthf, parameters)
+#define GET_ClearDepthf(disp) GET_by_offset(disp, _gloffset_ClearDepthf)
+#define SET_ClearDepthf(disp, fn) SET_by_offset(disp, _gloffset_ClearDepthf, fn)
+#define CALL_DepthRangef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf)), _gloffset_DepthRangef, parameters)
+#define GET_DepthRangef(disp) GET_by_offset(disp, _gloffset_DepthRangef)
+#define SET_DepthRangef(disp, fn) SET_by_offset(disp, _gloffset_DepthRangef, fn)
+#define CALL_GetShaderPrecisionFormat(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *, GLint *)), _gloffset_GetShaderPrecisionFormat, parameters)
+#define GET_GetShaderPrecisionFormat(disp) GET_by_offset(disp, _gloffset_GetShaderPrecisionFormat)
+#define SET_GetShaderPrecisionFormat(disp, fn) SET_by_offset(disp, _gloffset_GetShaderPrecisionFormat, fn)
+#define CALL_ReleaseShaderCompiler(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ReleaseShaderCompiler, parameters)
+#define GET_ReleaseShaderCompiler(disp) GET_by_offset(disp, _gloffset_ReleaseShaderCompiler)
+#define SET_ReleaseShaderCompiler(disp, fn) SET_by_offset(disp, _gloffset_ReleaseShaderCompiler, fn)
+#define CALL_ShaderBinary(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *, GLenum, const GLvoid *, GLsizei)), _gloffset_ShaderBinary, parameters)
+#define GET_ShaderBinary(disp) GET_by_offset(disp, _gloffset_ShaderBinary)
+#define SET_ShaderBinary(disp, fn) SET_by_offset(disp, _gloffset_ShaderBinary, fn)
+#define CALL_PolygonOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PolygonOffsetEXT, parameters)
+#define GET_PolygonOffsetEXT(disp) GET_by_offset(disp, _gloffset_PolygonOffsetEXT)
+#define SET_PolygonOffsetEXT(disp, fn) SET_by_offset(disp, _gloffset_PolygonOffsetEXT, fn)
+#define CALL_GetPixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetPixelTexGenParameterfvSGIS, parameters)
+#define GET_GetPixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS)
+#define SET_GetPixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS, fn)
+#define CALL_GetPixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetPixelTexGenParameterivSGIS, parameters)
+#define GET_GetPixelTexGenParameterivSGIS(disp) GET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS)
+#define SET_GetPixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS, fn)
+#define CALL_PixelTexGenParameterfSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelTexGenParameterfSGIS, parameters)
+#define GET_PixelTexGenParameterfSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS)
+#define SET_PixelTexGenParameterfSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS, fn)
+#define CALL_PixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_PixelTexGenParameterfvSGIS, parameters)
+#define GET_PixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS)
+#define SET_PixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS, fn)
+#define CALL_PixelTexGenParameteriSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelTexGenParameteriSGIS, parameters)
+#define GET_PixelTexGenParameteriSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS)
+#define SET_PixelTexGenParameteriSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS, fn)
+#define CALL_PixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_PixelTexGenParameterivSGIS, parameters)
+#define GET_PixelTexGenParameterivSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS)
+#define SET_PixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS, fn)
+#define CALL_SampleMaskSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), _gloffset_SampleMaskSGIS, parameters)
+#define GET_SampleMaskSGIS(disp) GET_by_offset(disp, _gloffset_SampleMaskSGIS)
+#define SET_SampleMaskSGIS(disp, fn) SET_by_offset(disp, _gloffset_SampleMaskSGIS, fn)
+#define CALL_SamplePatternSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_SamplePatternSGIS, parameters)
+#define GET_SamplePatternSGIS(disp) GET_by_offset(disp, _gloffset_SamplePatternSGIS)
+#define SET_SamplePatternSGIS(disp, fn) SET_by_offset(disp, _gloffset_SamplePatternSGIS, fn)
+#define CALL_ColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_ColorPointerEXT, parameters)
+#define GET_ColorPointerEXT(disp) GET_by_offset(disp, _gloffset_ColorPointerEXT)
+#define SET_ColorPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_ColorPointerEXT, fn)
+#define CALL_EdgeFlagPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, const GLboolean *)), _gloffset_EdgeFlagPointerEXT, parameters)
+#define GET_EdgeFlagPointerEXT(disp) GET_by_offset(disp, _gloffset_EdgeFlagPointerEXT)
+#define SET_EdgeFlagPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagPointerEXT, fn)
+#define CALL_IndexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_IndexPointerEXT, parameters)
+#define GET_IndexPointerEXT(disp) GET_by_offset(disp, _gloffset_IndexPointerEXT)
+#define SET_IndexPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_IndexPointerEXT, fn)
+#define CALL_NormalPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_NormalPointerEXT, parameters)
+#define GET_NormalPointerEXT(disp) GET_by_offset(disp, _gloffset_NormalPointerEXT)
+#define SET_NormalPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_NormalPointerEXT, fn)
+#define CALL_TexCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_TexCoordPointerEXT, parameters)
+#define GET_TexCoordPointerEXT(disp) GET_by_offset(disp, _gloffset_TexCoordPointerEXT)
+#define SET_TexCoordPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_TexCoordPointerEXT, fn)
+#define CALL_VertexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_VertexPointerEXT, parameters)
+#define GET_VertexPointerEXT(disp) GET_by_offset(disp, _gloffset_VertexPointerEXT)
+#define SET_VertexPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexPointerEXT, fn)
+#define CALL_PointParameterfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PointParameterfEXT, parameters)
+#define GET_PointParameterfEXT(disp) GET_by_offset(disp, _gloffset_PointParameterfEXT)
+#define SET_PointParameterfEXT(disp, fn) SET_by_offset(disp, _gloffset_PointParameterfEXT, fn)
+#define CALL_PointParameterfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_PointParameterfvEXT, parameters)
+#define GET_PointParameterfvEXT(disp) GET_by_offset(disp, _gloffset_PointParameterfvEXT)
+#define SET_PointParameterfvEXT(disp, fn) SET_by_offset(disp, _gloffset_PointParameterfvEXT, fn)
+#define CALL_LockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei)), _gloffset_LockArraysEXT, parameters)
+#define GET_LockArraysEXT(disp) GET_by_offset(disp, _gloffset_LockArraysEXT)
+#define SET_LockArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_LockArraysEXT, fn)
+#define CALL_UnlockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_UnlockArraysEXT, parameters)
+#define GET_UnlockArraysEXT(disp) GET_by_offset(disp, _gloffset_UnlockArraysEXT)
+#define SET_UnlockArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_UnlockArraysEXT, fn)
+#define CALL_SecondaryColor3bEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_SecondaryColor3bEXT, parameters)
+#define GET_SecondaryColor3bEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3bEXT)
+#define SET_SecondaryColor3bEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3bEXT, fn)
+#define CALL_SecondaryColor3bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_SecondaryColor3bvEXT, parameters)
+#define GET_SecondaryColor3bvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3bvEXT)
+#define SET_SecondaryColor3bvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3bvEXT, fn)
+#define CALL_SecondaryColor3dEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_SecondaryColor3dEXT, parameters)
+#define GET_SecondaryColor3dEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3dEXT)
+#define SET_SecondaryColor3dEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3dEXT, fn)
+#define CALL_SecondaryColor3dvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_SecondaryColor3dvEXT, parameters)
+#define GET_SecondaryColor3dvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3dvEXT)
+#define SET_SecondaryColor3dvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3dvEXT, fn)
+#define CALL_SecondaryColor3fEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_SecondaryColor3fEXT, parameters)
+#define GET_SecondaryColor3fEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3fEXT)
+#define SET_SecondaryColor3fEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3fEXT, fn)
+#define CALL_SecondaryColor3fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_SecondaryColor3fvEXT, parameters)
+#define GET_SecondaryColor3fvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3fvEXT)
+#define SET_SecondaryColor3fvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3fvEXT, fn)
+#define CALL_SecondaryColor3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_SecondaryColor3iEXT, parameters)
+#define GET_SecondaryColor3iEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3iEXT)
+#define SET_SecondaryColor3iEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3iEXT, fn)
+#define CALL_SecondaryColor3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_SecondaryColor3ivEXT, parameters)
+#define GET_SecondaryColor3ivEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ivEXT)
+#define SET_SecondaryColor3ivEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ivEXT, fn)
+#define CALL_SecondaryColor3sEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_SecondaryColor3sEXT, parameters)
+#define GET_SecondaryColor3sEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3sEXT)
+#define SET_SecondaryColor3sEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3sEXT, fn)
+#define CALL_SecondaryColor3svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_SecondaryColor3svEXT, parameters)
+#define GET_SecondaryColor3svEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3svEXT)
+#define SET_SecondaryColor3svEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3svEXT, fn)
+#define CALL_SecondaryColor3ubEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), _gloffset_SecondaryColor3ubEXT, parameters)
+#define GET_SecondaryColor3ubEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ubEXT)
+#define SET_SecondaryColor3ubEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ubEXT, fn)
+#define CALL_SecondaryColor3ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_SecondaryColor3ubvEXT, parameters)
+#define GET_SecondaryColor3ubvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT)
+#define SET_SecondaryColor3ubvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT, fn)
+#define CALL_SecondaryColor3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_SecondaryColor3uiEXT, parameters)
+#define GET_SecondaryColor3uiEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3uiEXT)
+#define SET_SecondaryColor3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3uiEXT, fn)
+#define CALL_SecondaryColor3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_SecondaryColor3uivEXT, parameters)
+#define GET_SecondaryColor3uivEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3uivEXT)
+#define SET_SecondaryColor3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3uivEXT, fn)
+#define CALL_SecondaryColor3usEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), _gloffset_SecondaryColor3usEXT, parameters)
+#define GET_SecondaryColor3usEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3usEXT)
+#define SET_SecondaryColor3usEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3usEXT, fn)
+#define CALL_SecondaryColor3usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_SecondaryColor3usvEXT, parameters)
+#define GET_SecondaryColor3usvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3usvEXT)
+#define SET_SecondaryColor3usvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3usvEXT, fn)
+#define CALL_SecondaryColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_SecondaryColorPointerEXT, parameters)
+#define GET_SecondaryColorPointerEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColorPointerEXT)
+#define SET_SecondaryColorPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColorPointerEXT, fn)
+#define CALL_MultiDrawArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *, const GLsizei *, GLsizei)), _gloffset_MultiDrawArraysEXT, parameters)
+#define GET_MultiDrawArraysEXT(disp) GET_by_offset(disp, _gloffset_MultiDrawArraysEXT)
+#define SET_MultiDrawArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawArraysEXT, fn)
+#define CALL_MultiDrawElementsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)), _gloffset_MultiDrawElementsEXT, parameters)
+#define GET_MultiDrawElementsEXT(disp) GET_by_offset(disp, _gloffset_MultiDrawElementsEXT)
+#define SET_MultiDrawElementsEXT(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawElementsEXT, fn)
+#define CALL_FogCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_FogCoordPointerEXT, parameters)
+#define GET_FogCoordPointerEXT(disp) GET_by_offset(disp, _gloffset_FogCoordPointerEXT)
+#define SET_FogCoordPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordPointerEXT, fn)
+#define CALL_FogCoorddEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_FogCoorddEXT, parameters)
+#define GET_FogCoorddEXT(disp) GET_by_offset(disp, _gloffset_FogCoorddEXT)
+#define SET_FogCoorddEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoorddEXT, fn)
+#define CALL_FogCoorddvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_FogCoorddvEXT, parameters)
+#define GET_FogCoorddvEXT(disp) GET_by_offset(disp, _gloffset_FogCoorddvEXT)
+#define SET_FogCoorddvEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoorddvEXT, fn)
+#define CALL_FogCoordfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_FogCoordfEXT, parameters)
+#define GET_FogCoordfEXT(disp) GET_by_offset(disp, _gloffset_FogCoordfEXT)
+#define SET_FogCoordfEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordfEXT, fn)
+#define CALL_FogCoordfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_FogCoordfvEXT, parameters)
+#define GET_FogCoordfvEXT(disp) GET_by_offset(disp, _gloffset_FogCoordfvEXT)
+#define SET_FogCoordfvEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordfvEXT, fn)
+#define CALL_PixelTexGenSGIX(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_PixelTexGenSGIX, parameters)
+#define GET_PixelTexGenSGIX(disp) GET_by_offset(disp, _gloffset_PixelTexGenSGIX)
+#define SET_PixelTexGenSGIX(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenSGIX, fn)
+#define CALL_BlendFuncSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_BlendFuncSeparateEXT, parameters)
+#define GET_BlendFuncSeparateEXT(disp) GET_by_offset(disp, _gloffset_BlendFuncSeparateEXT)
+#define SET_BlendFuncSeparateEXT(disp, fn) SET_by_offset(disp, _gloffset_BlendFuncSeparateEXT, fn)
+#define CALL_FlushVertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_FlushVertexArrayRangeNV, parameters)
+#define GET_FlushVertexArrayRangeNV(disp) GET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV)
+#define SET_FlushVertexArrayRangeNV(disp, fn) SET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV, fn)
+#define CALL_VertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), _gloffset_VertexArrayRangeNV, parameters)
+#define GET_VertexArrayRangeNV(disp) GET_by_offset(disp, _gloffset_VertexArrayRangeNV)
+#define SET_VertexArrayRangeNV(disp, fn) SET_by_offset(disp, _gloffset_VertexArrayRangeNV, fn)
+#define CALL_CombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum)), _gloffset_CombinerInputNV, parameters)
+#define GET_CombinerInputNV(disp) GET_by_offset(disp, _gloffset_CombinerInputNV)
+#define SET_CombinerInputNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerInputNV, fn)
+#define CALL_CombinerOutputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean)), _gloffset_CombinerOutputNV, parameters)
+#define GET_CombinerOutputNV(disp) GET_by_offset(disp, _gloffset_CombinerOutputNV)
+#define SET_CombinerOutputNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerOutputNV, fn)
+#define CALL_CombinerParameterfNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_CombinerParameterfNV, parameters)
+#define GET_CombinerParameterfNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterfNV)
+#define SET_CombinerParameterfNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterfNV, fn)
+#define CALL_CombinerParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_CombinerParameterfvNV, parameters)
+#define GET_CombinerParameterfvNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterfvNV)
+#define SET_CombinerParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterfvNV, fn)
+#define CALL_CombinerParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_CombinerParameteriNV, parameters)
+#define GET_CombinerParameteriNV(disp) GET_by_offset(disp, _gloffset_CombinerParameteriNV)
+#define SET_CombinerParameteriNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameteriNV, fn)
+#define CALL_CombinerParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_CombinerParameterivNV, parameters)
+#define GET_CombinerParameterivNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterivNV)
+#define SET_CombinerParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterivNV, fn)
+#define CALL_FinalCombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_FinalCombinerInputNV, parameters)
+#define GET_FinalCombinerInputNV(disp) GET_by_offset(disp, _gloffset_FinalCombinerInputNV)
+#define SET_FinalCombinerInputNV(disp, fn) SET_by_offset(disp, _gloffset_FinalCombinerInputNV, fn)
+#define CALL_GetCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLfloat *)), _gloffset_GetCombinerInputParameterfvNV, parameters)
+#define GET_GetCombinerInputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV)
+#define SET_GetCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV, fn)
+#define CALL_GetCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLint *)), _gloffset_GetCombinerInputParameterivNV, parameters)
+#define GET_GetCombinerInputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV)
+#define SET_GetCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV, fn)
+#define CALL_GetCombinerOutputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLfloat *)), _gloffset_GetCombinerOutputParameterfvNV, parameters)
+#define GET_GetCombinerOutputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV)
+#define SET_GetCombinerOutputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV, fn)
+#define CALL_GetCombinerOutputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), _gloffset_GetCombinerOutputParameterivNV, parameters)
+#define GET_GetCombinerOutputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV)
+#define SET_GetCombinerOutputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV, fn)
+#define CALL_GetFinalCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetFinalCombinerInputParameterfvNV, parameters)
+#define GET_GetFinalCombinerInputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV)
+#define SET_GetFinalCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV, fn)
+#define CALL_GetFinalCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetFinalCombinerInputParameterivNV, parameters)
+#define GET_GetFinalCombinerInputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV)
+#define SET_GetFinalCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV, fn)
+#define CALL_ResizeBuffersMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ResizeBuffersMESA, parameters)
+#define GET_ResizeBuffersMESA(disp) GET_by_offset(disp, _gloffset_ResizeBuffersMESA)
+#define SET_ResizeBuffersMESA(disp, fn) SET_by_offset(disp, _gloffset_ResizeBuffersMESA, fn)
+#define CALL_WindowPos2dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_WindowPos2dMESA, parameters)
+#define GET_WindowPos2dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2dMESA)
+#define SET_WindowPos2dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2dMESA, fn)
+#define CALL_WindowPos2dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos2dvMESA, parameters)
+#define GET_WindowPos2dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2dvMESA)
+#define SET_WindowPos2dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2dvMESA, fn)
+#define CALL_WindowPos2fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_WindowPos2fMESA, parameters)
+#define GET_WindowPos2fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2fMESA)
+#define SET_WindowPos2fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2fMESA, fn)
+#define CALL_WindowPos2fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos2fvMESA, parameters)
+#define GET_WindowPos2fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2fvMESA)
+#define SET_WindowPos2fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2fvMESA, fn)
+#define CALL_WindowPos2iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_WindowPos2iMESA, parameters)
+#define GET_WindowPos2iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2iMESA)
+#define SET_WindowPos2iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2iMESA, fn)
+#define CALL_WindowPos2ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos2ivMESA, parameters)
+#define GET_WindowPos2ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2ivMESA)
+#define SET_WindowPos2ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2ivMESA, fn)
+#define CALL_WindowPos2sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_WindowPos2sMESA, parameters)
+#define GET_WindowPos2sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2sMESA)
+#define SET_WindowPos2sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2sMESA, fn)
+#define CALL_WindowPos2svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos2svMESA, parameters)
+#define GET_WindowPos2svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2svMESA)
+#define SET_WindowPos2svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2svMESA, fn)
+#define CALL_WindowPos3dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_WindowPos3dMESA, parameters)
+#define GET_WindowPos3dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3dMESA)
+#define SET_WindowPos3dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3dMESA, fn)
+#define CALL_WindowPos3dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos3dvMESA, parameters)
+#define GET_WindowPos3dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3dvMESA)
+#define SET_WindowPos3dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3dvMESA, fn)
+#define CALL_WindowPos3fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_WindowPos3fMESA, parameters)
+#define GET_WindowPos3fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3fMESA)
+#define SET_WindowPos3fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3fMESA, fn)
+#define CALL_WindowPos3fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos3fvMESA, parameters)
+#define GET_WindowPos3fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3fvMESA)
+#define SET_WindowPos3fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3fvMESA, fn)
+#define CALL_WindowPos3iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_WindowPos3iMESA, parameters)
+#define GET_WindowPos3iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3iMESA)
+#define SET_WindowPos3iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3iMESA, fn)
+#define CALL_WindowPos3ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos3ivMESA, parameters)
+#define GET_WindowPos3ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3ivMESA)
+#define SET_WindowPos3ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3ivMESA, fn)
+#define CALL_WindowPos3sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_WindowPos3sMESA, parameters)
+#define GET_WindowPos3sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3sMESA)
+#define SET_WindowPos3sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3sMESA, fn)
+#define CALL_WindowPos3svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos3svMESA, parameters)
+#define GET_WindowPos3svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3svMESA)
+#define SET_WindowPos3svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3svMESA, fn)
+#define CALL_WindowPos4dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_WindowPos4dMESA, parameters)
+#define GET_WindowPos4dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4dMESA)
+#define SET_WindowPos4dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4dMESA, fn)
+#define CALL_WindowPos4dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos4dvMESA, parameters)
+#define GET_WindowPos4dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4dvMESA)
+#define SET_WindowPos4dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4dvMESA, fn)
+#define CALL_WindowPos4fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_WindowPos4fMESA, parameters)
+#define GET_WindowPos4fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4fMESA)
+#define SET_WindowPos4fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4fMESA, fn)
+#define CALL_WindowPos4fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos4fvMESA, parameters)
+#define GET_WindowPos4fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4fvMESA)
+#define SET_WindowPos4fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4fvMESA, fn)
+#define CALL_WindowPos4iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_WindowPos4iMESA, parameters)
+#define GET_WindowPos4iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4iMESA)
+#define SET_WindowPos4iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4iMESA, fn)
+#define CALL_WindowPos4ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos4ivMESA, parameters)
+#define GET_WindowPos4ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4ivMESA)
+#define SET_WindowPos4ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4ivMESA, fn)
+#define CALL_WindowPos4sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_WindowPos4sMESA, parameters)
+#define GET_WindowPos4sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4sMESA)
+#define SET_WindowPos4sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4sMESA, fn)
+#define CALL_WindowPos4svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos4svMESA, parameters)
+#define GET_WindowPos4svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4svMESA)
+#define SET_WindowPos4svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4svMESA, fn)
+#define CALL_MultiModeDrawArraysIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint)), _gloffset_MultiModeDrawArraysIBM, parameters)
+#define GET_MultiModeDrawArraysIBM(disp) GET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM)
+#define SET_MultiModeDrawArraysIBM(disp, fn) SET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM, fn)
+#define CALL_MultiModeDrawElementsIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLsizei *, GLenum, const GLvoid * const *, GLsizei, GLint)), _gloffset_MultiModeDrawElementsIBM, parameters)
+#define GET_MultiModeDrawElementsIBM(disp) GET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM)
+#define SET_MultiModeDrawElementsIBM(disp, fn) SET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM, fn)
+#define CALL_DeleteFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteFencesNV, parameters)
+#define GET_DeleteFencesNV(disp) GET_by_offset(disp, _gloffset_DeleteFencesNV)
+#define SET_DeleteFencesNV(disp, fn) SET_by_offset(disp, _gloffset_DeleteFencesNV, fn)
+#define CALL_FinishFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_FinishFenceNV, parameters)
+#define GET_FinishFenceNV(disp) GET_by_offset(disp, _gloffset_FinishFenceNV)
+#define SET_FinishFenceNV(disp, fn) SET_by_offset(disp, _gloffset_FinishFenceNV, fn)
+#define CALL_GenFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenFencesNV, parameters)
+#define GET_GenFencesNV(disp) GET_by_offset(disp, _gloffset_GenFencesNV)
+#define SET_GenFencesNV(disp, fn) SET_by_offset(disp, _gloffset_GenFencesNV, fn)
+#define CALL_GetFenceivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetFenceivNV, parameters)
+#define GET_GetFenceivNV(disp) GET_by_offset(disp, _gloffset_GetFenceivNV)
+#define SET_GetFenceivNV(disp, fn) SET_by_offset(disp, _gloffset_GetFenceivNV, fn)
+#define CALL_IsFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsFenceNV, parameters)
+#define GET_IsFenceNV(disp) GET_by_offset(disp, _gloffset_IsFenceNV)
+#define SET_IsFenceNV(disp, fn) SET_by_offset(disp, _gloffset_IsFenceNV, fn)
+#define CALL_SetFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_SetFenceNV, parameters)
+#define GET_SetFenceNV(disp) GET_by_offset(disp, _gloffset_SetFenceNV)
+#define SET_SetFenceNV(disp, fn) SET_by_offset(disp, _gloffset_SetFenceNV, fn)
+#define CALL_TestFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_TestFenceNV, parameters)
+#define GET_TestFenceNV(disp) GET_by_offset(disp, _gloffset_TestFenceNV)
+#define SET_TestFenceNV(disp, fn) SET_by_offset(disp, _gloffset_TestFenceNV, fn)
+#define CALL_AreProgramsResidentNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), _gloffset_AreProgramsResidentNV, parameters)
+#define GET_AreProgramsResidentNV(disp) GET_by_offset(disp, _gloffset_AreProgramsResidentNV)
+#define SET_AreProgramsResidentNV(disp, fn) SET_by_offset(disp, _gloffset_AreProgramsResidentNV, fn)
+#define CALL_BindProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindProgramNV, parameters)
+#define GET_BindProgramNV(disp) GET_by_offset(disp, _gloffset_BindProgramNV)
+#define SET_BindProgramNV(disp, fn) SET_by_offset(disp, _gloffset_BindProgramNV, fn)
+#define CALL_DeleteProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteProgramsNV, parameters)
+#define GET_DeleteProgramsNV(disp) GET_by_offset(disp, _gloffset_DeleteProgramsNV)
+#define SET_DeleteProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_DeleteProgramsNV, fn)
+#define CALL_ExecuteProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ExecuteProgramNV, parameters)
+#define GET_ExecuteProgramNV(disp) GET_by_offset(disp, _gloffset_ExecuteProgramNV)
+#define SET_ExecuteProgramNV(disp, fn) SET_by_offset(disp, _gloffset_ExecuteProgramNV, fn)
+#define CALL_GenProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenProgramsNV, parameters)
+#define GET_GenProgramsNV(disp) GET_by_offset(disp, _gloffset_GenProgramsNV)
+#define SET_GenProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_GenProgramsNV, fn)
+#define CALL_GetProgramParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLdouble *)), _gloffset_GetProgramParameterdvNV, parameters)
+#define GET_GetProgramParameterdvNV(disp) GET_by_offset(disp, _gloffset_GetProgramParameterdvNV)
+#define SET_GetProgramParameterdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramParameterdvNV, fn)
+#define CALL_GetProgramParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLfloat *)), _gloffset_GetProgramParameterfvNV, parameters)
+#define GET_GetProgramParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetProgramParameterfvNV)
+#define SET_GetProgramParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramParameterfvNV, fn)
+#define CALL_GetProgramStringNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLubyte *)), _gloffset_GetProgramStringNV, parameters)
+#define GET_GetProgramStringNV(disp) GET_by_offset(disp, _gloffset_GetProgramStringNV)
+#define SET_GetProgramStringNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramStringNV, fn)
+#define CALL_GetProgramivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetProgramivNV, parameters)
+#define GET_GetProgramivNV(disp) GET_by_offset(disp, _gloffset_GetProgramivNV)
+#define SET_GetProgramivNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramivNV, fn)
+#define CALL_GetTrackMatrixivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), _gloffset_GetTrackMatrixivNV, parameters)
+#define GET_GetTrackMatrixivNV(disp) GET_by_offset(disp, _gloffset_GetTrackMatrixivNV)
+#define SET_GetTrackMatrixivNV(disp, fn) SET_by_offset(disp, _gloffset_GetTrackMatrixivNV, fn)
+#define CALL_GetVertexAttribPointervNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLvoid **)), _gloffset_GetVertexAttribPointervNV, parameters)
+#define GET_GetVertexAttribPointervNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribPointervNV)
+#define SET_GetVertexAttribPointervNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribPointervNV, fn)
+#define CALL_GetVertexAttribdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), _gloffset_GetVertexAttribdvNV, parameters)
+#define GET_GetVertexAttribdvNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribdvNV)
+#define SET_GetVertexAttribdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribdvNV, fn)
+#define CALL_GetVertexAttribfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetVertexAttribfvNV, parameters)
+#define GET_GetVertexAttribfvNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribfvNV)
+#define SET_GetVertexAttribfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribfvNV, fn)
+#define CALL_GetVertexAttribivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribivNV, parameters)
+#define GET_GetVertexAttribivNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribivNV)
+#define SET_GetVertexAttribivNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribivNV, fn)
+#define CALL_IsProgramNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsProgramNV, parameters)
+#define GET_IsProgramNV(disp) GET_by_offset(disp, _gloffset_IsProgramNV)
+#define SET_IsProgramNV(disp, fn) SET_by_offset(disp, _gloffset_IsProgramNV, fn)
+#define CALL_LoadProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLubyte *)), _gloffset_LoadProgramNV, parameters)
+#define GET_LoadProgramNV(disp) GET_by_offset(disp, _gloffset_LoadProgramNV)
+#define SET_LoadProgramNV(disp, fn) SET_by_offset(disp, _gloffset_LoadProgramNV, fn)
+#define CALL_ProgramParameters4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLdouble *)), _gloffset_ProgramParameters4dvNV, parameters)
+#define GET_ProgramParameters4dvNV(disp) GET_by_offset(disp, _gloffset_ProgramParameters4dvNV)
+#define SET_ProgramParameters4dvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameters4dvNV, fn)
+#define CALL_ProgramParameters4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramParameters4fvNV, parameters)
+#define GET_ProgramParameters4fvNV(disp) GET_by_offset(disp, _gloffset_ProgramParameters4fvNV)
+#define SET_ProgramParameters4fvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameters4fvNV, fn)
+#define CALL_RequestResidentProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_RequestResidentProgramsNV, parameters)
+#define GET_RequestResidentProgramsNV(disp) GET_by_offset(disp, _gloffset_RequestResidentProgramsNV)
+#define SET_RequestResidentProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_RequestResidentProgramsNV, fn)
+#define CALL_TrackMatrixNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLenum)), _gloffset_TrackMatrixNV, parameters)
+#define GET_TrackMatrixNV(disp) GET_by_offset(disp, _gloffset_TrackMatrixNV)
+#define SET_TrackMatrixNV(disp, fn) SET_by_offset(disp, _gloffset_TrackMatrixNV, fn)
+#define CALL_VertexAttrib1dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), _gloffset_VertexAttrib1dNV, parameters)
+#define GET_VertexAttrib1dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dNV)
+#define SET_VertexAttrib1dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dNV, fn)
+#define CALL_VertexAttrib1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib1dvNV, parameters)
+#define GET_VertexAttrib1dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dvNV)
+#define SET_VertexAttrib1dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dvNV, fn)
+#define CALL_VertexAttrib1fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), _gloffset_VertexAttrib1fNV, parameters)
+#define GET_VertexAttrib1fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fNV)
+#define SET_VertexAttrib1fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fNV, fn)
+#define CALL_VertexAttrib1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib1fvNV, parameters)
+#define GET_VertexAttrib1fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fvNV)
+#define SET_VertexAttrib1fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fvNV, fn)
+#define CALL_VertexAttrib1sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), _gloffset_VertexAttrib1sNV, parameters)
+#define GET_VertexAttrib1sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1sNV)
+#define SET_VertexAttrib1sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1sNV, fn)
+#define CALL_VertexAttrib1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib1svNV, parameters)
+#define GET_VertexAttrib1svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1svNV)
+#define SET_VertexAttrib1svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1svNV, fn)
+#define CALL_VertexAttrib2dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), _gloffset_VertexAttrib2dNV, parameters)
+#define GET_VertexAttrib2dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dNV)
+#define SET_VertexAttrib2dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dNV, fn)
+#define CALL_VertexAttrib2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib2dvNV, parameters)
+#define GET_VertexAttrib2dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dvNV)
+#define SET_VertexAttrib2dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dvNV, fn)
+#define CALL_VertexAttrib2fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), _gloffset_VertexAttrib2fNV, parameters)
+#define GET_VertexAttrib2fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fNV)
+#define SET_VertexAttrib2fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fNV, fn)
+#define CALL_VertexAttrib2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib2fvNV, parameters)
+#define GET_VertexAttrib2fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fvNV)
+#define SET_VertexAttrib2fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fvNV, fn)
+#define CALL_VertexAttrib2sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), _gloffset_VertexAttrib2sNV, parameters)
+#define GET_VertexAttrib2sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2sNV)
+#define SET_VertexAttrib2sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2sNV, fn)
+#define CALL_VertexAttrib2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib2svNV, parameters)
+#define GET_VertexAttrib2svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2svNV)
+#define SET_VertexAttrib2svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2svNV, fn)
+#define CALL_VertexAttrib3dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib3dNV, parameters)
+#define GET_VertexAttrib3dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dNV)
+#define SET_VertexAttrib3dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dNV, fn)
+#define CALL_VertexAttrib3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib3dvNV, parameters)
+#define GET_VertexAttrib3dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dvNV)
+#define SET_VertexAttrib3dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dvNV, fn)
+#define CALL_VertexAttrib3fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib3fNV, parameters)
+#define GET_VertexAttrib3fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fNV)
+#define SET_VertexAttrib3fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fNV, fn)
+#define CALL_VertexAttrib3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib3fvNV, parameters)
+#define GET_VertexAttrib3fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fvNV)
+#define SET_VertexAttrib3fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fvNV, fn)
+#define CALL_VertexAttrib3sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib3sNV, parameters)
+#define GET_VertexAttrib3sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3sNV)
+#define SET_VertexAttrib3sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3sNV, fn)
+#define CALL_VertexAttrib3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib3svNV, parameters)
+#define GET_VertexAttrib3svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3svNV)
+#define SET_VertexAttrib3svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3svNV, fn)
+#define CALL_VertexAttrib4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib4dNV, parameters)
+#define GET_VertexAttrib4dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dNV)
+#define SET_VertexAttrib4dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dNV, fn)
+#define CALL_VertexAttrib4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib4dvNV, parameters)
+#define GET_VertexAttrib4dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dvNV)
+#define SET_VertexAttrib4dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dvNV, fn)
+#define CALL_VertexAttrib4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib4fNV, parameters)
+#define GET_VertexAttrib4fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fNV)
+#define SET_VertexAttrib4fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fNV, fn)
+#define CALL_VertexAttrib4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib4fvNV, parameters)
+#define GET_VertexAttrib4fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fvNV)
+#define SET_VertexAttrib4fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fvNV, fn)
+#define CALL_VertexAttrib4sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib4sNV, parameters)
+#define GET_VertexAttrib4sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4sNV)
+#define SET_VertexAttrib4sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4sNV, fn)
+#define CALL_VertexAttrib4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4svNV, parameters)
+#define GET_VertexAttrib4svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4svNV)
+#define SET_VertexAttrib4svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4svNV, fn)
+#define CALL_VertexAttrib4ubNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_VertexAttrib4ubNV, parameters)
+#define GET_VertexAttrib4ubNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubNV)
+#define SET_VertexAttrib4ubNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubNV, fn)
+#define CALL_VertexAttrib4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4ubvNV, parameters)
+#define GET_VertexAttrib4ubvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubvNV)
+#define SET_VertexAttrib4ubvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubvNV, fn)
+#define CALL_VertexAttribPointerNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexAttribPointerNV, parameters)
+#define GET_VertexAttribPointerNV(disp) GET_by_offset(disp, _gloffset_VertexAttribPointerNV)
+#define SET_VertexAttribPointerNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribPointerNV, fn)
+#define CALL_VertexAttribs1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs1dvNV, parameters)
+#define GET_VertexAttribs1dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1dvNV)
+#define SET_VertexAttribs1dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1dvNV, fn)
+#define CALL_VertexAttribs1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs1fvNV, parameters)
+#define GET_VertexAttribs1fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1fvNV)
+#define SET_VertexAttribs1fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1fvNV, fn)
+#define CALL_VertexAttribs1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs1svNV, parameters)
+#define GET_VertexAttribs1svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1svNV)
+#define SET_VertexAttribs1svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1svNV, fn)
+#define CALL_VertexAttribs2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs2dvNV, parameters)
+#define GET_VertexAttribs2dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2dvNV)
+#define SET_VertexAttribs2dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2dvNV, fn)
+#define CALL_VertexAttribs2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs2fvNV, parameters)
+#define GET_VertexAttribs2fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2fvNV)
+#define SET_VertexAttribs2fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2fvNV, fn)
+#define CALL_VertexAttribs2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs2svNV, parameters)
+#define GET_VertexAttribs2svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2svNV)
+#define SET_VertexAttribs2svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2svNV, fn)
+#define CALL_VertexAttribs3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs3dvNV, parameters)
+#define GET_VertexAttribs3dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3dvNV)
+#define SET_VertexAttribs3dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3dvNV, fn)
+#define CALL_VertexAttribs3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs3fvNV, parameters)
+#define GET_VertexAttribs3fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3fvNV)
+#define SET_VertexAttribs3fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3fvNV, fn)
+#define CALL_VertexAttribs3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs3svNV, parameters)
+#define GET_VertexAttribs3svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3svNV)
+#define SET_VertexAttribs3svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3svNV, fn)
+#define CALL_VertexAttribs4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs4dvNV, parameters)
+#define GET_VertexAttribs4dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4dvNV)
+#define SET_VertexAttribs4dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4dvNV, fn)
+#define CALL_VertexAttribs4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs4fvNV, parameters)
+#define GET_VertexAttribs4fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4fvNV)
+#define SET_VertexAttribs4fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4fvNV, fn)
+#define CALL_VertexAttribs4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs4svNV, parameters)
+#define GET_VertexAttribs4svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4svNV)
+#define SET_VertexAttribs4svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4svNV, fn)
+#define CALL_VertexAttribs4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *)), _gloffset_VertexAttribs4ubvNV, parameters)
+#define GET_VertexAttribs4ubvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4ubvNV)
+#define SET_VertexAttribs4ubvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4ubvNV, fn)
+#define CALL_GetTexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetTexBumpParameterfvATI, parameters)
+#define GET_GetTexBumpParameterfvATI(disp) GET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI)
+#define SET_GetTexBumpParameterfvATI(disp, fn) SET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI, fn)
+#define CALL_GetTexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetTexBumpParameterivATI, parameters)
+#define GET_GetTexBumpParameterivATI(disp) GET_by_offset(disp, _gloffset_GetTexBumpParameterivATI)
+#define SET_GetTexBumpParameterivATI(disp, fn) SET_by_offset(disp, _gloffset_GetTexBumpParameterivATI, fn)
+#define CALL_TexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_TexBumpParameterfvATI, parameters)
+#define GET_TexBumpParameterfvATI(disp) GET_by_offset(disp, _gloffset_TexBumpParameterfvATI)
+#define SET_TexBumpParameterfvATI(disp, fn) SET_by_offset(disp, _gloffset_TexBumpParameterfvATI, fn)
+#define CALL_TexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_TexBumpParameterivATI, parameters)
+#define GET_TexBumpParameterivATI(disp) GET_by_offset(disp, _gloffset_TexBumpParameterivATI)
+#define SET_TexBumpParameterivATI(disp, fn) SET_by_offset(disp, _gloffset_TexBumpParameterivATI, fn)
+#define CALL_AlphaFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp1ATI, parameters)
+#define GET_AlphaFragmentOp1ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI)
+#define SET_AlphaFragmentOp1ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI, fn)
+#define CALL_AlphaFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp2ATI, parameters)
+#define GET_AlphaFragmentOp2ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI)
+#define SET_AlphaFragmentOp2ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI, fn)
+#define CALL_AlphaFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp3ATI, parameters)
+#define GET_AlphaFragmentOp3ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI)
+#define SET_AlphaFragmentOp3ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI, fn)
+#define CALL_BeginFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_BeginFragmentShaderATI, parameters)
+#define GET_BeginFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_BeginFragmentShaderATI)
+#define SET_BeginFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_BeginFragmentShaderATI, fn)
+#define CALL_BindFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindFragmentShaderATI, parameters)
+#define GET_BindFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_BindFragmentShaderATI)
+#define SET_BindFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_BindFragmentShaderATI, fn)
+#define CALL_ColorFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp1ATI, parameters)
+#define GET_ColorFragmentOp1ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp1ATI)
+#define SET_ColorFragmentOp1ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp1ATI, fn)
+#define CALL_ColorFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp2ATI, parameters)
+#define GET_ColorFragmentOp2ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp2ATI)
+#define SET_ColorFragmentOp2ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp2ATI, fn)
+#define CALL_ColorFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp3ATI, parameters)
+#define GET_ColorFragmentOp3ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp3ATI)
+#define SET_ColorFragmentOp3ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp3ATI, fn)
+#define CALL_DeleteFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteFragmentShaderATI, parameters)
+#define GET_DeleteFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_DeleteFragmentShaderATI)
+#define SET_DeleteFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_DeleteFragmentShaderATI, fn)
+#define CALL_EndFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndFragmentShaderATI, parameters)
+#define GET_EndFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_EndFragmentShaderATI)
+#define SET_EndFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_EndFragmentShaderATI, fn)
+#define CALL_GenFragmentShadersATI(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLuint)), _gloffset_GenFragmentShadersATI, parameters)
+#define GET_GenFragmentShadersATI(disp) GET_by_offset(disp, _gloffset_GenFragmentShadersATI)
+#define SET_GenFragmentShadersATI(disp, fn) SET_by_offset(disp, _gloffset_GenFragmentShadersATI, fn)
+#define CALL_PassTexCoordATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), _gloffset_PassTexCoordATI, parameters)
+#define GET_PassTexCoordATI(disp) GET_by_offset(disp, _gloffset_PassTexCoordATI)
+#define SET_PassTexCoordATI(disp, fn) SET_by_offset(disp, _gloffset_PassTexCoordATI, fn)
+#define CALL_SampleMapATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), _gloffset_SampleMapATI, parameters)
+#define GET_SampleMapATI(disp) GET_by_offset(disp, _gloffset_SampleMapATI)
+#define SET_SampleMapATI(disp, fn) SET_by_offset(disp, _gloffset_SampleMapATI, fn)
+#define CALL_SetFragmentShaderConstantATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_SetFragmentShaderConstantATI, parameters)
+#define GET_SetFragmentShaderConstantATI(disp) GET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI)
+#define SET_SetFragmentShaderConstantATI(disp, fn) SET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI, fn)
+#define CALL_PointParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PointParameteriNV, parameters)
+#define GET_PointParameteriNV(disp) GET_by_offset(disp, _gloffset_PointParameteriNV)
+#define SET_PointParameteriNV(disp, fn) SET_by_offset(disp, _gloffset_PointParameteriNV, fn)
+#define CALL_PointParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_PointParameterivNV, parameters)
+#define GET_PointParameterivNV(disp) GET_by_offset(disp, _gloffset_PointParameterivNV)
+#define SET_PointParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_PointParameterivNV, fn)
+#define CALL_ActiveStencilFaceEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ActiveStencilFaceEXT, parameters)
+#define GET_ActiveStencilFaceEXT(disp) GET_by_offset(disp, _gloffset_ActiveStencilFaceEXT)
+#define SET_ActiveStencilFaceEXT(disp, fn) SET_by_offset(disp, _gloffset_ActiveStencilFaceEXT, fn)
+#define CALL_BindVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindVertexArrayAPPLE, parameters)
+#define GET_BindVertexArrayAPPLE(disp) GET_by_offset(disp, _gloffset_BindVertexArrayAPPLE)
+#define SET_BindVertexArrayAPPLE(disp, fn) SET_by_offset(disp, _gloffset_BindVertexArrayAPPLE, fn)
+#define CALL_DeleteVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteVertexArraysAPPLE, parameters)
+#define GET_DeleteVertexArraysAPPLE(disp) GET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE)
+#define SET_DeleteVertexArraysAPPLE(disp, fn) SET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE, fn)
+#define CALL_GenVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenVertexArraysAPPLE, parameters)
+#define GET_GenVertexArraysAPPLE(disp) GET_by_offset(disp, _gloffset_GenVertexArraysAPPLE)
+#define SET_GenVertexArraysAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GenVertexArraysAPPLE, fn)
+#define CALL_IsVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsVertexArrayAPPLE, parameters)
+#define GET_IsVertexArrayAPPLE(disp) GET_by_offset(disp, _gloffset_IsVertexArrayAPPLE)
+#define SET_IsVertexArrayAPPLE(disp, fn) SET_by_offset(disp, _gloffset_IsVertexArrayAPPLE, fn)
+#define CALL_GetProgramNamedParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble *)), _gloffset_GetProgramNamedParameterdvNV, parameters)
+#define GET_GetProgramNamedParameterdvNV(disp) GET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV)
+#define SET_GetProgramNamedParameterdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV, fn)
+#define CALL_GetProgramNamedParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat *)), _gloffset_GetProgramNamedParameterfvNV, parameters)
+#define GET_GetProgramNamedParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV)
+#define SET_GetProgramNamedParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV, fn)
+#define CALL_ProgramNamedParameter4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramNamedParameter4dNV, parameters)
+#define GET_ProgramNamedParameter4dNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV)
+#define SET_ProgramNamedParameter4dNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV, fn)
+#define CALL_ProgramNamedParameter4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLdouble *)), _gloffset_ProgramNamedParameter4dvNV, parameters)
+#define GET_ProgramNamedParameter4dvNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV)
+#define SET_ProgramNamedParameter4dvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV, fn)
+#define CALL_ProgramNamedParameter4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramNamedParameter4fNV, parameters)
+#define GET_ProgramNamedParameter4fNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV)
+#define SET_ProgramNamedParameter4fNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV, fn)
+#define CALL_ProgramNamedParameter4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLfloat *)), _gloffset_ProgramNamedParameter4fvNV, parameters)
+#define GET_ProgramNamedParameter4fvNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV)
+#define SET_ProgramNamedParameter4fvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV, fn)
+#define CALL_PrimitiveRestartIndexNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_PrimitiveRestartIndexNV, parameters)
+#define GET_PrimitiveRestartIndexNV(disp) GET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV)
+#define SET_PrimitiveRestartIndexNV(disp, fn) SET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV, fn)
+#define CALL_PrimitiveRestartNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PrimitiveRestartNV, parameters)
+#define GET_PrimitiveRestartNV(disp) GET_by_offset(disp, _gloffset_PrimitiveRestartNV)
+#define SET_PrimitiveRestartNV(disp, fn) SET_by_offset(disp, _gloffset_PrimitiveRestartNV, fn)
+#define CALL_DepthBoundsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), _gloffset_DepthBoundsEXT, parameters)
+#define GET_DepthBoundsEXT(disp) GET_by_offset(disp, _gloffset_DepthBoundsEXT)
+#define SET_DepthBoundsEXT(disp, fn) SET_by_offset(disp, _gloffset_DepthBoundsEXT, fn)
+#define CALL_BlendEquationSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_BlendEquationSeparateEXT, parameters)
+#define GET_BlendEquationSeparateEXT(disp) GET_by_offset(disp, _gloffset_BlendEquationSeparateEXT)
+#define SET_BlendEquationSeparateEXT(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationSeparateEXT, fn)
+#define CALL_BindFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindFramebufferEXT, parameters)
+#define GET_BindFramebufferEXT(disp) GET_by_offset(disp, _gloffset_BindFramebufferEXT)
+#define SET_BindFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BindFramebufferEXT, fn)
+#define CALL_BindRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindRenderbufferEXT, parameters)
+#define GET_BindRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_BindRenderbufferEXT)
+#define SET_BindRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BindRenderbufferEXT, fn)
+#define CALL_CheckFramebufferStatusEXT(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum)), _gloffset_CheckFramebufferStatusEXT, parameters)
+#define GET_CheckFramebufferStatusEXT(disp) GET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT)
+#define SET_CheckFramebufferStatusEXT(disp, fn) SET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT, fn)
+#define CALL_DeleteFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteFramebuffersEXT, parameters)
+#define GET_DeleteFramebuffersEXT(disp) GET_by_offset(disp, _gloffset_DeleteFramebuffersEXT)
+#define SET_DeleteFramebuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_DeleteFramebuffersEXT, fn)
+#define CALL_DeleteRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteRenderbuffersEXT, parameters)
+#define GET_DeleteRenderbuffersEXT(disp) GET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT)
+#define SET_DeleteRenderbuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT, fn)
+#define CALL_FramebufferRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint)), _gloffset_FramebufferRenderbufferEXT, parameters)
+#define GET_FramebufferRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT)
+#define SET_FramebufferRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT, fn)
+#define CALL_FramebufferTexture1DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture1DEXT, parameters)
+#define GET_FramebufferTexture1DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture1DEXT)
+#define SET_FramebufferTexture1DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture1DEXT, fn)
+#define CALL_FramebufferTexture2DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture2DEXT, parameters)
+#define GET_FramebufferTexture2DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture2DEXT)
+#define SET_FramebufferTexture2DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture2DEXT, fn)
+#define CALL_FramebufferTexture3DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint, GLint)), _gloffset_FramebufferTexture3DEXT, parameters)
+#define GET_FramebufferTexture3DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture3DEXT)
+#define SET_FramebufferTexture3DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture3DEXT, fn)
+#define CALL_GenFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenFramebuffersEXT, parameters)
+#define GET_GenFramebuffersEXT(disp) GET_by_offset(disp, _gloffset_GenFramebuffersEXT)
+#define SET_GenFramebuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_GenFramebuffersEXT, fn)
+#define CALL_GenRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenRenderbuffersEXT, parameters)
+#define GET_GenRenderbuffersEXT(disp) GET_by_offset(disp, _gloffset_GenRenderbuffersEXT)
+#define SET_GenRenderbuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_GenRenderbuffersEXT, fn)
+#define CALL_GenerateMipmapEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_GenerateMipmapEXT, parameters)
+#define GET_GenerateMipmapEXT(disp) GET_by_offset(disp, _gloffset_GenerateMipmapEXT)
+#define SET_GenerateMipmapEXT(disp, fn) SET_by_offset(disp, _gloffset_GenerateMipmapEXT, fn)
+#define CALL_GetFramebufferAttachmentParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), _gloffset_GetFramebufferAttachmentParameterivEXT, parameters)
+#define GET_GetFramebufferAttachmentParameterivEXT(disp) GET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT)
+#define SET_GetFramebufferAttachmentParameterivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT, fn)
+#define CALL_GetRenderbufferParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetRenderbufferParameterivEXT, parameters)
+#define GET_GetRenderbufferParameterivEXT(disp) GET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT)
+#define SET_GetRenderbufferParameterivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT, fn)
+#define CALL_IsFramebufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsFramebufferEXT, parameters)
+#define GET_IsFramebufferEXT(disp) GET_by_offset(disp, _gloffset_IsFramebufferEXT)
+#define SET_IsFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_IsFramebufferEXT, fn)
+#define CALL_IsRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsRenderbufferEXT, parameters)
+#define GET_IsRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_IsRenderbufferEXT)
+#define SET_IsRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_IsRenderbufferEXT, fn)
+#define CALL_RenderbufferStorageEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei)), _gloffset_RenderbufferStorageEXT, parameters)
+#define GET_RenderbufferStorageEXT(disp) GET_by_offset(disp, _gloffset_RenderbufferStorageEXT)
+#define SET_RenderbufferStorageEXT(disp, fn) SET_by_offset(disp, _gloffset_RenderbufferStorageEXT, fn)
+#define CALL_BlitFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)), _gloffset_BlitFramebufferEXT, parameters)
+#define GET_BlitFramebufferEXT(disp) GET_by_offset(disp, _gloffset_BlitFramebufferEXT)
+#define SET_BlitFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BlitFramebufferEXT, fn)
+#define CALL_BufferParameteriAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_BufferParameteriAPPLE, parameters)
+#define GET_BufferParameteriAPPLE(disp) GET_by_offset(disp, _gloffset_BufferParameteriAPPLE)
+#define SET_BufferParameteriAPPLE(disp, fn) SET_by_offset(disp, _gloffset_BufferParameteriAPPLE, fn)
+#define CALL_FlushMappedBufferRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr)), _gloffset_FlushMappedBufferRangeAPPLE, parameters)
+#define GET_FlushMappedBufferRangeAPPLE(disp) GET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE)
+#define SET_FlushMappedBufferRangeAPPLE(disp, fn) SET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE, fn)
+#define CALL_BindFragDataLocationEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, const GLchar *)), _gloffset_BindFragDataLocationEXT, parameters)
+#define GET_BindFragDataLocationEXT(disp) GET_by_offset(disp, _gloffset_BindFragDataLocationEXT)
+#define SET_BindFragDataLocationEXT(disp, fn) SET_by_offset(disp, _gloffset_BindFragDataLocationEXT, fn)
+#define CALL_GetFragDataLocationEXT(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLuint, const GLchar *)), _gloffset_GetFragDataLocationEXT, parameters)
+#define GET_GetFragDataLocationEXT(disp) GET_by_offset(disp, _gloffset_GetFragDataLocationEXT)
+#define SET_GetFragDataLocationEXT(disp, fn) SET_by_offset(disp, _gloffset_GetFragDataLocationEXT, fn)
+#define CALL_GetUniformuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLuint *)), _gloffset_GetUniformuivEXT, parameters)
+#define GET_GetUniformuivEXT(disp) GET_by_offset(disp, _gloffset_GetUniformuivEXT)
+#define SET_GetUniformuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetUniformuivEXT, fn)
+#define CALL_GetVertexAttribIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribIivEXT, parameters)
+#define GET_GetVertexAttribIivEXT(disp) GET_by_offset(disp, _gloffset_GetVertexAttribIivEXT)
+#define SET_GetVertexAttribIivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribIivEXT, fn)
+#define CALL_GetVertexAttribIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetVertexAttribIuivEXT, parameters)
+#define GET_GetVertexAttribIuivEXT(disp) GET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT)
+#define SET_GetVertexAttribIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT, fn)
+#define CALL_Uniform1uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint)), _gloffset_Uniform1uiEXT, parameters)
+#define GET_Uniform1uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform1uiEXT)
+#define SET_Uniform1uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform1uiEXT, fn)
+#define CALL_Uniform1uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform1uivEXT, parameters)
+#define GET_Uniform1uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform1uivEXT)
+#define SET_Uniform1uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform1uivEXT, fn)
+#define CALL_Uniform2uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint)), _gloffset_Uniform2uiEXT, parameters)
+#define GET_Uniform2uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform2uiEXT)
+#define SET_Uniform2uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform2uiEXT, fn)
+#define CALL_Uniform2uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform2uivEXT, parameters)
+#define GET_Uniform2uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform2uivEXT)
+#define SET_Uniform2uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform2uivEXT, fn)
+#define CALL_Uniform3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint, GLuint)), _gloffset_Uniform3uiEXT, parameters)
+#define GET_Uniform3uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform3uiEXT)
+#define SET_Uniform3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform3uiEXT, fn)
+#define CALL_Uniform3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform3uivEXT, parameters)
+#define GET_Uniform3uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform3uivEXT)
+#define SET_Uniform3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform3uivEXT, fn)
+#define CALL_Uniform4uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint, GLuint, GLuint)), _gloffset_Uniform4uiEXT, parameters)
+#define GET_Uniform4uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform4uiEXT)
+#define SET_Uniform4uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform4uiEXT, fn)
+#define CALL_Uniform4uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform4uivEXT, parameters)
+#define GET_Uniform4uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform4uivEXT)
+#define SET_Uniform4uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform4uivEXT, fn)
+#define CALL_VertexAttribI1iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint)), _gloffset_VertexAttribI1iEXT, parameters)
+#define GET_VertexAttribI1iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1iEXT)
+#define SET_VertexAttribI1iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1iEXT, fn)
+#define CALL_VertexAttribI1ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI1ivEXT, parameters)
+#define GET_VertexAttribI1ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1ivEXT)
+#define SET_VertexAttribI1ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1ivEXT, fn)
+#define CALL_VertexAttribI1uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribI1uiEXT, parameters)
+#define GET_VertexAttribI1uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1uiEXT)
+#define SET_VertexAttribI1uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1uiEXT, fn)
+#define CALL_VertexAttribI1uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI1uivEXT, parameters)
+#define GET_VertexAttribI1uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1uivEXT)
+#define SET_VertexAttribI1uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1uivEXT, fn)
+#define CALL_VertexAttribI2iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint)), _gloffset_VertexAttribI2iEXT, parameters)
+#define GET_VertexAttribI2iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2iEXT)
+#define SET_VertexAttribI2iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2iEXT, fn)
+#define CALL_VertexAttribI2ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI2ivEXT, parameters)
+#define GET_VertexAttribI2ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2ivEXT)
+#define SET_VertexAttribI2ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2ivEXT, fn)
+#define CALL_VertexAttribI2uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_VertexAttribI2uiEXT, parameters)
+#define GET_VertexAttribI2uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2uiEXT)
+#define SET_VertexAttribI2uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2uiEXT, fn)
+#define CALL_VertexAttribI2uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI2uivEXT, parameters)
+#define GET_VertexAttribI2uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2uivEXT)
+#define SET_VertexAttribI2uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2uivEXT, fn)
+#define CALL_VertexAttribI3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint, GLint)), _gloffset_VertexAttribI3iEXT, parameters)
+#define GET_VertexAttribI3iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3iEXT)
+#define SET_VertexAttribI3iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3iEXT, fn)
+#define CALL_VertexAttribI3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI3ivEXT, parameters)
+#define GET_VertexAttribI3ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3ivEXT)
+#define SET_VertexAttribI3ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3ivEXT, fn)
+#define CALL_VertexAttribI3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_VertexAttribI3uiEXT, parameters)
+#define GET_VertexAttribI3uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3uiEXT)
+#define SET_VertexAttribI3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3uiEXT, fn)
+#define CALL_VertexAttribI3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI3uivEXT, parameters)
+#define GET_VertexAttribI3uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3uivEXT)
+#define SET_VertexAttribI3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3uivEXT, fn)
+#define CALL_VertexAttribI4bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttribI4bvEXT, parameters)
+#define GET_VertexAttribI4bvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4bvEXT)
+#define SET_VertexAttribI4bvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4bvEXT, fn)
+#define CALL_VertexAttribI4iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint, GLint, GLint)), _gloffset_VertexAttribI4iEXT, parameters)
+#define GET_VertexAttribI4iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4iEXT)
+#define SET_VertexAttribI4iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4iEXT, fn)
+#define CALL_VertexAttribI4ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI4ivEXT, parameters)
+#define GET_VertexAttribI4ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4ivEXT)
+#define SET_VertexAttribI4ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4ivEXT, fn)
+#define CALL_VertexAttribI4svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttribI4svEXT, parameters)
+#define GET_VertexAttribI4svEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4svEXT)
+#define SET_VertexAttribI4svEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4svEXT, fn)
+#define CALL_VertexAttribI4ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttribI4ubvEXT, parameters)
+#define GET_VertexAttribI4ubvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT)
+#define SET_VertexAttribI4ubvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT, fn)
+#define CALL_VertexAttribI4uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_VertexAttribI4uiEXT, parameters)
+#define GET_VertexAttribI4uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4uiEXT)
+#define SET_VertexAttribI4uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4uiEXT, fn)
+#define CALL_VertexAttribI4uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI4uivEXT, parameters)
+#define GET_VertexAttribI4uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4uivEXT)
+#define SET_VertexAttribI4uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4uivEXT, fn)
+#define CALL_VertexAttribI4usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttribI4usvEXT, parameters)
+#define GET_VertexAttribI4usvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4usvEXT)
+#define SET_VertexAttribI4usvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4usvEXT, fn)
+#define CALL_VertexAttribIPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexAttribIPointerEXT, parameters)
+#define GET_VertexAttribIPointerEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribIPointerEXT)
+#define SET_VertexAttribIPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribIPointerEXT, fn)
+#define CALL_FramebufferTextureLayerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLint)), _gloffset_FramebufferTextureLayerEXT, parameters)
+#define GET_FramebufferTextureLayerEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT)
+#define SET_FramebufferTextureLayerEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT, fn)
+#define CALL_ColorMaskIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean)), _gloffset_ColorMaskIndexedEXT, parameters)
+#define GET_ColorMaskIndexedEXT(disp) GET_by_offset(disp, _gloffset_ColorMaskIndexedEXT)
+#define SET_ColorMaskIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_ColorMaskIndexedEXT, fn)
+#define CALL_DisableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_DisableIndexedEXT, parameters)
+#define GET_DisableIndexedEXT(disp) GET_by_offset(disp, _gloffset_DisableIndexedEXT)
+#define SET_DisableIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_DisableIndexedEXT, fn)
+#define CALL_EnableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_EnableIndexedEXT, parameters)
+#define GET_EnableIndexedEXT(disp) GET_by_offset(disp, _gloffset_EnableIndexedEXT)
+#define SET_EnableIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_EnableIndexedEXT, fn)
+#define CALL_GetBooleanIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLboolean *)), _gloffset_GetBooleanIndexedvEXT, parameters)
+#define GET_GetBooleanIndexedvEXT(disp) GET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT)
+#define SET_GetBooleanIndexedvEXT(disp, fn) SET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT, fn)
+#define CALL_GetIntegerIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint *)), _gloffset_GetIntegerIndexedvEXT, parameters)
+#define GET_GetIntegerIndexedvEXT(disp) GET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT)
+#define SET_GetIntegerIndexedvEXT(disp, fn) SET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT, fn)
+#define CALL_IsEnabledIndexedEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_IsEnabledIndexedEXT, parameters)
+#define GET_IsEnabledIndexedEXT(disp) GET_by_offset(disp, _gloffset_IsEnabledIndexedEXT)
+#define SET_IsEnabledIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_IsEnabledIndexedEXT, fn)
+#define CALL_ClearColorIiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_ClearColorIiEXT, parameters)
+#define GET_ClearColorIiEXT(disp) GET_by_offset(disp, _gloffset_ClearColorIiEXT)
+#define SET_ClearColorIiEXT(disp, fn) SET_by_offset(disp, _gloffset_ClearColorIiEXT, fn)
+#define CALL_ClearColorIuiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_ClearColorIuiEXT, parameters)
+#define GET_ClearColorIuiEXT(disp) GET_by_offset(disp, _gloffset_ClearColorIuiEXT)
+#define SET_ClearColorIuiEXT(disp, fn) SET_by_offset(disp, _gloffset_ClearColorIuiEXT, fn)
+#define CALL_GetTexParameterIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexParameterIivEXT, parameters)
+#define GET_GetTexParameterIivEXT(disp) GET_by_offset(disp, _gloffset_GetTexParameterIivEXT)
+#define SET_GetTexParameterIivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterIivEXT, fn)
+#define CALL_GetTexParameterIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint *)), _gloffset_GetTexParameterIuivEXT, parameters)
+#define GET_GetTexParameterIuivEXT(disp) GET_by_offset(disp, _gloffset_GetTexParameterIuivEXT)
+#define SET_GetTexParameterIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterIuivEXT, fn)
+#define CALL_TexParameterIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexParameterIivEXT, parameters)
+#define GET_TexParameterIivEXT(disp) GET_by_offset(disp, _gloffset_TexParameterIivEXT)
+#define SET_TexParameterIivEXT(disp, fn) SET_by_offset(disp, _gloffset_TexParameterIivEXT, fn)
+#define CALL_TexParameterIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLuint *)), _gloffset_TexParameterIuivEXT, parameters)
+#define GET_TexParameterIuivEXT(disp) GET_by_offset(disp, _gloffset_TexParameterIuivEXT)
+#define SET_TexParameterIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_TexParameterIuivEXT, fn)
+#define CALL_BeginConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_BeginConditionalRenderNV, parameters)
+#define GET_BeginConditionalRenderNV(disp) GET_by_offset(disp, _gloffset_BeginConditionalRenderNV)
+#define SET_BeginConditionalRenderNV(disp, fn) SET_by_offset(disp, _gloffset_BeginConditionalRenderNV, fn)
+#define CALL_EndConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndConditionalRenderNV, parameters)
+#define GET_EndConditionalRenderNV(disp) GET_by_offset(disp, _gloffset_EndConditionalRenderNV)
+#define SET_EndConditionalRenderNV(disp, fn) SET_by_offset(disp, _gloffset_EndConditionalRenderNV, fn)
+#define CALL_BeginTransformFeedbackEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_BeginTransformFeedbackEXT, parameters)
+#define GET_BeginTransformFeedbackEXT(disp) GET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT)
+#define SET_BeginTransformFeedbackEXT(disp, fn) SET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT, fn)
+#define CALL_BindBufferBaseEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint)), _gloffset_BindBufferBaseEXT, parameters)
+#define GET_BindBufferBaseEXT(disp) GET_by_offset(disp, _gloffset_BindBufferBaseEXT)
+#define SET_BindBufferBaseEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferBaseEXT, fn)
+#define CALL_BindBufferOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLintptr)), _gloffset_BindBufferOffsetEXT, parameters)
+#define GET_BindBufferOffsetEXT(disp) GET_by_offset(disp, _gloffset_BindBufferOffsetEXT)
+#define SET_BindBufferOffsetEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferOffsetEXT, fn)
+#define CALL_BindBufferRangeEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr)), _gloffset_BindBufferRangeEXT, parameters)
+#define GET_BindBufferRangeEXT(disp) GET_by_offset(disp, _gloffset_BindBufferRangeEXT)
+#define SET_BindBufferRangeEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferRangeEXT, fn)
+#define CALL_EndTransformFeedbackEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndTransformFeedbackEXT, parameters)
+#define GET_EndTransformFeedbackEXT(disp) GET_by_offset(disp, _gloffset_EndTransformFeedbackEXT)
+#define SET_EndTransformFeedbackEXT(disp, fn) SET_by_offset(disp, _gloffset_EndTransformFeedbackEXT, fn)
+#define CALL_GetTransformFeedbackVaryingEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *)), _gloffset_GetTransformFeedbackVaryingEXT, parameters)
+#define GET_GetTransformFeedbackVaryingEXT(disp) GET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT)
+#define SET_GetTransformFeedbackVaryingEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT, fn)
+#define CALL_TransformFeedbackVaryingsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const char **, GLenum)), _gloffset_TransformFeedbackVaryingsEXT, parameters)
+#define GET_TransformFeedbackVaryingsEXT(disp) GET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT)
+#define SET_TransformFeedbackVaryingsEXT(disp, fn) SET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT, fn)
+#define CALL_ProvokingVertexEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ProvokingVertexEXT, parameters)
+#define GET_ProvokingVertexEXT(disp) GET_by_offset(disp, _gloffset_ProvokingVertexEXT)
+#define SET_ProvokingVertexEXT(disp, fn) SET_by_offset(disp, _gloffset_ProvokingVertexEXT, fn)
+#define CALL_GetTexParameterPointervAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), _gloffset_GetTexParameterPointervAPPLE, parameters)
+#define GET_GetTexParameterPointervAPPLE(disp) GET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE)
+#define SET_GetTexParameterPointervAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE, fn)
+#define CALL_TextureRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLvoid *)), _gloffset_TextureRangeAPPLE, parameters)
+#define GET_TextureRangeAPPLE(disp) GET_by_offset(disp, _gloffset_TextureRangeAPPLE)
+#define SET_TextureRangeAPPLE(disp, fn) SET_by_offset(disp, _gloffset_TextureRangeAPPLE, fn)
+#define CALL_GetObjectParameterivAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), _gloffset_GetObjectParameterivAPPLE, parameters)
+#define GET_GetObjectParameterivAPPLE(disp) GET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE)
+#define SET_GetObjectParameterivAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE, fn)
+#define CALL_ObjectPurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), _gloffset_ObjectPurgeableAPPLE, parameters)
+#define GET_ObjectPurgeableAPPLE(disp) GET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE)
+#define SET_ObjectPurgeableAPPLE(disp, fn) SET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE, fn)
+#define CALL_ObjectUnpurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), _gloffset_ObjectUnpurgeableAPPLE, parameters)
+#define GET_ObjectUnpurgeableAPPLE(disp) GET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE)
+#define SET_ObjectUnpurgeableAPPLE(disp, fn) SET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE, fn)
+#define CALL_ActiveProgramEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_ActiveProgramEXT, parameters)
+#define GET_ActiveProgramEXT(disp) GET_by_offset(disp, _gloffset_ActiveProgramEXT)
+#define SET_ActiveProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_ActiveProgramEXT, fn)
+#define CALL_CreateShaderProgramEXT(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum, const GLchar *)), _gloffset_CreateShaderProgramEXT, parameters)
+#define GET_CreateShaderProgramEXT(disp) GET_by_offset(disp, _gloffset_CreateShaderProgramEXT)
+#define SET_CreateShaderProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_CreateShaderProgramEXT, fn)
+#define CALL_UseShaderProgramEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_UseShaderProgramEXT, parameters)
+#define GET_UseShaderProgramEXT(disp) GET_by_offset(disp, _gloffset_UseShaderProgramEXT)
+#define SET_UseShaderProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_UseShaderProgramEXT, fn)
+#define CALL_TextureBarrierNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_TextureBarrierNV, parameters)
+#define GET_TextureBarrierNV(disp) GET_by_offset(disp, _gloffset_TextureBarrierNV)
+#define SET_TextureBarrierNV(disp, fn) SET_by_offset(disp, _gloffset_TextureBarrierNV, fn)
+#define CALL_StencilFuncSeparateATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), _gloffset_StencilFuncSeparateATI, parameters)
+#define GET_StencilFuncSeparateATI(disp) GET_by_offset(disp, _gloffset_StencilFuncSeparateATI)
+#define SET_StencilFuncSeparateATI(disp, fn) SET_by_offset(disp, _gloffset_StencilFuncSeparateATI, fn)
+#define CALL_ProgramEnvParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramEnvParameters4fvEXT, parameters)
+#define GET_ProgramEnvParameters4fvEXT(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT)
+#define SET_ProgramEnvParameters4fvEXT(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT, fn)
+#define CALL_ProgramLocalParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramLocalParameters4fvEXT, parameters)
+#define GET_ProgramLocalParameters4fvEXT(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT)
+#define SET_ProgramLocalParameters4fvEXT(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT, fn)
+#define CALL_GetQueryObjecti64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint64EXT *)), _gloffset_GetQueryObjecti64vEXT, parameters)
+#define GET_GetQueryObjecti64vEXT(disp) GET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT)
+#define SET_GetQueryObjecti64vEXT(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT, fn)
+#define CALL_GetQueryObjectui64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint64EXT *)), _gloffset_GetQueryObjectui64vEXT, parameters)
+#define GET_GetQueryObjectui64vEXT(disp) GET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT)
+#define SET_GetQueryObjectui64vEXT(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT, fn)
+#define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), _gloffset_EGLImageTargetRenderbufferStorageOES, parameters)
+#define GET_EGLImageTargetRenderbufferStorageOES(disp) GET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES)
+#define SET_EGLImageTargetRenderbufferStorageOES(disp, fn) SET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES, fn)
+#define CALL_EGLImageTargetTexture2DOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), _gloffset_EGLImageTargetTexture2DOES, parameters)
+#define GET_EGLImageTargetTexture2DOES(disp) GET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES)
+#define SET_EGLImageTargetTexture2DOES(disp, fn) SET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES, fn)
+
+#endif /* !defined( _GLAPI_DISPATCH_H_ ) */
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h index 02676006a..5ec641895 100644 --- a/mesalib/src/mesa/main/mtypes.h +++ b/mesalib/src/mesa/main/mtypes.h @@ -1,3373 +1,3383 @@ -/* - * Mesa 3-D graphics library - * Version: 7.7 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -/** - * \file mtypes.h - * Main Mesa data structures. - * - * Please try to mark derived values with a leading underscore ('_'). - */ - -#ifndef MTYPES_H -#define MTYPES_H - - -#include "main/glheader.h" -#include "main/config.h" -#include "main/mfeatures.h" -#include "glapi/glapi.h" -#include "math/m_matrix.h" /* GLmatrix */ -#include "main/simple_list.h" /* struct simple_node */ -#include "main/formats.h" /* MESA_FORMAT_COUNT */ - - -/** - * Color channel data type. - */ -#if CHAN_BITS == 8 - typedef GLubyte GLchan; -#define CHAN_MAX 255 -#define CHAN_MAXF 255.0F -#define CHAN_TYPE GL_UNSIGNED_BYTE -#elif CHAN_BITS == 16 - typedef GLushort GLchan; -#define CHAN_MAX 65535 -#define CHAN_MAXF 65535.0F -#define CHAN_TYPE GL_UNSIGNED_SHORT -#elif CHAN_BITS == 32 - typedef GLfloat GLchan; -#define CHAN_MAX 1.0 -#define CHAN_MAXF 1.0F -#define CHAN_TYPE GL_FLOAT -#else -#error "illegal number of color channel bits" -#endif - - -/** - * Stencil buffer data type. - */ -#if STENCIL_BITS==8 - typedef GLubyte GLstencil; -#elif STENCIL_BITS==16 - typedef GLushort GLstencil; -#else -# error "illegal number of stencil bits" -#endif - - -/** - * \name 64-bit extension of GLbitfield. - */ -/*@{*/ -typedef GLuint64 GLbitfield64; - -/** Set a single bit */ -#define BITFIELD64_BIT(b) ((GLbitfield64)1 << (b)) - - -/** - * \name Some forward type declarations - */ -/*@{*/ -struct _mesa_HashTable; -struct gl_attrib_node; -struct gl_list_extensions; -struct gl_meta_state; -struct gl_pixelstore_attrib; -struct gl_program_cache; -struct gl_texture_format; -struct gl_texture_image; -struct gl_texture_object; -struct gl_context; -struct st_context; -/*@}*/ - - -/** Extra draw modes beyond GL_POINTS, GL_TRIANGLE_FAN, etc */ -#define PRIM_OUTSIDE_BEGIN_END (GL_POLYGON+1) -#define PRIM_INSIDE_UNKNOWN_PRIM (GL_POLYGON+2) -#define PRIM_UNKNOWN (GL_POLYGON+3) - - -/** - * Shader stages. Note that these will become 5 with tessellation. - * These MUST have the same values as gallium's PIPE_SHADER_* - */ -typedef enum -{ - MESA_SHADER_VERTEX = 0, - MESA_SHADER_FRAGMENT = 1, - MESA_SHADER_GEOMETRY = 2, - MESA_SHADER_TYPES = 3 -} gl_shader_type; - - - -/** - * Indexes for vertex program attributes. - * GL_NV_vertex_program aliases generic attributes over the conventional - * attributes. In GL_ARB_vertex_program shader the aliasing is optional. - * In GL_ARB_vertex_shader / OpenGL 2.0 the aliasing is disallowed (the - * generic attributes are distinct/separate). - */ -typedef enum -{ - VERT_ATTRIB_POS = 0, - VERT_ATTRIB_WEIGHT = 1, - VERT_ATTRIB_NORMAL = 2, - VERT_ATTRIB_COLOR0 = 3, - VERT_ATTRIB_COLOR1 = 4, - VERT_ATTRIB_FOG = 5, - VERT_ATTRIB_COLOR_INDEX = 6, - VERT_ATTRIB_POINT_SIZE = 6, /*alias*/ - VERT_ATTRIB_EDGEFLAG = 7, - VERT_ATTRIB_TEX0 = 8, - VERT_ATTRIB_TEX1 = 9, - VERT_ATTRIB_TEX2 = 10, - VERT_ATTRIB_TEX3 = 11, - VERT_ATTRIB_TEX4 = 12, - VERT_ATTRIB_TEX5 = 13, - VERT_ATTRIB_TEX6 = 14, - VERT_ATTRIB_TEX7 = 15, - VERT_ATTRIB_GENERIC0 = 16, - VERT_ATTRIB_GENERIC1 = 17, - VERT_ATTRIB_GENERIC2 = 18, - VERT_ATTRIB_GENERIC3 = 19, - VERT_ATTRIB_GENERIC4 = 20, - VERT_ATTRIB_GENERIC5 = 21, - VERT_ATTRIB_GENERIC6 = 22, - VERT_ATTRIB_GENERIC7 = 23, - VERT_ATTRIB_GENERIC8 = 24, - VERT_ATTRIB_GENERIC9 = 25, - VERT_ATTRIB_GENERIC10 = 26, - VERT_ATTRIB_GENERIC11 = 27, - VERT_ATTRIB_GENERIC12 = 28, - VERT_ATTRIB_GENERIC13 = 29, - VERT_ATTRIB_GENERIC14 = 30, - VERT_ATTRIB_GENERIC15 = 31, - VERT_ATTRIB_MAX = 32 -} gl_vert_attrib; - -/** - * Bitflags for vertex attributes. - * These are used in bitfields in many places. - */ -/*@{*/ -#define VERT_BIT_POS (1 << VERT_ATTRIB_POS) -#define VERT_BIT_WEIGHT (1 << VERT_ATTRIB_WEIGHT) -#define VERT_BIT_NORMAL (1 << VERT_ATTRIB_NORMAL) -#define VERT_BIT_COLOR0 (1 << VERT_ATTRIB_COLOR0) -#define VERT_BIT_COLOR1 (1 << VERT_ATTRIB_COLOR1) -#define VERT_BIT_FOG (1 << VERT_ATTRIB_FOG) -#define VERT_BIT_COLOR_INDEX (1 << VERT_ATTRIB_COLOR_INDEX) -#define VERT_BIT_EDGEFLAG (1 << VERT_ATTRIB_EDGEFLAG) -#define VERT_BIT_TEX0 (1 << VERT_ATTRIB_TEX0) -#define VERT_BIT_TEX1 (1 << VERT_ATTRIB_TEX1) -#define VERT_BIT_TEX2 (1 << VERT_ATTRIB_TEX2) -#define VERT_BIT_TEX3 (1 << VERT_ATTRIB_TEX3) -#define VERT_BIT_TEX4 (1 << VERT_ATTRIB_TEX4) -#define VERT_BIT_TEX5 (1 << VERT_ATTRIB_TEX5) -#define VERT_BIT_TEX6 (1 << VERT_ATTRIB_TEX6) -#define VERT_BIT_TEX7 (1 << VERT_ATTRIB_TEX7) -#define VERT_BIT_GENERIC0 (1 << VERT_ATTRIB_GENERIC0) -#define VERT_BIT_GENERIC1 (1 << VERT_ATTRIB_GENERIC1) -#define VERT_BIT_GENERIC2 (1 << VERT_ATTRIB_GENERIC2) -#define VERT_BIT_GENERIC3 (1 << VERT_ATTRIB_GENERIC3) -#define VERT_BIT_GENERIC4 (1 << VERT_ATTRIB_GENERIC4) -#define VERT_BIT_GENERIC5 (1 << VERT_ATTRIB_GENERIC5) -#define VERT_BIT_GENERIC6 (1 << VERT_ATTRIB_GENERIC6) -#define VERT_BIT_GENERIC7 (1 << VERT_ATTRIB_GENERIC7) -#define VERT_BIT_GENERIC8 (1 << VERT_ATTRIB_GENERIC8) -#define VERT_BIT_GENERIC9 (1 << VERT_ATTRIB_GENERIC9) -#define VERT_BIT_GENERIC10 (1 << VERT_ATTRIB_GENERIC10) -#define VERT_BIT_GENERIC11 (1 << VERT_ATTRIB_GENERIC11) -#define VERT_BIT_GENERIC12 (1 << VERT_ATTRIB_GENERIC12) -#define VERT_BIT_GENERIC13 (1 << VERT_ATTRIB_GENERIC13) -#define VERT_BIT_GENERIC14 (1 << VERT_ATTRIB_GENERIC14) -#define VERT_BIT_GENERIC15 (1 << VERT_ATTRIB_GENERIC15) - -#define VERT_BIT_TEX(u) (1 << (VERT_ATTRIB_TEX0 + (u))) -#define VERT_BIT_GENERIC(g) (1 << (VERT_ATTRIB_GENERIC0 + (g))) -/*@}*/ - - -/** - * Indexes for vertex program result attributes - */ -typedef enum -{ - VERT_RESULT_HPOS = 0, - VERT_RESULT_COL0 = 1, - VERT_RESULT_COL1 = 2, - VERT_RESULT_FOGC = 3, - VERT_RESULT_TEX0 = 4, - VERT_RESULT_TEX1 = 5, - VERT_RESULT_TEX2 = 6, - VERT_RESULT_TEX3 = 7, - VERT_RESULT_TEX4 = 8, - VERT_RESULT_TEX5 = 9, - VERT_RESULT_TEX6 = 10, - VERT_RESULT_TEX7 = 11, - VERT_RESULT_PSIZ = 12, - VERT_RESULT_BFC0 = 13, - VERT_RESULT_BFC1 = 14, - VERT_RESULT_EDGE = 15, - VERT_RESULT_VAR0 = 16, /**< shader varying */ - VERT_RESULT_MAX = (VERT_RESULT_VAR0 + MAX_VARYING) -} gl_vert_result; - - -/*********************************************/ - -/** - * Indexes for geometry program attributes. - */ -typedef enum -{ - GEOM_ATTRIB_POSITION = 0, - GEOM_ATTRIB_COLOR0 = 1, - GEOM_ATTRIB_COLOR1 = 2, - GEOM_ATTRIB_SECONDARY_COLOR0 = 3, - GEOM_ATTRIB_SECONDARY_COLOR1 = 4, - GEOM_ATTRIB_FOG_FRAG_COORD = 5, - GEOM_ATTRIB_POINT_SIZE = 6, - GEOM_ATTRIB_CLIP_VERTEX = 7, - GEOM_ATTRIB_PRIMITIVE_ID = 8, - GEOM_ATTRIB_TEX_COORD = 9, - - GEOM_ATTRIB_VAR0 = 16, - GEOM_ATTRIB_MAX = (GEOM_ATTRIB_VAR0 + MAX_VARYING) -} gl_geom_attrib; - -/** - * Bitflags for geometry attributes. - * These are used in bitfields in many places. - */ -/*@{*/ -#define GEOM_BIT_COLOR0 (1 << GEOM_ATTRIB_COLOR0) -#define GEOM_BIT_COLOR1 (1 << GEOM_ATTRIB_COLOR1) -#define GEOM_BIT_SCOLOR0 (1 << GEOM_ATTRIB_SECONDARY_COLOR0) -#define GEOM_BIT_SCOLOR1 (1 << GEOM_ATTRIB_SECONDARY_COLOR1) -#define GEOM_BIT_TEX_COORD (1 << GEOM_ATTRIB_TEX_COORD) -#define GEOM_BIT_FOG_COORD (1 << GEOM_ATTRIB_FOG_FRAG_COORD) -#define GEOM_BIT_POSITION (1 << GEOM_ATTRIB_POSITION) -#define GEOM_BIT_POINT_SIDE (1 << GEOM_ATTRIB_POINT_SIZE) -#define GEOM_BIT_CLIP_VERTEX (1 << GEOM_ATTRIB_CLIP_VERTEX) -#define GEOM_BIT_PRIM_ID (1 << GEOM_ATTRIB_PRIMITIVE_ID) -#define GEOM_BIT_VAR0 (1 << GEOM_ATTRIB_VAR0) - -#define GEOM_BIT_VAR(g) (1 << (GEOM_BIT_VAR0 + (g))) -/*@}*/ - - -/** - * Indexes for geometry program result attributes - */ -typedef enum -{ - GEOM_RESULT_POS = 0, - GEOM_RESULT_COL0 = 1, - GEOM_RESULT_COL1 = 2, - GEOM_RESULT_SCOL0 = 3, - GEOM_RESULT_SCOL1 = 4, - GEOM_RESULT_FOGC = 5, - GEOM_RESULT_TEX0 = 6, - GEOM_RESULT_TEX1 = 7, - GEOM_RESULT_TEX2 = 8, - GEOM_RESULT_TEX3 = 9, - GEOM_RESULT_TEX4 = 10, - GEOM_RESULT_TEX5 = 11, - GEOM_RESULT_TEX6 = 12, - GEOM_RESULT_TEX7 = 13, - GEOM_RESULT_PSIZ = 14, - GEOM_RESULT_CLPV = 15, - GEOM_RESULT_PRID = 16, - GEOM_RESULT_LAYR = 17, - GEOM_RESULT_VAR0 = 18, /**< shader varying, should really be 16 */ - /* ### we need to -2 because var0 is 18 instead 16 like in the others */ - GEOM_RESULT_MAX = (GEOM_RESULT_VAR0 + MAX_VARYING - 2) -} gl_geom_result; - - -/** - * Indexes for fragment program input attributes. - */ -typedef enum -{ - FRAG_ATTRIB_WPOS = 0, - FRAG_ATTRIB_COL0 = 1, - FRAG_ATTRIB_COL1 = 2, - FRAG_ATTRIB_FOGC = 3, - FRAG_ATTRIB_TEX0 = 4, - FRAG_ATTRIB_TEX1 = 5, - FRAG_ATTRIB_TEX2 = 6, - FRAG_ATTRIB_TEX3 = 7, - FRAG_ATTRIB_TEX4 = 8, - FRAG_ATTRIB_TEX5 = 9, - FRAG_ATTRIB_TEX6 = 10, - FRAG_ATTRIB_TEX7 = 11, - FRAG_ATTRIB_FACE = 12, /**< front/back face */ - FRAG_ATTRIB_PNTC = 13, /**< sprite/point coord */ - FRAG_ATTRIB_VAR0 = 14, /**< shader varying */ - FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + MAX_VARYING) -} gl_frag_attrib; - -/** - * Bitflags for fragment program input attributes. - */ -/*@{*/ -#define FRAG_BIT_WPOS (1 << FRAG_ATTRIB_WPOS) -#define FRAG_BIT_COL0 (1 << FRAG_ATTRIB_COL0) -#define FRAG_BIT_COL1 (1 << FRAG_ATTRIB_COL1) -#define FRAG_BIT_FOGC (1 << FRAG_ATTRIB_FOGC) -#define FRAG_BIT_FACE (1 << FRAG_ATTRIB_FACE) -#define FRAG_BIT_PNTC (1 << FRAG_ATTRIB_PNTC) -#define FRAG_BIT_TEX0 (1 << FRAG_ATTRIB_TEX0) -#define FRAG_BIT_TEX1 (1 << FRAG_ATTRIB_TEX1) -#define FRAG_BIT_TEX2 (1 << FRAG_ATTRIB_TEX2) -#define FRAG_BIT_TEX3 (1 << FRAG_ATTRIB_TEX3) -#define FRAG_BIT_TEX4 (1 << FRAG_ATTRIB_TEX4) -#define FRAG_BIT_TEX5 (1 << FRAG_ATTRIB_TEX5) -#define FRAG_BIT_TEX6 (1 << FRAG_ATTRIB_TEX6) -#define FRAG_BIT_TEX7 (1 << FRAG_ATTRIB_TEX7) -#define FRAG_BIT_VAR0 (1 << FRAG_ATTRIB_VAR0) - -#define FRAG_BIT_TEX(U) (FRAG_BIT_TEX0 << (U)) -#define FRAG_BIT_VAR(V) (FRAG_BIT_VAR0 << (V)) - -#define FRAG_BITS_TEX_ANY (FRAG_BIT_TEX0| \ - FRAG_BIT_TEX1| \ - FRAG_BIT_TEX2| \ - FRAG_BIT_TEX3| \ - FRAG_BIT_TEX4| \ - FRAG_BIT_TEX5| \ - FRAG_BIT_TEX6| \ - FRAG_BIT_TEX7) -/*@}*/ - - -/** - * Fragment program results - */ -typedef enum -{ - FRAG_RESULT_DEPTH = 0, - FRAG_RESULT_STENCIL = 1, - FRAG_RESULT_COLOR = 2, - FRAG_RESULT_DATA0 = 3, - FRAG_RESULT_MAX = (FRAG_RESULT_DATA0 + MAX_DRAW_BUFFERS) -} gl_frag_result; - - -/** - * Indexes for all renderbuffers - */ -typedef enum -{ - /* the four standard color buffers */ - BUFFER_FRONT_LEFT, - BUFFER_BACK_LEFT, - BUFFER_FRONT_RIGHT, - BUFFER_BACK_RIGHT, - BUFFER_DEPTH, - BUFFER_STENCIL, - BUFFER_ACCUM, - /* optional aux buffer */ - BUFFER_AUX0, - /* generic renderbuffers */ - BUFFER_COLOR0, - BUFFER_COLOR1, - BUFFER_COLOR2, - BUFFER_COLOR3, - BUFFER_COLOR4, - BUFFER_COLOR5, - BUFFER_COLOR6, - BUFFER_COLOR7, - BUFFER_COUNT -} gl_buffer_index; - -/** - * Bit flags for all renderbuffers - */ -#define BUFFER_BIT_FRONT_LEFT (1 << BUFFER_FRONT_LEFT) -#define BUFFER_BIT_BACK_LEFT (1 << BUFFER_BACK_LEFT) -#define BUFFER_BIT_FRONT_RIGHT (1 << BUFFER_FRONT_RIGHT) -#define BUFFER_BIT_BACK_RIGHT (1 << BUFFER_BACK_RIGHT) -#define BUFFER_BIT_AUX0 (1 << BUFFER_AUX0) -#define BUFFER_BIT_AUX1 (1 << BUFFER_AUX1) -#define BUFFER_BIT_AUX2 (1 << BUFFER_AUX2) -#define BUFFER_BIT_AUX3 (1 << BUFFER_AUX3) -#define BUFFER_BIT_DEPTH (1 << BUFFER_DEPTH) -#define BUFFER_BIT_STENCIL (1 << BUFFER_STENCIL) -#define BUFFER_BIT_ACCUM (1 << BUFFER_ACCUM) -#define BUFFER_BIT_COLOR0 (1 << BUFFER_COLOR0) -#define BUFFER_BIT_COLOR1 (1 << BUFFER_COLOR1) -#define BUFFER_BIT_COLOR2 (1 << BUFFER_COLOR2) -#define BUFFER_BIT_COLOR3 (1 << BUFFER_COLOR3) -#define BUFFER_BIT_COLOR4 (1 << BUFFER_COLOR4) -#define BUFFER_BIT_COLOR5 (1 << BUFFER_COLOR5) -#define BUFFER_BIT_COLOR6 (1 << BUFFER_COLOR6) -#define BUFFER_BIT_COLOR7 (1 << BUFFER_COLOR7) - -/** - * Mask of all the color buffer bits (but not accum). - */ -#define BUFFER_BITS_COLOR (BUFFER_BIT_FRONT_LEFT | \ - BUFFER_BIT_BACK_LEFT | \ - BUFFER_BIT_FRONT_RIGHT | \ - BUFFER_BIT_BACK_RIGHT | \ - BUFFER_BIT_AUX0 | \ - BUFFER_BIT_COLOR0 | \ - BUFFER_BIT_COLOR1 | \ - BUFFER_BIT_COLOR2 | \ - BUFFER_BIT_COLOR3 | \ - BUFFER_BIT_COLOR4 | \ - BUFFER_BIT_COLOR5 | \ - BUFFER_BIT_COLOR6 | \ - BUFFER_BIT_COLOR7) - - -/** - * Framebuffer configuration (aka visual / pixelformat) - * Note: some of these fields should be boolean, but it appears that - * code in drivers/dri/common/util.c requires int-sized fields. - */ -struct gl_config -{ - GLboolean rgbMode; - GLboolean floatMode; - GLboolean colorIndexMode; /* XXX is this used anywhere? */ - GLuint doubleBufferMode; - GLuint stereoMode; - - GLboolean haveAccumBuffer; - GLboolean haveDepthBuffer; - GLboolean haveStencilBuffer; - - GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ - GLuint redMask, greenMask, blueMask, alphaMask; - GLint rgbBits; /* total bits for rgb */ - GLint indexBits; /* total bits for colorindex */ - - GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; - GLint depthBits; - GLint stencilBits; - - GLint numAuxBuffers; - - GLint level; - - /* EXT_visual_rating / GLX 1.2 */ - GLint visualRating; - - /* EXT_visual_info / GLX 1.2 */ - GLint transparentPixel; - /* colors are floats scaled to ints */ - GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; - GLint transparentIndex; - - /* ARB_multisample / SGIS_multisample */ - GLint sampleBuffers; - GLint samples; - - /* SGIX_pbuffer / GLX 1.3 */ - GLint maxPbufferWidth; - GLint maxPbufferHeight; - GLint maxPbufferPixels; - GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */ - GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */ - - /* OML_swap_method */ - GLint swapMethod; - - /* EXT_texture_from_pixmap */ - GLint bindToTextureRgb; - GLint bindToTextureRgba; - GLint bindToMipmapTexture; - GLint bindToTextureTargets; - GLint yInverted; - - /* EXT_framebuffer_sRGB */ - GLint sRGBCapable; -}; - - -/** - * Data structure for color tables - */ -struct gl_color_table -{ - GLenum InternalFormat; /**< The user-specified format */ - GLenum _BaseFormat; /**< GL_ALPHA, GL_RGBA, GL_RGB, etc */ - GLuint Size; /**< number of entries in table */ - GLfloat *TableF; /**< Color table, floating point values */ - GLubyte *TableUB; /**< Color table, ubyte values */ - GLubyte RedSize; - GLubyte GreenSize; - GLubyte BlueSize; - GLubyte AlphaSize; - GLubyte LuminanceSize; - GLubyte IntensitySize; -}; - - -/** - * \name Bit flags used for updating material values. - */ -/*@{*/ -#define MAT_ATTRIB_FRONT_AMBIENT 0 -#define MAT_ATTRIB_BACK_AMBIENT 1 -#define MAT_ATTRIB_FRONT_DIFFUSE 2 -#define MAT_ATTRIB_BACK_DIFFUSE 3 -#define MAT_ATTRIB_FRONT_SPECULAR 4 -#define MAT_ATTRIB_BACK_SPECULAR 5 -#define MAT_ATTRIB_FRONT_EMISSION 6 -#define MAT_ATTRIB_BACK_EMISSION 7 -#define MAT_ATTRIB_FRONT_SHININESS 8 -#define MAT_ATTRIB_BACK_SHININESS 9 -#define MAT_ATTRIB_FRONT_INDEXES 10 -#define MAT_ATTRIB_BACK_INDEXES 11 -#define MAT_ATTRIB_MAX 12 - -#define MAT_ATTRIB_AMBIENT(f) (MAT_ATTRIB_FRONT_AMBIENT+(f)) -#define MAT_ATTRIB_DIFFUSE(f) (MAT_ATTRIB_FRONT_DIFFUSE+(f)) -#define MAT_ATTRIB_SPECULAR(f) (MAT_ATTRIB_FRONT_SPECULAR+(f)) -#define MAT_ATTRIB_EMISSION(f) (MAT_ATTRIB_FRONT_EMISSION+(f)) -#define MAT_ATTRIB_SHININESS(f)(MAT_ATTRIB_FRONT_SHININESS+(f)) -#define MAT_ATTRIB_INDEXES(f) (MAT_ATTRIB_FRONT_INDEXES+(f)) - -#define MAT_INDEX_AMBIENT 0 -#define MAT_INDEX_DIFFUSE 1 -#define MAT_INDEX_SPECULAR 2 - -#define MAT_BIT_FRONT_AMBIENT (1<<MAT_ATTRIB_FRONT_AMBIENT) -#define MAT_BIT_BACK_AMBIENT (1<<MAT_ATTRIB_BACK_AMBIENT) -#define MAT_BIT_FRONT_DIFFUSE (1<<MAT_ATTRIB_FRONT_DIFFUSE) -#define MAT_BIT_BACK_DIFFUSE (1<<MAT_ATTRIB_BACK_DIFFUSE) -#define MAT_BIT_FRONT_SPECULAR (1<<MAT_ATTRIB_FRONT_SPECULAR) -#define MAT_BIT_BACK_SPECULAR (1<<MAT_ATTRIB_BACK_SPECULAR) -#define MAT_BIT_FRONT_EMISSION (1<<MAT_ATTRIB_FRONT_EMISSION) -#define MAT_BIT_BACK_EMISSION (1<<MAT_ATTRIB_BACK_EMISSION) -#define MAT_BIT_FRONT_SHININESS (1<<MAT_ATTRIB_FRONT_SHININESS) -#define MAT_BIT_BACK_SHININESS (1<<MAT_ATTRIB_BACK_SHININESS) -#define MAT_BIT_FRONT_INDEXES (1<<MAT_ATTRIB_FRONT_INDEXES) -#define MAT_BIT_BACK_INDEXES (1<<MAT_ATTRIB_BACK_INDEXES) - - -#define FRONT_MATERIAL_BITS (MAT_BIT_FRONT_EMISSION | \ - MAT_BIT_FRONT_AMBIENT | \ - MAT_BIT_FRONT_DIFFUSE | \ - MAT_BIT_FRONT_SPECULAR | \ - MAT_BIT_FRONT_SHININESS | \ - MAT_BIT_FRONT_INDEXES) - -#define BACK_MATERIAL_BITS (MAT_BIT_BACK_EMISSION | \ - MAT_BIT_BACK_AMBIENT | \ - MAT_BIT_BACK_DIFFUSE | \ - MAT_BIT_BACK_SPECULAR | \ - MAT_BIT_BACK_SHININESS | \ - MAT_BIT_BACK_INDEXES) - -#define ALL_MATERIAL_BITS (FRONT_MATERIAL_BITS | BACK_MATERIAL_BITS) -/*@}*/ - - -#define EXP_TABLE_SIZE 512 /**< Specular exponent lookup table sizes */ -#define SHINE_TABLE_SIZE 256 /**< Material shininess lookup table sizes */ - -/** - * Material shininess lookup table. - */ -struct gl_shine_tab -{ - struct gl_shine_tab *next, *prev; - GLfloat tab[SHINE_TABLE_SIZE+1]; - GLfloat shininess; - GLuint refcount; -}; - - -/** - * Light source state. - */ -struct gl_light -{ - struct gl_light *next; /**< double linked list with sentinel */ - struct gl_light *prev; - - GLfloat Ambient[4]; /**< ambient color */ - GLfloat Diffuse[4]; /**< diffuse color */ - GLfloat Specular[4]; /**< specular color */ - GLfloat EyePosition[4]; /**< position in eye coordinates */ - GLfloat SpotDirection[4]; /**< spotlight direction in eye coordinates */ - GLfloat SpotExponent; - GLfloat SpotCutoff; /**< in degrees */ - GLfloat _CosCutoffNeg; /**< = cos(SpotCutoff) */ - GLfloat _CosCutoff; /**< = MAX(0, cos(SpotCutoff)) */ - GLfloat ConstantAttenuation; - GLfloat LinearAttenuation; - GLfloat QuadraticAttenuation; - GLboolean Enabled; /**< On/off flag */ - - /** - * \name Derived fields - */ - /*@{*/ - GLbitfield _Flags; /**< State */ - - GLfloat _Position[4]; /**< position in eye/obj coordinates */ - GLfloat _VP_inf_norm[3]; /**< Norm direction to infinite light */ - GLfloat _h_inf_norm[3]; /**< Norm( _VP_inf_norm + <0,0,1> ) */ - GLfloat _NormSpotDirection[4]; /**< normalized spotlight direction */ - GLfloat _VP_inf_spot_attenuation; - - GLfloat _SpotExpTable[EXP_TABLE_SIZE][2]; /**< to replace a pow() call */ - GLfloat _MatAmbient[2][3]; /**< material ambient * light ambient */ - GLfloat _MatDiffuse[2][3]; /**< material diffuse * light diffuse */ - GLfloat _MatSpecular[2][3]; /**< material spec * light specular */ - GLfloat _dli; /**< CI diffuse light intensity */ - GLfloat _sli; /**< CI specular light intensity */ - /*@}*/ -}; - - -/** - * Light model state. - */ -struct gl_lightmodel -{ - GLfloat Ambient[4]; /**< ambient color */ - GLboolean LocalViewer; /**< Local (or infinite) view point? */ - GLboolean TwoSide; /**< Two (or one) sided lighting? */ - GLenum ColorControl; /**< either GL_SINGLE_COLOR - * or GL_SEPARATE_SPECULAR_COLOR */ -}; - - -/** - * Material state. - */ -struct gl_material -{ - GLfloat Attrib[MAT_ATTRIB_MAX][4]; -}; - - -/** - * Accumulation buffer attribute group (GL_ACCUM_BUFFER_BIT) - */ -struct gl_accum_attrib -{ - GLfloat ClearColor[4]; /**< Accumulation buffer clear color */ -}; - - -/** - * Color buffer attribute group (GL_COLOR_BUFFER_BIT). - */ -struct gl_colorbuffer_attrib -{ - GLuint ClearIndex; /**< Index to use for glClear */ - GLfloat ClearColorUnclamped[4]; /**< Color to use for glClear*/ - GLclampf ClearColor[4]; /**< Color to use for glClear */ - - GLuint IndexMask; /**< Color index write mask */ - GLubyte ColorMask[MAX_DRAW_BUFFERS][4];/**< Each flag is 0xff or 0x0 */ - - GLenum DrawBuffer[MAX_DRAW_BUFFERS]; /**< Which buffer to draw into */ - - /** - * \name alpha testing - */ - /*@{*/ - GLboolean AlphaEnabled; /**< Alpha test enabled flag */ - GLenum AlphaFunc; /**< Alpha test function */ - GLfloat AlphaRefUnclamped; - GLclampf AlphaRef; /**< Alpha reference value */ - /*@}*/ - - /** - * \name Blending - */ - /*@{*/ - GLbitfield BlendEnabled; /**< Per-buffer blend enable flags */ - - /* NOTE: this does _not_ depend on fragment clamping or any other clamping control, - * only on the fixed-pointness of the render target. - * The query does however depend on fragment color clamping. - */ - GLfloat BlendColorUnclamped[4]; /**< Blending color */ - GLfloat BlendColor[4]; /**< Blending color */ - - struct - { - GLenum SrcRGB; /**< RGB blend source term */ - GLenum DstRGB; /**< RGB blend dest term */ - GLenum SrcA; /**< Alpha blend source term */ - GLenum DstA; /**< Alpha blend dest term */ - GLenum EquationRGB; /**< GL_ADD, GL_SUBTRACT, etc. */ - GLenum EquationA; /**< GL_ADD, GL_SUBTRACT, etc. */ - } Blend[MAX_DRAW_BUFFERS]; - /** Are the blend func terms currently different for each buffer/target? */ - GLboolean _BlendFuncPerBuffer; - /** Are the blend equations currently different for each buffer/target? */ - GLboolean _BlendEquationPerBuffer; - /*@}*/ - - /** - * \name Logic op - */ - /*@{*/ - GLenum LogicOp; /**< Logic operator */ - GLboolean IndexLogicOpEnabled; /**< Color index logic op enabled flag */ - GLboolean ColorLogicOpEnabled; /**< RGBA logic op enabled flag */ - GLboolean _LogicOpEnabled; /**< RGBA logic op + EXT_blend_logic_op enabled flag */ - /*@}*/ - - GLboolean DitherFlag; /**< Dither enable flag */ - - GLenum ClampFragmentColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */ - GLboolean _ClampFragmentColor; /** < with GL_FIXED_ONLY_ARB resolved */ - GLenum ClampReadColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */ - GLboolean _ClampReadColor; /** < with GL_FIXED_ONLY_ARB resolved */ - - GLboolean sRGBEnabled; /**< Framebuffer sRGB blending/updating requested */ -}; - - -/** - * Current attribute group (GL_CURRENT_BIT). - */ -struct gl_current_attrib -{ - /** - * \name Current vertex attributes. - * \note Values are valid only after FLUSH_VERTICES has been called. - * \note Index and Edgeflag current values are stored as floats in the - * SIX and SEVEN attribute slots. - */ - GLfloat Attrib[VERT_ATTRIB_MAX][4]; /**< Position, color, texcoords, etc */ - - /** - * \name Current raster position attributes (always valid). - * \note This set of attributes is very similar to the SWvertex struct. - */ - /*@{*/ - GLfloat RasterPos[4]; - GLfloat RasterDistance; - GLfloat RasterColor[4]; - GLfloat RasterSecondaryColor[4]; - GLfloat RasterTexCoords[MAX_TEXTURE_COORD_UNITS][4]; - GLboolean RasterPosValid; - /*@}*/ -}; - - -/** - * Depth buffer attribute group (GL_DEPTH_BUFFER_BIT). - */ -struct gl_depthbuffer_attrib -{ - GLenum Func; /**< Function for depth buffer compare */ - GLclampd Clear; /**< Value to clear depth buffer to */ - GLboolean Test; /**< Depth buffering enabled flag */ - GLboolean Mask; /**< Depth buffer writable? */ - GLboolean BoundsTest; /**< GL_EXT_depth_bounds_test */ - GLfloat BoundsMin, BoundsMax;/**< GL_EXT_depth_bounds_test */ -}; - - -/** - * Evaluator attribute group (GL_EVAL_BIT). - */ -struct gl_eval_attrib -{ - /** - * \name Enable bits - */ - /*@{*/ - GLboolean Map1Color4; - GLboolean Map1Index; - GLboolean Map1Normal; - GLboolean Map1TextureCoord1; - GLboolean Map1TextureCoord2; - GLboolean Map1TextureCoord3; - GLboolean Map1TextureCoord4; - GLboolean Map1Vertex3; - GLboolean Map1Vertex4; - GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */ - GLboolean Map2Color4; - GLboolean Map2Index; - GLboolean Map2Normal; - GLboolean Map2TextureCoord1; - GLboolean Map2TextureCoord2; - GLboolean Map2TextureCoord3; - GLboolean Map2TextureCoord4; - GLboolean Map2Vertex3; - GLboolean Map2Vertex4; - GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */ - GLboolean AutoNormal; - /*@}*/ - - /** - * \name Map Grid endpoints and divisions and calculated du values - */ - /*@{*/ - GLint MapGrid1un; - GLfloat MapGrid1u1, MapGrid1u2, MapGrid1du; - GLint MapGrid2un, MapGrid2vn; - GLfloat MapGrid2u1, MapGrid2u2, MapGrid2du; - GLfloat MapGrid2v1, MapGrid2v2, MapGrid2dv; - /*@}*/ -}; - - -/** - * Fog attribute group (GL_FOG_BIT). - */ -struct gl_fog_attrib -{ - GLboolean Enabled; /**< Fog enabled flag */ - GLfloat ColorUnclamped[4]; /**< Fog color */ - GLfloat Color[4]; /**< Fog color */ - GLfloat Density; /**< Density >= 0.0 */ - GLfloat Start; /**< Start distance in eye coords */ - GLfloat End; /**< End distance in eye coords */ - GLfloat Index; /**< Fog index */ - GLenum Mode; /**< Fog mode */ - GLboolean ColorSumEnabled; - GLenum FogCoordinateSource; /**< GL_EXT_fog_coord */ - GLfloat _Scale; /**< (End == Start) ? 1.0 : 1.0 / (End - Start) */ -}; - - -/** - * \brief Layout qualifiers for gl_FragDepth. - * - * Extension AMD_conservative_depth allows gl_FragDepth to be redeclared with - * a layout qualifier. - * - * \see enum ir_depth_layout - */ -enum gl_frag_depth_layout { - FRAG_DEPTH_LAYOUT_NONE, /**< No layout is specified. */ - FRAG_DEPTH_LAYOUT_ANY, - FRAG_DEPTH_LAYOUT_GREATER, - FRAG_DEPTH_LAYOUT_LESS, - FRAG_DEPTH_LAYOUT_UNCHANGED -}; - - -/** - * Hint attribute group (GL_HINT_BIT). - * - * Values are always one of GL_FASTEST, GL_NICEST, or GL_DONT_CARE. - */ -struct gl_hint_attrib -{ - GLenum PerspectiveCorrection; - GLenum PointSmooth; - GLenum LineSmooth; - GLenum PolygonSmooth; - GLenum Fog; - GLenum ClipVolumeClipping; /**< GL_EXT_clip_volume_hint */ - GLenum TextureCompression; /**< GL_ARB_texture_compression */ - GLenum GenerateMipmap; /**< GL_SGIS_generate_mipmap */ - GLenum FragmentShaderDerivative; /**< GL_ARB_fragment_shader */ -}; - -/** - * Light state flags. - */ -/*@{*/ -#define LIGHT_SPOT 0x1 -#define LIGHT_LOCAL_VIEWER 0x2 -#define LIGHT_POSITIONAL 0x4 -#define LIGHT_NEED_VERTICES (LIGHT_POSITIONAL|LIGHT_LOCAL_VIEWER) -/*@}*/ - - -/** - * Lighting attribute group (GL_LIGHT_BIT). - */ -struct gl_light_attrib -{ - struct gl_light Light[MAX_LIGHTS]; /**< Array of light sources */ - struct gl_lightmodel Model; /**< Lighting model */ - - /** - * Must flush FLUSH_VERTICES before referencing: - */ - /*@{*/ - struct gl_material Material; /**< Includes front & back values */ - /*@}*/ - - GLboolean Enabled; /**< Lighting enabled flag */ - GLenum ShadeModel; /**< GL_FLAT or GL_SMOOTH */ - GLenum ProvokingVertex; /**< GL_EXT_provoking_vertex */ - GLenum ColorMaterialFace; /**< GL_FRONT, BACK or FRONT_AND_BACK */ - GLenum ColorMaterialMode; /**< GL_AMBIENT, GL_DIFFUSE, etc */ - GLbitfield ColorMaterialBitmask; /**< bitmask formed from Face and Mode */ - GLboolean ColorMaterialEnabled; - GLenum ClampVertexColor; - GLboolean _ClampVertexColor; - - struct gl_light EnabledList; /**< List sentinel */ - - /** - * Derived state for optimizations: - */ - /*@{*/ - GLboolean _NeedEyeCoords; - GLboolean _NeedVertices; /**< Use fast shader? */ - GLbitfield _Flags; /**< LIGHT_* flags, see above */ - GLfloat _BaseColor[2][3]; - /*@}*/ -}; - - -/** - * Line attribute group (GL_LINE_BIT). - */ -struct gl_line_attrib -{ - GLboolean SmoothFlag; /**< GL_LINE_SMOOTH enabled? */ - GLboolean StippleFlag; /**< GL_LINE_STIPPLE enabled? */ - GLushort StipplePattern; /**< Stipple pattern */ - GLint StippleFactor; /**< Stipple repeat factor */ - GLfloat Width; /**< Line width */ -}; - - -/** - * Display list attribute group (GL_LIST_BIT). - */ -struct gl_list_attrib -{ - GLuint ListBase; -}; - - -/** - * Multisample attribute group (GL_MULTISAMPLE_BIT). - */ -struct gl_multisample_attrib -{ - GLboolean Enabled; - GLboolean _Enabled; /**< true if Enabled and multisample buffer */ - GLboolean SampleAlphaToCoverage; - GLboolean SampleAlphaToOne; - GLboolean SampleCoverage; - GLfloat SampleCoverageValue; - GLboolean SampleCoverageInvert; -}; - - -/** - * A pixelmap (see glPixelMap) - */ -struct gl_pixelmap -{ - GLint Size; - GLfloat Map[MAX_PIXEL_MAP_TABLE]; - GLubyte Map8[MAX_PIXEL_MAP_TABLE]; /**< converted to 8-bit color */ -}; - - -/** - * Collection of all pixelmaps - */ -struct gl_pixelmaps -{ - struct gl_pixelmap RtoR; /**< i.e. GL_PIXEL_MAP_R_TO_R */ - struct gl_pixelmap GtoG; - struct gl_pixelmap BtoB; - struct gl_pixelmap AtoA; - struct gl_pixelmap ItoR; - struct gl_pixelmap ItoG; - struct gl_pixelmap ItoB; - struct gl_pixelmap ItoA; - struct gl_pixelmap ItoI; - struct gl_pixelmap StoS; -}; - - -/** - * Pixel attribute group (GL_PIXEL_MODE_BIT). - */ -struct gl_pixel_attrib -{ - GLenum ReadBuffer; /**< source buffer for glRead/CopyPixels() */ - - /*--- Begin Pixel Transfer State ---*/ - /* Fields are in the order in which they're applied... */ - - /** Scale & Bias (index shift, offset) */ - /*@{*/ - GLfloat RedBias, RedScale; - GLfloat GreenBias, GreenScale; - GLfloat BlueBias, BlueScale; - GLfloat AlphaBias, AlphaScale; - GLfloat DepthBias, DepthScale; - GLint IndexShift, IndexOffset; - /*@}*/ - - /* Pixel Maps */ - /* Note: actual pixel maps are not part of this attrib group */ - GLboolean MapColorFlag; - GLboolean MapStencilFlag; - - /*--- End Pixel Transfer State ---*/ - - /** glPixelZoom */ - GLfloat ZoomX, ZoomY; -}; - - -/** - * Point attribute group (GL_POINT_BIT). - */ -struct gl_point_attrib -{ - GLboolean SmoothFlag; /**< True if GL_POINT_SMOOTH is enabled */ - GLfloat Size; /**< User-specified point size */ - GLfloat Params[3]; /**< GL_EXT_point_parameters */ - GLfloat MinSize, MaxSize; /**< GL_EXT_point_parameters */ - GLfloat Threshold; /**< GL_EXT_point_parameters */ - GLboolean _Attenuated; /**< True if Params != [1, 0, 0] */ - GLboolean PointSprite; /**< GL_NV/ARB_point_sprite */ - GLboolean CoordReplace[MAX_TEXTURE_COORD_UNITS]; /**< GL_ARB_point_sprite*/ - GLenum SpriteRMode; /**< GL_NV_point_sprite (only!) */ - GLenum SpriteOrigin; /**< GL_ARB_point_sprite */ -}; - - -/** - * Polygon attribute group (GL_POLYGON_BIT). - */ -struct gl_polygon_attrib -{ - GLenum FrontFace; /**< Either GL_CW or GL_CCW */ - GLenum FrontMode; /**< Either GL_POINT, GL_LINE or GL_FILL */ - GLenum BackMode; /**< Either GL_POINT, GL_LINE or GL_FILL */ - GLboolean _FrontBit; /**< 0=GL_CCW, 1=GL_CW */ - GLboolean CullFlag; /**< Culling on/off flag */ - GLboolean SmoothFlag; /**< True if GL_POLYGON_SMOOTH is enabled */ - GLboolean StippleFlag; /**< True if GL_POLYGON_STIPPLE is enabled */ - GLenum CullFaceMode; /**< Culling mode GL_FRONT or GL_BACK */ - GLfloat OffsetFactor; /**< Polygon offset factor, from user */ - GLfloat OffsetUnits; /**< Polygon offset units, from user */ - GLboolean OffsetPoint; /**< Offset in GL_POINT mode */ - GLboolean OffsetLine; /**< Offset in GL_LINE mode */ - GLboolean OffsetFill; /**< Offset in GL_FILL mode */ -}; - - -/** - * Scissor attributes (GL_SCISSOR_BIT). - */ -struct gl_scissor_attrib -{ - GLboolean Enabled; /**< Scissor test enabled? */ - GLint X, Y; /**< Lower left corner of box */ - GLsizei Width, Height; /**< Size of box */ -}; - - -/** - * Stencil attribute group (GL_STENCIL_BUFFER_BIT). - * - * Three sets of stencil data are tracked so that OpenGL 2.0, - * GL_EXT_stencil_two_side, and GL_ATI_separate_stencil can all be supported - * simultaneously. In each of the stencil state arrays, element 0 corresponds - * to GL_FRONT. Element 1 corresponds to the OpenGL 2.0 / - * GL_ATI_separate_stencil GL_BACK state. Element 2 corresponds to the - * GL_EXT_stencil_two_side GL_BACK state. - * - * The derived value \c _BackFace is either 1 or 2 depending on whether or - * not GL_STENCIL_TEST_TWO_SIDE_EXT is enabled. - * - * The derived value \c _TestTwoSide is set when the front-face and back-face - * stencil state are different. - */ -struct gl_stencil_attrib -{ - GLboolean Enabled; /**< Enabled flag */ - GLboolean TestTwoSide; /**< GL_EXT_stencil_two_side */ - GLubyte ActiveFace; /**< GL_EXT_stencil_two_side (0 or 2) */ - GLboolean _Enabled; /**< Enabled and stencil buffer present */ - GLboolean _TestTwoSide; - GLubyte _BackFace; /**< Current back stencil state (1 or 2) */ - GLenum Function[3]; /**< Stencil function */ - GLenum FailFunc[3]; /**< Fail function */ - GLenum ZPassFunc[3]; /**< Depth buffer pass function */ - GLenum ZFailFunc[3]; /**< Depth buffer fail function */ - GLint Ref[3]; /**< Reference value */ - GLuint ValueMask[3]; /**< Value mask */ - GLuint WriteMask[3]; /**< Write mask */ - GLuint Clear; /**< Clear value */ -}; - - -/** - * An index for each type of texture object. These correspond to the GL - * texture target enums, such as GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP, etc. - * Note: the order is from highest priority to lowest priority. - */ -typedef enum -{ - TEXTURE_2D_ARRAY_INDEX, - TEXTURE_1D_ARRAY_INDEX, - TEXTURE_CUBE_INDEX, - TEXTURE_3D_INDEX, - TEXTURE_RECT_INDEX, - TEXTURE_2D_INDEX, - TEXTURE_1D_INDEX, - NUM_TEXTURE_TARGETS -} gl_texture_index; - - -/** - * Bit flags for each type of texture object - * Used for Texture.Unit[]._ReallyEnabled flags. - */ -/*@{*/ -#define TEXTURE_2D_ARRAY_BIT (1 << TEXTURE_2D_ARRAY_INDEX) -#define TEXTURE_1D_ARRAY_BIT (1 << TEXTURE_1D_ARRAY_INDEX) -#define TEXTURE_CUBE_BIT (1 << TEXTURE_CUBE_INDEX) -#define TEXTURE_3D_BIT (1 << TEXTURE_3D_INDEX) -#define TEXTURE_RECT_BIT (1 << TEXTURE_RECT_INDEX) -#define TEXTURE_2D_BIT (1 << TEXTURE_2D_INDEX) -#define TEXTURE_1D_BIT (1 << TEXTURE_1D_INDEX) -/*@}*/ - - -/** - * TexGenEnabled flags. - */ -/*@{*/ -#define S_BIT 1 -#define T_BIT 2 -#define R_BIT 4 -#define Q_BIT 8 -#define STR_BITS (S_BIT | T_BIT | R_BIT) -/*@}*/ - - -/** - * Bit flag versions of the corresponding GL_ constants. - */ -/*@{*/ -#define TEXGEN_SPHERE_MAP 0x1 -#define TEXGEN_OBJ_LINEAR 0x2 -#define TEXGEN_EYE_LINEAR 0x4 -#define TEXGEN_REFLECTION_MAP_NV 0x8 -#define TEXGEN_NORMAL_MAP_NV 0x10 - -#define TEXGEN_NEED_NORMALS (TEXGEN_SPHERE_MAP | \ - TEXGEN_REFLECTION_MAP_NV | \ - TEXGEN_NORMAL_MAP_NV) -#define TEXGEN_NEED_EYE_COORD (TEXGEN_SPHERE_MAP | \ - TEXGEN_REFLECTION_MAP_NV | \ - TEXGEN_NORMAL_MAP_NV | \ - TEXGEN_EYE_LINEAR) -/*@}*/ - - - -/** Tex-gen enabled for texture unit? */ -#define ENABLE_TEXGEN(unit) (1 << (unit)) - -/** Non-identity texture matrix for texture unit? */ -#define ENABLE_TEXMAT(unit) (1 << (unit)) - - -/** - * Texel fetch function prototype. We use texel fetch functions to - * extract RGBA, color indexes and depth components out of 1D, 2D and 3D - * texture images. These functions help to isolate us from the gritty - * details of all the various texture image encodings. - * - * \param texImage texture image. - * \param col texel column. - * \param row texel row. - * \param img texel image level/layer. - * \param texelOut output texel (up to 4 GLchans) - */ -typedef void (*FetchTexelFuncC)( const struct gl_texture_image *texImage, - GLint col, GLint row, GLint img, - GLchan *texelOut ); - -/** - * As above, but returns floats. - * Used for depth component images and for upcoming signed/float - * texture images. - */ -typedef void (*FetchTexelFuncF)( const struct gl_texture_image *texImage, - GLint col, GLint row, GLint img, - GLfloat *texelOut ); - - -typedef void (*StoreTexelFunc)(struct gl_texture_image *texImage, - GLint col, GLint row, GLint img, - const void *texel); - - -/** - * Texture image state. Describes the dimensions of a texture image, - * the texel format and pointers to Texel Fetch functions. - */ -struct gl_texture_image -{ - GLint InternalFormat; /**< Internal format as given by the user */ - GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_ALPHA, - * GL_LUMINANCE, GL_LUMINANCE_ALPHA, - * GL_INTENSITY, GL_COLOR_INDEX, - * GL_DEPTH_COMPONENT or GL_DEPTH_STENCIL_EXT - * only. Used for choosing TexEnv arithmetic. - */ - gl_format TexFormat; /**< The actual texture memory format */ - - GLuint Border; /**< 0 or 1 */ - GLuint Width; /**< = 2^WidthLog2 + 2*Border */ - GLuint Height; /**< = 2^HeightLog2 + 2*Border */ - GLuint Depth; /**< = 2^DepthLog2 + 2*Border */ - GLuint Width2; /**< = Width - 2*Border */ - GLuint Height2; /**< = Height - 2*Border */ - GLuint Depth2; /**< = Depth - 2*Border */ - GLuint WidthLog2; /**< = log2(Width2) */ - GLuint HeightLog2; /**< = log2(Height2) */ - GLuint DepthLog2; /**< = log2(Depth2) */ - GLuint MaxLog2; /**< = MAX(WidthLog2, HeightLog2) */ - GLfloat WidthScale; /**< used for mipmap LOD computation */ - GLfloat HeightScale; /**< used for mipmap LOD computation */ - GLfloat DepthScale; /**< used for mipmap LOD computation */ - GLboolean IsClientData; /**< Data owned by client? */ - GLboolean _IsPowerOfTwo; /**< Are all dimensions powers of two? */ - - struct gl_texture_object *TexObject; /**< Pointer back to parent object */ - - FetchTexelFuncC FetchTexelc; /**< GLchan texel fetch function pointer */ - FetchTexelFuncF FetchTexelf; /**< Float texel fetch function pointer */ - - GLuint RowStride; /**< Padded width in units of texels */ - GLuint *ImageOffsets; /**< if 3D texture: array [Depth] of offsets to - each 2D slice in 'Data', in texels */ - GLvoid *Data; /**< Image data, accessed via FetchTexel() */ - - /** - * \name For device driver: - */ - /*@{*/ - void *DriverData; /**< Arbitrary device driver data */ - /*@}*/ -}; - - -/** - * Indexes for cube map faces. - */ -typedef enum -{ - FACE_POS_X = 0, - FACE_NEG_X = 1, - FACE_POS_Y = 2, - FACE_NEG_Y = 3, - FACE_POS_Z = 4, - FACE_NEG_Z = 5, - MAX_FACES = 6 -} gl_face_index; - - -/** - * Texture object state. Contains the array of mipmap images, border color, - * wrap modes, filter modes, shadow/texcompare state, and the per-texture - * color palette. - */ -struct gl_texture_object -{ - _glthread_Mutex Mutex; /**< for thread safety */ - GLint RefCount; /**< reference count */ - GLuint Name; /**< the user-visible texture object ID */ - GLenum Target; /**< GL_TEXTURE_1D, GL_TEXTURE_2D, etc. */ - GLfloat Priority; /**< in [0,1] */ - union { - GLfloat f[4]; - GLuint ui[4]; - GLint i[4]; - } BorderColor; /**< Interpreted according to texture format */ - GLenum WrapS; /**< S-axis texture image wrap mode */ - GLenum WrapT; /**< T-axis texture image wrap mode */ - GLenum WrapR; /**< R-axis texture image wrap mode */ - GLenum MinFilter; /**< minification filter */ - GLenum MagFilter; /**< magnification filter */ - GLfloat MinLod; /**< min lambda, OpenGL 1.2 */ - GLfloat MaxLod; /**< max lambda, OpenGL 1.2 */ - GLfloat LodBias; /**< OpenGL 1.4 */ - GLint BaseLevel; /**< min mipmap level, OpenGL 1.2 */ - GLint MaxLevel; /**< max mipmap level, OpenGL 1.2 */ - GLfloat MaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */ - GLenum CompareMode; /**< GL_ARB_shadow */ - GLenum CompareFunc; /**< GL_ARB_shadow */ - GLfloat CompareFailValue; /**< GL_ARB_shadow_ambient */ - GLenum DepthMode; /**< GL_ARB_depth_texture */ - GLint _MaxLevel; /**< actual max mipmap level (q in the spec) */ - GLfloat _MaxLambda; /**< = _MaxLevel - BaseLevel (q - b in spec) */ - GLint CropRect[4]; /**< GL_OES_draw_texture */ - GLenum Swizzle[4]; /**< GL_EXT_texture_swizzle */ - GLuint _Swizzle; /**< same as Swizzle, but SWIZZLE_* format */ - GLboolean GenerateMipmap; /**< GL_SGIS_generate_mipmap */ - GLboolean _Complete; /**< Is texture object complete? */ - GLboolean _RenderToTexture; /**< Any rendering to this texture? */ - GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */ - GLenum sRGBDecode; /**< GL_DECODE_EXT or GL_SKIP_DECODE_EXT */ - - /** Actual texture images, indexed by [cube face] and [mipmap level] */ - struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS]; - - /** GL_EXT_paletted_texture */ - struct gl_color_table Palette; - - /** - * \name For device driver. - * Note: instead of attaching driver data to this pointer, it's preferable - * to instead use this struct as a base class for your own texture object - * class. Driver->NewTextureObject() can be used to implement the - * allocation. - */ - void *DriverData; /**< Arbitrary device driver data */ -}; - - -/** Up to four combiner sources are possible with GL_NV_texture_env_combine4 */ -#define MAX_COMBINER_TERMS 4 - - -/** - * Texture combine environment state. - */ -struct gl_tex_env_combine_state -{ - GLenum ModeRGB; /**< GL_REPLACE, GL_DECAL, GL_ADD, etc. */ - GLenum ModeA; /**< GL_REPLACE, GL_DECAL, GL_ADD, etc. */ - /** Source terms: GL_PRIMARY_COLOR, GL_TEXTURE, etc */ - GLenum SourceRGB[MAX_COMBINER_TERMS]; - GLenum SourceA[MAX_COMBINER_TERMS]; - /** Source operands: GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, etc */ - GLenum OperandRGB[MAX_COMBINER_TERMS]; - GLenum OperandA[MAX_COMBINER_TERMS]; - GLuint ScaleShiftRGB; /**< 0, 1 or 2 */ - GLuint ScaleShiftA; /**< 0, 1 or 2 */ - GLuint _NumArgsRGB; /**< Number of inputs used for the RGB combiner */ - GLuint _NumArgsA; /**< Number of inputs used for the A combiner */ -}; - - -/** - * Texture coord generation state. - */ -struct gl_texgen -{ - GLenum Mode; /**< GL_EYE_LINEAR, GL_SPHERE_MAP, etc */ - GLbitfield _ModeBit; /**< TEXGEN_x bit corresponding to Mode */ - GLfloat ObjectPlane[4]; - GLfloat EyePlane[4]; -}; - - -/** - * Texture unit state. Contains enable flags, texture environment/function/ - * combiners, texgen state, pointers to current texture objects and - * post-filter color tables. - */ -struct gl_texture_unit -{ - GLbitfield Enabled; /**< bitmask of TEXTURE_*_BIT flags */ - GLbitfield _ReallyEnabled; /**< 0 or exactly one of TEXTURE_*_BIT flags */ - - GLenum EnvMode; /**< GL_MODULATE, GL_DECAL, GL_BLEND, etc. */ - GLclampf EnvColor[4]; - GLfloat EnvColorUnclamped[4]; - - struct gl_texgen GenS; - struct gl_texgen GenT; - struct gl_texgen GenR; - struct gl_texgen GenQ; - GLbitfield TexGenEnabled; /**< Bitwise-OR of [STRQ]_BIT values */ - GLbitfield _GenFlags; /**< Bitwise-OR of Gen[STRQ]._ModeBit */ - - GLfloat LodBias; /**< for biasing mipmap levels */ - GLenum BumpTarget; - GLfloat RotMatrix[4]; /* 2x2 matrix */ - - /** - * \name GL_EXT_texture_env_combine - */ - struct gl_tex_env_combine_state Combine; - - /** - * Derived state based on \c EnvMode and the \c BaseFormat of the - * currently enabled texture. - */ - struct gl_tex_env_combine_state _EnvMode; - - /** - * Currently enabled combiner state. This will point to either - * \c Combine or \c _EnvMode. - */ - struct gl_tex_env_combine_state *_CurrentCombine; - - /** Current texture object pointers */ - struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS]; - - /** Points to highest priority, complete and enabled texture object */ - struct gl_texture_object *_Current; -}; - - -/** - * Texture attribute group (GL_TEXTURE_BIT). - */ -struct gl_texture_attrib -{ - GLuint CurrentUnit; /**< GL_ACTIVE_TEXTURE */ - struct gl_texture_unit Unit[MAX_COMBINED_TEXTURE_IMAGE_UNITS]; - - struct gl_texture_object *ProxyTex[NUM_TEXTURE_TARGETS]; - - /** GL_ARB_seamless_cubemap */ - GLboolean CubeMapSeamless; - - /** GL_EXT_shared_texture_palette */ - GLboolean SharedPalette; - struct gl_color_table Palette; - - /** Texture units/samplers used by vertex or fragment texturing */ - GLbitfield _EnabledUnits; - - /** Texture coord units/sets used for fragment texturing */ - GLbitfield _EnabledCoordUnits; - - /** Texture coord units that have texgen enabled */ - GLbitfield _TexGenEnabled; - - /** Texture coord units that have non-identity matrices */ - GLbitfield _TexMatEnabled; - - /** Bitwise-OR of all Texture.Unit[i]._GenFlags */ - GLbitfield _GenFlags; -}; - - -/** - * Transformation attribute group (GL_TRANSFORM_BIT). - */ -struct gl_transform_attrib -{ - GLenum MatrixMode; /**< Matrix mode */ - GLfloat EyeUserPlane[MAX_CLIP_PLANES][4]; /**< User clip planes */ - GLfloat _ClipUserPlane[MAX_CLIP_PLANES][4]; /**< derived */ - GLbitfield ClipPlanesEnabled; /**< on/off bitmask */ - GLboolean Normalize; /**< Normalize all normals? */ - GLboolean RescaleNormals; /**< GL_EXT_rescale_normal */ - GLboolean RasterPositionUnclipped; /**< GL_IBM_rasterpos_clip */ - GLboolean DepthClamp; /**< GL_ARB_depth_clamp */ - - GLfloat CullEyePos[4]; - GLfloat CullObjPos[4]; -}; - - -/** - * Viewport attribute group (GL_VIEWPORT_BIT). - */ -struct gl_viewport_attrib -{ - GLint X, Y; /**< position */ - GLsizei Width, Height; /**< size */ - GLfloat Near, Far; /**< Depth buffer range */ - GLmatrix _WindowMap; /**< Mapping transformation as a matrix. */ -}; - - -/** - * GL_ARB_vertex/pixel_buffer_object buffer object - */ -struct gl_buffer_object -{ - _glthread_Mutex Mutex; - GLint RefCount; - GLuint Name; - GLenum Usage; /**< GL_STREAM_DRAW_ARB, GL_STREAM_READ_ARB, etc. */ - GLsizeiptrARB Size; /**< Size of buffer storage in bytes */ - GLubyte *Data; /**< Location of storage either in RAM or VRAM. */ - /** Fields describing a mapped buffer */ - /*@{*/ - GLbitfield AccessFlags; /**< Mask of GL_MAP_x_BIT flags */ - GLvoid *Pointer; /**< User-space address of mapping */ - GLintptr Offset; /**< Mapped offset */ - GLsizeiptr Length; /**< Mapped length */ - /*@}*/ - GLboolean Written; /**< Ever written to? (for debugging) */ - GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */ -}; - - -/** - * Client pixel packing/unpacking attributes - */ -struct gl_pixelstore_attrib -{ - GLint Alignment; - GLint RowLength; - GLint SkipPixels; - GLint SkipRows; - GLint ImageHeight; - GLint SkipImages; - GLboolean SwapBytes; - GLboolean LsbFirst; - GLboolean ClientStorage; /**< GL_APPLE_client_storage */ - GLboolean Invert; /**< GL_MESA_pack_invert */ - struct gl_buffer_object *BufferObj; /**< GL_ARB_pixel_buffer_object */ -}; - - -/** - * Client vertex array attributes - */ -struct gl_client_array -{ - GLint Size; /**< components per element (1,2,3,4) */ - GLenum Type; /**< datatype: GL_FLOAT, GL_INT, etc */ - GLenum Format; /**< default: GL_RGBA, but may be GL_BGRA */ - GLsizei Stride; /**< user-specified stride */ - GLsizei StrideB; /**< actual stride in bytes */ - const GLubyte *Ptr; /**< Points to array data */ - GLboolean Enabled; /**< Enabled flag is a boolean */ - GLboolean Normalized; /**< GL_ARB_vertex_program */ - GLboolean Integer; /**< Integer-valued? */ - GLuint InstanceDivisor; /**< GL_ARB_instanced_arrays */ - GLuint _ElementSize; /**< size of each element in bytes */ - - struct gl_buffer_object *BufferObj;/**< GL_ARB_vertex_buffer_object */ - GLuint _MaxElement; /**< max element index into array buffer + 1 */ -}; - - -/** - * Collection of vertex arrays. Defined by the GL_APPLE_vertex_array_object - * extension, but a nice encapsulation in any case. - */ -struct gl_array_object -{ - /** Name of the array object as received from glGenVertexArrayAPPLE. */ - GLuint Name; - - GLint RefCount; - _glthread_Mutex Mutex; - GLboolean VBOonly; /**< require all arrays to live in VBOs? */ - - /** Conventional vertex arrays */ - /*@{*/ - struct gl_client_array Vertex; - struct gl_client_array Weight; - struct gl_client_array Normal; - struct gl_client_array Color; - struct gl_client_array SecondaryColor; - struct gl_client_array FogCoord; - struct gl_client_array Index; - struct gl_client_array EdgeFlag; - struct gl_client_array TexCoord[MAX_TEXTURE_COORD_UNITS]; - struct gl_client_array PointSize; - /*@}*/ - - /** - * Generic arrays for vertex programs/shaders. - * For NV vertex programs, these attributes alias and take priority - * over the conventional attribs above. For ARB vertex programs and - * GLSL vertex shaders, these attributes are separate. - */ - struct gl_client_array VertexAttrib[MAX_VERTEX_GENERIC_ATTRIBS]; - - /** Mask of _NEW_ARRAY_* values indicating which arrays are enabled */ - GLbitfield _Enabled; - - /** - * Min of all enabled arrays' _MaxElement. When arrays reside inside VBOs - * we can determine the max legal (in bounds) glDrawElements array index. - */ - GLuint _MaxElement; -}; - - -/** - * Vertex array state - */ -struct gl_array_attrib -{ - /** Currently bound array object. See _mesa_BindVertexArrayAPPLE() */ - struct gl_array_object *ArrayObj; - - /** The default vertex array object */ - struct gl_array_object *DefaultArrayObj; - - /** Array objects (GL_ARB/APPLE_vertex_array_object) */ - struct _mesa_HashTable *Objects; - - GLint ActiveTexture; /**< Client Active Texture */ - GLuint LockFirst; /**< GL_EXT_compiled_vertex_array */ - GLuint LockCount; /**< GL_EXT_compiled_vertex_array */ - - /** GL 3.1 (slightly different from GL_NV_primitive_restart) */ - GLboolean PrimitiveRestart; - GLuint RestartIndex; - - GLbitfield NewState; /**< mask of _NEW_ARRAY_* values */ - GLboolean RebindArrays; /**< whether the VBO module should rebind arrays */ - - /* GL_ARB_vertex_buffer_object */ - struct gl_buffer_object *ArrayBufferObj; - struct gl_buffer_object *ElementArrayBufferObj; -}; - - -/** - * Feedback buffer state - */ -struct gl_feedback -{ - GLenum Type; - GLbitfield _Mask; /**< FB_* bits */ - GLfloat *Buffer; - GLuint BufferSize; - GLuint Count; -}; - - -/** - * Selection buffer state - */ -struct gl_selection -{ - GLuint *Buffer; /**< selection buffer */ - GLuint BufferSize; /**< size of the selection buffer */ - GLuint BufferCount; /**< number of values in the selection buffer */ - GLuint Hits; /**< number of records in the selection buffer */ - GLuint NameStackDepth; /**< name stack depth */ - GLuint NameStack[MAX_NAME_STACK_DEPTH]; /**< name stack */ - GLboolean HitFlag; /**< hit flag */ - GLfloat HitMinZ; /**< minimum hit depth */ - GLfloat HitMaxZ; /**< maximum hit depth */ -}; - - -/** - * 1-D Evaluator control points - */ -struct gl_1d_map -{ - GLuint Order; /**< Number of control points */ - GLfloat u1, u2, du; /**< u1, u2, 1.0/(u2-u1) */ - GLfloat *Points; /**< Points to contiguous control points */ -}; - - -/** - * 2-D Evaluator control points - */ -struct gl_2d_map -{ - GLuint Uorder; /**< Number of control points in U dimension */ - GLuint Vorder; /**< Number of control points in V dimension */ - GLfloat u1, u2, du; - GLfloat v1, v2, dv; - GLfloat *Points; /**< Points to contiguous control points */ -}; - - -/** - * All evaluator control point state - */ -struct gl_evaluators -{ - /** - * \name 1-D maps - */ - /*@{*/ - struct gl_1d_map Map1Vertex3; - struct gl_1d_map Map1Vertex4; - struct gl_1d_map Map1Index; - struct gl_1d_map Map1Color4; - struct gl_1d_map Map1Normal; - struct gl_1d_map Map1Texture1; - struct gl_1d_map Map1Texture2; - struct gl_1d_map Map1Texture3; - struct gl_1d_map Map1Texture4; - struct gl_1d_map Map1Attrib[16]; /**< GL_NV_vertex_program */ - /*@}*/ - - /** - * \name 2-D maps - */ - /*@{*/ - struct gl_2d_map Map2Vertex3; - struct gl_2d_map Map2Vertex4; - struct gl_2d_map Map2Index; - struct gl_2d_map Map2Color4; - struct gl_2d_map Map2Normal; - struct gl_2d_map Map2Texture1; - struct gl_2d_map Map2Texture2; - struct gl_2d_map Map2Texture3; - struct gl_2d_map Map2Texture4; - struct gl_2d_map Map2Attrib[16]; /**< GL_NV_vertex_program */ - /*@}*/ -}; - - -/** - * Names of the various vertex/fragment program register files, etc. - * - * NOTE: first four tokens must fit into 2 bits (see t_vb_arbprogram.c) - * All values should fit in a 4-bit field. - * - * NOTE: PROGRAM_ENV_PARAM, PROGRAM_STATE_VAR, PROGRAM_NAMED_PARAM, - * PROGRAM_CONSTANT, and PROGRAM_UNIFORM can all be considered to - * be "uniform" variables since they can only be set outside glBegin/End. - * They're also all stored in the same Parameters array. - */ -typedef enum -{ - PROGRAM_TEMPORARY, /**< machine->Temporary[] */ - PROGRAM_INPUT, /**< machine->Inputs[] */ - PROGRAM_OUTPUT, /**< machine->Outputs[] */ - PROGRAM_VARYING, /**< machine->Inputs[]/Outputs[] */ - PROGRAM_LOCAL_PARAM, /**< gl_program->LocalParams[] */ - PROGRAM_ENV_PARAM, /**< gl_program->Parameters[] */ - PROGRAM_STATE_VAR, /**< gl_program->Parameters[] */ - PROGRAM_NAMED_PARAM, /**< gl_program->Parameters[] */ - PROGRAM_CONSTANT, /**< gl_program->Parameters[] */ - PROGRAM_UNIFORM, /**< gl_program->Parameters[] */ - PROGRAM_WRITE_ONLY, /**< A dummy, write-only register */ - PROGRAM_ADDRESS, /**< machine->AddressReg */ - PROGRAM_SAMPLER, /**< for shader samplers, compile-time only */ - PROGRAM_SYSTEM_VALUE,/**< InstanceId, PrimitiveID, etc. */ - PROGRAM_UNDEFINED, /**< Invalid/TBD value */ - PROGRAM_FILE_MAX -} gl_register_file; - - -/** - * If the register file is PROGRAM_SYSTEM_VALUE, the register index will be - * one of these values. - */ -typedef enum -{ - SYSTEM_VALUE_FRONT_FACE, /**< Fragment shader only (not done yet) */ - SYSTEM_VALUE_INSTANCE_ID, /**< Vertex shader only */ - SYSTEM_VALUE_MAX /**< Number of values */ -} gl_system_value; - - -/** Vertex and fragment instructions */ -struct prog_instruction; -struct gl_program_parameter_list; -struct gl_uniform_list; - - -/** - * Base class for any kind of program object - */ -struct gl_program -{ - GLuint Id; - GLubyte *String; /**< Null-terminated program text */ - GLint RefCount; - GLenum Target; /**< GL_VERTEX/FRAGMENT_PROGRAM_ARB, GL_FRAGMENT_PROGRAM_NV */ - GLenum Format; /**< String encoding format */ - GLboolean Resident; - - struct prog_instruction *Instructions; - - GLbitfield InputsRead; /**< Bitmask of which input regs are read */ - GLbitfield64 OutputsWritten; /**< Bitmask of which output regs are written */ - GLbitfield SystemValuesRead; /**< Bitmask of SYSTEM_VALUE_x inputs used */ - GLbitfield InputFlags[MAX_PROGRAM_INPUTS]; /**< PROG_PARAM_BIT_x flags */ - GLbitfield OutputFlags[MAX_PROGRAM_OUTPUTS]; /**< PROG_PARAM_BIT_x flags */ - GLbitfield TexturesUsed[MAX_TEXTURE_UNITS]; /**< TEXTURE_x_BIT bitmask */ - GLbitfield SamplersUsed; /**< Bitfield of which samplers are used */ - GLbitfield ShadowSamplers; /**< Texture units used for shadow sampling. */ - - - /** Named parameters, constants, etc. from program text */ - struct gl_program_parameter_list *Parameters; - /** Numbered local parameters */ - GLfloat LocalParams[MAX_PROGRAM_LOCAL_PARAMS][4]; - - /** Vertex/fragment shader varying vars */ - struct gl_program_parameter_list *Varying; - /** Vertex program user-defined attributes */ - struct gl_program_parameter_list *Attributes; - - /** Map from sampler unit to texture unit (set by glUniform1i()) */ - GLubyte SamplerUnits[MAX_SAMPLERS]; - /** Which texture target is being sampled (TEXTURE_1D/2D/3D/etc_INDEX) */ - gl_texture_index SamplerTargets[MAX_SAMPLERS]; - - /** Bitmask of which register files are read/written with indirect - * addressing. Mask of (1 << PROGRAM_x) bits. - */ - GLbitfield IndirectRegisterFiles; - - /** Logical counts */ - /*@{*/ - GLuint NumInstructions; - GLuint NumTemporaries; - GLuint NumParameters; - GLuint NumAttributes; - GLuint NumAddressRegs; - GLuint NumAluInstructions; - GLuint NumTexInstructions; - GLuint NumTexIndirections; - /*@}*/ - /** Native, actual h/w counts */ - /*@{*/ - GLuint NumNativeInstructions; - GLuint NumNativeTemporaries; - GLuint NumNativeParameters; - GLuint NumNativeAttributes; - GLuint NumNativeAddressRegs; - GLuint NumNativeAluInstructions; - GLuint NumNativeTexInstructions; - GLuint NumNativeTexIndirections; - /*@}*/ -}; - - -/** Vertex program object */ -struct gl_vertex_program -{ - struct gl_program Base; /**< base class */ - GLboolean IsNVProgram; /**< is this a GL_NV_vertex_program program? */ - GLboolean IsPositionInvariant; -}; - - -/** Geometry program object */ -struct gl_geometry_program -{ - struct gl_program Base; /**< base class */ - - GLint VerticesOut; - GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB, - GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */ - GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */ -}; - - -/** Fragment program object */ -struct gl_fragment_program -{ - struct gl_program Base; /**< base class */ - GLenum FogOption; - GLboolean UsesKill; /**< shader uses KIL instruction */ - GLboolean OriginUpperLeft; - GLboolean PixelCenterInteger; - enum gl_frag_depth_layout FragDepthLayout; -}; - - -/** - * State common to vertex and fragment programs. - */ -struct gl_program_state -{ - GLint ErrorPos; /* GL_PROGRAM_ERROR_POSITION_ARB/NV */ - const char *ErrorString; /* GL_PROGRAM_ERROR_STRING_ARB/NV */ -}; - - -/** - * Context state for vertex programs. - */ -struct gl_vertex_program_state -{ - GLboolean Enabled; /**< User-set GL_VERTEX_PROGRAM_ARB/NV flag */ - GLboolean _Enabled; /**< Enabled and _valid_ user program? */ - GLboolean PointSizeEnabled; /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */ - GLboolean TwoSideEnabled; /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */ - struct gl_vertex_program *Current; /**< User-bound vertex program */ - - /** Currently enabled and valid vertex program (including internal - * programs, user-defined vertex programs and GLSL vertex shaders). - * This is the program we must use when rendering. - */ - struct gl_vertex_program *_Current; - - GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */ - - /* For GL_NV_vertex_program only: */ - GLenum TrackMatrix[MAX_PROGRAM_ENV_PARAMS / 4]; - GLenum TrackMatrixTransform[MAX_PROGRAM_ENV_PARAMS / 4]; - - /** Should fixed-function T&L be implemented with a vertex prog? */ - GLboolean _MaintainTnlProgram; - - /** Program to emulate fixed-function T&L (see above) */ - struct gl_vertex_program *_TnlProgram; - - /** Cache of fixed-function programs */ - struct gl_program_cache *Cache; - - GLboolean _Overriden; -}; - - -/** - * Context state for geometry programs. - */ -struct gl_geometry_program_state -{ - GLboolean Enabled; /**< GL_ARB_GEOMETRY_SHADER4 */ - GLboolean _Enabled; /**< Enabled and valid program? */ - struct gl_geometry_program *Current; /**< user-bound geometry program */ - - /** Currently enabled and valid program (including internal programs - * and compiled shader programs). - */ - struct gl_geometry_program *_Current; - - GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */ - - /** Cache of fixed-function programs */ - struct gl_program_cache *Cache; -}; - -/** - * Context state for fragment programs. - */ -struct gl_fragment_program_state -{ - GLboolean Enabled; /**< User-set fragment program enable flag */ - GLboolean _Enabled; /**< Enabled and _valid_ user program? */ - struct gl_fragment_program *Current; /**< User-bound fragment program */ - - /** Currently enabled and valid fragment program (including internal - * programs, user-defined fragment programs and GLSL fragment shaders). - * This is the program we must use when rendering. - */ - struct gl_fragment_program *_Current; - - GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */ - - /** Should fixed-function texturing be implemented with a fragment prog? */ - GLboolean _MaintainTexEnvProgram; - - /** Program to emulate fixed-function texture env/combine (see above) */ - struct gl_fragment_program *_TexEnvProgram; - - /** Cache of fixed-function programs */ - struct gl_program_cache *Cache; -}; - - -/** - * ATI_fragment_shader runtime state - */ -#define ATI_FS_INPUT_PRIMARY 0 -#define ATI_FS_INPUT_SECONDARY 1 - -struct atifs_instruction; -struct atifs_setupinst; - -/** - * ATI fragment shader - */ -struct ati_fragment_shader -{ - GLuint Id; - GLint RefCount; - struct atifs_instruction *Instructions[2]; - struct atifs_setupinst *SetupInst[2]; - GLfloat Constants[8][4]; - GLbitfield LocalConstDef; /**< Indicates which constants have been set */ - GLubyte numArithInstr[2]; - GLubyte regsAssigned[2]; - GLubyte NumPasses; /**< 1 or 2 */ - GLubyte cur_pass; - GLubyte last_optype; - GLboolean interpinp1; - GLboolean isValid; - GLuint swizzlerq; -}; - -/** - * Context state for GL_ATI_fragment_shader - */ -struct gl_ati_fragment_shader_state -{ - GLboolean Enabled; - GLboolean _Enabled; /**< enabled and valid shader? */ - GLboolean Compiling; - GLfloat GlobalConstants[8][4]; - struct ati_fragment_shader *Current; -}; - - -/** - * Occlusion/timer query object. - */ -struct gl_query_object -{ - GLenum Target; /**< The query target, when active */ - GLuint Id; /**< hash table ID/name */ - GLuint64EXT Result; /**< the counter */ - GLboolean Active; /**< inside Begin/EndQuery */ - GLboolean Ready; /**< result is ready? */ -}; - - -/** - * Context state for query objects. - */ -struct gl_query_state -{ - struct _mesa_HashTable *QueryObjects; - struct gl_query_object *CurrentOcclusionObject; /* GL_ARB_occlusion_query */ - struct gl_query_object *CurrentTimerObject; /* GL_EXT_timer_query */ - - /** GL_NV_conditional_render */ - struct gl_query_object *CondRenderQuery; - - /** GL_EXT_transform_feedback */ - struct gl_query_object *PrimitivesGenerated; - struct gl_query_object *PrimitivesWritten; - - /** GL_ARB_timer_query */ - struct gl_query_object *TimeElapsed; - - GLenum CondRenderMode; -}; - - -/** Sync object state */ -struct gl_sync_object { - struct simple_node link; - GLenum Type; /**< GL_SYNC_FENCE */ - GLuint Name; /**< Fence name */ - GLint RefCount; /**< Reference count */ - GLboolean DeletePending; /**< Object was deleted while there were still - * live references (e.g., sync not yet finished) - */ - GLenum SyncCondition; - GLbitfield Flags; /**< Flags passed to glFenceSync */ - GLuint StatusFlag:1; /**< Has the sync object been signaled? */ -}; - - -/** Set by #pragma directives */ -struct gl_sl_pragmas -{ - GLboolean IgnoreOptimize; /**< ignore #pragma optimize(on/off) ? */ - GLboolean IgnoreDebug; /**< ignore #pragma debug(on/off) ? */ - GLboolean Optimize; /**< defaults on */ - GLboolean Debug; /**< defaults off */ -}; - - -/** - * A GLSL vertex or fragment shader object. - */ -struct gl_shader -{ - GLenum Type; /**< GL_FRAGMENT_SHADER || GL_VERTEX_SHADER || GL_GEOMETRY_SHADER_ARB (first field!) */ - GLuint Name; /**< AKA the handle */ - GLint RefCount; /**< Reference count */ - GLboolean DeletePending; - GLboolean CompileStatus; - const GLchar *Source; /**< Source code string */ - GLuint SourceChecksum; /**< for debug/logging purposes */ - struct gl_program *Program; /**< Post-compile assembly code */ - GLchar *InfoLog; - struct gl_sl_pragmas Pragmas; - - unsigned Version; /**< GLSL version used for linking */ - - struct exec_list *ir; - struct glsl_symbol_table *symbols; - - /** Shaders containing built-in functions that are used for linking. */ - struct gl_shader *builtins_to_link[16]; - unsigned num_builtins_to_link; -}; - - -/** - * A GLSL program object. - * Basically a linked collection of vertex and fragment shaders. - */ -struct gl_shader_program -{ - GLenum Type; /**< Always GL_SHADER_PROGRAM (internal token) */ - GLuint Name; /**< aka handle or ID */ - GLint RefCount; /**< Reference count */ - GLboolean DeletePending; - - GLuint NumShaders; /**< number of attached shaders */ - struct gl_shader **Shaders; /**< List of attached the shaders */ - - /** User-defined attribute bindings (glBindAttribLocation) */ - struct gl_program_parameter_list *Attributes; - - /** Transform feedback varyings */ - struct { - GLenum BufferMode; - GLuint NumVarying; - GLchar **VaryingNames; /**< Array [NumVarying] of char * */ - } TransformFeedback; - - /** Geometry shader state - copied into gl_geometry_program at link time */ - struct { - GLint VerticesOut; - GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB, - GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */ - GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */ - } Geom; - - /* post-link info: */ - struct gl_vertex_program *VertexProgram; /**< Linked vertex program */ - struct gl_fragment_program *FragmentProgram; /**< Linked fragment prog */ - struct gl_geometry_program *GeometryProgram; /**< Linked geometry prog */ - struct gl_uniform_list *Uniforms; - struct gl_program_parameter_list *Varying; - GLboolean LinkStatus; /**< GL_LINK_STATUS */ - GLboolean Validated; - GLboolean _Used; /**< Ever used for drawing? */ - GLchar *InfoLog; - - unsigned Version; /**< GLSL version used for linking */ - - /** - * Per-stage shaders resulting from the first stage of linking. - * - * Set of linked shaders for this program. The array is accessed using the - * \c MESA_SHADER_* defines. Entries for non-existent stages will be - * \c NULL. - */ - struct gl_shader *_LinkedShaders[MESA_SHADER_TYPES]; -}; - - -#define GLSL_DUMP 0x1 /**< Dump shaders to stdout */ -#define GLSL_LOG 0x2 /**< Write shaders to files */ -#define GLSL_OPT 0x4 /**< Force optimizations (override pragmas) */ -#define GLSL_NO_OPT 0x8 /**< Force no optimizations (override pragmas) */ -#define GLSL_UNIFORMS 0x10 /**< Print glUniform calls */ -#define GLSL_NOP_VERT 0x20 /**< Force no-op vertex shaders */ -#define GLSL_NOP_FRAG 0x40 /**< Force no-op fragment shaders */ -#define GLSL_USE_PROG 0x80 /**< Log glUseProgram calls */ - - -/** - * Context state for GLSL vertex/fragment shaders. - */ -struct gl_shader_state -{ - /** - * Programs used for rendering - * - * There is a separate program set for each shader stage. If - * GL_EXT_separate_shader_objects is not supported, each of these must point - * to \c NULL or to the same program. - */ - struct gl_shader_program *CurrentVertexProgram; - struct gl_shader_program *CurrentGeometryProgram; - struct gl_shader_program *CurrentFragmentProgram; - - /** - * Program used by glUniform calls. - * - * Explicitly set by \c glUseProgram and \c glActiveProgramEXT. - */ - struct gl_shader_program *ActiveProgram; - - void *MemPool; - - GLbitfield Flags; /**< Mask of GLSL_x flags */ -}; - -/** - * Compiler options for a single GLSL shaders type - */ -struct gl_shader_compiler_options -{ - /** Driver-selectable options: */ - GLboolean EmitCondCodes; /**< Use condition codes? */ - GLboolean EmitNVTempInitialization; /**< 0-fill NV temp registers */ - /** - * Attempts to flatten all ir_if (OPCODE_IF) for GPUs that can't - * support control flow. - */ - GLboolean EmitNoIfs; - GLboolean EmitNoLoops; - GLboolean EmitNoFunctions; - GLboolean EmitNoCont; /**< Emit CONT opcode? */ - GLboolean EmitNoMainReturn; /**< Emit CONT/RET opcodes? */ - GLboolean EmitNoNoise; /**< Emit NOISE opcodes? */ - GLboolean EmitNoPow; /**< Emit POW opcodes? */ - - /** - * \name Forms of indirect addressing the driver cannot do. - */ - /*@{*/ - GLboolean EmitNoIndirectInput; /**< No indirect addressing of inputs */ - GLboolean EmitNoIndirectOutput; /**< No indirect addressing of outputs */ - GLboolean EmitNoIndirectTemp; /**< No indirect addressing of temps */ - GLboolean EmitNoIndirectUniform; /**< No indirect addressing of constants */ - /*@}*/ - - GLuint MaxUnrollIterations; - - struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */ -}; - -/** - * Transform feedback object state - */ -struct gl_transform_feedback_object -{ - GLuint Name; /**< AKA the object ID */ - GLint RefCount; - GLboolean Active; /**< Is transform feedback enabled? */ - GLboolean Paused; /**< Is transform feedback paused? */ - - /** The feedback buffers */ - GLuint BufferNames[MAX_FEEDBACK_ATTRIBS]; - struct gl_buffer_object *Buffers[MAX_FEEDBACK_ATTRIBS]; - - /** Start of feedback data in dest buffer */ - GLintptr Offset[MAX_FEEDBACK_ATTRIBS]; - /** Max data to put into dest buffer (in bytes) */ - GLsizeiptr Size[MAX_FEEDBACK_ATTRIBS]; -}; - - -/** - * Context state for transform feedback. - */ -struct gl_transform_feedback -{ - GLenum Mode; /**< GL_POINTS, GL_LINES or GL_TRIANGLES */ - - GLboolean RasterDiscard; /**< GL_RASTERIZER_DISCARD */ - - /** The general binding point (GL_TRANSFORM_FEEDBACK_BUFFER) */ - struct gl_buffer_object *CurrentBuffer; - - /** The table of all transform feedback objects */ - struct _mesa_HashTable *Objects; - - /** The current xform-fb object (GL_TRANSFORM_FEEDBACK_BINDING) */ - struct gl_transform_feedback_object *CurrentObject; - - /** The default xform-fb object (Name==0) */ - struct gl_transform_feedback_object *DefaultObject; -}; - - - -/** - * State which can be shared by multiple contexts: - */ -struct gl_shared_state -{ - _glthread_Mutex Mutex; /**< for thread safety */ - GLint RefCount; /**< Reference count */ - struct _mesa_HashTable *DisplayList; /**< Display lists hash table */ - struct _mesa_HashTable *TexObjects; /**< Texture objects hash table */ - - /** Default texture objects (shared by all texture units) */ - struct gl_texture_object *DefaultTex[NUM_TEXTURE_TARGETS]; - - /** Fallback texture used when a bound texture is incomplete */ - struct gl_texture_object *FallbackTex; - - /** - * \name Thread safety and statechange notification for texture - * objects. - * - * \todo Improve the granularity of locking. - */ - /*@{*/ - _glthread_Mutex TexMutex; /**< texobj thread safety */ - GLuint TextureStateStamp; /**< state notification for shared tex */ - /*@}*/ - - /** Default buffer object for vertex arrays that aren't in VBOs */ - struct gl_buffer_object *NullBufferObj; - - /** - * \name Vertex/geometry/fragment programs - */ - /*@{*/ - struct _mesa_HashTable *Programs; /**< All vertex/fragment programs */ - struct gl_vertex_program *DefaultVertexProgram; - struct gl_fragment_program *DefaultFragmentProgram; - struct gl_geometry_program *DefaultGeometryProgram; - /*@}*/ - - /* GL_ATI_fragment_shader */ - struct _mesa_HashTable *ATIShaders; - struct ati_fragment_shader *DefaultFragmentShader; - - struct _mesa_HashTable *BufferObjects; - - /** Table of both gl_shader and gl_shader_program objects */ - struct _mesa_HashTable *ShaderObjects; - - /* GL_EXT_framebuffer_object */ - struct _mesa_HashTable *RenderBuffers; - struct _mesa_HashTable *FrameBuffers; - - /* GL_ARB_sync */ - struct simple_node SyncObjects; - - void *DriverData; /**< Device driver shared state */ -}; - - - - -/** - * A renderbuffer stores colors or depth values or stencil values. - * A framebuffer object will have a collection of these. - * Data are read/written to the buffer with a handful of Get/Put functions. - * - * Instances of this object are allocated with the Driver's NewRenderbuffer - * hook. Drivers will likely wrap this class inside a driver-specific - * class to simulate inheritance. - */ -struct gl_renderbuffer -{ -#define RB_MAGIC 0xaabbccdd - int Magic; /** XXX TEMPORARY DEBUG INFO */ - _glthread_Mutex Mutex; /**< for thread safety */ - GLuint ClassID; /**< Useful for drivers */ - GLuint Name; - GLint RefCount; - GLuint Width, Height; - GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */ - - GLenum InternalFormat; /**< The user-specified format */ - GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or - GL_STENCIL_INDEX. */ - gl_format Format; /**< The actual renderbuffer memory format */ - - GLubyte NumSamples; - - GLenum DataType; /**< Type of values passed to the Get/Put functions */ - GLvoid *Data; /**< This may not be used by some kinds of RBs */ - - GLboolean AttachedAnytime; /**< TRUE if it was attached to a framebuffer */ - - /* Used to wrap one renderbuffer around another: */ - struct gl_renderbuffer *Wrapped; - - /* Delete this renderbuffer */ - void (*Delete)(struct gl_renderbuffer *rb); - - /* Allocate new storage for this renderbuffer */ - GLboolean (*AllocStorage)(struct gl_context *ctx, struct gl_renderbuffer *rb, - GLenum internalFormat, - GLuint width, GLuint height); - - /* Lock/Unlock are called before/after calling the Get/Put functions. - * Not sure this is the right place for these yet. - void (*Lock)(struct gl_context *ctx, struct gl_renderbuffer *rb); - void (*Unlock)(struct gl_context *ctx, struct gl_renderbuffer *rb); - */ - - /* Return a pointer to the element/pixel at (x,y). - * Should return NULL if the buffer memory can't be directly addressed. - */ - void *(*GetPointer)(struct gl_context *ctx, struct gl_renderbuffer *rb, - GLint x, GLint y); - - /* Get/Read a row of values. - * The values will be of format _BaseFormat and type DataType. - */ - void (*GetRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, - GLint x, GLint y, void *values); - - /* Get/Read values at arbitrary locations. - * The values will be of format _BaseFormat and type DataType. - */ - void (*GetValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, - const GLint x[], const GLint y[], void *values); - - /* Put/Write a row of values. - * The values will be of format _BaseFormat and type DataType. - */ - void (*PutRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, - GLint x, GLint y, const void *values, const GLubyte *mask); - - /* Put/Write a row of RGB values. This is a special-case routine that's - * only used for RGBA renderbuffers when the source data is GL_RGB. That's - * a common case for glDrawPixels and some triangle routines. - * The values will be of format GL_RGB and type DataType. - */ - void (*PutRowRGB)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, - GLint x, GLint y, const void *values, const GLubyte *mask); - - - /* Put/Write a row of identical values. - * The values will be of format _BaseFormat and type DataType. - */ - void (*PutMonoRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, - GLint x, GLint y, const void *value, const GLubyte *mask); - - /* Put/Write values at arbitrary locations. - * The values will be of format _BaseFormat and type DataType. - */ - void (*PutValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, - const GLint x[], const GLint y[], const void *values, - const GLubyte *mask); - /* Put/Write identical values at arbitrary locations. - * The values will be of format _BaseFormat and type DataType. - */ - void (*PutMonoValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, - GLuint count, const GLint x[], const GLint y[], - const void *value, const GLubyte *mask); -}; - - -/** - * A renderbuffer attachment points to either a texture object (and specifies - * a mipmap level, cube face or 3D texture slice) or points to a renderbuffer. - */ -struct gl_renderbuffer_attachment -{ - GLenum Type; /**< \c GL_NONE or \c GL_TEXTURE or \c GL_RENDERBUFFER_EXT */ - GLboolean Complete; - - /** - * If \c Type is \c GL_RENDERBUFFER_EXT, this stores a pointer to the - * application supplied renderbuffer object. - */ - struct gl_renderbuffer *Renderbuffer; - - /** - * If \c Type is \c GL_TEXTURE, this stores a pointer to the application - * supplied texture object. - */ - struct gl_texture_object *Texture; - GLuint TextureLevel; /**< Attached mipmap level. */ - GLuint CubeMapFace; /**< 0 .. 5, for cube map textures. */ - GLuint Zoffset; /**< Slice for 3D textures, or layer for both 1D - * and 2D array textures */ -}; - - -/** - * A framebuffer is a collection of renderbuffers (color, depth, stencil, etc). - * In C++ terms, think of this as a base class from which device drivers - * will make derived classes. - */ -struct gl_framebuffer -{ - _glthread_Mutex Mutex; /**< for thread safety */ - /** - * If zero, this is a window system framebuffer. If non-zero, this - * is a FBO framebuffer; note that for some devices (i.e. those with - * a natural pixel coordinate system for FBOs that differs from the - * OpenGL/Mesa coordinate system), this means that the viewport, - * polygon face orientation, and polygon stipple will have to be inverted. - */ - GLuint Name; - - GLint RefCount; - GLboolean DeletePending; - - /** - * The framebuffer's visual. Immutable if this is a window system buffer. - * Computed from attachments if user-made FBO. - */ - struct gl_config Visual; - - GLboolean Initialized; - - GLuint Width, Height; /**< size of frame buffer in pixels */ - - /** \name Drawing bounds (Intersection of buffer size and scissor box) */ - /*@{*/ - GLint _Xmin, _Xmax; /**< inclusive */ - GLint _Ymin, _Ymax; /**< exclusive */ - /*@}*/ - - /** \name Derived Z buffer stuff */ - /*@{*/ - GLuint _DepthMax; /**< Max depth buffer value */ - GLfloat _DepthMaxF; /**< Float max depth buffer value */ - GLfloat _MRD; /**< minimum resolvable difference in Z values */ - /*@}*/ - - /** One of the GL_FRAMEBUFFER_(IN)COMPLETE_* tokens */ - GLenum _Status; - - /** Integer color values */ - GLboolean _IntegerColor; - - /** Array of all renderbuffer attachments, indexed by BUFFER_* tokens. */ - struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT]; - - /* In unextended OpenGL these vars are part of the GL_COLOR_BUFFER - * attribute group and GL_PIXEL attribute group, respectively. - */ - GLenum ColorDrawBuffer[MAX_DRAW_BUFFERS]; - GLenum ColorReadBuffer; - - /** Computed from ColorDraw/ReadBuffer above */ - GLuint _NumColorDrawBuffers; - GLint _ColorDrawBufferIndexes[MAX_DRAW_BUFFERS]; /**< BUFFER_x or -1 */ - GLint _ColorReadBufferIndex; /* -1 = None */ - struct gl_renderbuffer *_ColorDrawBuffers[MAX_DRAW_BUFFERS]; - struct gl_renderbuffer *_ColorReadBuffer; - - /** The Actual depth/stencil buffers to use. May be wrappers around the - * depth/stencil buffers attached above. */ - struct gl_renderbuffer *_DepthBuffer; - struct gl_renderbuffer *_StencilBuffer; - - /** Delete this framebuffer */ - void (*Delete)(struct gl_framebuffer *fb); -}; - - -/** - * Precision info for shader datatypes. See glGetShaderPrecisionFormat(). - */ -struct gl_precision -{ - GLushort RangeMin; /**< min value exponent */ - GLushort RangeMax; /**< max value exponent */ - GLushort Precision; /**< number of mantissa bits */ -}; - - -/** - * Limits for vertex, geometry and fragment programs/shaders. - */ -struct gl_program_constants -{ - /* logical limits */ - GLuint MaxInstructions; - GLuint MaxAluInstructions; - GLuint MaxTexInstructions; - GLuint MaxTexIndirections; - GLuint MaxAttribs; - GLuint MaxTemps; - GLuint MaxAddressRegs; - GLuint MaxAddressOffset; /**< [-MaxAddressOffset, MaxAddressOffset-1] */ - GLuint MaxParameters; - GLuint MaxLocalParams; - GLuint MaxEnvParams; - /* native/hardware limits */ - GLuint MaxNativeInstructions; - GLuint MaxNativeAluInstructions; - GLuint MaxNativeTexInstructions; - GLuint MaxNativeTexIndirections; - GLuint MaxNativeAttribs; - GLuint MaxNativeTemps; - GLuint MaxNativeAddressRegs; - GLuint MaxNativeParameters; - /* For shaders */ - GLuint MaxUniformComponents; /**< Usually == MaxParameters * 4 */ - /* ES 2.0 and GL_ARB_ES2_compatibility */ - struct gl_precision LowFloat, MediumFloat, HighFloat; - struct gl_precision LowInt, MediumInt, HighInt; -}; - - -/** - * Constants which may be overridden by device driver during context creation - * but are never changed after that. - */ -struct gl_constants -{ - GLint MaxTextureMbytes; /**< Max memory per image, in MB */ - GLint MaxTextureLevels; /**< Max mipmap levels. */ - GLint Max3DTextureLevels; /**< Max mipmap levels for 3D textures */ - GLint MaxCubeTextureLevels; /**< Max mipmap levels for cube textures */ - GLint MaxArrayTextureLayers; /**< Max layers in array textures */ - GLint MaxTextureRectSize; /**< Max rectangle texture size, in pixes */ - GLuint MaxTextureCoordUnits; - GLuint MaxTextureImageUnits; - GLuint MaxVertexTextureImageUnits; - GLuint MaxCombinedTextureImageUnits; - GLuint MaxGeometryTextureImageUnits; - GLuint MaxTextureUnits; /**< = MIN(CoordUnits, ImageUnits) */ - GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */ - GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */ - - GLuint MaxArrayLockSize; - - GLint SubPixelBits; - - GLfloat MinPointSize, MaxPointSize; /**< aliased */ - GLfloat MinPointSizeAA, MaxPointSizeAA; /**< antialiased */ - GLfloat PointSizeGranularity; - GLfloat MinLineWidth, MaxLineWidth; /**< aliased */ - GLfloat MinLineWidthAA, MaxLineWidthAA; /**< antialiased */ - GLfloat LineWidthGranularity; - - GLuint MaxColorTableSize; - - GLuint MaxClipPlanes; - GLuint MaxLights; - GLfloat MaxShininess; /**< GL_NV_light_max_exponent */ - GLfloat MaxSpotExponent; /**< GL_NV_light_max_exponent */ - - GLuint MaxViewportWidth, MaxViewportHeight; - - struct gl_program_constants VertexProgram; /**< GL_ARB_vertex_program */ - struct gl_program_constants FragmentProgram; /**< GL_ARB_fragment_program */ - struct gl_program_constants GeometryProgram; /**< GL_ARB_geometry_shader4 */ - GLuint MaxProgramMatrices; - GLuint MaxProgramMatrixStackDepth; - - /** vertex array / buffer object bounds checking */ - GLboolean CheckArrayBounds; - - GLuint MaxDrawBuffers; /**< GL_ARB_draw_buffers */ - - GLuint MaxColorAttachments; /**< GL_EXT_framebuffer_object */ - GLuint MaxRenderbufferSize; /**< GL_EXT_framebuffer_object */ - GLuint MaxSamples; /**< GL_ARB_framebuffer_object */ - - /** Number of varying vectors between vertex and fragment shaders */ - GLuint MaxVarying; - GLuint MaxVertexVaryingComponents; /**< Between vert and geom shader */ - GLuint MaxGeometryVaryingComponents; /**< Between geom and frag shader */ - - /** GL_ARB_geometry_shader4 */ - GLuint MaxGeometryOutputVertices; - GLuint MaxGeometryTotalOutputComponents; - - GLuint GLSLVersion; /**< GLSL version supported (ex: 120 = 1.20) */ - - /** Which texture units support GL_ATI_envmap_bumpmap as targets */ - GLbitfield SupportedBumpUnits; - - /** - * Maximum amount of time, measured in nanseconds, that the server can wait. - */ - GLuint64 MaxServerWaitTimeout; - - /** GL_EXT_provoking_vertex */ - GLboolean QuadsFollowProvokingVertexConvention; - - /** OpenGL version 3.0 */ - GLbitfield ContextFlags; /**< Ex: GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT */ - - /** OpenGL version 3.2 */ - GLbitfield ProfileMask; /**< Mask of CONTEXT_x_PROFILE_BIT */ - - /** GL_EXT_transform_feedback */ - GLuint MaxTransformFeedbackSeparateAttribs; - GLuint MaxTransformFeedbackSeparateComponents; - GLuint MaxTransformFeedbackInterleavedComponents; - - /** GL_EXT_gpu_shader4 */ - GLint MinProgramTexelOffset, MaxProgramTexelOffset; - - /* GL_EXT_framebuffer_sRGB */ - GLboolean sRGBCapable; /* can enable sRGB blend/update on FBOs */ -}; - - -/** - * Enable flag for each OpenGL extension. Different device drivers will - * enable different extensions at runtime. - */ -struct gl_extensions -{ - GLboolean dummy; /* don't remove this! */ - GLboolean dummy_true; /* Set true by _mesa_init_extensions(). */ - GLboolean dummy_false; /* Set false by _mesa_init_extensions(). */ - GLboolean ARB_ES2_compatibility; - GLboolean ARB_blend_func_extended; - GLboolean ARB_color_buffer_float; - GLboolean ARB_copy_buffer; - GLboolean ARB_depth_buffer_float; - GLboolean ARB_depth_clamp; - GLboolean ARB_depth_texture; - GLboolean ARB_draw_buffers; - GLboolean ARB_draw_buffers_blend; - GLboolean ARB_draw_elements_base_vertex; - GLboolean ARB_draw_instanced; - GLboolean ARB_fragment_coord_conventions; - GLboolean ARB_fragment_program; - GLboolean ARB_fragment_program_shadow; - GLboolean ARB_fragment_shader; - GLboolean ARB_framebuffer_object; - GLboolean ARB_explicit_attrib_location; - GLboolean ARB_geometry_shader4; - GLboolean ARB_half_float_pixel; - GLboolean ARB_half_float_vertex; - GLboolean ARB_instanced_arrays; - GLboolean ARB_map_buffer_range; - GLboolean ARB_multisample; - GLboolean ARB_multitexture; - GLboolean ARB_occlusion_query; - GLboolean ARB_occlusion_query2; - GLboolean ARB_point_sprite; - GLboolean ARB_sampler_objects; - GLboolean ARB_seamless_cube_map; - GLboolean ARB_shader_objects; - GLboolean ARB_shader_stencil_export; - GLboolean ARB_shading_language_100; - GLboolean ARB_shadow; - GLboolean ARB_shadow_ambient; - GLboolean ARB_sync; - GLboolean ARB_texture_border_clamp; - GLboolean ARB_texture_buffer_object; - GLboolean ARB_texture_compression; - GLboolean ARB_texture_compression_rgtc; - GLboolean ARB_texture_cube_map; - GLboolean ARB_texture_env_combine; - GLboolean ARB_texture_env_crossbar; - GLboolean ARB_texture_env_dot3; - GLboolean ARB_texture_float; - GLboolean ARB_texture_mirrored_repeat; - GLboolean ARB_texture_multisample; - GLboolean ARB_texture_non_power_of_two; - GLboolean ARB_texture_rg; - GLboolean ARB_texture_rgb10_a2ui; - GLboolean ARB_timer_query; - GLboolean ARB_transform_feedback2; - GLboolean ARB_transpose_matrix; - GLboolean ARB_uniform_buffer_object; - GLboolean ARB_vertex_array_object; - GLboolean ARB_vertex_buffer_object; - GLboolean ARB_vertex_program; - GLboolean ARB_vertex_shader; - GLboolean ARB_vertex_type_2_10_10_10_rev; - GLboolean ARB_window_pos; - GLboolean EXT_abgr; - GLboolean EXT_bgra; - GLboolean EXT_blend_color; - GLboolean EXT_blend_equation_separate; - GLboolean EXT_blend_func_separate; - GLboolean EXT_blend_logic_op; - GLboolean EXT_blend_minmax; - GLboolean EXT_blend_subtract; - GLboolean EXT_clip_volume_hint; - GLboolean EXT_compiled_vertex_array; - GLboolean EXT_copy_texture; - GLboolean EXT_depth_bounds_test; - GLboolean EXT_draw_buffers2; - GLboolean EXT_draw_range_elements; - GLboolean EXT_fog_coord; - GLboolean EXT_framebuffer_blit; - GLboolean EXT_framebuffer_multisample; - GLboolean EXT_framebuffer_object; - GLboolean EXT_framebuffer_sRGB; - GLboolean EXT_gpu_program_parameters; - GLboolean EXT_gpu_shader4; - GLboolean EXT_multi_draw_arrays; - GLboolean EXT_paletted_texture; - GLboolean EXT_packed_depth_stencil; - GLboolean EXT_packed_float; - GLboolean EXT_packed_pixels; - GLboolean EXT_pixel_buffer_object; - GLboolean EXT_point_parameters; - GLboolean EXT_polygon_offset; - GLboolean EXT_provoking_vertex; - GLboolean EXT_rescale_normal; - GLboolean EXT_shadow_funcs; - GLboolean EXT_secondary_color; - GLboolean EXT_separate_shader_objects; - GLboolean EXT_separate_specular_color; - GLboolean EXT_shared_texture_palette; - GLboolean EXT_stencil_wrap; - GLboolean EXT_stencil_two_side; - GLboolean EXT_subtexture; - GLboolean EXT_texture; - GLboolean EXT_texture_object; - GLboolean EXT_texture3D; - GLboolean EXT_texture_array; - GLboolean EXT_texture_compression_latc; - GLboolean EXT_texture_compression_s3tc; - GLboolean EXT_texture_env_add; - GLboolean EXT_texture_env_combine; - GLboolean EXT_texture_env_dot3; - GLboolean EXT_texture_filter_anisotropic; - GLboolean EXT_texture_integer; - GLboolean EXT_texture_lod_bias; - GLboolean EXT_texture_mirror_clamp; - GLboolean EXT_texture_shared_exponent; - GLboolean EXT_texture_snorm; - GLboolean EXT_texture_sRGB; - GLboolean EXT_texture_sRGB_decode; - GLboolean EXT_texture_swizzle; - GLboolean EXT_transform_feedback; - GLboolean EXT_timer_query; - GLboolean EXT_vertex_array; - GLboolean EXT_vertex_array_bgra; - GLboolean EXT_vertex_array_set; - GLboolean OES_standard_derivatives; - /* vendor extensions */ - GLboolean AMD_conservative_depth; - GLboolean APPLE_client_storage; - GLboolean APPLE_packed_pixels; - GLboolean APPLE_vertex_array_object; - GLboolean APPLE_object_purgeable; - GLboolean ATI_envmap_bumpmap; - GLboolean ATI_texture_compression_3dc; - GLboolean ATI_texture_mirror_once; - GLboolean ATI_texture_env_combine3; - GLboolean ATI_fragment_shader; - GLboolean ATI_separate_stencil; - GLboolean IBM_rasterpos_clip; - GLboolean IBM_multimode_draw_arrays; - GLboolean MESA_pack_invert; - GLboolean MESA_resize_buffers; - GLboolean MESA_ycbcr_texture; - GLboolean MESA_texture_array; - GLboolean NV_blend_square; - GLboolean NV_conditional_render; - GLboolean NV_fragment_program; - GLboolean NV_fragment_program_option; - GLboolean NV_light_max_exponent; - GLboolean NV_point_sprite; - GLboolean NV_primitive_restart; - GLboolean NV_texture_barrier; - GLboolean NV_texgen_reflection; - GLboolean NV_texture_env_combine4; - GLboolean NV_texture_rectangle; - GLboolean NV_vertex_program; - GLboolean NV_vertex_program1_1; - GLboolean OES_read_format; - GLboolean SGIS_generate_mipmap; - GLboolean SGIS_texture_edge_clamp; - GLboolean SGIS_texture_lod; - GLboolean TDFX_texture_compression_FXT1; - GLboolean S3_s3tc; - GLboolean OES_EGL_image; - GLboolean OES_draw_texture; - GLboolean EXT_texture_format_BGRA8888; - GLboolean extension_sentinel; - /** The extension string */ - const GLubyte *String; - /** Number of supported extensions */ - GLuint Count; -}; - - -/** - * A stack of matrices (projection, modelview, color, texture, etc). - */ -struct gl_matrix_stack -{ - GLmatrix *Top; /**< points into Stack */ - GLmatrix *Stack; /**< array [MaxDepth] of GLmatrix */ - GLuint Depth; /**< 0 <= Depth < MaxDepth */ - GLuint MaxDepth; /**< size of Stack[] array */ - GLuint DirtyFlag; /**< _NEW_MODELVIEW or _NEW_PROJECTION, for example */ -}; - - -/** - * \name Bits for image transfer operations - * \sa __struct gl_contextRec::ImageTransferState. - */ -/*@{*/ -#define IMAGE_SCALE_BIAS_BIT 0x1 -#define IMAGE_SHIFT_OFFSET_BIT 0x2 -#define IMAGE_MAP_COLOR_BIT 0x4 -#define IMAGE_CLAMP_BIT 0x800 - - -/** Pixel Transfer ops */ -#define IMAGE_BITS (IMAGE_SCALE_BIAS_BIT | \ - IMAGE_SHIFT_OFFSET_BIT | \ - IMAGE_MAP_COLOR_BIT) - -/** - * \name Bits to indicate what state has changed. - */ -/*@{*/ -#define _NEW_MODELVIEW (1 << 0) /**< gl_context::ModelView */ -#define _NEW_PROJECTION (1 << 1) /**< gl_context::Projection */ -#define _NEW_TEXTURE_MATRIX (1 << 2) /**< gl_context::TextureMatrix */ -#define _NEW_COLOR (1 << 3) /**< gl_context::Color */ -#define _NEW_DEPTH (1 << 4) /**< gl_context::Depth */ -#define _NEW_EVAL (1 << 5) /**< gl_context::Eval, EvalMap */ -#define _NEW_FOG (1 << 6) /**< gl_context::Fog */ -#define _NEW_HINT (1 << 7) /**< gl_context::Hint */ -#define _NEW_LIGHT (1 << 8) /**< gl_context::Light */ -#define _NEW_LINE (1 << 9) /**< gl_context::Line */ -#define _NEW_PIXEL (1 << 10) /**< gl_context::Pixel */ -#define _NEW_POINT (1 << 11) /**< gl_context::Point */ -#define _NEW_POLYGON (1 << 12) /**< gl_context::Polygon */ -#define _NEW_POLYGONSTIPPLE (1 << 13) /**< gl_context::PolygonStipple */ -#define _NEW_SCISSOR (1 << 14) /**< gl_context::Scissor */ -#define _NEW_STENCIL (1 << 15) /**< gl_context::Stencil */ -#define _NEW_TEXTURE (1 << 16) /**< gl_context::Texture */ -#define _NEW_TRANSFORM (1 << 17) /**< gl_context::Transform */ -#define _NEW_VIEWPORT (1 << 18) /**< gl_context::Viewport */ -#define _NEW_PACKUNPACK (1 << 19) /**< gl_context::Pack, Unpack */ -#define _NEW_ARRAY (1 << 20) /**< gl_context::Array */ -#define _NEW_RENDERMODE (1 << 21) /**< gl_context::RenderMode, etc */ -#define _NEW_BUFFERS (1 << 22) /**< gl_context::Visual, DrawBuffer, */ -#define _NEW_CURRENT_ATTRIB (1 << 23) /**< gl_context::Current */ -#define _NEW_MULTISAMPLE (1 << 24) /**< gl_context::Multisample */ -#define _NEW_TRACK_MATRIX (1 << 25) /**< gl_context::VertexProgram */ -#define _NEW_PROGRAM (1 << 26) /**< New program/shader state */ -#define _NEW_PROGRAM_CONSTANTS (1 << 27) -#define _NEW_BUFFER_OBJECT (1 << 28) -#define _NEW_FRAG_CLAMP (1 << 29) -#define _NEW_ALL ~0 -/*@}*/ - - -/** - * \name Bits to track array state changes - * - * Also used to summarize array enabled. - */ -/*@{*/ -#define _NEW_ARRAY_VERTEX VERT_BIT_POS -#define _NEW_ARRAY_WEIGHT VERT_BIT_WEIGHT -#define _NEW_ARRAY_NORMAL VERT_BIT_NORMAL -#define _NEW_ARRAY_COLOR0 VERT_BIT_COLOR0 -#define _NEW_ARRAY_COLOR1 VERT_BIT_COLOR1 -#define _NEW_ARRAY_FOGCOORD VERT_BIT_FOG -#define _NEW_ARRAY_INDEX VERT_BIT_COLOR_INDEX -#define _NEW_ARRAY_EDGEFLAG VERT_BIT_EDGEFLAG -#define _NEW_ARRAY_POINT_SIZE VERT_BIT_COLOR_INDEX /* aliased */ -#define _NEW_ARRAY_TEXCOORD_0 VERT_BIT_TEX0 -#define _NEW_ARRAY_TEXCOORD_1 VERT_BIT_TEX1 -#define _NEW_ARRAY_TEXCOORD_2 VERT_BIT_TEX2 -#define _NEW_ARRAY_TEXCOORD_3 VERT_BIT_TEX3 -#define _NEW_ARRAY_TEXCOORD_4 VERT_BIT_TEX4 -#define _NEW_ARRAY_TEXCOORD_5 VERT_BIT_TEX5 -#define _NEW_ARRAY_TEXCOORD_6 VERT_BIT_TEX6 -#define _NEW_ARRAY_TEXCOORD_7 VERT_BIT_TEX7 -#define _NEW_ARRAY_ATTRIB_0 VERT_BIT_GENERIC0 /* start at bit 16 */ -#define _NEW_ARRAY_ALL 0xffffffff - - -#define _NEW_ARRAY_TEXCOORD(i) (_NEW_ARRAY_TEXCOORD_0 << (i)) -#define _NEW_ARRAY_ATTRIB(i) (_NEW_ARRAY_ATTRIB_0 << (i)) -/*@}*/ - - - -/** - * \name A bunch of flags that we think might be useful to drivers. - * - * Set in the __struct gl_contextRec::_TriangleCaps bitfield. - */ -/*@{*/ -#define DD_FLATSHADE 0x1 -#define DD_SEPARATE_SPECULAR 0x2 -#define DD_TRI_CULL_FRONT_BACK 0x4 /* special case on some hw */ -#define DD_TRI_LIGHT_TWOSIDE 0x8 -#define DD_TRI_UNFILLED 0x10 -#define DD_TRI_SMOOTH 0x20 -#define DD_TRI_STIPPLE 0x40 -#define DD_TRI_OFFSET 0x80 -#define DD_LINE_SMOOTH 0x100 -#define DD_LINE_STIPPLE 0x200 -#define DD_POINT_SMOOTH 0x400 -#define DD_POINT_ATTEN 0x800 -#define DD_TRI_TWOSTENCIL 0x1000 -/*@}*/ - - -/** - * \name Define the state changes under which each of these bits might change - */ -/*@{*/ -#define _DD_NEW_FLATSHADE _NEW_LIGHT -#define _DD_NEW_SEPARATE_SPECULAR (_NEW_LIGHT | _NEW_FOG | _NEW_PROGRAM) -#define _DD_NEW_TRI_CULL_FRONT_BACK _NEW_POLYGON -#define _DD_NEW_TRI_LIGHT_TWOSIDE _NEW_LIGHT -#define _DD_NEW_TRI_UNFILLED _NEW_POLYGON -#define _DD_NEW_TRI_SMOOTH _NEW_POLYGON -#define _DD_NEW_TRI_STIPPLE _NEW_POLYGON -#define _DD_NEW_TRI_OFFSET _NEW_POLYGON -#define _DD_NEW_LINE_SMOOTH _NEW_LINE -#define _DD_NEW_LINE_STIPPLE _NEW_LINE -#define _DD_NEW_LINE_WIDTH _NEW_LINE -#define _DD_NEW_POINT_SMOOTH _NEW_POINT -#define _DD_NEW_POINT_SIZE _NEW_POINT -#define _DD_NEW_POINT_ATTEN _NEW_POINT -/*@}*/ - - -/** - * Composite state flags - */ -/*@{*/ -#define _MESA_NEW_NEED_EYE_COORDS (_NEW_LIGHT | \ - _NEW_TEXTURE | \ - _NEW_POINT | \ - _NEW_PROGRAM | \ - _NEW_MODELVIEW) -/*@}*/ - - - - -/* This has to be included here. */ -#include "dd.h" - - -/** - * Display list flags. - * Strictly this is a tnl-private concept, but it doesn't seem - * worthwhile adding a tnl private structure just to hold this one bit - * of information: - */ -#define DLIST_DANGLING_REFS 0x1 - - -/** Opaque declaration of display list payload data type */ -union gl_dlist_node; - - -/** - * Provide a location where information about a display list can be - * collected. Could be extended with driverPrivate structures, - * etc. in the future. - */ -struct gl_display_list -{ - GLuint Name; - GLbitfield Flags; /**< DLIST_x flags */ - /** The dlist commands are in a linked list of nodes */ - union gl_dlist_node *Head; -}; - - -/** - * State used during display list compilation and execution. - */ -struct gl_dlist_state -{ - GLuint CallDepth; /**< Current recursion calling depth */ - - struct gl_display_list *CurrentList; /**< List currently being compiled */ - union gl_dlist_node *CurrentBlock; /**< Pointer to current block of nodes */ - GLuint CurrentPos; /**< Index into current block of nodes */ - - GLvertexformat ListVtxfmt; - - GLubyte ActiveAttribSize[VERT_ATTRIB_MAX]; - GLfloat CurrentAttrib[VERT_ATTRIB_MAX][4]; - - GLubyte ActiveMaterialSize[MAT_ATTRIB_MAX]; - GLfloat CurrentMaterial[MAT_ATTRIB_MAX][4]; - - GLubyte ActiveIndex; - GLfloat CurrentIndex; - - GLubyte ActiveEdgeFlag; - GLboolean CurrentEdgeFlag; - - struct { - /* State known to have been set by the currently-compiling display - * list. Used to eliminate some redundant state changes. - */ - GLenum ShadeModel; - } Current; -}; - - -/** - * Enum for the OpenGL APIs we know about and may support. - */ -typedef enum -{ - API_OPENGL, - API_OPENGLES, - API_OPENGLES2 -} gl_api; - - -/** - * Mesa rendering context. - * - * This is the central context data structure for Mesa. Almost all - * OpenGL state is contained in this structure. - * Think of this as a base class from which device drivers will derive - * sub classes. - * - * The struct gl_context typedef names this structure. - */ -struct gl_context -{ - /** State possibly shared with other contexts in the address space */ - struct gl_shared_state *Shared; - - /** \name API function pointer tables */ - /*@{*/ - gl_api API; - struct _glapi_table *Save; /**< Display list save functions */ - struct _glapi_table *Exec; /**< Execute functions */ - struct _glapi_table *CurrentDispatch; /**< == Save or Exec !! */ - /*@}*/ - - struct gl_config Visual; - struct gl_framebuffer *DrawBuffer; /**< buffer for writing */ - struct gl_framebuffer *ReadBuffer; /**< buffer for reading */ - struct gl_framebuffer *WinSysDrawBuffer; /**< set with MakeCurrent */ - struct gl_framebuffer *WinSysReadBuffer; /**< set with MakeCurrent */ - - /** - * Device driver function pointer table - */ - struct dd_function_table Driver; - - void *DriverCtx; /**< Points to device driver context/state */ - - /** Core/Driver constants */ - struct gl_constants Const; - - /** \name The various 4x4 matrix stacks */ - /*@{*/ - struct gl_matrix_stack ModelviewMatrixStack; - struct gl_matrix_stack ProjectionMatrixStack; - struct gl_matrix_stack TextureMatrixStack[MAX_TEXTURE_UNITS]; - struct gl_matrix_stack ProgramMatrixStack[MAX_PROGRAM_MATRICES]; - struct gl_matrix_stack *CurrentStack; /**< Points to one of the above stacks */ - /*@}*/ - - /** Combined modelview and projection matrix */ - GLmatrix _ModelProjectMatrix; - - /** \name Display lists */ - struct gl_dlist_state ListState; - - GLboolean ExecuteFlag; /**< Execute GL commands? */ - GLboolean CompileFlag; /**< Compile GL commands into display list? */ - - /** Extension information */ - struct gl_extensions Extensions; - - /** Version info */ - GLuint VersionMajor, VersionMinor; - char *VersionString; - - /** \name State attribute stack (for glPush/PopAttrib) */ - /*@{*/ - GLuint AttribStackDepth; - struct gl_attrib_node *AttribStack[MAX_ATTRIB_STACK_DEPTH]; - /*@}*/ - - /** \name Renderer attribute groups - * - * We define a struct for each attribute group to make pushing and popping - * attributes easy. Also it's a good organization. - */ - /*@{*/ - struct gl_accum_attrib Accum; /**< Accum buffer attributes */ - struct gl_colorbuffer_attrib Color; /**< Color buffer attributes */ - struct gl_current_attrib Current; /**< Current attributes */ - struct gl_depthbuffer_attrib Depth; /**< Depth buffer attributes */ - struct gl_eval_attrib Eval; /**< Eval attributes */ - struct gl_fog_attrib Fog; /**< Fog attributes */ - struct gl_hint_attrib Hint; /**< Hint attributes */ - struct gl_light_attrib Light; /**< Light attributes */ - struct gl_line_attrib Line; /**< Line attributes */ - struct gl_list_attrib List; /**< List attributes */ - struct gl_multisample_attrib Multisample; - struct gl_pixel_attrib Pixel; /**< Pixel attributes */ - struct gl_point_attrib Point; /**< Point attributes */ - struct gl_polygon_attrib Polygon; /**< Polygon attributes */ - GLuint PolygonStipple[32]; /**< Polygon stipple */ - struct gl_scissor_attrib Scissor; /**< Scissor attributes */ - struct gl_stencil_attrib Stencil; /**< Stencil buffer attributes */ - struct gl_texture_attrib Texture; /**< Texture attributes */ - struct gl_transform_attrib Transform; /**< Transformation attributes */ - struct gl_viewport_attrib Viewport; /**< Viewport attributes */ - /*@}*/ - - /** \name Client attribute stack */ - /*@{*/ - GLuint ClientAttribStackDepth; - struct gl_attrib_node *ClientAttribStack[MAX_CLIENT_ATTRIB_STACK_DEPTH]; - /*@}*/ - - /** \name Client attribute groups */ - /*@{*/ - struct gl_array_attrib Array; /**< Vertex arrays */ - struct gl_pixelstore_attrib Pack; /**< Pixel packing */ - struct gl_pixelstore_attrib Unpack; /**< Pixel unpacking */ - struct gl_pixelstore_attrib DefaultPacking; /**< Default params */ - /*@}*/ - - /** \name Other assorted state (not pushed/popped on attribute stack) */ - /*@{*/ - struct gl_pixelmaps PixelMaps; - - struct gl_evaluators EvalMap; /**< All evaluators */ - struct gl_feedback Feedback; /**< Feedback */ - struct gl_selection Select; /**< Selection */ - - struct gl_program_state Program; /**< general program state */ - struct gl_vertex_program_state VertexProgram; - struct gl_fragment_program_state FragmentProgram; - struct gl_geometry_program_state GeometryProgram; - struct gl_ati_fragment_shader_state ATIFragmentShader; - - struct gl_shader_state Shader; /**< GLSL shader object state */ - struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_TYPES]; - - struct gl_query_state Query; /**< occlusion, timer queries */ - - struct gl_transform_feedback TransformFeedback; - - struct gl_buffer_object *CopyReadBuffer; /**< GL_ARB_copy_buffer */ - struct gl_buffer_object *CopyWriteBuffer; /**< GL_ARB_copy_buffer */ - /*@}*/ - - struct gl_meta_state *Meta; /**< for "meta" operations */ - - /* GL_EXT_framebuffer_object */ - struct gl_renderbuffer *CurrentRenderbuffer; - - GLenum ErrorValue; /**< Last error code */ - - /** - * Recognize and silence repeated error debug messages in buggy apps. - */ - const char *ErrorDebugFmtString; - GLuint ErrorDebugCount; - - GLenum RenderMode; /**< either GL_RENDER, GL_SELECT, GL_FEEDBACK */ - GLbitfield NewState; /**< bitwise-or of _NEW_* flags */ - - GLboolean ViewportInitialized; /**< has viewport size been initialized? */ - - GLbitfield varying_vp_inputs; /**< mask of VERT_BIT_* flags */ - - /** \name Derived state */ - /*@{*/ - /** Bitwise-or of DD_* flags. Note that this bitfield may be used before - * state validation so they need to always be current. - */ - GLbitfield _TriangleCaps; - GLbitfield _ImageTransferState;/**< bitwise-or of IMAGE_*_BIT flags */ - GLfloat _EyeZDir[3]; - GLfloat _ModelViewInvScale; - GLboolean _NeedEyeCoords; - GLboolean _ForceEyeCoords; - - GLuint TextureStateTimestamp; /**< detect changes to shared state */ - - struct gl_shine_tab *_ShineTable[2]; /**< Active shine tables */ - struct gl_shine_tab *_ShineTabList; /**< MRU list of inactive shine tables */ - /**@}*/ - - struct gl_list_extensions *ListExt; /**< driver dlist extensions */ - - /** \name For debugging/development only */ - /*@{*/ - GLboolean FirstTimeCurrent; - /*@}*/ - - /** software compression/decompression supported or not */ - GLboolean Mesa_DXTn; - - GLboolean TextureFormatSupported[MESA_FORMAT_COUNT]; - - /** - * Use dp4 (rather than mul/mad) instructions for position - * transformation? - */ - GLboolean mvp_with_dp4; - - /** - * \name Hooks for module contexts. - * - * These will eventually live in the driver or elsewhere. - */ - /*@{*/ - void *swrast_context; - void *swsetup_context; - void *swtnl_context; - void *swtnl_im; - struct st_context *st; - void *aelt_context; - /*@}*/ -}; - - -#ifdef DEBUG -extern int MESA_VERBOSE; -extern int MESA_DEBUG_FLAGS; -# define MESA_FUNCTION __FUNCTION__ -#else -# define MESA_VERBOSE 0 -# define MESA_DEBUG_FLAGS 0 -# define MESA_FUNCTION "a function" -# ifndef NDEBUG -# define NDEBUG -# endif -#endif - - -/** The MESA_VERBOSE var is a bitmask of these flags */ -enum _verbose -{ - VERBOSE_VARRAY = 0x0001, - VERBOSE_TEXTURE = 0x0002, - VERBOSE_MATERIAL = 0x0004, - VERBOSE_PIPELINE = 0x0008, - VERBOSE_DRIVER = 0x0010, - VERBOSE_STATE = 0x0020, - VERBOSE_API = 0x0040, - VERBOSE_DISPLAY_LIST = 0x0100, - VERBOSE_LIGHTING = 0x0200, - VERBOSE_PRIMS = 0x0400, - VERBOSE_VERTS = 0x0800, - VERBOSE_DISASSEM = 0x1000, - VERBOSE_DRAW = 0x2000, - VERBOSE_SWAPBUFFERS = 0x4000 -}; - - -/** The MESA_DEBUG_FLAGS var is a bitmask of these flags */ -enum _debug -{ - DEBUG_ALWAYS_FLUSH = 0x1 -}; - - - -#endif /* MTYPES_H */ +/*
+ * Mesa 3-D graphics library
+ * Version: 7.7
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
+ *
+ * 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
+ * BRIAN PAUL 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.
+ */
+
+/**
+ * \file mtypes.h
+ * Main Mesa data structures.
+ *
+ * Please try to mark derived values with a leading underscore ('_').
+ */
+
+#ifndef MTYPES_H
+#define MTYPES_H
+
+
+#include "main/glheader.h"
+#include "main/config.h"
+#include "main/mfeatures.h"
+#include "glapi/glapi.h"
+#include "math/m_matrix.h" /* GLmatrix */
+#include "main/simple_list.h" /* struct simple_node */
+#include "main/formats.h" /* MESA_FORMAT_COUNT */
+
+
+/**
+ * Color channel data type.
+ */
+#if CHAN_BITS == 8
+ typedef GLubyte GLchan;
+#define CHAN_MAX 255
+#define CHAN_MAXF 255.0F
+#define CHAN_TYPE GL_UNSIGNED_BYTE
+#elif CHAN_BITS == 16
+ typedef GLushort GLchan;
+#define CHAN_MAX 65535
+#define CHAN_MAXF 65535.0F
+#define CHAN_TYPE GL_UNSIGNED_SHORT
+#elif CHAN_BITS == 32
+ typedef GLfloat GLchan;
+#define CHAN_MAX 1.0
+#define CHAN_MAXF 1.0F
+#define CHAN_TYPE GL_FLOAT
+#else
+#error "illegal number of color channel bits"
+#endif
+
+
+/**
+ * Stencil buffer data type.
+ */
+#if STENCIL_BITS==8
+ typedef GLubyte GLstencil;
+#elif STENCIL_BITS==16
+ typedef GLushort GLstencil;
+#else
+# error "illegal number of stencil bits"
+#endif
+
+
+/**
+ * \name 64-bit extension of GLbitfield.
+ */
+/*@{*/
+typedef GLuint64 GLbitfield64;
+
+/** Set a single bit */
+#define BITFIELD64_BIT(b) ((GLbitfield64)1 << (b))
+
+
+/**
+ * \name Some forward type declarations
+ */
+/*@{*/
+struct _mesa_HashTable;
+struct gl_attrib_node;
+struct gl_list_extensions;
+struct gl_meta_state;
+struct gl_pixelstore_attrib;
+struct gl_program_cache;
+struct gl_texture_format;
+struct gl_texture_image;
+struct gl_texture_object;
+struct gl_context;
+struct st_context;
+/*@}*/
+
+
+/** Extra draw modes beyond GL_POINTS, GL_TRIANGLE_FAN, etc */
+#define PRIM_OUTSIDE_BEGIN_END (GL_POLYGON+1)
+#define PRIM_INSIDE_UNKNOWN_PRIM (GL_POLYGON+2)
+#define PRIM_UNKNOWN (GL_POLYGON+3)
+
+
+/**
+ * Shader stages. Note that these will become 5 with tessellation.
+ * These MUST have the same values as gallium's PIPE_SHADER_*
+ */
+typedef enum
+{
+ MESA_SHADER_VERTEX = 0,
+ MESA_SHADER_FRAGMENT = 1,
+ MESA_SHADER_GEOMETRY = 2,
+ MESA_SHADER_TYPES = 3
+} gl_shader_type;
+
+
+
+/**
+ * Indexes for vertex program attributes.
+ * GL_NV_vertex_program aliases generic attributes over the conventional
+ * attributes. In GL_ARB_vertex_program shader the aliasing is optional.
+ * In GL_ARB_vertex_shader / OpenGL 2.0 the aliasing is disallowed (the
+ * generic attributes are distinct/separate).
+ */
+typedef enum
+{
+ VERT_ATTRIB_POS = 0,
+ VERT_ATTRIB_WEIGHT = 1,
+ VERT_ATTRIB_NORMAL = 2,
+ VERT_ATTRIB_COLOR0 = 3,
+ VERT_ATTRIB_COLOR1 = 4,
+ VERT_ATTRIB_FOG = 5,
+ VERT_ATTRIB_COLOR_INDEX = 6,
+ VERT_ATTRIB_POINT_SIZE = 6, /*alias*/
+ VERT_ATTRIB_EDGEFLAG = 7,
+ VERT_ATTRIB_TEX0 = 8,
+ VERT_ATTRIB_TEX1 = 9,
+ VERT_ATTRIB_TEX2 = 10,
+ VERT_ATTRIB_TEX3 = 11,
+ VERT_ATTRIB_TEX4 = 12,
+ VERT_ATTRIB_TEX5 = 13,
+ VERT_ATTRIB_TEX6 = 14,
+ VERT_ATTRIB_TEX7 = 15,
+ VERT_ATTRIB_GENERIC0 = 16,
+ VERT_ATTRIB_GENERIC1 = 17,
+ VERT_ATTRIB_GENERIC2 = 18,
+ VERT_ATTRIB_GENERIC3 = 19,
+ VERT_ATTRIB_GENERIC4 = 20,
+ VERT_ATTRIB_GENERIC5 = 21,
+ VERT_ATTRIB_GENERIC6 = 22,
+ VERT_ATTRIB_GENERIC7 = 23,
+ VERT_ATTRIB_GENERIC8 = 24,
+ VERT_ATTRIB_GENERIC9 = 25,
+ VERT_ATTRIB_GENERIC10 = 26,
+ VERT_ATTRIB_GENERIC11 = 27,
+ VERT_ATTRIB_GENERIC12 = 28,
+ VERT_ATTRIB_GENERIC13 = 29,
+ VERT_ATTRIB_GENERIC14 = 30,
+ VERT_ATTRIB_GENERIC15 = 31,
+ VERT_ATTRIB_MAX = 32
+} gl_vert_attrib;
+
+/**
+ * Bitflags for vertex attributes.
+ * These are used in bitfields in many places.
+ */
+/*@{*/
+#define VERT_BIT_POS (1 << VERT_ATTRIB_POS)
+#define VERT_BIT_WEIGHT (1 << VERT_ATTRIB_WEIGHT)
+#define VERT_BIT_NORMAL (1 << VERT_ATTRIB_NORMAL)
+#define VERT_BIT_COLOR0 (1 << VERT_ATTRIB_COLOR0)
+#define VERT_BIT_COLOR1 (1 << VERT_ATTRIB_COLOR1)
+#define VERT_BIT_FOG (1 << VERT_ATTRIB_FOG)
+#define VERT_BIT_COLOR_INDEX (1 << VERT_ATTRIB_COLOR_INDEX)
+#define VERT_BIT_EDGEFLAG (1 << VERT_ATTRIB_EDGEFLAG)
+#define VERT_BIT_TEX0 (1 << VERT_ATTRIB_TEX0)
+#define VERT_BIT_TEX1 (1 << VERT_ATTRIB_TEX1)
+#define VERT_BIT_TEX2 (1 << VERT_ATTRIB_TEX2)
+#define VERT_BIT_TEX3 (1 << VERT_ATTRIB_TEX3)
+#define VERT_BIT_TEX4 (1 << VERT_ATTRIB_TEX4)
+#define VERT_BIT_TEX5 (1 << VERT_ATTRIB_TEX5)
+#define VERT_BIT_TEX6 (1 << VERT_ATTRIB_TEX6)
+#define VERT_BIT_TEX7 (1 << VERT_ATTRIB_TEX7)
+#define VERT_BIT_GENERIC0 (1 << VERT_ATTRIB_GENERIC0)
+#define VERT_BIT_GENERIC1 (1 << VERT_ATTRIB_GENERIC1)
+#define VERT_BIT_GENERIC2 (1 << VERT_ATTRIB_GENERIC2)
+#define VERT_BIT_GENERIC3 (1 << VERT_ATTRIB_GENERIC3)
+#define VERT_BIT_GENERIC4 (1 << VERT_ATTRIB_GENERIC4)
+#define VERT_BIT_GENERIC5 (1 << VERT_ATTRIB_GENERIC5)
+#define VERT_BIT_GENERIC6 (1 << VERT_ATTRIB_GENERIC6)
+#define VERT_BIT_GENERIC7 (1 << VERT_ATTRIB_GENERIC7)
+#define VERT_BIT_GENERIC8 (1 << VERT_ATTRIB_GENERIC8)
+#define VERT_BIT_GENERIC9 (1 << VERT_ATTRIB_GENERIC9)
+#define VERT_BIT_GENERIC10 (1 << VERT_ATTRIB_GENERIC10)
+#define VERT_BIT_GENERIC11 (1 << VERT_ATTRIB_GENERIC11)
+#define VERT_BIT_GENERIC12 (1 << VERT_ATTRIB_GENERIC12)
+#define VERT_BIT_GENERIC13 (1 << VERT_ATTRIB_GENERIC13)
+#define VERT_BIT_GENERIC14 (1 << VERT_ATTRIB_GENERIC14)
+#define VERT_BIT_GENERIC15 (1 << VERT_ATTRIB_GENERIC15)
+
+#define VERT_BIT_TEX(u) (1 << (VERT_ATTRIB_TEX0 + (u)))
+#define VERT_BIT_GENERIC(g) (1 << (VERT_ATTRIB_GENERIC0 + (g)))
+/*@}*/
+
+
+/**
+ * Indexes for vertex program result attributes
+ */
+typedef enum
+{
+ VERT_RESULT_HPOS = 0,
+ VERT_RESULT_COL0 = 1,
+ VERT_RESULT_COL1 = 2,
+ VERT_RESULT_FOGC = 3,
+ VERT_RESULT_TEX0 = 4,
+ VERT_RESULT_TEX1 = 5,
+ VERT_RESULT_TEX2 = 6,
+ VERT_RESULT_TEX3 = 7,
+ VERT_RESULT_TEX4 = 8,
+ VERT_RESULT_TEX5 = 9,
+ VERT_RESULT_TEX6 = 10,
+ VERT_RESULT_TEX7 = 11,
+ VERT_RESULT_PSIZ = 12,
+ VERT_RESULT_BFC0 = 13,
+ VERT_RESULT_BFC1 = 14,
+ VERT_RESULT_EDGE = 15,
+ VERT_RESULT_VAR0 = 16, /**< shader varying */
+ VERT_RESULT_MAX = (VERT_RESULT_VAR0 + MAX_VARYING)
+} gl_vert_result;
+
+
+/*********************************************/
+
+/**
+ * Indexes for geometry program attributes.
+ */
+typedef enum
+{
+ GEOM_ATTRIB_POSITION = 0,
+ GEOM_ATTRIB_COLOR0 = 1,
+ GEOM_ATTRIB_COLOR1 = 2,
+ GEOM_ATTRIB_SECONDARY_COLOR0 = 3,
+ GEOM_ATTRIB_SECONDARY_COLOR1 = 4,
+ GEOM_ATTRIB_FOG_FRAG_COORD = 5,
+ GEOM_ATTRIB_POINT_SIZE = 6,
+ GEOM_ATTRIB_CLIP_VERTEX = 7,
+ GEOM_ATTRIB_PRIMITIVE_ID = 8,
+ GEOM_ATTRIB_TEX_COORD = 9,
+
+ GEOM_ATTRIB_VAR0 = 16,
+ GEOM_ATTRIB_MAX = (GEOM_ATTRIB_VAR0 + MAX_VARYING)
+} gl_geom_attrib;
+
+/**
+ * Bitflags for geometry attributes.
+ * These are used in bitfields in many places.
+ */
+/*@{*/
+#define GEOM_BIT_COLOR0 (1 << GEOM_ATTRIB_COLOR0)
+#define GEOM_BIT_COLOR1 (1 << GEOM_ATTRIB_COLOR1)
+#define GEOM_BIT_SCOLOR0 (1 << GEOM_ATTRIB_SECONDARY_COLOR0)
+#define GEOM_BIT_SCOLOR1 (1 << GEOM_ATTRIB_SECONDARY_COLOR1)
+#define GEOM_BIT_TEX_COORD (1 << GEOM_ATTRIB_TEX_COORD)
+#define GEOM_BIT_FOG_COORD (1 << GEOM_ATTRIB_FOG_FRAG_COORD)
+#define GEOM_BIT_POSITION (1 << GEOM_ATTRIB_POSITION)
+#define GEOM_BIT_POINT_SIDE (1 << GEOM_ATTRIB_POINT_SIZE)
+#define GEOM_BIT_CLIP_VERTEX (1 << GEOM_ATTRIB_CLIP_VERTEX)
+#define GEOM_BIT_PRIM_ID (1 << GEOM_ATTRIB_PRIMITIVE_ID)
+#define GEOM_BIT_VAR0 (1 << GEOM_ATTRIB_VAR0)
+
+#define GEOM_BIT_VAR(g) (1 << (GEOM_BIT_VAR0 + (g)))
+/*@}*/
+
+
+/**
+ * Indexes for geometry program result attributes
+ */
+typedef enum
+{
+ GEOM_RESULT_POS = 0,
+ GEOM_RESULT_COL0 = 1,
+ GEOM_RESULT_COL1 = 2,
+ GEOM_RESULT_SCOL0 = 3,
+ GEOM_RESULT_SCOL1 = 4,
+ GEOM_RESULT_FOGC = 5,
+ GEOM_RESULT_TEX0 = 6,
+ GEOM_RESULT_TEX1 = 7,
+ GEOM_RESULT_TEX2 = 8,
+ GEOM_RESULT_TEX3 = 9,
+ GEOM_RESULT_TEX4 = 10,
+ GEOM_RESULT_TEX5 = 11,
+ GEOM_RESULT_TEX6 = 12,
+ GEOM_RESULT_TEX7 = 13,
+ GEOM_RESULT_PSIZ = 14,
+ GEOM_RESULT_CLPV = 15,
+ GEOM_RESULT_PRID = 16,
+ GEOM_RESULT_LAYR = 17,
+ GEOM_RESULT_VAR0 = 18, /**< shader varying, should really be 16 */
+ /* ### we need to -2 because var0 is 18 instead 16 like in the others */
+ GEOM_RESULT_MAX = (GEOM_RESULT_VAR0 + MAX_VARYING - 2)
+} gl_geom_result;
+
+
+/**
+ * Indexes for fragment program input attributes.
+ */
+typedef enum
+{
+ FRAG_ATTRIB_WPOS = 0,
+ FRAG_ATTRIB_COL0 = 1,
+ FRAG_ATTRIB_COL1 = 2,
+ FRAG_ATTRIB_FOGC = 3,
+ FRAG_ATTRIB_TEX0 = 4,
+ FRAG_ATTRIB_TEX1 = 5,
+ FRAG_ATTRIB_TEX2 = 6,
+ FRAG_ATTRIB_TEX3 = 7,
+ FRAG_ATTRIB_TEX4 = 8,
+ FRAG_ATTRIB_TEX5 = 9,
+ FRAG_ATTRIB_TEX6 = 10,
+ FRAG_ATTRIB_TEX7 = 11,
+ FRAG_ATTRIB_FACE = 12, /**< front/back face */
+ FRAG_ATTRIB_PNTC = 13, /**< sprite/point coord */
+ FRAG_ATTRIB_VAR0 = 14, /**< shader varying */
+ FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + MAX_VARYING)
+} gl_frag_attrib;
+
+/**
+ * Bitflags for fragment program input attributes.
+ */
+/*@{*/
+#define FRAG_BIT_WPOS (1 << FRAG_ATTRIB_WPOS)
+#define FRAG_BIT_COL0 (1 << FRAG_ATTRIB_COL0)
+#define FRAG_BIT_COL1 (1 << FRAG_ATTRIB_COL1)
+#define FRAG_BIT_FOGC (1 << FRAG_ATTRIB_FOGC)
+#define FRAG_BIT_FACE (1 << FRAG_ATTRIB_FACE)
+#define FRAG_BIT_PNTC (1 << FRAG_ATTRIB_PNTC)
+#define FRAG_BIT_TEX0 (1 << FRAG_ATTRIB_TEX0)
+#define FRAG_BIT_TEX1 (1 << FRAG_ATTRIB_TEX1)
+#define FRAG_BIT_TEX2 (1 << FRAG_ATTRIB_TEX2)
+#define FRAG_BIT_TEX3 (1 << FRAG_ATTRIB_TEX3)
+#define FRAG_BIT_TEX4 (1 << FRAG_ATTRIB_TEX4)
+#define FRAG_BIT_TEX5 (1 << FRAG_ATTRIB_TEX5)
+#define FRAG_BIT_TEX6 (1 << FRAG_ATTRIB_TEX6)
+#define FRAG_BIT_TEX7 (1 << FRAG_ATTRIB_TEX7)
+#define FRAG_BIT_VAR0 (1 << FRAG_ATTRIB_VAR0)
+
+#define FRAG_BIT_TEX(U) (FRAG_BIT_TEX0 << (U))
+#define FRAG_BIT_VAR(V) (FRAG_BIT_VAR0 << (V))
+
+#define FRAG_BITS_TEX_ANY (FRAG_BIT_TEX0| \
+ FRAG_BIT_TEX1| \
+ FRAG_BIT_TEX2| \
+ FRAG_BIT_TEX3| \
+ FRAG_BIT_TEX4| \
+ FRAG_BIT_TEX5| \
+ FRAG_BIT_TEX6| \
+ FRAG_BIT_TEX7)
+/*@}*/
+
+
+/**
+ * Fragment program results
+ */
+typedef enum
+{
+ FRAG_RESULT_DEPTH = 0,
+ FRAG_RESULT_STENCIL = 1,
+ FRAG_RESULT_COLOR = 2,
+ FRAG_RESULT_DATA0 = 3,
+ FRAG_RESULT_MAX = (FRAG_RESULT_DATA0 + MAX_DRAW_BUFFERS)
+} gl_frag_result;
+
+
+/**
+ * Indexes for all renderbuffers
+ */
+typedef enum
+{
+ /* the four standard color buffers */
+ BUFFER_FRONT_LEFT,
+ BUFFER_BACK_LEFT,
+ BUFFER_FRONT_RIGHT,
+ BUFFER_BACK_RIGHT,
+ BUFFER_DEPTH,
+ BUFFER_STENCIL,
+ BUFFER_ACCUM,
+ /* optional aux buffer */
+ BUFFER_AUX0,
+ /* generic renderbuffers */
+ BUFFER_COLOR0,
+ BUFFER_COLOR1,
+ BUFFER_COLOR2,
+ BUFFER_COLOR3,
+ BUFFER_COLOR4,
+ BUFFER_COLOR5,
+ BUFFER_COLOR6,
+ BUFFER_COLOR7,
+ BUFFER_COUNT
+} gl_buffer_index;
+
+/**
+ * Bit flags for all renderbuffers
+ */
+#define BUFFER_BIT_FRONT_LEFT (1 << BUFFER_FRONT_LEFT)
+#define BUFFER_BIT_BACK_LEFT (1 << BUFFER_BACK_LEFT)
+#define BUFFER_BIT_FRONT_RIGHT (1 << BUFFER_FRONT_RIGHT)
+#define BUFFER_BIT_BACK_RIGHT (1 << BUFFER_BACK_RIGHT)
+#define BUFFER_BIT_AUX0 (1 << BUFFER_AUX0)
+#define BUFFER_BIT_AUX1 (1 << BUFFER_AUX1)
+#define BUFFER_BIT_AUX2 (1 << BUFFER_AUX2)
+#define BUFFER_BIT_AUX3 (1 << BUFFER_AUX3)
+#define BUFFER_BIT_DEPTH (1 << BUFFER_DEPTH)
+#define BUFFER_BIT_STENCIL (1 << BUFFER_STENCIL)
+#define BUFFER_BIT_ACCUM (1 << BUFFER_ACCUM)
+#define BUFFER_BIT_COLOR0 (1 << BUFFER_COLOR0)
+#define BUFFER_BIT_COLOR1 (1 << BUFFER_COLOR1)
+#define BUFFER_BIT_COLOR2 (1 << BUFFER_COLOR2)
+#define BUFFER_BIT_COLOR3 (1 << BUFFER_COLOR3)
+#define BUFFER_BIT_COLOR4 (1 << BUFFER_COLOR4)
+#define BUFFER_BIT_COLOR5 (1 << BUFFER_COLOR5)
+#define BUFFER_BIT_COLOR6 (1 << BUFFER_COLOR6)
+#define BUFFER_BIT_COLOR7 (1 << BUFFER_COLOR7)
+
+/**
+ * Mask of all the color buffer bits (but not accum).
+ */
+#define BUFFER_BITS_COLOR (BUFFER_BIT_FRONT_LEFT | \
+ BUFFER_BIT_BACK_LEFT | \
+ BUFFER_BIT_FRONT_RIGHT | \
+ BUFFER_BIT_BACK_RIGHT | \
+ BUFFER_BIT_AUX0 | \
+ BUFFER_BIT_COLOR0 | \
+ BUFFER_BIT_COLOR1 | \
+ BUFFER_BIT_COLOR2 | \
+ BUFFER_BIT_COLOR3 | \
+ BUFFER_BIT_COLOR4 | \
+ BUFFER_BIT_COLOR5 | \
+ BUFFER_BIT_COLOR6 | \
+ BUFFER_BIT_COLOR7)
+
+
+/**
+ * Framebuffer configuration (aka visual / pixelformat)
+ * Note: some of these fields should be boolean, but it appears that
+ * code in drivers/dri/common/util.c requires int-sized fields.
+ */
+struct gl_config
+{
+ GLboolean rgbMode;
+ GLboolean floatMode;
+ GLboolean colorIndexMode; /* XXX is this used anywhere? */
+ GLuint doubleBufferMode;
+ GLuint stereoMode;
+
+ GLboolean haveAccumBuffer;
+ GLboolean haveDepthBuffer;
+ GLboolean haveStencilBuffer;
+
+ GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */
+ GLuint redMask, greenMask, blueMask, alphaMask;
+ GLint rgbBits; /* total bits for rgb */
+ GLint indexBits; /* total bits for colorindex */
+
+ GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
+ GLint depthBits;
+ GLint stencilBits;
+
+ GLint numAuxBuffers;
+
+ GLint level;
+
+ /* EXT_visual_rating / GLX 1.2 */
+ GLint visualRating;
+
+ /* EXT_visual_info / GLX 1.2 */
+ GLint transparentPixel;
+ /* colors are floats scaled to ints */
+ GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
+ GLint transparentIndex;
+
+ /* ARB_multisample / SGIS_multisample */
+ GLint sampleBuffers;
+ GLint samples;
+
+ /* SGIX_pbuffer / GLX 1.3 */
+ GLint maxPbufferWidth;
+ GLint maxPbufferHeight;
+ GLint maxPbufferPixels;
+ GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
+ GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */
+
+ /* OML_swap_method */
+ GLint swapMethod;
+
+ /* EXT_texture_from_pixmap */
+ GLint bindToTextureRgb;
+ GLint bindToTextureRgba;
+ GLint bindToMipmapTexture;
+ GLint bindToTextureTargets;
+ GLint yInverted;
+
+ /* EXT_framebuffer_sRGB */
+ GLint sRGBCapable;
+};
+
+
+/**
+ * Data structure for color tables
+ */
+struct gl_color_table
+{
+ GLenum InternalFormat; /**< The user-specified format */
+ GLenum _BaseFormat; /**< GL_ALPHA, GL_RGBA, GL_RGB, etc */
+ GLuint Size; /**< number of entries in table */
+ GLfloat *TableF; /**< Color table, floating point values */
+ GLubyte *TableUB; /**< Color table, ubyte values */
+ GLubyte RedSize;
+ GLubyte GreenSize;
+ GLubyte BlueSize;
+ GLubyte AlphaSize;
+ GLubyte LuminanceSize;
+ GLubyte IntensitySize;
+};
+
+
+/**
+ * \name Bit flags used for updating material values.
+ */
+/*@{*/
+#define MAT_ATTRIB_FRONT_AMBIENT 0
+#define MAT_ATTRIB_BACK_AMBIENT 1
+#define MAT_ATTRIB_FRONT_DIFFUSE 2
+#define MAT_ATTRIB_BACK_DIFFUSE 3
+#define MAT_ATTRIB_FRONT_SPECULAR 4
+#define MAT_ATTRIB_BACK_SPECULAR 5
+#define MAT_ATTRIB_FRONT_EMISSION 6
+#define MAT_ATTRIB_BACK_EMISSION 7
+#define MAT_ATTRIB_FRONT_SHININESS 8
+#define MAT_ATTRIB_BACK_SHININESS 9
+#define MAT_ATTRIB_FRONT_INDEXES 10
+#define MAT_ATTRIB_BACK_INDEXES 11
+#define MAT_ATTRIB_MAX 12
+
+#define MAT_ATTRIB_AMBIENT(f) (MAT_ATTRIB_FRONT_AMBIENT+(f))
+#define MAT_ATTRIB_DIFFUSE(f) (MAT_ATTRIB_FRONT_DIFFUSE+(f))
+#define MAT_ATTRIB_SPECULAR(f) (MAT_ATTRIB_FRONT_SPECULAR+(f))
+#define MAT_ATTRIB_EMISSION(f) (MAT_ATTRIB_FRONT_EMISSION+(f))
+#define MAT_ATTRIB_SHININESS(f)(MAT_ATTRIB_FRONT_SHININESS+(f))
+#define MAT_ATTRIB_INDEXES(f) (MAT_ATTRIB_FRONT_INDEXES+(f))
+
+#define MAT_INDEX_AMBIENT 0
+#define MAT_INDEX_DIFFUSE 1
+#define MAT_INDEX_SPECULAR 2
+
+#define MAT_BIT_FRONT_AMBIENT (1<<MAT_ATTRIB_FRONT_AMBIENT)
+#define MAT_BIT_BACK_AMBIENT (1<<MAT_ATTRIB_BACK_AMBIENT)
+#define MAT_BIT_FRONT_DIFFUSE (1<<MAT_ATTRIB_FRONT_DIFFUSE)
+#define MAT_BIT_BACK_DIFFUSE (1<<MAT_ATTRIB_BACK_DIFFUSE)
+#define MAT_BIT_FRONT_SPECULAR (1<<MAT_ATTRIB_FRONT_SPECULAR)
+#define MAT_BIT_BACK_SPECULAR (1<<MAT_ATTRIB_BACK_SPECULAR)
+#define MAT_BIT_FRONT_EMISSION (1<<MAT_ATTRIB_FRONT_EMISSION)
+#define MAT_BIT_BACK_EMISSION (1<<MAT_ATTRIB_BACK_EMISSION)
+#define MAT_BIT_FRONT_SHININESS (1<<MAT_ATTRIB_FRONT_SHININESS)
+#define MAT_BIT_BACK_SHININESS (1<<MAT_ATTRIB_BACK_SHININESS)
+#define MAT_BIT_FRONT_INDEXES (1<<MAT_ATTRIB_FRONT_INDEXES)
+#define MAT_BIT_BACK_INDEXES (1<<MAT_ATTRIB_BACK_INDEXES)
+
+
+#define FRONT_MATERIAL_BITS (MAT_BIT_FRONT_EMISSION | \
+ MAT_BIT_FRONT_AMBIENT | \
+ MAT_BIT_FRONT_DIFFUSE | \
+ MAT_BIT_FRONT_SPECULAR | \
+ MAT_BIT_FRONT_SHININESS | \
+ MAT_BIT_FRONT_INDEXES)
+
+#define BACK_MATERIAL_BITS (MAT_BIT_BACK_EMISSION | \
+ MAT_BIT_BACK_AMBIENT | \
+ MAT_BIT_BACK_DIFFUSE | \
+ MAT_BIT_BACK_SPECULAR | \
+ MAT_BIT_BACK_SHININESS | \
+ MAT_BIT_BACK_INDEXES)
+
+#define ALL_MATERIAL_BITS (FRONT_MATERIAL_BITS | BACK_MATERIAL_BITS)
+/*@}*/
+
+
+#define EXP_TABLE_SIZE 512 /**< Specular exponent lookup table sizes */
+#define SHINE_TABLE_SIZE 256 /**< Material shininess lookup table sizes */
+
+/**
+ * Material shininess lookup table.
+ */
+struct gl_shine_tab
+{
+ struct gl_shine_tab *next, *prev;
+ GLfloat tab[SHINE_TABLE_SIZE+1];
+ GLfloat shininess;
+ GLuint refcount;
+};
+
+
+/**
+ * Light source state.
+ */
+struct gl_light
+{
+ struct gl_light *next; /**< double linked list with sentinel */
+ struct gl_light *prev;
+
+ GLfloat Ambient[4]; /**< ambient color */
+ GLfloat Diffuse[4]; /**< diffuse color */
+ GLfloat Specular[4]; /**< specular color */
+ GLfloat EyePosition[4]; /**< position in eye coordinates */
+ GLfloat SpotDirection[4]; /**< spotlight direction in eye coordinates */
+ GLfloat SpotExponent;
+ GLfloat SpotCutoff; /**< in degrees */
+ GLfloat _CosCutoffNeg; /**< = cos(SpotCutoff) */
+ GLfloat _CosCutoff; /**< = MAX(0, cos(SpotCutoff)) */
+ GLfloat ConstantAttenuation;
+ GLfloat LinearAttenuation;
+ GLfloat QuadraticAttenuation;
+ GLboolean Enabled; /**< On/off flag */
+
+ /**
+ * \name Derived fields
+ */
+ /*@{*/
+ GLbitfield _Flags; /**< State */
+
+ GLfloat _Position[4]; /**< position in eye/obj coordinates */
+ GLfloat _VP_inf_norm[3]; /**< Norm direction to infinite light */
+ GLfloat _h_inf_norm[3]; /**< Norm( _VP_inf_norm + <0,0,1> ) */
+ GLfloat _NormSpotDirection[4]; /**< normalized spotlight direction */
+ GLfloat _VP_inf_spot_attenuation;
+
+ GLfloat _SpotExpTable[EXP_TABLE_SIZE][2]; /**< to replace a pow() call */
+ GLfloat _MatAmbient[2][3]; /**< material ambient * light ambient */
+ GLfloat _MatDiffuse[2][3]; /**< material diffuse * light diffuse */
+ GLfloat _MatSpecular[2][3]; /**< material spec * light specular */
+ GLfloat _dli; /**< CI diffuse light intensity */
+ GLfloat _sli; /**< CI specular light intensity */
+ /*@}*/
+};
+
+
+/**
+ * Light model state.
+ */
+struct gl_lightmodel
+{
+ GLfloat Ambient[4]; /**< ambient color */
+ GLboolean LocalViewer; /**< Local (or infinite) view point? */
+ GLboolean TwoSide; /**< Two (or one) sided lighting? */
+ GLenum ColorControl; /**< either GL_SINGLE_COLOR
+ * or GL_SEPARATE_SPECULAR_COLOR */
+};
+
+
+/**
+ * Material state.
+ */
+struct gl_material
+{
+ GLfloat Attrib[MAT_ATTRIB_MAX][4];
+};
+
+
+/**
+ * Accumulation buffer attribute group (GL_ACCUM_BUFFER_BIT)
+ */
+struct gl_accum_attrib
+{
+ GLfloat ClearColor[4]; /**< Accumulation buffer clear color */
+};
+
+
+/**
+ * Color buffer attribute group (GL_COLOR_BUFFER_BIT).
+ */
+struct gl_colorbuffer_attrib
+{
+ GLuint ClearIndex; /**< Index to use for glClear */
+ GLfloat ClearColorUnclamped[4]; /**< Color to use for glClear*/
+ GLclampf ClearColor[4]; /**< Color to use for glClear */
+
+ GLuint IndexMask; /**< Color index write mask */
+ GLubyte ColorMask[MAX_DRAW_BUFFERS][4];/**< Each flag is 0xff or 0x0 */
+
+ GLenum DrawBuffer[MAX_DRAW_BUFFERS]; /**< Which buffer to draw into */
+
+ /**
+ * \name alpha testing
+ */
+ /*@{*/
+ GLboolean AlphaEnabled; /**< Alpha test enabled flag */
+ GLenum AlphaFunc; /**< Alpha test function */
+ GLfloat AlphaRefUnclamped;
+ GLclampf AlphaRef; /**< Alpha reference value */
+ /*@}*/
+
+ /**
+ * \name Blending
+ */
+ /*@{*/
+ GLbitfield BlendEnabled; /**< Per-buffer blend enable flags */
+
+ /* NOTE: this does _not_ depend on fragment clamping or any other clamping control,
+ * only on the fixed-pointness of the render target.
+ * The query does however depend on fragment color clamping.
+ */
+ GLfloat BlendColorUnclamped[4]; /**< Blending color */
+ GLfloat BlendColor[4]; /**< Blending color */
+
+ struct
+ {
+ GLenum SrcRGB; /**< RGB blend source term */
+ GLenum DstRGB; /**< RGB blend dest term */
+ GLenum SrcA; /**< Alpha blend source term */
+ GLenum DstA; /**< Alpha blend dest term */
+ GLenum EquationRGB; /**< GL_ADD, GL_SUBTRACT, etc. */
+ GLenum EquationA; /**< GL_ADD, GL_SUBTRACT, etc. */
+ } Blend[MAX_DRAW_BUFFERS];
+ /** Are the blend func terms currently different for each buffer/target? */
+ GLboolean _BlendFuncPerBuffer;
+ /** Are the blend equations currently different for each buffer/target? */
+ GLboolean _BlendEquationPerBuffer;
+ /*@}*/
+
+ /**
+ * \name Logic op
+ */
+ /*@{*/
+ GLenum LogicOp; /**< Logic operator */
+ GLboolean IndexLogicOpEnabled; /**< Color index logic op enabled flag */
+ GLboolean ColorLogicOpEnabled; /**< RGBA logic op enabled flag */
+ GLboolean _LogicOpEnabled; /**< RGBA logic op + EXT_blend_logic_op enabled flag */
+ /*@}*/
+
+ GLboolean DitherFlag; /**< Dither enable flag */
+
+ GLenum ClampFragmentColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */
+ GLboolean _ClampFragmentColor; /** < with GL_FIXED_ONLY_ARB resolved */
+ GLenum ClampReadColor; /**< GL_TRUE, GL_FALSE or GL_FIXED_ONLY_ARB */
+ GLboolean _ClampReadColor; /** < with GL_FIXED_ONLY_ARB resolved */
+
+ GLboolean sRGBEnabled; /**< Framebuffer sRGB blending/updating requested */
+};
+
+
+/**
+ * Current attribute group (GL_CURRENT_BIT).
+ */
+struct gl_current_attrib
+{
+ /**
+ * \name Current vertex attributes.
+ * \note Values are valid only after FLUSH_VERTICES has been called.
+ * \note Index and Edgeflag current values are stored as floats in the
+ * SIX and SEVEN attribute slots.
+ */
+ GLfloat Attrib[VERT_ATTRIB_MAX][4]; /**< Position, color, texcoords, etc */
+
+ /**
+ * \name Current raster position attributes (always valid).
+ * \note This set of attributes is very similar to the SWvertex struct.
+ */
+ /*@{*/
+ GLfloat RasterPos[4];
+ GLfloat RasterDistance;
+ GLfloat RasterColor[4];
+ GLfloat RasterSecondaryColor[4];
+ GLfloat RasterTexCoords[MAX_TEXTURE_COORD_UNITS][4];
+ GLboolean RasterPosValid;
+ /*@}*/
+};
+
+
+/**
+ * Depth buffer attribute group (GL_DEPTH_BUFFER_BIT).
+ */
+struct gl_depthbuffer_attrib
+{
+ GLenum Func; /**< Function for depth buffer compare */
+ GLclampd Clear; /**< Value to clear depth buffer to */
+ GLboolean Test; /**< Depth buffering enabled flag */
+ GLboolean Mask; /**< Depth buffer writable? */
+ GLboolean BoundsTest; /**< GL_EXT_depth_bounds_test */
+ GLfloat BoundsMin, BoundsMax;/**< GL_EXT_depth_bounds_test */
+};
+
+
+/**
+ * Evaluator attribute group (GL_EVAL_BIT).
+ */
+struct gl_eval_attrib
+{
+ /**
+ * \name Enable bits
+ */
+ /*@{*/
+ GLboolean Map1Color4;
+ GLboolean Map1Index;
+ GLboolean Map1Normal;
+ GLboolean Map1TextureCoord1;
+ GLboolean Map1TextureCoord2;
+ GLboolean Map1TextureCoord3;
+ GLboolean Map1TextureCoord4;
+ GLboolean Map1Vertex3;
+ GLboolean Map1Vertex4;
+ GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */
+ GLboolean Map2Color4;
+ GLboolean Map2Index;
+ GLboolean Map2Normal;
+ GLboolean Map2TextureCoord1;
+ GLboolean Map2TextureCoord2;
+ GLboolean Map2TextureCoord3;
+ GLboolean Map2TextureCoord4;
+ GLboolean Map2Vertex3;
+ GLboolean Map2Vertex4;
+ GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */
+ GLboolean AutoNormal;
+ /*@}*/
+
+ /**
+ * \name Map Grid endpoints and divisions and calculated du values
+ */
+ /*@{*/
+ GLint MapGrid1un;
+ GLfloat MapGrid1u1, MapGrid1u2, MapGrid1du;
+ GLint MapGrid2un, MapGrid2vn;
+ GLfloat MapGrid2u1, MapGrid2u2, MapGrid2du;
+ GLfloat MapGrid2v1, MapGrid2v2, MapGrid2dv;
+ /*@}*/
+};
+
+
+/**
+ * Fog attribute group (GL_FOG_BIT).
+ */
+struct gl_fog_attrib
+{
+ GLboolean Enabled; /**< Fog enabled flag */
+ GLfloat ColorUnclamped[4]; /**< Fog color */
+ GLfloat Color[4]; /**< Fog color */
+ GLfloat Density; /**< Density >= 0.0 */
+ GLfloat Start; /**< Start distance in eye coords */
+ GLfloat End; /**< End distance in eye coords */
+ GLfloat Index; /**< Fog index */
+ GLenum Mode; /**< Fog mode */
+ GLboolean ColorSumEnabled;
+ GLenum FogCoordinateSource; /**< GL_EXT_fog_coord */
+ GLfloat _Scale; /**< (End == Start) ? 1.0 : 1.0 / (End - Start) */
+};
+
+
+/**
+ * \brief Layout qualifiers for gl_FragDepth.
+ *
+ * Extension AMD_conservative_depth allows gl_FragDepth to be redeclared with
+ * a layout qualifier.
+ *
+ * \see enum ir_depth_layout
+ */
+enum gl_frag_depth_layout {
+ FRAG_DEPTH_LAYOUT_NONE, /**< No layout is specified. */
+ FRAG_DEPTH_LAYOUT_ANY,
+ FRAG_DEPTH_LAYOUT_GREATER,
+ FRAG_DEPTH_LAYOUT_LESS,
+ FRAG_DEPTH_LAYOUT_UNCHANGED
+};
+
+
+/**
+ * Hint attribute group (GL_HINT_BIT).
+ *
+ * Values are always one of GL_FASTEST, GL_NICEST, or GL_DONT_CARE.
+ */
+struct gl_hint_attrib
+{
+ GLenum PerspectiveCorrection;
+ GLenum PointSmooth;
+ GLenum LineSmooth;
+ GLenum PolygonSmooth;
+ GLenum Fog;
+ GLenum ClipVolumeClipping; /**< GL_EXT_clip_volume_hint */
+ GLenum TextureCompression; /**< GL_ARB_texture_compression */
+ GLenum GenerateMipmap; /**< GL_SGIS_generate_mipmap */
+ GLenum FragmentShaderDerivative; /**< GL_ARB_fragment_shader */
+};
+
+/**
+ * Light state flags.
+ */
+/*@{*/
+#define LIGHT_SPOT 0x1
+#define LIGHT_LOCAL_VIEWER 0x2
+#define LIGHT_POSITIONAL 0x4
+#define LIGHT_NEED_VERTICES (LIGHT_POSITIONAL|LIGHT_LOCAL_VIEWER)
+/*@}*/
+
+
+/**
+ * Lighting attribute group (GL_LIGHT_BIT).
+ */
+struct gl_light_attrib
+{
+ struct gl_light Light[MAX_LIGHTS]; /**< Array of light sources */
+ struct gl_lightmodel Model; /**< Lighting model */
+
+ /**
+ * Must flush FLUSH_VERTICES before referencing:
+ */
+ /*@{*/
+ struct gl_material Material; /**< Includes front & back values */
+ /*@}*/
+
+ GLboolean Enabled; /**< Lighting enabled flag */
+ GLenum ShadeModel; /**< GL_FLAT or GL_SMOOTH */
+ GLenum ProvokingVertex; /**< GL_EXT_provoking_vertex */
+ GLenum ColorMaterialFace; /**< GL_FRONT, BACK or FRONT_AND_BACK */
+ GLenum ColorMaterialMode; /**< GL_AMBIENT, GL_DIFFUSE, etc */
+ GLbitfield ColorMaterialBitmask; /**< bitmask formed from Face and Mode */
+ GLboolean ColorMaterialEnabled;
+ GLenum ClampVertexColor;
+ GLboolean _ClampVertexColor;
+
+ struct gl_light EnabledList; /**< List sentinel */
+
+ /**
+ * Derived state for optimizations:
+ */
+ /*@{*/
+ GLboolean _NeedEyeCoords;
+ GLboolean _NeedVertices; /**< Use fast shader? */
+ GLbitfield _Flags; /**< LIGHT_* flags, see above */
+ GLfloat _BaseColor[2][3];
+ /*@}*/
+};
+
+
+/**
+ * Line attribute group (GL_LINE_BIT).
+ */
+struct gl_line_attrib
+{
+ GLboolean SmoothFlag; /**< GL_LINE_SMOOTH enabled? */
+ GLboolean StippleFlag; /**< GL_LINE_STIPPLE enabled? */
+ GLushort StipplePattern; /**< Stipple pattern */
+ GLint StippleFactor; /**< Stipple repeat factor */
+ GLfloat Width; /**< Line width */
+};
+
+
+/**
+ * Display list attribute group (GL_LIST_BIT).
+ */
+struct gl_list_attrib
+{
+ GLuint ListBase;
+};
+
+
+/**
+ * Multisample attribute group (GL_MULTISAMPLE_BIT).
+ */
+struct gl_multisample_attrib
+{
+ GLboolean Enabled;
+ GLboolean _Enabled; /**< true if Enabled and multisample buffer */
+ GLboolean SampleAlphaToCoverage;
+ GLboolean SampleAlphaToOne;
+ GLboolean SampleCoverage;
+ GLfloat SampleCoverageValue;
+ GLboolean SampleCoverageInvert;
+};
+
+
+/**
+ * A pixelmap (see glPixelMap)
+ */
+struct gl_pixelmap
+{
+ GLint Size;
+ GLfloat Map[MAX_PIXEL_MAP_TABLE];
+ GLubyte Map8[MAX_PIXEL_MAP_TABLE]; /**< converted to 8-bit color */
+};
+
+
+/**
+ * Collection of all pixelmaps
+ */
+struct gl_pixelmaps
+{
+ struct gl_pixelmap RtoR; /**< i.e. GL_PIXEL_MAP_R_TO_R */
+ struct gl_pixelmap GtoG;
+ struct gl_pixelmap BtoB;
+ struct gl_pixelmap AtoA;
+ struct gl_pixelmap ItoR;
+ struct gl_pixelmap ItoG;
+ struct gl_pixelmap ItoB;
+ struct gl_pixelmap ItoA;
+ struct gl_pixelmap ItoI;
+ struct gl_pixelmap StoS;
+};
+
+
+/**
+ * Pixel attribute group (GL_PIXEL_MODE_BIT).
+ */
+struct gl_pixel_attrib
+{
+ GLenum ReadBuffer; /**< source buffer for glRead/CopyPixels() */
+
+ /*--- Begin Pixel Transfer State ---*/
+ /* Fields are in the order in which they're applied... */
+
+ /** Scale & Bias (index shift, offset) */
+ /*@{*/
+ GLfloat RedBias, RedScale;
+ GLfloat GreenBias, GreenScale;
+ GLfloat BlueBias, BlueScale;
+ GLfloat AlphaBias, AlphaScale;
+ GLfloat DepthBias, DepthScale;
+ GLint IndexShift, IndexOffset;
+ /*@}*/
+
+ /* Pixel Maps */
+ /* Note: actual pixel maps are not part of this attrib group */
+ GLboolean MapColorFlag;
+ GLboolean MapStencilFlag;
+
+ /*--- End Pixel Transfer State ---*/
+
+ /** glPixelZoom */
+ GLfloat ZoomX, ZoomY;
+};
+
+
+/**
+ * Point attribute group (GL_POINT_BIT).
+ */
+struct gl_point_attrib
+{
+ GLboolean SmoothFlag; /**< True if GL_POINT_SMOOTH is enabled */
+ GLfloat Size; /**< User-specified point size */
+ GLfloat Params[3]; /**< GL_EXT_point_parameters */
+ GLfloat MinSize, MaxSize; /**< GL_EXT_point_parameters */
+ GLfloat Threshold; /**< GL_EXT_point_parameters */
+ GLboolean _Attenuated; /**< True if Params != [1, 0, 0] */
+ GLboolean PointSprite; /**< GL_NV/ARB_point_sprite */
+ GLboolean CoordReplace[MAX_TEXTURE_COORD_UNITS]; /**< GL_ARB_point_sprite*/
+ GLenum SpriteRMode; /**< GL_NV_point_sprite (only!) */
+ GLenum SpriteOrigin; /**< GL_ARB_point_sprite */
+};
+
+
+/**
+ * Polygon attribute group (GL_POLYGON_BIT).
+ */
+struct gl_polygon_attrib
+{
+ GLenum FrontFace; /**< Either GL_CW or GL_CCW */
+ GLenum FrontMode; /**< Either GL_POINT, GL_LINE or GL_FILL */
+ GLenum BackMode; /**< Either GL_POINT, GL_LINE or GL_FILL */
+ GLboolean _FrontBit; /**< 0=GL_CCW, 1=GL_CW */
+ GLboolean CullFlag; /**< Culling on/off flag */
+ GLboolean SmoothFlag; /**< True if GL_POLYGON_SMOOTH is enabled */
+ GLboolean StippleFlag; /**< True if GL_POLYGON_STIPPLE is enabled */
+ GLenum CullFaceMode; /**< Culling mode GL_FRONT or GL_BACK */
+ GLfloat OffsetFactor; /**< Polygon offset factor, from user */
+ GLfloat OffsetUnits; /**< Polygon offset units, from user */
+ GLboolean OffsetPoint; /**< Offset in GL_POINT mode */
+ GLboolean OffsetLine; /**< Offset in GL_LINE mode */
+ GLboolean OffsetFill; /**< Offset in GL_FILL mode */
+};
+
+
+/**
+ * Scissor attributes (GL_SCISSOR_BIT).
+ */
+struct gl_scissor_attrib
+{
+ GLboolean Enabled; /**< Scissor test enabled? */
+ GLint X, Y; /**< Lower left corner of box */
+ GLsizei Width, Height; /**< Size of box */
+};
+
+
+/**
+ * Stencil attribute group (GL_STENCIL_BUFFER_BIT).
+ *
+ * Three sets of stencil data are tracked so that OpenGL 2.0,
+ * GL_EXT_stencil_two_side, and GL_ATI_separate_stencil can all be supported
+ * simultaneously. In each of the stencil state arrays, element 0 corresponds
+ * to GL_FRONT. Element 1 corresponds to the OpenGL 2.0 /
+ * GL_ATI_separate_stencil GL_BACK state. Element 2 corresponds to the
+ * GL_EXT_stencil_two_side GL_BACK state.
+ *
+ * The derived value \c _BackFace is either 1 or 2 depending on whether or
+ * not GL_STENCIL_TEST_TWO_SIDE_EXT is enabled.
+ *
+ * The derived value \c _TestTwoSide is set when the front-face and back-face
+ * stencil state are different.
+ */
+struct gl_stencil_attrib
+{
+ GLboolean Enabled; /**< Enabled flag */
+ GLboolean TestTwoSide; /**< GL_EXT_stencil_two_side */
+ GLubyte ActiveFace; /**< GL_EXT_stencil_two_side (0 or 2) */
+ GLboolean _Enabled; /**< Enabled and stencil buffer present */
+ GLboolean _TestTwoSide;
+ GLubyte _BackFace; /**< Current back stencil state (1 or 2) */
+ GLenum Function[3]; /**< Stencil function */
+ GLenum FailFunc[3]; /**< Fail function */
+ GLenum ZPassFunc[3]; /**< Depth buffer pass function */
+ GLenum ZFailFunc[3]; /**< Depth buffer fail function */
+ GLint Ref[3]; /**< Reference value */
+ GLuint ValueMask[3]; /**< Value mask */
+ GLuint WriteMask[3]; /**< Write mask */
+ GLuint Clear; /**< Clear value */
+};
+
+
+/**
+ * An index for each type of texture object. These correspond to the GL
+ * texture target enums, such as GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP, etc.
+ * Note: the order is from highest priority to lowest priority.
+ */
+typedef enum
+{
+ TEXTURE_BUFFER_INDEX,
+ TEXTURE_2D_ARRAY_INDEX,
+ TEXTURE_1D_ARRAY_INDEX,
+ TEXTURE_CUBE_INDEX,
+ TEXTURE_3D_INDEX,
+ TEXTURE_RECT_INDEX,
+ TEXTURE_2D_INDEX,
+ TEXTURE_1D_INDEX,
+ NUM_TEXTURE_TARGETS
+} gl_texture_index;
+
+
+/**
+ * Bit flags for each type of texture object
+ * Used for Texture.Unit[]._ReallyEnabled flags.
+ */
+/*@{*/
+#define TEXTURE_BUFFER_BIT (1 << TEXTURE_BUFFER_INDEX)
+#define TEXTURE_2D_ARRAY_BIT (1 << TEXTURE_2D_ARRAY_INDEX)
+#define TEXTURE_1D_ARRAY_BIT (1 << TEXTURE_1D_ARRAY_INDEX)
+#define TEXTURE_CUBE_BIT (1 << TEXTURE_CUBE_INDEX)
+#define TEXTURE_3D_BIT (1 << TEXTURE_3D_INDEX)
+#define TEXTURE_RECT_BIT (1 << TEXTURE_RECT_INDEX)
+#define TEXTURE_2D_BIT (1 << TEXTURE_2D_INDEX)
+#define TEXTURE_1D_BIT (1 << TEXTURE_1D_INDEX)
+/*@}*/
+
+
+/**
+ * TexGenEnabled flags.
+ */
+/*@{*/
+#define S_BIT 1
+#define T_BIT 2
+#define R_BIT 4
+#define Q_BIT 8
+#define STR_BITS (S_BIT | T_BIT | R_BIT)
+/*@}*/
+
+
+/**
+ * Bit flag versions of the corresponding GL_ constants.
+ */
+/*@{*/
+#define TEXGEN_SPHERE_MAP 0x1
+#define TEXGEN_OBJ_LINEAR 0x2
+#define TEXGEN_EYE_LINEAR 0x4
+#define TEXGEN_REFLECTION_MAP_NV 0x8
+#define TEXGEN_NORMAL_MAP_NV 0x10
+
+#define TEXGEN_NEED_NORMALS (TEXGEN_SPHERE_MAP | \
+ TEXGEN_REFLECTION_MAP_NV | \
+ TEXGEN_NORMAL_MAP_NV)
+#define TEXGEN_NEED_EYE_COORD (TEXGEN_SPHERE_MAP | \
+ TEXGEN_REFLECTION_MAP_NV | \
+ TEXGEN_NORMAL_MAP_NV | \
+ TEXGEN_EYE_LINEAR)
+/*@}*/
+
+
+
+/** Tex-gen enabled for texture unit? */
+#define ENABLE_TEXGEN(unit) (1 << (unit))
+
+/** Non-identity texture matrix for texture unit? */
+#define ENABLE_TEXMAT(unit) (1 << (unit))
+
+
+/**
+ * Texel fetch function prototype. We use texel fetch functions to
+ * extract RGBA, color indexes and depth components out of 1D, 2D and 3D
+ * texture images. These functions help to isolate us from the gritty
+ * details of all the various texture image encodings.
+ *
+ * \param texImage texture image.
+ * \param col texel column.
+ * \param row texel row.
+ * \param img texel image level/layer.
+ * \param texelOut output texel (up to 4 GLchans)
+ */
+typedef void (*FetchTexelFuncC)( const struct gl_texture_image *texImage,
+ GLint col, GLint row, GLint img,
+ GLchan *texelOut );
+
+/**
+ * As above, but returns floats.
+ * Used for depth component images and for upcoming signed/float
+ * texture images.
+ */
+typedef void (*FetchTexelFuncF)( const struct gl_texture_image *texImage,
+ GLint col, GLint row, GLint img,
+ GLfloat *texelOut );
+
+
+typedef void (*StoreTexelFunc)(struct gl_texture_image *texImage,
+ GLint col, GLint row, GLint img,
+ const void *texel);
+
+
+/**
+ * Texture image state. Describes the dimensions of a texture image,
+ * the texel format and pointers to Texel Fetch functions.
+ */
+struct gl_texture_image
+{
+ GLint InternalFormat; /**< Internal format as given by the user */
+ GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_ALPHA,
+ * GL_LUMINANCE, GL_LUMINANCE_ALPHA,
+ * GL_INTENSITY, GL_COLOR_INDEX,
+ * GL_DEPTH_COMPONENT or GL_DEPTH_STENCIL_EXT
+ * only. Used for choosing TexEnv arithmetic.
+ */
+ gl_format TexFormat; /**< The actual texture memory format */
+
+ GLuint Border; /**< 0 or 1 */
+ GLuint Width; /**< = 2^WidthLog2 + 2*Border */
+ GLuint Height; /**< = 2^HeightLog2 + 2*Border */
+ GLuint Depth; /**< = 2^DepthLog2 + 2*Border */
+ GLuint Width2; /**< = Width - 2*Border */
+ GLuint Height2; /**< = Height - 2*Border */
+ GLuint Depth2; /**< = Depth - 2*Border */
+ GLuint WidthLog2; /**< = log2(Width2) */
+ GLuint HeightLog2; /**< = log2(Height2) */
+ GLuint DepthLog2; /**< = log2(Depth2) */
+ GLuint MaxLog2; /**< = MAX(WidthLog2, HeightLog2) */
+ GLfloat WidthScale; /**< used for mipmap LOD computation */
+ GLfloat HeightScale; /**< used for mipmap LOD computation */
+ GLfloat DepthScale; /**< used for mipmap LOD computation */
+ GLboolean IsClientData; /**< Data owned by client? */
+ GLboolean _IsPowerOfTwo; /**< Are all dimensions powers of two? */
+
+ struct gl_texture_object *TexObject; /**< Pointer back to parent object */
+
+ FetchTexelFuncC FetchTexelc; /**< GLchan texel fetch function pointer */
+ FetchTexelFuncF FetchTexelf; /**< Float texel fetch function pointer */
+
+ GLuint RowStride; /**< Padded width in units of texels */
+ GLuint *ImageOffsets; /**< if 3D texture: array [Depth] of offsets to
+ each 2D slice in 'Data', in texels */
+ GLvoid *Data; /**< Image data, accessed via FetchTexel() */
+
+ /**
+ * \name For device driver:
+ */
+ /*@{*/
+ void *DriverData; /**< Arbitrary device driver data */
+ /*@}*/
+};
+
+
+/**
+ * Indexes for cube map faces.
+ */
+typedef enum
+{
+ FACE_POS_X = 0,
+ FACE_NEG_X = 1,
+ FACE_POS_Y = 2,
+ FACE_NEG_Y = 3,
+ FACE_POS_Z = 4,
+ FACE_NEG_Z = 5,
+ MAX_FACES = 6
+} gl_face_index;
+
+
+/**
+ * Texture object state. Contains the array of mipmap images, border color,
+ * wrap modes, filter modes, shadow/texcompare state, and the per-texture
+ * color palette.
+ */
+struct gl_texture_object
+{
+ _glthread_Mutex Mutex; /**< for thread safety */
+ GLint RefCount; /**< reference count */
+ GLuint Name; /**< the user-visible texture object ID */
+ GLenum Target; /**< GL_TEXTURE_1D, GL_TEXTURE_2D, etc. */
+ GLfloat Priority; /**< in [0,1] */
+ union {
+ GLfloat f[4];
+ GLuint ui[4];
+ GLint i[4];
+ } BorderColor; /**< Interpreted according to texture format */
+ GLenum WrapS; /**< S-axis texture image wrap mode */
+ GLenum WrapT; /**< T-axis texture image wrap mode */
+ GLenum WrapR; /**< R-axis texture image wrap mode */
+ GLenum MinFilter; /**< minification filter */
+ GLenum MagFilter; /**< magnification filter */
+ GLfloat MinLod; /**< min lambda, OpenGL 1.2 */
+ GLfloat MaxLod; /**< max lambda, OpenGL 1.2 */
+ GLfloat LodBias; /**< OpenGL 1.4 */
+ GLint BaseLevel; /**< min mipmap level, OpenGL 1.2 */
+ GLint MaxLevel; /**< max mipmap level, OpenGL 1.2 */
+ GLfloat MaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */
+ GLenum CompareMode; /**< GL_ARB_shadow */
+ GLenum CompareFunc; /**< GL_ARB_shadow */
+ GLfloat CompareFailValue; /**< GL_ARB_shadow_ambient */
+ GLenum DepthMode; /**< GL_ARB_depth_texture */
+ GLint _MaxLevel; /**< actual max mipmap level (q in the spec) */
+ GLfloat _MaxLambda; /**< = _MaxLevel - BaseLevel (q - b in spec) */
+ GLint CropRect[4]; /**< GL_OES_draw_texture */
+ GLenum Swizzle[4]; /**< GL_EXT_texture_swizzle */
+ GLuint _Swizzle; /**< same as Swizzle, but SWIZZLE_* format */
+ GLboolean GenerateMipmap; /**< GL_SGIS_generate_mipmap */
+ GLboolean _Complete; /**< Is texture object complete? */
+ GLboolean _RenderToTexture; /**< Any rendering to this texture? */
+ GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */
+ GLenum sRGBDecode; /**< GL_DECODE_EXT or GL_SKIP_DECODE_EXT */
+
+ /** Actual texture images, indexed by [cube face] and [mipmap level] */
+ struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS];
+
+ /** GL_ARB_texture_buffer_object */
+ struct gl_buffer_object *BufferObject;
+ GLenum BufferObjectFormat;
+
+ /** GL_EXT_paletted_texture */
+ struct gl_color_table Palette;
+
+ /**
+ * \name For device driver.
+ * Note: instead of attaching driver data to this pointer, it's preferable
+ * to instead use this struct as a base class for your own texture object
+ * class. Driver->NewTextureObject() can be used to implement the
+ * allocation.
+ */
+ void *DriverData; /**< Arbitrary device driver data */
+};
+
+
+/** Up to four combiner sources are possible with GL_NV_texture_env_combine4 */
+#define MAX_COMBINER_TERMS 4
+
+
+/**
+ * Texture combine environment state.
+ */
+struct gl_tex_env_combine_state
+{
+ GLenum ModeRGB; /**< GL_REPLACE, GL_DECAL, GL_ADD, etc. */
+ GLenum ModeA; /**< GL_REPLACE, GL_DECAL, GL_ADD, etc. */
+ /** Source terms: GL_PRIMARY_COLOR, GL_TEXTURE, etc */
+ GLenum SourceRGB[MAX_COMBINER_TERMS];
+ GLenum SourceA[MAX_COMBINER_TERMS];
+ /** Source operands: GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, etc */
+ GLenum OperandRGB[MAX_COMBINER_TERMS];
+ GLenum OperandA[MAX_COMBINER_TERMS];
+ GLuint ScaleShiftRGB; /**< 0, 1 or 2 */
+ GLuint ScaleShiftA; /**< 0, 1 or 2 */
+ GLuint _NumArgsRGB; /**< Number of inputs used for the RGB combiner */
+ GLuint _NumArgsA; /**< Number of inputs used for the A combiner */
+};
+
+
+/**
+ * Texture coord generation state.
+ */
+struct gl_texgen
+{
+ GLenum Mode; /**< GL_EYE_LINEAR, GL_SPHERE_MAP, etc */
+ GLbitfield _ModeBit; /**< TEXGEN_x bit corresponding to Mode */
+ GLfloat ObjectPlane[4];
+ GLfloat EyePlane[4];
+};
+
+
+/**
+ * Texture unit state. Contains enable flags, texture environment/function/
+ * combiners, texgen state, pointers to current texture objects and
+ * post-filter color tables.
+ */
+struct gl_texture_unit
+{
+ GLbitfield Enabled; /**< bitmask of TEXTURE_*_BIT flags */
+ GLbitfield _ReallyEnabled; /**< 0 or exactly one of TEXTURE_*_BIT flags */
+
+ GLenum EnvMode; /**< GL_MODULATE, GL_DECAL, GL_BLEND, etc. */
+ GLclampf EnvColor[4];
+ GLfloat EnvColorUnclamped[4];
+
+ struct gl_texgen GenS;
+ struct gl_texgen GenT;
+ struct gl_texgen GenR;
+ struct gl_texgen GenQ;
+ GLbitfield TexGenEnabled; /**< Bitwise-OR of [STRQ]_BIT values */
+ GLbitfield _GenFlags; /**< Bitwise-OR of Gen[STRQ]._ModeBit */
+
+ GLfloat LodBias; /**< for biasing mipmap levels */
+ GLenum BumpTarget;
+ GLfloat RotMatrix[4]; /* 2x2 matrix */
+
+ /**
+ * \name GL_EXT_texture_env_combine
+ */
+ struct gl_tex_env_combine_state Combine;
+
+ /**
+ * Derived state based on \c EnvMode and the \c BaseFormat of the
+ * currently enabled texture.
+ */
+ struct gl_tex_env_combine_state _EnvMode;
+
+ /**
+ * Currently enabled combiner state. This will point to either
+ * \c Combine or \c _EnvMode.
+ */
+ struct gl_tex_env_combine_state *_CurrentCombine;
+
+ /** Current texture object pointers */
+ struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS];
+
+ /** Points to highest priority, complete and enabled texture object */
+ struct gl_texture_object *_Current;
+};
+
+
+/**
+ * Texture attribute group (GL_TEXTURE_BIT).
+ */
+struct gl_texture_attrib
+{
+ GLuint CurrentUnit; /**< GL_ACTIVE_TEXTURE */
+ struct gl_texture_unit Unit[MAX_COMBINED_TEXTURE_IMAGE_UNITS];
+
+ struct gl_texture_object *ProxyTex[NUM_TEXTURE_TARGETS];
+
+ /** GL_ARB_texture_buffer_object */
+ struct gl_buffer_object *BufferObject;
+
+ /** GL_ARB_seamless_cubemap */
+ GLboolean CubeMapSeamless;
+
+ /** GL_EXT_shared_texture_palette */
+ GLboolean SharedPalette;
+ struct gl_color_table Palette;
+
+ /** Texture units/samplers used by vertex or fragment texturing */
+ GLbitfield _EnabledUnits;
+
+ /** Texture coord units/sets used for fragment texturing */
+ GLbitfield _EnabledCoordUnits;
+
+ /** Texture coord units that have texgen enabled */
+ GLbitfield _TexGenEnabled;
+
+ /** Texture coord units that have non-identity matrices */
+ GLbitfield _TexMatEnabled;
+
+ /** Bitwise-OR of all Texture.Unit[i]._GenFlags */
+ GLbitfield _GenFlags;
+};
+
+
+/**
+ * Transformation attribute group (GL_TRANSFORM_BIT).
+ */
+struct gl_transform_attrib
+{
+ GLenum MatrixMode; /**< Matrix mode */
+ GLfloat EyeUserPlane[MAX_CLIP_PLANES][4]; /**< User clip planes */
+ GLfloat _ClipUserPlane[MAX_CLIP_PLANES][4]; /**< derived */
+ GLbitfield ClipPlanesEnabled; /**< on/off bitmask */
+ GLboolean Normalize; /**< Normalize all normals? */
+ GLboolean RescaleNormals; /**< GL_EXT_rescale_normal */
+ GLboolean RasterPositionUnclipped; /**< GL_IBM_rasterpos_clip */
+ GLboolean DepthClamp; /**< GL_ARB_depth_clamp */
+
+ GLfloat CullEyePos[4];
+ GLfloat CullObjPos[4];
+};
+
+
+/**
+ * Viewport attribute group (GL_VIEWPORT_BIT).
+ */
+struct gl_viewport_attrib
+{
+ GLint X, Y; /**< position */
+ GLsizei Width, Height; /**< size */
+ GLfloat Near, Far; /**< Depth buffer range */
+ GLmatrix _WindowMap; /**< Mapping transformation as a matrix. */
+};
+
+
+/**
+ * GL_ARB_vertex/pixel_buffer_object buffer object
+ */
+struct gl_buffer_object
+{
+ _glthread_Mutex Mutex;
+ GLint RefCount;
+ GLuint Name;
+ GLenum Usage; /**< GL_STREAM_DRAW_ARB, GL_STREAM_READ_ARB, etc. */
+ GLsizeiptrARB Size; /**< Size of buffer storage in bytes */
+ GLubyte *Data; /**< Location of storage either in RAM or VRAM. */
+ /** Fields describing a mapped buffer */
+ /*@{*/
+ GLbitfield AccessFlags; /**< Mask of GL_MAP_x_BIT flags */
+ GLvoid *Pointer; /**< User-space address of mapping */
+ GLintptr Offset; /**< Mapped offset */
+ GLsizeiptr Length; /**< Mapped length */
+ /*@}*/
+ GLboolean Written; /**< Ever written to? (for debugging) */
+ GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */
+};
+
+
+/**
+ * Client pixel packing/unpacking attributes
+ */
+struct gl_pixelstore_attrib
+{
+ GLint Alignment;
+ GLint RowLength;
+ GLint SkipPixels;
+ GLint SkipRows;
+ GLint ImageHeight;
+ GLint SkipImages;
+ GLboolean SwapBytes;
+ GLboolean LsbFirst;
+ GLboolean ClientStorage; /**< GL_APPLE_client_storage */
+ GLboolean Invert; /**< GL_MESA_pack_invert */
+ struct gl_buffer_object *BufferObj; /**< GL_ARB_pixel_buffer_object */
+};
+
+
+/**
+ * Client vertex array attributes
+ */
+struct gl_client_array
+{
+ GLint Size; /**< components per element (1,2,3,4) */
+ GLenum Type; /**< datatype: GL_FLOAT, GL_INT, etc */
+ GLenum Format; /**< default: GL_RGBA, but may be GL_BGRA */
+ GLsizei Stride; /**< user-specified stride */
+ GLsizei StrideB; /**< actual stride in bytes */
+ const GLubyte *Ptr; /**< Points to array data */
+ GLboolean Enabled; /**< Enabled flag is a boolean */
+ GLboolean Normalized; /**< GL_ARB_vertex_program */
+ GLboolean Integer; /**< Integer-valued? */
+ GLuint InstanceDivisor; /**< GL_ARB_instanced_arrays */
+ GLuint _ElementSize; /**< size of each element in bytes */
+
+ struct gl_buffer_object *BufferObj;/**< GL_ARB_vertex_buffer_object */
+ GLuint _MaxElement; /**< max element index into array buffer + 1 */
+};
+
+
+/**
+ * Collection of vertex arrays. Defined by the GL_APPLE_vertex_array_object
+ * extension, but a nice encapsulation in any case.
+ */
+struct gl_array_object
+{
+ /** Name of the array object as received from glGenVertexArrayAPPLE. */
+ GLuint Name;
+
+ GLint RefCount;
+ _glthread_Mutex Mutex;
+ GLboolean VBOonly; /**< require all arrays to live in VBOs? */
+
+ /** Conventional vertex arrays */
+ /*@{*/
+ struct gl_client_array Vertex;
+ struct gl_client_array Weight;
+ struct gl_client_array Normal;
+ struct gl_client_array Color;
+ struct gl_client_array SecondaryColor;
+ struct gl_client_array FogCoord;
+ struct gl_client_array Index;
+ struct gl_client_array EdgeFlag;
+ struct gl_client_array TexCoord[MAX_TEXTURE_COORD_UNITS];
+ struct gl_client_array PointSize;
+ /*@}*/
+
+ /**
+ * Generic arrays for vertex programs/shaders.
+ * For NV vertex programs, these attributes alias and take priority
+ * over the conventional attribs above. For ARB vertex programs and
+ * GLSL vertex shaders, these attributes are separate.
+ */
+ struct gl_client_array VertexAttrib[MAX_VERTEX_GENERIC_ATTRIBS];
+
+ /** Mask of _NEW_ARRAY_* values indicating which arrays are enabled */
+ GLbitfield _Enabled;
+
+ /**
+ * Min of all enabled arrays' _MaxElement. When arrays reside inside VBOs
+ * we can determine the max legal (in bounds) glDrawElements array index.
+ */
+ GLuint _MaxElement;
+};
+
+
+/**
+ * Vertex array state
+ */
+struct gl_array_attrib
+{
+ /** Currently bound array object. See _mesa_BindVertexArrayAPPLE() */
+ struct gl_array_object *ArrayObj;
+
+ /** The default vertex array object */
+ struct gl_array_object *DefaultArrayObj;
+
+ /** Array objects (GL_ARB/APPLE_vertex_array_object) */
+ struct _mesa_HashTable *Objects;
+
+ GLint ActiveTexture; /**< Client Active Texture */
+ GLuint LockFirst; /**< GL_EXT_compiled_vertex_array */
+ GLuint LockCount; /**< GL_EXT_compiled_vertex_array */
+
+ /** GL 3.1 (slightly different from GL_NV_primitive_restart) */
+ GLboolean PrimitiveRestart;
+ GLuint RestartIndex;
+
+ GLbitfield NewState; /**< mask of _NEW_ARRAY_* values */
+ GLboolean RebindArrays; /**< whether the VBO module should rebind arrays */
+
+ /* GL_ARB_vertex_buffer_object */
+ struct gl_buffer_object *ArrayBufferObj;
+ struct gl_buffer_object *ElementArrayBufferObj;
+};
+
+
+/**
+ * Feedback buffer state
+ */
+struct gl_feedback
+{
+ GLenum Type;
+ GLbitfield _Mask; /**< FB_* bits */
+ GLfloat *Buffer;
+ GLuint BufferSize;
+ GLuint Count;
+};
+
+
+/**
+ * Selection buffer state
+ */
+struct gl_selection
+{
+ GLuint *Buffer; /**< selection buffer */
+ GLuint BufferSize; /**< size of the selection buffer */
+ GLuint BufferCount; /**< number of values in the selection buffer */
+ GLuint Hits; /**< number of records in the selection buffer */
+ GLuint NameStackDepth; /**< name stack depth */
+ GLuint NameStack[MAX_NAME_STACK_DEPTH]; /**< name stack */
+ GLboolean HitFlag; /**< hit flag */
+ GLfloat HitMinZ; /**< minimum hit depth */
+ GLfloat HitMaxZ; /**< maximum hit depth */
+};
+
+
+/**
+ * 1-D Evaluator control points
+ */
+struct gl_1d_map
+{
+ GLuint Order; /**< Number of control points */
+ GLfloat u1, u2, du; /**< u1, u2, 1.0/(u2-u1) */
+ GLfloat *Points; /**< Points to contiguous control points */
+};
+
+
+/**
+ * 2-D Evaluator control points
+ */
+struct gl_2d_map
+{
+ GLuint Uorder; /**< Number of control points in U dimension */
+ GLuint Vorder; /**< Number of control points in V dimension */
+ GLfloat u1, u2, du;
+ GLfloat v1, v2, dv;
+ GLfloat *Points; /**< Points to contiguous control points */
+};
+
+
+/**
+ * All evaluator control point state
+ */
+struct gl_evaluators
+{
+ /**
+ * \name 1-D maps
+ */
+ /*@{*/
+ struct gl_1d_map Map1Vertex3;
+ struct gl_1d_map Map1Vertex4;
+ struct gl_1d_map Map1Index;
+ struct gl_1d_map Map1Color4;
+ struct gl_1d_map Map1Normal;
+ struct gl_1d_map Map1Texture1;
+ struct gl_1d_map Map1Texture2;
+ struct gl_1d_map Map1Texture3;
+ struct gl_1d_map Map1Texture4;
+ struct gl_1d_map Map1Attrib[16]; /**< GL_NV_vertex_program */
+ /*@}*/
+
+ /**
+ * \name 2-D maps
+ */
+ /*@{*/
+ struct gl_2d_map Map2Vertex3;
+ struct gl_2d_map Map2Vertex4;
+ struct gl_2d_map Map2Index;
+ struct gl_2d_map Map2Color4;
+ struct gl_2d_map Map2Normal;
+ struct gl_2d_map Map2Texture1;
+ struct gl_2d_map Map2Texture2;
+ struct gl_2d_map Map2Texture3;
+ struct gl_2d_map Map2Texture4;
+ struct gl_2d_map Map2Attrib[16]; /**< GL_NV_vertex_program */
+ /*@}*/
+};
+
+
+/**
+ * Names of the various vertex/fragment program register files, etc.
+ *
+ * NOTE: first four tokens must fit into 2 bits (see t_vb_arbprogram.c)
+ * All values should fit in a 4-bit field.
+ *
+ * NOTE: PROGRAM_ENV_PARAM, PROGRAM_STATE_VAR, PROGRAM_NAMED_PARAM,
+ * PROGRAM_CONSTANT, and PROGRAM_UNIFORM can all be considered to
+ * be "uniform" variables since they can only be set outside glBegin/End.
+ * They're also all stored in the same Parameters array.
+ */
+typedef enum
+{
+ PROGRAM_TEMPORARY, /**< machine->Temporary[] */
+ PROGRAM_INPUT, /**< machine->Inputs[] */
+ PROGRAM_OUTPUT, /**< machine->Outputs[] */
+ PROGRAM_VARYING, /**< machine->Inputs[]/Outputs[] */
+ PROGRAM_LOCAL_PARAM, /**< gl_program->LocalParams[] */
+ PROGRAM_ENV_PARAM, /**< gl_program->Parameters[] */
+ PROGRAM_STATE_VAR, /**< gl_program->Parameters[] */
+ PROGRAM_NAMED_PARAM, /**< gl_program->Parameters[] */
+ PROGRAM_CONSTANT, /**< gl_program->Parameters[] */
+ PROGRAM_UNIFORM, /**< gl_program->Parameters[] */
+ PROGRAM_WRITE_ONLY, /**< A dummy, write-only register */
+ PROGRAM_ADDRESS, /**< machine->AddressReg */
+ PROGRAM_SAMPLER, /**< for shader samplers, compile-time only */
+ PROGRAM_SYSTEM_VALUE,/**< InstanceId, PrimitiveID, etc. */
+ PROGRAM_UNDEFINED, /**< Invalid/TBD value */
+ PROGRAM_FILE_MAX
+} gl_register_file;
+
+
+/**
+ * If the register file is PROGRAM_SYSTEM_VALUE, the register index will be
+ * one of these values.
+ */
+typedef enum
+{
+ SYSTEM_VALUE_FRONT_FACE, /**< Fragment shader only (not done yet) */
+ SYSTEM_VALUE_INSTANCE_ID, /**< Vertex shader only */
+ SYSTEM_VALUE_MAX /**< Number of values */
+} gl_system_value;
+
+
+/** Vertex and fragment instructions */
+struct prog_instruction;
+struct gl_program_parameter_list;
+struct gl_uniform_list;
+
+
+/**
+ * Base class for any kind of program object
+ */
+struct gl_program
+{
+ GLuint Id;
+ GLubyte *String; /**< Null-terminated program text */
+ GLint RefCount;
+ GLenum Target; /**< GL_VERTEX/FRAGMENT_PROGRAM_ARB, GL_FRAGMENT_PROGRAM_NV */
+ GLenum Format; /**< String encoding format */
+ GLboolean Resident;
+
+ struct prog_instruction *Instructions;
+
+ GLbitfield InputsRead; /**< Bitmask of which input regs are read */
+ GLbitfield64 OutputsWritten; /**< Bitmask of which output regs are written */
+ GLbitfield SystemValuesRead; /**< Bitmask of SYSTEM_VALUE_x inputs used */
+ GLbitfield InputFlags[MAX_PROGRAM_INPUTS]; /**< PROG_PARAM_BIT_x flags */
+ GLbitfield OutputFlags[MAX_PROGRAM_OUTPUTS]; /**< PROG_PARAM_BIT_x flags */
+ GLbitfield TexturesUsed[MAX_TEXTURE_UNITS]; /**< TEXTURE_x_BIT bitmask */
+ GLbitfield SamplersUsed; /**< Bitfield of which samplers are used */
+ GLbitfield ShadowSamplers; /**< Texture units used for shadow sampling. */
+
+
+ /** Named parameters, constants, etc. from program text */
+ struct gl_program_parameter_list *Parameters;
+ /** Numbered local parameters */
+ GLfloat LocalParams[MAX_PROGRAM_LOCAL_PARAMS][4];
+
+ /** Vertex/fragment shader varying vars */
+ struct gl_program_parameter_list *Varying;
+ /** Vertex program user-defined attributes */
+ struct gl_program_parameter_list *Attributes;
+
+ /** Map from sampler unit to texture unit (set by glUniform1i()) */
+ GLubyte SamplerUnits[MAX_SAMPLERS];
+ /** Which texture target is being sampled (TEXTURE_1D/2D/3D/etc_INDEX) */
+ gl_texture_index SamplerTargets[MAX_SAMPLERS];
+
+ /** Bitmask of which register files are read/written with indirect
+ * addressing. Mask of (1 << PROGRAM_x) bits.
+ */
+ GLbitfield IndirectRegisterFiles;
+
+ /** Logical counts */
+ /*@{*/
+ GLuint NumInstructions;
+ GLuint NumTemporaries;
+ GLuint NumParameters;
+ GLuint NumAttributes;
+ GLuint NumAddressRegs;
+ GLuint NumAluInstructions;
+ GLuint NumTexInstructions;
+ GLuint NumTexIndirections;
+ /*@}*/
+ /** Native, actual h/w counts */
+ /*@{*/
+ GLuint NumNativeInstructions;
+ GLuint NumNativeTemporaries;
+ GLuint NumNativeParameters;
+ GLuint NumNativeAttributes;
+ GLuint NumNativeAddressRegs;
+ GLuint NumNativeAluInstructions;
+ GLuint NumNativeTexInstructions;
+ GLuint NumNativeTexIndirections;
+ /*@}*/
+};
+
+
+/** Vertex program object */
+struct gl_vertex_program
+{
+ struct gl_program Base; /**< base class */
+ GLboolean IsNVProgram; /**< is this a GL_NV_vertex_program program? */
+ GLboolean IsPositionInvariant;
+};
+
+
+/** Geometry program object */
+struct gl_geometry_program
+{
+ struct gl_program Base; /**< base class */
+
+ GLint VerticesOut;
+ GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
+ GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
+ GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */
+};
+
+
+/** Fragment program object */
+struct gl_fragment_program
+{
+ struct gl_program Base; /**< base class */
+ GLenum FogOption;
+ GLboolean UsesKill; /**< shader uses KIL instruction */
+ GLboolean OriginUpperLeft;
+ GLboolean PixelCenterInteger;
+ enum gl_frag_depth_layout FragDepthLayout;
+};
+
+
+/**
+ * State common to vertex and fragment programs.
+ */
+struct gl_program_state
+{
+ GLint ErrorPos; /* GL_PROGRAM_ERROR_POSITION_ARB/NV */
+ const char *ErrorString; /* GL_PROGRAM_ERROR_STRING_ARB/NV */
+};
+
+
+/**
+ * Context state for vertex programs.
+ */
+struct gl_vertex_program_state
+{
+ GLboolean Enabled; /**< User-set GL_VERTEX_PROGRAM_ARB/NV flag */
+ GLboolean _Enabled; /**< Enabled and _valid_ user program? */
+ GLboolean PointSizeEnabled; /**< GL_VERTEX_PROGRAM_POINT_SIZE_ARB/NV */
+ GLboolean TwoSideEnabled; /**< GL_VERTEX_PROGRAM_TWO_SIDE_ARB/NV */
+ struct gl_vertex_program *Current; /**< User-bound vertex program */
+
+ /** Currently enabled and valid vertex program (including internal
+ * programs, user-defined vertex programs and GLSL vertex shaders).
+ * This is the program we must use when rendering.
+ */
+ struct gl_vertex_program *_Current;
+
+ GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */
+
+ /* For GL_NV_vertex_program only: */
+ GLenum TrackMatrix[MAX_PROGRAM_ENV_PARAMS / 4];
+ GLenum TrackMatrixTransform[MAX_PROGRAM_ENV_PARAMS / 4];
+
+ /** Should fixed-function T&L be implemented with a vertex prog? */
+ GLboolean _MaintainTnlProgram;
+
+ /** Program to emulate fixed-function T&L (see above) */
+ struct gl_vertex_program *_TnlProgram;
+
+ /** Cache of fixed-function programs */
+ struct gl_program_cache *Cache;
+
+ GLboolean _Overriden;
+};
+
+
+/**
+ * Context state for geometry programs.
+ */
+struct gl_geometry_program_state
+{
+ GLboolean Enabled; /**< GL_ARB_GEOMETRY_SHADER4 */
+ GLboolean _Enabled; /**< Enabled and valid program? */
+ struct gl_geometry_program *Current; /**< user-bound geometry program */
+
+ /** Currently enabled and valid program (including internal programs
+ * and compiled shader programs).
+ */
+ struct gl_geometry_program *_Current;
+
+ GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */
+
+ /** Cache of fixed-function programs */
+ struct gl_program_cache *Cache;
+};
+
+/**
+ * Context state for fragment programs.
+ */
+struct gl_fragment_program_state
+{
+ GLboolean Enabled; /**< User-set fragment program enable flag */
+ GLboolean _Enabled; /**< Enabled and _valid_ user program? */
+ struct gl_fragment_program *Current; /**< User-bound fragment program */
+
+ /** Currently enabled and valid fragment program (including internal
+ * programs, user-defined fragment programs and GLSL fragment shaders).
+ * This is the program we must use when rendering.
+ */
+ struct gl_fragment_program *_Current;
+
+ GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; /**< Env params */
+
+ /** Should fixed-function texturing be implemented with a fragment prog? */
+ GLboolean _MaintainTexEnvProgram;
+
+ /** Program to emulate fixed-function texture env/combine (see above) */
+ struct gl_fragment_program *_TexEnvProgram;
+
+ /** Cache of fixed-function programs */
+ struct gl_program_cache *Cache;
+};
+
+
+/**
+ * ATI_fragment_shader runtime state
+ */
+#define ATI_FS_INPUT_PRIMARY 0
+#define ATI_FS_INPUT_SECONDARY 1
+
+struct atifs_instruction;
+struct atifs_setupinst;
+
+/**
+ * ATI fragment shader
+ */
+struct ati_fragment_shader
+{
+ GLuint Id;
+ GLint RefCount;
+ struct atifs_instruction *Instructions[2];
+ struct atifs_setupinst *SetupInst[2];
+ GLfloat Constants[8][4];
+ GLbitfield LocalConstDef; /**< Indicates which constants have been set */
+ GLubyte numArithInstr[2];
+ GLubyte regsAssigned[2];
+ GLubyte NumPasses; /**< 1 or 2 */
+ GLubyte cur_pass;
+ GLubyte last_optype;
+ GLboolean interpinp1;
+ GLboolean isValid;
+ GLuint swizzlerq;
+};
+
+/**
+ * Context state for GL_ATI_fragment_shader
+ */
+struct gl_ati_fragment_shader_state
+{
+ GLboolean Enabled;
+ GLboolean _Enabled; /**< enabled and valid shader? */
+ GLboolean Compiling;
+ GLfloat GlobalConstants[8][4];
+ struct ati_fragment_shader *Current;
+};
+
+
+/**
+ * Occlusion/timer query object.
+ */
+struct gl_query_object
+{
+ GLenum Target; /**< The query target, when active */
+ GLuint Id; /**< hash table ID/name */
+ GLuint64EXT Result; /**< the counter */
+ GLboolean Active; /**< inside Begin/EndQuery */
+ GLboolean Ready; /**< result is ready? */
+};
+
+
+/**
+ * Context state for query objects.
+ */
+struct gl_query_state
+{
+ struct _mesa_HashTable *QueryObjects;
+ struct gl_query_object *CurrentOcclusionObject; /* GL_ARB_occlusion_query */
+ struct gl_query_object *CurrentTimerObject; /* GL_EXT_timer_query */
+
+ /** GL_NV_conditional_render */
+ struct gl_query_object *CondRenderQuery;
+
+ /** GL_EXT_transform_feedback */
+ struct gl_query_object *PrimitivesGenerated;
+ struct gl_query_object *PrimitivesWritten;
+
+ /** GL_ARB_timer_query */
+ struct gl_query_object *TimeElapsed;
+
+ GLenum CondRenderMode;
+};
+
+
+/** Sync object state */
+struct gl_sync_object {
+ struct simple_node link;
+ GLenum Type; /**< GL_SYNC_FENCE */
+ GLuint Name; /**< Fence name */
+ GLint RefCount; /**< Reference count */
+ GLboolean DeletePending; /**< Object was deleted while there were still
+ * live references (e.g., sync not yet finished)
+ */
+ GLenum SyncCondition;
+ GLbitfield Flags; /**< Flags passed to glFenceSync */
+ GLuint StatusFlag:1; /**< Has the sync object been signaled? */
+};
+
+
+/** Set by #pragma directives */
+struct gl_sl_pragmas
+{
+ GLboolean IgnoreOptimize; /**< ignore #pragma optimize(on/off) ? */
+ GLboolean IgnoreDebug; /**< ignore #pragma debug(on/off) ? */
+ GLboolean Optimize; /**< defaults on */
+ GLboolean Debug; /**< defaults off */
+};
+
+
+/**
+ * A GLSL vertex or fragment shader object.
+ */
+struct gl_shader
+{
+ GLenum Type; /**< GL_FRAGMENT_SHADER || GL_VERTEX_SHADER || GL_GEOMETRY_SHADER_ARB (first field!) */
+ GLuint Name; /**< AKA the handle */
+ GLint RefCount; /**< Reference count */
+ GLboolean DeletePending;
+ GLboolean CompileStatus;
+ const GLchar *Source; /**< Source code string */
+ GLuint SourceChecksum; /**< for debug/logging purposes */
+ struct gl_program *Program; /**< Post-compile assembly code */
+ GLchar *InfoLog;
+ struct gl_sl_pragmas Pragmas;
+
+ unsigned Version; /**< GLSL version used for linking */
+
+ struct exec_list *ir;
+ struct glsl_symbol_table *symbols;
+
+ /** Shaders containing built-in functions that are used for linking. */
+ struct gl_shader *builtins_to_link[16];
+ unsigned num_builtins_to_link;
+};
+
+
+/**
+ * A GLSL program object.
+ * Basically a linked collection of vertex and fragment shaders.
+ */
+struct gl_shader_program
+{
+ GLenum Type; /**< Always GL_SHADER_PROGRAM (internal token) */
+ GLuint Name; /**< aka handle or ID */
+ GLint RefCount; /**< Reference count */
+ GLboolean DeletePending;
+
+ GLuint NumShaders; /**< number of attached shaders */
+ struct gl_shader **Shaders; /**< List of attached the shaders */
+
+ /** User-defined attribute bindings (glBindAttribLocation) */
+ struct gl_program_parameter_list *Attributes;
+
+ /** Transform feedback varyings */
+ struct {
+ GLenum BufferMode;
+ GLuint NumVarying;
+ GLchar **VaryingNames; /**< Array [NumVarying] of char * */
+ } TransformFeedback;
+
+ /** Geometry shader state - copied into gl_geometry_program at link time */
+ struct {
+ GLint VerticesOut;
+ GLenum InputType; /**< GL_POINTS, GL_LINES, GL_LINES_ADJACENCY_ARB,
+ GL_TRIANGLES, or GL_TRIANGLES_ADJACENCY_ARB */
+ GLenum OutputType; /**< GL_POINTS, GL_LINE_STRIP or GL_TRIANGLE_STRIP */
+ } Geom;
+
+ /* post-link info: */
+ struct gl_vertex_program *VertexProgram; /**< Linked vertex program */
+ struct gl_fragment_program *FragmentProgram; /**< Linked fragment prog */
+ struct gl_geometry_program *GeometryProgram; /**< Linked geometry prog */
+ struct gl_uniform_list *Uniforms;
+ struct gl_program_parameter_list *Varying;
+ GLboolean LinkStatus; /**< GL_LINK_STATUS */
+ GLboolean Validated;
+ GLboolean _Used; /**< Ever used for drawing? */
+ GLchar *InfoLog;
+
+ unsigned Version; /**< GLSL version used for linking */
+
+ /**
+ * Per-stage shaders resulting from the first stage of linking.
+ *
+ * Set of linked shaders for this program. The array is accessed using the
+ * \c MESA_SHADER_* defines. Entries for non-existent stages will be
+ * \c NULL.
+ */
+ struct gl_shader *_LinkedShaders[MESA_SHADER_TYPES];
+};
+
+
+#define GLSL_DUMP 0x1 /**< Dump shaders to stdout */
+#define GLSL_LOG 0x2 /**< Write shaders to files */
+#define GLSL_OPT 0x4 /**< Force optimizations (override pragmas) */
+#define GLSL_NO_OPT 0x8 /**< Force no optimizations (override pragmas) */
+#define GLSL_UNIFORMS 0x10 /**< Print glUniform calls */
+#define GLSL_NOP_VERT 0x20 /**< Force no-op vertex shaders */
+#define GLSL_NOP_FRAG 0x40 /**< Force no-op fragment shaders */
+#define GLSL_USE_PROG 0x80 /**< Log glUseProgram calls */
+
+
+/**
+ * Context state for GLSL vertex/fragment shaders.
+ */
+struct gl_shader_state
+{
+ /**
+ * Programs used for rendering
+ *
+ * There is a separate program set for each shader stage. If
+ * GL_EXT_separate_shader_objects is not supported, each of these must point
+ * to \c NULL or to the same program.
+ */
+ struct gl_shader_program *CurrentVertexProgram;
+ struct gl_shader_program *CurrentGeometryProgram;
+ struct gl_shader_program *CurrentFragmentProgram;
+
+ /**
+ * Program used by glUniform calls.
+ *
+ * Explicitly set by \c glUseProgram and \c glActiveProgramEXT.
+ */
+ struct gl_shader_program *ActiveProgram;
+
+ void *MemPool;
+
+ GLbitfield Flags; /**< Mask of GLSL_x flags */
+};
+
+/**
+ * Compiler options for a single GLSL shaders type
+ */
+struct gl_shader_compiler_options
+{
+ /** Driver-selectable options: */
+ GLboolean EmitCondCodes; /**< Use condition codes? */
+ GLboolean EmitNVTempInitialization; /**< 0-fill NV temp registers */
+ /**
+ * Attempts to flatten all ir_if (OPCODE_IF) for GPUs that can't
+ * support control flow.
+ */
+ GLboolean EmitNoIfs;
+ GLboolean EmitNoLoops;
+ GLboolean EmitNoFunctions;
+ GLboolean EmitNoCont; /**< Emit CONT opcode? */
+ GLboolean EmitNoMainReturn; /**< Emit CONT/RET opcodes? */
+ GLboolean EmitNoNoise; /**< Emit NOISE opcodes? */
+ GLboolean EmitNoPow; /**< Emit POW opcodes? */
+
+ /**
+ * \name Forms of indirect addressing the driver cannot do.
+ */
+ /*@{*/
+ GLboolean EmitNoIndirectInput; /**< No indirect addressing of inputs */
+ GLboolean EmitNoIndirectOutput; /**< No indirect addressing of outputs */
+ GLboolean EmitNoIndirectTemp; /**< No indirect addressing of temps */
+ GLboolean EmitNoIndirectUniform; /**< No indirect addressing of constants */
+ /*@}*/
+
+ GLuint MaxUnrollIterations;
+
+ struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */
+};
+
+/**
+ * Transform feedback object state
+ */
+struct gl_transform_feedback_object
+{
+ GLuint Name; /**< AKA the object ID */
+ GLint RefCount;
+ GLboolean Active; /**< Is transform feedback enabled? */
+ GLboolean Paused; /**< Is transform feedback paused? */
+
+ /** The feedback buffers */
+ GLuint BufferNames[MAX_FEEDBACK_ATTRIBS];
+ struct gl_buffer_object *Buffers[MAX_FEEDBACK_ATTRIBS];
+
+ /** Start of feedback data in dest buffer */
+ GLintptr Offset[MAX_FEEDBACK_ATTRIBS];
+ /** Max data to put into dest buffer (in bytes) */
+ GLsizeiptr Size[MAX_FEEDBACK_ATTRIBS];
+};
+
+
+/**
+ * Context state for transform feedback.
+ */
+struct gl_transform_feedback
+{
+ GLenum Mode; /**< GL_POINTS, GL_LINES or GL_TRIANGLES */
+
+ GLboolean RasterDiscard; /**< GL_RASTERIZER_DISCARD */
+
+ /** The general binding point (GL_TRANSFORM_FEEDBACK_BUFFER) */
+ struct gl_buffer_object *CurrentBuffer;
+
+ /** The table of all transform feedback objects */
+ struct _mesa_HashTable *Objects;
+
+ /** The current xform-fb object (GL_TRANSFORM_FEEDBACK_BINDING) */
+ struct gl_transform_feedback_object *CurrentObject;
+
+ /** The default xform-fb object (Name==0) */
+ struct gl_transform_feedback_object *DefaultObject;
+};
+
+
+
+/**
+ * State which can be shared by multiple contexts:
+ */
+struct gl_shared_state
+{
+ _glthread_Mutex Mutex; /**< for thread safety */
+ GLint RefCount; /**< Reference count */
+ struct _mesa_HashTable *DisplayList; /**< Display lists hash table */
+ struct _mesa_HashTable *TexObjects; /**< Texture objects hash table */
+
+ /** Default texture objects (shared by all texture units) */
+ struct gl_texture_object *DefaultTex[NUM_TEXTURE_TARGETS];
+
+ /** Fallback texture used when a bound texture is incomplete */
+ struct gl_texture_object *FallbackTex;
+
+ /**
+ * \name Thread safety and statechange notification for texture
+ * objects.
+ *
+ * \todo Improve the granularity of locking.
+ */
+ /*@{*/
+ _glthread_Mutex TexMutex; /**< texobj thread safety */
+ GLuint TextureStateStamp; /**< state notification for shared tex */
+ /*@}*/
+
+ /** Default buffer object for vertex arrays that aren't in VBOs */
+ struct gl_buffer_object *NullBufferObj;
+
+ /**
+ * \name Vertex/geometry/fragment programs
+ */
+ /*@{*/
+ struct _mesa_HashTable *Programs; /**< All vertex/fragment programs */
+ struct gl_vertex_program *DefaultVertexProgram;
+ struct gl_fragment_program *DefaultFragmentProgram;
+ struct gl_geometry_program *DefaultGeometryProgram;
+ /*@}*/
+
+ /* GL_ATI_fragment_shader */
+ struct _mesa_HashTable *ATIShaders;
+ struct ati_fragment_shader *DefaultFragmentShader;
+
+ struct _mesa_HashTable *BufferObjects;
+
+ /** Table of both gl_shader and gl_shader_program objects */
+ struct _mesa_HashTable *ShaderObjects;
+
+ /* GL_EXT_framebuffer_object */
+ struct _mesa_HashTable *RenderBuffers;
+ struct _mesa_HashTable *FrameBuffers;
+
+ /* GL_ARB_sync */
+ struct simple_node SyncObjects;
+
+ void *DriverData; /**< Device driver shared state */
+};
+
+
+
+
+/**
+ * A renderbuffer stores colors or depth values or stencil values.
+ * A framebuffer object will have a collection of these.
+ * Data are read/written to the buffer with a handful of Get/Put functions.
+ *
+ * Instances of this object are allocated with the Driver's NewRenderbuffer
+ * hook. Drivers will likely wrap this class inside a driver-specific
+ * class to simulate inheritance.
+ */
+struct gl_renderbuffer
+{
+#define RB_MAGIC 0xaabbccdd
+ int Magic; /** XXX TEMPORARY DEBUG INFO */
+ _glthread_Mutex Mutex; /**< for thread safety */
+ GLuint ClassID; /**< Useful for drivers */
+ GLuint Name;
+ GLint RefCount;
+ GLuint Width, Height;
+ GLboolean Purgeable; /**< Is the buffer purgeable under memory pressure? */
+
+ GLenum InternalFormat; /**< The user-specified format */
+ GLenum _BaseFormat; /**< Either GL_RGB, GL_RGBA, GL_DEPTH_COMPONENT or
+ GL_STENCIL_INDEX. */
+ gl_format Format; /**< The actual renderbuffer memory format */
+
+ GLubyte NumSamples;
+
+ GLenum DataType; /**< Type of values passed to the Get/Put functions */
+ GLvoid *Data; /**< This may not be used by some kinds of RBs */
+
+ GLboolean AttachedAnytime; /**< TRUE if it was attached to a framebuffer */
+
+ /* Used to wrap one renderbuffer around another: */
+ struct gl_renderbuffer *Wrapped;
+
+ /* Delete this renderbuffer */
+ void (*Delete)(struct gl_renderbuffer *rb);
+
+ /* Allocate new storage for this renderbuffer */
+ GLboolean (*AllocStorage)(struct gl_context *ctx, struct gl_renderbuffer *rb,
+ GLenum internalFormat,
+ GLuint width, GLuint height);
+
+ /* Lock/Unlock are called before/after calling the Get/Put functions.
+ * Not sure this is the right place for these yet.
+ void (*Lock)(struct gl_context *ctx, struct gl_renderbuffer *rb);
+ void (*Unlock)(struct gl_context *ctx, struct gl_renderbuffer *rb);
+ */
+
+ /* Return a pointer to the element/pixel at (x,y).
+ * Should return NULL if the buffer memory can't be directly addressed.
+ */
+ void *(*GetPointer)(struct gl_context *ctx, struct gl_renderbuffer *rb,
+ GLint x, GLint y);
+
+ /* Get/Read a row of values.
+ * The values will be of format _BaseFormat and type DataType.
+ */
+ void (*GetRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
+ GLint x, GLint y, void *values);
+
+ /* Get/Read values at arbitrary locations.
+ * The values will be of format _BaseFormat and type DataType.
+ */
+ void (*GetValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
+ const GLint x[], const GLint y[], void *values);
+
+ /* Put/Write a row of values.
+ * The values will be of format _BaseFormat and type DataType.
+ */
+ void (*PutRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
+ GLint x, GLint y, const void *values, const GLubyte *mask);
+
+ /* Put/Write a row of RGB values. This is a special-case routine that's
+ * only used for RGBA renderbuffers when the source data is GL_RGB. That's
+ * a common case for glDrawPixels and some triangle routines.
+ * The values will be of format GL_RGB and type DataType.
+ */
+ void (*PutRowRGB)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
+ GLint x, GLint y, const void *values, const GLubyte *mask);
+
+
+ /* Put/Write a row of identical values.
+ * The values will be of format _BaseFormat and type DataType.
+ */
+ void (*PutMonoRow)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
+ GLint x, GLint y, const void *value, const GLubyte *mask);
+
+ /* Put/Write values at arbitrary locations.
+ * The values will be of format _BaseFormat and type DataType.
+ */
+ void (*PutValues)(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count,
+ const GLint x[], const GLint y[], const void *values,
+ const GLubyte *mask);
+ /* Put/Write identical values at arbitrary locations.
+ * The values will be of format _BaseFormat and type DataType.
+ */
+ void (*PutMonoValues)(struct gl_context *ctx, struct gl_renderbuffer *rb,
+ GLuint count, const GLint x[], const GLint y[],
+ const void *value, const GLubyte *mask);
+};
+
+
+/**
+ * A renderbuffer attachment points to either a texture object (and specifies
+ * a mipmap level, cube face or 3D texture slice) or points to a renderbuffer.
+ */
+struct gl_renderbuffer_attachment
+{
+ GLenum Type; /**< \c GL_NONE or \c GL_TEXTURE or \c GL_RENDERBUFFER_EXT */
+ GLboolean Complete;
+
+ /**
+ * If \c Type is \c GL_RENDERBUFFER_EXT, this stores a pointer to the
+ * application supplied renderbuffer object.
+ */
+ struct gl_renderbuffer *Renderbuffer;
+
+ /**
+ * If \c Type is \c GL_TEXTURE, this stores a pointer to the application
+ * supplied texture object.
+ */
+ struct gl_texture_object *Texture;
+ GLuint TextureLevel; /**< Attached mipmap level. */
+ GLuint CubeMapFace; /**< 0 .. 5, for cube map textures. */
+ GLuint Zoffset; /**< Slice for 3D textures, or layer for both 1D
+ * and 2D array textures */
+};
+
+
+/**
+ * A framebuffer is a collection of renderbuffers (color, depth, stencil, etc).
+ * In C++ terms, think of this as a base class from which device drivers
+ * will make derived classes.
+ */
+struct gl_framebuffer
+{
+ _glthread_Mutex Mutex; /**< for thread safety */
+ /**
+ * If zero, this is a window system framebuffer. If non-zero, this
+ * is a FBO framebuffer; note that for some devices (i.e. those with
+ * a natural pixel coordinate system for FBOs that differs from the
+ * OpenGL/Mesa coordinate system), this means that the viewport,
+ * polygon face orientation, and polygon stipple will have to be inverted.
+ */
+ GLuint Name;
+
+ GLint RefCount;
+ GLboolean DeletePending;
+
+ /**
+ * The framebuffer's visual. Immutable if this is a window system buffer.
+ * Computed from attachments if user-made FBO.
+ */
+ struct gl_config Visual;
+
+ GLboolean Initialized;
+
+ GLuint Width, Height; /**< size of frame buffer in pixels */
+
+ /** \name Drawing bounds (Intersection of buffer size and scissor box) */
+ /*@{*/
+ GLint _Xmin, _Xmax; /**< inclusive */
+ GLint _Ymin, _Ymax; /**< exclusive */
+ /*@}*/
+
+ /** \name Derived Z buffer stuff */
+ /*@{*/
+ GLuint _DepthMax; /**< Max depth buffer value */
+ GLfloat _DepthMaxF; /**< Float max depth buffer value */
+ GLfloat _MRD; /**< minimum resolvable difference in Z values */
+ /*@}*/
+
+ /** One of the GL_FRAMEBUFFER_(IN)COMPLETE_* tokens */
+ GLenum _Status;
+
+ /** Integer color values */
+ GLboolean _IntegerColor;
+
+ /** Array of all renderbuffer attachments, indexed by BUFFER_* tokens. */
+ struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT];
+
+ /* In unextended OpenGL these vars are part of the GL_COLOR_BUFFER
+ * attribute group and GL_PIXEL attribute group, respectively.
+ */
+ GLenum ColorDrawBuffer[MAX_DRAW_BUFFERS];
+ GLenum ColorReadBuffer;
+
+ /** Computed from ColorDraw/ReadBuffer above */
+ GLuint _NumColorDrawBuffers;
+ GLint _ColorDrawBufferIndexes[MAX_DRAW_BUFFERS]; /**< BUFFER_x or -1 */
+ GLint _ColorReadBufferIndex; /* -1 = None */
+ struct gl_renderbuffer *_ColorDrawBuffers[MAX_DRAW_BUFFERS];
+ struct gl_renderbuffer *_ColorReadBuffer;
+
+ /** The Actual depth/stencil buffers to use. May be wrappers around the
+ * depth/stencil buffers attached above. */
+ struct gl_renderbuffer *_DepthBuffer;
+ struct gl_renderbuffer *_StencilBuffer;
+
+ /** Delete this framebuffer */
+ void (*Delete)(struct gl_framebuffer *fb);
+};
+
+
+/**
+ * Precision info for shader datatypes. See glGetShaderPrecisionFormat().
+ */
+struct gl_precision
+{
+ GLushort RangeMin; /**< min value exponent */
+ GLushort RangeMax; /**< max value exponent */
+ GLushort Precision; /**< number of mantissa bits */
+};
+
+
+/**
+ * Limits for vertex, geometry and fragment programs/shaders.
+ */
+struct gl_program_constants
+{
+ /* logical limits */
+ GLuint MaxInstructions;
+ GLuint MaxAluInstructions;
+ GLuint MaxTexInstructions;
+ GLuint MaxTexIndirections;
+ GLuint MaxAttribs;
+ GLuint MaxTemps;
+ GLuint MaxAddressRegs;
+ GLuint MaxAddressOffset; /**< [-MaxAddressOffset, MaxAddressOffset-1] */
+ GLuint MaxParameters;
+ GLuint MaxLocalParams;
+ GLuint MaxEnvParams;
+ /* native/hardware limits */
+ GLuint MaxNativeInstructions;
+ GLuint MaxNativeAluInstructions;
+ GLuint MaxNativeTexInstructions;
+ GLuint MaxNativeTexIndirections;
+ GLuint MaxNativeAttribs;
+ GLuint MaxNativeTemps;
+ GLuint MaxNativeAddressRegs;
+ GLuint MaxNativeParameters;
+ /* For shaders */
+ GLuint MaxUniformComponents; /**< Usually == MaxParameters * 4 */
+ /* ES 2.0 and GL_ARB_ES2_compatibility */
+ struct gl_precision LowFloat, MediumFloat, HighFloat;
+ struct gl_precision LowInt, MediumInt, HighInt;
+};
+
+
+/**
+ * Constants which may be overridden by device driver during context creation
+ * but are never changed after that.
+ */
+struct gl_constants
+{
+ GLint MaxTextureMbytes; /**< Max memory per image, in MB */
+ GLint MaxTextureLevels; /**< Max mipmap levels. */
+ GLint Max3DTextureLevels; /**< Max mipmap levels for 3D textures */
+ GLint MaxCubeTextureLevels; /**< Max mipmap levels for cube textures */
+ GLint MaxArrayTextureLayers; /**< Max layers in array textures */
+ GLint MaxTextureRectSize; /**< Max rectangle texture size, in pixes */
+ GLuint MaxTextureCoordUnits;
+ GLuint MaxTextureImageUnits;
+ GLuint MaxVertexTextureImageUnits;
+ GLuint MaxCombinedTextureImageUnits;
+ GLuint MaxGeometryTextureImageUnits;
+ GLuint MaxTextureUnits; /**< = MIN(CoordUnits, ImageUnits) */
+ GLfloat MaxTextureMaxAnisotropy; /**< GL_EXT_texture_filter_anisotropic */
+ GLfloat MaxTextureLodBias; /**< GL_EXT_texture_lod_bias */
+ GLuint MaxTextureBufferSize; /**< GL_ARB_texture_buffer_object */
+
+ GLuint MaxArrayLockSize;
+
+ GLint SubPixelBits;
+
+ GLfloat MinPointSize, MaxPointSize; /**< aliased */
+ GLfloat MinPointSizeAA, MaxPointSizeAA; /**< antialiased */
+ GLfloat PointSizeGranularity;
+ GLfloat MinLineWidth, MaxLineWidth; /**< aliased */
+ GLfloat MinLineWidthAA, MaxLineWidthAA; /**< antialiased */
+ GLfloat LineWidthGranularity;
+
+ GLuint MaxColorTableSize;
+
+ GLuint MaxClipPlanes;
+ GLuint MaxLights;
+ GLfloat MaxShininess; /**< GL_NV_light_max_exponent */
+ GLfloat MaxSpotExponent; /**< GL_NV_light_max_exponent */
+
+ GLuint MaxViewportWidth, MaxViewportHeight;
+
+ struct gl_program_constants VertexProgram; /**< GL_ARB_vertex_program */
+ struct gl_program_constants FragmentProgram; /**< GL_ARB_fragment_program */
+ struct gl_program_constants GeometryProgram; /**< GL_ARB_geometry_shader4 */
+ GLuint MaxProgramMatrices;
+ GLuint MaxProgramMatrixStackDepth;
+
+ /** vertex array / buffer object bounds checking */
+ GLboolean CheckArrayBounds;
+
+ GLuint MaxDrawBuffers; /**< GL_ARB_draw_buffers */
+
+ GLuint MaxColorAttachments; /**< GL_EXT_framebuffer_object */
+ GLuint MaxRenderbufferSize; /**< GL_EXT_framebuffer_object */
+ GLuint MaxSamples; /**< GL_ARB_framebuffer_object */
+
+ /** Number of varying vectors between vertex and fragment shaders */
+ GLuint MaxVarying;
+ GLuint MaxVertexVaryingComponents; /**< Between vert and geom shader */
+ GLuint MaxGeometryVaryingComponents; /**< Between geom and frag shader */
+
+ /** GL_ARB_geometry_shader4 */
+ GLuint MaxGeometryOutputVertices;
+ GLuint MaxGeometryTotalOutputComponents;
+
+ GLuint GLSLVersion; /**< GLSL version supported (ex: 120 = 1.20) */
+
+ /** Which texture units support GL_ATI_envmap_bumpmap as targets */
+ GLbitfield SupportedBumpUnits;
+
+ /**
+ * Maximum amount of time, measured in nanseconds, that the server can wait.
+ */
+ GLuint64 MaxServerWaitTimeout;
+
+ /** GL_EXT_provoking_vertex */
+ GLboolean QuadsFollowProvokingVertexConvention;
+
+ /** OpenGL version 3.0 */
+ GLbitfield ContextFlags; /**< Ex: GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT */
+
+ /** OpenGL version 3.2 */
+ GLbitfield ProfileMask; /**< Mask of CONTEXT_x_PROFILE_BIT */
+
+ /** GL_EXT_transform_feedback */
+ GLuint MaxTransformFeedbackSeparateAttribs;
+ GLuint MaxTransformFeedbackSeparateComponents;
+ GLuint MaxTransformFeedbackInterleavedComponents;
+
+ /** GL_EXT_gpu_shader4 */
+ GLint MinProgramTexelOffset, MaxProgramTexelOffset;
+
+ /* GL_EXT_framebuffer_sRGB */
+ GLboolean sRGBCapable; /* can enable sRGB blend/update on FBOs */
+};
+
+
+/**
+ * Enable flag for each OpenGL extension. Different device drivers will
+ * enable different extensions at runtime.
+ */
+struct gl_extensions
+{
+ GLboolean dummy; /* don't remove this! */
+ GLboolean dummy_true; /* Set true by _mesa_init_extensions(). */
+ GLboolean dummy_false; /* Set false by _mesa_init_extensions(). */
+ GLboolean ARB_ES2_compatibility;
+ GLboolean ARB_blend_func_extended;
+ GLboolean ARB_color_buffer_float;
+ GLboolean ARB_copy_buffer;
+ GLboolean ARB_depth_buffer_float;
+ GLboolean ARB_depth_clamp;
+ GLboolean ARB_depth_texture;
+ GLboolean ARB_draw_buffers;
+ GLboolean ARB_draw_buffers_blend;
+ GLboolean ARB_draw_elements_base_vertex;
+ GLboolean ARB_draw_instanced;
+ GLboolean ARB_fragment_coord_conventions;
+ GLboolean ARB_fragment_program;
+ GLboolean ARB_fragment_program_shadow;
+ GLboolean ARB_fragment_shader;
+ GLboolean ARB_framebuffer_object;
+ GLboolean ARB_explicit_attrib_location;
+ GLboolean ARB_geometry_shader4;
+ GLboolean ARB_half_float_pixel;
+ GLboolean ARB_half_float_vertex;
+ GLboolean ARB_instanced_arrays;
+ GLboolean ARB_map_buffer_range;
+ GLboolean ARB_multisample;
+ GLboolean ARB_multitexture;
+ GLboolean ARB_occlusion_query;
+ GLboolean ARB_occlusion_query2;
+ GLboolean ARB_point_sprite;
+ GLboolean ARB_sampler_objects;
+ GLboolean ARB_seamless_cube_map;
+ GLboolean ARB_shader_objects;
+ GLboolean ARB_shader_stencil_export;
+ GLboolean ARB_shading_language_100;
+ GLboolean ARB_shadow;
+ GLboolean ARB_shadow_ambient;
+ GLboolean ARB_sync;
+ GLboolean ARB_texture_border_clamp;
+ GLboolean ARB_texture_buffer_object;
+ GLboolean ARB_texture_compression;
+ GLboolean ARB_texture_compression_rgtc;
+ GLboolean ARB_texture_cube_map;
+ GLboolean ARB_texture_env_combine;
+ GLboolean ARB_texture_env_crossbar;
+ GLboolean ARB_texture_env_dot3;
+ GLboolean ARB_texture_float;
+ GLboolean ARB_texture_mirrored_repeat;
+ GLboolean ARB_texture_multisample;
+ GLboolean ARB_texture_non_power_of_two;
+ GLboolean ARB_texture_rg;
+ GLboolean ARB_texture_rgb10_a2ui;
+ GLboolean ARB_timer_query;
+ GLboolean ARB_transform_feedback2;
+ GLboolean ARB_transpose_matrix;
+ GLboolean ARB_uniform_buffer_object;
+ GLboolean ARB_vertex_array_object;
+ GLboolean ARB_vertex_buffer_object;
+ GLboolean ARB_vertex_program;
+ GLboolean ARB_vertex_shader;
+ GLboolean ARB_vertex_type_2_10_10_10_rev;
+ GLboolean ARB_window_pos;
+ GLboolean EXT_abgr;
+ GLboolean EXT_bgra;
+ GLboolean EXT_blend_color;
+ GLboolean EXT_blend_equation_separate;
+ GLboolean EXT_blend_func_separate;
+ GLboolean EXT_blend_logic_op;
+ GLboolean EXT_blend_minmax;
+ GLboolean EXT_blend_subtract;
+ GLboolean EXT_clip_volume_hint;
+ GLboolean EXT_compiled_vertex_array;
+ GLboolean EXT_copy_texture;
+ GLboolean EXT_depth_bounds_test;
+ GLboolean EXT_draw_buffers2;
+ GLboolean EXT_draw_range_elements;
+ GLboolean EXT_fog_coord;
+ GLboolean EXT_framebuffer_blit;
+ GLboolean EXT_framebuffer_multisample;
+ GLboolean EXT_framebuffer_object;
+ GLboolean EXT_framebuffer_sRGB;
+ GLboolean EXT_gpu_program_parameters;
+ GLboolean EXT_gpu_shader4;
+ GLboolean EXT_multi_draw_arrays;
+ GLboolean EXT_paletted_texture;
+ GLboolean EXT_packed_depth_stencil;
+ GLboolean EXT_packed_float;
+ GLboolean EXT_packed_pixels;
+ GLboolean EXT_pixel_buffer_object;
+ GLboolean EXT_point_parameters;
+ GLboolean EXT_polygon_offset;
+ GLboolean EXT_provoking_vertex;
+ GLboolean EXT_rescale_normal;
+ GLboolean EXT_shadow_funcs;
+ GLboolean EXT_secondary_color;
+ GLboolean EXT_separate_shader_objects;
+ GLboolean EXT_separate_specular_color;
+ GLboolean EXT_shared_texture_palette;
+ GLboolean EXT_stencil_wrap;
+ GLboolean EXT_stencil_two_side;
+ GLboolean EXT_subtexture;
+ GLboolean EXT_texture;
+ GLboolean EXT_texture_object;
+ GLboolean EXT_texture3D;
+ GLboolean EXT_texture_array;
+ GLboolean EXT_texture_compression_latc;
+ GLboolean EXT_texture_compression_s3tc;
+ GLboolean EXT_texture_env_add;
+ GLboolean EXT_texture_env_combine;
+ GLboolean EXT_texture_env_dot3;
+ GLboolean EXT_texture_filter_anisotropic;
+ GLboolean EXT_texture_integer;
+ GLboolean EXT_texture_lod_bias;
+ GLboolean EXT_texture_mirror_clamp;
+ GLboolean EXT_texture_shared_exponent;
+ GLboolean EXT_texture_snorm;
+ GLboolean EXT_texture_sRGB;
+ GLboolean EXT_texture_sRGB_decode;
+ GLboolean EXT_texture_swizzle;
+ GLboolean EXT_transform_feedback;
+ GLboolean EXT_timer_query;
+ GLboolean EXT_vertex_array;
+ GLboolean EXT_vertex_array_bgra;
+ GLboolean EXT_vertex_array_set;
+ GLboolean OES_standard_derivatives;
+ /* vendor extensions */
+ GLboolean AMD_conservative_depth;
+ GLboolean APPLE_client_storage;
+ GLboolean APPLE_packed_pixels;
+ GLboolean APPLE_vertex_array_object;
+ GLboolean APPLE_object_purgeable;
+ GLboolean ATI_envmap_bumpmap;
+ GLboolean ATI_texture_compression_3dc;
+ GLboolean ATI_texture_mirror_once;
+ GLboolean ATI_texture_env_combine3;
+ GLboolean ATI_fragment_shader;
+ GLboolean ATI_separate_stencil;
+ GLboolean IBM_rasterpos_clip;
+ GLboolean IBM_multimode_draw_arrays;
+ GLboolean MESA_pack_invert;
+ GLboolean MESA_resize_buffers;
+ GLboolean MESA_ycbcr_texture;
+ GLboolean MESA_texture_array;
+ GLboolean NV_blend_square;
+ GLboolean NV_conditional_render;
+ GLboolean NV_fragment_program;
+ GLboolean NV_fragment_program_option;
+ GLboolean NV_light_max_exponent;
+ GLboolean NV_point_sprite;
+ GLboolean NV_primitive_restart;
+ GLboolean NV_texture_barrier;
+ GLboolean NV_texgen_reflection;
+ GLboolean NV_texture_env_combine4;
+ GLboolean NV_texture_rectangle;
+ GLboolean NV_vertex_program;
+ GLboolean NV_vertex_program1_1;
+ GLboolean OES_read_format;
+ GLboolean SGIS_generate_mipmap;
+ GLboolean SGIS_texture_edge_clamp;
+ GLboolean SGIS_texture_lod;
+ GLboolean TDFX_texture_compression_FXT1;
+ GLboolean S3_s3tc;
+ GLboolean OES_EGL_image;
+ GLboolean OES_draw_texture;
+ GLboolean EXT_texture_format_BGRA8888;
+ GLboolean extension_sentinel;
+ /** The extension string */
+ const GLubyte *String;
+ /** Number of supported extensions */
+ GLuint Count;
+};
+
+
+/**
+ * A stack of matrices (projection, modelview, color, texture, etc).
+ */
+struct gl_matrix_stack
+{
+ GLmatrix *Top; /**< points into Stack */
+ GLmatrix *Stack; /**< array [MaxDepth] of GLmatrix */
+ GLuint Depth; /**< 0 <= Depth < MaxDepth */
+ GLuint MaxDepth; /**< size of Stack[] array */
+ GLuint DirtyFlag; /**< _NEW_MODELVIEW or _NEW_PROJECTION, for example */
+};
+
+
+/**
+ * \name Bits for image transfer operations
+ * \sa __struct gl_contextRec::ImageTransferState.
+ */
+/*@{*/
+#define IMAGE_SCALE_BIAS_BIT 0x1
+#define IMAGE_SHIFT_OFFSET_BIT 0x2
+#define IMAGE_MAP_COLOR_BIT 0x4
+#define IMAGE_CLAMP_BIT 0x800
+
+
+/** Pixel Transfer ops */
+#define IMAGE_BITS (IMAGE_SCALE_BIAS_BIT | \
+ IMAGE_SHIFT_OFFSET_BIT | \
+ IMAGE_MAP_COLOR_BIT)
+
+/**
+ * \name Bits to indicate what state has changed.
+ */
+/*@{*/
+#define _NEW_MODELVIEW (1 << 0) /**< gl_context::ModelView */
+#define _NEW_PROJECTION (1 << 1) /**< gl_context::Projection */
+#define _NEW_TEXTURE_MATRIX (1 << 2) /**< gl_context::TextureMatrix */
+#define _NEW_COLOR (1 << 3) /**< gl_context::Color */
+#define _NEW_DEPTH (1 << 4) /**< gl_context::Depth */
+#define _NEW_EVAL (1 << 5) /**< gl_context::Eval, EvalMap */
+#define _NEW_FOG (1 << 6) /**< gl_context::Fog */
+#define _NEW_HINT (1 << 7) /**< gl_context::Hint */
+#define _NEW_LIGHT (1 << 8) /**< gl_context::Light */
+#define _NEW_LINE (1 << 9) /**< gl_context::Line */
+#define _NEW_PIXEL (1 << 10) /**< gl_context::Pixel */
+#define _NEW_POINT (1 << 11) /**< gl_context::Point */
+#define _NEW_POLYGON (1 << 12) /**< gl_context::Polygon */
+#define _NEW_POLYGONSTIPPLE (1 << 13) /**< gl_context::PolygonStipple */
+#define _NEW_SCISSOR (1 << 14) /**< gl_context::Scissor */
+#define _NEW_STENCIL (1 << 15) /**< gl_context::Stencil */
+#define _NEW_TEXTURE (1 << 16) /**< gl_context::Texture */
+#define _NEW_TRANSFORM (1 << 17) /**< gl_context::Transform */
+#define _NEW_VIEWPORT (1 << 18) /**< gl_context::Viewport */
+#define _NEW_PACKUNPACK (1 << 19) /**< gl_context::Pack, Unpack */
+#define _NEW_ARRAY (1 << 20) /**< gl_context::Array */
+#define _NEW_RENDERMODE (1 << 21) /**< gl_context::RenderMode, etc */
+#define _NEW_BUFFERS (1 << 22) /**< gl_context::Visual, DrawBuffer, */
+#define _NEW_CURRENT_ATTRIB (1 << 23) /**< gl_context::Current */
+#define _NEW_MULTISAMPLE (1 << 24) /**< gl_context::Multisample */
+#define _NEW_TRACK_MATRIX (1 << 25) /**< gl_context::VertexProgram */
+#define _NEW_PROGRAM (1 << 26) /**< New program/shader state */
+#define _NEW_PROGRAM_CONSTANTS (1 << 27)
+#define _NEW_BUFFER_OBJECT (1 << 28)
+#define _NEW_FRAG_CLAMP (1 << 29)
+#define _NEW_ALL ~0
+/*@}*/
+
+
+/**
+ * \name Bits to track array state changes
+ *
+ * Also used to summarize array enabled.
+ */
+/*@{*/
+#define _NEW_ARRAY_VERTEX VERT_BIT_POS
+#define _NEW_ARRAY_WEIGHT VERT_BIT_WEIGHT
+#define _NEW_ARRAY_NORMAL VERT_BIT_NORMAL
+#define _NEW_ARRAY_COLOR0 VERT_BIT_COLOR0
+#define _NEW_ARRAY_COLOR1 VERT_BIT_COLOR1
+#define _NEW_ARRAY_FOGCOORD VERT_BIT_FOG
+#define _NEW_ARRAY_INDEX VERT_BIT_COLOR_INDEX
+#define _NEW_ARRAY_EDGEFLAG VERT_BIT_EDGEFLAG
+#define _NEW_ARRAY_POINT_SIZE VERT_BIT_COLOR_INDEX /* aliased */
+#define _NEW_ARRAY_TEXCOORD_0 VERT_BIT_TEX0
+#define _NEW_ARRAY_TEXCOORD_1 VERT_BIT_TEX1
+#define _NEW_ARRAY_TEXCOORD_2 VERT_BIT_TEX2
+#define _NEW_ARRAY_TEXCOORD_3 VERT_BIT_TEX3
+#define _NEW_ARRAY_TEXCOORD_4 VERT_BIT_TEX4
+#define _NEW_ARRAY_TEXCOORD_5 VERT_BIT_TEX5
+#define _NEW_ARRAY_TEXCOORD_6 VERT_BIT_TEX6
+#define _NEW_ARRAY_TEXCOORD_7 VERT_BIT_TEX7
+#define _NEW_ARRAY_ATTRIB_0 VERT_BIT_GENERIC0 /* start at bit 16 */
+#define _NEW_ARRAY_ALL 0xffffffff
+
+
+#define _NEW_ARRAY_TEXCOORD(i) (_NEW_ARRAY_TEXCOORD_0 << (i))
+#define _NEW_ARRAY_ATTRIB(i) (_NEW_ARRAY_ATTRIB_0 << (i))
+/*@}*/
+
+
+
+/**
+ * \name A bunch of flags that we think might be useful to drivers.
+ *
+ * Set in the __struct gl_contextRec::_TriangleCaps bitfield.
+ */
+/*@{*/
+#define DD_FLATSHADE 0x1
+#define DD_SEPARATE_SPECULAR 0x2
+#define DD_TRI_CULL_FRONT_BACK 0x4 /* special case on some hw */
+#define DD_TRI_LIGHT_TWOSIDE 0x8
+#define DD_TRI_UNFILLED 0x10
+#define DD_TRI_SMOOTH 0x20
+#define DD_TRI_STIPPLE 0x40
+#define DD_TRI_OFFSET 0x80
+#define DD_LINE_SMOOTH 0x100
+#define DD_LINE_STIPPLE 0x200
+#define DD_POINT_SMOOTH 0x400
+#define DD_POINT_ATTEN 0x800
+#define DD_TRI_TWOSTENCIL 0x1000
+/*@}*/
+
+
+/**
+ * \name Define the state changes under which each of these bits might change
+ */
+/*@{*/
+#define _DD_NEW_FLATSHADE _NEW_LIGHT
+#define _DD_NEW_SEPARATE_SPECULAR (_NEW_LIGHT | _NEW_FOG | _NEW_PROGRAM)
+#define _DD_NEW_TRI_CULL_FRONT_BACK _NEW_POLYGON
+#define _DD_NEW_TRI_LIGHT_TWOSIDE _NEW_LIGHT
+#define _DD_NEW_TRI_UNFILLED _NEW_POLYGON
+#define _DD_NEW_TRI_SMOOTH _NEW_POLYGON
+#define _DD_NEW_TRI_STIPPLE _NEW_POLYGON
+#define _DD_NEW_TRI_OFFSET _NEW_POLYGON
+#define _DD_NEW_LINE_SMOOTH _NEW_LINE
+#define _DD_NEW_LINE_STIPPLE _NEW_LINE
+#define _DD_NEW_LINE_WIDTH _NEW_LINE
+#define _DD_NEW_POINT_SMOOTH _NEW_POINT
+#define _DD_NEW_POINT_SIZE _NEW_POINT
+#define _DD_NEW_POINT_ATTEN _NEW_POINT
+/*@}*/
+
+
+/**
+ * Composite state flags
+ */
+/*@{*/
+#define _MESA_NEW_NEED_EYE_COORDS (_NEW_LIGHT | \
+ _NEW_TEXTURE | \
+ _NEW_POINT | \
+ _NEW_PROGRAM | \
+ _NEW_MODELVIEW)
+/*@}*/
+
+
+
+
+/* This has to be included here. */
+#include "dd.h"
+
+
+/**
+ * Display list flags.
+ * Strictly this is a tnl-private concept, but it doesn't seem
+ * worthwhile adding a tnl private structure just to hold this one bit
+ * of information:
+ */
+#define DLIST_DANGLING_REFS 0x1
+
+
+/** Opaque declaration of display list payload data type */
+union gl_dlist_node;
+
+
+/**
+ * Provide a location where information about a display list can be
+ * collected. Could be extended with driverPrivate structures,
+ * etc. in the future.
+ */
+struct gl_display_list
+{
+ GLuint Name;
+ GLbitfield Flags; /**< DLIST_x flags */
+ /** The dlist commands are in a linked list of nodes */
+ union gl_dlist_node *Head;
+};
+
+
+/**
+ * State used during display list compilation and execution.
+ */
+struct gl_dlist_state
+{
+ GLuint CallDepth; /**< Current recursion calling depth */
+
+ struct gl_display_list *CurrentList; /**< List currently being compiled */
+ union gl_dlist_node *CurrentBlock; /**< Pointer to current block of nodes */
+ GLuint CurrentPos; /**< Index into current block of nodes */
+
+ GLvertexformat ListVtxfmt;
+
+ GLubyte ActiveAttribSize[VERT_ATTRIB_MAX];
+ GLfloat CurrentAttrib[VERT_ATTRIB_MAX][4];
+
+ GLubyte ActiveMaterialSize[MAT_ATTRIB_MAX];
+ GLfloat CurrentMaterial[MAT_ATTRIB_MAX][4];
+
+ GLubyte ActiveIndex;
+ GLfloat CurrentIndex;
+
+ GLubyte ActiveEdgeFlag;
+ GLboolean CurrentEdgeFlag;
+
+ struct {
+ /* State known to have been set by the currently-compiling display
+ * list. Used to eliminate some redundant state changes.
+ */
+ GLenum ShadeModel;
+ } Current;
+};
+
+
+/**
+ * Enum for the OpenGL APIs we know about and may support.
+ */
+typedef enum
+{
+ API_OPENGL,
+ API_OPENGLES,
+ API_OPENGLES2
+} gl_api;
+
+
+/**
+ * Mesa rendering context.
+ *
+ * This is the central context data structure for Mesa. Almost all
+ * OpenGL state is contained in this structure.
+ * Think of this as a base class from which device drivers will derive
+ * sub classes.
+ *
+ * The struct gl_context typedef names this structure.
+ */
+struct gl_context
+{
+ /** State possibly shared with other contexts in the address space */
+ struct gl_shared_state *Shared;
+
+ /** \name API function pointer tables */
+ /*@{*/
+ gl_api API;
+ struct _glapi_table *Save; /**< Display list save functions */
+ struct _glapi_table *Exec; /**< Execute functions */
+ struct _glapi_table *CurrentDispatch; /**< == Save or Exec !! */
+ /*@}*/
+
+ struct gl_config Visual;
+ struct gl_framebuffer *DrawBuffer; /**< buffer for writing */
+ struct gl_framebuffer *ReadBuffer; /**< buffer for reading */
+ struct gl_framebuffer *WinSysDrawBuffer; /**< set with MakeCurrent */
+ struct gl_framebuffer *WinSysReadBuffer; /**< set with MakeCurrent */
+
+ /**
+ * Device driver function pointer table
+ */
+ struct dd_function_table Driver;
+
+ void *DriverCtx; /**< Points to device driver context/state */
+
+ /** Core/Driver constants */
+ struct gl_constants Const;
+
+ /** \name The various 4x4 matrix stacks */
+ /*@{*/
+ struct gl_matrix_stack ModelviewMatrixStack;
+ struct gl_matrix_stack ProjectionMatrixStack;
+ struct gl_matrix_stack TextureMatrixStack[MAX_TEXTURE_UNITS];
+ struct gl_matrix_stack ProgramMatrixStack[MAX_PROGRAM_MATRICES];
+ struct gl_matrix_stack *CurrentStack; /**< Points to one of the above stacks */
+ /*@}*/
+
+ /** Combined modelview and projection matrix */
+ GLmatrix _ModelProjectMatrix;
+
+ /** \name Display lists */
+ struct gl_dlist_state ListState;
+
+ GLboolean ExecuteFlag; /**< Execute GL commands? */
+ GLboolean CompileFlag; /**< Compile GL commands into display list? */
+
+ /** Extension information */
+ struct gl_extensions Extensions;
+
+ /** Version info */
+ GLuint VersionMajor, VersionMinor;
+ char *VersionString;
+
+ /** \name State attribute stack (for glPush/PopAttrib) */
+ /*@{*/
+ GLuint AttribStackDepth;
+ struct gl_attrib_node *AttribStack[MAX_ATTRIB_STACK_DEPTH];
+ /*@}*/
+
+ /** \name Renderer attribute groups
+ *
+ * We define a struct for each attribute group to make pushing and popping
+ * attributes easy. Also it's a good organization.
+ */
+ /*@{*/
+ struct gl_accum_attrib Accum; /**< Accum buffer attributes */
+ struct gl_colorbuffer_attrib Color; /**< Color buffer attributes */
+ struct gl_current_attrib Current; /**< Current attributes */
+ struct gl_depthbuffer_attrib Depth; /**< Depth buffer attributes */
+ struct gl_eval_attrib Eval; /**< Eval attributes */
+ struct gl_fog_attrib Fog; /**< Fog attributes */
+ struct gl_hint_attrib Hint; /**< Hint attributes */
+ struct gl_light_attrib Light; /**< Light attributes */
+ struct gl_line_attrib Line; /**< Line attributes */
+ struct gl_list_attrib List; /**< List attributes */
+ struct gl_multisample_attrib Multisample;
+ struct gl_pixel_attrib Pixel; /**< Pixel attributes */
+ struct gl_point_attrib Point; /**< Point attributes */
+ struct gl_polygon_attrib Polygon; /**< Polygon attributes */
+ GLuint PolygonStipple[32]; /**< Polygon stipple */
+ struct gl_scissor_attrib Scissor; /**< Scissor attributes */
+ struct gl_stencil_attrib Stencil; /**< Stencil buffer attributes */
+ struct gl_texture_attrib Texture; /**< Texture attributes */
+ struct gl_transform_attrib Transform; /**< Transformation attributes */
+ struct gl_viewport_attrib Viewport; /**< Viewport attributes */
+ /*@}*/
+
+ /** \name Client attribute stack */
+ /*@{*/
+ GLuint ClientAttribStackDepth;
+ struct gl_attrib_node *ClientAttribStack[MAX_CLIENT_ATTRIB_STACK_DEPTH];
+ /*@}*/
+
+ /** \name Client attribute groups */
+ /*@{*/
+ struct gl_array_attrib Array; /**< Vertex arrays */
+ struct gl_pixelstore_attrib Pack; /**< Pixel packing */
+ struct gl_pixelstore_attrib Unpack; /**< Pixel unpacking */
+ struct gl_pixelstore_attrib DefaultPacking; /**< Default params */
+ /*@}*/
+
+ /** \name Other assorted state (not pushed/popped on attribute stack) */
+ /*@{*/
+ struct gl_pixelmaps PixelMaps;
+
+ struct gl_evaluators EvalMap; /**< All evaluators */
+ struct gl_feedback Feedback; /**< Feedback */
+ struct gl_selection Select; /**< Selection */
+
+ struct gl_program_state Program; /**< general program state */
+ struct gl_vertex_program_state VertexProgram;
+ struct gl_fragment_program_state FragmentProgram;
+ struct gl_geometry_program_state GeometryProgram;
+ struct gl_ati_fragment_shader_state ATIFragmentShader;
+
+ struct gl_shader_state Shader; /**< GLSL shader object state */
+ struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_TYPES];
+
+ struct gl_query_state Query; /**< occlusion, timer queries */
+
+ struct gl_transform_feedback TransformFeedback;
+
+ struct gl_buffer_object *CopyReadBuffer; /**< GL_ARB_copy_buffer */
+ struct gl_buffer_object *CopyWriteBuffer; /**< GL_ARB_copy_buffer */
+ /*@}*/
+
+ struct gl_meta_state *Meta; /**< for "meta" operations */
+
+ /* GL_EXT_framebuffer_object */
+ struct gl_renderbuffer *CurrentRenderbuffer;
+
+ GLenum ErrorValue; /**< Last error code */
+
+ /**
+ * Recognize and silence repeated error debug messages in buggy apps.
+ */
+ const char *ErrorDebugFmtString;
+ GLuint ErrorDebugCount;
+
+ GLenum RenderMode; /**< either GL_RENDER, GL_SELECT, GL_FEEDBACK */
+ GLbitfield NewState; /**< bitwise-or of _NEW_* flags */
+
+ GLboolean ViewportInitialized; /**< has viewport size been initialized? */
+
+ GLbitfield varying_vp_inputs; /**< mask of VERT_BIT_* flags */
+
+ /** \name Derived state */
+ /*@{*/
+ /** Bitwise-or of DD_* flags. Note that this bitfield may be used before
+ * state validation so they need to always be current.
+ */
+ GLbitfield _TriangleCaps;
+ GLbitfield _ImageTransferState;/**< bitwise-or of IMAGE_*_BIT flags */
+ GLfloat _EyeZDir[3];
+ GLfloat _ModelViewInvScale;
+ GLboolean _NeedEyeCoords;
+ GLboolean _ForceEyeCoords;
+
+ GLuint TextureStateTimestamp; /**< detect changes to shared state */
+
+ struct gl_shine_tab *_ShineTable[2]; /**< Active shine tables */
+ struct gl_shine_tab *_ShineTabList; /**< MRU list of inactive shine tables */
+ /**@}*/
+
+ struct gl_list_extensions *ListExt; /**< driver dlist extensions */
+
+ /** \name For debugging/development only */
+ /*@{*/
+ GLboolean FirstTimeCurrent;
+ /*@}*/
+
+ /** software compression/decompression supported or not */
+ GLboolean Mesa_DXTn;
+
+ GLboolean TextureFormatSupported[MESA_FORMAT_COUNT];
+
+ /**
+ * Use dp4 (rather than mul/mad) instructions for position
+ * transformation?
+ */
+ GLboolean mvp_with_dp4;
+
+ /**
+ * \name Hooks for module contexts.
+ *
+ * These will eventually live in the driver or elsewhere.
+ */
+ /*@{*/
+ void *swrast_context;
+ void *swsetup_context;
+ void *swtnl_context;
+ void *swtnl_im;
+ struct st_context *st;
+ void *aelt_context;
+ /*@}*/
+};
+
+
+#ifdef DEBUG
+extern int MESA_VERBOSE;
+extern int MESA_DEBUG_FLAGS;
+# define MESA_FUNCTION __FUNCTION__
+#else
+# define MESA_VERBOSE 0
+# define MESA_DEBUG_FLAGS 0
+# define MESA_FUNCTION "a function"
+# ifndef NDEBUG
+# define NDEBUG
+# endif
+#endif
+
+
+/** The MESA_VERBOSE var is a bitmask of these flags */
+enum _verbose
+{
+ VERBOSE_VARRAY = 0x0001,
+ VERBOSE_TEXTURE = 0x0002,
+ VERBOSE_MATERIAL = 0x0004,
+ VERBOSE_PIPELINE = 0x0008,
+ VERBOSE_DRIVER = 0x0010,
+ VERBOSE_STATE = 0x0020,
+ VERBOSE_API = 0x0040,
+ VERBOSE_DISPLAY_LIST = 0x0100,
+ VERBOSE_LIGHTING = 0x0200,
+ VERBOSE_PRIMS = 0x0400,
+ VERBOSE_VERTS = 0x0800,
+ VERBOSE_DISASSEM = 0x1000,
+ VERBOSE_DRAW = 0x2000,
+ VERBOSE_SWAPBUFFERS = 0x4000
+};
+
+
+/** The MESA_DEBUG_FLAGS var is a bitmask of these flags */
+enum _debug
+{
+ DEBUG_ALWAYS_FLUSH = 0x1
+};
+
+
+
+#endif /* MTYPES_H */
diff --git a/mesalib/src/mesa/main/remap_helper.h b/mesalib/src/mesa/main/remap_helper.h index 637905ab4..d0fb59104 100644 --- a/mesalib/src/mesa/main/remap_helper.h +++ b/mesalib/src/mesa/main/remap_helper.h @@ -1,6599 +1,6611 @@ -/* DO NOT EDIT - This file generated automatically by remap_helper.py (from Mesa) script */ - -/* - * Copyright (C) 2009 Chia-I Wu <olv@0xlab.org> - * All Rights Reserved. - * - * 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, sub license, - * 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 (including the next - * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL - * Chia-I Wu, - * AND/OR THEIR SUPPLIERS 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. - */ - -#include "main/dispatch.h" -#include "main/remap.h" - -/* this is internal to remap.c */ -#ifdef need_MESA_remap_table - -static const char _mesa_function_pool[] = - /* _mesa_function_pool[0]: MapGrid1d (offset 224) */ - "idd\0" - "glMapGrid1d\0" - "\0" - /* _mesa_function_pool[17]: UniformMatrix3fvARB (will be remapped) */ - "iiip\0" - "glUniformMatrix3fv\0" - "glUniformMatrix3fvARB\0" - "\0" - /* _mesa_function_pool[64]: MapGrid1f (offset 225) */ - "iff\0" - "glMapGrid1f\0" - "\0" - /* _mesa_function_pool[81]: VertexAttribI2iEXT (will be remapped) */ - "iii\0" - "glVertexAttribI2iEXT\0" - "glVertexAttribI2i\0" - "\0" - /* _mesa_function_pool[125]: RasterPos4i (offset 82) */ - "iiii\0" - "glRasterPos4i\0" - "\0" - /* _mesa_function_pool[145]: RasterPos4d (offset 78) */ - "dddd\0" - "glRasterPos4d\0" - "\0" - /* _mesa_function_pool[165]: NewList (dynamic) */ - "ii\0" - "glNewList\0" - "\0" - /* _mesa_function_pool[179]: RasterPos4f (offset 80) */ - "ffff\0" - "glRasterPos4f\0" - "\0" - /* _mesa_function_pool[199]: LoadIdentity (offset 290) */ - "\0" - "glLoadIdentity\0" - "\0" - /* _mesa_function_pool[216]: GetCombinerOutputParameterfvNV (will be remapped) */ - "iiip\0" - "glGetCombinerOutputParameterfvNV\0" - "\0" - /* _mesa_function_pool[255]: SampleCoverageARB (will be remapped) */ - "fi\0" - "glSampleCoverage\0" - "glSampleCoverageARB\0" - "\0" - /* _mesa_function_pool[296]: ConvolutionFilter1D (offset 348) */ - "iiiiip\0" - "glConvolutionFilter1D\0" - "glConvolutionFilter1DEXT\0" - "\0" - /* _mesa_function_pool[351]: BeginQueryARB (will be remapped) */ - "ii\0" - "glBeginQuery\0" - "glBeginQueryARB\0" - "\0" - /* _mesa_function_pool[384]: RasterPos3dv (offset 71) */ - "p\0" - "glRasterPos3dv\0" - "\0" - /* _mesa_function_pool[402]: PointParameteriNV (will be remapped) */ - "ii\0" - "glPointParameteri\0" - "glPointParameteriNV\0" - "\0" - /* _mesa_function_pool[444]: GetProgramiv (will be remapped) */ - "iip\0" - "glGetProgramiv\0" - "\0" - /* _mesa_function_pool[464]: MultiTexCoord3sARB (offset 398) */ - "iiii\0" - "glMultiTexCoord3s\0" - "glMultiTexCoord3sARB\0" - "\0" - /* _mesa_function_pool[509]: SecondaryColor3iEXT (will be remapped) */ - "iii\0" - "glSecondaryColor3i\0" - "glSecondaryColor3iEXT\0" - "\0" - /* _mesa_function_pool[555]: WindowPos3fMESA (will be remapped) */ - "fff\0" - "glWindowPos3f\0" - "glWindowPos3fARB\0" - "glWindowPos3fMESA\0" - "\0" - /* _mesa_function_pool[609]: TexCoord1iv (offset 99) */ - "p\0" - "glTexCoord1iv\0" - "\0" - /* _mesa_function_pool[626]: TexCoord4sv (offset 125) */ - "p\0" - "glTexCoord4sv\0" - "\0" - /* _mesa_function_pool[643]: RasterPos4s (offset 84) */ - "iiii\0" - "glRasterPos4s\0" - "\0" - /* _mesa_function_pool[663]: PixelTexGenParameterfvSGIS (will be remapped) */ - "ip\0" - "glPixelTexGenParameterfvSGIS\0" - "\0" - /* _mesa_function_pool[696]: ActiveTextureARB (offset 374) */ - "i\0" - "glActiveTexture\0" - "glActiveTextureARB\0" - "\0" - /* _mesa_function_pool[734]: BlitFramebufferEXT (will be remapped) */ - "iiiiiiiiii\0" - "glBlitFramebuffer\0" - "glBlitFramebufferEXT\0" - "\0" - /* _mesa_function_pool[785]: TexCoord1f (offset 96) */ - "f\0" - "glTexCoord1f\0" - "\0" - /* _mesa_function_pool[801]: TexCoord1d (offset 94) */ - "d\0" - "glTexCoord1d\0" - "\0" - /* _mesa_function_pool[817]: VertexAttrib4ubvNV (will be remapped) */ - "ip\0" - "glVertexAttrib4ubvNV\0" - "\0" - /* _mesa_function_pool[842]: TexCoord1i (offset 98) */ - "i\0" - "glTexCoord1i\0" - "\0" - /* _mesa_function_pool[858]: GetProgramNamedParameterdvNV (will be remapped) */ - "iipp\0" - "glGetProgramNamedParameterdvNV\0" - "\0" - /* _mesa_function_pool[895]: Histogram (offset 367) */ - "iiii\0" - "glHistogram\0" - "glHistogramEXT\0" - "\0" - /* _mesa_function_pool[928]: TexCoord1s (offset 100) */ - "i\0" - "glTexCoord1s\0" - "\0" - /* _mesa_function_pool[944]: GetMapfv (offset 267) */ - "iip\0" - "glGetMapfv\0" - "\0" - /* _mesa_function_pool[960]: EvalCoord1f (offset 230) */ - "f\0" - "glEvalCoord1f\0" - "\0" - /* _mesa_function_pool[977]: FramebufferTexture (will be remapped) */ - "iiii\0" - "glFramebufferTexture\0" - "\0" - /* _mesa_function_pool[1004]: VertexAttribI1ivEXT (will be remapped) */ - "ip\0" - "glVertexAttribI1ivEXT\0" - "glVertexAttribI1iv\0" - "\0" - /* _mesa_function_pool[1049]: TexImage4DSGIS (dynamic) */ - "iiiiiiiiiip\0" - "glTexImage4DSGIS\0" - "\0" - /* _mesa_function_pool[1079]: PolygonStipple (offset 175) */ - "p\0" - "glPolygonStipple\0" - "\0" - /* _mesa_function_pool[1099]: WindowPos2dvMESA (will be remapped) */ - "p\0" - "glWindowPos2dv\0" - "glWindowPos2dvARB\0" - "glWindowPos2dvMESA\0" - "\0" - /* _mesa_function_pool[1154]: ReplacementCodeuiColor3fVertex3fvSUN (dynamic) */ - "ppp\0" - "glReplacementCodeuiColor3fVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[1198]: BlendEquationSeparateEXT (will be remapped) */ - "ii\0" - "glBlendEquationSeparate\0" - "glBlendEquationSeparateEXT\0" - "glBlendEquationSeparateATI\0" - "\0" - /* _mesa_function_pool[1280]: ListParameterfSGIX (dynamic) */ - "iif\0" - "glListParameterfSGIX\0" - "\0" - /* _mesa_function_pool[1306]: SecondaryColor3bEXT (will be remapped) */ - "iii\0" - "glSecondaryColor3b\0" - "glSecondaryColor3bEXT\0" - "\0" - /* _mesa_function_pool[1352]: TexCoord4fColor4fNormal3fVertex4fvSUN (dynamic) */ - "pppp\0" - "glTexCoord4fColor4fNormal3fVertex4fvSUN\0" - "\0" - /* _mesa_function_pool[1398]: GetPixelMapfv (offset 271) */ - "ip\0" - "glGetPixelMapfv\0" - "\0" - /* _mesa_function_pool[1418]: Color3uiv (offset 22) */ - "p\0" - "glColor3uiv\0" - "\0" - /* _mesa_function_pool[1433]: IsEnabled (offset 286) */ - "i\0" - "glIsEnabled\0" - "\0" - /* _mesa_function_pool[1448]: VertexAttrib4svNV (will be remapped) */ - "ip\0" - "glVertexAttrib4svNV\0" - "\0" - /* _mesa_function_pool[1472]: EvalCoord2fv (offset 235) */ - "p\0" - "glEvalCoord2fv\0" - "\0" - /* _mesa_function_pool[1490]: GetBufferSubDataARB (will be remapped) */ - "iiip\0" - "glGetBufferSubData\0" - "glGetBufferSubDataARB\0" - "\0" - /* _mesa_function_pool[1537]: BufferSubDataARB (will be remapped) */ - "iiip\0" - "glBufferSubData\0" - "glBufferSubDataARB\0" - "\0" - /* _mesa_function_pool[1578]: TexCoord2fColor4ubVertex3fvSUN (dynamic) */ - "ppp\0" - "glTexCoord2fColor4ubVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[1616]: AttachShader (will be remapped) */ - "ii\0" - "glAttachShader\0" - "\0" - /* _mesa_function_pool[1635]: VertexAttrib2fARB (will be remapped) */ - "iff\0" - "glVertexAttrib2f\0" - "glVertexAttrib2fARB\0" - "\0" - /* _mesa_function_pool[1677]: GetDebugLogLengthMESA (dynamic) */ - "iii\0" - "glGetDebugLogLengthMESA\0" - "\0" - /* _mesa_function_pool[1706]: GetMapiv (offset 268) */ - "iip\0" - "glGetMapiv\0" - "\0" - /* _mesa_function_pool[1722]: VertexAttrib3fARB (will be remapped) */ - "ifff\0" - "glVertexAttrib3f\0" - "glVertexAttrib3fARB\0" - "\0" - /* _mesa_function_pool[1765]: Indexubv (offset 316) */ - "p\0" - "glIndexubv\0" - "\0" - /* _mesa_function_pool[1779]: GetQueryivARB (will be remapped) */ - "iip\0" - "glGetQueryiv\0" - "glGetQueryivARB\0" - "\0" - /* _mesa_function_pool[1813]: TexImage3D (offset 371) */ - "iiiiiiiiip\0" - "glTexImage3D\0" - "glTexImage3DEXT\0" - "\0" - /* _mesa_function_pool[1854]: BindFragDataLocationEXT (will be remapped) */ - "iip\0" - "glBindFragDataLocationEXT\0" - "glBindFragDataLocation\0" - "\0" - /* _mesa_function_pool[1908]: ReplacementCodeuiVertex3fvSUN (dynamic) */ - "pp\0" - "glReplacementCodeuiVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[1944]: EdgeFlagPointer (offset 312) */ - "ip\0" - "glEdgeFlagPointer\0" - "\0" - /* _mesa_function_pool[1966]: Color3ubv (offset 20) */ - "p\0" - "glColor3ubv\0" - "\0" - /* _mesa_function_pool[1981]: GetQueryObjectivARB (will be remapped) */ - "iip\0" - "glGetQueryObjectiv\0" - "glGetQueryObjectivARB\0" - "\0" - /* _mesa_function_pool[2027]: Vertex3dv (offset 135) */ - "p\0" - "glVertex3dv\0" - "\0" - /* _mesa_function_pool[2042]: ReplacementCodeuiTexCoord2fVertex3fvSUN (dynamic) */ - "ppp\0" - "glReplacementCodeuiTexCoord2fVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[2089]: CompressedTexSubImage2DARB (will be remapped) */ - "iiiiiiiip\0" - "glCompressedTexSubImage2D\0" - "glCompressedTexSubImage2DARB\0" - "\0" - /* _mesa_function_pool[2155]: CombinerOutputNV (will be remapped) */ - "iiiiiiiiii\0" - "glCombinerOutputNV\0" - "\0" - /* _mesa_function_pool[2186]: VertexAttribs3fvNV (will be remapped) */ - "iip\0" - "glVertexAttribs3fvNV\0" - "\0" - /* _mesa_function_pool[2212]: Uniform2fARB (will be remapped) */ - "iff\0" - "glUniform2f\0" - "glUniform2fARB\0" - "\0" - /* _mesa_function_pool[2244]: LightModeliv (offset 166) */ - "ip\0" - "glLightModeliv\0" - "\0" - /* _mesa_function_pool[2263]: VertexAttrib1svARB (will be remapped) */ - "ip\0" - "glVertexAttrib1sv\0" - "glVertexAttrib1svARB\0" - "\0" - /* _mesa_function_pool[2306]: VertexAttribs1dvNV (will be remapped) */ - "iip\0" - "glVertexAttribs1dvNV\0" - "\0" - /* _mesa_function_pool[2332]: Uniform2ivARB (will be remapped) */ - "iip\0" - "glUniform2iv\0" - "glUniform2ivARB\0" - "\0" - /* _mesa_function_pool[2366]: GetImageTransformParameterfvHP (dynamic) */ - "iip\0" - "glGetImageTransformParameterfvHP\0" - "\0" - /* _mesa_function_pool[2404]: Normal3bv (offset 53) */ - "p\0" - "glNormal3bv\0" - "\0" - /* _mesa_function_pool[2419]: TexGeniv (offset 193) */ - "iip\0" - "glTexGeniv\0" - "\0" - /* _mesa_function_pool[2435]: WeightubvARB (dynamic) */ - "ip\0" - "glWeightubvARB\0" - "\0" - /* _mesa_function_pool[2454]: VertexAttrib1fvNV (will be remapped) */ - "ip\0" - "glVertexAttrib1fvNV\0" - "\0" - /* _mesa_function_pool[2478]: Vertex3iv (offset 139) */ - "p\0" - "glVertex3iv\0" - "\0" - /* _mesa_function_pool[2493]: CopyConvolutionFilter1D (offset 354) */ - "iiiii\0" - "glCopyConvolutionFilter1D\0" - "glCopyConvolutionFilter1DEXT\0" - "\0" - /* _mesa_function_pool[2555]: VertexAttribI1uiEXT (will be remapped) */ - "ii\0" - "glVertexAttribI1uiEXT\0" - "glVertexAttribI1ui\0" - "\0" - /* _mesa_function_pool[2600]: ReplacementCodeuiNormal3fVertex3fSUN (dynamic) */ - "iffffff\0" - "glReplacementCodeuiNormal3fVertex3fSUN\0" - "\0" - /* _mesa_function_pool[2648]: DeleteSync (will be remapped) */ - "i\0" - "glDeleteSync\0" - "\0" - /* _mesa_function_pool[2664]: FragmentMaterialfvSGIX (dynamic) */ - "iip\0" - "glFragmentMaterialfvSGIX\0" - "\0" - /* _mesa_function_pool[2694]: BlendColor (offset 336) */ - "ffff\0" - "glBlendColor\0" - "glBlendColorEXT\0" - "\0" - /* _mesa_function_pool[2729]: UniformMatrix4fvARB (will be remapped) */ - "iiip\0" - "glUniformMatrix4fv\0" - "glUniformMatrix4fvARB\0" - "\0" - /* _mesa_function_pool[2776]: DeleteVertexArraysAPPLE (will be remapped) */ - "ip\0" - "glDeleteVertexArrays\0" - "glDeleteVertexArraysAPPLE\0" - "\0" - /* _mesa_function_pool[2827]: TexBuffer (will be remapped) */ - "iii\0" - "glTexBuffer\0" - "\0" - /* _mesa_function_pool[2844]: ReadInstrumentsSGIX (dynamic) */ - "i\0" - "glReadInstrumentsSGIX\0" - "\0" - /* _mesa_function_pool[2869]: CallLists (offset 3) */ - "iip\0" - "glCallLists\0" - "\0" - /* _mesa_function_pool[2886]: UniformMatrix2x4fv (will be remapped) */ - "iiip\0" - "glUniformMatrix2x4fv\0" - "\0" - /* _mesa_function_pool[2913]: Color4ubVertex3fvSUN (dynamic) */ - "pp\0" - "glColor4ubVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[2940]: Normal3iv (offset 59) */ - "p\0" - "glNormal3iv\0" - "\0" - /* _mesa_function_pool[2955]: PassThrough (offset 199) */ - "f\0" - "glPassThrough\0" - "\0" - /* _mesa_function_pool[2972]: GetVertexAttribIivEXT (will be remapped) */ - "iip\0" - "glGetVertexAttribIivEXT\0" - "glGetVertexAttribIiv\0" - "\0" - /* _mesa_function_pool[3022]: TexParameterIivEXT (will be remapped) */ - "iip\0" - "glTexParameterIivEXT\0" - "glTexParameterIiv\0" - "\0" - /* _mesa_function_pool[3066]: FramebufferTextureLayerEXT (will be remapped) */ - "iiiii\0" - "glFramebufferTextureLayer\0" - "glFramebufferTextureLayerEXT\0" - "\0" - /* _mesa_function_pool[3128]: GetListParameterfvSGIX (dynamic) */ - "iip\0" - "glGetListParameterfvSGIX\0" - "\0" - /* _mesa_function_pool[3158]: Viewport (offset 305) */ - "iiii\0" - "glViewport\0" - "\0" - /* _mesa_function_pool[3175]: VertexAttrib4NusvARB (will be remapped) */ - "ip\0" - "glVertexAttrib4Nusv\0" - "glVertexAttrib4NusvARB\0" - "\0" - /* _mesa_function_pool[3222]: WindowPos4svMESA (will be remapped) */ - "p\0" - "glWindowPos4svMESA\0" - "\0" - /* _mesa_function_pool[3244]: CreateProgramObjectARB (will be remapped) */ - "\0" - "glCreateProgramObjectARB\0" - "\0" - /* _mesa_function_pool[3271]: DeleteTransformFeedbacks (will be remapped) */ - "ip\0" - "glDeleteTransformFeedbacks\0" - "\0" - /* _mesa_function_pool[3302]: UniformMatrix4x3fv (will be remapped) */ - "iiip\0" - "glUniformMatrix4x3fv\0" - "\0" - /* _mesa_function_pool[3329]: PrioritizeTextures (offset 331) */ - "ipp\0" - "glPrioritizeTextures\0" - "glPrioritizeTexturesEXT\0" - "\0" - /* _mesa_function_pool[3379]: VertexAttribI3uiEXT (will be remapped) */ - "iiii\0" - "glVertexAttribI3uiEXT\0" - "glVertexAttribI3ui\0" - "\0" - /* _mesa_function_pool[3426]: AsyncMarkerSGIX (dynamic) */ - "i\0" - "glAsyncMarkerSGIX\0" - "\0" - /* _mesa_function_pool[3447]: GlobalAlphaFactorubSUN (dynamic) */ - "i\0" - "glGlobalAlphaFactorubSUN\0" - "\0" - /* _mesa_function_pool[3475]: ClearColorIuiEXT (will be remapped) */ - "iiii\0" - "glClearColorIuiEXT\0" - "\0" - /* _mesa_function_pool[3500]: ClearDebugLogMESA (dynamic) */ - "iii\0" - "glClearDebugLogMESA\0" - "\0" - /* _mesa_function_pool[3525]: Uniform4uiEXT (will be remapped) */ - "iiiii\0" - "glUniform4uiEXT\0" - "glUniform4ui\0" - "\0" - /* _mesa_function_pool[3561]: ResetHistogram (offset 369) */ - "i\0" - "glResetHistogram\0" - "glResetHistogramEXT\0" - "\0" - /* _mesa_function_pool[3601]: GetProgramNamedParameterfvNV (will be remapped) */ - "iipp\0" - "glGetProgramNamedParameterfvNV\0" - "\0" - /* _mesa_function_pool[3638]: PointParameterfEXT (will be remapped) */ - "if\0" - "glPointParameterf\0" - "glPointParameterfARB\0" - "glPointParameterfEXT\0" - "glPointParameterfSGIS\0" - "\0" - /* _mesa_function_pool[3724]: LoadIdentityDeformationMapSGIX (dynamic) */ - "i\0" - "glLoadIdentityDeformationMapSGIX\0" - "\0" - /* _mesa_function_pool[3760]: GenFencesNV (will be remapped) */ - "ip\0" - "glGenFencesNV\0" - "\0" - /* _mesa_function_pool[3778]: ImageTransformParameterfHP (dynamic) */ - "iif\0" - "glImageTransformParameterfHP\0" - "\0" - /* _mesa_function_pool[3812]: MatrixIndexusvARB (dynamic) */ - "ip\0" - "glMatrixIndexusvARB\0" - "\0" - /* _mesa_function_pool[3836]: DrawElementsBaseVertex (will be remapped) */ - "iiipi\0" - "glDrawElementsBaseVertex\0" - "\0" - /* _mesa_function_pool[3868]: DisableVertexAttribArrayARB (will be remapped) */ - "i\0" - "glDisableVertexAttribArray\0" - "glDisableVertexAttribArrayARB\0" - "\0" - /* _mesa_function_pool[3928]: TexCoord2sv (offset 109) */ - "p\0" - "glTexCoord2sv\0" - "\0" - /* _mesa_function_pool[3945]: Vertex4dv (offset 143) */ - "p\0" - "glVertex4dv\0" - "\0" - /* _mesa_function_pool[3960]: StencilMaskSeparate (will be remapped) */ - "ii\0" - "glStencilMaskSeparate\0" - "\0" - /* _mesa_function_pool[3986]: ProgramLocalParameter4dARB (will be remapped) */ - "iidddd\0" - "glProgramLocalParameter4dARB\0" - "\0" - /* _mesa_function_pool[4023]: CompressedTexImage3DARB (will be remapped) */ - "iiiiiiiip\0" - "glCompressedTexImage3D\0" - "glCompressedTexImage3DARB\0" - "\0" - /* _mesa_function_pool[4083]: Color3sv (offset 18) */ - "p\0" - "glColor3sv\0" - "\0" - /* _mesa_function_pool[4097]: GetConvolutionParameteriv (offset 358) */ - "iip\0" - "glGetConvolutionParameteriv\0" - "glGetConvolutionParameterivEXT\0" - "\0" - /* _mesa_function_pool[4161]: VertexAttrib1fARB (will be remapped) */ - "if\0" - "glVertexAttrib1f\0" - "glVertexAttrib1fARB\0" - "\0" - /* _mesa_function_pool[4202]: Vertex2dv (offset 127) */ - "p\0" - "glVertex2dv\0" - "\0" - /* _mesa_function_pool[4217]: TestFenceNV (will be remapped) */ - "i\0" - "glTestFenceNV\0" - "\0" - /* _mesa_function_pool[4234]: MultiTexCoord1fvARB (offset 379) */ - "ip\0" - "glMultiTexCoord1fv\0" - "glMultiTexCoord1fvARB\0" - "\0" - /* _mesa_function_pool[4279]: TexCoord3iv (offset 115) */ - "p\0" - "glTexCoord3iv\0" - "\0" - /* _mesa_function_pool[4296]: Uniform2uivEXT (will be remapped) */ - "iip\0" - "glUniform2uivEXT\0" - "glUniform2uiv\0" - "\0" - /* _mesa_function_pool[4332]: ColorFragmentOp2ATI (will be remapped) */ - "iiiiiiiiii\0" - "glColorFragmentOp2ATI\0" - "\0" - /* _mesa_function_pool[4366]: SecondaryColorPointerListIBM (dynamic) */ - "iiipi\0" - "glSecondaryColorPointerListIBM\0" - "\0" - /* _mesa_function_pool[4404]: GetPixelTexGenParameterivSGIS (will be remapped) */ - "ip\0" - "glGetPixelTexGenParameterivSGIS\0" - "\0" - /* _mesa_function_pool[4440]: Color3fv (offset 14) */ - "p\0" - "glColor3fv\0" - "\0" - /* _mesa_function_pool[4454]: VertexAttrib4fNV (will be remapped) */ - "iffff\0" - "glVertexAttrib4fNV\0" - "\0" - /* _mesa_function_pool[4480]: ReplacementCodeubSUN (dynamic) */ - "i\0" - "glReplacementCodeubSUN\0" - "\0" - /* _mesa_function_pool[4506]: FinishAsyncSGIX (dynamic) */ - "p\0" - "glFinishAsyncSGIX\0" - "\0" - /* _mesa_function_pool[4527]: GetDebugLogMESA (dynamic) */ - "iiiipp\0" - "glGetDebugLogMESA\0" - "\0" - /* _mesa_function_pool[4553]: FogCoorddEXT (will be remapped) */ - "d\0" - "glFogCoordd\0" - "glFogCoorddEXT\0" - "\0" - /* _mesa_function_pool[4583]: BeginConditionalRenderNV (will be remapped) */ - "ii\0" - "glBeginConditionalRenderNV\0" - "glBeginConditionalRender\0" - "\0" - /* _mesa_function_pool[4639]: Color4ubVertex3fSUN (dynamic) */ - "iiiifff\0" - "glColor4ubVertex3fSUN\0" - "\0" - /* _mesa_function_pool[4670]: FogCoordfEXT (will be remapped) */ - "f\0" - "glFogCoordf\0" - "glFogCoordfEXT\0" - "\0" - /* _mesa_function_pool[4700]: PointSize (offset 173) */ - "f\0" - "glPointSize\0" - "\0" - /* _mesa_function_pool[4715]: VertexAttribI2uivEXT (will be remapped) */ - "ip\0" - "glVertexAttribI2uivEXT\0" - "glVertexAttribI2uiv\0" - "\0" - /* _mesa_function_pool[4762]: TexCoord2fVertex3fSUN (dynamic) */ - "fffff\0" - "glTexCoord2fVertex3fSUN\0" - "\0" - /* _mesa_function_pool[4793]: PopName (offset 200) */ - "\0" - "glPopName\0" - "\0" - /* _mesa_function_pool[4805]: GlobalAlphaFactoriSUN (dynamic) */ - "i\0" - "glGlobalAlphaFactoriSUN\0" - "\0" - /* _mesa_function_pool[4832]: VertexAttrib2dNV (will be remapped) */ - "idd\0" - "glVertexAttrib2dNV\0" - "\0" - /* _mesa_function_pool[4856]: GetProgramInfoLog (will be remapped) */ - "iipp\0" - "glGetProgramInfoLog\0" - "\0" - /* _mesa_function_pool[4882]: VertexAttrib4NbvARB (will be remapped) */ - "ip\0" - "glVertexAttrib4Nbv\0" - "glVertexAttrib4NbvARB\0" - "\0" - /* _mesa_function_pool[4927]: GetActiveAttribARB (will be remapped) */ - "iiipppp\0" - "glGetActiveAttrib\0" - "glGetActiveAttribARB\0" - "\0" - /* _mesa_function_pool[4975]: Vertex4sv (offset 149) */ - "p\0" - "glVertex4sv\0" - "\0" - /* _mesa_function_pool[4990]: VertexAttrib4ubNV (will be remapped) */ - "iiiii\0" - "glVertexAttrib4ubNV\0" - "\0" - /* _mesa_function_pool[5017]: ClampColor (will be remapped) */ - "ii\0" - "glClampColor\0" - "\0" - /* _mesa_function_pool[5034]: TextureRangeAPPLE (will be remapped) */ - "iip\0" - "glTextureRangeAPPLE\0" - "\0" - /* _mesa_function_pool[5059]: GetTexEnvfv (offset 276) */ - "iip\0" - "glGetTexEnvfv\0" - "\0" - /* _mesa_function_pool[5078]: BindTransformFeedback (will be remapped) */ - "ii\0" - "glBindTransformFeedback\0" - "\0" - /* _mesa_function_pool[5106]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */ - "ffffffffffff\0" - "glTexCoord2fColor4fNormal3fVertex3fSUN\0" - "\0" - /* _mesa_function_pool[5159]: Indexub (offset 315) */ - "i\0" - "glIndexub\0" - "\0" - /* _mesa_function_pool[5172]: ColorMaskIndexedEXT (will be remapped) */ - "iiiii\0" - "glColorMaskIndexedEXT\0" - "glColorMaski\0" - "\0" - /* _mesa_function_pool[5214]: TexEnvi (offset 186) */ - "iii\0" - "glTexEnvi\0" - "\0" - /* _mesa_function_pool[5229]: GetClipPlane (offset 259) */ - "ip\0" - "glGetClipPlane\0" - "\0" - /* _mesa_function_pool[5248]: CombinerParameterfvNV (will be remapped) */ - "ip\0" - "glCombinerParameterfvNV\0" - "\0" - /* _mesa_function_pool[5276]: VertexAttribs3dvNV (will be remapped) */ - "iip\0" - "glVertexAttribs3dvNV\0" - "\0" - /* _mesa_function_pool[5302]: VertexAttribI2uiEXT (will be remapped) */ - "iii\0" - "glVertexAttribI2uiEXT\0" - "glVertexAttribI2ui\0" - "\0" - /* _mesa_function_pool[5348]: VertexAttribs4fvNV (will be remapped) */ - "iip\0" - "glVertexAttribs4fvNV\0" - "\0" - /* _mesa_function_pool[5374]: VertexArrayRangeNV (will be remapped) */ - "ip\0" - "glVertexArrayRangeNV\0" - "\0" - /* _mesa_function_pool[5399]: FragmentLightiSGIX (dynamic) */ - "iii\0" - "glFragmentLightiSGIX\0" - "\0" - /* _mesa_function_pool[5425]: PolygonOffsetEXT (will be remapped) */ - "ff\0" - "glPolygonOffsetEXT\0" - "\0" - /* _mesa_function_pool[5448]: VertexAttribI4uivEXT (will be remapped) */ - "ip\0" - "glVertexAttribI4uivEXT\0" - "glVertexAttribI4uiv\0" - "\0" - /* _mesa_function_pool[5495]: PollAsyncSGIX (dynamic) */ - "p\0" - "glPollAsyncSGIX\0" - "\0" - /* _mesa_function_pool[5514]: DeleteFragmentShaderATI (will be remapped) */ - "i\0" - "glDeleteFragmentShaderATI\0" - "\0" - /* _mesa_function_pool[5543]: Scaled (offset 301) */ - "ddd\0" - "glScaled\0" - "\0" - /* _mesa_function_pool[5557]: ResumeTransformFeedback (will be remapped) */ - "\0" - "glResumeTransformFeedback\0" - "\0" - /* _mesa_function_pool[5585]: Scalef (offset 302) */ - "fff\0" - "glScalef\0" - "\0" - /* _mesa_function_pool[5599]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */ - "ppp\0" - "glTexCoord2fNormal3fVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[5637]: MultTransposeMatrixdARB (will be remapped) */ - "p\0" - "glMultTransposeMatrixd\0" - "glMultTransposeMatrixdARB\0" - "\0" - /* _mesa_function_pool[5689]: ObjectUnpurgeableAPPLE (will be remapped) */ - "iii\0" - "glObjectUnpurgeableAPPLE\0" - "\0" - /* _mesa_function_pool[5719]: AlphaFunc (offset 240) */ - "if\0" - "glAlphaFunc\0" - "\0" - /* _mesa_function_pool[5735]: WindowPos2svMESA (will be remapped) */ - "p\0" - "glWindowPos2sv\0" - "glWindowPos2svARB\0" - "glWindowPos2svMESA\0" - "\0" - /* _mesa_function_pool[5790]: EdgeFlag (offset 41) */ - "i\0" - "glEdgeFlag\0" - "\0" - /* _mesa_function_pool[5804]: TexCoord2iv (offset 107) */ - "p\0" - "glTexCoord2iv\0" - "\0" - /* _mesa_function_pool[5821]: CompressedTexImage1DARB (will be remapped) */ - "iiiiiip\0" - "glCompressedTexImage1D\0" - "glCompressedTexImage1DARB\0" - "\0" - /* _mesa_function_pool[5879]: Rotated (offset 299) */ - "dddd\0" - "glRotated\0" - "\0" - /* _mesa_function_pool[5895]: GetTexParameterIuivEXT (will be remapped) */ - "iip\0" - "glGetTexParameterIuivEXT\0" - "glGetTexParameterIuiv\0" - "\0" - /* _mesa_function_pool[5947]: VertexAttrib2sNV (will be remapped) */ - "iii\0" - "glVertexAttrib2sNV\0" - "\0" - /* _mesa_function_pool[5971]: ReadPixels (offset 256) */ - "iiiiiip\0" - "glReadPixels\0" - "\0" - /* _mesa_function_pool[5993]: EdgeFlagv (offset 42) */ - "p\0" - "glEdgeFlagv\0" - "\0" - /* _mesa_function_pool[6008]: NormalPointerListIBM (dynamic) */ - "iipi\0" - "glNormalPointerListIBM\0" - "\0" - /* _mesa_function_pool[6037]: IndexPointerEXT (will be remapped) */ - "iiip\0" - "glIndexPointerEXT\0" - "\0" - /* _mesa_function_pool[6061]: Color4iv (offset 32) */ - "p\0" - "glColor4iv\0" - "\0" - /* _mesa_function_pool[6075]: TexParameterf (offset 178) */ - "iif\0" - "glTexParameterf\0" - "\0" - /* _mesa_function_pool[6096]: TexParameteri (offset 180) */ - "iii\0" - "glTexParameteri\0" - "\0" - /* _mesa_function_pool[6117]: NormalPointerEXT (will be remapped) */ - "iiip\0" - "glNormalPointerEXT\0" - "\0" - /* _mesa_function_pool[6142]: MultiTexCoord3dARB (offset 392) */ - "iddd\0" - "glMultiTexCoord3d\0" - "glMultiTexCoord3dARB\0" - "\0" - /* _mesa_function_pool[6187]: MultiTexCoord2iARB (offset 388) */ - "iii\0" - "glMultiTexCoord2i\0" - "glMultiTexCoord2iARB\0" - "\0" - /* _mesa_function_pool[6231]: DrawPixels (offset 257) */ - "iiiip\0" - "glDrawPixels\0" - "\0" - /* _mesa_function_pool[6251]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */ - "iffffffff\0" - "glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN\0" - "\0" - /* _mesa_function_pool[6311]: MultiTexCoord2svARB (offset 391) */ - "ip\0" - "glMultiTexCoord2sv\0" - "glMultiTexCoord2svARB\0" - "\0" - /* _mesa_function_pool[6356]: ReplacementCodeubvSUN (dynamic) */ - "p\0" - "glReplacementCodeubvSUN\0" - "\0" - /* _mesa_function_pool[6383]: Uniform3iARB (will be remapped) */ - "iiii\0" - "glUniform3i\0" - "glUniform3iARB\0" - "\0" - /* _mesa_function_pool[6416]: DrawTransformFeedback (will be remapped) */ - "ii\0" - "glDrawTransformFeedback\0" - "\0" - /* _mesa_function_pool[6444]: DrawElementsInstancedARB (will be remapped) */ - "iiipi\0" - "glDrawElementsInstancedARB\0" - "glDrawElementsInstancedEXT\0" - "glDrawElementsInstanced\0" - "\0" - /* _mesa_function_pool[6529]: GetShaderInfoLog (will be remapped) */ - "iipp\0" - "glGetShaderInfoLog\0" - "\0" - /* _mesa_function_pool[6554]: WeightivARB (dynamic) */ - "ip\0" - "glWeightivARB\0" - "\0" - /* _mesa_function_pool[6572]: PollInstrumentsSGIX (dynamic) */ - "p\0" - "glPollInstrumentsSGIX\0" - "\0" - /* _mesa_function_pool[6597]: GlobalAlphaFactordSUN (dynamic) */ - "d\0" - "glGlobalAlphaFactordSUN\0" - "\0" - /* _mesa_function_pool[6624]: GetFinalCombinerInputParameterfvNV (will be remapped) */ - "iip\0" - "glGetFinalCombinerInputParameterfvNV\0" - "\0" - /* _mesa_function_pool[6666]: GenerateMipmapEXT (will be remapped) */ - "i\0" - "glGenerateMipmap\0" - "glGenerateMipmapEXT\0" - "\0" - /* _mesa_function_pool[6706]: GenLists (offset 5) */ - "i\0" - "glGenLists\0" - "\0" - /* _mesa_function_pool[6720]: DepthRangef (will be remapped) */ - "ff\0" - "glDepthRangef\0" - "\0" - /* _mesa_function_pool[6738]: GetMapAttribParameterivNV (dynamic) */ - "iiip\0" - "glGetMapAttribParameterivNV\0" - "\0" - /* _mesa_function_pool[6772]: CreateShaderObjectARB (will be remapped) */ - "i\0" - "glCreateShaderObjectARB\0" - "\0" - /* _mesa_function_pool[6799]: GetSharpenTexFuncSGIS (dynamic) */ - "ip\0" - "glGetSharpenTexFuncSGIS\0" - "\0" - /* _mesa_function_pool[6827]: BufferDataARB (will be remapped) */ - "iipi\0" - "glBufferData\0" - "glBufferDataARB\0" - "\0" - /* _mesa_function_pool[6862]: FlushVertexArrayRangeNV (will be remapped) */ - "\0" - "glFlushVertexArrayRangeNV\0" - "\0" - /* _mesa_function_pool[6890]: MapGrid2d (offset 226) */ - "iddidd\0" - "glMapGrid2d\0" - "\0" - /* _mesa_function_pool[6910]: MapGrid2f (offset 227) */ - "iffiff\0" - "glMapGrid2f\0" - "\0" - /* _mesa_function_pool[6930]: SampleMapATI (will be remapped) */ - "iii\0" - "glSampleMapATI\0" - "\0" - /* _mesa_function_pool[6950]: VertexPointerEXT (will be remapped) */ - "iiiip\0" - "glVertexPointerEXT\0" - "\0" - /* _mesa_function_pool[6976]: GetTexFilterFuncSGIS (dynamic) */ - "iip\0" - "glGetTexFilterFuncSGIS\0" - "\0" - /* _mesa_function_pool[7004]: Scissor (offset 176) */ - "iiii\0" - "glScissor\0" - "\0" - /* _mesa_function_pool[7020]: Fogf (offset 153) */ - "if\0" - "glFogf\0" - "\0" - /* _mesa_function_pool[7031]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */ - "ppp\0" - "glReplacementCodeuiColor4ubVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[7076]: TexSubImage1D (offset 332) */ - "iiiiiip\0" - "glTexSubImage1D\0" - "glTexSubImage1DEXT\0" - "\0" - /* _mesa_function_pool[7120]: VertexAttrib1sARB (will be remapped) */ - "ii\0" - "glVertexAttrib1s\0" - "glVertexAttrib1sARB\0" - "\0" - /* _mesa_function_pool[7161]: FenceSync (will be remapped) */ - "ii\0" - "glFenceSync\0" - "\0" - /* _mesa_function_pool[7177]: Color4usv (offset 40) */ - "p\0" - "glColor4usv\0" - "\0" - /* _mesa_function_pool[7192]: Fogi (offset 155) */ - "ii\0" - "glFogi\0" - "\0" - /* _mesa_function_pool[7203]: DepthRange (offset 288) */ - "dd\0" - "glDepthRange\0" - "\0" - /* _mesa_function_pool[7220]: RasterPos3iv (offset 75) */ - "p\0" - "glRasterPos3iv\0" - "\0" - /* _mesa_function_pool[7238]: FinalCombinerInputNV (will be remapped) */ - "iiii\0" - "glFinalCombinerInputNV\0" - "\0" - /* _mesa_function_pool[7267]: TexCoord2i (offset 106) */ - "ii\0" - "glTexCoord2i\0" - "\0" - /* _mesa_function_pool[7284]: PixelMapfv (offset 251) */ - "iip\0" - "glPixelMapfv\0" - "\0" - /* _mesa_function_pool[7302]: Color4ui (offset 37) */ - "iiii\0" - "glColor4ui\0" - "\0" - /* _mesa_function_pool[7319]: RasterPos3s (offset 76) */ - "iii\0" - "glRasterPos3s\0" - "\0" - /* _mesa_function_pool[7338]: Color3usv (offset 24) */ - "p\0" - "glColor3usv\0" - "\0" - /* _mesa_function_pool[7353]: FlushRasterSGIX (dynamic) */ - "\0" - "glFlushRasterSGIX\0" - "\0" - /* _mesa_function_pool[7373]: TexCoord2f (offset 104) */ - "ff\0" - "glTexCoord2f\0" - "\0" - /* _mesa_function_pool[7390]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */ - "ifffff\0" - "glReplacementCodeuiTexCoord2fVertex3fSUN\0" - "\0" - /* _mesa_function_pool[7439]: TexCoord2d (offset 102) */ - "dd\0" - "glTexCoord2d\0" - "\0" - /* _mesa_function_pool[7456]: RasterPos3d (offset 70) */ - "ddd\0" - "glRasterPos3d\0" - "\0" - /* _mesa_function_pool[7475]: RasterPos3f (offset 72) */ - "fff\0" - "glRasterPos3f\0" - "\0" - /* _mesa_function_pool[7494]: Uniform1fARB (will be remapped) */ - "if\0" - "glUniform1f\0" - "glUniform1fARB\0" - "\0" - /* _mesa_function_pool[7525]: AreTexturesResident (offset 322) */ - "ipp\0" - "glAreTexturesResident\0" - "glAreTexturesResidentEXT\0" - "\0" - /* _mesa_function_pool[7577]: TexCoord2s (offset 108) */ - "ii\0" - "glTexCoord2s\0" - "\0" - /* _mesa_function_pool[7594]: StencilOpSeparate (will be remapped) */ - "iiii\0" - "glStencilOpSeparate\0" - "glStencilOpSeparateATI\0" - "\0" - /* _mesa_function_pool[7643]: ColorTableParameteriv (offset 341) */ - "iip\0" - "glColorTableParameteriv\0" - "glColorTableParameterivSGI\0" - "\0" - /* _mesa_function_pool[7699]: FogCoordPointerListIBM (dynamic) */ - "iipi\0" - "glFogCoordPointerListIBM\0" - "\0" - /* _mesa_function_pool[7730]: WindowPos3dMESA (will be remapped) */ - "ddd\0" - "glWindowPos3d\0" - "glWindowPos3dARB\0" - "glWindowPos3dMESA\0" - "\0" - /* _mesa_function_pool[7784]: Color4us (offset 39) */ - "iiii\0" - "glColor4us\0" - "\0" - /* _mesa_function_pool[7801]: PointParameterfvEXT (will be remapped) */ - "ip\0" - "glPointParameterfv\0" - "glPointParameterfvARB\0" - "glPointParameterfvEXT\0" - "glPointParameterfvSGIS\0" - "\0" - /* _mesa_function_pool[7891]: Color3bv (offset 10) */ - "p\0" - "glColor3bv\0" - "\0" - /* _mesa_function_pool[7905]: WindowPos2fvMESA (will be remapped) */ - "p\0" - "glWindowPos2fv\0" - "glWindowPos2fvARB\0" - "glWindowPos2fvMESA\0" - "\0" - /* _mesa_function_pool[7960]: SecondaryColor3bvEXT (will be remapped) */ - "p\0" - "glSecondaryColor3bv\0" - "glSecondaryColor3bvEXT\0" - "\0" - /* _mesa_function_pool[8006]: VertexPointerListIBM (dynamic) */ - "iiipi\0" - "glVertexPointerListIBM\0" - "\0" - /* _mesa_function_pool[8036]: GetProgramLocalParameterfvARB (will be remapped) */ - "iip\0" - "glGetProgramLocalParameterfvARB\0" - "\0" - /* _mesa_function_pool[8073]: FragmentMaterialfSGIX (dynamic) */ - "iif\0" - "glFragmentMaterialfSGIX\0" - "\0" - /* _mesa_function_pool[8102]: TexCoord2fNormal3fVertex3fSUN (dynamic) */ - "ffffffff\0" - "glTexCoord2fNormal3fVertex3fSUN\0" - "\0" - /* _mesa_function_pool[8144]: RenderbufferStorageEXT (will be remapped) */ - "iiii\0" - "glRenderbufferStorage\0" - "glRenderbufferStorageEXT\0" - "\0" - /* _mesa_function_pool[8197]: IsFenceNV (will be remapped) */ - "i\0" - "glIsFenceNV\0" - "\0" - /* _mesa_function_pool[8212]: AttachObjectARB (will be remapped) */ - "ii\0" - "glAttachObjectARB\0" - "\0" - /* _mesa_function_pool[8234]: GetFragmentLightivSGIX (dynamic) */ - "iip\0" - "glGetFragmentLightivSGIX\0" - "\0" - /* _mesa_function_pool[8264]: UniformMatrix2fvARB (will be remapped) */ - "iiip\0" - "glUniformMatrix2fv\0" - "glUniformMatrix2fvARB\0" - "\0" - /* _mesa_function_pool[8311]: MultiTexCoord2fARB (offset 386) */ - "iff\0" - "glMultiTexCoord2f\0" - "glMultiTexCoord2fARB\0" - "\0" - /* _mesa_function_pool[8355]: ColorTable (offset 339) */ - "iiiiip\0" - "glColorTable\0" - "glColorTableSGI\0" - "glColorTableEXT\0" - "\0" - /* _mesa_function_pool[8408]: IndexPointer (offset 314) */ - "iip\0" - "glIndexPointer\0" - "\0" - /* _mesa_function_pool[8428]: Accum (offset 213) */ - "if\0" - "glAccum\0" - "\0" - /* _mesa_function_pool[8440]: GetTexImage (offset 281) */ - "iiiip\0" - "glGetTexImage\0" - "\0" - /* _mesa_function_pool[8461]: MapControlPointsNV (dynamic) */ - "iiiiiiiip\0" - "glMapControlPointsNV\0" - "\0" - /* _mesa_function_pool[8493]: ConvolutionFilter2D (offset 349) */ - "iiiiiip\0" - "glConvolutionFilter2D\0" - "glConvolutionFilter2DEXT\0" - "\0" - /* _mesa_function_pool[8549]: Finish (offset 216) */ - "\0" - "glFinish\0" - "\0" - /* _mesa_function_pool[8560]: MapParameterfvNV (dynamic) */ - "iip\0" - "glMapParameterfvNV\0" - "\0" - /* _mesa_function_pool[8584]: ClearStencil (offset 207) */ - "i\0" - "glClearStencil\0" - "\0" - /* _mesa_function_pool[8602]: VertexAttrib3dvARB (will be remapped) */ - "ip\0" - "glVertexAttrib3dv\0" - "glVertexAttrib3dvARB\0" - "\0" - /* _mesa_function_pool[8645]: Uniform4uivEXT (will be remapped) */ - "iip\0" - "glUniform4uivEXT\0" - "glUniform4uiv\0" - "\0" - /* _mesa_function_pool[8681]: HintPGI (dynamic) */ - "ii\0" - "glHintPGI\0" - "\0" - /* _mesa_function_pool[8695]: ConvolutionParameteriv (offset 353) */ - "iip\0" - "glConvolutionParameteriv\0" - "glConvolutionParameterivEXT\0" - "\0" - /* _mesa_function_pool[8753]: Color4s (offset 33) */ - "iiii\0" - "glColor4s\0" - "\0" - /* _mesa_function_pool[8769]: InterleavedArrays (offset 317) */ - "iip\0" - "glInterleavedArrays\0" - "\0" - /* _mesa_function_pool[8794]: RasterPos2fv (offset 65) */ - "p\0" - "glRasterPos2fv\0" - "\0" - /* _mesa_function_pool[8812]: TexCoord1fv (offset 97) */ - "p\0" - "glTexCoord1fv\0" - "\0" - /* _mesa_function_pool[8829]: Vertex2d (offset 126) */ - "dd\0" - "glVertex2d\0" - "\0" - /* _mesa_function_pool[8844]: CullParameterdvEXT (dynamic) */ - "ip\0" - "glCullParameterdvEXT\0" - "\0" - /* _mesa_function_pool[8869]: ProgramNamedParameter4fNV (will be remapped) */ - "iipffff\0" - "glProgramNamedParameter4fNV\0" - "\0" - /* _mesa_function_pool[8906]: Color3fVertex3fSUN (dynamic) */ - "ffffff\0" - "glColor3fVertex3fSUN\0" - "\0" - /* _mesa_function_pool[8935]: ProgramEnvParameter4fvARB (will be remapped) */ - "iip\0" - "glProgramEnvParameter4fvARB\0" - "glProgramParameter4fvNV\0" - "\0" - /* _mesa_function_pool[8992]: Color4i (offset 31) */ - "iiii\0" - "glColor4i\0" - "\0" - /* _mesa_function_pool[9008]: Color4f (offset 29) */ - "ffff\0" - "glColor4f\0" - "\0" - /* _mesa_function_pool[9024]: RasterPos4fv (offset 81) */ - "p\0" - "glRasterPos4fv\0" - "\0" - /* _mesa_function_pool[9042]: Color4d (offset 27) */ - "dddd\0" - "glColor4d\0" - "\0" - /* _mesa_function_pool[9058]: ClearIndex (offset 205) */ - "f\0" - "glClearIndex\0" - "\0" - /* _mesa_function_pool[9074]: Color4b (offset 25) */ - "iiii\0" - "glColor4b\0" - "\0" - /* _mesa_function_pool[9090]: LoadMatrixd (offset 292) */ - "p\0" - "glLoadMatrixd\0" - "\0" - /* _mesa_function_pool[9107]: FragmentLightModeliSGIX (dynamic) */ - "ii\0" - "glFragmentLightModeliSGIX\0" - "\0" - /* _mesa_function_pool[9137]: RasterPos2dv (offset 63) */ - "p\0" - "glRasterPos2dv\0" - "\0" - /* _mesa_function_pool[9155]: ConvolutionParameterfv (offset 351) */ - "iip\0" - "glConvolutionParameterfv\0" - "glConvolutionParameterfvEXT\0" - "\0" - /* _mesa_function_pool[9213]: TbufferMask3DFX (dynamic) */ - "i\0" - "glTbufferMask3DFX\0" - "\0" - /* _mesa_function_pool[9234]: GetTexGendv (offset 278) */ - "iip\0" - "glGetTexGendv\0" - "\0" - /* _mesa_function_pool[9253]: GetVertexAttribfvNV (will be remapped) */ - "iip\0" - "glGetVertexAttribfvNV\0" - "\0" - /* _mesa_function_pool[9280]: BeginTransformFeedbackEXT (will be remapped) */ - "i\0" - "glBeginTransformFeedbackEXT\0" - "glBeginTransformFeedback\0" - "\0" - /* _mesa_function_pool[9336]: LoadProgramNV (will be remapped) */ - "iiip\0" - "glLoadProgramNV\0" - "\0" - /* _mesa_function_pool[9358]: WaitSync (will be remapped) */ - "iii\0" - "glWaitSync\0" - "\0" - /* _mesa_function_pool[9374]: EndList (offset 1) */ - "\0" - "glEndList\0" - "\0" - /* _mesa_function_pool[9386]: VertexAttrib4fvNV (will be remapped) */ - "ip\0" - "glVertexAttrib4fvNV\0" - "\0" - /* _mesa_function_pool[9410]: GetAttachedObjectsARB (will be remapped) */ - "iipp\0" - "glGetAttachedObjectsARB\0" - "\0" - /* _mesa_function_pool[9440]: Uniform3fvARB (will be remapped) */ - "iip\0" - "glUniform3fv\0" - "glUniform3fvARB\0" - "\0" - /* _mesa_function_pool[9474]: EvalCoord1fv (offset 231) */ - "p\0" - "glEvalCoord1fv\0" - "\0" - /* _mesa_function_pool[9492]: DrawRangeElements (offset 338) */ - "iiiiip\0" - "glDrawRangeElements\0" - "glDrawRangeElementsEXT\0" - "\0" - /* _mesa_function_pool[9543]: EvalMesh2 (offset 238) */ - "iiiii\0" - "glEvalMesh2\0" - "\0" - /* _mesa_function_pool[9562]: Vertex4fv (offset 145) */ - "p\0" - "glVertex4fv\0" - "\0" - /* _mesa_function_pool[9577]: GenTransformFeedbacks (will be remapped) */ - "ip\0" - "glGenTransformFeedbacks\0" - "\0" - /* _mesa_function_pool[9605]: SpriteParameterfvSGIX (dynamic) */ - "ip\0" - "glSpriteParameterfvSGIX\0" - "\0" - /* _mesa_function_pool[9633]: CheckFramebufferStatusEXT (will be remapped) */ - "i\0" - "glCheckFramebufferStatus\0" - "glCheckFramebufferStatusEXT\0" - "\0" - /* _mesa_function_pool[9689]: GlobalAlphaFactoruiSUN (dynamic) */ - "i\0" - "glGlobalAlphaFactoruiSUN\0" - "\0" - /* _mesa_function_pool[9717]: GetHandleARB (will be remapped) */ - "i\0" - "glGetHandleARB\0" - "\0" - /* _mesa_function_pool[9735]: GetVertexAttribivARB (will be remapped) */ - "iip\0" - "glGetVertexAttribiv\0" - "glGetVertexAttribivARB\0" - "\0" - /* _mesa_function_pool[9783]: BlendFunciARB (will be remapped) */ - "iii\0" - "glBlendFunciARB\0" - "\0" - /* _mesa_function_pool[9804]: GetCombinerInputParameterfvNV (will be remapped) */ - "iiiip\0" - "glGetCombinerInputParameterfvNV\0" - "\0" - /* _mesa_function_pool[9843]: GetTexParameterIivEXT (will be remapped) */ - "iip\0" - "glGetTexParameterIivEXT\0" - "glGetTexParameterIiv\0" - "\0" - /* _mesa_function_pool[9893]: CreateProgram (will be remapped) */ - "\0" - "glCreateProgram\0" - "\0" - /* _mesa_function_pool[9911]: LoadTransposeMatrixdARB (will be remapped) */ - "p\0" - "glLoadTransposeMatrixd\0" - "glLoadTransposeMatrixdARB\0" - "\0" - /* _mesa_function_pool[9963]: ReleaseShaderCompiler (will be remapped) */ - "\0" - "glReleaseShaderCompiler\0" - "\0" - /* _mesa_function_pool[9989]: GetMinmax (offset 364) */ - "iiiip\0" - "glGetMinmax\0" - "glGetMinmaxEXT\0" - "\0" - /* _mesa_function_pool[10023]: StencilFuncSeparate (will be remapped) */ - "iiii\0" - "glStencilFuncSeparate\0" - "\0" - /* _mesa_function_pool[10051]: SecondaryColor3sEXT (will be remapped) */ - "iii\0" - "glSecondaryColor3s\0" - "glSecondaryColor3sEXT\0" - "\0" - /* _mesa_function_pool[10097]: Color3fVertex3fvSUN (dynamic) */ - "pp\0" - "glColor3fVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[10123]: GetInteger64i_v (will be remapped) */ - "iip\0" - "glGetInteger64i_v\0" - "\0" - /* _mesa_function_pool[10146]: Normal3fv (offset 57) */ - "p\0" - "glNormal3fv\0" - "\0" - /* _mesa_function_pool[10161]: GlobalAlphaFactorbSUN (dynamic) */ - "i\0" - "glGlobalAlphaFactorbSUN\0" - "\0" - /* _mesa_function_pool[10188]: Color3us (offset 23) */ - "iii\0" - "glColor3us\0" - "\0" - /* _mesa_function_pool[10204]: ImageTransformParameterfvHP (dynamic) */ - "iip\0" - "glImageTransformParameterfvHP\0" - "\0" - /* _mesa_function_pool[10239]: VertexAttrib4ivARB (will be remapped) */ - "ip\0" - "glVertexAttrib4iv\0" - "glVertexAttrib4ivARB\0" - "\0" - /* _mesa_function_pool[10282]: End (offset 43) */ - "\0" - "glEnd\0" - "\0" - /* _mesa_function_pool[10290]: VertexAttrib3fNV (will be remapped) */ - "ifff\0" - "glVertexAttrib3fNV\0" - "\0" - /* _mesa_function_pool[10315]: VertexAttribs2dvNV (will be remapped) */ - "iip\0" - "glVertexAttribs2dvNV\0" - "\0" - /* _mesa_function_pool[10341]: GetQueryObjectui64vEXT (will be remapped) */ - "iip\0" - "glGetQueryObjectui64vEXT\0" - "\0" - /* _mesa_function_pool[10371]: MultiTexCoord3fvARB (offset 395) */ - "ip\0" - "glMultiTexCoord3fv\0" - "glMultiTexCoord3fvARB\0" - "\0" - /* _mesa_function_pool[10416]: SecondaryColor3dEXT (will be remapped) */ - "ddd\0" - "glSecondaryColor3d\0" - "glSecondaryColor3dEXT\0" - "\0" - /* _mesa_function_pool[10462]: Color3ub (offset 19) */ - "iii\0" - "glColor3ub\0" - "\0" - /* _mesa_function_pool[10478]: GetProgramParameterfvNV (will be remapped) */ - "iiip\0" - "glGetProgramParameterfvNV\0" - "\0" - /* _mesa_function_pool[10510]: TangentPointerEXT (dynamic) */ - "iip\0" - "glTangentPointerEXT\0" - "\0" - /* _mesa_function_pool[10535]: Color4fNormal3fVertex3fvSUN (dynamic) */ - "ppp\0" - "glColor4fNormal3fVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[10570]: GetInstrumentsSGIX (dynamic) */ - "\0" - "glGetInstrumentsSGIX\0" - "\0" - /* _mesa_function_pool[10593]: GetUniformuivEXT (will be remapped) */ - "iip\0" - "glGetUniformuivEXT\0" - "glGetUniformuiv\0" - "\0" - /* _mesa_function_pool[10633]: Color3ui (offset 21) */ - "iii\0" - "glColor3ui\0" - "\0" - /* _mesa_function_pool[10649]: EvalMapsNV (dynamic) */ - "ii\0" - "glEvalMapsNV\0" - "\0" - /* _mesa_function_pool[10666]: TexSubImage2D (offset 333) */ - "iiiiiiiip\0" - "glTexSubImage2D\0" - "glTexSubImage2DEXT\0" - "\0" - /* _mesa_function_pool[10712]: FragmentLightivSGIX (dynamic) */ - "iip\0" - "glFragmentLightivSGIX\0" - "\0" - /* _mesa_function_pool[10739]: GetTexParameterPointervAPPLE (will be remapped) */ - "iip\0" - "glGetTexParameterPointervAPPLE\0" - "\0" - /* _mesa_function_pool[10775]: TexGenfv (offset 191) */ - "iip\0" - "glTexGenfv\0" - "\0" - /* _mesa_function_pool[10791]: GetTransformFeedbackVaryingEXT (will be remapped) */ - "iiipppp\0" - "glGetTransformFeedbackVaryingEXT\0" - "glGetTransformFeedbackVarying\0" - "\0" - /* _mesa_function_pool[10863]: VertexAttrib4bvARB (will be remapped) */ - "ip\0" - "glVertexAttrib4bv\0" - "glVertexAttrib4bvARB\0" - "\0" - /* _mesa_function_pool[10906]: ShaderBinary (will be remapped) */ - "ipipi\0" - "glShaderBinary\0" - "\0" - /* _mesa_function_pool[10928]: GetIntegerIndexedvEXT (will be remapped) */ - "iip\0" - "glGetIntegerIndexedvEXT\0" - "glGetIntegeri_v\0" - "\0" - /* _mesa_function_pool[10973]: MultiTexCoord4sARB (offset 406) */ - "iiiii\0" - "glMultiTexCoord4s\0" - "glMultiTexCoord4sARB\0" - "\0" - /* _mesa_function_pool[11019]: GetFragmentMaterialivSGIX (dynamic) */ - "iip\0" - "glGetFragmentMaterialivSGIX\0" - "\0" - /* _mesa_function_pool[11052]: WindowPos4dMESA (will be remapped) */ - "dddd\0" - "glWindowPos4dMESA\0" - "\0" - /* _mesa_function_pool[11076]: WeightPointerARB (dynamic) */ - "iiip\0" - "glWeightPointerARB\0" - "\0" - /* _mesa_function_pool[11101]: WindowPos2dMESA (will be remapped) */ - "dd\0" - "glWindowPos2d\0" - "glWindowPos2dARB\0" - "glWindowPos2dMESA\0" - "\0" - /* _mesa_function_pool[11154]: FramebufferTexture3DEXT (will be remapped) */ - "iiiiii\0" - "glFramebufferTexture3D\0" - "glFramebufferTexture3DEXT\0" - "\0" - /* _mesa_function_pool[11211]: BlendEquation (offset 337) */ - "i\0" - "glBlendEquation\0" - "glBlendEquationEXT\0" - "\0" - /* _mesa_function_pool[11249]: VertexAttrib3dNV (will be remapped) */ - "iddd\0" - "glVertexAttrib3dNV\0" - "\0" - /* _mesa_function_pool[11274]: VertexAttrib3dARB (will be remapped) */ - "iddd\0" - "glVertexAttrib3d\0" - "glVertexAttrib3dARB\0" - "\0" - /* _mesa_function_pool[11317]: VertexAttribI4usvEXT (will be remapped) */ - "ip\0" - "glVertexAttribI4usvEXT\0" - "glVertexAttribI4usv\0" - "\0" - /* _mesa_function_pool[11364]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */ - "ppppp\0" - "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[11428]: VertexAttrib4fARB (will be remapped) */ - "iffff\0" - "glVertexAttrib4f\0" - "glVertexAttrib4fARB\0" - "\0" - /* _mesa_function_pool[11472]: GetError (offset 261) */ - "\0" - "glGetError\0" - "\0" - /* _mesa_function_pool[11485]: IndexFuncEXT (dynamic) */ - "if\0" - "glIndexFuncEXT\0" - "\0" - /* _mesa_function_pool[11504]: TexCoord3dv (offset 111) */ - "p\0" - "glTexCoord3dv\0" - "\0" - /* _mesa_function_pool[11521]: Indexdv (offset 45) */ - "p\0" - "glIndexdv\0" - "\0" - /* _mesa_function_pool[11534]: FramebufferTexture2DEXT (will be remapped) */ - "iiiii\0" - "glFramebufferTexture2D\0" - "glFramebufferTexture2DEXT\0" - "\0" - /* _mesa_function_pool[11590]: Normal3s (offset 60) */ - "iii\0" - "glNormal3s\0" - "\0" - /* _mesa_function_pool[11606]: GetObjectParameterivAPPLE (will be remapped) */ - "iiip\0" - "glGetObjectParameterivAPPLE\0" - "\0" - /* _mesa_function_pool[11640]: PushName (offset 201) */ - "i\0" - "glPushName\0" - "\0" - /* _mesa_function_pool[11654]: MultiTexCoord2dvARB (offset 385) */ - "ip\0" - "glMultiTexCoord2dv\0" - "glMultiTexCoord2dvARB\0" - "\0" - /* _mesa_function_pool[11699]: CullParameterfvEXT (dynamic) */ - "ip\0" - "glCullParameterfvEXT\0" - "\0" - /* _mesa_function_pool[11724]: Normal3i (offset 58) */ - "iii\0" - "glNormal3i\0" - "\0" - /* _mesa_function_pool[11740]: ProgramNamedParameter4fvNV (will be remapped) */ - "iipp\0" - "glProgramNamedParameter4fvNV\0" - "\0" - /* _mesa_function_pool[11775]: SecondaryColorPointerEXT (will be remapped) */ - "iiip\0" - "glSecondaryColorPointer\0" - "glSecondaryColorPointerEXT\0" - "\0" - /* _mesa_function_pool[11832]: VertexAttrib4fvARB (will be remapped) */ - "ip\0" - "glVertexAttrib4fv\0" - "glVertexAttrib4fvARB\0" - "\0" - /* _mesa_function_pool[11875]: ColorPointerListIBM (dynamic) */ - "iiipi\0" - "glColorPointerListIBM\0" - "\0" - /* _mesa_function_pool[11904]: GetActiveUniformARB (will be remapped) */ - "iiipppp\0" - "glGetActiveUniform\0" - "glGetActiveUniformARB\0" - "\0" - /* _mesa_function_pool[11954]: ImageTransformParameteriHP (dynamic) */ - "iii\0" - "glImageTransformParameteriHP\0" - "\0" - /* _mesa_function_pool[11988]: Normal3b (offset 52) */ - "iii\0" - "glNormal3b\0" - "\0" - /* _mesa_function_pool[12004]: Normal3d (offset 54) */ - "ddd\0" - "glNormal3d\0" - "\0" - /* _mesa_function_pool[12020]: Uniform1uiEXT (will be remapped) */ - "ii\0" - "glUniform1uiEXT\0" - "glUniform1ui\0" - "\0" - /* _mesa_function_pool[12053]: Normal3f (offset 56) */ - "fff\0" - "glNormal3f\0" - "\0" - /* _mesa_function_pool[12069]: MultiTexCoord1svARB (offset 383) */ - "ip\0" - "glMultiTexCoord1sv\0" - "glMultiTexCoord1svARB\0" - "\0" - /* _mesa_function_pool[12114]: Indexi (offset 48) */ - "i\0" - "glIndexi\0" - "\0" - /* _mesa_function_pool[12126]: EGLImageTargetTexture2DOES (will be remapped) */ - "ip\0" - "glEGLImageTargetTexture2DOES\0" - "\0" - /* _mesa_function_pool[12159]: EndQueryARB (will be remapped) */ - "i\0" - "glEndQuery\0" - "glEndQueryARB\0" - "\0" - /* _mesa_function_pool[12187]: DeleteFencesNV (will be remapped) */ - "ip\0" - "glDeleteFencesNV\0" - "\0" - /* _mesa_function_pool[12208]: DeformationMap3dSGIX (dynamic) */ - "iddiiddiiddiip\0" - "glDeformationMap3dSGIX\0" - "\0" - /* _mesa_function_pool[12247]: BindBufferRangeEXT (will be remapped) */ - "iiiii\0" - "glBindBufferRangeEXT\0" - "glBindBufferRange\0" - "\0" - /* _mesa_function_pool[12293]: DepthMask (offset 211) */ - "i\0" - "glDepthMask\0" - "\0" - /* _mesa_function_pool[12308]: IsShader (will be remapped) */ - "i\0" - "glIsShader\0" - "\0" - /* _mesa_function_pool[12322]: Indexf (offset 46) */ - "f\0" - "glIndexf\0" - "\0" - /* _mesa_function_pool[12334]: GetImageTransformParameterivHP (dynamic) */ - "iip\0" - "glGetImageTransformParameterivHP\0" - "\0" - /* _mesa_function_pool[12372]: Indexd (offset 44) */ - "d\0" - "glIndexd\0" - "\0" - /* _mesa_function_pool[12384]: GetMaterialiv (offset 270) */ - "iip\0" - "glGetMaterialiv\0" - "\0" - /* _mesa_function_pool[12405]: StencilOp (offset 244) */ - "iii\0" - "glStencilOp\0" - "\0" - /* _mesa_function_pool[12422]: WindowPos4ivMESA (will be remapped) */ - "p\0" - "glWindowPos4ivMESA\0" - "\0" - /* _mesa_function_pool[12444]: FramebufferTextureLayer (dynamic) */ - "iiiii\0" - "glFramebufferTextureLayerARB\0" - "\0" - /* _mesa_function_pool[12480]: MultiTexCoord3svARB (offset 399) */ - "ip\0" - "glMultiTexCoord3sv\0" - "glMultiTexCoord3svARB\0" - "\0" - /* _mesa_function_pool[12525]: TexEnvfv (offset 185) */ - "iip\0" - "glTexEnvfv\0" - "\0" - /* _mesa_function_pool[12541]: MultiTexCoord4iARB (offset 404) */ - "iiiii\0" - "glMultiTexCoord4i\0" - "glMultiTexCoord4iARB\0" - "\0" - /* _mesa_function_pool[12587]: Indexs (offset 50) */ - "i\0" - "glIndexs\0" - "\0" - /* _mesa_function_pool[12599]: Binormal3ivEXT (dynamic) */ - "p\0" - "glBinormal3ivEXT\0" - "\0" - /* _mesa_function_pool[12619]: ResizeBuffersMESA (will be remapped) */ - "\0" - "glResizeBuffersMESA\0" - "\0" - /* _mesa_function_pool[12641]: BlendFuncSeparateiARB (will be remapped) */ - "iiiii\0" - "glBlendFuncSeparateiARB\0" - "\0" - /* _mesa_function_pool[12672]: GetUniformivARB (will be remapped) */ - "iip\0" - "glGetUniformiv\0" - "glGetUniformivARB\0" - "\0" - /* _mesa_function_pool[12710]: PixelTexGenParameteriSGIS (will be remapped) */ - "ii\0" - "glPixelTexGenParameteriSGIS\0" - "\0" - /* _mesa_function_pool[12742]: VertexPointervINTEL (dynamic) */ - "iip\0" - "glVertexPointervINTEL\0" - "\0" - /* _mesa_function_pool[12769]: Vertex2i (offset 130) */ - "ii\0" - "glVertex2i\0" - "\0" - /* _mesa_function_pool[12784]: LoadMatrixf (offset 291) */ - "p\0" - "glLoadMatrixf\0" - "\0" - /* _mesa_function_pool[12801]: VertexAttribI1uivEXT (will be remapped) */ - "ip\0" - "glVertexAttribI1uivEXT\0" - "glVertexAttribI1uiv\0" - "\0" - /* _mesa_function_pool[12848]: Vertex2f (offset 128) */ - "ff\0" - "glVertex2f\0" - "\0" - /* _mesa_function_pool[12863]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */ - "pppp\0" - "glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[12916]: Color4bv (offset 26) */ - "p\0" - "glColor4bv\0" - "\0" - /* _mesa_function_pool[12930]: VertexPointer (offset 321) */ - "iiip\0" - "glVertexPointer\0" - "\0" - /* _mesa_function_pool[12952]: SecondaryColor3uiEXT (will be remapped) */ - "iii\0" - "glSecondaryColor3ui\0" - "glSecondaryColor3uiEXT\0" - "\0" - /* _mesa_function_pool[13000]: StartInstrumentsSGIX (dynamic) */ - "\0" - "glStartInstrumentsSGIX\0" - "\0" - /* _mesa_function_pool[13025]: SecondaryColor3usvEXT (will be remapped) */ - "p\0" - "glSecondaryColor3usv\0" - "glSecondaryColor3usvEXT\0" - "\0" - /* _mesa_function_pool[13073]: VertexAttrib2fvNV (will be remapped) */ - "ip\0" - "glVertexAttrib2fvNV\0" - "\0" - /* _mesa_function_pool[13097]: ProgramLocalParameter4dvARB (will be remapped) */ - "iip\0" - "glProgramLocalParameter4dvARB\0" - "\0" - /* _mesa_function_pool[13132]: DeleteLists (offset 4) */ - "ii\0" - "glDeleteLists\0" - "\0" - /* _mesa_function_pool[13150]: LogicOp (offset 242) */ - "i\0" - "glLogicOp\0" - "\0" - /* _mesa_function_pool[13163]: MatrixIndexuivARB (dynamic) */ - "ip\0" - "glMatrixIndexuivARB\0" - "\0" - /* _mesa_function_pool[13187]: Vertex2s (offset 132) */ - "ii\0" - "glVertex2s\0" - "\0" - /* _mesa_function_pool[13202]: RenderbufferStorageMultisample (will be remapped) */ - "iiiii\0" - "glRenderbufferStorageMultisample\0" - "glRenderbufferStorageMultisampleEXT\0" - "\0" - /* _mesa_function_pool[13278]: TexCoord4fv (offset 121) */ - "p\0" - "glTexCoord4fv\0" - "\0" - /* _mesa_function_pool[13295]: Tangent3sEXT (dynamic) */ - "iii\0" - "glTangent3sEXT\0" - "\0" - /* _mesa_function_pool[13315]: GlobalAlphaFactorfSUN (dynamic) */ - "f\0" - "glGlobalAlphaFactorfSUN\0" - "\0" - /* _mesa_function_pool[13342]: MultiTexCoord3iARB (offset 396) */ - "iiii\0" - "glMultiTexCoord3i\0" - "glMultiTexCoord3iARB\0" - "\0" - /* _mesa_function_pool[13387]: IsProgram (will be remapped) */ - "i\0" - "glIsProgram\0" - "\0" - /* _mesa_function_pool[13402]: TexCoordPointerListIBM (dynamic) */ - "iiipi\0" - "glTexCoordPointerListIBM\0" - "\0" - /* _mesa_function_pool[13434]: VertexAttribI4svEXT (will be remapped) */ - "ip\0" - "glVertexAttribI4svEXT\0" - "glVertexAttribI4sv\0" - "\0" - /* _mesa_function_pool[13479]: GlobalAlphaFactorusSUN (dynamic) */ - "i\0" - "glGlobalAlphaFactorusSUN\0" - "\0" - /* _mesa_function_pool[13507]: VertexAttrib2dvNV (will be remapped) */ - "ip\0" - "glVertexAttrib2dvNV\0" - "\0" - /* _mesa_function_pool[13531]: FramebufferRenderbufferEXT (will be remapped) */ - "iiii\0" - "glFramebufferRenderbuffer\0" - "glFramebufferRenderbufferEXT\0" - "\0" - /* _mesa_function_pool[13592]: ClearBufferuiv (will be remapped) */ - "iip\0" - "glClearBufferuiv\0" - "\0" - /* _mesa_function_pool[13614]: VertexAttrib1dvNV (will be remapped) */ - "ip\0" - "glVertexAttrib1dvNV\0" - "\0" - /* _mesa_function_pool[13638]: GenTextures (offset 328) */ - "ip\0" - "glGenTextures\0" - "glGenTexturesEXT\0" - "\0" - /* _mesa_function_pool[13673]: FramebufferTextureARB (will be remapped) */ - "iiii\0" - "glFramebufferTextureARB\0" - "\0" - /* _mesa_function_pool[13703]: SetFenceNV (will be remapped) */ - "ii\0" - "glSetFenceNV\0" - "\0" - /* _mesa_function_pool[13720]: FramebufferTexture1DEXT (will be remapped) */ - "iiiii\0" - "glFramebufferTexture1D\0" - "glFramebufferTexture1DEXT\0" - "\0" - /* _mesa_function_pool[13776]: GetCombinerOutputParameterivNV (will be remapped) */ - "iiip\0" - "glGetCombinerOutputParameterivNV\0" - "\0" - /* _mesa_function_pool[13815]: PixelTexGenParameterivSGIS (will be remapped) */ - "ip\0" - "glPixelTexGenParameterivSGIS\0" - "\0" - /* _mesa_function_pool[13848]: TextureNormalEXT (dynamic) */ - "i\0" - "glTextureNormalEXT\0" - "\0" - /* _mesa_function_pool[13870]: IndexPointerListIBM (dynamic) */ - "iipi\0" - "glIndexPointerListIBM\0" - "\0" - /* _mesa_function_pool[13898]: WeightfvARB (dynamic) */ - "ip\0" - "glWeightfvARB\0" - "\0" - /* _mesa_function_pool[13916]: RasterPos2sv (offset 69) */ - "p\0" - "glRasterPos2sv\0" - "\0" - /* _mesa_function_pool[13934]: Color4ubv (offset 36) */ - "p\0" - "glColor4ubv\0" - "\0" - /* _mesa_function_pool[13949]: DrawBuffer (offset 202) */ - "i\0" - "glDrawBuffer\0" - "\0" - /* _mesa_function_pool[13965]: TexCoord2fv (offset 105) */ - "p\0" - "glTexCoord2fv\0" - "\0" - /* _mesa_function_pool[13982]: WindowPos4fMESA (will be remapped) */ - "ffff\0" - "glWindowPos4fMESA\0" - "\0" - /* _mesa_function_pool[14006]: TexCoord1sv (offset 101) */ - "p\0" - "glTexCoord1sv\0" - "\0" - /* _mesa_function_pool[14023]: WindowPos3dvMESA (will be remapped) */ - "p\0" - "glWindowPos3dv\0" - "glWindowPos3dvARB\0" - "glWindowPos3dvMESA\0" - "\0" - /* _mesa_function_pool[14078]: DepthFunc (offset 245) */ - "i\0" - "glDepthFunc\0" - "\0" - /* _mesa_function_pool[14093]: PixelMapusv (offset 253) */ - "iip\0" - "glPixelMapusv\0" - "\0" - /* _mesa_function_pool[14112]: GetQueryObjecti64vEXT (will be remapped) */ - "iip\0" - "glGetQueryObjecti64vEXT\0" - "\0" - /* _mesa_function_pool[14141]: MultiTexCoord1dARB (offset 376) */ - "id\0" - "glMultiTexCoord1d\0" - "glMultiTexCoord1dARB\0" - "\0" - /* _mesa_function_pool[14184]: PointParameterivNV (will be remapped) */ - "ip\0" - "glPointParameteriv\0" - "glPointParameterivNV\0" - "\0" - /* _mesa_function_pool[14228]: BlendFunc (offset 241) */ - "ii\0" - "glBlendFunc\0" - "\0" - /* _mesa_function_pool[14244]: EndTransformFeedbackEXT (will be remapped) */ - "\0" - "glEndTransformFeedbackEXT\0" - "glEndTransformFeedback\0" - "\0" - /* _mesa_function_pool[14295]: Uniform2fvARB (will be remapped) */ - "iip\0" - "glUniform2fv\0" - "glUniform2fvARB\0" - "\0" - /* _mesa_function_pool[14329]: BufferParameteriAPPLE (will be remapped) */ - "iii\0" - "glBufferParameteriAPPLE\0" - "\0" - /* _mesa_function_pool[14358]: MultiTexCoord3dvARB (offset 393) */ - "ip\0" - "glMultiTexCoord3dv\0" - "glMultiTexCoord3dvARB\0" - "\0" - /* _mesa_function_pool[14403]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */ - "pppp\0" - "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[14459]: DeleteObjectARB (will be remapped) */ - "i\0" - "glDeleteObjectARB\0" - "\0" - /* _mesa_function_pool[14480]: GetShaderPrecisionFormat (will be remapped) */ - "iipp\0" - "glGetShaderPrecisionFormat\0" - "\0" - /* _mesa_function_pool[14513]: MatrixIndexPointerARB (dynamic) */ - "iiip\0" - "glMatrixIndexPointerARB\0" - "\0" - /* _mesa_function_pool[14543]: ProgramNamedParameter4dvNV (will be remapped) */ - "iipp\0" - "glProgramNamedParameter4dvNV\0" - "\0" - /* _mesa_function_pool[14578]: Tangent3fvEXT (dynamic) */ - "p\0" - "glTangent3fvEXT\0" - "\0" - /* _mesa_function_pool[14597]: Flush (offset 217) */ - "\0" - "glFlush\0" - "\0" - /* _mesa_function_pool[14607]: Color4uiv (offset 38) */ - "p\0" - "glColor4uiv\0" - "\0" - /* _mesa_function_pool[14622]: VertexAttribI4iEXT (will be remapped) */ - "iiiii\0" - "glVertexAttribI4iEXT\0" - "glVertexAttribI4i\0" - "\0" - /* _mesa_function_pool[14668]: GenVertexArrays (will be remapped) */ - "ip\0" - "glGenVertexArrays\0" - "\0" - /* _mesa_function_pool[14690]: Uniform3uivEXT (will be remapped) */ - "iip\0" - "glUniform3uivEXT\0" - "glUniform3uiv\0" - "\0" - /* _mesa_function_pool[14726]: RasterPos3sv (offset 77) */ - "p\0" - "glRasterPos3sv\0" - "\0" - /* _mesa_function_pool[14744]: BindFramebufferEXT (will be remapped) */ - "ii\0" - "glBindFramebuffer\0" - "glBindFramebufferEXT\0" - "\0" - /* _mesa_function_pool[14787]: ReferencePlaneSGIX (dynamic) */ - "p\0" - "glReferencePlaneSGIX\0" - "\0" - /* _mesa_function_pool[14811]: PushAttrib (offset 219) */ - "i\0" - "glPushAttrib\0" - "\0" - /* _mesa_function_pool[14827]: RasterPos2i (offset 66) */ - "ii\0" - "glRasterPos2i\0" - "\0" - /* _mesa_function_pool[14845]: ValidateProgramARB (will be remapped) */ - "i\0" - "glValidateProgram\0" - "glValidateProgramARB\0" - "\0" - /* _mesa_function_pool[14887]: TexParameteriv (offset 181) */ - "iip\0" - "glTexParameteriv\0" - "\0" - /* _mesa_function_pool[14909]: UnlockArraysEXT (will be remapped) */ - "\0" - "glUnlockArraysEXT\0" - "\0" - /* _mesa_function_pool[14929]: TexCoord2fColor3fVertex3fSUN (dynamic) */ - "ffffffff\0" - "glTexCoord2fColor3fVertex3fSUN\0" - "\0" - /* _mesa_function_pool[14970]: WindowPos3fvMESA (will be remapped) */ - "p\0" - "glWindowPos3fv\0" - "glWindowPos3fvARB\0" - "glWindowPos3fvMESA\0" - "\0" - /* _mesa_function_pool[15025]: RasterPos2f (offset 64) */ - "ff\0" - "glRasterPos2f\0" - "\0" - /* _mesa_function_pool[15043]: VertexAttrib1svNV (will be remapped) */ - "ip\0" - "glVertexAttrib1svNV\0" - "\0" - /* _mesa_function_pool[15067]: RasterPos2d (offset 62) */ - "dd\0" - "glRasterPos2d\0" - "\0" - /* _mesa_function_pool[15085]: RasterPos3fv (offset 73) */ - "p\0" - "glRasterPos3fv\0" - "\0" - /* _mesa_function_pool[15103]: CopyTexSubImage3D (offset 373) */ - "iiiiiiiii\0" - "glCopyTexSubImage3D\0" - "glCopyTexSubImage3DEXT\0" - "\0" - /* _mesa_function_pool[15157]: VertexAttrib2dARB (will be remapped) */ - "idd\0" - "glVertexAttrib2d\0" - "glVertexAttrib2dARB\0" - "\0" - /* _mesa_function_pool[15199]: Color4ub (offset 35) */ - "iiii\0" - "glColor4ub\0" - "\0" - /* _mesa_function_pool[15216]: GetInteger64v (will be remapped) */ - "ip\0" - "glGetInteger64v\0" - "\0" - /* _mesa_function_pool[15236]: TextureColorMaskSGIS (dynamic) */ - "iiii\0" - "glTextureColorMaskSGIS\0" - "\0" - /* _mesa_function_pool[15265]: RasterPos2s (offset 68) */ - "ii\0" - "glRasterPos2s\0" - "\0" - /* _mesa_function_pool[15283]: GetColorTable (offset 343) */ - "iiip\0" - "glGetColorTable\0" - "glGetColorTableSGI\0" - "glGetColorTableEXT\0" - "\0" - /* _mesa_function_pool[15343]: SelectBuffer (offset 195) */ - "ip\0" - "glSelectBuffer\0" - "\0" - /* _mesa_function_pool[15362]: Indexiv (offset 49) */ - "p\0" - "glIndexiv\0" - "\0" - /* _mesa_function_pool[15375]: TexCoord3i (offset 114) */ - "iii\0" - "glTexCoord3i\0" - "\0" - /* _mesa_function_pool[15393]: CopyColorTable (offset 342) */ - "iiiii\0" - "glCopyColorTable\0" - "glCopyColorTableSGI\0" - "\0" - /* _mesa_function_pool[15437]: GetHistogramParameterfv (offset 362) */ - "iip\0" - "glGetHistogramParameterfv\0" - "glGetHistogramParameterfvEXT\0" - "\0" - /* _mesa_function_pool[15497]: Frustum (offset 289) */ - "dddddd\0" - "glFrustum\0" - "\0" - /* _mesa_function_pool[15515]: GetString (offset 275) */ - "i\0" - "glGetString\0" - "\0" - /* _mesa_function_pool[15530]: ColorPointervINTEL (dynamic) */ - "iip\0" - "glColorPointervINTEL\0" - "\0" - /* _mesa_function_pool[15556]: TexEnvf (offset 184) */ - "iif\0" - "glTexEnvf\0" - "\0" - /* _mesa_function_pool[15571]: TexCoord3d (offset 110) */ - "ddd\0" - "glTexCoord3d\0" - "\0" - /* _mesa_function_pool[15589]: AlphaFragmentOp1ATI (will be remapped) */ - "iiiiii\0" - "glAlphaFragmentOp1ATI\0" - "\0" - /* _mesa_function_pool[15619]: TexCoord3f (offset 112) */ - "fff\0" - "glTexCoord3f\0" - "\0" - /* _mesa_function_pool[15637]: MultiTexCoord3ivARB (offset 397) */ - "ip\0" - "glMultiTexCoord3iv\0" - "glMultiTexCoord3ivARB\0" - "\0" - /* _mesa_function_pool[15682]: MultiTexCoord2sARB (offset 390) */ - "iii\0" - "glMultiTexCoord2s\0" - "glMultiTexCoord2sARB\0" - "\0" - /* _mesa_function_pool[15726]: VertexAttrib1dvARB (will be remapped) */ - "ip\0" - "glVertexAttrib1dv\0" - "glVertexAttrib1dvARB\0" - "\0" - /* _mesa_function_pool[15769]: DeleteTextures (offset 327) */ - "ip\0" - "glDeleteTextures\0" - "glDeleteTexturesEXT\0" - "\0" - /* _mesa_function_pool[15810]: TexCoordPointerEXT (will be remapped) */ - "iiiip\0" - "glTexCoordPointerEXT\0" - "\0" - /* _mesa_function_pool[15838]: TexSubImage4DSGIS (dynamic) */ - "iiiiiiiiiiiip\0" - "glTexSubImage4DSGIS\0" - "\0" - /* _mesa_function_pool[15873]: TexCoord3s (offset 116) */ - "iii\0" - "glTexCoord3s\0" - "\0" - /* _mesa_function_pool[15891]: GetTexLevelParameteriv (offset 285) */ - "iiip\0" - "glGetTexLevelParameteriv\0" - "\0" - /* _mesa_function_pool[15922]: CombinerStageParameterfvNV (dynamic) */ - "iip\0" - "glCombinerStageParameterfvNV\0" - "\0" - /* _mesa_function_pool[15956]: StopInstrumentsSGIX (dynamic) */ - "i\0" - "glStopInstrumentsSGIX\0" - "\0" - /* _mesa_function_pool[15981]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */ - "fffffffffffffff\0" - "glTexCoord4fColor4fNormal3fVertex4fSUN\0" - "\0" - /* _mesa_function_pool[16037]: ClearAccum (offset 204) */ - "ffff\0" - "glClearAccum\0" - "\0" - /* _mesa_function_pool[16056]: DeformSGIX (dynamic) */ - "i\0" - "glDeformSGIX\0" - "\0" - /* _mesa_function_pool[16072]: GetVertexAttribfvARB (will be remapped) */ - "iip\0" - "glGetVertexAttribfv\0" - "glGetVertexAttribfvARB\0" - "\0" - /* _mesa_function_pool[16120]: SecondaryColor3ivEXT (will be remapped) */ - "p\0" - "glSecondaryColor3iv\0" - "glSecondaryColor3ivEXT\0" - "\0" - /* _mesa_function_pool[16166]: TexCoord4iv (offset 123) */ - "p\0" - "glTexCoord4iv\0" - "\0" - /* _mesa_function_pool[16183]: VertexAttribI4uiEXT (will be remapped) */ - "iiiii\0" - "glVertexAttribI4uiEXT\0" - "glVertexAttribI4ui\0" - "\0" - /* _mesa_function_pool[16231]: GetFragmentMaterialfvSGIX (dynamic) */ - "iip\0" - "glGetFragmentMaterialfvSGIX\0" - "\0" - /* _mesa_function_pool[16264]: UniformMatrix4x2fv (will be remapped) */ - "iiip\0" - "glUniformMatrix4x2fv\0" - "\0" - /* _mesa_function_pool[16291]: GetDetailTexFuncSGIS (dynamic) */ - "ip\0" - "glGetDetailTexFuncSGIS\0" - "\0" - /* _mesa_function_pool[16318]: GetCombinerStageParameterfvNV (dynamic) */ - "iip\0" - "glGetCombinerStageParameterfvNV\0" - "\0" - /* _mesa_function_pool[16355]: PolygonOffset (offset 319) */ - "ff\0" - "glPolygonOffset\0" - "\0" - /* _mesa_function_pool[16375]: BindVertexArray (will be remapped) */ - "i\0" - "glBindVertexArray\0" - "\0" - /* _mesa_function_pool[16396]: Color4ubVertex2fvSUN (dynamic) */ - "pp\0" - "glColor4ubVertex2fvSUN\0" - "\0" - /* _mesa_function_pool[16423]: Rectd (offset 86) */ - "dddd\0" - "glRectd\0" - "\0" - /* _mesa_function_pool[16437]: TexFilterFuncSGIS (dynamic) */ - "iiip\0" - "glTexFilterFuncSGIS\0" - "\0" - /* _mesa_function_pool[16463]: TextureBarrierNV (will be remapped) */ - "\0" - "glTextureBarrierNV\0" - "\0" - /* _mesa_function_pool[16484]: VertexAttribI4ubvEXT (will be remapped) */ - "ip\0" - "glVertexAttribI4ubvEXT\0" - "glVertexAttribI4ubv\0" - "\0" - /* _mesa_function_pool[16531]: GetAttribLocationARB (will be remapped) */ - "ip\0" - "glGetAttribLocation\0" - "glGetAttribLocationARB\0" - "\0" - /* _mesa_function_pool[16578]: RasterPos3i (offset 74) */ - "iii\0" - "glRasterPos3i\0" - "\0" - /* _mesa_function_pool[16597]: VertexAttrib4ubvARB (will be remapped) */ - "ip\0" - "glVertexAttrib4ubv\0" - "glVertexAttrib4ubvARB\0" - "\0" - /* _mesa_function_pool[16642]: DetailTexFuncSGIS (dynamic) */ - "iip\0" - "glDetailTexFuncSGIS\0" - "\0" - /* _mesa_function_pool[16667]: Normal3fVertex3fSUN (dynamic) */ - "ffffff\0" - "glNormal3fVertex3fSUN\0" - "\0" - /* _mesa_function_pool[16697]: CopyTexImage2D (offset 324) */ - "iiiiiiii\0" - "glCopyTexImage2D\0" - "glCopyTexImage2DEXT\0" - "\0" - /* _mesa_function_pool[16744]: GetBufferPointervARB (will be remapped) */ - "iip\0" - "glGetBufferPointerv\0" - "glGetBufferPointervARB\0" - "\0" - /* _mesa_function_pool[16792]: ProgramEnvParameter4fARB (will be remapped) */ - "iiffff\0" - "glProgramEnvParameter4fARB\0" - "glProgramParameter4fNV\0" - "\0" - /* _mesa_function_pool[16850]: Uniform3ivARB (will be remapped) */ - "iip\0" - "glUniform3iv\0" - "glUniform3ivARB\0" - "\0" - /* _mesa_function_pool[16884]: Lightfv (offset 160) */ - "iip\0" - "glLightfv\0" - "\0" - /* _mesa_function_pool[16899]: PrimitiveRestartIndexNV (will be remapped) */ - "i\0" - "glPrimitiveRestartIndexNV\0" - "glPrimitiveRestartIndex\0" - "\0" - /* _mesa_function_pool[16952]: ClearDepth (offset 208) */ - "d\0" - "glClearDepth\0" - "\0" - /* _mesa_function_pool[16968]: GetFenceivNV (will be remapped) */ - "iip\0" - "glGetFenceivNV\0" - "\0" - /* _mesa_function_pool[16988]: WindowPos4dvMESA (will be remapped) */ - "p\0" - "glWindowPos4dvMESA\0" - "\0" - /* _mesa_function_pool[17010]: ColorSubTable (offset 346) */ - "iiiiip\0" - "glColorSubTable\0" - "glColorSubTableEXT\0" - "\0" - /* _mesa_function_pool[17053]: Color4fv (offset 30) */ - "p\0" - "glColor4fv\0" - "\0" - /* _mesa_function_pool[17067]: MultiTexCoord4ivARB (offset 405) */ - "ip\0" - "glMultiTexCoord4iv\0" - "glMultiTexCoord4ivARB\0" - "\0" - /* _mesa_function_pool[17112]: ProgramLocalParameters4fvEXT (will be remapped) */ - "iiip\0" - "glProgramLocalParameters4fvEXT\0" - "\0" - /* _mesa_function_pool[17149]: ColorPointer (offset 308) */ - "iiip\0" - "glColorPointer\0" - "\0" - /* _mesa_function_pool[17170]: Rects (offset 92) */ - "iiii\0" - "glRects\0" - "\0" - /* _mesa_function_pool[17184]: GetMapAttribParameterfvNV (dynamic) */ - "iiip\0" - "glGetMapAttribParameterfvNV\0" - "\0" - /* _mesa_function_pool[17218]: CreateShaderProgramEXT (will be remapped) */ - "ip\0" - "glCreateShaderProgramEXT\0" - "\0" - /* _mesa_function_pool[17247]: ActiveProgramEXT (will be remapped) */ - "i\0" - "glActiveProgramEXT\0" - "\0" - /* _mesa_function_pool[17269]: Lightiv (offset 162) */ - "iip\0" - "glLightiv\0" - "\0" - /* _mesa_function_pool[17284]: VertexAttrib4sARB (will be remapped) */ - "iiiii\0" - "glVertexAttrib4s\0" - "glVertexAttrib4sARB\0" - "\0" - /* _mesa_function_pool[17328]: GetQueryObjectuivARB (will be remapped) */ - "iip\0" - "glGetQueryObjectuiv\0" - "glGetQueryObjectuivARB\0" - "\0" - /* _mesa_function_pool[17376]: GetTexParameteriv (offset 283) */ - "iip\0" - "glGetTexParameteriv\0" - "\0" - /* _mesa_function_pool[17401]: MapParameterivNV (dynamic) */ - "iip\0" - "glMapParameterivNV\0" - "\0" - /* _mesa_function_pool[17425]: GenRenderbuffersEXT (will be remapped) */ - "ip\0" - "glGenRenderbuffers\0" - "glGenRenderbuffersEXT\0" - "\0" - /* _mesa_function_pool[17470]: ClearBufferfv (will be remapped) */ - "iip\0" - "glClearBufferfv\0" - "\0" - /* _mesa_function_pool[17491]: VertexAttrib2dvARB (will be remapped) */ - "ip\0" - "glVertexAttrib2dv\0" - "glVertexAttrib2dvARB\0" - "\0" - /* _mesa_function_pool[17534]: EdgeFlagPointerEXT (will be remapped) */ - "iip\0" - "glEdgeFlagPointerEXT\0" - "\0" - /* _mesa_function_pool[17560]: VertexAttribs2svNV (will be remapped) */ - "iip\0" - "glVertexAttribs2svNV\0" - "\0" - /* _mesa_function_pool[17586]: WeightbvARB (dynamic) */ - "ip\0" - "glWeightbvARB\0" - "\0" - /* _mesa_function_pool[17604]: VertexAttrib2fvARB (will be remapped) */ - "ip\0" - "glVertexAttrib2fv\0" - "glVertexAttrib2fvARB\0" - "\0" - /* _mesa_function_pool[17647]: GetBufferParameterivARB (will be remapped) */ - "iip\0" - "glGetBufferParameteriv\0" - "glGetBufferParameterivARB\0" - "\0" - /* _mesa_function_pool[17701]: Rectdv (offset 87) */ - "pp\0" - "glRectdv\0" - "\0" - /* _mesa_function_pool[17714]: ListParameteriSGIX (dynamic) */ - "iii\0" - "glListParameteriSGIX\0" - "\0" - /* _mesa_function_pool[17740]: BlendEquationiARB (will be remapped) */ - "ii\0" - "glBlendEquationiARB\0" - "\0" - /* _mesa_function_pool[17764]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */ - "iffffffffff\0" - "glReplacementCodeuiColor4fNormal3fVertex3fSUN\0" - "\0" - /* _mesa_function_pool[17823]: InstrumentsBufferSGIX (dynamic) */ - "ip\0" - "glInstrumentsBufferSGIX\0" - "\0" - /* _mesa_function_pool[17851]: VertexAttrib4NivARB (will be remapped) */ - "ip\0" - "glVertexAttrib4Niv\0" - "glVertexAttrib4NivARB\0" - "\0" - /* _mesa_function_pool[17896]: DrawArraysInstancedARB (will be remapped) */ - "iiii\0" - "glDrawArraysInstancedARB\0" - "glDrawArraysInstancedEXT\0" - "glDrawArraysInstanced\0" - "\0" - /* _mesa_function_pool[17974]: GetAttachedShaders (will be remapped) */ - "iipp\0" - "glGetAttachedShaders\0" - "\0" - /* _mesa_function_pool[18001]: GenVertexArraysAPPLE (will be remapped) */ - "ip\0" - "glGenVertexArraysAPPLE\0" - "\0" - /* _mesa_function_pool[18028]: ClearBufferfi (will be remapped) */ - "iifi\0" - "glClearBufferfi\0" - "\0" - /* _mesa_function_pool[18050]: Materialiv (offset 172) */ - "iip\0" - "glMaterialiv\0" - "\0" - /* _mesa_function_pool[18068]: PushClientAttrib (offset 335) */ - "i\0" - "glPushClientAttrib\0" - "\0" - /* _mesa_function_pool[18090]: ProgramEnvParameters4fvEXT (will be remapped) */ - "iiip\0" - "glProgramEnvParameters4fvEXT\0" - "\0" - /* _mesa_function_pool[18125]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */ - "pppp\0" - "glTexCoord2fColor4fNormal3fVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[18171]: WindowPos2iMESA (will be remapped) */ - "ii\0" - "glWindowPos2i\0" - "glWindowPos2iARB\0" - "glWindowPos2iMESA\0" - "\0" - /* _mesa_function_pool[18224]: SampleMaskSGIS (will be remapped) */ - "fi\0" - "glSampleMaskSGIS\0" - "glSampleMaskEXT\0" - "\0" - /* _mesa_function_pool[18261]: SecondaryColor3fvEXT (will be remapped) */ - "p\0" - "glSecondaryColor3fv\0" - "glSecondaryColor3fvEXT\0" - "\0" - /* _mesa_function_pool[18307]: PolygonMode (offset 174) */ - "ii\0" - "glPolygonMode\0" - "\0" - /* _mesa_function_pool[18325]: CompressedTexSubImage1DARB (will be remapped) */ - "iiiiiip\0" - "glCompressedTexSubImage1D\0" - "glCompressedTexSubImage1DARB\0" - "\0" - /* _mesa_function_pool[18389]: VertexAttribI1iEXT (will be remapped) */ - "ii\0" - "glVertexAttribI1iEXT\0" - "glVertexAttribI1i\0" - "\0" - /* _mesa_function_pool[18432]: GetVertexAttribivNV (will be remapped) */ - "iip\0" - "glGetVertexAttribivNV\0" - "\0" - /* _mesa_function_pool[18459]: GetProgramStringARB (will be remapped) */ - "iip\0" - "glGetProgramStringARB\0" - "\0" - /* _mesa_function_pool[18486]: VertexAttribIPointerEXT (will be remapped) */ - "iiiip\0" - "glVertexAttribIPointerEXT\0" - "glVertexAttribIPointer\0" - "\0" - /* _mesa_function_pool[18542]: TexBumpParameterfvATI (will be remapped) */ - "ip\0" - "glTexBumpParameterfvATI\0" - "\0" - /* _mesa_function_pool[18570]: CompileShaderARB (will be remapped) */ - "i\0" - "glCompileShader\0" - "glCompileShaderARB\0" - "\0" - /* _mesa_function_pool[18608]: DeleteShader (will be remapped) */ - "i\0" - "glDeleteShader\0" - "\0" - /* _mesa_function_pool[18626]: DisableClientState (offset 309) */ - "i\0" - "glDisableClientState\0" - "\0" - /* _mesa_function_pool[18650]: TexGeni (offset 192) */ - "iii\0" - "glTexGeni\0" - "\0" - /* _mesa_function_pool[18665]: TexGenf (offset 190) */ - "iif\0" - "glTexGenf\0" - "\0" - /* _mesa_function_pool[18680]: Uniform3fARB (will be remapped) */ - "ifff\0" - "glUniform3f\0" - "glUniform3fARB\0" - "\0" - /* _mesa_function_pool[18713]: TexGend (offset 188) */ - "iid\0" - "glTexGend\0" - "\0" - /* _mesa_function_pool[18728]: ListParameterfvSGIX (dynamic) */ - "iip\0" - "glListParameterfvSGIX\0" - "\0" - /* _mesa_function_pool[18755]: GetPolygonStipple (offset 274) */ - "p\0" - "glGetPolygonStipple\0" - "\0" - /* _mesa_function_pool[18778]: Tangent3dvEXT (dynamic) */ - "p\0" - "glTangent3dvEXT\0" - "\0" - /* _mesa_function_pool[18797]: BindBufferOffsetEXT (will be remapped) */ - "iiii\0" - "glBindBufferOffsetEXT\0" - "\0" - /* _mesa_function_pool[18825]: WindowPos3sMESA (will be remapped) */ - "iii\0" - "glWindowPos3s\0" - "glWindowPos3sARB\0" - "glWindowPos3sMESA\0" - "\0" - /* _mesa_function_pool[18879]: VertexAttrib2svNV (will be remapped) */ - "ip\0" - "glVertexAttrib2svNV\0" - "\0" - /* _mesa_function_pool[18903]: DisableIndexedEXT (will be remapped) */ - "ii\0" - "glDisableIndexedEXT\0" - "glDisablei\0" - "\0" - /* _mesa_function_pool[18938]: BindBufferBaseEXT (will be remapped) */ - "iii\0" - "glBindBufferBaseEXT\0" - "glBindBufferBase\0" - "\0" - /* _mesa_function_pool[18980]: TexCoord2fVertex3fvSUN (dynamic) */ - "pp\0" - "glTexCoord2fVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[19009]: WindowPos4sMESA (will be remapped) */ - "iiii\0" - "glWindowPos4sMESA\0" - "\0" - /* _mesa_function_pool[19033]: VertexAttrib4NuivARB (will be remapped) */ - "ip\0" - "glVertexAttrib4Nuiv\0" - "glVertexAttrib4NuivARB\0" - "\0" - /* _mesa_function_pool[19080]: ClientActiveTextureARB (offset 375) */ - "i\0" - "glClientActiveTexture\0" - "glClientActiveTextureARB\0" - "\0" - /* _mesa_function_pool[19130]: PixelTexGenSGIX (will be remapped) */ - "i\0" - "glPixelTexGenSGIX\0" - "\0" - /* _mesa_function_pool[19151]: ReplacementCodeusvSUN (dynamic) */ - "p\0" - "glReplacementCodeusvSUN\0" - "\0" - /* _mesa_function_pool[19178]: Uniform4fARB (will be remapped) */ - "iffff\0" - "glUniform4f\0" - "glUniform4fARB\0" - "\0" - /* _mesa_function_pool[19212]: Color4sv (offset 34) */ - "p\0" - "glColor4sv\0" - "\0" - /* _mesa_function_pool[19226]: FlushMappedBufferRange (will be remapped) */ - "iii\0" - "glFlushMappedBufferRange\0" - "\0" - /* _mesa_function_pool[19256]: IsProgramNV (will be remapped) */ - "i\0" - "glIsProgramARB\0" - "glIsProgramNV\0" - "\0" - /* _mesa_function_pool[19288]: FlushMappedBufferRangeAPPLE (will be remapped) */ - "iii\0" - "glFlushMappedBufferRangeAPPLE\0" - "\0" - /* _mesa_function_pool[19323]: PixelZoom (offset 246) */ - "ff\0" - "glPixelZoom\0" - "\0" - /* _mesa_function_pool[19339]: ReplacementCodePointerSUN (dynamic) */ - "iip\0" - "glReplacementCodePointerSUN\0" - "\0" - /* _mesa_function_pool[19372]: ProgramEnvParameter4dARB (will be remapped) */ - "iidddd\0" - "glProgramEnvParameter4dARB\0" - "glProgramParameter4dNV\0" - "\0" - /* _mesa_function_pool[19430]: ColorTableParameterfv (offset 340) */ - "iip\0" - "glColorTableParameterfv\0" - "glColorTableParameterfvSGI\0" - "\0" - /* _mesa_function_pool[19486]: FragmentLightModelfSGIX (dynamic) */ - "if\0" - "glFragmentLightModelfSGIX\0" - "\0" - /* _mesa_function_pool[19516]: Binormal3bvEXT (dynamic) */ - "p\0" - "glBinormal3bvEXT\0" - "\0" - /* _mesa_function_pool[19536]: PixelMapuiv (offset 252) */ - "iip\0" - "glPixelMapuiv\0" - "\0" - /* _mesa_function_pool[19555]: Color3dv (offset 12) */ - "p\0" - "glColor3dv\0" - "\0" - /* _mesa_function_pool[19569]: IsTexture (offset 330) */ - "i\0" - "glIsTexture\0" - "glIsTextureEXT\0" - "\0" - /* _mesa_function_pool[19599]: VertexWeightfvEXT (dynamic) */ - "p\0" - "glVertexWeightfvEXT\0" - "\0" - /* _mesa_function_pool[19622]: VertexAttrib1dARB (will be remapped) */ - "id\0" - "glVertexAttrib1d\0" - "glVertexAttrib1dARB\0" - "\0" - /* _mesa_function_pool[19663]: ImageTransformParameterivHP (dynamic) */ - "iip\0" - "glImageTransformParameterivHP\0" - "\0" - /* _mesa_function_pool[19698]: TexCoord4i (offset 122) */ - "iiii\0" - "glTexCoord4i\0" - "\0" - /* _mesa_function_pool[19717]: DeleteQueriesARB (will be remapped) */ - "ip\0" - "glDeleteQueries\0" - "glDeleteQueriesARB\0" - "\0" - /* _mesa_function_pool[19756]: Color4ubVertex2fSUN (dynamic) */ - "iiiiff\0" - "glColor4ubVertex2fSUN\0" - "\0" - /* _mesa_function_pool[19786]: FragmentColorMaterialSGIX (dynamic) */ - "ii\0" - "glFragmentColorMaterialSGIX\0" - "\0" - /* _mesa_function_pool[19818]: CurrentPaletteMatrixARB (dynamic) */ - "i\0" - "glCurrentPaletteMatrixARB\0" - "\0" - /* _mesa_function_pool[19847]: GetMapdv (offset 266) */ - "iip\0" - "glGetMapdv\0" - "\0" - /* _mesa_function_pool[19863]: ObjectPurgeableAPPLE (will be remapped) */ - "iii\0" - "glObjectPurgeableAPPLE\0" - "\0" - /* _mesa_function_pool[19891]: GetStringi (will be remapped) */ - "ii\0" - "glGetStringi\0" - "\0" - /* _mesa_function_pool[19908]: SamplePatternSGIS (will be remapped) */ - "i\0" - "glSamplePatternSGIS\0" - "glSamplePatternEXT\0" - "\0" - /* _mesa_function_pool[19950]: PixelStoref (offset 249) */ - "if\0" - "glPixelStoref\0" - "\0" - /* _mesa_function_pool[19968]: IsQueryARB (will be remapped) */ - "i\0" - "glIsQuery\0" - "glIsQueryARB\0" - "\0" - /* _mesa_function_pool[19994]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */ - "iiiiifff\0" - "glReplacementCodeuiColor4ubVertex3fSUN\0" - "\0" - /* _mesa_function_pool[20043]: PixelStorei (offset 250) */ - "ii\0" - "glPixelStorei\0" - "\0" - /* _mesa_function_pool[20061]: VertexAttrib4usvARB (will be remapped) */ - "ip\0" - "glVertexAttrib4usv\0" - "glVertexAttrib4usvARB\0" - "\0" - /* _mesa_function_pool[20106]: LinkProgramARB (will be remapped) */ - "i\0" - "glLinkProgram\0" - "glLinkProgramARB\0" - "\0" - /* _mesa_function_pool[20140]: VertexAttrib2fNV (will be remapped) */ - "iff\0" - "glVertexAttrib2fNV\0" - "\0" - /* _mesa_function_pool[20164]: ShaderSourceARB (will be remapped) */ - "iipp\0" - "glShaderSource\0" - "glShaderSourceARB\0" - "\0" - /* _mesa_function_pool[20203]: FragmentMaterialiSGIX (dynamic) */ - "iii\0" - "glFragmentMaterialiSGIX\0" - "\0" - /* _mesa_function_pool[20232]: EvalCoord2dv (offset 233) */ - "p\0" - "glEvalCoord2dv\0" - "\0" - /* _mesa_function_pool[20250]: VertexAttrib3svARB (will be remapped) */ - "ip\0" - "glVertexAttrib3sv\0" - "glVertexAttrib3svARB\0" - "\0" - /* _mesa_function_pool[20293]: ColorMaterial (offset 151) */ - "ii\0" - "glColorMaterial\0" - "\0" - /* _mesa_function_pool[20313]: CompressedTexSubImage3DARB (will be remapped) */ - "iiiiiiiiiip\0" - "glCompressedTexSubImage3D\0" - "glCompressedTexSubImage3DARB\0" - "\0" - /* _mesa_function_pool[20381]: WindowPos2ivMESA (will be remapped) */ - "p\0" - "glWindowPos2iv\0" - "glWindowPos2ivARB\0" - "glWindowPos2ivMESA\0" - "\0" - /* _mesa_function_pool[20436]: IsFramebufferEXT (will be remapped) */ - "i\0" - "glIsFramebuffer\0" - "glIsFramebufferEXT\0" - "\0" - /* _mesa_function_pool[20474]: Uniform4ivARB (will be remapped) */ - "iip\0" - "glUniform4iv\0" - "glUniform4ivARB\0" - "\0" - /* _mesa_function_pool[20508]: GetVertexAttribdvARB (will be remapped) */ - "iip\0" - "glGetVertexAttribdv\0" - "glGetVertexAttribdvARB\0" - "\0" - /* _mesa_function_pool[20556]: TexBumpParameterivATI (will be remapped) */ - "ip\0" - "glTexBumpParameterivATI\0" - "\0" - /* _mesa_function_pool[20584]: GetSeparableFilter (offset 359) */ - "iiippp\0" - "glGetSeparableFilter\0" - "glGetSeparableFilterEXT\0" - "\0" - /* _mesa_function_pool[20637]: Binormal3dEXT (dynamic) */ - "ddd\0" - "glBinormal3dEXT\0" - "\0" - /* _mesa_function_pool[20658]: SpriteParameteriSGIX (dynamic) */ - "ii\0" - "glSpriteParameteriSGIX\0" - "\0" - /* _mesa_function_pool[20685]: RequestResidentProgramsNV (will be remapped) */ - "ip\0" - "glRequestResidentProgramsNV\0" - "\0" - /* _mesa_function_pool[20717]: TagSampleBufferSGIX (dynamic) */ - "\0" - "glTagSampleBufferSGIX\0" - "\0" - /* _mesa_function_pool[20741]: TransformFeedbackVaryingsEXT (will be remapped) */ - "iipi\0" - "glTransformFeedbackVaryingsEXT\0" - "glTransformFeedbackVaryings\0" - "\0" - /* _mesa_function_pool[20806]: FeedbackBuffer (offset 194) */ - "iip\0" - "glFeedbackBuffer\0" - "\0" - /* _mesa_function_pool[20828]: RasterPos2iv (offset 67) */ - "p\0" - "glRasterPos2iv\0" - "\0" - /* _mesa_function_pool[20846]: TexImage1D (offset 182) */ - "iiiiiiip\0" - "glTexImage1D\0" - "\0" - /* _mesa_function_pool[20869]: ListParameterivSGIX (dynamic) */ - "iip\0" - "glListParameterivSGIX\0" - "\0" - /* _mesa_function_pool[20896]: MultiDrawElementsEXT (will be remapped) */ - "ipipi\0" - "glMultiDrawElements\0" - "glMultiDrawElementsEXT\0" - "\0" - /* _mesa_function_pool[20946]: Color3s (offset 17) */ - "iii\0" - "glColor3s\0" - "\0" - /* _mesa_function_pool[20961]: Uniform1ivARB (will be remapped) */ - "iip\0" - "glUniform1iv\0" - "glUniform1ivARB\0" - "\0" - /* _mesa_function_pool[20995]: WindowPos2sMESA (will be remapped) */ - "ii\0" - "glWindowPos2s\0" - "glWindowPos2sARB\0" - "glWindowPos2sMESA\0" - "\0" - /* _mesa_function_pool[21048]: WeightusvARB (dynamic) */ - "ip\0" - "glWeightusvARB\0" - "\0" - /* _mesa_function_pool[21067]: TexCoordPointer (offset 320) */ - "iiip\0" - "glTexCoordPointer\0" - "\0" - /* _mesa_function_pool[21091]: FogCoordPointerEXT (will be remapped) */ - "iip\0" - "glFogCoordPointer\0" - "glFogCoordPointerEXT\0" - "\0" - /* _mesa_function_pool[21135]: IndexMaterialEXT (dynamic) */ - "ii\0" - "glIndexMaterialEXT\0" - "\0" - /* _mesa_function_pool[21158]: Color3i (offset 15) */ - "iii\0" - "glColor3i\0" - "\0" - /* _mesa_function_pool[21173]: FrontFace (offset 157) */ - "i\0" - "glFrontFace\0" - "\0" - /* _mesa_function_pool[21188]: EvalCoord2d (offset 232) */ - "dd\0" - "glEvalCoord2d\0" - "\0" - /* _mesa_function_pool[21206]: SecondaryColor3ubvEXT (will be remapped) */ - "p\0" - "glSecondaryColor3ubv\0" - "glSecondaryColor3ubvEXT\0" - "\0" - /* _mesa_function_pool[21254]: EvalCoord2f (offset 234) */ - "ff\0" - "glEvalCoord2f\0" - "\0" - /* _mesa_function_pool[21272]: VertexAttrib4dvARB (will be remapped) */ - "ip\0" - "glVertexAttrib4dv\0" - "glVertexAttrib4dvARB\0" - "\0" - /* _mesa_function_pool[21315]: BindAttribLocationARB (will be remapped) */ - "iip\0" - "glBindAttribLocation\0" - "glBindAttribLocationARB\0" - "\0" - /* _mesa_function_pool[21365]: Color3b (offset 9) */ - "iii\0" - "glColor3b\0" - "\0" - /* _mesa_function_pool[21380]: MultiTexCoord2dARB (offset 384) */ - "idd\0" - "glMultiTexCoord2d\0" - "glMultiTexCoord2dARB\0" - "\0" - /* _mesa_function_pool[21424]: ExecuteProgramNV (will be remapped) */ - "iip\0" - "glExecuteProgramNV\0" - "\0" - /* _mesa_function_pool[21448]: Color3f (offset 13) */ - "fff\0" - "glColor3f\0" - "\0" - /* _mesa_function_pool[21463]: LightEnviSGIX (dynamic) */ - "ii\0" - "glLightEnviSGIX\0" - "\0" - /* _mesa_function_pool[21483]: Color3d (offset 11) */ - "ddd\0" - "glColor3d\0" - "\0" - /* _mesa_function_pool[21498]: Normal3dv (offset 55) */ - "p\0" - "glNormal3dv\0" - "\0" - /* _mesa_function_pool[21513]: Lightf (offset 159) */ - "iif\0" - "glLightf\0" - "\0" - /* _mesa_function_pool[21527]: ReplacementCodeuiSUN (dynamic) */ - "i\0" - "glReplacementCodeuiSUN\0" - "\0" - /* _mesa_function_pool[21553]: MatrixMode (offset 293) */ - "i\0" - "glMatrixMode\0" - "\0" - /* _mesa_function_pool[21569]: GetPixelMapusv (offset 273) */ - "ip\0" - "glGetPixelMapusv\0" - "\0" - /* _mesa_function_pool[21590]: Lighti (offset 161) */ - "iii\0" - "glLighti\0" - "\0" - /* _mesa_function_pool[21604]: VertexAttribPointerNV (will be remapped) */ - "iiiip\0" - "glVertexAttribPointerNV\0" - "\0" - /* _mesa_function_pool[21635]: ClearDepthf (will be remapped) */ - "f\0" - "glClearDepthf\0" - "\0" - /* _mesa_function_pool[21652]: GetBooleanIndexedvEXT (will be remapped) */ - "iip\0" - "glGetBooleanIndexedvEXT\0" - "glGetBooleani_v\0" - "\0" - /* _mesa_function_pool[21697]: GetFramebufferAttachmentParameterivEXT (will be remapped) */ - "iiip\0" - "glGetFramebufferAttachmentParameteriv\0" - "glGetFramebufferAttachmentParameterivEXT\0" - "\0" - /* _mesa_function_pool[21782]: PixelTransformParameterfEXT (dynamic) */ - "iif\0" - "glPixelTransformParameterfEXT\0" - "\0" - /* _mesa_function_pool[21817]: MultiTexCoord4dvARB (offset 401) */ - "ip\0" - "glMultiTexCoord4dv\0" - "glMultiTexCoord4dvARB\0" - "\0" - /* _mesa_function_pool[21862]: PixelTransformParameteriEXT (dynamic) */ - "iii\0" - "glPixelTransformParameteriEXT\0" - "\0" - /* _mesa_function_pool[21897]: GetDoublev (offset 260) */ - "ip\0" - "glGetDoublev\0" - "\0" - /* _mesa_function_pool[21914]: MultMatrixd (offset 295) */ - "p\0" - "glMultMatrixd\0" - "\0" - /* _mesa_function_pool[21931]: MultMatrixf (offset 294) */ - "p\0" - "glMultMatrixf\0" - "\0" - /* _mesa_function_pool[21948]: VertexAttribI4bvEXT (will be remapped) */ - "ip\0" - "glVertexAttribI4bvEXT\0" - "glVertexAttribI4bv\0" - "\0" - /* _mesa_function_pool[21993]: TexCoord2fColor4ubVertex3fSUN (dynamic) */ - "ffiiiifff\0" - "glTexCoord2fColor4ubVertex3fSUN\0" - "\0" - /* _mesa_function_pool[22036]: Uniform1iARB (will be remapped) */ - "ii\0" - "glUniform1i\0" - "glUniform1iARB\0" - "\0" - /* _mesa_function_pool[22067]: VertexAttribPointerARB (will be remapped) */ - "iiiiip\0" - "glVertexAttribPointer\0" - "glVertexAttribPointerARB\0" - "\0" - /* _mesa_function_pool[22122]: VertexAttrib3sNV (will be remapped) */ - "iiii\0" - "glVertexAttrib3sNV\0" - "\0" - /* _mesa_function_pool[22147]: SharpenTexFuncSGIS (dynamic) */ - "iip\0" - "glSharpenTexFuncSGIS\0" - "\0" - /* _mesa_function_pool[22173]: MultiTexCoord4fvARB (offset 403) */ - "ip\0" - "glMultiTexCoord4fv\0" - "glMultiTexCoord4fvARB\0" - "\0" - /* _mesa_function_pool[22218]: Uniform2uiEXT (will be remapped) */ - "iii\0" - "glUniform2uiEXT\0" - "glUniform2ui\0" - "\0" - /* _mesa_function_pool[22252]: UniformMatrix2x3fv (will be remapped) */ - "iiip\0" - "glUniformMatrix2x3fv\0" - "\0" - /* _mesa_function_pool[22279]: TrackMatrixNV (will be remapped) */ - "iiii\0" - "glTrackMatrixNV\0" - "\0" - /* _mesa_function_pool[22301]: CombinerParameteriNV (will be remapped) */ - "ii\0" - "glCombinerParameteriNV\0" - "\0" - /* _mesa_function_pool[22328]: DeleteAsyncMarkersSGIX (dynamic) */ - "ii\0" - "glDeleteAsyncMarkersSGIX\0" - "\0" - /* _mesa_function_pool[22357]: ReplacementCodeusSUN (dynamic) */ - "i\0" - "glReplacementCodeusSUN\0" - "\0" - /* _mesa_function_pool[22383]: IsAsyncMarkerSGIX (dynamic) */ - "i\0" - "glIsAsyncMarkerSGIX\0" - "\0" - /* _mesa_function_pool[22406]: FrameZoomSGIX (dynamic) */ - "i\0" - "glFrameZoomSGIX\0" - "\0" - /* _mesa_function_pool[22425]: Normal3fVertex3fvSUN (dynamic) */ - "pp\0" - "glNormal3fVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[22452]: RasterPos4sv (offset 85) */ - "p\0" - "glRasterPos4sv\0" - "\0" - /* _mesa_function_pool[22470]: VertexAttrib4NsvARB (will be remapped) */ - "ip\0" - "glVertexAttrib4Nsv\0" - "glVertexAttrib4NsvARB\0" - "\0" - /* _mesa_function_pool[22515]: VertexAttrib3fvARB (will be remapped) */ - "ip\0" - "glVertexAttrib3fv\0" - "glVertexAttrib3fvARB\0" - "\0" - /* _mesa_function_pool[22558]: ClearColor (offset 206) */ - "ffff\0" - "glClearColor\0" - "\0" - /* _mesa_function_pool[22577]: GetSynciv (will be remapped) */ - "iiipp\0" - "glGetSynciv\0" - "\0" - /* _mesa_function_pool[22596]: ClearColorIiEXT (will be remapped) */ - "iiii\0" - "glClearColorIiEXT\0" - "\0" - /* _mesa_function_pool[22620]: DeleteFramebuffersEXT (will be remapped) */ - "ip\0" - "glDeleteFramebuffers\0" - "glDeleteFramebuffersEXT\0" - "\0" - /* _mesa_function_pool[22669]: GlobalAlphaFactorsSUN (dynamic) */ - "i\0" - "glGlobalAlphaFactorsSUN\0" - "\0" - /* _mesa_function_pool[22696]: IsEnabledIndexedEXT (will be remapped) */ - "ii\0" - "glIsEnabledIndexedEXT\0" - "glIsEnabledi\0" - "\0" - /* _mesa_function_pool[22735]: TexEnviv (offset 187) */ - "iip\0" - "glTexEnviv\0" - "\0" - /* _mesa_function_pool[22751]: TexSubImage3D (offset 372) */ - "iiiiiiiiiip\0" - "glTexSubImage3D\0" - "glTexSubImage3DEXT\0" - "\0" - /* _mesa_function_pool[22799]: Tangent3fEXT (dynamic) */ - "fff\0" - "glTangent3fEXT\0" - "\0" - /* _mesa_function_pool[22819]: SecondaryColor3uivEXT (will be remapped) */ - "p\0" - "glSecondaryColor3uiv\0" - "glSecondaryColor3uivEXT\0" - "\0" - /* _mesa_function_pool[22867]: MatrixIndexubvARB (dynamic) */ - "ip\0" - "glMatrixIndexubvARB\0" - "\0" - /* _mesa_function_pool[22891]: Color4fNormal3fVertex3fSUN (dynamic) */ - "ffffffffff\0" - "glColor4fNormal3fVertex3fSUN\0" - "\0" - /* _mesa_function_pool[22932]: PixelTexGenParameterfSGIS (will be remapped) */ - "if\0" - "glPixelTexGenParameterfSGIS\0" - "\0" - /* _mesa_function_pool[22964]: CreateShader (will be remapped) */ - "i\0" - "glCreateShader\0" - "\0" - /* _mesa_function_pool[22982]: GetColorTableParameterfv (offset 344) */ - "iip\0" - "glGetColorTableParameterfv\0" - "glGetColorTableParameterfvSGI\0" - "glGetColorTableParameterfvEXT\0" - "\0" - /* _mesa_function_pool[23074]: FragmentLightModelfvSGIX (dynamic) */ - "ip\0" - "glFragmentLightModelfvSGIX\0" - "\0" - /* _mesa_function_pool[23105]: Bitmap (offset 8) */ - "iiffffp\0" - "glBitmap\0" - "\0" - /* _mesa_function_pool[23123]: MultiTexCoord3fARB (offset 394) */ - "ifff\0" - "glMultiTexCoord3f\0" - "glMultiTexCoord3fARB\0" - "\0" - /* _mesa_function_pool[23168]: GetTexLevelParameterfv (offset 284) */ - "iiip\0" - "glGetTexLevelParameterfv\0" - "\0" - /* _mesa_function_pool[23199]: GetPixelTexGenParameterfvSGIS (will be remapped) */ - "ip\0" - "glGetPixelTexGenParameterfvSGIS\0" - "\0" - /* _mesa_function_pool[23235]: GenFramebuffersEXT (will be remapped) */ - "ip\0" - "glGenFramebuffers\0" - "glGenFramebuffersEXT\0" - "\0" - /* _mesa_function_pool[23278]: VertexAttribDivisor (will be remapped) */ - "ii\0" - "glVertexAttribDivisor\0" - "\0" - /* _mesa_function_pool[23304]: GetProgramParameterdvNV (will be remapped) */ - "iiip\0" - "glGetProgramParameterdvNV\0" - "\0" - /* _mesa_function_pool[23336]: Vertex2sv (offset 133) */ - "p\0" - "glVertex2sv\0" - "\0" - /* _mesa_function_pool[23351]: GetIntegerv (offset 263) */ - "ip\0" - "glGetIntegerv\0" - "\0" - /* _mesa_function_pool[23369]: IsVertexArrayAPPLE (will be remapped) */ - "i\0" - "glIsVertexArray\0" - "glIsVertexArrayAPPLE\0" - "\0" - /* _mesa_function_pool[23409]: FragmentLightfvSGIX (dynamic) */ - "iip\0" - "glFragmentLightfvSGIX\0" - "\0" - /* _mesa_function_pool[23436]: VertexAttribDivisorARB (will be remapped) */ - "ii\0" - "glVertexAttribDivisorARB\0" - "\0" - /* _mesa_function_pool[23465]: DetachShader (will be remapped) */ - "ii\0" - "glDetachShader\0" - "\0" - /* _mesa_function_pool[23484]: VertexAttrib4NubARB (will be remapped) */ - "iiiii\0" - "glVertexAttrib4Nub\0" - "glVertexAttrib4NubARB\0" - "\0" - /* _mesa_function_pool[23532]: GetProgramEnvParameterfvARB (will be remapped) */ - "iip\0" - "glGetProgramEnvParameterfvARB\0" - "\0" - /* _mesa_function_pool[23567]: GetTrackMatrixivNV (will be remapped) */ - "iiip\0" - "glGetTrackMatrixivNV\0" - "\0" - /* _mesa_function_pool[23594]: VertexAttrib3svNV (will be remapped) */ - "ip\0" - "glVertexAttrib3svNV\0" - "\0" - /* _mesa_function_pool[23618]: Uniform4fvARB (will be remapped) */ - "iip\0" - "glUniform4fv\0" - "glUniform4fvARB\0" - "\0" - /* _mesa_function_pool[23652]: MultTransposeMatrixfARB (will be remapped) */ - "p\0" - "glMultTransposeMatrixf\0" - "glMultTransposeMatrixfARB\0" - "\0" - /* _mesa_function_pool[23704]: GetTexEnviv (offset 277) */ - "iip\0" - "glGetTexEnviv\0" - "\0" - /* _mesa_function_pool[23723]: ColorFragmentOp1ATI (will be remapped) */ - "iiiiiii\0" - "glColorFragmentOp1ATI\0" - "\0" - /* _mesa_function_pool[23754]: GetUniformfvARB (will be remapped) */ - "iip\0" - "glGetUniformfv\0" - "glGetUniformfvARB\0" - "\0" - /* _mesa_function_pool[23792]: EGLImageTargetRenderbufferStorageOES (will be remapped) */ - "ip\0" - "glEGLImageTargetRenderbufferStorageOES\0" - "\0" - /* _mesa_function_pool[23835]: VertexAttribI2ivEXT (will be remapped) */ - "ip\0" - "glVertexAttribI2ivEXT\0" - "glVertexAttribI2iv\0" - "\0" - /* _mesa_function_pool[23880]: PopClientAttrib (offset 334) */ - "\0" - "glPopClientAttrib\0" - "\0" - /* _mesa_function_pool[23900]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */ - "iffffffffffff\0" - "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0" - "\0" - /* _mesa_function_pool[23971]: DetachObjectARB (will be remapped) */ - "ii\0" - "glDetachObjectARB\0" - "\0" - /* _mesa_function_pool[23993]: VertexBlendARB (dynamic) */ - "i\0" - "glVertexBlendARB\0" - "\0" - /* _mesa_function_pool[24013]: WindowPos3iMESA (will be remapped) */ - "iii\0" - "glWindowPos3i\0" - "glWindowPos3iARB\0" - "glWindowPos3iMESA\0" - "\0" - /* _mesa_function_pool[24067]: SeparableFilter2D (offset 360) */ - "iiiiiipp\0" - "glSeparableFilter2D\0" - "glSeparableFilter2DEXT\0" - "\0" - /* _mesa_function_pool[24120]: ProgramParameteriARB (will be remapped) */ - "iii\0" - "glProgramParameteriARB\0" - "\0" - /* _mesa_function_pool[24148]: Map1d (offset 220) */ - "iddiip\0" - "glMap1d\0" - "\0" - /* _mesa_function_pool[24164]: Map1f (offset 221) */ - "iffiip\0" - "glMap1f\0" - "\0" - /* _mesa_function_pool[24180]: CompressedTexImage2DARB (will be remapped) */ - "iiiiiiip\0" - "glCompressedTexImage2D\0" - "glCompressedTexImage2DARB\0" - "\0" - /* _mesa_function_pool[24239]: ArrayElement (offset 306) */ - "i\0" - "glArrayElement\0" - "glArrayElementEXT\0" - "\0" - /* _mesa_function_pool[24275]: TexImage2D (offset 183) */ - "iiiiiiiip\0" - "glTexImage2D\0" - "\0" - /* _mesa_function_pool[24299]: DepthBoundsEXT (will be remapped) */ - "dd\0" - "glDepthBoundsEXT\0" - "\0" - /* _mesa_function_pool[24320]: ProgramParameters4fvNV (will be remapped) */ - "iiip\0" - "glProgramParameters4fvNV\0" - "\0" - /* _mesa_function_pool[24351]: DeformationMap3fSGIX (dynamic) */ - "iffiiffiiffiip\0" - "glDeformationMap3fSGIX\0" - "\0" - /* _mesa_function_pool[24390]: GetProgramivNV (will be remapped) */ - "iip\0" - "glGetProgramivNV\0" - "\0" - /* _mesa_function_pool[24412]: GetFragDataLocationEXT (will be remapped) */ - "ip\0" - "glGetFragDataLocationEXT\0" - "glGetFragDataLocation\0" - "\0" - /* _mesa_function_pool[24463]: GetMinmaxParameteriv (offset 366) */ - "iip\0" - "glGetMinmaxParameteriv\0" - "glGetMinmaxParameterivEXT\0" - "\0" - /* _mesa_function_pool[24517]: PixelTransferf (offset 247) */ - "if\0" - "glPixelTransferf\0" - "\0" - /* _mesa_function_pool[24538]: CopyTexImage1D (offset 323) */ - "iiiiiii\0" - "glCopyTexImage1D\0" - "glCopyTexImage1DEXT\0" - "\0" - /* _mesa_function_pool[24584]: PushMatrix (offset 298) */ - "\0" - "glPushMatrix\0" - "\0" - /* _mesa_function_pool[24599]: Fogiv (offset 156) */ - "ip\0" - "glFogiv\0" - "\0" - /* _mesa_function_pool[24611]: TexCoord1dv (offset 95) */ - "p\0" - "glTexCoord1dv\0" - "\0" - /* _mesa_function_pool[24628]: AlphaFragmentOp3ATI (will be remapped) */ - "iiiiiiiiiiii\0" - "glAlphaFragmentOp3ATI\0" - "\0" - /* _mesa_function_pool[24664]: PixelTransferi (offset 248) */ - "ii\0" - "glPixelTransferi\0" - "\0" - /* _mesa_function_pool[24685]: GetVertexAttribdvNV (will be remapped) */ - "iip\0" - "glGetVertexAttribdvNV\0" - "\0" - /* _mesa_function_pool[24712]: VertexAttrib3fvNV (will be remapped) */ - "ip\0" - "glVertexAttrib3fvNV\0" - "\0" - /* _mesa_function_pool[24736]: Rotatef (offset 300) */ - "ffff\0" - "glRotatef\0" - "\0" - /* _mesa_function_pool[24752]: GetFinalCombinerInputParameterivNV (will be remapped) */ - "iip\0" - "glGetFinalCombinerInputParameterivNV\0" - "\0" - /* _mesa_function_pool[24794]: Vertex3i (offset 138) */ - "iii\0" - "glVertex3i\0" - "\0" - /* _mesa_function_pool[24810]: Vertex3f (offset 136) */ - "fff\0" - "glVertex3f\0" - "\0" - /* _mesa_function_pool[24826]: Clear (offset 203) */ - "i\0" - "glClear\0" - "\0" - /* _mesa_function_pool[24837]: Vertex3d (offset 134) */ - "ddd\0" - "glVertex3d\0" - "\0" - /* _mesa_function_pool[24853]: GetMapParameterivNV (dynamic) */ - "iip\0" - "glGetMapParameterivNV\0" - "\0" - /* _mesa_function_pool[24880]: Uniform4iARB (will be remapped) */ - "iiiii\0" - "glUniform4i\0" - "glUniform4iARB\0" - "\0" - /* _mesa_function_pool[24914]: ReadBuffer (offset 254) */ - "i\0" - "glReadBuffer\0" - "\0" - /* _mesa_function_pool[24930]: ConvolutionParameteri (offset 352) */ - "iii\0" - "glConvolutionParameteri\0" - "glConvolutionParameteriEXT\0" - "\0" - /* _mesa_function_pool[24986]: Ortho (offset 296) */ - "dddddd\0" - "glOrtho\0" - "\0" - /* _mesa_function_pool[25002]: Binormal3sEXT (dynamic) */ - "iii\0" - "glBinormal3sEXT\0" - "\0" - /* _mesa_function_pool[25023]: ListBase (offset 6) */ - "i\0" - "glListBase\0" - "\0" - /* _mesa_function_pool[25037]: Vertex3s (offset 140) */ - "iii\0" - "glVertex3s\0" - "\0" - /* _mesa_function_pool[25053]: ConvolutionParameterf (offset 350) */ - "iif\0" - "glConvolutionParameterf\0" - "glConvolutionParameterfEXT\0" - "\0" - /* _mesa_function_pool[25109]: GetColorTableParameteriv (offset 345) */ - "iip\0" - "glGetColorTableParameteriv\0" - "glGetColorTableParameterivSGI\0" - "glGetColorTableParameterivEXT\0" - "\0" - /* _mesa_function_pool[25201]: ProgramEnvParameter4dvARB (will be remapped) */ - "iip\0" - "glProgramEnvParameter4dvARB\0" - "glProgramParameter4dvNV\0" - "\0" - /* _mesa_function_pool[25258]: ShadeModel (offset 177) */ - "i\0" - "glShadeModel\0" - "\0" - /* _mesa_function_pool[25274]: VertexAttribs2fvNV (will be remapped) */ - "iip\0" - "glVertexAttribs2fvNV\0" - "\0" - /* _mesa_function_pool[25300]: Rectiv (offset 91) */ - "pp\0" - "glRectiv\0" - "\0" - /* _mesa_function_pool[25313]: UseProgramObjectARB (will be remapped) */ - "i\0" - "glUseProgram\0" - "glUseProgramObjectARB\0" - "\0" - /* _mesa_function_pool[25351]: GetMapParameterfvNV (dynamic) */ - "iip\0" - "glGetMapParameterfvNV\0" - "\0" - /* _mesa_function_pool[25378]: EndConditionalRenderNV (will be remapped) */ - "\0" - "glEndConditionalRenderNV\0" - "glEndConditionalRender\0" - "\0" - /* _mesa_function_pool[25428]: PassTexCoordATI (will be remapped) */ - "iii\0" - "glPassTexCoordATI\0" - "\0" - /* _mesa_function_pool[25451]: DeleteProgram (will be remapped) */ - "i\0" - "glDeleteProgram\0" - "\0" - /* _mesa_function_pool[25470]: Tangent3ivEXT (dynamic) */ - "p\0" - "glTangent3ivEXT\0" - "\0" - /* _mesa_function_pool[25489]: Tangent3dEXT (dynamic) */ - "ddd\0" - "glTangent3dEXT\0" - "\0" - /* _mesa_function_pool[25509]: SecondaryColor3dvEXT (will be remapped) */ - "p\0" - "glSecondaryColor3dv\0" - "glSecondaryColor3dvEXT\0" - "\0" - /* _mesa_function_pool[25555]: AlphaFragmentOp2ATI (will be remapped) */ - "iiiiiiiii\0" - "glAlphaFragmentOp2ATI\0" - "\0" - /* _mesa_function_pool[25588]: Vertex2fv (offset 129) */ - "p\0" - "glVertex2fv\0" - "\0" - /* _mesa_function_pool[25603]: MultiDrawArraysEXT (will be remapped) */ - "ippi\0" - "glMultiDrawArrays\0" - "glMultiDrawArraysEXT\0" - "\0" - /* _mesa_function_pool[25648]: BindRenderbufferEXT (will be remapped) */ - "ii\0" - "glBindRenderbuffer\0" - "glBindRenderbufferEXT\0" - "\0" - /* _mesa_function_pool[25693]: MultiTexCoord4dARB (offset 400) */ - "idddd\0" - "glMultiTexCoord4d\0" - "glMultiTexCoord4dARB\0" - "\0" - /* _mesa_function_pool[25739]: FramebufferTextureFaceARB (will be remapped) */ - "iiiii\0" - "glFramebufferTextureFaceARB\0" - "\0" - /* _mesa_function_pool[25774]: Vertex3sv (offset 141) */ - "p\0" - "glVertex3sv\0" - "\0" - /* _mesa_function_pool[25789]: SecondaryColor3usEXT (will be remapped) */ - "iii\0" - "glSecondaryColor3us\0" - "glSecondaryColor3usEXT\0" - "\0" - /* _mesa_function_pool[25837]: ProgramLocalParameter4fvARB (will be remapped) */ - "iip\0" - "glProgramLocalParameter4fvARB\0" - "\0" - /* _mesa_function_pool[25872]: DeleteProgramsNV (will be remapped) */ - "ip\0" - "glDeleteProgramsARB\0" - "glDeleteProgramsNV\0" - "\0" - /* _mesa_function_pool[25915]: EvalMesh1 (offset 236) */ - "iii\0" - "glEvalMesh1\0" - "\0" - /* _mesa_function_pool[25932]: PauseTransformFeedback (will be remapped) */ - "\0" - "glPauseTransformFeedback\0" - "\0" - /* _mesa_function_pool[25959]: MultiTexCoord1sARB (offset 382) */ - "ii\0" - "glMultiTexCoord1s\0" - "glMultiTexCoord1sARB\0" - "\0" - /* _mesa_function_pool[26002]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */ - "iffffff\0" - "glReplacementCodeuiColor3fVertex3fSUN\0" - "\0" - /* _mesa_function_pool[26049]: GetVertexAttribPointervNV (will be remapped) */ - "iip\0" - "glGetVertexAttribPointerv\0" - "glGetVertexAttribPointervARB\0" - "glGetVertexAttribPointervNV\0" - "\0" - /* _mesa_function_pool[26137]: VertexAttribs1fvNV (will be remapped) */ - "iip\0" - "glVertexAttribs1fvNV\0" - "\0" - /* _mesa_function_pool[26163]: MultiTexCoord1dvARB (offset 377) */ - "ip\0" - "glMultiTexCoord1dv\0" - "glMultiTexCoord1dvARB\0" - "\0" - /* _mesa_function_pool[26208]: Uniform2iARB (will be remapped) */ - "iii\0" - "glUniform2i\0" - "glUniform2iARB\0" - "\0" - /* _mesa_function_pool[26240]: Vertex2iv (offset 131) */ - "p\0" - "glVertex2iv\0" - "\0" - /* _mesa_function_pool[26255]: GetProgramStringNV (will be remapped) */ - "iip\0" - "glGetProgramStringNV\0" - "\0" - /* _mesa_function_pool[26281]: ColorPointerEXT (will be remapped) */ - "iiiip\0" - "glColorPointerEXT\0" - "\0" - /* _mesa_function_pool[26306]: LineWidth (offset 168) */ - "f\0" - "glLineWidth\0" - "\0" - /* _mesa_function_pool[26321]: MapBufferARB (will be remapped) */ - "ii\0" - "glMapBuffer\0" - "glMapBufferARB\0" - "\0" - /* _mesa_function_pool[26352]: MultiDrawElementsBaseVertex (will be remapped) */ - "ipipip\0" - "glMultiDrawElementsBaseVertex\0" - "\0" - /* _mesa_function_pool[26390]: TexParameterIuivEXT (will be remapped) */ - "iip\0" - "glTexParameterIuivEXT\0" - "glTexParameterIuiv\0" - "\0" - /* _mesa_function_pool[26436]: Binormal3svEXT (dynamic) */ - "p\0" - "glBinormal3svEXT\0" - "\0" - /* _mesa_function_pool[26456]: ApplyTextureEXT (dynamic) */ - "i\0" - "glApplyTextureEXT\0" - "\0" - /* _mesa_function_pool[26477]: GetBufferParameteri64v (will be remapped) */ - "iip\0" - "glGetBufferParameteri64v\0" - "\0" - /* _mesa_function_pool[26507]: TexGendv (offset 189) */ - "iip\0" - "glTexGendv\0" - "\0" - /* _mesa_function_pool[26523]: VertexAttribI3iEXT (will be remapped) */ - "iiii\0" - "glVertexAttribI3iEXT\0" - "glVertexAttribI3i\0" - "\0" - /* _mesa_function_pool[26568]: EnableIndexedEXT (will be remapped) */ - "ii\0" - "glEnableIndexedEXT\0" - "glEnablei\0" - "\0" - /* _mesa_function_pool[26601]: TextureMaterialEXT (dynamic) */ - "ii\0" - "glTextureMaterialEXT\0" - "\0" - /* _mesa_function_pool[26626]: TextureLightEXT (dynamic) */ - "i\0" - "glTextureLightEXT\0" - "\0" - /* _mesa_function_pool[26647]: ResetMinmax (offset 370) */ - "i\0" - "glResetMinmax\0" - "glResetMinmaxEXT\0" - "\0" - /* _mesa_function_pool[26681]: SpriteParameterfSGIX (dynamic) */ - "if\0" - "glSpriteParameterfSGIX\0" - "\0" - /* _mesa_function_pool[26708]: EnableClientState (offset 313) */ - "i\0" - "glEnableClientState\0" - "\0" - /* _mesa_function_pool[26731]: VertexAttrib4sNV (will be remapped) */ - "iiiii\0" - "glVertexAttrib4sNV\0" - "\0" - /* _mesa_function_pool[26757]: GetConvolutionParameterfv (offset 357) */ - "iip\0" - "glGetConvolutionParameterfv\0" - "glGetConvolutionParameterfvEXT\0" - "\0" - /* _mesa_function_pool[26821]: VertexAttribs4dvNV (will be remapped) */ - "iip\0" - "glVertexAttribs4dvNV\0" - "\0" - /* _mesa_function_pool[26847]: MultiModeDrawArraysIBM (will be remapped) */ - "pppii\0" - "glMultiModeDrawArraysIBM\0" - "\0" - /* _mesa_function_pool[26879]: VertexAttrib4dARB (will be remapped) */ - "idddd\0" - "glVertexAttrib4d\0" - "glVertexAttrib4dARB\0" - "\0" - /* _mesa_function_pool[26923]: GetTexBumpParameterfvATI (will be remapped) */ - "ip\0" - "glGetTexBumpParameterfvATI\0" - "\0" - /* _mesa_function_pool[26954]: ProgramNamedParameter4dNV (will be remapped) */ - "iipdddd\0" - "glProgramNamedParameter4dNV\0" - "\0" - /* _mesa_function_pool[26991]: GetMaterialfv (offset 269) */ - "iip\0" - "glGetMaterialfv\0" - "\0" - /* _mesa_function_pool[27012]: VertexWeightfEXT (dynamic) */ - "f\0" - "glVertexWeightfEXT\0" - "\0" - /* _mesa_function_pool[27034]: SetFragmentShaderConstantATI (will be remapped) */ - "ip\0" - "glSetFragmentShaderConstantATI\0" - "\0" - /* _mesa_function_pool[27069]: Binormal3fEXT (dynamic) */ - "fff\0" - "glBinormal3fEXT\0" - "\0" - /* _mesa_function_pool[27090]: CallList (offset 2) */ - "i\0" - "glCallList\0" - "\0" - /* _mesa_function_pool[27104]: Materialfv (offset 170) */ - "iip\0" - "glMaterialfv\0" - "\0" - /* _mesa_function_pool[27122]: TexCoord3fv (offset 113) */ - "p\0" - "glTexCoord3fv\0" - "\0" - /* _mesa_function_pool[27139]: FogCoordfvEXT (will be remapped) */ - "p\0" - "glFogCoordfv\0" - "glFogCoordfvEXT\0" - "\0" - /* _mesa_function_pool[27171]: MultiTexCoord1ivARB (offset 381) */ - "ip\0" - "glMultiTexCoord1iv\0" - "glMultiTexCoord1ivARB\0" - "\0" - /* _mesa_function_pool[27216]: SecondaryColor3ubEXT (will be remapped) */ - "iii\0" - "glSecondaryColor3ub\0" - "glSecondaryColor3ubEXT\0" - "\0" - /* _mesa_function_pool[27264]: MultiTexCoord2ivARB (offset 389) */ - "ip\0" - "glMultiTexCoord2iv\0" - "glMultiTexCoord2ivARB\0" - "\0" - /* _mesa_function_pool[27309]: FogFuncSGIS (dynamic) */ - "ip\0" - "glFogFuncSGIS\0" - "\0" - /* _mesa_function_pool[27327]: CopyTexSubImage2D (offset 326) */ - "iiiiiiii\0" - "glCopyTexSubImage2D\0" - "glCopyTexSubImage2DEXT\0" - "\0" - /* _mesa_function_pool[27380]: GetObjectParameterivARB (will be remapped) */ - "iip\0" - "glGetObjectParameterivARB\0" - "\0" - /* _mesa_function_pool[27411]: Color3iv (offset 16) */ - "p\0" - "glColor3iv\0" - "\0" - /* _mesa_function_pool[27425]: TexCoord4fVertex4fSUN (dynamic) */ - "ffffffff\0" - "glTexCoord4fVertex4fSUN\0" - "\0" - /* _mesa_function_pool[27459]: DrawElements (offset 311) */ - "iiip\0" - "glDrawElements\0" - "\0" - /* _mesa_function_pool[27480]: BindVertexArrayAPPLE (will be remapped) */ - "i\0" - "glBindVertexArrayAPPLE\0" - "\0" - /* _mesa_function_pool[27506]: GetProgramLocalParameterdvARB (will be remapped) */ - "iip\0" - "glGetProgramLocalParameterdvARB\0" - "\0" - /* _mesa_function_pool[27543]: GetHistogramParameteriv (offset 363) */ - "iip\0" - "glGetHistogramParameteriv\0" - "glGetHistogramParameterivEXT\0" - "\0" - /* _mesa_function_pool[27603]: MultiTexCoord1iARB (offset 380) */ - "ii\0" - "glMultiTexCoord1i\0" - "glMultiTexCoord1iARB\0" - "\0" - /* _mesa_function_pool[27646]: GetConvolutionFilter (offset 356) */ - "iiip\0" - "glGetConvolutionFilter\0" - "glGetConvolutionFilterEXT\0" - "\0" - /* _mesa_function_pool[27701]: GetProgramivARB (will be remapped) */ - "iip\0" - "glGetProgramivARB\0" - "\0" - /* _mesa_function_pool[27724]: BlendFuncSeparateEXT (will be remapped) */ - "iiii\0" - "glBlendFuncSeparate\0" - "glBlendFuncSeparateEXT\0" - "glBlendFuncSeparateINGR\0" - "\0" - /* _mesa_function_pool[27797]: MapBufferRange (will be remapped) */ - "iiii\0" - "glMapBufferRange\0" - "\0" - /* _mesa_function_pool[27820]: ProgramParameters4dvNV (will be remapped) */ - "iiip\0" - "glProgramParameters4dvNV\0" - "\0" - /* _mesa_function_pool[27851]: TexCoord2fColor3fVertex3fvSUN (dynamic) */ - "ppp\0" - "glTexCoord2fColor3fVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[27888]: EvalPoint2 (offset 239) */ - "ii\0" - "glEvalPoint2\0" - "\0" - /* _mesa_function_pool[27905]: Uniform1uivEXT (will be remapped) */ - "iip\0" - "glUniform1uivEXT\0" - "glUniform1uiv\0" - "\0" - /* _mesa_function_pool[27941]: EvalPoint1 (offset 237) */ - "i\0" - "glEvalPoint1\0" - "\0" - /* _mesa_function_pool[27957]: Binormal3dvEXT (dynamic) */ - "p\0" - "glBinormal3dvEXT\0" - "\0" - /* _mesa_function_pool[27977]: PopMatrix (offset 297) */ - "\0" - "glPopMatrix\0" - "\0" - /* _mesa_function_pool[27991]: GetVertexAttribIuivEXT (will be remapped) */ - "iip\0" - "glGetVertexAttribIuivEXT\0" - "glGetVertexAttribIuiv\0" - "\0" - /* _mesa_function_pool[28043]: FinishFenceNV (will be remapped) */ - "i\0" - "glFinishFenceNV\0" - "\0" - /* _mesa_function_pool[28062]: GetFogFuncSGIS (dynamic) */ - "p\0" - "glGetFogFuncSGIS\0" - "\0" - /* _mesa_function_pool[28082]: GetUniformLocationARB (will be remapped) */ - "ip\0" - "glGetUniformLocation\0" - "glGetUniformLocationARB\0" - "\0" - /* _mesa_function_pool[28131]: SecondaryColor3fEXT (will be remapped) */ - "fff\0" - "glSecondaryColor3f\0" - "glSecondaryColor3fEXT\0" - "\0" - /* _mesa_function_pool[28177]: GetTexGeniv (offset 280) */ - "iip\0" - "glGetTexGeniv\0" - "\0" - /* _mesa_function_pool[28196]: CombinerInputNV (will be remapped) */ - "iiiiii\0" - "glCombinerInputNV\0" - "\0" - /* _mesa_function_pool[28222]: VertexAttrib3sARB (will be remapped) */ - "iiii\0" - "glVertexAttrib3s\0" - "glVertexAttrib3sARB\0" - "\0" - /* _mesa_function_pool[28265]: IsTransformFeedback (will be remapped) */ - "i\0" - "glIsTransformFeedback\0" - "\0" - /* _mesa_function_pool[28290]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */ - "ppp\0" - "glReplacementCodeuiNormal3fVertex3fvSUN\0" - "\0" - /* _mesa_function_pool[28335]: Map2d (offset 222) */ - "iddiiddiip\0" - "glMap2d\0" - "\0" - /* _mesa_function_pool[28355]: Map2f (offset 223) */ - "iffiiffiip\0" - "glMap2f\0" - "\0" - /* _mesa_function_pool[28375]: ProgramStringARB (will be remapped) */ - "iiip\0" - "glProgramStringARB\0" - "\0" - /* _mesa_function_pool[28400]: Vertex4s (offset 148) */ - "iiii\0" - "glVertex4s\0" - "\0" - /* _mesa_function_pool[28417]: TexCoord4fVertex4fvSUN (dynamic) */ - "pp\0" - "glTexCoord4fVertex4fvSUN\0" - "\0" - /* _mesa_function_pool[28446]: FragmentLightModelivSGIX (dynamic) */ - "ip\0" - "glFragmentLightModelivSGIX\0" - "\0" - /* _mesa_function_pool[28477]: VertexAttrib1fNV (will be remapped) */ - "if\0" - "glVertexAttrib1fNV\0" - "\0" - /* _mesa_function_pool[28500]: Vertex4f (offset 144) */ - "ffff\0" - "glVertex4f\0" - "\0" - /* _mesa_function_pool[28517]: EvalCoord1d (offset 228) */ - "d\0" - "glEvalCoord1d\0" - "\0" - /* _mesa_function_pool[28534]: Vertex4d (offset 142) */ - "dddd\0" - "glVertex4d\0" - "\0" - /* _mesa_function_pool[28551]: RasterPos4dv (offset 79) */ - "p\0" - "glRasterPos4dv\0" - "\0" - /* _mesa_function_pool[28569]: UseShaderProgramEXT (will be remapped) */ - "ii\0" - "glUseShaderProgramEXT\0" - "\0" - /* _mesa_function_pool[28595]: FragmentLightfSGIX (dynamic) */ - "iif\0" - "glFragmentLightfSGIX\0" - "\0" - /* _mesa_function_pool[28621]: GetCompressedTexImageARB (will be remapped) */ - "iip\0" - "glGetCompressedTexImage\0" - "glGetCompressedTexImageARB\0" - "\0" - /* _mesa_function_pool[28677]: GetTexGenfv (offset 279) */ - "iip\0" - "glGetTexGenfv\0" - "\0" - /* _mesa_function_pool[28696]: Vertex4i (offset 146) */ - "iiii\0" - "glVertex4i\0" - "\0" - /* _mesa_function_pool[28713]: VertexWeightPointerEXT (dynamic) */ - "iiip\0" - "glVertexWeightPointerEXT\0" - "\0" - /* _mesa_function_pool[28744]: GetHistogram (offset 361) */ - "iiiip\0" - "glGetHistogram\0" - "glGetHistogramEXT\0" - "\0" - /* _mesa_function_pool[28784]: ActiveStencilFaceEXT (will be remapped) */ - "i\0" - "glActiveStencilFaceEXT\0" - "\0" - /* _mesa_function_pool[28810]: StencilFuncSeparateATI (will be remapped) */ - "iiii\0" - "glStencilFuncSeparateATI\0" - "\0" - /* _mesa_function_pool[28841]: Materialf (offset 169) */ - "iif\0" - "glMaterialf\0" - "\0" - /* _mesa_function_pool[28858]: GetShaderSourceARB (will be remapped) */ - "iipp\0" - "glGetShaderSource\0" - "glGetShaderSourceARB\0" - "\0" - /* _mesa_function_pool[28903]: IglooInterfaceSGIX (dynamic) */ - "ip\0" - "glIglooInterfaceSGIX\0" - "\0" - /* _mesa_function_pool[28928]: Materiali (offset 171) */ - "iii\0" - "glMateriali\0" - "\0" - /* _mesa_function_pool[28945]: VertexAttrib4dNV (will be remapped) */ - "idddd\0" - "glVertexAttrib4dNV\0" - "\0" - /* _mesa_function_pool[28971]: MultiModeDrawElementsIBM (will be remapped) */ - "ppipii\0" - "glMultiModeDrawElementsIBM\0" - "\0" - /* _mesa_function_pool[29006]: Indexsv (offset 51) */ - "p\0" - "glIndexsv\0" - "\0" - /* _mesa_function_pool[29019]: MultiTexCoord4svARB (offset 407) */ - "ip\0" - "glMultiTexCoord4sv\0" - "glMultiTexCoord4svARB\0" - "\0" - /* _mesa_function_pool[29064]: LightModelfv (offset 164) */ - "ip\0" - "glLightModelfv\0" - "\0" - /* _mesa_function_pool[29083]: TexCoord2dv (offset 103) */ - "p\0" - "glTexCoord2dv\0" - "\0" - /* _mesa_function_pool[29100]: GenQueriesARB (will be remapped) */ - "ip\0" - "glGenQueries\0" - "glGenQueriesARB\0" - "\0" - /* _mesa_function_pool[29133]: EvalCoord1dv (offset 229) */ - "p\0" - "glEvalCoord1dv\0" - "\0" - /* _mesa_function_pool[29151]: ReplacementCodeuiVertex3fSUN (dynamic) */ - "ifff\0" - "glReplacementCodeuiVertex3fSUN\0" - "\0" - /* _mesa_function_pool[29188]: Translated (offset 303) */ - "ddd\0" - "glTranslated\0" - "\0" - /* _mesa_function_pool[29206]: Translatef (offset 304) */ - "fff\0" - "glTranslatef\0" - "\0" - /* _mesa_function_pool[29224]: Uniform3uiEXT (will be remapped) */ - "iiii\0" - "glUniform3uiEXT\0" - "glUniform3ui\0" - "\0" - /* _mesa_function_pool[29259]: StencilMask (offset 209) */ - "i\0" - "glStencilMask\0" - "\0" - /* _mesa_function_pool[29276]: Tangent3iEXT (dynamic) */ - "iii\0" - "glTangent3iEXT\0" - "\0" - /* _mesa_function_pool[29296]: ClampColorARB (will be remapped) */ - "ii\0" - "glClampColorARB\0" - "\0" - /* _mesa_function_pool[29316]: GetLightiv (offset 265) */ - "iip\0" - "glGetLightiv\0" - "\0" - /* _mesa_function_pool[29334]: DrawMeshArraysSUN (dynamic) */ - "iiii\0" - "glDrawMeshArraysSUN\0" - "\0" - /* _mesa_function_pool[29360]: IsList (offset 287) */ - "i\0" - "glIsList\0" - "\0" - /* _mesa_function_pool[29372]: IsSync (will be remapped) */ - "i\0" - "glIsSync\0" - "\0" - /* _mesa_function_pool[29384]: RenderMode (offset 196) */ - "i\0" - "glRenderMode\0" - "\0" - /* _mesa_function_pool[29400]: GetMapControlPointsNV (dynamic) */ - "iiiiiip\0" - "glGetMapControlPointsNV\0" - "\0" - /* _mesa_function_pool[29433]: DrawBuffersARB (will be remapped) */ - "ip\0" - "glDrawBuffers\0" - "glDrawBuffersARB\0" - "glDrawBuffersATI\0" - "\0" - /* _mesa_function_pool[29485]: ClearBufferiv (will be remapped) */ - "iip\0" - "glClearBufferiv\0" - "\0" - /* _mesa_function_pool[29506]: ProgramLocalParameter4fARB (will be remapped) */ - "iiffff\0" - "glProgramLocalParameter4fARB\0" - "\0" - /* _mesa_function_pool[29543]: SpriteParameterivSGIX (dynamic) */ - "ip\0" - "glSpriteParameterivSGIX\0" - "\0" - /* _mesa_function_pool[29571]: ProvokingVertexEXT (will be remapped) */ - "i\0" - "glProvokingVertexEXT\0" - "glProvokingVertex\0" - "\0" - /* _mesa_function_pool[29613]: MultiTexCoord1fARB (offset 378) */ - "if\0" - "glMultiTexCoord1f\0" - "glMultiTexCoord1fARB\0" - "\0" - /* _mesa_function_pool[29656]: LoadName (offset 198) */ - "i\0" - "glLoadName\0" - "\0" - /* _mesa_function_pool[29670]: VertexAttribs4ubvNV (will be remapped) */ - "iip\0" - "glVertexAttribs4ubvNV\0" - "\0" - /* _mesa_function_pool[29697]: WeightsvARB (dynamic) */ - "ip\0" - "glWeightsvARB\0" - "\0" - /* _mesa_function_pool[29715]: Uniform1fvARB (will be remapped) */ - "iip\0" - "glUniform1fv\0" - "glUniform1fvARB\0" - "\0" - /* _mesa_function_pool[29749]: CopyTexSubImage1D (offset 325) */ - "iiiiii\0" - "glCopyTexSubImage1D\0" - "glCopyTexSubImage1DEXT\0" - "\0" - /* _mesa_function_pool[29800]: CullFace (offset 152) */ - "i\0" - "glCullFace\0" - "\0" - /* _mesa_function_pool[29814]: BindTexture (offset 307) */ - "ii\0" - "glBindTexture\0" - "glBindTextureEXT\0" - "\0" - /* _mesa_function_pool[29849]: BeginFragmentShaderATI (will be remapped) */ - "\0" - "glBeginFragmentShaderATI\0" - "\0" - /* _mesa_function_pool[29876]: MultiTexCoord4fARB (offset 402) */ - "iffff\0" - "glMultiTexCoord4f\0" - "glMultiTexCoord4fARB\0" - "\0" - /* _mesa_function_pool[29922]: VertexAttribs3svNV (will be remapped) */ - "iip\0" - "glVertexAttribs3svNV\0" - "\0" - /* _mesa_function_pool[29948]: StencilFunc (offset 243) */ - "iii\0" - "glStencilFunc\0" - "\0" - /* _mesa_function_pool[29967]: CopyPixels (offset 255) */ - "iiiii\0" - "glCopyPixels\0" - "\0" - /* _mesa_function_pool[29987]: Rectsv (offset 93) */ - "pp\0" - "glRectsv\0" - "\0" - /* _mesa_function_pool[30000]: ReplacementCodeuivSUN (dynamic) */ - "p\0" - "glReplacementCodeuivSUN\0" - "\0" - /* _mesa_function_pool[30027]: EnableVertexAttribArrayARB (will be remapped) */ - "i\0" - "glEnableVertexAttribArray\0" - "glEnableVertexAttribArrayARB\0" - "\0" - /* _mesa_function_pool[30085]: NormalPointervINTEL (dynamic) */ - "ip\0" - "glNormalPointervINTEL\0" - "\0" - /* _mesa_function_pool[30111]: CopyConvolutionFilter2D (offset 355) */ - "iiiiii\0" - "glCopyConvolutionFilter2D\0" - "glCopyConvolutionFilter2DEXT\0" - "\0" - /* _mesa_function_pool[30174]: WindowPos3ivMESA (will be remapped) */ - "p\0" - "glWindowPos3iv\0" - "glWindowPos3ivARB\0" - "glWindowPos3ivMESA\0" - "\0" - /* _mesa_function_pool[30229]: CopyBufferSubData (will be remapped) */ - "iiiii\0" - "glCopyBufferSubData\0" - "\0" - /* _mesa_function_pool[30256]: NormalPointer (offset 318) */ - "iip\0" - "glNormalPointer\0" - "\0" - /* _mesa_function_pool[30277]: TexParameterfv (offset 179) */ - "iip\0" - "glTexParameterfv\0" - "\0" - /* _mesa_function_pool[30299]: IsBufferARB (will be remapped) */ - "i\0" - "glIsBuffer\0" - "glIsBufferARB\0" - "\0" - /* _mesa_function_pool[30327]: WindowPos4iMESA (will be remapped) */ - "iiii\0" - "glWindowPos4iMESA\0" - "\0" - /* _mesa_function_pool[30351]: VertexAttrib4uivARB (will be remapped) */ - "ip\0" - "glVertexAttrib4uiv\0" - "glVertexAttrib4uivARB\0" - "\0" - /* _mesa_function_pool[30396]: Tangent3bvEXT (dynamic) */ - "p\0" - "glTangent3bvEXT\0" - "\0" - /* _mesa_function_pool[30415]: VertexAttribI3uivEXT (will be remapped) */ - "ip\0" - "glVertexAttribI3uivEXT\0" - "glVertexAttribI3uiv\0" - "\0" - /* _mesa_function_pool[30462]: UniformMatrix3x4fv (will be remapped) */ - "iiip\0" - "glUniformMatrix3x4fv\0" - "\0" - /* _mesa_function_pool[30489]: ClipPlane (offset 150) */ - "ip\0" - "glClipPlane\0" - "\0" - /* _mesa_function_pool[30505]: Recti (offset 90) */ - "iiii\0" - "glRecti\0" - "\0" - /* _mesa_function_pool[30519]: VertexAttribI3ivEXT (will be remapped) */ - "ip\0" - "glVertexAttribI3ivEXT\0" - "glVertexAttribI3iv\0" - "\0" - /* _mesa_function_pool[30564]: DrawRangeElementsBaseVertex (will be remapped) */ - "iiiiipi\0" - "glDrawRangeElementsBaseVertex\0" - "\0" - /* _mesa_function_pool[30603]: TexCoordPointervINTEL (dynamic) */ - "iip\0" - "glTexCoordPointervINTEL\0" - "\0" - /* _mesa_function_pool[30632]: DeleteBuffersARB (will be remapped) */ - "ip\0" - "glDeleteBuffers\0" - "glDeleteBuffersARB\0" - "\0" - /* _mesa_function_pool[30671]: PixelTransformParameterfvEXT (dynamic) */ - "iip\0" - "glPixelTransformParameterfvEXT\0" - "\0" - /* _mesa_function_pool[30707]: PrimitiveRestartNV (will be remapped) */ - "\0" - "glPrimitiveRestartNV\0" - "\0" - /* _mesa_function_pool[30730]: WindowPos4fvMESA (will be remapped) */ - "p\0" - "glWindowPos4fvMESA\0" - "\0" - /* _mesa_function_pool[30752]: GetPixelMapuiv (offset 272) */ - "ip\0" - "glGetPixelMapuiv\0" - "\0" - /* _mesa_function_pool[30773]: Rectf (offset 88) */ - "ffff\0" - "glRectf\0" - "\0" - /* _mesa_function_pool[30787]: VertexAttrib1sNV (will be remapped) */ - "ii\0" - "glVertexAttrib1sNV\0" - "\0" - /* _mesa_function_pool[30810]: Indexfv (offset 47) */ - "p\0" - "glIndexfv\0" - "\0" - /* _mesa_function_pool[30823]: SecondaryColor3svEXT (will be remapped) */ - "p\0" - "glSecondaryColor3sv\0" - "glSecondaryColor3svEXT\0" - "\0" - /* _mesa_function_pool[30869]: LoadTransposeMatrixfARB (will be remapped) */ - "p\0" - "glLoadTransposeMatrixf\0" - "glLoadTransposeMatrixfARB\0" - "\0" - /* _mesa_function_pool[30921]: GetPointerv (offset 329) */ - "ip\0" - "glGetPointerv\0" - "glGetPointervEXT\0" - "\0" - /* _mesa_function_pool[30956]: Tangent3bEXT (dynamic) */ - "iii\0" - "glTangent3bEXT\0" - "\0" - /* _mesa_function_pool[30976]: CombinerParameterfNV (will be remapped) */ - "if\0" - "glCombinerParameterfNV\0" - "\0" - /* _mesa_function_pool[31003]: IndexMask (offset 212) */ - "i\0" - "glIndexMask\0" - "\0" - /* _mesa_function_pool[31018]: BindProgramNV (will be remapped) */ - "ii\0" - "glBindProgramARB\0" - "glBindProgramNV\0" - "\0" - /* _mesa_function_pool[31055]: VertexAttrib4svARB (will be remapped) */ - "ip\0" - "glVertexAttrib4sv\0" - "glVertexAttrib4svARB\0" - "\0" - /* _mesa_function_pool[31098]: GetFloatv (offset 262) */ - "ip\0" - "glGetFloatv\0" - "\0" - /* _mesa_function_pool[31114]: CreateDebugObjectMESA (dynamic) */ - "\0" - "glCreateDebugObjectMESA\0" - "\0" - /* _mesa_function_pool[31140]: GetShaderiv (will be remapped) */ - "iip\0" - "glGetShaderiv\0" - "\0" - /* _mesa_function_pool[31159]: ClientWaitSync (will be remapped) */ - "iii\0" - "glClientWaitSync\0" - "\0" - /* _mesa_function_pool[31181]: TexCoord4s (offset 124) */ - "iiii\0" - "glTexCoord4s\0" - "\0" - /* _mesa_function_pool[31200]: TexCoord3sv (offset 117) */ - "p\0" - "glTexCoord3sv\0" - "\0" - /* _mesa_function_pool[31217]: BindFragmentShaderATI (will be remapped) */ - "i\0" - "glBindFragmentShaderATI\0" - "\0" - /* _mesa_function_pool[31244]: PopAttrib (offset 218) */ - "\0" - "glPopAttrib\0" - "\0" - /* _mesa_function_pool[31258]: Fogfv (offset 154) */ - "ip\0" - "glFogfv\0" - "\0" - /* _mesa_function_pool[31270]: UnmapBufferARB (will be remapped) */ - "i\0" - "glUnmapBuffer\0" - "glUnmapBufferARB\0" - "\0" - /* _mesa_function_pool[31304]: InitNames (offset 197) */ - "\0" - "glInitNames\0" - "\0" - /* _mesa_function_pool[31318]: Normal3sv (offset 61) */ - "p\0" - "glNormal3sv\0" - "\0" - /* _mesa_function_pool[31333]: Minmax (offset 368) */ - "iii\0" - "glMinmax\0" - "glMinmaxEXT\0" - "\0" - /* _mesa_function_pool[31359]: TexCoord4d (offset 118) */ - "dddd\0" - "glTexCoord4d\0" - "\0" - /* _mesa_function_pool[31378]: TexCoord4f (offset 120) */ - "ffff\0" - "glTexCoord4f\0" - "\0" - /* _mesa_function_pool[31397]: FogCoorddvEXT (will be remapped) */ - "p\0" - "glFogCoorddv\0" - "glFogCoorddvEXT\0" - "\0" - /* _mesa_function_pool[31429]: FinishTextureSUNX (dynamic) */ - "\0" - "glFinishTextureSUNX\0" - "\0" - /* _mesa_function_pool[31451]: GetFragmentLightfvSGIX (dynamic) */ - "iip\0" - "glGetFragmentLightfvSGIX\0" - "\0" - /* _mesa_function_pool[31481]: Binormal3fvEXT (dynamic) */ - "p\0" - "glBinormal3fvEXT\0" - "\0" - /* _mesa_function_pool[31501]: GetBooleanv (offset 258) */ - "ip\0" - "glGetBooleanv\0" - "\0" - /* _mesa_function_pool[31519]: ColorFragmentOp3ATI (will be remapped) */ - "iiiiiiiiiiiii\0" - "glColorFragmentOp3ATI\0" - "\0" - /* _mesa_function_pool[31556]: Hint (offset 158) */ - "ii\0" - "glHint\0" - "\0" - /* _mesa_function_pool[31567]: Color4dv (offset 28) */ - "p\0" - "glColor4dv\0" - "\0" - /* _mesa_function_pool[31581]: VertexAttrib2svARB (will be remapped) */ - "ip\0" - "glVertexAttrib2sv\0" - "glVertexAttrib2svARB\0" - "\0" - /* _mesa_function_pool[31624]: AreProgramsResidentNV (will be remapped) */ - "ipp\0" - "glAreProgramsResidentNV\0" - "\0" - /* _mesa_function_pool[31653]: WindowPos3svMESA (will be remapped) */ - "p\0" - "glWindowPos3sv\0" - "glWindowPos3svARB\0" - "glWindowPos3svMESA\0" - "\0" - /* _mesa_function_pool[31708]: CopyColorSubTable (offset 347) */ - "iiiii\0" - "glCopyColorSubTable\0" - "glCopyColorSubTableEXT\0" - "\0" - /* _mesa_function_pool[31758]: WeightdvARB (dynamic) */ - "ip\0" - "glWeightdvARB\0" - "\0" - /* _mesa_function_pool[31776]: DeleteRenderbuffersEXT (will be remapped) */ - "ip\0" - "glDeleteRenderbuffers\0" - "glDeleteRenderbuffersEXT\0" - "\0" - /* _mesa_function_pool[31827]: VertexAttrib4NubvARB (will be remapped) */ - "ip\0" - "glVertexAttrib4Nubv\0" - "glVertexAttrib4NubvARB\0" - "\0" - /* _mesa_function_pool[31874]: VertexAttrib3dvNV (will be remapped) */ - "ip\0" - "glVertexAttrib3dvNV\0" - "\0" - /* _mesa_function_pool[31898]: GetObjectParameterfvARB (will be remapped) */ - "iip\0" - "glGetObjectParameterfvARB\0" - "\0" - /* _mesa_function_pool[31929]: Vertex4iv (offset 147) */ - "p\0" - "glVertex4iv\0" - "\0" - /* _mesa_function_pool[31944]: GetProgramEnvParameterdvARB (will be remapped) */ - "iip\0" - "glGetProgramEnvParameterdvARB\0" - "\0" - /* _mesa_function_pool[31979]: TexCoord4dv (offset 119) */ - "p\0" - "glTexCoord4dv\0" - "\0" - /* _mesa_function_pool[31996]: LockArraysEXT (will be remapped) */ - "ii\0" - "glLockArraysEXT\0" - "\0" - /* _mesa_function_pool[32016]: Begin (offset 7) */ - "i\0" - "glBegin\0" - "\0" - /* _mesa_function_pool[32027]: LightModeli (offset 165) */ - "ii\0" - "glLightModeli\0" - "\0" - /* _mesa_function_pool[32045]: VertexAttribI4ivEXT (will be remapped) */ - "ip\0" - "glVertexAttribI4ivEXT\0" - "glVertexAttribI4iv\0" - "\0" - /* _mesa_function_pool[32090]: Rectfv (offset 89) */ - "pp\0" - "glRectfv\0" - "\0" - /* _mesa_function_pool[32103]: BlendEquationSeparateiARB (will be remapped) */ - "iii\0" - "glBlendEquationSeparateiARB\0" - "\0" - /* _mesa_function_pool[32136]: LightModelf (offset 163) */ - "if\0" - "glLightModelf\0" - "\0" - /* _mesa_function_pool[32154]: GetTexParameterfv (offset 282) */ - "iip\0" - "glGetTexParameterfv\0" - "\0" - /* _mesa_function_pool[32179]: GetLightfv (offset 264) */ - "iip\0" - "glGetLightfv\0" - "\0" - /* _mesa_function_pool[32197]: PixelTransformParameterivEXT (dynamic) */ - "iip\0" - "glPixelTransformParameterivEXT\0" - "\0" - /* _mesa_function_pool[32233]: BinormalPointerEXT (dynamic) */ - "iip\0" - "glBinormalPointerEXT\0" - "\0" - /* _mesa_function_pool[32259]: VertexAttrib1dNV (will be remapped) */ - "id\0" - "glVertexAttrib1dNV\0" - "\0" - /* _mesa_function_pool[32282]: GetCombinerInputParameterivNV (will be remapped) */ - "iiiip\0" - "glGetCombinerInputParameterivNV\0" - "\0" - /* _mesa_function_pool[32321]: Disable (offset 214) */ - "i\0" - "glDisable\0" - "\0" - /* _mesa_function_pool[32334]: MultiTexCoord2fvARB (offset 387) */ - "ip\0" - "glMultiTexCoord2fv\0" - "glMultiTexCoord2fvARB\0" - "\0" - /* _mesa_function_pool[32379]: GetRenderbufferParameterivEXT (will be remapped) */ - "iip\0" - "glGetRenderbufferParameteriv\0" - "glGetRenderbufferParameterivEXT\0" - "\0" - /* _mesa_function_pool[32445]: CombinerParameterivNV (will be remapped) */ - "ip\0" - "glCombinerParameterivNV\0" - "\0" - /* _mesa_function_pool[32473]: GenFragmentShadersATI (will be remapped) */ - "i\0" - "glGenFragmentShadersATI\0" - "\0" - /* _mesa_function_pool[32500]: DrawArrays (offset 310) */ - "iii\0" - "glDrawArrays\0" - "glDrawArraysEXT\0" - "\0" - /* _mesa_function_pool[32534]: WeightuivARB (dynamic) */ - "ip\0" - "glWeightuivARB\0" - "\0" - /* _mesa_function_pool[32553]: VertexAttrib2sARB (will be remapped) */ - "iii\0" - "glVertexAttrib2s\0" - "glVertexAttrib2sARB\0" - "\0" - /* _mesa_function_pool[32595]: ColorMask (offset 210) */ - "iiii\0" - "glColorMask\0" - "\0" - /* _mesa_function_pool[32613]: GenAsyncMarkersSGIX (dynamic) */ - "i\0" - "glGenAsyncMarkersSGIX\0" - "\0" - /* _mesa_function_pool[32638]: Tangent3svEXT (dynamic) */ - "p\0" - "glTangent3svEXT\0" - "\0" - /* _mesa_function_pool[32657]: GetListParameterivSGIX (dynamic) */ - "iip\0" - "glGetListParameterivSGIX\0" - "\0" - /* _mesa_function_pool[32687]: BindBufferARB (will be remapped) */ - "ii\0" - "glBindBuffer\0" - "glBindBufferARB\0" - "\0" - /* _mesa_function_pool[32720]: GetInfoLogARB (will be remapped) */ - "iipp\0" - "glGetInfoLogARB\0" - "\0" - /* _mesa_function_pool[32742]: RasterPos4iv (offset 83) */ - "p\0" - "glRasterPos4iv\0" - "\0" - /* _mesa_function_pool[32760]: Enable (offset 215) */ - "i\0" - "glEnable\0" - "\0" - /* _mesa_function_pool[32772]: LineStipple (offset 167) */ - "ii\0" - "glLineStipple\0" - "\0" - /* _mesa_function_pool[32790]: VertexAttribs4svNV (will be remapped) */ - "iip\0" - "glVertexAttribs4svNV\0" - "\0" - /* _mesa_function_pool[32816]: EdgeFlagPointerListIBM (dynamic) */ - "ipi\0" - "glEdgeFlagPointerListIBM\0" - "\0" - /* _mesa_function_pool[32846]: UniformMatrix3x2fv (will be remapped) */ - "iiip\0" - "glUniformMatrix3x2fv\0" - "\0" - /* _mesa_function_pool[32873]: GetMinmaxParameterfv (offset 365) */ - "iip\0" - "glGetMinmaxParameterfv\0" - "glGetMinmaxParameterfvEXT\0" - "\0" - /* _mesa_function_pool[32927]: VertexAttrib1fvARB (will be remapped) */ - "ip\0" - "glVertexAttrib1fv\0" - "glVertexAttrib1fvARB\0" - "\0" - /* _mesa_function_pool[32970]: GenBuffersARB (will be remapped) */ - "ip\0" - "glGenBuffers\0" - "glGenBuffersARB\0" - "\0" - /* _mesa_function_pool[33003]: VertexAttribs1svNV (will be remapped) */ - "iip\0" - "glVertexAttribs1svNV\0" - "\0" - /* _mesa_function_pool[33029]: Vertex3fv (offset 137) */ - "p\0" - "glVertex3fv\0" - "\0" - /* _mesa_function_pool[33044]: GetTexBumpParameterivATI (will be remapped) */ - "ip\0" - "glGetTexBumpParameterivATI\0" - "\0" - /* _mesa_function_pool[33075]: Binormal3bEXT (dynamic) */ - "iii\0" - "glBinormal3bEXT\0" - "\0" - /* _mesa_function_pool[33096]: FragmentMaterialivSGIX (dynamic) */ - "iip\0" - "glFragmentMaterialivSGIX\0" - "\0" - /* _mesa_function_pool[33126]: IsRenderbufferEXT (will be remapped) */ - "i\0" - "glIsRenderbuffer\0" - "glIsRenderbufferEXT\0" - "\0" - /* _mesa_function_pool[33166]: GenProgramsNV (will be remapped) */ - "ip\0" - "glGenProgramsARB\0" - "glGenProgramsNV\0" - "\0" - /* _mesa_function_pool[33203]: VertexAttrib4dvNV (will be remapped) */ - "ip\0" - "glVertexAttrib4dvNV\0" - "\0" - /* _mesa_function_pool[33227]: EndFragmentShaderATI (will be remapped) */ - "\0" - "glEndFragmentShaderATI\0" - "\0" - /* _mesa_function_pool[33252]: Binormal3iEXT (dynamic) */ - "iii\0" - "glBinormal3iEXT\0" - "\0" - /* _mesa_function_pool[33273]: WindowPos2fMESA (will be remapped) */ - "ff\0" - "glWindowPos2f\0" - "glWindowPos2fARB\0" - "glWindowPos2fMESA\0" - "\0" - ; - -/* these functions need to be remapped */ -static const struct gl_function_pool_remap MESA_remap_table_functions[] = { - { 1616, AttachShader_remap_index }, - { 9893, CreateProgram_remap_index }, - { 22964, CreateShader_remap_index }, - { 25451, DeleteProgram_remap_index }, - { 18608, DeleteShader_remap_index }, - { 23465, DetachShader_remap_index }, - { 17974, GetAttachedShaders_remap_index }, - { 4856, GetProgramInfoLog_remap_index }, - { 444, GetProgramiv_remap_index }, - { 6529, GetShaderInfoLog_remap_index }, - { 31140, GetShaderiv_remap_index }, - { 13387, IsProgram_remap_index }, - { 12308, IsShader_remap_index }, - { 10023, StencilFuncSeparate_remap_index }, - { 3960, StencilMaskSeparate_remap_index }, - { 7594, StencilOpSeparate_remap_index }, - { 22252, UniformMatrix2x3fv_remap_index }, - { 2886, UniformMatrix2x4fv_remap_index }, - { 32846, UniformMatrix3x2fv_remap_index }, - { 30462, UniformMatrix3x4fv_remap_index }, - { 16264, UniformMatrix4x2fv_remap_index }, - { 3302, UniformMatrix4x3fv_remap_index }, - { 5017, ClampColor_remap_index }, - { 18028, ClearBufferfi_remap_index }, - { 17470, ClearBufferfv_remap_index }, - { 29485, ClearBufferiv_remap_index }, - { 13592, ClearBufferuiv_remap_index }, - { 19891, GetStringi_remap_index }, - { 2827, TexBuffer_remap_index }, - { 977, FramebufferTexture_remap_index }, - { 26477, GetBufferParameteri64v_remap_index }, - { 10123, GetInteger64i_v_remap_index }, - { 23278, VertexAttribDivisor_remap_index }, - { 9911, LoadTransposeMatrixdARB_remap_index }, - { 30869, LoadTransposeMatrixfARB_remap_index }, - { 5637, MultTransposeMatrixdARB_remap_index }, - { 23652, MultTransposeMatrixfARB_remap_index }, - { 255, SampleCoverageARB_remap_index }, - { 5821, CompressedTexImage1DARB_remap_index }, - { 24180, CompressedTexImage2DARB_remap_index }, - { 4023, CompressedTexImage3DARB_remap_index }, - { 18325, CompressedTexSubImage1DARB_remap_index }, - { 2089, CompressedTexSubImage2DARB_remap_index }, - { 20313, CompressedTexSubImage3DARB_remap_index }, - { 28621, GetCompressedTexImageARB_remap_index }, - { 3868, DisableVertexAttribArrayARB_remap_index }, - { 30027, EnableVertexAttribArrayARB_remap_index }, - { 31944, GetProgramEnvParameterdvARB_remap_index }, - { 23532, GetProgramEnvParameterfvARB_remap_index }, - { 27506, GetProgramLocalParameterdvARB_remap_index }, - { 8036, GetProgramLocalParameterfvARB_remap_index }, - { 18459, GetProgramStringARB_remap_index }, - { 27701, GetProgramivARB_remap_index }, - { 20508, GetVertexAttribdvARB_remap_index }, - { 16072, GetVertexAttribfvARB_remap_index }, - { 9735, GetVertexAttribivARB_remap_index }, - { 19372, ProgramEnvParameter4dARB_remap_index }, - { 25201, ProgramEnvParameter4dvARB_remap_index }, - { 16792, ProgramEnvParameter4fARB_remap_index }, - { 8935, ProgramEnvParameter4fvARB_remap_index }, - { 3986, ProgramLocalParameter4dARB_remap_index }, - { 13097, ProgramLocalParameter4dvARB_remap_index }, - { 29506, ProgramLocalParameter4fARB_remap_index }, - { 25837, ProgramLocalParameter4fvARB_remap_index }, - { 28375, ProgramStringARB_remap_index }, - { 19622, VertexAttrib1dARB_remap_index }, - { 15726, VertexAttrib1dvARB_remap_index }, - { 4161, VertexAttrib1fARB_remap_index }, - { 32927, VertexAttrib1fvARB_remap_index }, - { 7120, VertexAttrib1sARB_remap_index }, - { 2263, VertexAttrib1svARB_remap_index }, - { 15157, VertexAttrib2dARB_remap_index }, - { 17491, VertexAttrib2dvARB_remap_index }, - { 1635, VertexAttrib2fARB_remap_index }, - { 17604, VertexAttrib2fvARB_remap_index }, - { 32553, VertexAttrib2sARB_remap_index }, - { 31581, VertexAttrib2svARB_remap_index }, - { 11274, VertexAttrib3dARB_remap_index }, - { 8602, VertexAttrib3dvARB_remap_index }, - { 1722, VertexAttrib3fARB_remap_index }, - { 22515, VertexAttrib3fvARB_remap_index }, - { 28222, VertexAttrib3sARB_remap_index }, - { 20250, VertexAttrib3svARB_remap_index }, - { 4882, VertexAttrib4NbvARB_remap_index }, - { 17851, VertexAttrib4NivARB_remap_index }, - { 22470, VertexAttrib4NsvARB_remap_index }, - { 23484, VertexAttrib4NubARB_remap_index }, - { 31827, VertexAttrib4NubvARB_remap_index }, - { 19033, VertexAttrib4NuivARB_remap_index }, - { 3175, VertexAttrib4NusvARB_remap_index }, - { 10863, VertexAttrib4bvARB_remap_index }, - { 26879, VertexAttrib4dARB_remap_index }, - { 21272, VertexAttrib4dvARB_remap_index }, - { 11428, VertexAttrib4fARB_remap_index }, - { 11832, VertexAttrib4fvARB_remap_index }, - { 10239, VertexAttrib4ivARB_remap_index }, - { 17284, VertexAttrib4sARB_remap_index }, - { 31055, VertexAttrib4svARB_remap_index }, - { 16597, VertexAttrib4ubvARB_remap_index }, - { 30351, VertexAttrib4uivARB_remap_index }, - { 20061, VertexAttrib4usvARB_remap_index }, - { 22067, VertexAttribPointerARB_remap_index }, - { 32687, BindBufferARB_remap_index }, - { 6827, BufferDataARB_remap_index }, - { 1537, BufferSubDataARB_remap_index }, - { 30632, DeleteBuffersARB_remap_index }, - { 32970, GenBuffersARB_remap_index }, - { 17647, GetBufferParameterivARB_remap_index }, - { 16744, GetBufferPointervARB_remap_index }, - { 1490, GetBufferSubDataARB_remap_index }, - { 30299, IsBufferARB_remap_index }, - { 26321, MapBufferARB_remap_index }, - { 31270, UnmapBufferARB_remap_index }, - { 351, BeginQueryARB_remap_index }, - { 19717, DeleteQueriesARB_remap_index }, - { 12159, EndQueryARB_remap_index }, - { 29100, GenQueriesARB_remap_index }, - { 1981, GetQueryObjectivARB_remap_index }, - { 17328, GetQueryObjectuivARB_remap_index }, - { 1779, GetQueryivARB_remap_index }, - { 19968, IsQueryARB_remap_index }, - { 8212, AttachObjectARB_remap_index }, - { 18570, CompileShaderARB_remap_index }, - { 3244, CreateProgramObjectARB_remap_index }, - { 6772, CreateShaderObjectARB_remap_index }, - { 14459, DeleteObjectARB_remap_index }, - { 23971, DetachObjectARB_remap_index }, - { 11904, GetActiveUniformARB_remap_index }, - { 9410, GetAttachedObjectsARB_remap_index }, - { 9717, GetHandleARB_remap_index }, - { 32720, GetInfoLogARB_remap_index }, - { 31898, GetObjectParameterfvARB_remap_index }, - { 27380, GetObjectParameterivARB_remap_index }, - { 28858, GetShaderSourceARB_remap_index }, - { 28082, GetUniformLocationARB_remap_index }, - { 23754, GetUniformfvARB_remap_index }, - { 12672, GetUniformivARB_remap_index }, - { 20106, LinkProgramARB_remap_index }, - { 20164, ShaderSourceARB_remap_index }, - { 7494, Uniform1fARB_remap_index }, - { 29715, Uniform1fvARB_remap_index }, - { 22036, Uniform1iARB_remap_index }, - { 20961, Uniform1ivARB_remap_index }, - { 2212, Uniform2fARB_remap_index }, - { 14295, Uniform2fvARB_remap_index }, - { 26208, Uniform2iARB_remap_index }, - { 2332, Uniform2ivARB_remap_index }, - { 18680, Uniform3fARB_remap_index }, - { 9440, Uniform3fvARB_remap_index }, - { 6383, Uniform3iARB_remap_index }, - { 16850, Uniform3ivARB_remap_index }, - { 19178, Uniform4fARB_remap_index }, - { 23618, Uniform4fvARB_remap_index }, - { 24880, Uniform4iARB_remap_index }, - { 20474, Uniform4ivARB_remap_index }, - { 8264, UniformMatrix2fvARB_remap_index }, - { 17, UniformMatrix3fvARB_remap_index }, - { 2729, UniformMatrix4fvARB_remap_index }, - { 25313, UseProgramObjectARB_remap_index }, - { 14845, ValidateProgramARB_remap_index }, - { 21315, BindAttribLocationARB_remap_index }, - { 4927, GetActiveAttribARB_remap_index }, - { 16531, GetAttribLocationARB_remap_index }, - { 29433, DrawBuffersARB_remap_index }, - { 29296, ClampColorARB_remap_index }, - { 17896, DrawArraysInstancedARB_remap_index }, - { 6444, DrawElementsInstancedARB_remap_index }, - { 13202, RenderbufferStorageMultisample_remap_index }, - { 13673, FramebufferTextureARB_remap_index }, - { 25739, FramebufferTextureFaceARB_remap_index }, - { 24120, ProgramParameteriARB_remap_index }, - { 23436, VertexAttribDivisorARB_remap_index }, - { 19226, FlushMappedBufferRange_remap_index }, - { 27797, MapBufferRange_remap_index }, - { 16375, BindVertexArray_remap_index }, - { 14668, GenVertexArrays_remap_index }, - { 30229, CopyBufferSubData_remap_index }, - { 31159, ClientWaitSync_remap_index }, - { 2648, DeleteSync_remap_index }, - { 7161, FenceSync_remap_index }, - { 15216, GetInteger64v_remap_index }, - { 22577, GetSynciv_remap_index }, - { 29372, IsSync_remap_index }, - { 9358, WaitSync_remap_index }, - { 3836, DrawElementsBaseVertex_remap_index }, - { 30564, DrawRangeElementsBaseVertex_remap_index }, - { 26352, MultiDrawElementsBaseVertex_remap_index }, - { 32103, BlendEquationSeparateiARB_remap_index }, - { 17740, BlendEquationiARB_remap_index }, - { 12641, BlendFuncSeparateiARB_remap_index }, - { 9783, BlendFunciARB_remap_index }, - { 5078, BindTransformFeedback_remap_index }, - { 3271, DeleteTransformFeedbacks_remap_index }, - { 6416, DrawTransformFeedback_remap_index }, - { 9577, GenTransformFeedbacks_remap_index }, - { 28265, IsTransformFeedback_remap_index }, - { 25932, PauseTransformFeedback_remap_index }, - { 5557, ResumeTransformFeedback_remap_index }, - { 21635, ClearDepthf_remap_index }, - { 6720, DepthRangef_remap_index }, - { 14480, GetShaderPrecisionFormat_remap_index }, - { 9963, ReleaseShaderCompiler_remap_index }, - { 10906, ShaderBinary_remap_index }, - { 5425, PolygonOffsetEXT_remap_index }, - { 23199, GetPixelTexGenParameterfvSGIS_remap_index }, - { 4404, GetPixelTexGenParameterivSGIS_remap_index }, - { 22932, PixelTexGenParameterfSGIS_remap_index }, - { 663, PixelTexGenParameterfvSGIS_remap_index }, - { 12710, PixelTexGenParameteriSGIS_remap_index }, - { 13815, PixelTexGenParameterivSGIS_remap_index }, - { 18224, SampleMaskSGIS_remap_index }, - { 19908, SamplePatternSGIS_remap_index }, - { 26281, ColorPointerEXT_remap_index }, - { 17534, EdgeFlagPointerEXT_remap_index }, - { 6037, IndexPointerEXT_remap_index }, - { 6117, NormalPointerEXT_remap_index }, - { 15810, TexCoordPointerEXT_remap_index }, - { 6950, VertexPointerEXT_remap_index }, - { 3638, PointParameterfEXT_remap_index }, - { 7801, PointParameterfvEXT_remap_index }, - { 31996, LockArraysEXT_remap_index }, - { 14909, UnlockArraysEXT_remap_index }, - { 1306, SecondaryColor3bEXT_remap_index }, - { 7960, SecondaryColor3bvEXT_remap_index }, - { 10416, SecondaryColor3dEXT_remap_index }, - { 25509, SecondaryColor3dvEXT_remap_index }, - { 28131, SecondaryColor3fEXT_remap_index }, - { 18261, SecondaryColor3fvEXT_remap_index }, - { 509, SecondaryColor3iEXT_remap_index }, - { 16120, SecondaryColor3ivEXT_remap_index }, - { 10051, SecondaryColor3sEXT_remap_index }, - { 30823, SecondaryColor3svEXT_remap_index }, - { 27216, SecondaryColor3ubEXT_remap_index }, - { 21206, SecondaryColor3ubvEXT_remap_index }, - { 12952, SecondaryColor3uiEXT_remap_index }, - { 22819, SecondaryColor3uivEXT_remap_index }, - { 25789, SecondaryColor3usEXT_remap_index }, - { 13025, SecondaryColor3usvEXT_remap_index }, - { 11775, SecondaryColorPointerEXT_remap_index }, - { 25603, MultiDrawArraysEXT_remap_index }, - { 20896, MultiDrawElementsEXT_remap_index }, - { 21091, FogCoordPointerEXT_remap_index }, - { 4553, FogCoorddEXT_remap_index }, - { 31397, FogCoorddvEXT_remap_index }, - { 4670, FogCoordfEXT_remap_index }, - { 27139, FogCoordfvEXT_remap_index }, - { 19130, PixelTexGenSGIX_remap_index }, - { 27724, BlendFuncSeparateEXT_remap_index }, - { 6862, FlushVertexArrayRangeNV_remap_index }, - { 5374, VertexArrayRangeNV_remap_index }, - { 28196, CombinerInputNV_remap_index }, - { 2155, CombinerOutputNV_remap_index }, - { 30976, CombinerParameterfNV_remap_index }, - { 5248, CombinerParameterfvNV_remap_index }, - { 22301, CombinerParameteriNV_remap_index }, - { 32445, CombinerParameterivNV_remap_index }, - { 7238, FinalCombinerInputNV_remap_index }, - { 9804, GetCombinerInputParameterfvNV_remap_index }, - { 32282, GetCombinerInputParameterivNV_remap_index }, - { 216, GetCombinerOutputParameterfvNV_remap_index }, - { 13776, GetCombinerOutputParameterivNV_remap_index }, - { 6624, GetFinalCombinerInputParameterfvNV_remap_index }, - { 24752, GetFinalCombinerInputParameterivNV_remap_index }, - { 12619, ResizeBuffersMESA_remap_index }, - { 11101, WindowPos2dMESA_remap_index }, - { 1099, WindowPos2dvMESA_remap_index }, - { 33273, WindowPos2fMESA_remap_index }, - { 7905, WindowPos2fvMESA_remap_index }, - { 18171, WindowPos2iMESA_remap_index }, - { 20381, WindowPos2ivMESA_remap_index }, - { 20995, WindowPos2sMESA_remap_index }, - { 5735, WindowPos2svMESA_remap_index }, - { 7730, WindowPos3dMESA_remap_index }, - { 14023, WindowPos3dvMESA_remap_index }, - { 555, WindowPos3fMESA_remap_index }, - { 14970, WindowPos3fvMESA_remap_index }, - { 24013, WindowPos3iMESA_remap_index }, - { 30174, WindowPos3ivMESA_remap_index }, - { 18825, WindowPos3sMESA_remap_index }, - { 31653, WindowPos3svMESA_remap_index }, - { 11052, WindowPos4dMESA_remap_index }, - { 16988, WindowPos4dvMESA_remap_index }, - { 13982, WindowPos4fMESA_remap_index }, - { 30730, WindowPos4fvMESA_remap_index }, - { 30327, WindowPos4iMESA_remap_index }, - { 12422, WindowPos4ivMESA_remap_index }, - { 19009, WindowPos4sMESA_remap_index }, - { 3222, WindowPos4svMESA_remap_index }, - { 26847, MultiModeDrawArraysIBM_remap_index }, - { 28971, MultiModeDrawElementsIBM_remap_index }, - { 12187, DeleteFencesNV_remap_index }, - { 28043, FinishFenceNV_remap_index }, - { 3760, GenFencesNV_remap_index }, - { 16968, GetFenceivNV_remap_index }, - { 8197, IsFenceNV_remap_index }, - { 13703, SetFenceNV_remap_index }, - { 4217, TestFenceNV_remap_index }, - { 31624, AreProgramsResidentNV_remap_index }, - { 31018, BindProgramNV_remap_index }, - { 25872, DeleteProgramsNV_remap_index }, - { 21424, ExecuteProgramNV_remap_index }, - { 33166, GenProgramsNV_remap_index }, - { 23304, GetProgramParameterdvNV_remap_index }, - { 10478, GetProgramParameterfvNV_remap_index }, - { 26255, GetProgramStringNV_remap_index }, - { 24390, GetProgramivNV_remap_index }, - { 23567, GetTrackMatrixivNV_remap_index }, - { 26049, GetVertexAttribPointervNV_remap_index }, - { 24685, GetVertexAttribdvNV_remap_index }, - { 9253, GetVertexAttribfvNV_remap_index }, - { 18432, GetVertexAttribivNV_remap_index }, - { 19256, IsProgramNV_remap_index }, - { 9336, LoadProgramNV_remap_index }, - { 27820, ProgramParameters4dvNV_remap_index }, - { 24320, ProgramParameters4fvNV_remap_index }, - { 20685, RequestResidentProgramsNV_remap_index }, - { 22279, TrackMatrixNV_remap_index }, - { 32259, VertexAttrib1dNV_remap_index }, - { 13614, VertexAttrib1dvNV_remap_index }, - { 28477, VertexAttrib1fNV_remap_index }, - { 2454, VertexAttrib1fvNV_remap_index }, - { 30787, VertexAttrib1sNV_remap_index }, - { 15043, VertexAttrib1svNV_remap_index }, - { 4832, VertexAttrib2dNV_remap_index }, - { 13507, VertexAttrib2dvNV_remap_index }, - { 20140, VertexAttrib2fNV_remap_index }, - { 13073, VertexAttrib2fvNV_remap_index }, - { 5947, VertexAttrib2sNV_remap_index }, - { 18879, VertexAttrib2svNV_remap_index }, - { 11249, VertexAttrib3dNV_remap_index }, - { 31874, VertexAttrib3dvNV_remap_index }, - { 10290, VertexAttrib3fNV_remap_index }, - { 24712, VertexAttrib3fvNV_remap_index }, - { 22122, VertexAttrib3sNV_remap_index }, - { 23594, VertexAttrib3svNV_remap_index }, - { 28945, VertexAttrib4dNV_remap_index }, - { 33203, VertexAttrib4dvNV_remap_index }, - { 4454, VertexAttrib4fNV_remap_index }, - { 9386, VertexAttrib4fvNV_remap_index }, - { 26731, VertexAttrib4sNV_remap_index }, - { 1448, VertexAttrib4svNV_remap_index }, - { 4990, VertexAttrib4ubNV_remap_index }, - { 817, VertexAttrib4ubvNV_remap_index }, - { 21604, VertexAttribPointerNV_remap_index }, - { 2306, VertexAttribs1dvNV_remap_index }, - { 26137, VertexAttribs1fvNV_remap_index }, - { 33003, VertexAttribs1svNV_remap_index }, - { 10315, VertexAttribs2dvNV_remap_index }, - { 25274, VertexAttribs2fvNV_remap_index }, - { 17560, VertexAttribs2svNV_remap_index }, - { 5276, VertexAttribs3dvNV_remap_index }, - { 2186, VertexAttribs3fvNV_remap_index }, - { 29922, VertexAttribs3svNV_remap_index }, - { 26821, VertexAttribs4dvNV_remap_index }, - { 5348, VertexAttribs4fvNV_remap_index }, - { 32790, VertexAttribs4svNV_remap_index }, - { 29670, VertexAttribs4ubvNV_remap_index }, - { 26923, GetTexBumpParameterfvATI_remap_index }, - { 33044, GetTexBumpParameterivATI_remap_index }, - { 18542, TexBumpParameterfvATI_remap_index }, - { 20556, TexBumpParameterivATI_remap_index }, - { 15589, AlphaFragmentOp1ATI_remap_index }, - { 25555, AlphaFragmentOp2ATI_remap_index }, - { 24628, AlphaFragmentOp3ATI_remap_index }, - { 29849, BeginFragmentShaderATI_remap_index }, - { 31217, BindFragmentShaderATI_remap_index }, - { 23723, ColorFragmentOp1ATI_remap_index }, - { 4332, ColorFragmentOp2ATI_remap_index }, - { 31519, ColorFragmentOp3ATI_remap_index }, - { 5514, DeleteFragmentShaderATI_remap_index }, - { 33227, EndFragmentShaderATI_remap_index }, - { 32473, GenFragmentShadersATI_remap_index }, - { 25428, PassTexCoordATI_remap_index }, - { 6930, SampleMapATI_remap_index }, - { 27034, SetFragmentShaderConstantATI_remap_index }, - { 402, PointParameteriNV_remap_index }, - { 14184, PointParameterivNV_remap_index }, - { 28784, ActiveStencilFaceEXT_remap_index }, - { 27480, BindVertexArrayAPPLE_remap_index }, - { 2776, DeleteVertexArraysAPPLE_remap_index }, - { 18001, GenVertexArraysAPPLE_remap_index }, - { 23369, IsVertexArrayAPPLE_remap_index }, - { 858, GetProgramNamedParameterdvNV_remap_index }, - { 3601, GetProgramNamedParameterfvNV_remap_index }, - { 26954, ProgramNamedParameter4dNV_remap_index }, - { 14543, ProgramNamedParameter4dvNV_remap_index }, - { 8869, ProgramNamedParameter4fNV_remap_index }, - { 11740, ProgramNamedParameter4fvNV_remap_index }, - { 16899, PrimitiveRestartIndexNV_remap_index }, - { 30707, PrimitiveRestartNV_remap_index }, - { 24299, DepthBoundsEXT_remap_index }, - { 1198, BlendEquationSeparateEXT_remap_index }, - { 14744, BindFramebufferEXT_remap_index }, - { 25648, BindRenderbufferEXT_remap_index }, - { 9633, CheckFramebufferStatusEXT_remap_index }, - { 22620, DeleteFramebuffersEXT_remap_index }, - { 31776, DeleteRenderbuffersEXT_remap_index }, - { 13531, FramebufferRenderbufferEXT_remap_index }, - { 13720, FramebufferTexture1DEXT_remap_index }, - { 11534, FramebufferTexture2DEXT_remap_index }, - { 11154, FramebufferTexture3DEXT_remap_index }, - { 23235, GenFramebuffersEXT_remap_index }, - { 17425, GenRenderbuffersEXT_remap_index }, - { 6666, GenerateMipmapEXT_remap_index }, - { 21697, GetFramebufferAttachmentParameterivEXT_remap_index }, - { 32379, GetRenderbufferParameterivEXT_remap_index }, - { 20436, IsFramebufferEXT_remap_index }, - { 33126, IsRenderbufferEXT_remap_index }, - { 8144, RenderbufferStorageEXT_remap_index }, - { 734, BlitFramebufferEXT_remap_index }, - { 14329, BufferParameteriAPPLE_remap_index }, - { 19288, FlushMappedBufferRangeAPPLE_remap_index }, - { 1854, BindFragDataLocationEXT_remap_index }, - { 24412, GetFragDataLocationEXT_remap_index }, - { 10593, GetUniformuivEXT_remap_index }, - { 2972, GetVertexAttribIivEXT_remap_index }, - { 27991, GetVertexAttribIuivEXT_remap_index }, - { 12020, Uniform1uiEXT_remap_index }, - { 27905, Uniform1uivEXT_remap_index }, - { 22218, Uniform2uiEXT_remap_index }, - { 4296, Uniform2uivEXT_remap_index }, - { 29224, Uniform3uiEXT_remap_index }, - { 14690, Uniform3uivEXT_remap_index }, - { 3525, Uniform4uiEXT_remap_index }, - { 8645, Uniform4uivEXT_remap_index }, - { 18389, VertexAttribI1iEXT_remap_index }, - { 1004, VertexAttribI1ivEXT_remap_index }, - { 2555, VertexAttribI1uiEXT_remap_index }, - { 12801, VertexAttribI1uivEXT_remap_index }, - { 81, VertexAttribI2iEXT_remap_index }, - { 23835, VertexAttribI2ivEXT_remap_index }, - { 5302, VertexAttribI2uiEXT_remap_index }, - { 4715, VertexAttribI2uivEXT_remap_index }, - { 26523, VertexAttribI3iEXT_remap_index }, - { 30519, VertexAttribI3ivEXT_remap_index }, - { 3379, VertexAttribI3uiEXT_remap_index }, - { 30415, VertexAttribI3uivEXT_remap_index }, - { 21948, VertexAttribI4bvEXT_remap_index }, - { 14622, VertexAttribI4iEXT_remap_index }, - { 32045, VertexAttribI4ivEXT_remap_index }, - { 13434, VertexAttribI4svEXT_remap_index }, - { 16484, VertexAttribI4ubvEXT_remap_index }, - { 16183, VertexAttribI4uiEXT_remap_index }, - { 5448, VertexAttribI4uivEXT_remap_index }, - { 11317, VertexAttribI4usvEXT_remap_index }, - { 18486, VertexAttribIPointerEXT_remap_index }, - { 3066, FramebufferTextureLayerEXT_remap_index }, - { 5172, ColorMaskIndexedEXT_remap_index }, - { 18903, DisableIndexedEXT_remap_index }, - { 26568, EnableIndexedEXT_remap_index }, - { 21652, GetBooleanIndexedvEXT_remap_index }, - { 10928, GetIntegerIndexedvEXT_remap_index }, - { 22696, IsEnabledIndexedEXT_remap_index }, - { 22596, ClearColorIiEXT_remap_index }, - { 3475, ClearColorIuiEXT_remap_index }, - { 9843, GetTexParameterIivEXT_remap_index }, - { 5895, GetTexParameterIuivEXT_remap_index }, - { 3022, TexParameterIivEXT_remap_index }, - { 26390, TexParameterIuivEXT_remap_index }, - { 4583, BeginConditionalRenderNV_remap_index }, - { 25378, EndConditionalRenderNV_remap_index }, - { 9280, BeginTransformFeedbackEXT_remap_index }, - { 18938, BindBufferBaseEXT_remap_index }, - { 18797, BindBufferOffsetEXT_remap_index }, - { 12247, BindBufferRangeEXT_remap_index }, - { 14244, EndTransformFeedbackEXT_remap_index }, - { 10791, GetTransformFeedbackVaryingEXT_remap_index }, - { 20741, TransformFeedbackVaryingsEXT_remap_index }, - { 29571, ProvokingVertexEXT_remap_index }, - { 10739, GetTexParameterPointervAPPLE_remap_index }, - { 5034, TextureRangeAPPLE_remap_index }, - { 11606, GetObjectParameterivAPPLE_remap_index }, - { 19863, ObjectPurgeableAPPLE_remap_index }, - { 5689, ObjectUnpurgeableAPPLE_remap_index }, - { 17247, ActiveProgramEXT_remap_index }, - { 17218, CreateShaderProgramEXT_remap_index }, - { 28569, UseShaderProgramEXT_remap_index }, - { 16463, TextureBarrierNV_remap_index }, - { 28810, StencilFuncSeparateATI_remap_index }, - { 18090, ProgramEnvParameters4fvEXT_remap_index }, - { 17112, ProgramLocalParameters4fvEXT_remap_index }, - { 14112, GetQueryObjecti64vEXT_remap_index }, - { 10341, GetQueryObjectui64vEXT_remap_index }, - { 23792, EGLImageTargetRenderbufferStorageOES_remap_index }, - { 12126, EGLImageTargetTexture2DOES_remap_index }, - { -1, -1 } -}; - -/* these functions are in the ABI, but have alternative names */ -static const struct gl_function_remap MESA_alt_functions[] = { - /* from GL_EXT_blend_color */ - { 2694, _gloffset_BlendColor }, - /* from GL_EXT_blend_minmax */ - { 11211, _gloffset_BlendEquation }, - /* from GL_EXT_color_subtable */ - { 17010, _gloffset_ColorSubTable }, - { 31708, _gloffset_CopyColorSubTable }, - /* from GL_EXT_convolution */ - { 296, _gloffset_ConvolutionFilter1D }, - { 2493, _gloffset_CopyConvolutionFilter1D }, - { 4097, _gloffset_GetConvolutionParameteriv }, - { 8493, _gloffset_ConvolutionFilter2D }, - { 8695, _gloffset_ConvolutionParameteriv }, - { 9155, _gloffset_ConvolutionParameterfv }, - { 20584, _gloffset_GetSeparableFilter }, - { 24067, _gloffset_SeparableFilter2D }, - { 24930, _gloffset_ConvolutionParameteri }, - { 25053, _gloffset_ConvolutionParameterf }, - { 26757, _gloffset_GetConvolutionParameterfv }, - { 27646, _gloffset_GetConvolutionFilter }, - { 30111, _gloffset_CopyConvolutionFilter2D }, - /* from GL_EXT_copy_texture */ - { 15103, _gloffset_CopyTexSubImage3D }, - { 16697, _gloffset_CopyTexImage2D }, - { 24538, _gloffset_CopyTexImage1D }, - { 27327, _gloffset_CopyTexSubImage2D }, - { 29749, _gloffset_CopyTexSubImage1D }, - /* from GL_EXT_draw_range_elements */ - { 9492, _gloffset_DrawRangeElements }, - /* from GL_EXT_histogram */ - { 895, _gloffset_Histogram }, - { 3561, _gloffset_ResetHistogram }, - { 9989, _gloffset_GetMinmax }, - { 15437, _gloffset_GetHistogramParameterfv }, - { 24463, _gloffset_GetMinmaxParameteriv }, - { 26647, _gloffset_ResetMinmax }, - { 27543, _gloffset_GetHistogramParameteriv }, - { 28744, _gloffset_GetHistogram }, - { 31333, _gloffset_Minmax }, - { 32873, _gloffset_GetMinmaxParameterfv }, - /* from GL_EXT_paletted_texture */ - { 8355, _gloffset_ColorTable }, - { 15283, _gloffset_GetColorTable }, - { 22982, _gloffset_GetColorTableParameterfv }, - { 25109, _gloffset_GetColorTableParameteriv }, - /* from GL_EXT_subtexture */ - { 7076, _gloffset_TexSubImage1D }, - { 10666, _gloffset_TexSubImage2D }, - /* from GL_EXT_texture3D */ - { 1813, _gloffset_TexImage3D }, - { 22751, _gloffset_TexSubImage3D }, - /* from GL_EXT_texture_object */ - { 3329, _gloffset_PrioritizeTextures }, - { 7525, _gloffset_AreTexturesResident }, - { 13638, _gloffset_GenTextures }, - { 15769, _gloffset_DeleteTextures }, - { 19569, _gloffset_IsTexture }, - { 29814, _gloffset_BindTexture }, - /* from GL_EXT_vertex_array */ - { 24239, _gloffset_ArrayElement }, - { 30921, _gloffset_GetPointerv }, - { 32500, _gloffset_DrawArrays }, - /* from GL_SGI_color_table */ - { 7643, _gloffset_ColorTableParameteriv }, - { 8355, _gloffset_ColorTable }, - { 15283, _gloffset_GetColorTable }, - { 15393, _gloffset_CopyColorTable }, - { 19430, _gloffset_ColorTableParameterfv }, - { 22982, _gloffset_GetColorTableParameterfv }, - { 25109, _gloffset_GetColorTableParameteriv }, - /* from GL_VERSION_1_3 */ - { 464, _gloffset_MultiTexCoord3sARB }, - { 696, _gloffset_ActiveTextureARB }, - { 4234, _gloffset_MultiTexCoord1fvARB }, - { 6142, _gloffset_MultiTexCoord3dARB }, - { 6187, _gloffset_MultiTexCoord2iARB }, - { 6311, _gloffset_MultiTexCoord2svARB }, - { 8311, _gloffset_MultiTexCoord2fARB }, - { 10371, _gloffset_MultiTexCoord3fvARB }, - { 10973, _gloffset_MultiTexCoord4sARB }, - { 11654, _gloffset_MultiTexCoord2dvARB }, - { 12069, _gloffset_MultiTexCoord1svARB }, - { 12480, _gloffset_MultiTexCoord3svARB }, - { 12541, _gloffset_MultiTexCoord4iARB }, - { 13342, _gloffset_MultiTexCoord3iARB }, - { 14141, _gloffset_MultiTexCoord1dARB }, - { 14358, _gloffset_MultiTexCoord3dvARB }, - { 15637, _gloffset_MultiTexCoord3ivARB }, - { 15682, _gloffset_MultiTexCoord2sARB }, - { 17067, _gloffset_MultiTexCoord4ivARB }, - { 19080, _gloffset_ClientActiveTextureARB }, - { 21380, _gloffset_MultiTexCoord2dARB }, - { 21817, _gloffset_MultiTexCoord4dvARB }, - { 22173, _gloffset_MultiTexCoord4fvARB }, - { 23123, _gloffset_MultiTexCoord3fARB }, - { 25693, _gloffset_MultiTexCoord4dARB }, - { 25959, _gloffset_MultiTexCoord1sARB }, - { 26163, _gloffset_MultiTexCoord1dvARB }, - { 27171, _gloffset_MultiTexCoord1ivARB }, - { 27264, _gloffset_MultiTexCoord2ivARB }, - { 27603, _gloffset_MultiTexCoord1iARB }, - { 29019, _gloffset_MultiTexCoord4svARB }, - { 29613, _gloffset_MultiTexCoord1fARB }, - { 29876, _gloffset_MultiTexCoord4fARB }, - { 32334, _gloffset_MultiTexCoord2fvARB }, - { -1, -1 } -}; - -#endif /* need_MESA_remap_table */ - -#if defined(need_GL_3DFX_tbuffer) -static const struct gl_function_remap GL_3DFX_tbuffer_functions[] = { - { 9213, -1 }, /* TbufferMask3DFX */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_APPLE_flush_buffer_range) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_APPLE_flush_buffer_range_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_APPLE_object_purgeable) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_APPLE_object_purgeable_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_APPLE_texture_range) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_APPLE_texture_range_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_APPLE_vertex_array_object) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_APPLE_vertex_array_object_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_ES2_compatibility) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_ES2_compatibility_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_color_buffer_float) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_color_buffer_float_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_copy_buffer) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_copy_buffer_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_draw_buffers) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_draw_buffers_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_draw_buffers_blend) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_draw_buffers_blend_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_draw_elements_base_vertex) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_draw_elements_base_vertex_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_draw_instanced) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_draw_instanced_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_framebuffer_object) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_framebuffer_object_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_geometry_shader4) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_geometry_shader4_functions[] = { - { 12444, -1 }, /* FramebufferTextureLayer */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_instanced_arrays) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_instanced_arrays_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_map_buffer_range) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_map_buffer_range_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_matrix_palette) -static const struct gl_function_remap GL_ARB_matrix_palette_functions[] = { - { 3812, -1 }, /* MatrixIndexusvARB */ - { 13163, -1 }, /* MatrixIndexuivARB */ - { 14513, -1 }, /* MatrixIndexPointerARB */ - { 19818, -1 }, /* CurrentPaletteMatrixARB */ - { 22867, -1 }, /* MatrixIndexubvARB */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_multisample) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_multisample_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_occlusion_query) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_occlusion_query_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_point_parameters) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_point_parameters_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_provoking_vertex) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_provoking_vertex_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_shader_objects) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_shader_objects_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_sync) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_sync_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_texture_compression) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_texture_compression_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_transform_feedback2) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_transform_feedback2_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_transpose_matrix) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_transpose_matrix_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_vertex_array_object) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_vertex_array_object_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_vertex_blend) -static const struct gl_function_remap GL_ARB_vertex_blend_functions[] = { - { 2435, -1 }, /* WeightubvARB */ - { 6554, -1 }, /* WeightivARB */ - { 11076, -1 }, /* WeightPointerARB */ - { 13898, -1 }, /* WeightfvARB */ - { 17586, -1 }, /* WeightbvARB */ - { 21048, -1 }, /* WeightusvARB */ - { 23993, -1 }, /* VertexBlendARB */ - { 29697, -1 }, /* WeightsvARB */ - { 31758, -1 }, /* WeightdvARB */ - { 32534, -1 }, /* WeightuivARB */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_vertex_buffer_object) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_vertex_buffer_object_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_vertex_program) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_vertex_program_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_vertex_shader) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_vertex_shader_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ARB_window_pos) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ARB_window_pos_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ATI_blend_equation_separate) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ATI_blend_equation_separate_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ATI_draw_buffers) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ATI_draw_buffers_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ATI_envmap_bumpmap) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ATI_envmap_bumpmap_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ATI_fragment_shader) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ATI_fragment_shader_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_ATI_separate_stencil) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_ATI_separate_stencil_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_blend_color) -static const struct gl_function_remap GL_EXT_blend_color_functions[] = { - { 2694, _gloffset_BlendColor }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_blend_equation_separate) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_blend_equation_separate_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_blend_func_separate) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_blend_func_separate_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_blend_minmax) -static const struct gl_function_remap GL_EXT_blend_minmax_functions[] = { - { 11211, _gloffset_BlendEquation }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_color_subtable) -static const struct gl_function_remap GL_EXT_color_subtable_functions[] = { - { 17010, _gloffset_ColorSubTable }, - { 31708, _gloffset_CopyColorSubTable }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_compiled_vertex_array) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_compiled_vertex_array_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_convolution) -static const struct gl_function_remap GL_EXT_convolution_functions[] = { - { 296, _gloffset_ConvolutionFilter1D }, - { 2493, _gloffset_CopyConvolutionFilter1D }, - { 4097, _gloffset_GetConvolutionParameteriv }, - { 8493, _gloffset_ConvolutionFilter2D }, - { 8695, _gloffset_ConvolutionParameteriv }, - { 9155, _gloffset_ConvolutionParameterfv }, - { 20584, _gloffset_GetSeparableFilter }, - { 24067, _gloffset_SeparableFilter2D }, - { 24930, _gloffset_ConvolutionParameteri }, - { 25053, _gloffset_ConvolutionParameterf }, - { 26757, _gloffset_GetConvolutionParameterfv }, - { 27646, _gloffset_GetConvolutionFilter }, - { 30111, _gloffset_CopyConvolutionFilter2D }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_coordinate_frame) -static const struct gl_function_remap GL_EXT_coordinate_frame_functions[] = { - { 10510, -1 }, /* TangentPointerEXT */ - { 12599, -1 }, /* Binormal3ivEXT */ - { 13295, -1 }, /* Tangent3sEXT */ - { 14578, -1 }, /* Tangent3fvEXT */ - { 18778, -1 }, /* Tangent3dvEXT */ - { 19516, -1 }, /* Binormal3bvEXT */ - { 20637, -1 }, /* Binormal3dEXT */ - { 22799, -1 }, /* Tangent3fEXT */ - { 25002, -1 }, /* Binormal3sEXT */ - { 25470, -1 }, /* Tangent3ivEXT */ - { 25489, -1 }, /* Tangent3dEXT */ - { 26436, -1 }, /* Binormal3svEXT */ - { 27069, -1 }, /* Binormal3fEXT */ - { 27957, -1 }, /* Binormal3dvEXT */ - { 29276, -1 }, /* Tangent3iEXT */ - { 30396, -1 }, /* Tangent3bvEXT */ - { 30956, -1 }, /* Tangent3bEXT */ - { 31481, -1 }, /* Binormal3fvEXT */ - { 32233, -1 }, /* BinormalPointerEXT */ - { 32638, -1 }, /* Tangent3svEXT */ - { 33075, -1 }, /* Binormal3bEXT */ - { 33252, -1 }, /* Binormal3iEXT */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_copy_texture) -static const struct gl_function_remap GL_EXT_copy_texture_functions[] = { - { 15103, _gloffset_CopyTexSubImage3D }, - { 16697, _gloffset_CopyTexImage2D }, - { 24538, _gloffset_CopyTexImage1D }, - { 27327, _gloffset_CopyTexSubImage2D }, - { 29749, _gloffset_CopyTexSubImage1D }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_cull_vertex) -static const struct gl_function_remap GL_EXT_cull_vertex_functions[] = { - { 8844, -1 }, /* CullParameterdvEXT */ - { 11699, -1 }, /* CullParameterfvEXT */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_depth_bounds_test) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_depth_bounds_test_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_draw_buffers2) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_draw_buffers2_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_draw_instanced) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_draw_instanced_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_draw_range_elements) -static const struct gl_function_remap GL_EXT_draw_range_elements_functions[] = { - { 9492, _gloffset_DrawRangeElements }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_fog_coord) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_fog_coord_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_framebuffer_blit) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_framebuffer_blit_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_framebuffer_multisample) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_framebuffer_multisample_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_framebuffer_object) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_framebuffer_object_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_gpu_program_parameters) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_gpu_program_parameters_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_gpu_shader4) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_gpu_shader4_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_histogram) -static const struct gl_function_remap GL_EXT_histogram_functions[] = { - { 895, _gloffset_Histogram }, - { 3561, _gloffset_ResetHistogram }, - { 9989, _gloffset_GetMinmax }, - { 15437, _gloffset_GetHistogramParameterfv }, - { 24463, _gloffset_GetMinmaxParameteriv }, - { 26647, _gloffset_ResetMinmax }, - { 27543, _gloffset_GetHistogramParameteriv }, - { 28744, _gloffset_GetHistogram }, - { 31333, _gloffset_Minmax }, - { 32873, _gloffset_GetMinmaxParameterfv }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_index_func) -static const struct gl_function_remap GL_EXT_index_func_functions[] = { - { 11485, -1 }, /* IndexFuncEXT */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_index_material) -static const struct gl_function_remap GL_EXT_index_material_functions[] = { - { 21135, -1 }, /* IndexMaterialEXT */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_light_texture) -static const struct gl_function_remap GL_EXT_light_texture_functions[] = { - { 26456, -1 }, /* ApplyTextureEXT */ - { 26601, -1 }, /* TextureMaterialEXT */ - { 26626, -1 }, /* TextureLightEXT */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_multi_draw_arrays) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_multi_draw_arrays_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_multisample) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_multisample_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_paletted_texture) -static const struct gl_function_remap GL_EXT_paletted_texture_functions[] = { - { 8355, _gloffset_ColorTable }, - { 15283, _gloffset_GetColorTable }, - { 22982, _gloffset_GetColorTableParameterfv }, - { 25109, _gloffset_GetColorTableParameteriv }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_pixel_transform) -static const struct gl_function_remap GL_EXT_pixel_transform_functions[] = { - { 21782, -1 }, /* PixelTransformParameterfEXT */ - { 21862, -1 }, /* PixelTransformParameteriEXT */ - { 30671, -1 }, /* PixelTransformParameterfvEXT */ - { 32197, -1 }, /* PixelTransformParameterivEXT */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_point_parameters) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_point_parameters_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_polygon_offset) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_polygon_offset_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_provoking_vertex) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_provoking_vertex_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_secondary_color) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_secondary_color_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_separate_shader_objects) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_separate_shader_objects_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_stencil_two_side) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_stencil_two_side_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_subtexture) -static const struct gl_function_remap GL_EXT_subtexture_functions[] = { - { 7076, _gloffset_TexSubImage1D }, - { 10666, _gloffset_TexSubImage2D }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_texture3D) -static const struct gl_function_remap GL_EXT_texture3D_functions[] = { - { 1813, _gloffset_TexImage3D }, - { 22751, _gloffset_TexSubImage3D }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_texture_array) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_texture_array_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_texture_integer) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_texture_integer_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_texture_object) -static const struct gl_function_remap GL_EXT_texture_object_functions[] = { - { 3329, _gloffset_PrioritizeTextures }, - { 7525, _gloffset_AreTexturesResident }, - { 13638, _gloffset_GenTextures }, - { 15769, _gloffset_DeleteTextures }, - { 19569, _gloffset_IsTexture }, - { 29814, _gloffset_BindTexture }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_texture_perturb_normal) -static const struct gl_function_remap GL_EXT_texture_perturb_normal_functions[] = { - { 13848, -1 }, /* TextureNormalEXT */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_timer_query) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_timer_query_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_transform_feedback) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_transform_feedback_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_vertex_array) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_EXT_vertex_array_functions[] = { - { 24239, _gloffset_ArrayElement }, - { 30921, _gloffset_GetPointerv }, - { 32500, _gloffset_DrawArrays }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_EXT_vertex_weighting) -static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = { - { 19599, -1 }, /* VertexWeightfvEXT */ - { 27012, -1 }, /* VertexWeightfEXT */ - { 28713, -1 }, /* VertexWeightPointerEXT */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_HP_image_transform) -static const struct gl_function_remap GL_HP_image_transform_functions[] = { - { 2366, -1 }, /* GetImageTransformParameterfvHP */ - { 3778, -1 }, /* ImageTransformParameterfHP */ - { 10204, -1 }, /* ImageTransformParameterfvHP */ - { 11954, -1 }, /* ImageTransformParameteriHP */ - { 12334, -1 }, /* GetImageTransformParameterivHP */ - { 19663, -1 }, /* ImageTransformParameterivHP */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_IBM_multimode_draw_arrays) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_IBM_multimode_draw_arrays_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_IBM_vertex_array_lists) -static const struct gl_function_remap GL_IBM_vertex_array_lists_functions[] = { - { 4366, -1 }, /* SecondaryColorPointerListIBM */ - { 6008, -1 }, /* NormalPointerListIBM */ - { 7699, -1 }, /* FogCoordPointerListIBM */ - { 8006, -1 }, /* VertexPointerListIBM */ - { 11875, -1 }, /* ColorPointerListIBM */ - { 13402, -1 }, /* TexCoordPointerListIBM */ - { 13870, -1 }, /* IndexPointerListIBM */ - { 32816, -1 }, /* EdgeFlagPointerListIBM */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_INGR_blend_func_separate) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_INGR_blend_func_separate_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_INTEL_parallel_arrays) -static const struct gl_function_remap GL_INTEL_parallel_arrays_functions[] = { - { 12742, -1 }, /* VertexPointervINTEL */ - { 15530, -1 }, /* ColorPointervINTEL */ - { 30085, -1 }, /* NormalPointervINTEL */ - { 30603, -1 }, /* TexCoordPointervINTEL */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_MESA_resize_buffers) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_MESA_resize_buffers_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_MESA_shader_debug) -static const struct gl_function_remap GL_MESA_shader_debug_functions[] = { - { 1677, -1 }, /* GetDebugLogLengthMESA */ - { 3500, -1 }, /* ClearDebugLogMESA */ - { 4527, -1 }, /* GetDebugLogMESA */ - { 31114, -1 }, /* CreateDebugObjectMESA */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_MESA_window_pos) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_MESA_window_pos_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_NV_condtitional_render) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_NV_condtitional_render_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_NV_evaluators) -static const struct gl_function_remap GL_NV_evaluators_functions[] = { - { 6738, -1 }, /* GetMapAttribParameterivNV */ - { 8461, -1 }, /* MapControlPointsNV */ - { 8560, -1 }, /* MapParameterfvNV */ - { 10649, -1 }, /* EvalMapsNV */ - { 17184, -1 }, /* GetMapAttribParameterfvNV */ - { 17401, -1 }, /* MapParameterivNV */ - { 24853, -1 }, /* GetMapParameterivNV */ - { 25351, -1 }, /* GetMapParameterfvNV */ - { 29400, -1 }, /* GetMapControlPointsNV */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_NV_fence) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_NV_fence_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_NV_fragment_program) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_NV_fragment_program_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_NV_point_sprite) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_NV_point_sprite_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_NV_primitive_restart) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_NV_primitive_restart_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_NV_register_combiners) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_NV_register_combiners_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_NV_register_combiners2) -static const struct gl_function_remap GL_NV_register_combiners2_functions[] = { - { 15922, -1 }, /* CombinerStageParameterfvNV */ - { 16318, -1 }, /* GetCombinerStageParameterfvNV */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_NV_texture_barrier) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_NV_texture_barrier_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_NV_vertex_array_range) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_NV_vertex_array_range_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_NV_vertex_program) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_NV_vertex_program_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_OES_EGL_image) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_OES_EGL_image_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_PGI_misc_hints) -static const struct gl_function_remap GL_PGI_misc_hints_functions[] = { - { 8681, -1 }, /* HintPGI */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIS_detail_texture) -static const struct gl_function_remap GL_SGIS_detail_texture_functions[] = { - { 16291, -1 }, /* GetDetailTexFuncSGIS */ - { 16642, -1 }, /* DetailTexFuncSGIS */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIS_fog_function) -static const struct gl_function_remap GL_SGIS_fog_function_functions[] = { - { 27309, -1 }, /* FogFuncSGIS */ - { 28062, -1 }, /* GetFogFuncSGIS */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIS_multisample) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_SGIS_multisample_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIS_pixel_texture) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_SGIS_pixel_texture_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIS_point_parameters) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_SGIS_point_parameters_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIS_sharpen_texture) -static const struct gl_function_remap GL_SGIS_sharpen_texture_functions[] = { - { 6799, -1 }, /* GetSharpenTexFuncSGIS */ - { 22147, -1 }, /* SharpenTexFuncSGIS */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIS_texture4D) -static const struct gl_function_remap GL_SGIS_texture4D_functions[] = { - { 1049, -1 }, /* TexImage4DSGIS */ - { 15838, -1 }, /* TexSubImage4DSGIS */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIS_texture_color_mask) -static const struct gl_function_remap GL_SGIS_texture_color_mask_functions[] = { - { 15236, -1 }, /* TextureColorMaskSGIS */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIS_texture_filter4) -static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = { - { 6976, -1 }, /* GetTexFilterFuncSGIS */ - { 16437, -1 }, /* TexFilterFuncSGIS */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIX_async) -static const struct gl_function_remap GL_SGIX_async_functions[] = { - { 3426, -1 }, /* AsyncMarkerSGIX */ - { 4506, -1 }, /* FinishAsyncSGIX */ - { 5495, -1 }, /* PollAsyncSGIX */ - { 22328, -1 }, /* DeleteAsyncMarkersSGIX */ - { 22383, -1 }, /* IsAsyncMarkerSGIX */ - { 32613, -1 }, /* GenAsyncMarkersSGIX */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIX_flush_raster) -static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = { - { 7353, -1 }, /* FlushRasterSGIX */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIX_fragment_lighting) -static const struct gl_function_remap GL_SGIX_fragment_lighting_functions[] = { - { 2664, -1 }, /* FragmentMaterialfvSGIX */ - { 5399, -1 }, /* FragmentLightiSGIX */ - { 8073, -1 }, /* FragmentMaterialfSGIX */ - { 8234, -1 }, /* GetFragmentLightivSGIX */ - { 9107, -1 }, /* FragmentLightModeliSGIX */ - { 10712, -1 }, /* FragmentLightivSGIX */ - { 11019, -1 }, /* GetFragmentMaterialivSGIX */ - { 16231, -1 }, /* GetFragmentMaterialfvSGIX */ - { 19486, -1 }, /* FragmentLightModelfSGIX */ - { 19786, -1 }, /* FragmentColorMaterialSGIX */ - { 20203, -1 }, /* FragmentMaterialiSGIX */ - { 21463, -1 }, /* LightEnviSGIX */ - { 23074, -1 }, /* FragmentLightModelfvSGIX */ - { 23409, -1 }, /* FragmentLightfvSGIX */ - { 28446, -1 }, /* FragmentLightModelivSGIX */ - { 28595, -1 }, /* FragmentLightfSGIX */ - { 31451, -1 }, /* GetFragmentLightfvSGIX */ - { 33096, -1 }, /* FragmentMaterialivSGIX */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIX_framezoom) -static const struct gl_function_remap GL_SGIX_framezoom_functions[] = { - { 22406, -1 }, /* FrameZoomSGIX */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIX_igloo_interface) -static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = { - { 28903, -1 }, /* IglooInterfaceSGIX */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIX_instruments) -static const struct gl_function_remap GL_SGIX_instruments_functions[] = { - { 2844, -1 }, /* ReadInstrumentsSGIX */ - { 6572, -1 }, /* PollInstrumentsSGIX */ - { 10570, -1 }, /* GetInstrumentsSGIX */ - { 13000, -1 }, /* StartInstrumentsSGIX */ - { 15956, -1 }, /* StopInstrumentsSGIX */ - { 17823, -1 }, /* InstrumentsBufferSGIX */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIX_list_priority) -static const struct gl_function_remap GL_SGIX_list_priority_functions[] = { - { 1280, -1 }, /* ListParameterfSGIX */ - { 3128, -1 }, /* GetListParameterfvSGIX */ - { 17714, -1 }, /* ListParameteriSGIX */ - { 18728, -1 }, /* ListParameterfvSGIX */ - { 20869, -1 }, /* ListParameterivSGIX */ - { 32657, -1 }, /* GetListParameterivSGIX */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIX_pixel_texture) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_SGIX_pixel_texture_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIX_polynomial_ffd) -static const struct gl_function_remap GL_SGIX_polynomial_ffd_functions[] = { - { 3724, -1 }, /* LoadIdentityDeformationMapSGIX */ - { 12208, -1 }, /* DeformationMap3dSGIX */ - { 16056, -1 }, /* DeformSGIX */ - { 24351, -1 }, /* DeformationMap3fSGIX */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIX_reference_plane) -static const struct gl_function_remap GL_SGIX_reference_plane_functions[] = { - { 14787, -1 }, /* ReferencePlaneSGIX */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIX_sprite) -static const struct gl_function_remap GL_SGIX_sprite_functions[] = { - { 9605, -1 }, /* SpriteParameterfvSGIX */ - { 20658, -1 }, /* SpriteParameteriSGIX */ - { 26681, -1 }, /* SpriteParameterfSGIX */ - { 29543, -1 }, /* SpriteParameterivSGIX */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGIX_tag_sample_buffer) -static const struct gl_function_remap GL_SGIX_tag_sample_buffer_functions[] = { - { 20717, -1 }, /* TagSampleBufferSGIX */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SGI_color_table) -static const struct gl_function_remap GL_SGI_color_table_functions[] = { - { 7643, _gloffset_ColorTableParameteriv }, - { 8355, _gloffset_ColorTable }, - { 15283, _gloffset_GetColorTable }, - { 15393, _gloffset_CopyColorTable }, - { 19430, _gloffset_ColorTableParameterfv }, - { 22982, _gloffset_GetColorTableParameterfv }, - { 25109, _gloffset_GetColorTableParameteriv }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_SUNX_constant_data) -static const struct gl_function_remap GL_SUNX_constant_data_functions[] = { - { 31429, -1 }, /* FinishTextureSUNX */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SUN_global_alpha) -static const struct gl_function_remap GL_SUN_global_alpha_functions[] = { - { 3447, -1 }, /* GlobalAlphaFactorubSUN */ - { 4805, -1 }, /* GlobalAlphaFactoriSUN */ - { 6597, -1 }, /* GlobalAlphaFactordSUN */ - { 9689, -1 }, /* GlobalAlphaFactoruiSUN */ - { 10161, -1 }, /* GlobalAlphaFactorbSUN */ - { 13315, -1 }, /* GlobalAlphaFactorfSUN */ - { 13479, -1 }, /* GlobalAlphaFactorusSUN */ - { 22669, -1 }, /* GlobalAlphaFactorsSUN */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SUN_mesh_array) -static const struct gl_function_remap GL_SUN_mesh_array_functions[] = { - { 29334, -1 }, /* DrawMeshArraysSUN */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SUN_triangle_list) -static const struct gl_function_remap GL_SUN_triangle_list_functions[] = { - { 4480, -1 }, /* ReplacementCodeubSUN */ - { 6356, -1 }, /* ReplacementCodeubvSUN */ - { 19151, -1 }, /* ReplacementCodeusvSUN */ - { 19339, -1 }, /* ReplacementCodePointerSUN */ - { 21527, -1 }, /* ReplacementCodeuiSUN */ - { 22357, -1 }, /* ReplacementCodeusSUN */ - { 30000, -1 }, /* ReplacementCodeuivSUN */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_SUN_vertex) -static const struct gl_function_remap GL_SUN_vertex_functions[] = { - { 1154, -1 }, /* ReplacementCodeuiColor3fVertex3fvSUN */ - { 1352, -1 }, /* TexCoord4fColor4fNormal3fVertex4fvSUN */ - { 1578, -1 }, /* TexCoord2fColor4ubVertex3fvSUN */ - { 1908, -1 }, /* ReplacementCodeuiVertex3fvSUN */ - { 2042, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fvSUN */ - { 2600, -1 }, /* ReplacementCodeuiNormal3fVertex3fSUN */ - { 2913, -1 }, /* Color4ubVertex3fvSUN */ - { 4639, -1 }, /* Color4ubVertex3fSUN */ - { 4762, -1 }, /* TexCoord2fVertex3fSUN */ - { 5106, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */ - { 5599, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */ - { 6251, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */ - { 7031, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */ - { 7390, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */ - { 8102, -1 }, /* TexCoord2fNormal3fVertex3fSUN */ - { 8906, -1 }, /* Color3fVertex3fSUN */ - { 10097, -1 }, /* Color3fVertex3fvSUN */ - { 10535, -1 }, /* Color4fNormal3fVertex3fvSUN */ - { 11364, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */ - { 12863, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */ - { 14403, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */ - { 14929, -1 }, /* TexCoord2fColor3fVertex3fSUN */ - { 15981, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */ - { 16396, -1 }, /* Color4ubVertex2fvSUN */ - { 16667, -1 }, /* Normal3fVertex3fSUN */ - { 17764, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */ - { 18125, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */ - { 18980, -1 }, /* TexCoord2fVertex3fvSUN */ - { 19756, -1 }, /* Color4ubVertex2fSUN */ - { 19994, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */ - { 21993, -1 }, /* TexCoord2fColor4ubVertex3fSUN */ - { 22425, -1 }, /* Normal3fVertex3fvSUN */ - { 22891, -1 }, /* Color4fNormal3fVertex3fSUN */ - { 23900, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */ - { 26002, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */ - { 27425, -1 }, /* TexCoord4fVertex4fSUN */ - { 27851, -1 }, /* TexCoord2fColor3fVertex3fvSUN */ - { 28290, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */ - { 28417, -1 }, /* TexCoord4fVertex4fvSUN */ - { 29151, -1 }, /* ReplacementCodeuiVertex3fSUN */ - { -1, -1 } -}; -#endif - -#if defined(need_GL_VERSION_1_3) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_VERSION_1_3_functions[] = { - { 464, _gloffset_MultiTexCoord3sARB }, - { 696, _gloffset_ActiveTextureARB }, - { 4234, _gloffset_MultiTexCoord1fvARB }, - { 6142, _gloffset_MultiTexCoord3dARB }, - { 6187, _gloffset_MultiTexCoord2iARB }, - { 6311, _gloffset_MultiTexCoord2svARB }, - { 8311, _gloffset_MultiTexCoord2fARB }, - { 10371, _gloffset_MultiTexCoord3fvARB }, - { 10973, _gloffset_MultiTexCoord4sARB }, - { 11654, _gloffset_MultiTexCoord2dvARB }, - { 12069, _gloffset_MultiTexCoord1svARB }, - { 12480, _gloffset_MultiTexCoord3svARB }, - { 12541, _gloffset_MultiTexCoord4iARB }, - { 13342, _gloffset_MultiTexCoord3iARB }, - { 14141, _gloffset_MultiTexCoord1dARB }, - { 14358, _gloffset_MultiTexCoord3dvARB }, - { 15637, _gloffset_MultiTexCoord3ivARB }, - { 15682, _gloffset_MultiTexCoord2sARB }, - { 17067, _gloffset_MultiTexCoord4ivARB }, - { 19080, _gloffset_ClientActiveTextureARB }, - { 21380, _gloffset_MultiTexCoord2dARB }, - { 21817, _gloffset_MultiTexCoord4dvARB }, - { 22173, _gloffset_MultiTexCoord4fvARB }, - { 23123, _gloffset_MultiTexCoord3fARB }, - { 25693, _gloffset_MultiTexCoord4dARB }, - { 25959, _gloffset_MultiTexCoord1sARB }, - { 26163, _gloffset_MultiTexCoord1dvARB }, - { 27171, _gloffset_MultiTexCoord1ivARB }, - { 27264, _gloffset_MultiTexCoord2ivARB }, - { 27603, _gloffset_MultiTexCoord1iARB }, - { 29019, _gloffset_MultiTexCoord4svARB }, - { 29613, _gloffset_MultiTexCoord1fARB }, - { 29876, _gloffset_MultiTexCoord4fARB }, - { 32334, _gloffset_MultiTexCoord2fvARB }, - { -1, -1 } -}; -#endif - -#if defined(need_GL_VERSION_1_4) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_VERSION_1_4_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_VERSION_1_5) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_VERSION_1_5_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_VERSION_2_0) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_VERSION_2_0_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_VERSION_2_1) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_VERSION_2_1_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_VERSION_3_0) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_VERSION_3_0_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_VERSION_3_1) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_VERSION_3_1_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_VERSION_3_2) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_VERSION_3_2_functions[] = { - { -1, -1 } -}; -#endif - -#if defined(need_GL_VERSION_3_3) -/* functions defined in MESA_remap_table_functions are excluded */ -static const struct gl_function_remap GL_VERSION_3_3_functions[] = { - { -1, -1 } -}; -#endif - +/* DO NOT EDIT - This file generated automatically by remap_helper.py (from Mesa) script */
+
+/*
+ * Copyright (C) 2009 Chia-I Wu <olv@0xlab.org>
+ * All Rights Reserved.
+ *
+ * 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, sub license,
+ * 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 (including the next
+ * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL
+ * Chia-I Wu,
+ * AND/OR THEIR SUPPLIERS 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.
+ */
+
+#include "main/dispatch.h"
+#include "main/remap.h"
+
+/* this is internal to remap.c */
+#ifdef need_MESA_remap_table
+
+static const char _mesa_function_pool[] =
+ /* _mesa_function_pool[0]: MapGrid1d (offset 224) */
+ "idd\0"
+ "glMapGrid1d\0"
+ "\0"
+ /* _mesa_function_pool[17]: UniformMatrix3fvARB (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix3fv\0"
+ "glUniformMatrix3fvARB\0"
+ "\0"
+ /* _mesa_function_pool[64]: MapGrid1f (offset 225) */
+ "iff\0"
+ "glMapGrid1f\0"
+ "\0"
+ /* _mesa_function_pool[81]: VertexAttribI2iEXT (will be remapped) */
+ "iii\0"
+ "glVertexAttribI2iEXT\0"
+ "glVertexAttribI2i\0"
+ "\0"
+ /* _mesa_function_pool[125]: RasterPos4i (offset 82) */
+ "iiii\0"
+ "glRasterPos4i\0"
+ "\0"
+ /* _mesa_function_pool[145]: RasterPos4d (offset 78) */
+ "dddd\0"
+ "glRasterPos4d\0"
+ "\0"
+ /* _mesa_function_pool[165]: NewList (dynamic) */
+ "ii\0"
+ "glNewList\0"
+ "\0"
+ /* _mesa_function_pool[179]: RasterPos4f (offset 80) */
+ "ffff\0"
+ "glRasterPos4f\0"
+ "\0"
+ /* _mesa_function_pool[199]: LoadIdentity (offset 290) */
+ "\0"
+ "glLoadIdentity\0"
+ "\0"
+ /* _mesa_function_pool[216]: SampleCoverageARB (will be remapped) */
+ "fi\0"
+ "glSampleCoverage\0"
+ "glSampleCoverageARB\0"
+ "\0"
+ /* _mesa_function_pool[257]: ConvolutionFilter1D (offset 348) */
+ "iiiiip\0"
+ "glConvolutionFilter1D\0"
+ "glConvolutionFilter1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[312]: BeginQueryARB (will be remapped) */
+ "ii\0"
+ "glBeginQuery\0"
+ "glBeginQueryARB\0"
+ "\0"
+ /* _mesa_function_pool[345]: RasterPos3dv (offset 71) */
+ "p\0"
+ "glRasterPos3dv\0"
+ "\0"
+ /* _mesa_function_pool[363]: PointParameteriNV (will be remapped) */
+ "ii\0"
+ "glPointParameteri\0"
+ "glPointParameteriNV\0"
+ "\0"
+ /* _mesa_function_pool[405]: GetProgramiv (will be remapped) */
+ "iip\0"
+ "glGetProgramiv\0"
+ "\0"
+ /* _mesa_function_pool[425]: MultiTexCoord3sARB (offset 398) */
+ "iiii\0"
+ "glMultiTexCoord3s\0"
+ "glMultiTexCoord3sARB\0"
+ "\0"
+ /* _mesa_function_pool[470]: SecondaryColor3iEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3i\0"
+ "glSecondaryColor3iEXT\0"
+ "\0"
+ /* _mesa_function_pool[516]: WindowPos3fMESA (will be remapped) */
+ "fff\0"
+ "glWindowPos3f\0"
+ "glWindowPos3fARB\0"
+ "glWindowPos3fMESA\0"
+ "\0"
+ /* _mesa_function_pool[570]: TexCoord1iv (offset 99) */
+ "p\0"
+ "glTexCoord1iv\0"
+ "\0"
+ /* _mesa_function_pool[587]: TexCoord4sv (offset 125) */
+ "p\0"
+ "glTexCoord4sv\0"
+ "\0"
+ /* _mesa_function_pool[604]: RasterPos4s (offset 84) */
+ "iiii\0"
+ "glRasterPos4s\0"
+ "\0"
+ /* _mesa_function_pool[624]: PixelTexGenParameterfvSGIS (will be remapped) */
+ "ip\0"
+ "glPixelTexGenParameterfvSGIS\0"
+ "\0"
+ /* _mesa_function_pool[657]: ActiveTextureARB (offset 374) */
+ "i\0"
+ "glActiveTexture\0"
+ "glActiveTextureARB\0"
+ "\0"
+ /* _mesa_function_pool[695]: BlitFramebufferEXT (will be remapped) */
+ "iiiiiiiiii\0"
+ "glBlitFramebuffer\0"
+ "glBlitFramebufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[746]: TexCoord1f (offset 96) */
+ "f\0"
+ "glTexCoord1f\0"
+ "\0"
+ /* _mesa_function_pool[762]: TexCoord1d (offset 94) */
+ "d\0"
+ "glTexCoord1d\0"
+ "\0"
+ /* _mesa_function_pool[778]: VertexAttrib4ubvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4ubvNV\0"
+ "\0"
+ /* _mesa_function_pool[803]: TexCoord1i (offset 98) */
+ "i\0"
+ "glTexCoord1i\0"
+ "\0"
+ /* _mesa_function_pool[819]: GetProgramNamedParameterdvNV (will be remapped) */
+ "iipp\0"
+ "glGetProgramNamedParameterdvNV\0"
+ "\0"
+ /* _mesa_function_pool[856]: Histogram (offset 367) */
+ "iiii\0"
+ "glHistogram\0"
+ "glHistogramEXT\0"
+ "\0"
+ /* _mesa_function_pool[889]: TexCoord1s (offset 100) */
+ "i\0"
+ "glTexCoord1s\0"
+ "\0"
+ /* _mesa_function_pool[905]: GetMapfv (offset 267) */
+ "iip\0"
+ "glGetMapfv\0"
+ "\0"
+ /* _mesa_function_pool[921]: EvalCoord1f (offset 230) */
+ "f\0"
+ "glEvalCoord1f\0"
+ "\0"
+ /* _mesa_function_pool[938]: FramebufferTexture (will be remapped) */
+ "iiii\0"
+ "glFramebufferTexture\0"
+ "\0"
+ /* _mesa_function_pool[965]: VertexAttribI1ivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI1ivEXT\0"
+ "glVertexAttribI1iv\0"
+ "\0"
+ /* _mesa_function_pool[1010]: TexImage4DSGIS (dynamic) */
+ "iiiiiiiiiip\0"
+ "glTexImage4DSGIS\0"
+ "\0"
+ /* _mesa_function_pool[1040]: PolygonStipple (offset 175) */
+ "p\0"
+ "glPolygonStipple\0"
+ "\0"
+ /* _mesa_function_pool[1060]: WindowPos2dvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos2dv\0"
+ "glWindowPos2dvARB\0"
+ "glWindowPos2dvMESA\0"
+ "\0"
+ /* _mesa_function_pool[1115]: ReplacementCodeuiColor3fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glReplacementCodeuiColor3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[1159]: BlendEquationSeparateEXT (will be remapped) */
+ "ii\0"
+ "glBlendEquationSeparate\0"
+ "glBlendEquationSeparateEXT\0"
+ "glBlendEquationSeparateATI\0"
+ "\0"
+ /* _mesa_function_pool[1241]: ListParameterfSGIX (dynamic) */
+ "iif\0"
+ "glListParameterfSGIX\0"
+ "\0"
+ /* _mesa_function_pool[1267]: SecondaryColor3bEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3b\0"
+ "glSecondaryColor3bEXT\0"
+ "\0"
+ /* _mesa_function_pool[1313]: TexCoord4fColor4fNormal3fVertex4fvSUN (dynamic) */
+ "pppp\0"
+ "glTexCoord4fColor4fNormal3fVertex4fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[1359]: GetPixelMapfv (offset 271) */
+ "ip\0"
+ "glGetPixelMapfv\0"
+ "\0"
+ /* _mesa_function_pool[1379]: Color3uiv (offset 22) */
+ "p\0"
+ "glColor3uiv\0"
+ "\0"
+ /* _mesa_function_pool[1394]: IsEnabled (offset 286) */
+ "i\0"
+ "glIsEnabled\0"
+ "\0"
+ /* _mesa_function_pool[1409]: VertexAttrib4svNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4svNV\0"
+ "\0"
+ /* _mesa_function_pool[1433]: EvalCoord2fv (offset 235) */
+ "p\0"
+ "glEvalCoord2fv\0"
+ "\0"
+ /* _mesa_function_pool[1451]: GetBufferSubDataARB (will be remapped) */
+ "iiip\0"
+ "glGetBufferSubData\0"
+ "glGetBufferSubDataARB\0"
+ "\0"
+ /* _mesa_function_pool[1498]: BufferSubDataARB (will be remapped) */
+ "iiip\0"
+ "glBufferSubData\0"
+ "glBufferSubDataARB\0"
+ "\0"
+ /* _mesa_function_pool[1539]: TexCoord2fColor4ubVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glTexCoord2fColor4ubVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[1577]: AttachShader (will be remapped) */
+ "ii\0"
+ "glAttachShader\0"
+ "\0"
+ /* _mesa_function_pool[1596]: VertexAttrib2fARB (will be remapped) */
+ "iff\0"
+ "glVertexAttrib2f\0"
+ "glVertexAttrib2fARB\0"
+ "\0"
+ /* _mesa_function_pool[1638]: GetDebugLogLengthMESA (dynamic) */
+ "iii\0"
+ "glGetDebugLogLengthMESA\0"
+ "\0"
+ /* _mesa_function_pool[1667]: GetMapiv (offset 268) */
+ "iip\0"
+ "glGetMapiv\0"
+ "\0"
+ /* _mesa_function_pool[1683]: VertexAttrib3fARB (will be remapped) */
+ "ifff\0"
+ "glVertexAttrib3f\0"
+ "glVertexAttrib3fARB\0"
+ "\0"
+ /* _mesa_function_pool[1726]: Indexubv (offset 316) */
+ "p\0"
+ "glIndexubv\0"
+ "\0"
+ /* _mesa_function_pool[1740]: GetQueryivARB (will be remapped) */
+ "iip\0"
+ "glGetQueryiv\0"
+ "glGetQueryivARB\0"
+ "\0"
+ /* _mesa_function_pool[1774]: TexImage3D (offset 371) */
+ "iiiiiiiiip\0"
+ "glTexImage3D\0"
+ "glTexImage3DEXT\0"
+ "\0"
+ /* _mesa_function_pool[1815]: BindFragDataLocationEXT (will be remapped) */
+ "iip\0"
+ "glBindFragDataLocationEXT\0"
+ "glBindFragDataLocation\0"
+ "\0"
+ /* _mesa_function_pool[1869]: ReplacementCodeuiVertex3fvSUN (dynamic) */
+ "pp\0"
+ "glReplacementCodeuiVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[1905]: EdgeFlagPointer (offset 312) */
+ "ip\0"
+ "glEdgeFlagPointer\0"
+ "\0"
+ /* _mesa_function_pool[1927]: Color3ubv (offset 20) */
+ "p\0"
+ "glColor3ubv\0"
+ "\0"
+ /* _mesa_function_pool[1942]: GetQueryObjectivARB (will be remapped) */
+ "iip\0"
+ "glGetQueryObjectiv\0"
+ "glGetQueryObjectivARB\0"
+ "\0"
+ /* _mesa_function_pool[1988]: Vertex3dv (offset 135) */
+ "p\0"
+ "glVertex3dv\0"
+ "\0"
+ /* _mesa_function_pool[2003]: ReplacementCodeuiTexCoord2fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glReplacementCodeuiTexCoord2fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[2050]: CompressedTexSubImage2DARB (will be remapped) */
+ "iiiiiiiip\0"
+ "glCompressedTexSubImage2D\0"
+ "glCompressedTexSubImage2DARB\0"
+ "\0"
+ /* _mesa_function_pool[2116]: CombinerOutputNV (will be remapped) */
+ "iiiiiiiiii\0"
+ "glCombinerOutputNV\0"
+ "\0"
+ /* _mesa_function_pool[2147]: VertexAttribs3fvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs3fvNV\0"
+ "\0"
+ /* _mesa_function_pool[2173]: Uniform2fARB (will be remapped) */
+ "iff\0"
+ "glUniform2f\0"
+ "glUniform2fARB\0"
+ "\0"
+ /* _mesa_function_pool[2205]: LightModeliv (offset 166) */
+ "ip\0"
+ "glLightModeliv\0"
+ "\0"
+ /* _mesa_function_pool[2224]: VertexAttrib1svARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1sv\0"
+ "glVertexAttrib1svARB\0"
+ "\0"
+ /* _mesa_function_pool[2267]: VertexAttribs1dvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs1dvNV\0"
+ "\0"
+ /* _mesa_function_pool[2293]: Uniform2ivARB (will be remapped) */
+ "iip\0"
+ "glUniform2iv\0"
+ "glUniform2ivARB\0"
+ "\0"
+ /* _mesa_function_pool[2327]: GetImageTransformParameterfvHP (dynamic) */
+ "iip\0"
+ "glGetImageTransformParameterfvHP\0"
+ "\0"
+ /* _mesa_function_pool[2365]: Normal3bv (offset 53) */
+ "p\0"
+ "glNormal3bv\0"
+ "\0"
+ /* _mesa_function_pool[2380]: TexGeniv (offset 193) */
+ "iip\0"
+ "glTexGeniv\0"
+ "\0"
+ /* _mesa_function_pool[2396]: WeightubvARB (dynamic) */
+ "ip\0"
+ "glWeightubvARB\0"
+ "\0"
+ /* _mesa_function_pool[2415]: VertexAttrib1fvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1fvNV\0"
+ "\0"
+ /* _mesa_function_pool[2439]: Vertex3iv (offset 139) */
+ "p\0"
+ "glVertex3iv\0"
+ "\0"
+ /* _mesa_function_pool[2454]: CopyConvolutionFilter1D (offset 354) */
+ "iiiii\0"
+ "glCopyConvolutionFilter1D\0"
+ "glCopyConvolutionFilter1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[2516]: VertexAttribI1uiEXT (will be remapped) */
+ "ii\0"
+ "glVertexAttribI1uiEXT\0"
+ "glVertexAttribI1ui\0"
+ "\0"
+ /* _mesa_function_pool[2561]: ReplacementCodeuiNormal3fVertex3fSUN (dynamic) */
+ "iffffff\0"
+ "glReplacementCodeuiNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[2609]: DeleteSync (will be remapped) */
+ "i\0"
+ "glDeleteSync\0"
+ "\0"
+ /* _mesa_function_pool[2625]: FragmentMaterialfvSGIX (dynamic) */
+ "iip\0"
+ "glFragmentMaterialfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[2655]: BlendColor (offset 336) */
+ "ffff\0"
+ "glBlendColor\0"
+ "glBlendColorEXT\0"
+ "\0"
+ /* _mesa_function_pool[2690]: UniformMatrix4fvARB (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix4fv\0"
+ "glUniformMatrix4fvARB\0"
+ "\0"
+ /* _mesa_function_pool[2737]: DeleteVertexArraysAPPLE (will be remapped) */
+ "ip\0"
+ "glDeleteVertexArrays\0"
+ "glDeleteVertexArraysAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[2788]: TexBuffer (will be remapped) */
+ "iii\0"
+ "glTexBuffer\0"
+ "\0"
+ /* _mesa_function_pool[2805]: ReadInstrumentsSGIX (dynamic) */
+ "i\0"
+ "glReadInstrumentsSGIX\0"
+ "\0"
+ /* _mesa_function_pool[2830]: CallLists (offset 3) */
+ "iip\0"
+ "glCallLists\0"
+ "\0"
+ /* _mesa_function_pool[2847]: UniformMatrix2x4fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix2x4fv\0"
+ "\0"
+ /* _mesa_function_pool[2874]: Color4ubVertex3fvSUN (dynamic) */
+ "pp\0"
+ "glColor4ubVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[2901]: Normal3iv (offset 59) */
+ "p\0"
+ "glNormal3iv\0"
+ "\0"
+ /* _mesa_function_pool[2916]: PassThrough (offset 199) */
+ "f\0"
+ "glPassThrough\0"
+ "\0"
+ /* _mesa_function_pool[2933]: GetVertexAttribIivEXT (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribIivEXT\0"
+ "glGetVertexAttribIiv\0"
+ "\0"
+ /* _mesa_function_pool[2983]: TexParameterIivEXT (will be remapped) */
+ "iip\0"
+ "glTexParameterIivEXT\0"
+ "glTexParameterIiv\0"
+ "\0"
+ /* _mesa_function_pool[3027]: FramebufferTextureLayerEXT (will be remapped) */
+ "iiiii\0"
+ "glFramebufferTextureLayer\0"
+ "glFramebufferTextureLayerEXT\0"
+ "\0"
+ /* _mesa_function_pool[3089]: GetListParameterfvSGIX (dynamic) */
+ "iip\0"
+ "glGetListParameterfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[3119]: Viewport (offset 305) */
+ "iiii\0"
+ "glViewport\0"
+ "\0"
+ /* _mesa_function_pool[3136]: VertexAttrib4NusvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Nusv\0"
+ "glVertexAttrib4NusvARB\0"
+ "\0"
+ /* _mesa_function_pool[3183]: WindowPos4svMESA (will be remapped) */
+ "p\0"
+ "glWindowPos4svMESA\0"
+ "\0"
+ /* _mesa_function_pool[3205]: CreateProgramObjectARB (will be remapped) */
+ "\0"
+ "glCreateProgramObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[3232]: DeleteTransformFeedbacks (will be remapped) */
+ "ip\0"
+ "glDeleteTransformFeedbacks\0"
+ "\0"
+ /* _mesa_function_pool[3263]: UniformMatrix4x3fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix4x3fv\0"
+ "\0"
+ /* _mesa_function_pool[3290]: PrioritizeTextures (offset 331) */
+ "ipp\0"
+ "glPrioritizeTextures\0"
+ "glPrioritizeTexturesEXT\0"
+ "\0"
+ /* _mesa_function_pool[3340]: VertexAttribI3uiEXT (will be remapped) */
+ "iiii\0"
+ "glVertexAttribI3uiEXT\0"
+ "glVertexAttribI3ui\0"
+ "\0"
+ /* _mesa_function_pool[3387]: AsyncMarkerSGIX (dynamic) */
+ "i\0"
+ "glAsyncMarkerSGIX\0"
+ "\0"
+ /* _mesa_function_pool[3408]: GlobalAlphaFactorubSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactorubSUN\0"
+ "\0"
+ /* _mesa_function_pool[3436]: ClearColorIuiEXT (will be remapped) */
+ "iiii\0"
+ "glClearColorIuiEXT\0"
+ "\0"
+ /* _mesa_function_pool[3461]: ClearDebugLogMESA (dynamic) */
+ "iii\0"
+ "glClearDebugLogMESA\0"
+ "\0"
+ /* _mesa_function_pool[3486]: Uniform4uiEXT (will be remapped) */
+ "iiiii\0"
+ "glUniform4uiEXT\0"
+ "glUniform4ui\0"
+ "\0"
+ /* _mesa_function_pool[3522]: ResetHistogram (offset 369) */
+ "i\0"
+ "glResetHistogram\0"
+ "glResetHistogramEXT\0"
+ "\0"
+ /* _mesa_function_pool[3562]: GetProgramNamedParameterfvNV (will be remapped) */
+ "iipp\0"
+ "glGetProgramNamedParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[3599]: PointParameterfEXT (will be remapped) */
+ "if\0"
+ "glPointParameterf\0"
+ "glPointParameterfARB\0"
+ "glPointParameterfEXT\0"
+ "glPointParameterfSGIS\0"
+ "\0"
+ /* _mesa_function_pool[3685]: LoadIdentityDeformationMapSGIX (dynamic) */
+ "i\0"
+ "glLoadIdentityDeformationMapSGIX\0"
+ "\0"
+ /* _mesa_function_pool[3721]: GenFencesNV (will be remapped) */
+ "ip\0"
+ "glGenFencesNV\0"
+ "\0"
+ /* _mesa_function_pool[3739]: ImageTransformParameterfHP (dynamic) */
+ "iif\0"
+ "glImageTransformParameterfHP\0"
+ "\0"
+ /* _mesa_function_pool[3773]: MatrixIndexusvARB (dynamic) */
+ "ip\0"
+ "glMatrixIndexusvARB\0"
+ "\0"
+ /* _mesa_function_pool[3797]: DrawElementsBaseVertex (will be remapped) */
+ "iiipi\0"
+ "glDrawElementsBaseVertex\0"
+ "\0"
+ /* _mesa_function_pool[3829]: DisableVertexAttribArrayARB (will be remapped) */
+ "i\0"
+ "glDisableVertexAttribArray\0"
+ "glDisableVertexAttribArrayARB\0"
+ "\0"
+ /* _mesa_function_pool[3889]: TexCoord2sv (offset 109) */
+ "p\0"
+ "glTexCoord2sv\0"
+ "\0"
+ /* _mesa_function_pool[3906]: Vertex4dv (offset 143) */
+ "p\0"
+ "glVertex4dv\0"
+ "\0"
+ /* _mesa_function_pool[3921]: StencilMaskSeparate (will be remapped) */
+ "ii\0"
+ "glStencilMaskSeparate\0"
+ "\0"
+ /* _mesa_function_pool[3947]: ProgramLocalParameter4dARB (will be remapped) */
+ "iidddd\0"
+ "glProgramLocalParameter4dARB\0"
+ "\0"
+ /* _mesa_function_pool[3984]: CompressedTexImage3DARB (will be remapped) */
+ "iiiiiiiip\0"
+ "glCompressedTexImage3D\0"
+ "glCompressedTexImage3DARB\0"
+ "\0"
+ /* _mesa_function_pool[4044]: Color3sv (offset 18) */
+ "p\0"
+ "glColor3sv\0"
+ "\0"
+ /* _mesa_function_pool[4058]: GetConvolutionParameteriv (offset 358) */
+ "iip\0"
+ "glGetConvolutionParameteriv\0"
+ "glGetConvolutionParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[4122]: VertexAttrib1fARB (will be remapped) */
+ "if\0"
+ "glVertexAttrib1f\0"
+ "glVertexAttrib1fARB\0"
+ "\0"
+ /* _mesa_function_pool[4163]: Vertex2dv (offset 127) */
+ "p\0"
+ "glVertex2dv\0"
+ "\0"
+ /* _mesa_function_pool[4178]: TestFenceNV (will be remapped) */
+ "i\0"
+ "glTestFenceNV\0"
+ "\0"
+ /* _mesa_function_pool[4195]: GetVertexAttribIuivEXT (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribIuivEXT\0"
+ "glGetVertexAttribIuiv\0"
+ "\0"
+ /* _mesa_function_pool[4247]: MultiTexCoord1fvARB (offset 379) */
+ "ip\0"
+ "glMultiTexCoord1fv\0"
+ "glMultiTexCoord1fvARB\0"
+ "\0"
+ /* _mesa_function_pool[4292]: TexCoord3iv (offset 115) */
+ "p\0"
+ "glTexCoord3iv\0"
+ "\0"
+ /* _mesa_function_pool[4309]: Uniform2uivEXT (will be remapped) */
+ "iip\0"
+ "glUniform2uivEXT\0"
+ "glUniform2uiv\0"
+ "\0"
+ /* _mesa_function_pool[4345]: ColorFragmentOp2ATI (will be remapped) */
+ "iiiiiiiiii\0"
+ "glColorFragmentOp2ATI\0"
+ "\0"
+ /* _mesa_function_pool[4379]: SecondaryColorPointerListIBM (dynamic) */
+ "iiipi\0"
+ "glSecondaryColorPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[4417]: GetPixelTexGenParameterivSGIS (will be remapped) */
+ "ip\0"
+ "glGetPixelTexGenParameterivSGIS\0"
+ "\0"
+ /* _mesa_function_pool[4453]: Color3fv (offset 14) */
+ "p\0"
+ "glColor3fv\0"
+ "\0"
+ /* _mesa_function_pool[4467]: VertexAttrib4fNV (will be remapped) */
+ "iffff\0"
+ "glVertexAttrib4fNV\0"
+ "\0"
+ /* _mesa_function_pool[4493]: ReplacementCodeubSUN (dynamic) */
+ "i\0"
+ "glReplacementCodeubSUN\0"
+ "\0"
+ /* _mesa_function_pool[4519]: FinishAsyncSGIX (dynamic) */
+ "p\0"
+ "glFinishAsyncSGIX\0"
+ "\0"
+ /* _mesa_function_pool[4540]: GetDebugLogMESA (dynamic) */
+ "iiiipp\0"
+ "glGetDebugLogMESA\0"
+ "\0"
+ /* _mesa_function_pool[4566]: FogCoorddEXT (will be remapped) */
+ "d\0"
+ "glFogCoordd\0"
+ "glFogCoorddEXT\0"
+ "\0"
+ /* _mesa_function_pool[4596]: BeginConditionalRenderNV (will be remapped) */
+ "ii\0"
+ "glBeginConditionalRenderNV\0"
+ "glBeginConditionalRender\0"
+ "\0"
+ /* _mesa_function_pool[4652]: Color4ubVertex3fSUN (dynamic) */
+ "iiiifff\0"
+ "glColor4ubVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[4683]: FogCoordfEXT (will be remapped) */
+ "f\0"
+ "glFogCoordf\0"
+ "glFogCoordfEXT\0"
+ "\0"
+ /* _mesa_function_pool[4713]: PointSize (offset 173) */
+ "f\0"
+ "glPointSize\0"
+ "\0"
+ /* _mesa_function_pool[4728]: VertexAttribI2uivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI2uivEXT\0"
+ "glVertexAttribI2uiv\0"
+ "\0"
+ /* _mesa_function_pool[4775]: TexCoord2fVertex3fSUN (dynamic) */
+ "fffff\0"
+ "glTexCoord2fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[4806]: PopName (offset 200) */
+ "\0"
+ "glPopName\0"
+ "\0"
+ /* _mesa_function_pool[4818]: GlobalAlphaFactoriSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactoriSUN\0"
+ "\0"
+ /* _mesa_function_pool[4845]: VertexAttrib2dNV (will be remapped) */
+ "idd\0"
+ "glVertexAttrib2dNV\0"
+ "\0"
+ /* _mesa_function_pool[4869]: GetProgramInfoLog (will be remapped) */
+ "iipp\0"
+ "glGetProgramInfoLog\0"
+ "\0"
+ /* _mesa_function_pool[4895]: VertexAttrib4NbvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Nbv\0"
+ "glVertexAttrib4NbvARB\0"
+ "\0"
+ /* _mesa_function_pool[4940]: GetActiveAttribARB (will be remapped) */
+ "iiipppp\0"
+ "glGetActiveAttrib\0"
+ "glGetActiveAttribARB\0"
+ "\0"
+ /* _mesa_function_pool[4988]: Vertex4sv (offset 149) */
+ "p\0"
+ "glVertex4sv\0"
+ "\0"
+ /* _mesa_function_pool[5003]: VertexAttrib4ubNV (will be remapped) */
+ "iiiii\0"
+ "glVertexAttrib4ubNV\0"
+ "\0"
+ /* _mesa_function_pool[5030]: ClampColor (will be remapped) */
+ "ii\0"
+ "glClampColor\0"
+ "\0"
+ /* _mesa_function_pool[5047]: TextureRangeAPPLE (will be remapped) */
+ "iip\0"
+ "glTextureRangeAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[5072]: GetTexEnvfv (offset 276) */
+ "iip\0"
+ "glGetTexEnvfv\0"
+ "\0"
+ /* _mesa_function_pool[5091]: BindTransformFeedback (will be remapped) */
+ "ii\0"
+ "glBindTransformFeedback\0"
+ "\0"
+ /* _mesa_function_pool[5119]: TexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ "ffffffffffff\0"
+ "glTexCoord2fColor4fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[5172]: Indexub (offset 315) */
+ "i\0"
+ "glIndexub\0"
+ "\0"
+ /* _mesa_function_pool[5185]: TexEnvi (offset 186) */
+ "iii\0"
+ "glTexEnvi\0"
+ "\0"
+ /* _mesa_function_pool[5200]: GetClipPlane (offset 259) */
+ "ip\0"
+ "glGetClipPlane\0"
+ "\0"
+ /* _mesa_function_pool[5219]: CombinerParameterfvNV (will be remapped) */
+ "ip\0"
+ "glCombinerParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[5247]: VertexAttribs3dvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs3dvNV\0"
+ "\0"
+ /* _mesa_function_pool[5273]: VertexAttribI2uiEXT (will be remapped) */
+ "iii\0"
+ "glVertexAttribI2uiEXT\0"
+ "glVertexAttribI2ui\0"
+ "\0"
+ /* _mesa_function_pool[5319]: VertexAttribs4fvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs4fvNV\0"
+ "\0"
+ /* _mesa_function_pool[5345]: VertexArrayRangeNV (will be remapped) */
+ "ip\0"
+ "glVertexArrayRangeNV\0"
+ "\0"
+ /* _mesa_function_pool[5370]: FragmentLightiSGIX (dynamic) */
+ "iii\0"
+ "glFragmentLightiSGIX\0"
+ "\0"
+ /* _mesa_function_pool[5396]: PolygonOffsetEXT (will be remapped) */
+ "ff\0"
+ "glPolygonOffsetEXT\0"
+ "\0"
+ /* _mesa_function_pool[5419]: VertexAttribI4uivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI4uivEXT\0"
+ "glVertexAttribI4uiv\0"
+ "\0"
+ /* _mesa_function_pool[5466]: PollAsyncSGIX (dynamic) */
+ "p\0"
+ "glPollAsyncSGIX\0"
+ "\0"
+ /* _mesa_function_pool[5485]: DeleteFragmentShaderATI (will be remapped) */
+ "i\0"
+ "glDeleteFragmentShaderATI\0"
+ "\0"
+ /* _mesa_function_pool[5514]: Scaled (offset 301) */
+ "ddd\0"
+ "glScaled\0"
+ "\0"
+ /* _mesa_function_pool[5528]: ResumeTransformFeedback (will be remapped) */
+ "\0"
+ "glResumeTransformFeedback\0"
+ "\0"
+ /* _mesa_function_pool[5556]: Scalef (offset 302) */
+ "fff\0"
+ "glScalef\0"
+ "\0"
+ /* _mesa_function_pool[5570]: TexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glTexCoord2fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[5608]: MultTransposeMatrixdARB (will be remapped) */
+ "p\0"
+ "glMultTransposeMatrixd\0"
+ "glMultTransposeMatrixdARB\0"
+ "\0"
+ /* _mesa_function_pool[5660]: ColorMaskIndexedEXT (will be remapped) */
+ "iiiii\0"
+ "glColorMaskIndexedEXT\0"
+ "glColorMaski\0"
+ "\0"
+ /* _mesa_function_pool[5702]: ObjectUnpurgeableAPPLE (will be remapped) */
+ "iii\0"
+ "glObjectUnpurgeableAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[5732]: AlphaFunc (offset 240) */
+ "if\0"
+ "glAlphaFunc\0"
+ "\0"
+ /* _mesa_function_pool[5748]: WindowPos2svMESA (will be remapped) */
+ "p\0"
+ "glWindowPos2sv\0"
+ "glWindowPos2svARB\0"
+ "glWindowPos2svMESA\0"
+ "\0"
+ /* _mesa_function_pool[5803]: EdgeFlag (offset 41) */
+ "i\0"
+ "glEdgeFlag\0"
+ "\0"
+ /* _mesa_function_pool[5817]: TexCoord2iv (offset 107) */
+ "p\0"
+ "glTexCoord2iv\0"
+ "\0"
+ /* _mesa_function_pool[5834]: CompressedTexImage1DARB (will be remapped) */
+ "iiiiiip\0"
+ "glCompressedTexImage1D\0"
+ "glCompressedTexImage1DARB\0"
+ "\0"
+ /* _mesa_function_pool[5892]: Rotated (offset 299) */
+ "dddd\0"
+ "glRotated\0"
+ "\0"
+ /* _mesa_function_pool[5908]: GetTexParameterIuivEXT (will be remapped) */
+ "iip\0"
+ "glGetTexParameterIuivEXT\0"
+ "glGetTexParameterIuiv\0"
+ "\0"
+ /* _mesa_function_pool[5960]: VertexAttrib2sNV (will be remapped) */
+ "iii\0"
+ "glVertexAttrib2sNV\0"
+ "\0"
+ /* _mesa_function_pool[5984]: ReadPixels (offset 256) */
+ "iiiiiip\0"
+ "glReadPixels\0"
+ "\0"
+ /* _mesa_function_pool[6006]: EdgeFlagv (offset 42) */
+ "p\0"
+ "glEdgeFlagv\0"
+ "\0"
+ /* _mesa_function_pool[6021]: NormalPointerListIBM (dynamic) */
+ "iipi\0"
+ "glNormalPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[6050]: IndexPointerEXT (will be remapped) */
+ "iiip\0"
+ "glIndexPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[6074]: Color4iv (offset 32) */
+ "p\0"
+ "glColor4iv\0"
+ "\0"
+ /* _mesa_function_pool[6088]: TexParameterf (offset 178) */
+ "iif\0"
+ "glTexParameterf\0"
+ "\0"
+ /* _mesa_function_pool[6109]: TexParameteri (offset 180) */
+ "iii\0"
+ "glTexParameteri\0"
+ "\0"
+ /* _mesa_function_pool[6130]: NormalPointerEXT (will be remapped) */
+ "iiip\0"
+ "glNormalPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[6155]: MultiTexCoord3dARB (offset 392) */
+ "iddd\0"
+ "glMultiTexCoord3d\0"
+ "glMultiTexCoord3dARB\0"
+ "\0"
+ /* _mesa_function_pool[6200]: MultiTexCoord2iARB (offset 388) */
+ "iii\0"
+ "glMultiTexCoord2i\0"
+ "glMultiTexCoord2iARB\0"
+ "\0"
+ /* _mesa_function_pool[6244]: DrawPixels (offset 257) */
+ "iiiip\0"
+ "glDrawPixels\0"
+ "\0"
+ /* _mesa_function_pool[6264]: ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (dynamic) */
+ "iffffffff\0"
+ "glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[6324]: MultiTexCoord2svARB (offset 391) */
+ "ip\0"
+ "glMultiTexCoord2sv\0"
+ "glMultiTexCoord2svARB\0"
+ "\0"
+ /* _mesa_function_pool[6369]: ReplacementCodeubvSUN (dynamic) */
+ "p\0"
+ "glReplacementCodeubvSUN\0"
+ "\0"
+ /* _mesa_function_pool[6396]: Uniform3iARB (will be remapped) */
+ "iiii\0"
+ "glUniform3i\0"
+ "glUniform3iARB\0"
+ "\0"
+ /* _mesa_function_pool[6429]: DrawTransformFeedback (will be remapped) */
+ "ii\0"
+ "glDrawTransformFeedback\0"
+ "\0"
+ /* _mesa_function_pool[6457]: DrawElementsInstancedARB (will be remapped) */
+ "iiipi\0"
+ "glDrawElementsInstancedARB\0"
+ "glDrawElementsInstancedEXT\0"
+ "glDrawElementsInstanced\0"
+ "\0"
+ /* _mesa_function_pool[6542]: GetShaderInfoLog (will be remapped) */
+ "iipp\0"
+ "glGetShaderInfoLog\0"
+ "\0"
+ /* _mesa_function_pool[6567]: WeightivARB (dynamic) */
+ "ip\0"
+ "glWeightivARB\0"
+ "\0"
+ /* _mesa_function_pool[6585]: PollInstrumentsSGIX (dynamic) */
+ "p\0"
+ "glPollInstrumentsSGIX\0"
+ "\0"
+ /* _mesa_function_pool[6610]: GlobalAlphaFactordSUN (dynamic) */
+ "d\0"
+ "glGlobalAlphaFactordSUN\0"
+ "\0"
+ /* _mesa_function_pool[6637]: GetFinalCombinerInputParameterfvNV (will be remapped) */
+ "iip\0"
+ "glGetFinalCombinerInputParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[6679]: GenerateMipmapEXT (will be remapped) */
+ "i\0"
+ "glGenerateMipmap\0"
+ "glGenerateMipmapEXT\0"
+ "\0"
+ /* _mesa_function_pool[6719]: GenLists (offset 5) */
+ "i\0"
+ "glGenLists\0"
+ "\0"
+ /* _mesa_function_pool[6733]: DepthRangef (will be remapped) */
+ "ff\0"
+ "glDepthRangef\0"
+ "\0"
+ /* _mesa_function_pool[6751]: GetMapAttribParameterivNV (dynamic) */
+ "iiip\0"
+ "glGetMapAttribParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[6785]: CreateShaderObjectARB (will be remapped) */
+ "i\0"
+ "glCreateShaderObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[6812]: GetSharpenTexFuncSGIS (dynamic) */
+ "ip\0"
+ "glGetSharpenTexFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[6840]: BufferDataARB (will be remapped) */
+ "iipi\0"
+ "glBufferData\0"
+ "glBufferDataARB\0"
+ "\0"
+ /* _mesa_function_pool[6875]: FlushVertexArrayRangeNV (will be remapped) */
+ "\0"
+ "glFlushVertexArrayRangeNV\0"
+ "\0"
+ /* _mesa_function_pool[6903]: MapGrid2d (offset 226) */
+ "iddidd\0"
+ "glMapGrid2d\0"
+ "\0"
+ /* _mesa_function_pool[6923]: MapGrid2f (offset 227) */
+ "iffiff\0"
+ "glMapGrid2f\0"
+ "\0"
+ /* _mesa_function_pool[6943]: SampleMapATI (will be remapped) */
+ "iii\0"
+ "glSampleMapATI\0"
+ "\0"
+ /* _mesa_function_pool[6963]: VertexPointerEXT (will be remapped) */
+ "iiiip\0"
+ "glVertexPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[6989]: GetTexFilterFuncSGIS (dynamic) */
+ "iip\0"
+ "glGetTexFilterFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[7017]: Scissor (offset 176) */
+ "iiii\0"
+ "glScissor\0"
+ "\0"
+ /* _mesa_function_pool[7033]: Fogf (offset 153) */
+ "if\0"
+ "glFogf\0"
+ "\0"
+ /* _mesa_function_pool[7044]: ReplacementCodeuiColor4ubVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glReplacementCodeuiColor4ubVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[7089]: TexSubImage1D (offset 332) */
+ "iiiiiip\0"
+ "glTexSubImage1D\0"
+ "glTexSubImage1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[7133]: VertexAttrib1sARB (will be remapped) */
+ "ii\0"
+ "glVertexAttrib1s\0"
+ "glVertexAttrib1sARB\0"
+ "\0"
+ /* _mesa_function_pool[7174]: FenceSync (will be remapped) */
+ "ii\0"
+ "glFenceSync\0"
+ "\0"
+ /* _mesa_function_pool[7190]: Color4usv (offset 40) */
+ "p\0"
+ "glColor4usv\0"
+ "\0"
+ /* _mesa_function_pool[7205]: Fogi (offset 155) */
+ "ii\0"
+ "glFogi\0"
+ "\0"
+ /* _mesa_function_pool[7216]: DepthRange (offset 288) */
+ "dd\0"
+ "glDepthRange\0"
+ "\0"
+ /* _mesa_function_pool[7233]: RasterPos3iv (offset 75) */
+ "p\0"
+ "glRasterPos3iv\0"
+ "\0"
+ /* _mesa_function_pool[7251]: FinalCombinerInputNV (will be remapped) */
+ "iiii\0"
+ "glFinalCombinerInputNV\0"
+ "\0"
+ /* _mesa_function_pool[7280]: TexCoord2i (offset 106) */
+ "ii\0"
+ "glTexCoord2i\0"
+ "\0"
+ /* _mesa_function_pool[7297]: PixelMapfv (offset 251) */
+ "iip\0"
+ "glPixelMapfv\0"
+ "\0"
+ /* _mesa_function_pool[7315]: Color4ui (offset 37) */
+ "iiii\0"
+ "glColor4ui\0"
+ "\0"
+ /* _mesa_function_pool[7332]: RasterPos3s (offset 76) */
+ "iii\0"
+ "glRasterPos3s\0"
+ "\0"
+ /* _mesa_function_pool[7351]: Color3usv (offset 24) */
+ "p\0"
+ "glColor3usv\0"
+ "\0"
+ /* _mesa_function_pool[7366]: FlushRasterSGIX (dynamic) */
+ "\0"
+ "glFlushRasterSGIX\0"
+ "\0"
+ /* _mesa_function_pool[7386]: TexCoord2f (offset 104) */
+ "ff\0"
+ "glTexCoord2f\0"
+ "\0"
+ /* _mesa_function_pool[7403]: ReplacementCodeuiTexCoord2fVertex3fSUN (dynamic) */
+ "ifffff\0"
+ "glReplacementCodeuiTexCoord2fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[7452]: TexCoord2d (offset 102) */
+ "dd\0"
+ "glTexCoord2d\0"
+ "\0"
+ /* _mesa_function_pool[7469]: RasterPos3d (offset 70) */
+ "ddd\0"
+ "glRasterPos3d\0"
+ "\0"
+ /* _mesa_function_pool[7488]: RasterPos3f (offset 72) */
+ "fff\0"
+ "glRasterPos3f\0"
+ "\0"
+ /* _mesa_function_pool[7507]: Uniform1fARB (will be remapped) */
+ "if\0"
+ "glUniform1f\0"
+ "glUniform1fARB\0"
+ "\0"
+ /* _mesa_function_pool[7538]: AreTexturesResident (offset 322) */
+ "ipp\0"
+ "glAreTexturesResident\0"
+ "glAreTexturesResidentEXT\0"
+ "\0"
+ /* _mesa_function_pool[7590]: TexCoord2s (offset 108) */
+ "ii\0"
+ "glTexCoord2s\0"
+ "\0"
+ /* _mesa_function_pool[7607]: StencilOpSeparate (will be remapped) */
+ "iiii\0"
+ "glStencilOpSeparate\0"
+ "glStencilOpSeparateATI\0"
+ "\0"
+ /* _mesa_function_pool[7656]: ColorTableParameteriv (offset 341) */
+ "iip\0"
+ "glColorTableParameteriv\0"
+ "glColorTableParameterivSGI\0"
+ "\0"
+ /* _mesa_function_pool[7712]: FogCoordPointerListIBM (dynamic) */
+ "iipi\0"
+ "glFogCoordPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[7743]: WindowPos3dMESA (will be remapped) */
+ "ddd\0"
+ "glWindowPos3d\0"
+ "glWindowPos3dARB\0"
+ "glWindowPos3dMESA\0"
+ "\0"
+ /* _mesa_function_pool[7797]: Color4us (offset 39) */
+ "iiii\0"
+ "glColor4us\0"
+ "\0"
+ /* _mesa_function_pool[7814]: PointParameterfvEXT (will be remapped) */
+ "ip\0"
+ "glPointParameterfv\0"
+ "glPointParameterfvARB\0"
+ "glPointParameterfvEXT\0"
+ "glPointParameterfvSGIS\0"
+ "\0"
+ /* _mesa_function_pool[7904]: Color3bv (offset 10) */
+ "p\0"
+ "glColor3bv\0"
+ "\0"
+ /* _mesa_function_pool[7918]: WindowPos2fvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos2fv\0"
+ "glWindowPos2fvARB\0"
+ "glWindowPos2fvMESA\0"
+ "\0"
+ /* _mesa_function_pool[7973]: SecondaryColor3bvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3bv\0"
+ "glSecondaryColor3bvEXT\0"
+ "\0"
+ /* _mesa_function_pool[8019]: VertexPointerListIBM (dynamic) */
+ "iiipi\0"
+ "glVertexPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[8049]: GetProgramLocalParameterfvARB (will be remapped) */
+ "iip\0"
+ "glGetProgramLocalParameterfvARB\0"
+ "\0"
+ /* _mesa_function_pool[8086]: FragmentMaterialfSGIX (dynamic) */
+ "iif\0"
+ "glFragmentMaterialfSGIX\0"
+ "\0"
+ /* _mesa_function_pool[8115]: TexCoord2fNormal3fVertex3fSUN (dynamic) */
+ "ffffffff\0"
+ "glTexCoord2fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[8157]: RenderbufferStorageEXT (will be remapped) */
+ "iiii\0"
+ "glRenderbufferStorage\0"
+ "glRenderbufferStorageEXT\0"
+ "\0"
+ /* _mesa_function_pool[8210]: IsFenceNV (will be remapped) */
+ "i\0"
+ "glIsFenceNV\0"
+ "\0"
+ /* _mesa_function_pool[8225]: AttachObjectARB (will be remapped) */
+ "ii\0"
+ "glAttachObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[8247]: GetFragmentLightivSGIX (dynamic) */
+ "iip\0"
+ "glGetFragmentLightivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[8277]: UniformMatrix2fvARB (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix2fv\0"
+ "glUniformMatrix2fvARB\0"
+ "\0"
+ /* _mesa_function_pool[8324]: MultiTexCoord2fARB (offset 386) */
+ "iff\0"
+ "glMultiTexCoord2f\0"
+ "glMultiTexCoord2fARB\0"
+ "\0"
+ /* _mesa_function_pool[8368]: ColorTable (offset 339) */
+ "iiiiip\0"
+ "glColorTable\0"
+ "glColorTableSGI\0"
+ "glColorTableEXT\0"
+ "\0"
+ /* _mesa_function_pool[8421]: IndexPointer (offset 314) */
+ "iip\0"
+ "glIndexPointer\0"
+ "\0"
+ /* _mesa_function_pool[8441]: Accum (offset 213) */
+ "if\0"
+ "glAccum\0"
+ "\0"
+ /* _mesa_function_pool[8453]: GetTexImage (offset 281) */
+ "iiiip\0"
+ "glGetTexImage\0"
+ "\0"
+ /* _mesa_function_pool[8474]: MapControlPointsNV (dynamic) */
+ "iiiiiiiip\0"
+ "glMapControlPointsNV\0"
+ "\0"
+ /* _mesa_function_pool[8506]: ConvolutionFilter2D (offset 349) */
+ "iiiiiip\0"
+ "glConvolutionFilter2D\0"
+ "glConvolutionFilter2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[8562]: Finish (offset 216) */
+ "\0"
+ "glFinish\0"
+ "\0"
+ /* _mesa_function_pool[8573]: MapParameterfvNV (dynamic) */
+ "iip\0"
+ "glMapParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[8597]: ClearStencil (offset 207) */
+ "i\0"
+ "glClearStencil\0"
+ "\0"
+ /* _mesa_function_pool[8615]: VertexAttrib3dvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3dv\0"
+ "glVertexAttrib3dvARB\0"
+ "\0"
+ /* _mesa_function_pool[8658]: Uniform4uivEXT (will be remapped) */
+ "iip\0"
+ "glUniform4uivEXT\0"
+ "glUniform4uiv\0"
+ "\0"
+ /* _mesa_function_pool[8694]: HintPGI (dynamic) */
+ "ii\0"
+ "glHintPGI\0"
+ "\0"
+ /* _mesa_function_pool[8708]: ConvolutionParameteriv (offset 353) */
+ "iip\0"
+ "glConvolutionParameteriv\0"
+ "glConvolutionParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[8766]: Color4s (offset 33) */
+ "iiii\0"
+ "glColor4s\0"
+ "\0"
+ /* _mesa_function_pool[8782]: InterleavedArrays (offset 317) */
+ "iip\0"
+ "glInterleavedArrays\0"
+ "\0"
+ /* _mesa_function_pool[8807]: RasterPos2fv (offset 65) */
+ "p\0"
+ "glRasterPos2fv\0"
+ "\0"
+ /* _mesa_function_pool[8825]: TexCoord1fv (offset 97) */
+ "p\0"
+ "glTexCoord1fv\0"
+ "\0"
+ /* _mesa_function_pool[8842]: Vertex2d (offset 126) */
+ "dd\0"
+ "glVertex2d\0"
+ "\0"
+ /* _mesa_function_pool[8857]: CullParameterdvEXT (dynamic) */
+ "ip\0"
+ "glCullParameterdvEXT\0"
+ "\0"
+ /* _mesa_function_pool[8882]: ProgramNamedParameter4fNV (will be remapped) */
+ "iipffff\0"
+ "glProgramNamedParameter4fNV\0"
+ "\0"
+ /* _mesa_function_pool[8919]: Color3fVertex3fSUN (dynamic) */
+ "ffffff\0"
+ "glColor3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[8948]: ProgramEnvParameter4fvARB (will be remapped) */
+ "iip\0"
+ "glProgramEnvParameter4fvARB\0"
+ "glProgramParameter4fvNV\0"
+ "\0"
+ /* _mesa_function_pool[9005]: Color4i (offset 31) */
+ "iiii\0"
+ "glColor4i\0"
+ "\0"
+ /* _mesa_function_pool[9021]: Color4f (offset 29) */
+ "ffff\0"
+ "glColor4f\0"
+ "\0"
+ /* _mesa_function_pool[9037]: RasterPos4fv (offset 81) */
+ "p\0"
+ "glRasterPos4fv\0"
+ "\0"
+ /* _mesa_function_pool[9055]: Color4d (offset 27) */
+ "dddd\0"
+ "glColor4d\0"
+ "\0"
+ /* _mesa_function_pool[9071]: ClearIndex (offset 205) */
+ "f\0"
+ "glClearIndex\0"
+ "\0"
+ /* _mesa_function_pool[9087]: Color4b (offset 25) */
+ "iiii\0"
+ "glColor4b\0"
+ "\0"
+ /* _mesa_function_pool[9103]: LoadMatrixd (offset 292) */
+ "p\0"
+ "glLoadMatrixd\0"
+ "\0"
+ /* _mesa_function_pool[9120]: FragmentLightModeliSGIX (dynamic) */
+ "ii\0"
+ "glFragmentLightModeliSGIX\0"
+ "\0"
+ /* _mesa_function_pool[9150]: RasterPos2dv (offset 63) */
+ "p\0"
+ "glRasterPos2dv\0"
+ "\0"
+ /* _mesa_function_pool[9168]: ConvolutionParameterfv (offset 351) */
+ "iip\0"
+ "glConvolutionParameterfv\0"
+ "glConvolutionParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[9226]: TbufferMask3DFX (dynamic) */
+ "i\0"
+ "glTbufferMask3DFX\0"
+ "\0"
+ /* _mesa_function_pool[9247]: GetTexGendv (offset 278) */
+ "iip\0"
+ "glGetTexGendv\0"
+ "\0"
+ /* _mesa_function_pool[9266]: GetVertexAttribfvNV (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribfvNV\0"
+ "\0"
+ /* _mesa_function_pool[9293]: BeginTransformFeedbackEXT (will be remapped) */
+ "i\0"
+ "glBeginTransformFeedbackEXT\0"
+ "glBeginTransformFeedback\0"
+ "\0"
+ /* _mesa_function_pool[9349]: LoadProgramNV (will be remapped) */
+ "iiip\0"
+ "glLoadProgramNV\0"
+ "\0"
+ /* _mesa_function_pool[9371]: WaitSync (will be remapped) */
+ "iii\0"
+ "glWaitSync\0"
+ "\0"
+ /* _mesa_function_pool[9387]: EndList (offset 1) */
+ "\0"
+ "glEndList\0"
+ "\0"
+ /* _mesa_function_pool[9399]: VertexAttrib4fvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4fvNV\0"
+ "\0"
+ /* _mesa_function_pool[9423]: GetAttachedObjectsARB (will be remapped) */
+ "iipp\0"
+ "glGetAttachedObjectsARB\0"
+ "\0"
+ /* _mesa_function_pool[9453]: Uniform3fvARB (will be remapped) */
+ "iip\0"
+ "glUniform3fv\0"
+ "glUniform3fvARB\0"
+ "\0"
+ /* _mesa_function_pool[9487]: EvalCoord1fv (offset 231) */
+ "p\0"
+ "glEvalCoord1fv\0"
+ "\0"
+ /* _mesa_function_pool[9505]: DrawRangeElements (offset 338) */
+ "iiiiip\0"
+ "glDrawRangeElements\0"
+ "glDrawRangeElementsEXT\0"
+ "\0"
+ /* _mesa_function_pool[9556]: EvalMesh2 (offset 238) */
+ "iiiii\0"
+ "glEvalMesh2\0"
+ "\0"
+ /* _mesa_function_pool[9575]: Vertex4fv (offset 145) */
+ "p\0"
+ "glVertex4fv\0"
+ "\0"
+ /* _mesa_function_pool[9590]: GenTransformFeedbacks (will be remapped) */
+ "ip\0"
+ "glGenTransformFeedbacks\0"
+ "\0"
+ /* _mesa_function_pool[9618]: SpriteParameterfvSGIX (dynamic) */
+ "ip\0"
+ "glSpriteParameterfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[9646]: CheckFramebufferStatusEXT (will be remapped) */
+ "i\0"
+ "glCheckFramebufferStatus\0"
+ "glCheckFramebufferStatusEXT\0"
+ "\0"
+ /* _mesa_function_pool[9702]: GlobalAlphaFactoruiSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactoruiSUN\0"
+ "\0"
+ /* _mesa_function_pool[9730]: GetHandleARB (will be remapped) */
+ "i\0"
+ "glGetHandleARB\0"
+ "\0"
+ /* _mesa_function_pool[9748]: GetVertexAttribivARB (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribiv\0"
+ "glGetVertexAttribivARB\0"
+ "\0"
+ /* _mesa_function_pool[9796]: BlendFunciARB (will be remapped) */
+ "iii\0"
+ "glBlendFunciARB\0"
+ "\0"
+ /* _mesa_function_pool[9817]: GetCombinerInputParameterfvNV (will be remapped) */
+ "iiiip\0"
+ "glGetCombinerInputParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[9856]: GetTexParameterIivEXT (will be remapped) */
+ "iip\0"
+ "glGetTexParameterIivEXT\0"
+ "glGetTexParameterIiv\0"
+ "\0"
+ /* _mesa_function_pool[9906]: CreateProgram (will be remapped) */
+ "\0"
+ "glCreateProgram\0"
+ "\0"
+ /* _mesa_function_pool[9924]: LoadTransposeMatrixdARB (will be remapped) */
+ "p\0"
+ "glLoadTransposeMatrixd\0"
+ "glLoadTransposeMatrixdARB\0"
+ "\0"
+ /* _mesa_function_pool[9976]: ReleaseShaderCompiler (will be remapped) */
+ "\0"
+ "glReleaseShaderCompiler\0"
+ "\0"
+ /* _mesa_function_pool[10002]: GetMinmax (offset 364) */
+ "iiiip\0"
+ "glGetMinmax\0"
+ "glGetMinmaxEXT\0"
+ "\0"
+ /* _mesa_function_pool[10036]: StencilFuncSeparate (will be remapped) */
+ "iiii\0"
+ "glStencilFuncSeparate\0"
+ "\0"
+ /* _mesa_function_pool[10064]: SecondaryColor3sEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3s\0"
+ "glSecondaryColor3sEXT\0"
+ "\0"
+ /* _mesa_function_pool[10110]: Color3fVertex3fvSUN (dynamic) */
+ "pp\0"
+ "glColor3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[10136]: GetInteger64i_v (will be remapped) */
+ "iip\0"
+ "glGetInteger64i_v\0"
+ "\0"
+ /* _mesa_function_pool[10159]: Normal3fv (offset 57) */
+ "p\0"
+ "glNormal3fv\0"
+ "\0"
+ /* _mesa_function_pool[10174]: GlobalAlphaFactorbSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactorbSUN\0"
+ "\0"
+ /* _mesa_function_pool[10201]: Color3us (offset 23) */
+ "iii\0"
+ "glColor3us\0"
+ "\0"
+ /* _mesa_function_pool[10217]: ImageTransformParameterfvHP (dynamic) */
+ "iip\0"
+ "glImageTransformParameterfvHP\0"
+ "\0"
+ /* _mesa_function_pool[10252]: VertexAttrib4ivARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4iv\0"
+ "glVertexAttrib4ivARB\0"
+ "\0"
+ /* _mesa_function_pool[10295]: End (offset 43) */
+ "\0"
+ "glEnd\0"
+ "\0"
+ /* _mesa_function_pool[10303]: VertexAttrib3fNV (will be remapped) */
+ "ifff\0"
+ "glVertexAttrib3fNV\0"
+ "\0"
+ /* _mesa_function_pool[10328]: VertexAttribs2dvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs2dvNV\0"
+ "\0"
+ /* _mesa_function_pool[10354]: GetQueryObjectui64vEXT (will be remapped) */
+ "iip\0"
+ "glGetQueryObjectui64vEXT\0"
+ "\0"
+ /* _mesa_function_pool[10384]: MultiTexCoord3fvARB (offset 395) */
+ "ip\0"
+ "glMultiTexCoord3fv\0"
+ "glMultiTexCoord3fvARB\0"
+ "\0"
+ /* _mesa_function_pool[10429]: SecondaryColor3dEXT (will be remapped) */
+ "ddd\0"
+ "glSecondaryColor3d\0"
+ "glSecondaryColor3dEXT\0"
+ "\0"
+ /* _mesa_function_pool[10475]: Color3ub (offset 19) */
+ "iii\0"
+ "glColor3ub\0"
+ "\0"
+ /* _mesa_function_pool[10491]: GetProgramParameterfvNV (will be remapped) */
+ "iiip\0"
+ "glGetProgramParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[10523]: TangentPointerEXT (dynamic) */
+ "iip\0"
+ "glTangentPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[10548]: Color4fNormal3fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glColor4fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[10583]: GetInstrumentsSGIX (dynamic) */
+ "\0"
+ "glGetInstrumentsSGIX\0"
+ "\0"
+ /* _mesa_function_pool[10606]: GetUniformuivEXT (will be remapped) */
+ "iip\0"
+ "glGetUniformuivEXT\0"
+ "glGetUniformuiv\0"
+ "\0"
+ /* _mesa_function_pool[10646]: Color3ui (offset 21) */
+ "iii\0"
+ "glColor3ui\0"
+ "\0"
+ /* _mesa_function_pool[10662]: EvalMapsNV (dynamic) */
+ "ii\0"
+ "glEvalMapsNV\0"
+ "\0"
+ /* _mesa_function_pool[10679]: TexSubImage2D (offset 333) */
+ "iiiiiiiip\0"
+ "glTexSubImage2D\0"
+ "glTexSubImage2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[10725]: FragmentLightivSGIX (dynamic) */
+ "iip\0"
+ "glFragmentLightivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[10752]: GetTexParameterPointervAPPLE (will be remapped) */
+ "iip\0"
+ "glGetTexParameterPointervAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[10788]: TexGenfv (offset 191) */
+ "iip\0"
+ "glTexGenfv\0"
+ "\0"
+ /* _mesa_function_pool[10804]: GetTransformFeedbackVaryingEXT (will be remapped) */
+ "iiipppp\0"
+ "glGetTransformFeedbackVaryingEXT\0"
+ "glGetTransformFeedbackVarying\0"
+ "\0"
+ /* _mesa_function_pool[10876]: VertexAttrib4bvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4bv\0"
+ "glVertexAttrib4bvARB\0"
+ "\0"
+ /* _mesa_function_pool[10919]: ShaderBinary (will be remapped) */
+ "ipipi\0"
+ "glShaderBinary\0"
+ "\0"
+ /* _mesa_function_pool[10941]: GetIntegerIndexedvEXT (will be remapped) */
+ "iip\0"
+ "glGetIntegerIndexedvEXT\0"
+ "glGetIntegeri_v\0"
+ "\0"
+ /* _mesa_function_pool[10986]: MultiTexCoord4sARB (offset 406) */
+ "iiiii\0"
+ "glMultiTexCoord4s\0"
+ "glMultiTexCoord4sARB\0"
+ "\0"
+ /* _mesa_function_pool[11032]: GetFragmentMaterialivSGIX (dynamic) */
+ "iip\0"
+ "glGetFragmentMaterialivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[11065]: WindowPos4dMESA (will be remapped) */
+ "dddd\0"
+ "glWindowPos4dMESA\0"
+ "\0"
+ /* _mesa_function_pool[11089]: WeightPointerARB (dynamic) */
+ "iiip\0"
+ "glWeightPointerARB\0"
+ "\0"
+ /* _mesa_function_pool[11114]: WindowPos2dMESA (will be remapped) */
+ "dd\0"
+ "glWindowPos2d\0"
+ "glWindowPos2dARB\0"
+ "glWindowPos2dMESA\0"
+ "\0"
+ /* _mesa_function_pool[11167]: FramebufferTexture3DEXT (will be remapped) */
+ "iiiiii\0"
+ "glFramebufferTexture3D\0"
+ "glFramebufferTexture3DEXT\0"
+ "\0"
+ /* _mesa_function_pool[11224]: BlendEquation (offset 337) */
+ "i\0"
+ "glBlendEquation\0"
+ "glBlendEquationEXT\0"
+ "\0"
+ /* _mesa_function_pool[11262]: VertexAttrib3dNV (will be remapped) */
+ "iddd\0"
+ "glVertexAttrib3dNV\0"
+ "\0"
+ /* _mesa_function_pool[11287]: VertexAttrib3dARB (will be remapped) */
+ "iddd\0"
+ "glVertexAttrib3d\0"
+ "glVertexAttrib3dARB\0"
+ "\0"
+ /* _mesa_function_pool[11330]: VertexAttribI4usvEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI4usvEXT\0"
+ "glVertexAttribI4usv\0"
+ "\0"
+ /* _mesa_function_pool[11377]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ "ppppp\0"
+ "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[11441]: VertexAttrib4fARB (will be remapped) */
+ "iffff\0"
+ "glVertexAttrib4f\0"
+ "glVertexAttrib4fARB\0"
+ "\0"
+ /* _mesa_function_pool[11485]: GetError (offset 261) */
+ "\0"
+ "glGetError\0"
+ "\0"
+ /* _mesa_function_pool[11498]: IndexFuncEXT (dynamic) */
+ "if\0"
+ "glIndexFuncEXT\0"
+ "\0"
+ /* _mesa_function_pool[11517]: TexCoord3dv (offset 111) */
+ "p\0"
+ "glTexCoord3dv\0"
+ "\0"
+ /* _mesa_function_pool[11534]: Indexdv (offset 45) */
+ "p\0"
+ "glIndexdv\0"
+ "\0"
+ /* _mesa_function_pool[11547]: FramebufferTexture2DEXT (will be remapped) */
+ "iiiii\0"
+ "glFramebufferTexture2D\0"
+ "glFramebufferTexture2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[11603]: Normal3s (offset 60) */
+ "iii\0"
+ "glNormal3s\0"
+ "\0"
+ /* _mesa_function_pool[11619]: GetObjectParameterivAPPLE (will be remapped) */
+ "iiip\0"
+ "glGetObjectParameterivAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[11653]: PushName (offset 201) */
+ "i\0"
+ "glPushName\0"
+ "\0"
+ /* _mesa_function_pool[11667]: MultiTexCoord2dvARB (offset 385) */
+ "ip\0"
+ "glMultiTexCoord2dv\0"
+ "glMultiTexCoord2dvARB\0"
+ "\0"
+ /* _mesa_function_pool[11712]: CullParameterfvEXT (dynamic) */
+ "ip\0"
+ "glCullParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[11737]: Normal3i (offset 58) */
+ "iii\0"
+ "glNormal3i\0"
+ "\0"
+ /* _mesa_function_pool[11753]: ProgramNamedParameter4fvNV (will be remapped) */
+ "iipp\0"
+ "glProgramNamedParameter4fvNV\0"
+ "\0"
+ /* _mesa_function_pool[11788]: SecondaryColorPointerEXT (will be remapped) */
+ "iiip\0"
+ "glSecondaryColorPointer\0"
+ "glSecondaryColorPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[11845]: VertexAttrib4fvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4fv\0"
+ "glVertexAttrib4fvARB\0"
+ "\0"
+ /* _mesa_function_pool[11888]: ColorPointerListIBM (dynamic) */
+ "iiipi\0"
+ "glColorPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[11917]: GetActiveUniformARB (will be remapped) */
+ "iiipppp\0"
+ "glGetActiveUniform\0"
+ "glGetActiveUniformARB\0"
+ "\0"
+ /* _mesa_function_pool[11967]: ImageTransformParameteriHP (dynamic) */
+ "iii\0"
+ "glImageTransformParameteriHP\0"
+ "\0"
+ /* _mesa_function_pool[12001]: Normal3b (offset 52) */
+ "iii\0"
+ "glNormal3b\0"
+ "\0"
+ /* _mesa_function_pool[12017]: Normal3d (offset 54) */
+ "ddd\0"
+ "glNormal3d\0"
+ "\0"
+ /* _mesa_function_pool[12033]: Uniform1uiEXT (will be remapped) */
+ "ii\0"
+ "glUniform1uiEXT\0"
+ "glUniform1ui\0"
+ "\0"
+ /* _mesa_function_pool[12066]: Normal3f (offset 56) */
+ "fff\0"
+ "glNormal3f\0"
+ "\0"
+ /* _mesa_function_pool[12082]: MultiTexCoord1svARB (offset 383) */
+ "ip\0"
+ "glMultiTexCoord1sv\0"
+ "glMultiTexCoord1svARB\0"
+ "\0"
+ /* _mesa_function_pool[12127]: Indexi (offset 48) */
+ "i\0"
+ "glIndexi\0"
+ "\0"
+ /* _mesa_function_pool[12139]: EGLImageTargetTexture2DOES (will be remapped) */
+ "ip\0"
+ "glEGLImageTargetTexture2DOES\0"
+ "\0"
+ /* _mesa_function_pool[12172]: EndQueryARB (will be remapped) */
+ "i\0"
+ "glEndQuery\0"
+ "glEndQueryARB\0"
+ "\0"
+ /* _mesa_function_pool[12200]: DeleteFencesNV (will be remapped) */
+ "ip\0"
+ "glDeleteFencesNV\0"
+ "\0"
+ /* _mesa_function_pool[12221]: BindBufferRangeEXT (will be remapped) */
+ "iiiii\0"
+ "glBindBufferRangeEXT\0"
+ "glBindBufferRange\0"
+ "\0"
+ /* _mesa_function_pool[12267]: DepthMask (offset 211) */
+ "i\0"
+ "glDepthMask\0"
+ "\0"
+ /* _mesa_function_pool[12282]: IsShader (will be remapped) */
+ "i\0"
+ "glIsShader\0"
+ "\0"
+ /* _mesa_function_pool[12296]: Indexf (offset 46) */
+ "f\0"
+ "glIndexf\0"
+ "\0"
+ /* _mesa_function_pool[12308]: GetImageTransformParameterivHP (dynamic) */
+ "iip\0"
+ "glGetImageTransformParameterivHP\0"
+ "\0"
+ /* _mesa_function_pool[12346]: Indexd (offset 44) */
+ "d\0"
+ "glIndexd\0"
+ "\0"
+ /* _mesa_function_pool[12358]: GetMaterialiv (offset 270) */
+ "iip\0"
+ "glGetMaterialiv\0"
+ "\0"
+ /* _mesa_function_pool[12379]: StencilOp (offset 244) */
+ "iii\0"
+ "glStencilOp\0"
+ "\0"
+ /* _mesa_function_pool[12396]: WindowPos4ivMESA (will be remapped) */
+ "p\0"
+ "glWindowPos4ivMESA\0"
+ "\0"
+ /* _mesa_function_pool[12418]: FramebufferTextureLayer (dynamic) */
+ "iiiii\0"
+ "glFramebufferTextureLayerARB\0"
+ "\0"
+ /* _mesa_function_pool[12454]: MultiTexCoord3svARB (offset 399) */
+ "ip\0"
+ "glMultiTexCoord3sv\0"
+ "glMultiTexCoord3svARB\0"
+ "\0"
+ /* _mesa_function_pool[12499]: TexEnvfv (offset 185) */
+ "iip\0"
+ "glTexEnvfv\0"
+ "\0"
+ /* _mesa_function_pool[12515]: MultiTexCoord4iARB (offset 404) */
+ "iiiii\0"
+ "glMultiTexCoord4i\0"
+ "glMultiTexCoord4iARB\0"
+ "\0"
+ /* _mesa_function_pool[12561]: Indexs (offset 50) */
+ "i\0"
+ "glIndexs\0"
+ "\0"
+ /* _mesa_function_pool[12573]: Binormal3ivEXT (dynamic) */
+ "p\0"
+ "glBinormal3ivEXT\0"
+ "\0"
+ /* _mesa_function_pool[12593]: ResizeBuffersMESA (will be remapped) */
+ "\0"
+ "glResizeBuffersMESA\0"
+ "\0"
+ /* _mesa_function_pool[12615]: BlendFuncSeparateiARB (will be remapped) */
+ "iiiii\0"
+ "glBlendFuncSeparateiARB\0"
+ "\0"
+ /* _mesa_function_pool[12646]: GetUniformivARB (will be remapped) */
+ "iip\0"
+ "glGetUniformiv\0"
+ "glGetUniformivARB\0"
+ "\0"
+ /* _mesa_function_pool[12684]: PixelTexGenParameteriSGIS (will be remapped) */
+ "ii\0"
+ "glPixelTexGenParameteriSGIS\0"
+ "\0"
+ /* _mesa_function_pool[12716]: VertexPointervINTEL (dynamic) */
+ "iip\0"
+ "glVertexPointervINTEL\0"
+ "\0"
+ /* _mesa_function_pool[12743]: Vertex2i (offset 130) */
+ "ii\0"
+ "glVertex2i\0"
+ "\0"
+ /* _mesa_function_pool[12758]: LoadMatrixf (offset 291) */
+ "p\0"
+ "glLoadMatrixf\0"
+ "\0"
+ /* _mesa_function_pool[12775]: VertexAttribI1uivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI1uivEXT\0"
+ "glVertexAttribI1uiv\0"
+ "\0"
+ /* _mesa_function_pool[12822]: Vertex2f (offset 128) */
+ "ff\0"
+ "glVertex2f\0"
+ "\0"
+ /* _mesa_function_pool[12837]: ReplacementCodeuiColor4fNormal3fVertex3fvSUN (dynamic) */
+ "pppp\0"
+ "glReplacementCodeuiColor4fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[12890]: Color4bv (offset 26) */
+ "p\0"
+ "glColor4bv\0"
+ "\0"
+ /* _mesa_function_pool[12904]: VertexPointer (offset 321) */
+ "iiip\0"
+ "glVertexPointer\0"
+ "\0"
+ /* _mesa_function_pool[12926]: SecondaryColor3uiEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3ui\0"
+ "glSecondaryColor3uiEXT\0"
+ "\0"
+ /* _mesa_function_pool[12974]: StartInstrumentsSGIX (dynamic) */
+ "\0"
+ "glStartInstrumentsSGIX\0"
+ "\0"
+ /* _mesa_function_pool[12999]: SecondaryColor3usvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3usv\0"
+ "glSecondaryColor3usvEXT\0"
+ "\0"
+ /* _mesa_function_pool[13047]: VertexAttrib2fvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2fvNV\0"
+ "\0"
+ /* _mesa_function_pool[13071]: ProgramLocalParameter4dvARB (will be remapped) */
+ "iip\0"
+ "glProgramLocalParameter4dvARB\0"
+ "\0"
+ /* _mesa_function_pool[13106]: DeleteLists (offset 4) */
+ "ii\0"
+ "glDeleteLists\0"
+ "\0"
+ /* _mesa_function_pool[13124]: LogicOp (offset 242) */
+ "i\0"
+ "glLogicOp\0"
+ "\0"
+ /* _mesa_function_pool[13137]: MatrixIndexuivARB (dynamic) */
+ "ip\0"
+ "glMatrixIndexuivARB\0"
+ "\0"
+ /* _mesa_function_pool[13161]: Vertex2s (offset 132) */
+ "ii\0"
+ "glVertex2s\0"
+ "\0"
+ /* _mesa_function_pool[13176]: RenderbufferStorageMultisample (will be remapped) */
+ "iiiii\0"
+ "glRenderbufferStorageMultisample\0"
+ "glRenderbufferStorageMultisampleEXT\0"
+ "\0"
+ /* _mesa_function_pool[13252]: TexCoord4fv (offset 121) */
+ "p\0"
+ "glTexCoord4fv\0"
+ "\0"
+ /* _mesa_function_pool[13269]: Tangent3sEXT (dynamic) */
+ "iii\0"
+ "glTangent3sEXT\0"
+ "\0"
+ /* _mesa_function_pool[13289]: GlobalAlphaFactorfSUN (dynamic) */
+ "f\0"
+ "glGlobalAlphaFactorfSUN\0"
+ "\0"
+ /* _mesa_function_pool[13316]: MultiTexCoord3iARB (offset 396) */
+ "iiii\0"
+ "glMultiTexCoord3i\0"
+ "glMultiTexCoord3iARB\0"
+ "\0"
+ /* _mesa_function_pool[13361]: IsProgram (will be remapped) */
+ "i\0"
+ "glIsProgram\0"
+ "\0"
+ /* _mesa_function_pool[13376]: TexCoordPointerListIBM (dynamic) */
+ "iiipi\0"
+ "glTexCoordPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[13408]: VertexAttribI4svEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI4svEXT\0"
+ "glVertexAttribI4sv\0"
+ "\0"
+ /* _mesa_function_pool[13453]: GlobalAlphaFactorusSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactorusSUN\0"
+ "\0"
+ /* _mesa_function_pool[13481]: VertexAttrib2dvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2dvNV\0"
+ "\0"
+ /* _mesa_function_pool[13505]: FramebufferRenderbufferEXT (will be remapped) */
+ "iiii\0"
+ "glFramebufferRenderbuffer\0"
+ "glFramebufferRenderbufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[13566]: ClearBufferuiv (will be remapped) */
+ "iip\0"
+ "glClearBufferuiv\0"
+ "\0"
+ /* _mesa_function_pool[13588]: VertexAttrib1dvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1dvNV\0"
+ "\0"
+ /* _mesa_function_pool[13612]: GenTextures (offset 328) */
+ "ip\0"
+ "glGenTextures\0"
+ "glGenTexturesEXT\0"
+ "\0"
+ /* _mesa_function_pool[13647]: FramebufferTextureARB (will be remapped) */
+ "iiii\0"
+ "glFramebufferTextureARB\0"
+ "\0"
+ /* _mesa_function_pool[13677]: SetFenceNV (will be remapped) */
+ "ii\0"
+ "glSetFenceNV\0"
+ "\0"
+ /* _mesa_function_pool[13694]: FramebufferTexture1DEXT (will be remapped) */
+ "iiiii\0"
+ "glFramebufferTexture1D\0"
+ "glFramebufferTexture1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[13750]: GetCombinerOutputParameterivNV (will be remapped) */
+ "iiip\0"
+ "glGetCombinerOutputParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[13789]: MultiModeDrawArraysIBM (will be remapped) */
+ "pppii\0"
+ "glMultiModeDrawArraysIBM\0"
+ "\0"
+ /* _mesa_function_pool[13821]: PixelTexGenParameterivSGIS (will be remapped) */
+ "ip\0"
+ "glPixelTexGenParameterivSGIS\0"
+ "\0"
+ /* _mesa_function_pool[13854]: TextureNormalEXT (dynamic) */
+ "i\0"
+ "glTextureNormalEXT\0"
+ "\0"
+ /* _mesa_function_pool[13876]: IndexPointerListIBM (dynamic) */
+ "iipi\0"
+ "glIndexPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[13904]: WeightfvARB (dynamic) */
+ "ip\0"
+ "glWeightfvARB\0"
+ "\0"
+ /* _mesa_function_pool[13922]: GetCombinerOutputParameterfvNV (will be remapped) */
+ "iiip\0"
+ "glGetCombinerOutputParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[13961]: RasterPos2sv (offset 69) */
+ "p\0"
+ "glRasterPos2sv\0"
+ "\0"
+ /* _mesa_function_pool[13979]: Color4ubv (offset 36) */
+ "p\0"
+ "glColor4ubv\0"
+ "\0"
+ /* _mesa_function_pool[13994]: DrawBuffer (offset 202) */
+ "i\0"
+ "glDrawBuffer\0"
+ "\0"
+ /* _mesa_function_pool[14010]: TexCoord2fv (offset 105) */
+ "p\0"
+ "glTexCoord2fv\0"
+ "\0"
+ /* _mesa_function_pool[14027]: WindowPos4fMESA (will be remapped) */
+ "ffff\0"
+ "glWindowPos4fMESA\0"
+ "\0"
+ /* _mesa_function_pool[14051]: TexCoord1sv (offset 101) */
+ "p\0"
+ "glTexCoord1sv\0"
+ "\0"
+ /* _mesa_function_pool[14068]: WindowPos3dvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos3dv\0"
+ "glWindowPos3dvARB\0"
+ "glWindowPos3dvMESA\0"
+ "\0"
+ /* _mesa_function_pool[14123]: DepthFunc (offset 245) */
+ "i\0"
+ "glDepthFunc\0"
+ "\0"
+ /* _mesa_function_pool[14138]: PixelMapusv (offset 253) */
+ "iip\0"
+ "glPixelMapusv\0"
+ "\0"
+ /* _mesa_function_pool[14157]: GetQueryObjecti64vEXT (will be remapped) */
+ "iip\0"
+ "glGetQueryObjecti64vEXT\0"
+ "\0"
+ /* _mesa_function_pool[14186]: MultiTexCoord1dARB (offset 376) */
+ "id\0"
+ "glMultiTexCoord1d\0"
+ "glMultiTexCoord1dARB\0"
+ "\0"
+ /* _mesa_function_pool[14229]: PointParameterivNV (will be remapped) */
+ "ip\0"
+ "glPointParameteriv\0"
+ "glPointParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[14273]: BlendFunc (offset 241) */
+ "ii\0"
+ "glBlendFunc\0"
+ "\0"
+ /* _mesa_function_pool[14289]: EndTransformFeedbackEXT (will be remapped) */
+ "\0"
+ "glEndTransformFeedbackEXT\0"
+ "glEndTransformFeedback\0"
+ "\0"
+ /* _mesa_function_pool[14340]: Uniform2fvARB (will be remapped) */
+ "iip\0"
+ "glUniform2fv\0"
+ "glUniform2fvARB\0"
+ "\0"
+ /* _mesa_function_pool[14374]: BufferParameteriAPPLE (will be remapped) */
+ "iii\0"
+ "glBufferParameteriAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[14403]: MultiTexCoord3dvARB (offset 393) */
+ "ip\0"
+ "glMultiTexCoord3dv\0"
+ "glMultiTexCoord3dvARB\0"
+ "\0"
+ /* _mesa_function_pool[14448]: ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (dynamic) */
+ "pppp\0"
+ "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[14504]: DeleteObjectARB (will be remapped) */
+ "i\0"
+ "glDeleteObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[14525]: GetShaderPrecisionFormat (will be remapped) */
+ "iipp\0"
+ "glGetShaderPrecisionFormat\0"
+ "\0"
+ /* _mesa_function_pool[14558]: MatrixIndexPointerARB (dynamic) */
+ "iiip\0"
+ "glMatrixIndexPointerARB\0"
+ "\0"
+ /* _mesa_function_pool[14588]: ProgramNamedParameter4dvNV (will be remapped) */
+ "iipp\0"
+ "glProgramNamedParameter4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[14623]: Tangent3fvEXT (dynamic) */
+ "p\0"
+ "glTangent3fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[14642]: Flush (offset 217) */
+ "\0"
+ "glFlush\0"
+ "\0"
+ /* _mesa_function_pool[14652]: Color4uiv (offset 38) */
+ "p\0"
+ "glColor4uiv\0"
+ "\0"
+ /* _mesa_function_pool[14667]: VertexAttribI4iEXT (will be remapped) */
+ "iiiii\0"
+ "glVertexAttribI4iEXT\0"
+ "glVertexAttribI4i\0"
+ "\0"
+ /* _mesa_function_pool[14713]: GenVertexArrays (will be remapped) */
+ "ip\0"
+ "glGenVertexArrays\0"
+ "\0"
+ /* _mesa_function_pool[14735]: Uniform3uivEXT (will be remapped) */
+ "iip\0"
+ "glUniform3uivEXT\0"
+ "glUniform3uiv\0"
+ "\0"
+ /* _mesa_function_pool[14771]: RasterPos3sv (offset 77) */
+ "p\0"
+ "glRasterPos3sv\0"
+ "\0"
+ /* _mesa_function_pool[14789]: BindFramebufferEXT (will be remapped) */
+ "ii\0"
+ "glBindFramebuffer\0"
+ "glBindFramebufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[14832]: ReferencePlaneSGIX (dynamic) */
+ "p\0"
+ "glReferencePlaneSGIX\0"
+ "\0"
+ /* _mesa_function_pool[14856]: PushAttrib (offset 219) */
+ "i\0"
+ "glPushAttrib\0"
+ "\0"
+ /* _mesa_function_pool[14872]: RasterPos2i (offset 66) */
+ "ii\0"
+ "glRasterPos2i\0"
+ "\0"
+ /* _mesa_function_pool[14890]: ValidateProgramARB (will be remapped) */
+ "i\0"
+ "glValidateProgram\0"
+ "glValidateProgramARB\0"
+ "\0"
+ /* _mesa_function_pool[14932]: TexParameteriv (offset 181) */
+ "iip\0"
+ "glTexParameteriv\0"
+ "\0"
+ /* _mesa_function_pool[14954]: UnlockArraysEXT (will be remapped) */
+ "\0"
+ "glUnlockArraysEXT\0"
+ "\0"
+ /* _mesa_function_pool[14974]: TexCoord2fColor3fVertex3fSUN (dynamic) */
+ "ffffffff\0"
+ "glTexCoord2fColor3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[15015]: WindowPos3fvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos3fv\0"
+ "glWindowPos3fvARB\0"
+ "glWindowPos3fvMESA\0"
+ "\0"
+ /* _mesa_function_pool[15070]: RasterPos2f (offset 64) */
+ "ff\0"
+ "glRasterPos2f\0"
+ "\0"
+ /* _mesa_function_pool[15088]: VertexAttrib1svNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1svNV\0"
+ "\0"
+ /* _mesa_function_pool[15112]: RasterPos2d (offset 62) */
+ "dd\0"
+ "glRasterPos2d\0"
+ "\0"
+ /* _mesa_function_pool[15130]: RasterPos3fv (offset 73) */
+ "p\0"
+ "glRasterPos3fv\0"
+ "\0"
+ /* _mesa_function_pool[15148]: CopyTexSubImage3D (offset 373) */
+ "iiiiiiiii\0"
+ "glCopyTexSubImage3D\0"
+ "glCopyTexSubImage3DEXT\0"
+ "\0"
+ /* _mesa_function_pool[15202]: VertexAttrib2dARB (will be remapped) */
+ "idd\0"
+ "glVertexAttrib2d\0"
+ "glVertexAttrib2dARB\0"
+ "\0"
+ /* _mesa_function_pool[15244]: Color4ub (offset 35) */
+ "iiii\0"
+ "glColor4ub\0"
+ "\0"
+ /* _mesa_function_pool[15261]: GetInteger64v (will be remapped) */
+ "ip\0"
+ "glGetInteger64v\0"
+ "\0"
+ /* _mesa_function_pool[15281]: TextureColorMaskSGIS (dynamic) */
+ "iiii\0"
+ "glTextureColorMaskSGIS\0"
+ "\0"
+ /* _mesa_function_pool[15310]: RasterPos2s (offset 68) */
+ "ii\0"
+ "glRasterPos2s\0"
+ "\0"
+ /* _mesa_function_pool[15328]: GetColorTable (offset 343) */
+ "iiip\0"
+ "glGetColorTable\0"
+ "glGetColorTableSGI\0"
+ "glGetColorTableEXT\0"
+ "\0"
+ /* _mesa_function_pool[15388]: SelectBuffer (offset 195) */
+ "ip\0"
+ "glSelectBuffer\0"
+ "\0"
+ /* _mesa_function_pool[15407]: Indexiv (offset 49) */
+ "p\0"
+ "glIndexiv\0"
+ "\0"
+ /* _mesa_function_pool[15420]: TexCoord3i (offset 114) */
+ "iii\0"
+ "glTexCoord3i\0"
+ "\0"
+ /* _mesa_function_pool[15438]: CopyColorTable (offset 342) */
+ "iiiii\0"
+ "glCopyColorTable\0"
+ "glCopyColorTableSGI\0"
+ "\0"
+ /* _mesa_function_pool[15482]: GetHistogramParameterfv (offset 362) */
+ "iip\0"
+ "glGetHistogramParameterfv\0"
+ "glGetHistogramParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[15542]: Frustum (offset 289) */
+ "dddddd\0"
+ "glFrustum\0"
+ "\0"
+ /* _mesa_function_pool[15560]: GetString (offset 275) */
+ "i\0"
+ "glGetString\0"
+ "\0"
+ /* _mesa_function_pool[15575]: ColorPointervINTEL (dynamic) */
+ "iip\0"
+ "glColorPointervINTEL\0"
+ "\0"
+ /* _mesa_function_pool[15601]: TexEnvf (offset 184) */
+ "iif\0"
+ "glTexEnvf\0"
+ "\0"
+ /* _mesa_function_pool[15616]: TexCoord3d (offset 110) */
+ "ddd\0"
+ "glTexCoord3d\0"
+ "\0"
+ /* _mesa_function_pool[15634]: AlphaFragmentOp1ATI (will be remapped) */
+ "iiiiii\0"
+ "glAlphaFragmentOp1ATI\0"
+ "\0"
+ /* _mesa_function_pool[15664]: TexCoord3f (offset 112) */
+ "fff\0"
+ "glTexCoord3f\0"
+ "\0"
+ /* _mesa_function_pool[15682]: MultiTexCoord3ivARB (offset 397) */
+ "ip\0"
+ "glMultiTexCoord3iv\0"
+ "glMultiTexCoord3ivARB\0"
+ "\0"
+ /* _mesa_function_pool[15727]: MultiTexCoord2sARB (offset 390) */
+ "iii\0"
+ "glMultiTexCoord2s\0"
+ "glMultiTexCoord2sARB\0"
+ "\0"
+ /* _mesa_function_pool[15771]: VertexAttrib1dvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1dv\0"
+ "glVertexAttrib1dvARB\0"
+ "\0"
+ /* _mesa_function_pool[15814]: DeleteTextures (offset 327) */
+ "ip\0"
+ "glDeleteTextures\0"
+ "glDeleteTexturesEXT\0"
+ "\0"
+ /* _mesa_function_pool[15855]: TexCoordPointerEXT (will be remapped) */
+ "iiiip\0"
+ "glTexCoordPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[15883]: TexSubImage4DSGIS (dynamic) */
+ "iiiiiiiiiiiip\0"
+ "glTexSubImage4DSGIS\0"
+ "\0"
+ /* _mesa_function_pool[15918]: TexCoord3s (offset 116) */
+ "iii\0"
+ "glTexCoord3s\0"
+ "\0"
+ /* _mesa_function_pool[15936]: GetTexLevelParameteriv (offset 285) */
+ "iiip\0"
+ "glGetTexLevelParameteriv\0"
+ "\0"
+ /* _mesa_function_pool[15967]: CombinerStageParameterfvNV (dynamic) */
+ "iip\0"
+ "glCombinerStageParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[16001]: StopInstrumentsSGIX (dynamic) */
+ "i\0"
+ "glStopInstrumentsSGIX\0"
+ "\0"
+ /* _mesa_function_pool[16026]: TexCoord4fColor4fNormal3fVertex4fSUN (dynamic) */
+ "fffffffffffffff\0"
+ "glTexCoord4fColor4fNormal3fVertex4fSUN\0"
+ "\0"
+ /* _mesa_function_pool[16082]: ClearAccum (offset 204) */
+ "ffff\0"
+ "glClearAccum\0"
+ "\0"
+ /* _mesa_function_pool[16101]: DeformSGIX (dynamic) */
+ "i\0"
+ "glDeformSGIX\0"
+ "\0"
+ /* _mesa_function_pool[16117]: GetVertexAttribfvARB (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribfv\0"
+ "glGetVertexAttribfvARB\0"
+ "\0"
+ /* _mesa_function_pool[16165]: SecondaryColor3ivEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3iv\0"
+ "glSecondaryColor3ivEXT\0"
+ "\0"
+ /* _mesa_function_pool[16211]: TexCoord4iv (offset 123) */
+ "p\0"
+ "glTexCoord4iv\0"
+ "\0"
+ /* _mesa_function_pool[16228]: VertexAttribI4uiEXT (will be remapped) */
+ "iiiii\0"
+ "glVertexAttribI4uiEXT\0"
+ "glVertexAttribI4ui\0"
+ "\0"
+ /* _mesa_function_pool[16276]: GetFragmentMaterialfvSGIX (dynamic) */
+ "iip\0"
+ "glGetFragmentMaterialfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[16309]: UniformMatrix4x2fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix4x2fv\0"
+ "\0"
+ /* _mesa_function_pool[16336]: GetDetailTexFuncSGIS (dynamic) */
+ "ip\0"
+ "glGetDetailTexFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[16363]: GetCombinerStageParameterfvNV (dynamic) */
+ "iip\0"
+ "glGetCombinerStageParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[16400]: PolygonOffset (offset 319) */
+ "ff\0"
+ "glPolygonOffset\0"
+ "\0"
+ /* _mesa_function_pool[16420]: BindVertexArray (will be remapped) */
+ "i\0"
+ "glBindVertexArray\0"
+ "\0"
+ /* _mesa_function_pool[16441]: Color4ubVertex2fvSUN (dynamic) */
+ "pp\0"
+ "glColor4ubVertex2fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[16468]: Rectd (offset 86) */
+ "dddd\0"
+ "glRectd\0"
+ "\0"
+ /* _mesa_function_pool[16482]: TexFilterFuncSGIS (dynamic) */
+ "iiip\0"
+ "glTexFilterFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[16508]: TextureBarrierNV (will be remapped) */
+ "\0"
+ "glTextureBarrierNV\0"
+ "\0"
+ /* _mesa_function_pool[16529]: VertexAttribI4ubvEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI4ubvEXT\0"
+ "glVertexAttribI4ubv\0"
+ "\0"
+ /* _mesa_function_pool[16576]: GetAttribLocationARB (will be remapped) */
+ "ip\0"
+ "glGetAttribLocation\0"
+ "glGetAttribLocationARB\0"
+ "\0"
+ /* _mesa_function_pool[16623]: RasterPos3i (offset 74) */
+ "iii\0"
+ "glRasterPos3i\0"
+ "\0"
+ /* _mesa_function_pool[16642]: BlendEquationSeparateiARB (will be remapped) */
+ "iii\0"
+ "glBlendEquationSeparateiARB\0"
+ "\0"
+ /* _mesa_function_pool[16675]: VertexAttrib4ubvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4ubv\0"
+ "glVertexAttrib4ubvARB\0"
+ "\0"
+ /* _mesa_function_pool[16720]: DetailTexFuncSGIS (dynamic) */
+ "iip\0"
+ "glDetailTexFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[16745]: Normal3fVertex3fSUN (dynamic) */
+ "ffffff\0"
+ "glNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[16775]: CopyTexImage2D (offset 324) */
+ "iiiiiiii\0"
+ "glCopyTexImage2D\0"
+ "glCopyTexImage2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[16822]: GetBufferPointervARB (will be remapped) */
+ "iip\0"
+ "glGetBufferPointerv\0"
+ "glGetBufferPointervARB\0"
+ "\0"
+ /* _mesa_function_pool[16870]: ProgramEnvParameter4fARB (will be remapped) */
+ "iiffff\0"
+ "glProgramEnvParameter4fARB\0"
+ "glProgramParameter4fNV\0"
+ "\0"
+ /* _mesa_function_pool[16928]: Uniform3ivARB (will be remapped) */
+ "iip\0"
+ "glUniform3iv\0"
+ "glUniform3ivARB\0"
+ "\0"
+ /* _mesa_function_pool[16962]: Lightfv (offset 160) */
+ "iip\0"
+ "glLightfv\0"
+ "\0"
+ /* _mesa_function_pool[16977]: PrimitiveRestartIndexNV (will be remapped) */
+ "i\0"
+ "glPrimitiveRestartIndexNV\0"
+ "glPrimitiveRestartIndex\0"
+ "\0"
+ /* _mesa_function_pool[17030]: ClearDepth (offset 208) */
+ "d\0"
+ "glClearDepth\0"
+ "\0"
+ /* _mesa_function_pool[17046]: GetFenceivNV (will be remapped) */
+ "iip\0"
+ "glGetFenceivNV\0"
+ "\0"
+ /* _mesa_function_pool[17066]: WindowPos4dvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos4dvMESA\0"
+ "\0"
+ /* _mesa_function_pool[17088]: ColorSubTable (offset 346) */
+ "iiiiip\0"
+ "glColorSubTable\0"
+ "glColorSubTableEXT\0"
+ "\0"
+ /* _mesa_function_pool[17131]: Color4fv (offset 30) */
+ "p\0"
+ "glColor4fv\0"
+ "\0"
+ /* _mesa_function_pool[17145]: MultiTexCoord4ivARB (offset 405) */
+ "ip\0"
+ "glMultiTexCoord4iv\0"
+ "glMultiTexCoord4ivARB\0"
+ "\0"
+ /* _mesa_function_pool[17190]: ProgramLocalParameters4fvEXT (will be remapped) */
+ "iiip\0"
+ "glProgramLocalParameters4fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[17227]: ColorPointer (offset 308) */
+ "iiip\0"
+ "glColorPointer\0"
+ "\0"
+ /* _mesa_function_pool[17248]: Rects (offset 92) */
+ "iiii\0"
+ "glRects\0"
+ "\0"
+ /* _mesa_function_pool[17262]: GetMapAttribParameterfvNV (dynamic) */
+ "iiip\0"
+ "glGetMapAttribParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[17296]: CreateShaderProgramEXT (will be remapped) */
+ "ip\0"
+ "glCreateShaderProgramEXT\0"
+ "\0"
+ /* _mesa_function_pool[17325]: ActiveProgramEXT (will be remapped) */
+ "i\0"
+ "glActiveProgramEXT\0"
+ "\0"
+ /* _mesa_function_pool[17347]: Lightiv (offset 162) */
+ "iip\0"
+ "glLightiv\0"
+ "\0"
+ /* _mesa_function_pool[17362]: VertexAttrib4sARB (will be remapped) */
+ "iiiii\0"
+ "glVertexAttrib4s\0"
+ "glVertexAttrib4sARB\0"
+ "\0"
+ /* _mesa_function_pool[17406]: GetQueryObjectuivARB (will be remapped) */
+ "iip\0"
+ "glGetQueryObjectuiv\0"
+ "glGetQueryObjectuivARB\0"
+ "\0"
+ /* _mesa_function_pool[17454]: GetTexParameteriv (offset 283) */
+ "iip\0"
+ "glGetTexParameteriv\0"
+ "\0"
+ /* _mesa_function_pool[17479]: MapParameterivNV (dynamic) */
+ "iip\0"
+ "glMapParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[17503]: GenRenderbuffersEXT (will be remapped) */
+ "ip\0"
+ "glGenRenderbuffers\0"
+ "glGenRenderbuffersEXT\0"
+ "\0"
+ /* _mesa_function_pool[17548]: ClearBufferfv (will be remapped) */
+ "iip\0"
+ "glClearBufferfv\0"
+ "\0"
+ /* _mesa_function_pool[17569]: VertexAttrib2dvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2dv\0"
+ "glVertexAttrib2dvARB\0"
+ "\0"
+ /* _mesa_function_pool[17612]: EdgeFlagPointerEXT (will be remapped) */
+ "iip\0"
+ "glEdgeFlagPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[17638]: VertexAttribs2svNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs2svNV\0"
+ "\0"
+ /* _mesa_function_pool[17664]: WeightbvARB (dynamic) */
+ "ip\0"
+ "glWeightbvARB\0"
+ "\0"
+ /* _mesa_function_pool[17682]: VertexAttrib2fvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2fv\0"
+ "glVertexAttrib2fvARB\0"
+ "\0"
+ /* _mesa_function_pool[17725]: GetBufferParameterivARB (will be remapped) */
+ "iip\0"
+ "glGetBufferParameteriv\0"
+ "glGetBufferParameterivARB\0"
+ "\0"
+ /* _mesa_function_pool[17779]: Rectdv (offset 87) */
+ "pp\0"
+ "glRectdv\0"
+ "\0"
+ /* _mesa_function_pool[17792]: ListParameteriSGIX (dynamic) */
+ "iii\0"
+ "glListParameteriSGIX\0"
+ "\0"
+ /* _mesa_function_pool[17818]: BlendEquationiARB (will be remapped) */
+ "ii\0"
+ "glBlendEquationiARB\0"
+ "\0"
+ /* _mesa_function_pool[17842]: ReplacementCodeuiColor4fNormal3fVertex3fSUN (dynamic) */
+ "iffffffffff\0"
+ "glReplacementCodeuiColor4fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[17901]: InstrumentsBufferSGIX (dynamic) */
+ "ip\0"
+ "glInstrumentsBufferSGIX\0"
+ "\0"
+ /* _mesa_function_pool[17929]: VertexAttrib4NivARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Niv\0"
+ "glVertexAttrib4NivARB\0"
+ "\0"
+ /* _mesa_function_pool[17974]: DrawArraysInstancedARB (will be remapped) */
+ "iiii\0"
+ "glDrawArraysInstancedARB\0"
+ "glDrawArraysInstancedEXT\0"
+ "glDrawArraysInstanced\0"
+ "\0"
+ /* _mesa_function_pool[18052]: GetAttachedShaders (will be remapped) */
+ "iipp\0"
+ "glGetAttachedShaders\0"
+ "\0"
+ /* _mesa_function_pool[18079]: GenVertexArraysAPPLE (will be remapped) */
+ "ip\0"
+ "glGenVertexArraysAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[18106]: ClearBufferfi (will be remapped) */
+ "iifi\0"
+ "glClearBufferfi\0"
+ "\0"
+ /* _mesa_function_pool[18128]: Materialiv (offset 172) */
+ "iip\0"
+ "glMaterialiv\0"
+ "\0"
+ /* _mesa_function_pool[18146]: PushClientAttrib (offset 335) */
+ "i\0"
+ "glPushClientAttrib\0"
+ "\0"
+ /* _mesa_function_pool[18168]: ProgramEnvParameters4fvEXT (will be remapped) */
+ "iiip\0"
+ "glProgramEnvParameters4fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[18203]: TexCoord2fColor4fNormal3fVertex3fvSUN (dynamic) */
+ "pppp\0"
+ "glTexCoord2fColor4fNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[18249]: WindowPos2iMESA (will be remapped) */
+ "ii\0"
+ "glWindowPos2i\0"
+ "glWindowPos2iARB\0"
+ "glWindowPos2iMESA\0"
+ "\0"
+ /* _mesa_function_pool[18302]: SampleMaskSGIS (will be remapped) */
+ "fi\0"
+ "glSampleMaskSGIS\0"
+ "glSampleMaskEXT\0"
+ "\0"
+ /* _mesa_function_pool[18339]: SecondaryColor3fvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3fv\0"
+ "glSecondaryColor3fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[18385]: PolygonMode (offset 174) */
+ "ii\0"
+ "glPolygonMode\0"
+ "\0"
+ /* _mesa_function_pool[18403]: CompressedTexSubImage1DARB (will be remapped) */
+ "iiiiiip\0"
+ "glCompressedTexSubImage1D\0"
+ "glCompressedTexSubImage1DARB\0"
+ "\0"
+ /* _mesa_function_pool[18467]: VertexAttribI1iEXT (will be remapped) */
+ "ii\0"
+ "glVertexAttribI1iEXT\0"
+ "glVertexAttribI1i\0"
+ "\0"
+ /* _mesa_function_pool[18510]: GetVertexAttribivNV (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribivNV\0"
+ "\0"
+ /* _mesa_function_pool[18537]: GetProgramStringARB (will be remapped) */
+ "iip\0"
+ "glGetProgramStringARB\0"
+ "\0"
+ /* _mesa_function_pool[18564]: VertexAttribIPointerEXT (will be remapped) */
+ "iiiip\0"
+ "glVertexAttribIPointerEXT\0"
+ "glVertexAttribIPointer\0"
+ "\0"
+ /* _mesa_function_pool[18620]: TexBumpParameterfvATI (will be remapped) */
+ "ip\0"
+ "glTexBumpParameterfvATI\0"
+ "\0"
+ /* _mesa_function_pool[18648]: CompileShaderARB (will be remapped) */
+ "i\0"
+ "glCompileShader\0"
+ "glCompileShaderARB\0"
+ "\0"
+ /* _mesa_function_pool[18686]: DeleteShader (will be remapped) */
+ "i\0"
+ "glDeleteShader\0"
+ "\0"
+ /* _mesa_function_pool[18704]: DisableClientState (offset 309) */
+ "i\0"
+ "glDisableClientState\0"
+ "\0"
+ /* _mesa_function_pool[18728]: TexGeni (offset 192) */
+ "iii\0"
+ "glTexGeni\0"
+ "\0"
+ /* _mesa_function_pool[18743]: TexGenf (offset 190) */
+ "iif\0"
+ "glTexGenf\0"
+ "\0"
+ /* _mesa_function_pool[18758]: Uniform3fARB (will be remapped) */
+ "ifff\0"
+ "glUniform3f\0"
+ "glUniform3fARB\0"
+ "\0"
+ /* _mesa_function_pool[18791]: TexGend (offset 188) */
+ "iid\0"
+ "glTexGend\0"
+ "\0"
+ /* _mesa_function_pool[18806]: ListParameterfvSGIX (dynamic) */
+ "iip\0"
+ "glListParameterfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[18833]: GetPolygonStipple (offset 274) */
+ "p\0"
+ "glGetPolygonStipple\0"
+ "\0"
+ /* _mesa_function_pool[18856]: Tangent3dvEXT (dynamic) */
+ "p\0"
+ "glTangent3dvEXT\0"
+ "\0"
+ /* _mesa_function_pool[18875]: BindBufferOffsetEXT (will be remapped) */
+ "iiii\0"
+ "glBindBufferOffsetEXT\0"
+ "\0"
+ /* _mesa_function_pool[18903]: WindowPos3sMESA (will be remapped) */
+ "iii\0"
+ "glWindowPos3s\0"
+ "glWindowPos3sARB\0"
+ "glWindowPos3sMESA\0"
+ "\0"
+ /* _mesa_function_pool[18957]: VertexAttrib2svNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2svNV\0"
+ "\0"
+ /* _mesa_function_pool[18981]: DisableIndexedEXT (will be remapped) */
+ "ii\0"
+ "glDisableIndexedEXT\0"
+ "glDisablei\0"
+ "\0"
+ /* _mesa_function_pool[19016]: BindBufferBaseEXT (will be remapped) */
+ "iii\0"
+ "glBindBufferBaseEXT\0"
+ "glBindBufferBase\0"
+ "\0"
+ /* _mesa_function_pool[19058]: TexCoord2fVertex3fvSUN (dynamic) */
+ "pp\0"
+ "glTexCoord2fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[19087]: WindowPos4sMESA (will be remapped) */
+ "iiii\0"
+ "glWindowPos4sMESA\0"
+ "\0"
+ /* _mesa_function_pool[19111]: VertexAttrib4NuivARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Nuiv\0"
+ "glVertexAttrib4NuivARB\0"
+ "\0"
+ /* _mesa_function_pool[19158]: ClientActiveTextureARB (offset 375) */
+ "i\0"
+ "glClientActiveTexture\0"
+ "glClientActiveTextureARB\0"
+ "\0"
+ /* _mesa_function_pool[19208]: PixelTexGenSGIX (will be remapped) */
+ "i\0"
+ "glPixelTexGenSGIX\0"
+ "\0"
+ /* _mesa_function_pool[19229]: ReplacementCodeusvSUN (dynamic) */
+ "p\0"
+ "glReplacementCodeusvSUN\0"
+ "\0"
+ /* _mesa_function_pool[19256]: Uniform4fARB (will be remapped) */
+ "iffff\0"
+ "glUniform4f\0"
+ "glUniform4fARB\0"
+ "\0"
+ /* _mesa_function_pool[19290]: Color4sv (offset 34) */
+ "p\0"
+ "glColor4sv\0"
+ "\0"
+ /* _mesa_function_pool[19304]: FlushMappedBufferRange (will be remapped) */
+ "iii\0"
+ "glFlushMappedBufferRange\0"
+ "\0"
+ /* _mesa_function_pool[19334]: IsProgramNV (will be remapped) */
+ "i\0"
+ "glIsProgramARB\0"
+ "glIsProgramNV\0"
+ "\0"
+ /* _mesa_function_pool[19366]: FlushMappedBufferRangeAPPLE (will be remapped) */
+ "iii\0"
+ "glFlushMappedBufferRangeAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[19401]: PixelZoom (offset 246) */
+ "ff\0"
+ "glPixelZoom\0"
+ "\0"
+ /* _mesa_function_pool[19417]: ReplacementCodePointerSUN (dynamic) */
+ "iip\0"
+ "glReplacementCodePointerSUN\0"
+ "\0"
+ /* _mesa_function_pool[19450]: ProgramEnvParameter4dARB (will be remapped) */
+ "iidddd\0"
+ "glProgramEnvParameter4dARB\0"
+ "glProgramParameter4dNV\0"
+ "\0"
+ /* _mesa_function_pool[19508]: ColorTableParameterfv (offset 340) */
+ "iip\0"
+ "glColorTableParameterfv\0"
+ "glColorTableParameterfvSGI\0"
+ "\0"
+ /* _mesa_function_pool[19564]: FragmentLightModelfSGIX (dynamic) */
+ "if\0"
+ "glFragmentLightModelfSGIX\0"
+ "\0"
+ /* _mesa_function_pool[19594]: Binormal3bvEXT (dynamic) */
+ "p\0"
+ "glBinormal3bvEXT\0"
+ "\0"
+ /* _mesa_function_pool[19614]: PixelMapuiv (offset 252) */
+ "iip\0"
+ "glPixelMapuiv\0"
+ "\0"
+ /* _mesa_function_pool[19633]: Color3dv (offset 12) */
+ "p\0"
+ "glColor3dv\0"
+ "\0"
+ /* _mesa_function_pool[19647]: IsTexture (offset 330) */
+ "i\0"
+ "glIsTexture\0"
+ "glIsTextureEXT\0"
+ "\0"
+ /* _mesa_function_pool[19677]: VertexWeightfvEXT (dynamic) */
+ "p\0"
+ "glVertexWeightfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[19700]: VertexAttrib1dARB (will be remapped) */
+ "id\0"
+ "glVertexAttrib1d\0"
+ "glVertexAttrib1dARB\0"
+ "\0"
+ /* _mesa_function_pool[19741]: ImageTransformParameterivHP (dynamic) */
+ "iip\0"
+ "glImageTransformParameterivHP\0"
+ "\0"
+ /* _mesa_function_pool[19776]: TexCoord4i (offset 122) */
+ "iiii\0"
+ "glTexCoord4i\0"
+ "\0"
+ /* _mesa_function_pool[19795]: DeleteQueriesARB (will be remapped) */
+ "ip\0"
+ "glDeleteQueries\0"
+ "glDeleteQueriesARB\0"
+ "\0"
+ /* _mesa_function_pool[19834]: Color4ubVertex2fSUN (dynamic) */
+ "iiiiff\0"
+ "glColor4ubVertex2fSUN\0"
+ "\0"
+ /* _mesa_function_pool[19864]: FragmentColorMaterialSGIX (dynamic) */
+ "ii\0"
+ "glFragmentColorMaterialSGIX\0"
+ "\0"
+ /* _mesa_function_pool[19896]: CurrentPaletteMatrixARB (dynamic) */
+ "i\0"
+ "glCurrentPaletteMatrixARB\0"
+ "\0"
+ /* _mesa_function_pool[19925]: GetMapdv (offset 266) */
+ "iip\0"
+ "glGetMapdv\0"
+ "\0"
+ /* _mesa_function_pool[19941]: ObjectPurgeableAPPLE (will be remapped) */
+ "iii\0"
+ "glObjectPurgeableAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[19969]: GetStringi (will be remapped) */
+ "ii\0"
+ "glGetStringi\0"
+ "\0"
+ /* _mesa_function_pool[19986]: SamplePatternSGIS (will be remapped) */
+ "i\0"
+ "glSamplePatternSGIS\0"
+ "glSamplePatternEXT\0"
+ "\0"
+ /* _mesa_function_pool[20028]: PixelStoref (offset 249) */
+ "if\0"
+ "glPixelStoref\0"
+ "\0"
+ /* _mesa_function_pool[20046]: IsQueryARB (will be remapped) */
+ "i\0"
+ "glIsQuery\0"
+ "glIsQueryARB\0"
+ "\0"
+ /* _mesa_function_pool[20072]: ReplacementCodeuiColor4ubVertex3fSUN (dynamic) */
+ "iiiiifff\0"
+ "glReplacementCodeuiColor4ubVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[20121]: PixelStorei (offset 250) */
+ "ii\0"
+ "glPixelStorei\0"
+ "\0"
+ /* _mesa_function_pool[20139]: VertexAttrib4usvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4usv\0"
+ "glVertexAttrib4usvARB\0"
+ "\0"
+ /* _mesa_function_pool[20184]: LinkProgramARB (will be remapped) */
+ "i\0"
+ "glLinkProgram\0"
+ "glLinkProgramARB\0"
+ "\0"
+ /* _mesa_function_pool[20218]: VertexAttrib2fNV (will be remapped) */
+ "iff\0"
+ "glVertexAttrib2fNV\0"
+ "\0"
+ /* _mesa_function_pool[20242]: ShaderSourceARB (will be remapped) */
+ "iipp\0"
+ "glShaderSource\0"
+ "glShaderSourceARB\0"
+ "\0"
+ /* _mesa_function_pool[20281]: FragmentMaterialiSGIX (dynamic) */
+ "iii\0"
+ "glFragmentMaterialiSGIX\0"
+ "\0"
+ /* _mesa_function_pool[20310]: EvalCoord2dv (offset 233) */
+ "p\0"
+ "glEvalCoord2dv\0"
+ "\0"
+ /* _mesa_function_pool[20328]: VertexAttrib3svARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3sv\0"
+ "glVertexAttrib3svARB\0"
+ "\0"
+ /* _mesa_function_pool[20371]: ColorMaterial (offset 151) */
+ "ii\0"
+ "glColorMaterial\0"
+ "\0"
+ /* _mesa_function_pool[20391]: CompressedTexSubImage3DARB (will be remapped) */
+ "iiiiiiiiiip\0"
+ "glCompressedTexSubImage3D\0"
+ "glCompressedTexSubImage3DARB\0"
+ "\0"
+ /* _mesa_function_pool[20459]: WindowPos2ivMESA (will be remapped) */
+ "p\0"
+ "glWindowPos2iv\0"
+ "glWindowPos2ivARB\0"
+ "glWindowPos2ivMESA\0"
+ "\0"
+ /* _mesa_function_pool[20514]: IsFramebufferEXT (will be remapped) */
+ "i\0"
+ "glIsFramebuffer\0"
+ "glIsFramebufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[20552]: Uniform4ivARB (will be remapped) */
+ "iip\0"
+ "glUniform4iv\0"
+ "glUniform4ivARB\0"
+ "\0"
+ /* _mesa_function_pool[20586]: GetVertexAttribdvARB (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribdv\0"
+ "glGetVertexAttribdvARB\0"
+ "\0"
+ /* _mesa_function_pool[20634]: TexBumpParameterivATI (will be remapped) */
+ "ip\0"
+ "glTexBumpParameterivATI\0"
+ "\0"
+ /* _mesa_function_pool[20662]: GetSeparableFilter (offset 359) */
+ "iiippp\0"
+ "glGetSeparableFilter\0"
+ "glGetSeparableFilterEXT\0"
+ "\0"
+ /* _mesa_function_pool[20715]: Binormal3dEXT (dynamic) */
+ "ddd\0"
+ "glBinormal3dEXT\0"
+ "\0"
+ /* _mesa_function_pool[20736]: SpriteParameteriSGIX (dynamic) */
+ "ii\0"
+ "glSpriteParameteriSGIX\0"
+ "\0"
+ /* _mesa_function_pool[20763]: RequestResidentProgramsNV (will be remapped) */
+ "ip\0"
+ "glRequestResidentProgramsNV\0"
+ "\0"
+ /* _mesa_function_pool[20795]: TagSampleBufferSGIX (dynamic) */
+ "\0"
+ "glTagSampleBufferSGIX\0"
+ "\0"
+ /* _mesa_function_pool[20819]: TransformFeedbackVaryingsEXT (will be remapped) */
+ "iipi\0"
+ "glTransformFeedbackVaryingsEXT\0"
+ "glTransformFeedbackVaryings\0"
+ "\0"
+ /* _mesa_function_pool[20884]: FeedbackBuffer (offset 194) */
+ "iip\0"
+ "glFeedbackBuffer\0"
+ "\0"
+ /* _mesa_function_pool[20906]: RasterPos2iv (offset 67) */
+ "p\0"
+ "glRasterPos2iv\0"
+ "\0"
+ /* _mesa_function_pool[20924]: TexImage1D (offset 182) */
+ "iiiiiiip\0"
+ "glTexImage1D\0"
+ "\0"
+ /* _mesa_function_pool[20947]: ListParameterivSGIX (dynamic) */
+ "iip\0"
+ "glListParameterivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[20974]: MultiDrawElementsEXT (will be remapped) */
+ "ipipi\0"
+ "glMultiDrawElements\0"
+ "glMultiDrawElementsEXT\0"
+ "\0"
+ /* _mesa_function_pool[21024]: Color3s (offset 17) */
+ "iii\0"
+ "glColor3s\0"
+ "\0"
+ /* _mesa_function_pool[21039]: Uniform1ivARB (will be remapped) */
+ "iip\0"
+ "glUniform1iv\0"
+ "glUniform1ivARB\0"
+ "\0"
+ /* _mesa_function_pool[21073]: WindowPos2sMESA (will be remapped) */
+ "ii\0"
+ "glWindowPos2s\0"
+ "glWindowPos2sARB\0"
+ "glWindowPos2sMESA\0"
+ "\0"
+ /* _mesa_function_pool[21126]: WeightusvARB (dynamic) */
+ "ip\0"
+ "glWeightusvARB\0"
+ "\0"
+ /* _mesa_function_pool[21145]: TexCoordPointer (offset 320) */
+ "iiip\0"
+ "glTexCoordPointer\0"
+ "\0"
+ /* _mesa_function_pool[21169]: FogCoordPointerEXT (will be remapped) */
+ "iip\0"
+ "glFogCoordPointer\0"
+ "glFogCoordPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[21213]: IndexMaterialEXT (dynamic) */
+ "ii\0"
+ "glIndexMaterialEXT\0"
+ "\0"
+ /* _mesa_function_pool[21236]: Color3i (offset 15) */
+ "iii\0"
+ "glColor3i\0"
+ "\0"
+ /* _mesa_function_pool[21251]: FrontFace (offset 157) */
+ "i\0"
+ "glFrontFace\0"
+ "\0"
+ /* _mesa_function_pool[21266]: EvalCoord2d (offset 232) */
+ "dd\0"
+ "glEvalCoord2d\0"
+ "\0"
+ /* _mesa_function_pool[21284]: SecondaryColor3ubvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3ubv\0"
+ "glSecondaryColor3ubvEXT\0"
+ "\0"
+ /* _mesa_function_pool[21332]: EvalCoord2f (offset 234) */
+ "ff\0"
+ "glEvalCoord2f\0"
+ "\0"
+ /* _mesa_function_pool[21350]: VertexAttrib4dvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4dv\0"
+ "glVertexAttrib4dvARB\0"
+ "\0"
+ /* _mesa_function_pool[21393]: BindAttribLocationARB (will be remapped) */
+ "iip\0"
+ "glBindAttribLocation\0"
+ "glBindAttribLocationARB\0"
+ "\0"
+ /* _mesa_function_pool[21443]: Color3b (offset 9) */
+ "iii\0"
+ "glColor3b\0"
+ "\0"
+ /* _mesa_function_pool[21458]: MultiTexCoord2dARB (offset 384) */
+ "idd\0"
+ "glMultiTexCoord2d\0"
+ "glMultiTexCoord2dARB\0"
+ "\0"
+ /* _mesa_function_pool[21502]: ExecuteProgramNV (will be remapped) */
+ "iip\0"
+ "glExecuteProgramNV\0"
+ "\0"
+ /* _mesa_function_pool[21526]: Color3f (offset 13) */
+ "fff\0"
+ "glColor3f\0"
+ "\0"
+ /* _mesa_function_pool[21541]: LightEnviSGIX (dynamic) */
+ "ii\0"
+ "glLightEnviSGIX\0"
+ "\0"
+ /* _mesa_function_pool[21561]: Color3d (offset 11) */
+ "ddd\0"
+ "glColor3d\0"
+ "\0"
+ /* _mesa_function_pool[21576]: Normal3dv (offset 55) */
+ "p\0"
+ "glNormal3dv\0"
+ "\0"
+ /* _mesa_function_pool[21591]: Lightf (offset 159) */
+ "iif\0"
+ "glLightf\0"
+ "\0"
+ /* _mesa_function_pool[21605]: ReplacementCodeuiSUN (dynamic) */
+ "i\0"
+ "glReplacementCodeuiSUN\0"
+ "\0"
+ /* _mesa_function_pool[21631]: MatrixMode (offset 293) */
+ "i\0"
+ "glMatrixMode\0"
+ "\0"
+ /* _mesa_function_pool[21647]: GetPixelMapusv (offset 273) */
+ "ip\0"
+ "glGetPixelMapusv\0"
+ "\0"
+ /* _mesa_function_pool[21668]: Lighti (offset 161) */
+ "iii\0"
+ "glLighti\0"
+ "\0"
+ /* _mesa_function_pool[21682]: VertexAttribPointerNV (will be remapped) */
+ "iiiip\0"
+ "glVertexAttribPointerNV\0"
+ "\0"
+ /* _mesa_function_pool[21713]: ClearDepthf (will be remapped) */
+ "f\0"
+ "glClearDepthf\0"
+ "\0"
+ /* _mesa_function_pool[21730]: GetBooleanIndexedvEXT (will be remapped) */
+ "iip\0"
+ "glGetBooleanIndexedvEXT\0"
+ "glGetBooleani_v\0"
+ "\0"
+ /* _mesa_function_pool[21775]: GetFramebufferAttachmentParameterivEXT (will be remapped) */
+ "iiip\0"
+ "glGetFramebufferAttachmentParameteriv\0"
+ "glGetFramebufferAttachmentParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[21860]: PixelTransformParameterfEXT (dynamic) */
+ "iif\0"
+ "glPixelTransformParameterfEXT\0"
+ "\0"
+ /* _mesa_function_pool[21895]: MultiTexCoord4dvARB (offset 401) */
+ "ip\0"
+ "glMultiTexCoord4dv\0"
+ "glMultiTexCoord4dvARB\0"
+ "\0"
+ /* _mesa_function_pool[21940]: PixelTransformParameteriEXT (dynamic) */
+ "iii\0"
+ "glPixelTransformParameteriEXT\0"
+ "\0"
+ /* _mesa_function_pool[21975]: GetDoublev (offset 260) */
+ "ip\0"
+ "glGetDoublev\0"
+ "\0"
+ /* _mesa_function_pool[21992]: MultMatrixd (offset 295) */
+ "p\0"
+ "glMultMatrixd\0"
+ "\0"
+ /* _mesa_function_pool[22009]: MultMatrixf (offset 294) */
+ "p\0"
+ "glMultMatrixf\0"
+ "\0"
+ /* _mesa_function_pool[22026]: VertexAttribI4bvEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI4bvEXT\0"
+ "glVertexAttribI4bv\0"
+ "\0"
+ /* _mesa_function_pool[22071]: TexCoord2fColor4ubVertex3fSUN (dynamic) */
+ "ffiiiifff\0"
+ "glTexCoord2fColor4ubVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[22114]: Uniform1iARB (will be remapped) */
+ "ii\0"
+ "glUniform1i\0"
+ "glUniform1iARB\0"
+ "\0"
+ /* _mesa_function_pool[22145]: VertexAttribPointerARB (will be remapped) */
+ "iiiiip\0"
+ "glVertexAttribPointer\0"
+ "glVertexAttribPointerARB\0"
+ "\0"
+ /* _mesa_function_pool[22200]: VertexAttrib3sNV (will be remapped) */
+ "iiii\0"
+ "glVertexAttrib3sNV\0"
+ "\0"
+ /* _mesa_function_pool[22225]: SharpenTexFuncSGIS (dynamic) */
+ "iip\0"
+ "glSharpenTexFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[22251]: MultiTexCoord4fvARB (offset 403) */
+ "ip\0"
+ "glMultiTexCoord4fv\0"
+ "glMultiTexCoord4fvARB\0"
+ "\0"
+ /* _mesa_function_pool[22296]: Uniform2uiEXT (will be remapped) */
+ "iii\0"
+ "glUniform2uiEXT\0"
+ "glUniform2ui\0"
+ "\0"
+ /* _mesa_function_pool[22330]: UniformMatrix2x3fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix2x3fv\0"
+ "\0"
+ /* _mesa_function_pool[22357]: TrackMatrixNV (will be remapped) */
+ "iiii\0"
+ "glTrackMatrixNV\0"
+ "\0"
+ /* _mesa_function_pool[22379]: CombinerParameteriNV (will be remapped) */
+ "ii\0"
+ "glCombinerParameteriNV\0"
+ "\0"
+ /* _mesa_function_pool[22406]: DeleteAsyncMarkersSGIX (dynamic) */
+ "ii\0"
+ "glDeleteAsyncMarkersSGIX\0"
+ "\0"
+ /* _mesa_function_pool[22435]: ReplacementCodeusSUN (dynamic) */
+ "i\0"
+ "glReplacementCodeusSUN\0"
+ "\0"
+ /* _mesa_function_pool[22461]: IsAsyncMarkerSGIX (dynamic) */
+ "i\0"
+ "glIsAsyncMarkerSGIX\0"
+ "\0"
+ /* _mesa_function_pool[22484]: FrameZoomSGIX (dynamic) */
+ "i\0"
+ "glFrameZoomSGIX\0"
+ "\0"
+ /* _mesa_function_pool[22503]: Normal3fVertex3fvSUN (dynamic) */
+ "pp\0"
+ "glNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[22530]: RasterPos4sv (offset 85) */
+ "p\0"
+ "glRasterPos4sv\0"
+ "\0"
+ /* _mesa_function_pool[22548]: VertexAttrib4NsvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Nsv\0"
+ "glVertexAttrib4NsvARB\0"
+ "\0"
+ /* _mesa_function_pool[22593]: VertexAttrib3fvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3fv\0"
+ "glVertexAttrib3fvARB\0"
+ "\0"
+ /* _mesa_function_pool[22636]: ClearColor (offset 206) */
+ "ffff\0"
+ "glClearColor\0"
+ "\0"
+ /* _mesa_function_pool[22655]: GetSynciv (will be remapped) */
+ "iiipp\0"
+ "glGetSynciv\0"
+ "\0"
+ /* _mesa_function_pool[22674]: ClearColorIiEXT (will be remapped) */
+ "iiii\0"
+ "glClearColorIiEXT\0"
+ "\0"
+ /* _mesa_function_pool[22698]: DeleteFramebuffersEXT (will be remapped) */
+ "ip\0"
+ "glDeleteFramebuffers\0"
+ "glDeleteFramebuffersEXT\0"
+ "\0"
+ /* _mesa_function_pool[22747]: GlobalAlphaFactorsSUN (dynamic) */
+ "i\0"
+ "glGlobalAlphaFactorsSUN\0"
+ "\0"
+ /* _mesa_function_pool[22774]: IsEnabledIndexedEXT (will be remapped) */
+ "ii\0"
+ "glIsEnabledIndexedEXT\0"
+ "glIsEnabledi\0"
+ "\0"
+ /* _mesa_function_pool[22813]: TexEnviv (offset 187) */
+ "iip\0"
+ "glTexEnviv\0"
+ "\0"
+ /* _mesa_function_pool[22829]: TexSubImage3D (offset 372) */
+ "iiiiiiiiiip\0"
+ "glTexSubImage3D\0"
+ "glTexSubImage3DEXT\0"
+ "\0"
+ /* _mesa_function_pool[22877]: Tangent3fEXT (dynamic) */
+ "fff\0"
+ "glTangent3fEXT\0"
+ "\0"
+ /* _mesa_function_pool[22897]: SecondaryColor3uivEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3uiv\0"
+ "glSecondaryColor3uivEXT\0"
+ "\0"
+ /* _mesa_function_pool[22945]: MatrixIndexubvARB (dynamic) */
+ "ip\0"
+ "glMatrixIndexubvARB\0"
+ "\0"
+ /* _mesa_function_pool[22969]: Color4fNormal3fVertex3fSUN (dynamic) */
+ "ffffffffff\0"
+ "glColor4fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[23010]: PixelTexGenParameterfSGIS (will be remapped) */
+ "if\0"
+ "glPixelTexGenParameterfSGIS\0"
+ "\0"
+ /* _mesa_function_pool[23042]: CreateShader (will be remapped) */
+ "i\0"
+ "glCreateShader\0"
+ "\0"
+ /* _mesa_function_pool[23060]: GetColorTableParameterfv (offset 344) */
+ "iip\0"
+ "glGetColorTableParameterfv\0"
+ "glGetColorTableParameterfvSGI\0"
+ "glGetColorTableParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[23152]: FragmentLightModelfvSGIX (dynamic) */
+ "ip\0"
+ "glFragmentLightModelfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[23183]: Bitmap (offset 8) */
+ "iiffffp\0"
+ "glBitmap\0"
+ "\0"
+ /* _mesa_function_pool[23201]: MultiTexCoord3fARB (offset 394) */
+ "ifff\0"
+ "glMultiTexCoord3f\0"
+ "glMultiTexCoord3fARB\0"
+ "\0"
+ /* _mesa_function_pool[23246]: GetTexLevelParameterfv (offset 284) */
+ "iiip\0"
+ "glGetTexLevelParameterfv\0"
+ "\0"
+ /* _mesa_function_pool[23277]: GetPixelTexGenParameterfvSGIS (will be remapped) */
+ "ip\0"
+ "glGetPixelTexGenParameterfvSGIS\0"
+ "\0"
+ /* _mesa_function_pool[23313]: GenFramebuffersEXT (will be remapped) */
+ "ip\0"
+ "glGenFramebuffers\0"
+ "glGenFramebuffersEXT\0"
+ "\0"
+ /* _mesa_function_pool[23356]: VertexAttribDivisor (will be remapped) */
+ "ii\0"
+ "glVertexAttribDivisor\0"
+ "\0"
+ /* _mesa_function_pool[23382]: GetProgramParameterdvNV (will be remapped) */
+ "iiip\0"
+ "glGetProgramParameterdvNV\0"
+ "\0"
+ /* _mesa_function_pool[23414]: Vertex2sv (offset 133) */
+ "p\0"
+ "glVertex2sv\0"
+ "\0"
+ /* _mesa_function_pool[23429]: GetIntegerv (offset 263) */
+ "ip\0"
+ "glGetIntegerv\0"
+ "\0"
+ /* _mesa_function_pool[23447]: IsVertexArrayAPPLE (will be remapped) */
+ "i\0"
+ "glIsVertexArray\0"
+ "glIsVertexArrayAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[23487]: FragmentLightfvSGIX (dynamic) */
+ "iip\0"
+ "glFragmentLightfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[23514]: VertexAttribDivisorARB (will be remapped) */
+ "ii\0"
+ "glVertexAttribDivisorARB\0"
+ "\0"
+ /* _mesa_function_pool[23543]: DetachShader (will be remapped) */
+ "ii\0"
+ "glDetachShader\0"
+ "\0"
+ /* _mesa_function_pool[23562]: VertexAttrib4NubARB (will be remapped) */
+ "iiiii\0"
+ "glVertexAttrib4Nub\0"
+ "glVertexAttrib4NubARB\0"
+ "\0"
+ /* _mesa_function_pool[23610]: GetProgramEnvParameterfvARB (will be remapped) */
+ "iip\0"
+ "glGetProgramEnvParameterfvARB\0"
+ "\0"
+ /* _mesa_function_pool[23645]: GetTrackMatrixivNV (will be remapped) */
+ "iiip\0"
+ "glGetTrackMatrixivNV\0"
+ "\0"
+ /* _mesa_function_pool[23672]: VertexAttrib3svNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3svNV\0"
+ "\0"
+ /* _mesa_function_pool[23696]: Uniform4fvARB (will be remapped) */
+ "iip\0"
+ "glUniform4fv\0"
+ "glUniform4fvARB\0"
+ "\0"
+ /* _mesa_function_pool[23730]: MultTransposeMatrixfARB (will be remapped) */
+ "p\0"
+ "glMultTransposeMatrixf\0"
+ "glMultTransposeMatrixfARB\0"
+ "\0"
+ /* _mesa_function_pool[23782]: GetTexEnviv (offset 277) */
+ "iip\0"
+ "glGetTexEnviv\0"
+ "\0"
+ /* _mesa_function_pool[23801]: ColorFragmentOp1ATI (will be remapped) */
+ "iiiiiii\0"
+ "glColorFragmentOp1ATI\0"
+ "\0"
+ /* _mesa_function_pool[23832]: GetUniformfvARB (will be remapped) */
+ "iip\0"
+ "glGetUniformfv\0"
+ "glGetUniformfvARB\0"
+ "\0"
+ /* _mesa_function_pool[23870]: EGLImageTargetRenderbufferStorageOES (will be remapped) */
+ "ip\0"
+ "glEGLImageTargetRenderbufferStorageOES\0"
+ "\0"
+ /* _mesa_function_pool[23913]: VertexAttribI2ivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI2ivEXT\0"
+ "glVertexAttribI2iv\0"
+ "\0"
+ /* _mesa_function_pool[23958]: PopClientAttrib (offset 334) */
+ "\0"
+ "glPopClientAttrib\0"
+ "\0"
+ /* _mesa_function_pool[23978]: ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (dynamic) */
+ "iffffffffffff\0"
+ "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[24049]: DetachObjectARB (will be remapped) */
+ "ii\0"
+ "glDetachObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[24071]: VertexBlendARB (dynamic) */
+ "i\0"
+ "glVertexBlendARB\0"
+ "\0"
+ /* _mesa_function_pool[24091]: WindowPos3iMESA (will be remapped) */
+ "iii\0"
+ "glWindowPos3i\0"
+ "glWindowPos3iARB\0"
+ "glWindowPos3iMESA\0"
+ "\0"
+ /* _mesa_function_pool[24145]: SeparableFilter2D (offset 360) */
+ "iiiiiipp\0"
+ "glSeparableFilter2D\0"
+ "glSeparableFilter2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[24198]: ProgramParameteriARB (will be remapped) */
+ "iii\0"
+ "glProgramParameteriARB\0"
+ "\0"
+ /* _mesa_function_pool[24226]: Map1d (offset 220) */
+ "iddiip\0"
+ "glMap1d\0"
+ "\0"
+ /* _mesa_function_pool[24242]: Map1f (offset 221) */
+ "iffiip\0"
+ "glMap1f\0"
+ "\0"
+ /* _mesa_function_pool[24258]: CompressedTexImage2DARB (will be remapped) */
+ "iiiiiiip\0"
+ "glCompressedTexImage2D\0"
+ "glCompressedTexImage2DARB\0"
+ "\0"
+ /* _mesa_function_pool[24317]: ArrayElement (offset 306) */
+ "i\0"
+ "glArrayElement\0"
+ "glArrayElementEXT\0"
+ "\0"
+ /* _mesa_function_pool[24353]: TexImage2D (offset 183) */
+ "iiiiiiiip\0"
+ "glTexImage2D\0"
+ "\0"
+ /* _mesa_function_pool[24377]: DepthBoundsEXT (will be remapped) */
+ "dd\0"
+ "glDepthBoundsEXT\0"
+ "\0"
+ /* _mesa_function_pool[24398]: ProgramParameters4fvNV (will be remapped) */
+ "iiip\0"
+ "glProgramParameters4fvNV\0"
+ "\0"
+ /* _mesa_function_pool[24429]: DeformationMap3fSGIX (dynamic) */
+ "iffiiffiiffiip\0"
+ "glDeformationMap3fSGIX\0"
+ "\0"
+ /* _mesa_function_pool[24468]: GetProgramivNV (will be remapped) */
+ "iip\0"
+ "glGetProgramivNV\0"
+ "\0"
+ /* _mesa_function_pool[24490]: GetFragDataLocationEXT (will be remapped) */
+ "ip\0"
+ "glGetFragDataLocationEXT\0"
+ "glGetFragDataLocation\0"
+ "\0"
+ /* _mesa_function_pool[24541]: GetMinmaxParameteriv (offset 366) */
+ "iip\0"
+ "glGetMinmaxParameteriv\0"
+ "glGetMinmaxParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[24595]: PixelTransferf (offset 247) */
+ "if\0"
+ "glPixelTransferf\0"
+ "\0"
+ /* _mesa_function_pool[24616]: CopyTexImage1D (offset 323) */
+ "iiiiiii\0"
+ "glCopyTexImage1D\0"
+ "glCopyTexImage1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[24662]: PushMatrix (offset 298) */
+ "\0"
+ "glPushMatrix\0"
+ "\0"
+ /* _mesa_function_pool[24677]: Fogiv (offset 156) */
+ "ip\0"
+ "glFogiv\0"
+ "\0"
+ /* _mesa_function_pool[24689]: TexCoord1dv (offset 95) */
+ "p\0"
+ "glTexCoord1dv\0"
+ "\0"
+ /* _mesa_function_pool[24706]: AlphaFragmentOp3ATI (will be remapped) */
+ "iiiiiiiiiiii\0"
+ "glAlphaFragmentOp3ATI\0"
+ "\0"
+ /* _mesa_function_pool[24742]: PixelTransferi (offset 248) */
+ "ii\0"
+ "glPixelTransferi\0"
+ "\0"
+ /* _mesa_function_pool[24763]: GetVertexAttribdvNV (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribdvNV\0"
+ "\0"
+ /* _mesa_function_pool[24790]: VertexAttrib3fvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3fvNV\0"
+ "\0"
+ /* _mesa_function_pool[24814]: Rotatef (offset 300) */
+ "ffff\0"
+ "glRotatef\0"
+ "\0"
+ /* _mesa_function_pool[24830]: GetFinalCombinerInputParameterivNV (will be remapped) */
+ "iip\0"
+ "glGetFinalCombinerInputParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[24872]: Vertex3i (offset 138) */
+ "iii\0"
+ "glVertex3i\0"
+ "\0"
+ /* _mesa_function_pool[24888]: Vertex3f (offset 136) */
+ "fff\0"
+ "glVertex3f\0"
+ "\0"
+ /* _mesa_function_pool[24904]: Clear (offset 203) */
+ "i\0"
+ "glClear\0"
+ "\0"
+ /* _mesa_function_pool[24915]: Vertex3d (offset 134) */
+ "ddd\0"
+ "glVertex3d\0"
+ "\0"
+ /* _mesa_function_pool[24931]: GetMapParameterivNV (dynamic) */
+ "iip\0"
+ "glGetMapParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[24958]: Uniform4iARB (will be remapped) */
+ "iiiii\0"
+ "glUniform4i\0"
+ "glUniform4iARB\0"
+ "\0"
+ /* _mesa_function_pool[24992]: ReadBuffer (offset 254) */
+ "i\0"
+ "glReadBuffer\0"
+ "\0"
+ /* _mesa_function_pool[25008]: ConvolutionParameteri (offset 352) */
+ "iii\0"
+ "glConvolutionParameteri\0"
+ "glConvolutionParameteriEXT\0"
+ "\0"
+ /* _mesa_function_pool[25064]: Ortho (offset 296) */
+ "dddddd\0"
+ "glOrtho\0"
+ "\0"
+ /* _mesa_function_pool[25080]: Binormal3sEXT (dynamic) */
+ "iii\0"
+ "glBinormal3sEXT\0"
+ "\0"
+ /* _mesa_function_pool[25101]: ListBase (offset 6) */
+ "i\0"
+ "glListBase\0"
+ "\0"
+ /* _mesa_function_pool[25115]: Vertex3s (offset 140) */
+ "iii\0"
+ "glVertex3s\0"
+ "\0"
+ /* _mesa_function_pool[25131]: ConvolutionParameterf (offset 350) */
+ "iif\0"
+ "glConvolutionParameterf\0"
+ "glConvolutionParameterfEXT\0"
+ "\0"
+ /* _mesa_function_pool[25187]: GetColorTableParameteriv (offset 345) */
+ "iip\0"
+ "glGetColorTableParameteriv\0"
+ "glGetColorTableParameterivSGI\0"
+ "glGetColorTableParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[25279]: ProgramEnvParameter4dvARB (will be remapped) */
+ "iip\0"
+ "glProgramEnvParameter4dvARB\0"
+ "glProgramParameter4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[25336]: ShadeModel (offset 177) */
+ "i\0"
+ "glShadeModel\0"
+ "\0"
+ /* _mesa_function_pool[25352]: VertexAttribs2fvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs2fvNV\0"
+ "\0"
+ /* _mesa_function_pool[25378]: Rectiv (offset 91) */
+ "pp\0"
+ "glRectiv\0"
+ "\0"
+ /* _mesa_function_pool[25391]: UseProgramObjectARB (will be remapped) */
+ "i\0"
+ "glUseProgram\0"
+ "glUseProgramObjectARB\0"
+ "\0"
+ /* _mesa_function_pool[25429]: GetMapParameterfvNV (dynamic) */
+ "iip\0"
+ "glGetMapParameterfvNV\0"
+ "\0"
+ /* _mesa_function_pool[25456]: EndConditionalRenderNV (will be remapped) */
+ "\0"
+ "glEndConditionalRenderNV\0"
+ "glEndConditionalRender\0"
+ "\0"
+ /* _mesa_function_pool[25506]: PassTexCoordATI (will be remapped) */
+ "iii\0"
+ "glPassTexCoordATI\0"
+ "\0"
+ /* _mesa_function_pool[25529]: DeleteProgram (will be remapped) */
+ "i\0"
+ "glDeleteProgram\0"
+ "\0"
+ /* _mesa_function_pool[25548]: Tangent3ivEXT (dynamic) */
+ "p\0"
+ "glTangent3ivEXT\0"
+ "\0"
+ /* _mesa_function_pool[25567]: Tangent3dEXT (dynamic) */
+ "ddd\0"
+ "glTangent3dEXT\0"
+ "\0"
+ /* _mesa_function_pool[25587]: SecondaryColor3dvEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3dv\0"
+ "glSecondaryColor3dvEXT\0"
+ "\0"
+ /* _mesa_function_pool[25633]: AlphaFragmentOp2ATI (will be remapped) */
+ "iiiiiiiii\0"
+ "glAlphaFragmentOp2ATI\0"
+ "\0"
+ /* _mesa_function_pool[25666]: Vertex2fv (offset 129) */
+ "p\0"
+ "glVertex2fv\0"
+ "\0"
+ /* _mesa_function_pool[25681]: MultiDrawArraysEXT (will be remapped) */
+ "ippi\0"
+ "glMultiDrawArrays\0"
+ "glMultiDrawArraysEXT\0"
+ "\0"
+ /* _mesa_function_pool[25726]: BindRenderbufferEXT (will be remapped) */
+ "ii\0"
+ "glBindRenderbuffer\0"
+ "glBindRenderbufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[25771]: MultiTexCoord4dARB (offset 400) */
+ "idddd\0"
+ "glMultiTexCoord4d\0"
+ "glMultiTexCoord4dARB\0"
+ "\0"
+ /* _mesa_function_pool[25817]: FramebufferTextureFaceARB (will be remapped) */
+ "iiiii\0"
+ "glFramebufferTextureFaceARB\0"
+ "\0"
+ /* _mesa_function_pool[25852]: Vertex3sv (offset 141) */
+ "p\0"
+ "glVertex3sv\0"
+ "\0"
+ /* _mesa_function_pool[25867]: SecondaryColor3usEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3us\0"
+ "glSecondaryColor3usEXT\0"
+ "\0"
+ /* _mesa_function_pool[25915]: ProgramLocalParameter4fvARB (will be remapped) */
+ "iip\0"
+ "glProgramLocalParameter4fvARB\0"
+ "\0"
+ /* _mesa_function_pool[25950]: DeleteProgramsNV (will be remapped) */
+ "ip\0"
+ "glDeleteProgramsARB\0"
+ "glDeleteProgramsNV\0"
+ "\0"
+ /* _mesa_function_pool[25993]: EvalMesh1 (offset 236) */
+ "iii\0"
+ "glEvalMesh1\0"
+ "\0"
+ /* _mesa_function_pool[26010]: PauseTransformFeedback (will be remapped) */
+ "\0"
+ "glPauseTransformFeedback\0"
+ "\0"
+ /* _mesa_function_pool[26037]: MultiTexCoord1sARB (offset 382) */
+ "ii\0"
+ "glMultiTexCoord1s\0"
+ "glMultiTexCoord1sARB\0"
+ "\0"
+ /* _mesa_function_pool[26080]: ReplacementCodeuiColor3fVertex3fSUN (dynamic) */
+ "iffffff\0"
+ "glReplacementCodeuiColor3fVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[26127]: GetVertexAttribPointervNV (will be remapped) */
+ "iip\0"
+ "glGetVertexAttribPointerv\0"
+ "glGetVertexAttribPointervARB\0"
+ "glGetVertexAttribPointervNV\0"
+ "\0"
+ /* _mesa_function_pool[26215]: VertexAttribs1fvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs1fvNV\0"
+ "\0"
+ /* _mesa_function_pool[26241]: MultiTexCoord1dvARB (offset 377) */
+ "ip\0"
+ "glMultiTexCoord1dv\0"
+ "glMultiTexCoord1dvARB\0"
+ "\0"
+ /* _mesa_function_pool[26286]: Uniform2iARB (will be remapped) */
+ "iii\0"
+ "glUniform2i\0"
+ "glUniform2iARB\0"
+ "\0"
+ /* _mesa_function_pool[26318]: Vertex2iv (offset 131) */
+ "p\0"
+ "glVertex2iv\0"
+ "\0"
+ /* _mesa_function_pool[26333]: GetProgramStringNV (will be remapped) */
+ "iip\0"
+ "glGetProgramStringNV\0"
+ "\0"
+ /* _mesa_function_pool[26359]: ColorPointerEXT (will be remapped) */
+ "iiiip\0"
+ "glColorPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[26384]: LineWidth (offset 168) */
+ "f\0"
+ "glLineWidth\0"
+ "\0"
+ /* _mesa_function_pool[26399]: MapBufferARB (will be remapped) */
+ "ii\0"
+ "glMapBuffer\0"
+ "glMapBufferARB\0"
+ "\0"
+ /* _mesa_function_pool[26430]: MultiDrawElementsBaseVertex (will be remapped) */
+ "ipipip\0"
+ "glMultiDrawElementsBaseVertex\0"
+ "\0"
+ /* _mesa_function_pool[26468]: TexParameterIuivEXT (will be remapped) */
+ "iip\0"
+ "glTexParameterIuivEXT\0"
+ "glTexParameterIuiv\0"
+ "\0"
+ /* _mesa_function_pool[26514]: Binormal3svEXT (dynamic) */
+ "p\0"
+ "glBinormal3svEXT\0"
+ "\0"
+ /* _mesa_function_pool[26534]: ApplyTextureEXT (dynamic) */
+ "i\0"
+ "glApplyTextureEXT\0"
+ "\0"
+ /* _mesa_function_pool[26555]: GetBufferParameteri64v (will be remapped) */
+ "iip\0"
+ "glGetBufferParameteri64v\0"
+ "\0"
+ /* _mesa_function_pool[26585]: TexGendv (offset 189) */
+ "iip\0"
+ "glTexGendv\0"
+ "\0"
+ /* _mesa_function_pool[26601]: VertexAttribI3iEXT (will be remapped) */
+ "iiii\0"
+ "glVertexAttribI3iEXT\0"
+ "glVertexAttribI3i\0"
+ "\0"
+ /* _mesa_function_pool[26646]: EnableIndexedEXT (will be remapped) */
+ "ii\0"
+ "glEnableIndexedEXT\0"
+ "glEnablei\0"
+ "\0"
+ /* _mesa_function_pool[26679]: TextureMaterialEXT (dynamic) */
+ "ii\0"
+ "glTextureMaterialEXT\0"
+ "\0"
+ /* _mesa_function_pool[26704]: TextureLightEXT (dynamic) */
+ "i\0"
+ "glTextureLightEXT\0"
+ "\0"
+ /* _mesa_function_pool[26725]: ResetMinmax (offset 370) */
+ "i\0"
+ "glResetMinmax\0"
+ "glResetMinmaxEXT\0"
+ "\0"
+ /* _mesa_function_pool[26759]: SpriteParameterfSGIX (dynamic) */
+ "if\0"
+ "glSpriteParameterfSGIX\0"
+ "\0"
+ /* _mesa_function_pool[26786]: EnableClientState (offset 313) */
+ "i\0"
+ "glEnableClientState\0"
+ "\0"
+ /* _mesa_function_pool[26809]: VertexAttrib4sNV (will be remapped) */
+ "iiiii\0"
+ "glVertexAttrib4sNV\0"
+ "\0"
+ /* _mesa_function_pool[26835]: GetConvolutionParameterfv (offset 357) */
+ "iip\0"
+ "glGetConvolutionParameterfv\0"
+ "glGetConvolutionParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[26899]: VertexAttribs4dvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[26925]: VertexAttrib4dARB (will be remapped) */
+ "idddd\0"
+ "glVertexAttrib4d\0"
+ "glVertexAttrib4dARB\0"
+ "\0"
+ /* _mesa_function_pool[26969]: GetTexBumpParameterfvATI (will be remapped) */
+ "ip\0"
+ "glGetTexBumpParameterfvATI\0"
+ "\0"
+ /* _mesa_function_pool[27000]: ProgramNamedParameter4dNV (will be remapped) */
+ "iipdddd\0"
+ "glProgramNamedParameter4dNV\0"
+ "\0"
+ /* _mesa_function_pool[27037]: GetMaterialfv (offset 269) */
+ "iip\0"
+ "glGetMaterialfv\0"
+ "\0"
+ /* _mesa_function_pool[27058]: VertexWeightfEXT (dynamic) */
+ "f\0"
+ "glVertexWeightfEXT\0"
+ "\0"
+ /* _mesa_function_pool[27080]: SetFragmentShaderConstantATI (will be remapped) */
+ "ip\0"
+ "glSetFragmentShaderConstantATI\0"
+ "\0"
+ /* _mesa_function_pool[27115]: Binormal3fEXT (dynamic) */
+ "fff\0"
+ "glBinormal3fEXT\0"
+ "\0"
+ /* _mesa_function_pool[27136]: CallList (offset 2) */
+ "i\0"
+ "glCallList\0"
+ "\0"
+ /* _mesa_function_pool[27150]: Materialfv (offset 170) */
+ "iip\0"
+ "glMaterialfv\0"
+ "\0"
+ /* _mesa_function_pool[27168]: TexCoord3fv (offset 113) */
+ "p\0"
+ "glTexCoord3fv\0"
+ "\0"
+ /* _mesa_function_pool[27185]: FogCoordfvEXT (will be remapped) */
+ "p\0"
+ "glFogCoordfv\0"
+ "glFogCoordfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[27217]: MultiTexCoord1ivARB (offset 381) */
+ "ip\0"
+ "glMultiTexCoord1iv\0"
+ "glMultiTexCoord1ivARB\0"
+ "\0"
+ /* _mesa_function_pool[27262]: SecondaryColor3ubEXT (will be remapped) */
+ "iii\0"
+ "glSecondaryColor3ub\0"
+ "glSecondaryColor3ubEXT\0"
+ "\0"
+ /* _mesa_function_pool[27310]: MultiTexCoord2ivARB (offset 389) */
+ "ip\0"
+ "glMultiTexCoord2iv\0"
+ "glMultiTexCoord2ivARB\0"
+ "\0"
+ /* _mesa_function_pool[27355]: FogFuncSGIS (dynamic) */
+ "ip\0"
+ "glFogFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[27373]: CopyTexSubImage2D (offset 326) */
+ "iiiiiiii\0"
+ "glCopyTexSubImage2D\0"
+ "glCopyTexSubImage2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[27426]: GetObjectParameterivARB (will be remapped) */
+ "iip\0"
+ "glGetObjectParameterivARB\0"
+ "\0"
+ /* _mesa_function_pool[27457]: Color3iv (offset 16) */
+ "p\0"
+ "glColor3iv\0"
+ "\0"
+ /* _mesa_function_pool[27471]: TexCoord4fVertex4fSUN (dynamic) */
+ "ffffffff\0"
+ "glTexCoord4fVertex4fSUN\0"
+ "\0"
+ /* _mesa_function_pool[27505]: DrawElements (offset 311) */
+ "iiip\0"
+ "glDrawElements\0"
+ "\0"
+ /* _mesa_function_pool[27526]: BindVertexArrayAPPLE (will be remapped) */
+ "i\0"
+ "glBindVertexArrayAPPLE\0"
+ "\0"
+ /* _mesa_function_pool[27552]: GetProgramLocalParameterdvARB (will be remapped) */
+ "iip\0"
+ "glGetProgramLocalParameterdvARB\0"
+ "\0"
+ /* _mesa_function_pool[27589]: GetHistogramParameteriv (offset 363) */
+ "iip\0"
+ "glGetHistogramParameteriv\0"
+ "glGetHistogramParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[27649]: MultiTexCoord1iARB (offset 380) */
+ "ii\0"
+ "glMultiTexCoord1i\0"
+ "glMultiTexCoord1iARB\0"
+ "\0"
+ /* _mesa_function_pool[27692]: GetConvolutionFilter (offset 356) */
+ "iiip\0"
+ "glGetConvolutionFilter\0"
+ "glGetConvolutionFilterEXT\0"
+ "\0"
+ /* _mesa_function_pool[27747]: GetProgramivARB (will be remapped) */
+ "iip\0"
+ "glGetProgramivARB\0"
+ "\0"
+ /* _mesa_function_pool[27770]: TexBufferARB (will be remapped) */
+ "iii\0"
+ "glTexBufferARB\0"
+ "\0"
+ /* _mesa_function_pool[27790]: BlendFuncSeparateEXT (will be remapped) */
+ "iiii\0"
+ "glBlendFuncSeparate\0"
+ "glBlendFuncSeparateEXT\0"
+ "glBlendFuncSeparateINGR\0"
+ "\0"
+ /* _mesa_function_pool[27863]: MapBufferRange (will be remapped) */
+ "iiii\0"
+ "glMapBufferRange\0"
+ "\0"
+ /* _mesa_function_pool[27886]: ProgramParameters4dvNV (will be remapped) */
+ "iiip\0"
+ "glProgramParameters4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[27917]: TexCoord2fColor3fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glTexCoord2fColor3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[27954]: EvalPoint2 (offset 239) */
+ "ii\0"
+ "glEvalPoint2\0"
+ "\0"
+ /* _mesa_function_pool[27971]: Uniform1uivEXT (will be remapped) */
+ "iip\0"
+ "glUniform1uivEXT\0"
+ "glUniform1uiv\0"
+ "\0"
+ /* _mesa_function_pool[28007]: EvalPoint1 (offset 237) */
+ "i\0"
+ "glEvalPoint1\0"
+ "\0"
+ /* _mesa_function_pool[28023]: Binormal3dvEXT (dynamic) */
+ "p\0"
+ "glBinormal3dvEXT\0"
+ "\0"
+ /* _mesa_function_pool[28043]: PopMatrix (offset 297) */
+ "\0"
+ "glPopMatrix\0"
+ "\0"
+ /* _mesa_function_pool[28057]: FinishFenceNV (will be remapped) */
+ "i\0"
+ "glFinishFenceNV\0"
+ "\0"
+ /* _mesa_function_pool[28076]: GetFogFuncSGIS (dynamic) */
+ "p\0"
+ "glGetFogFuncSGIS\0"
+ "\0"
+ /* _mesa_function_pool[28096]: GetUniformLocationARB (will be remapped) */
+ "ip\0"
+ "glGetUniformLocation\0"
+ "glGetUniformLocationARB\0"
+ "\0"
+ /* _mesa_function_pool[28145]: SecondaryColor3fEXT (will be remapped) */
+ "fff\0"
+ "glSecondaryColor3f\0"
+ "glSecondaryColor3fEXT\0"
+ "\0"
+ /* _mesa_function_pool[28191]: GetTexGeniv (offset 280) */
+ "iip\0"
+ "glGetTexGeniv\0"
+ "\0"
+ /* _mesa_function_pool[28210]: CombinerInputNV (will be remapped) */
+ "iiiiii\0"
+ "glCombinerInputNV\0"
+ "\0"
+ /* _mesa_function_pool[28236]: VertexAttrib3sARB (will be remapped) */
+ "iiii\0"
+ "glVertexAttrib3s\0"
+ "glVertexAttrib3sARB\0"
+ "\0"
+ /* _mesa_function_pool[28279]: IsTransformFeedback (will be remapped) */
+ "i\0"
+ "glIsTransformFeedback\0"
+ "\0"
+ /* _mesa_function_pool[28304]: ReplacementCodeuiNormal3fVertex3fvSUN (dynamic) */
+ "ppp\0"
+ "glReplacementCodeuiNormal3fVertex3fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[28349]: Map2d (offset 222) */
+ "iddiiddiip\0"
+ "glMap2d\0"
+ "\0"
+ /* _mesa_function_pool[28369]: Map2f (offset 223) */
+ "iffiiffiip\0"
+ "glMap2f\0"
+ "\0"
+ /* _mesa_function_pool[28389]: ProgramStringARB (will be remapped) */
+ "iiip\0"
+ "glProgramStringARB\0"
+ "\0"
+ /* _mesa_function_pool[28414]: Vertex4s (offset 148) */
+ "iiii\0"
+ "glVertex4s\0"
+ "\0"
+ /* _mesa_function_pool[28431]: TexCoord4fVertex4fvSUN (dynamic) */
+ "pp\0"
+ "glTexCoord4fVertex4fvSUN\0"
+ "\0"
+ /* _mesa_function_pool[28460]: FragmentLightModelivSGIX (dynamic) */
+ "ip\0"
+ "glFragmentLightModelivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[28491]: VertexAttrib1fNV (will be remapped) */
+ "if\0"
+ "glVertexAttrib1fNV\0"
+ "\0"
+ /* _mesa_function_pool[28514]: Vertex4f (offset 144) */
+ "ffff\0"
+ "glVertex4f\0"
+ "\0"
+ /* _mesa_function_pool[28531]: EvalCoord1d (offset 228) */
+ "d\0"
+ "glEvalCoord1d\0"
+ "\0"
+ /* _mesa_function_pool[28548]: Vertex4d (offset 142) */
+ "dddd\0"
+ "glVertex4d\0"
+ "\0"
+ /* _mesa_function_pool[28565]: RasterPos4dv (offset 79) */
+ "p\0"
+ "glRasterPos4dv\0"
+ "\0"
+ /* _mesa_function_pool[28583]: UseShaderProgramEXT (will be remapped) */
+ "ii\0"
+ "glUseShaderProgramEXT\0"
+ "\0"
+ /* _mesa_function_pool[28609]: FragmentLightfSGIX (dynamic) */
+ "iif\0"
+ "glFragmentLightfSGIX\0"
+ "\0"
+ /* _mesa_function_pool[28635]: GetCompressedTexImageARB (will be remapped) */
+ "iip\0"
+ "glGetCompressedTexImage\0"
+ "glGetCompressedTexImageARB\0"
+ "\0"
+ /* _mesa_function_pool[28691]: GetTexGenfv (offset 279) */
+ "iip\0"
+ "glGetTexGenfv\0"
+ "\0"
+ /* _mesa_function_pool[28710]: Vertex4i (offset 146) */
+ "iiii\0"
+ "glVertex4i\0"
+ "\0"
+ /* _mesa_function_pool[28727]: VertexWeightPointerEXT (dynamic) */
+ "iiip\0"
+ "glVertexWeightPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[28758]: GetHistogram (offset 361) */
+ "iiiip\0"
+ "glGetHistogram\0"
+ "glGetHistogramEXT\0"
+ "\0"
+ /* _mesa_function_pool[28798]: ActiveStencilFaceEXT (will be remapped) */
+ "i\0"
+ "glActiveStencilFaceEXT\0"
+ "\0"
+ /* _mesa_function_pool[28824]: StencilFuncSeparateATI (will be remapped) */
+ "iiii\0"
+ "glStencilFuncSeparateATI\0"
+ "\0"
+ /* _mesa_function_pool[28855]: Materialf (offset 169) */
+ "iif\0"
+ "glMaterialf\0"
+ "\0"
+ /* _mesa_function_pool[28872]: GetShaderSourceARB (will be remapped) */
+ "iipp\0"
+ "glGetShaderSource\0"
+ "glGetShaderSourceARB\0"
+ "\0"
+ /* _mesa_function_pool[28917]: IglooInterfaceSGIX (dynamic) */
+ "ip\0"
+ "glIglooInterfaceSGIX\0"
+ "\0"
+ /* _mesa_function_pool[28942]: Materiali (offset 171) */
+ "iii\0"
+ "glMateriali\0"
+ "\0"
+ /* _mesa_function_pool[28959]: VertexAttrib4dNV (will be remapped) */
+ "idddd\0"
+ "glVertexAttrib4dNV\0"
+ "\0"
+ /* _mesa_function_pool[28985]: MultiModeDrawElementsIBM (will be remapped) */
+ "ppipii\0"
+ "glMultiModeDrawElementsIBM\0"
+ "\0"
+ /* _mesa_function_pool[29020]: Indexsv (offset 51) */
+ "p\0"
+ "glIndexsv\0"
+ "\0"
+ /* _mesa_function_pool[29033]: MultiTexCoord4svARB (offset 407) */
+ "ip\0"
+ "glMultiTexCoord4sv\0"
+ "glMultiTexCoord4svARB\0"
+ "\0"
+ /* _mesa_function_pool[29078]: LightModelfv (offset 164) */
+ "ip\0"
+ "glLightModelfv\0"
+ "\0"
+ /* _mesa_function_pool[29097]: TexCoord2dv (offset 103) */
+ "p\0"
+ "glTexCoord2dv\0"
+ "\0"
+ /* _mesa_function_pool[29114]: GenQueriesARB (will be remapped) */
+ "ip\0"
+ "glGenQueries\0"
+ "glGenQueriesARB\0"
+ "\0"
+ /* _mesa_function_pool[29147]: EvalCoord1dv (offset 229) */
+ "p\0"
+ "glEvalCoord1dv\0"
+ "\0"
+ /* _mesa_function_pool[29165]: ReplacementCodeuiVertex3fSUN (dynamic) */
+ "ifff\0"
+ "glReplacementCodeuiVertex3fSUN\0"
+ "\0"
+ /* _mesa_function_pool[29202]: Translated (offset 303) */
+ "ddd\0"
+ "glTranslated\0"
+ "\0"
+ /* _mesa_function_pool[29220]: Translatef (offset 304) */
+ "fff\0"
+ "glTranslatef\0"
+ "\0"
+ /* _mesa_function_pool[29238]: Uniform3uiEXT (will be remapped) */
+ "iiii\0"
+ "glUniform3uiEXT\0"
+ "glUniform3ui\0"
+ "\0"
+ /* _mesa_function_pool[29273]: StencilMask (offset 209) */
+ "i\0"
+ "glStencilMask\0"
+ "\0"
+ /* _mesa_function_pool[29290]: Tangent3iEXT (dynamic) */
+ "iii\0"
+ "glTangent3iEXT\0"
+ "\0"
+ /* _mesa_function_pool[29310]: ClampColorARB (will be remapped) */
+ "ii\0"
+ "glClampColorARB\0"
+ "\0"
+ /* _mesa_function_pool[29330]: GetLightiv (offset 265) */
+ "iip\0"
+ "glGetLightiv\0"
+ "\0"
+ /* _mesa_function_pool[29348]: DrawMeshArraysSUN (dynamic) */
+ "iiii\0"
+ "glDrawMeshArraysSUN\0"
+ "\0"
+ /* _mesa_function_pool[29374]: IsList (offset 287) */
+ "i\0"
+ "glIsList\0"
+ "\0"
+ /* _mesa_function_pool[29386]: IsSync (will be remapped) */
+ "i\0"
+ "glIsSync\0"
+ "\0"
+ /* _mesa_function_pool[29398]: RenderMode (offset 196) */
+ "i\0"
+ "glRenderMode\0"
+ "\0"
+ /* _mesa_function_pool[29414]: GetMapControlPointsNV (dynamic) */
+ "iiiiiip\0"
+ "glGetMapControlPointsNV\0"
+ "\0"
+ /* _mesa_function_pool[29447]: DrawBuffersARB (will be remapped) */
+ "ip\0"
+ "glDrawBuffers\0"
+ "glDrawBuffersARB\0"
+ "glDrawBuffersATI\0"
+ "\0"
+ /* _mesa_function_pool[29499]: ClearBufferiv (will be remapped) */
+ "iip\0"
+ "glClearBufferiv\0"
+ "\0"
+ /* _mesa_function_pool[29520]: ProgramLocalParameter4fARB (will be remapped) */
+ "iiffff\0"
+ "glProgramLocalParameter4fARB\0"
+ "\0"
+ /* _mesa_function_pool[29557]: SpriteParameterivSGIX (dynamic) */
+ "ip\0"
+ "glSpriteParameterivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[29585]: ProvokingVertexEXT (will be remapped) */
+ "i\0"
+ "glProvokingVertexEXT\0"
+ "glProvokingVertex\0"
+ "\0"
+ /* _mesa_function_pool[29627]: MultiTexCoord1fARB (offset 378) */
+ "if\0"
+ "glMultiTexCoord1f\0"
+ "glMultiTexCoord1fARB\0"
+ "\0"
+ /* _mesa_function_pool[29670]: LoadName (offset 198) */
+ "i\0"
+ "glLoadName\0"
+ "\0"
+ /* _mesa_function_pool[29684]: VertexAttribs4ubvNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs4ubvNV\0"
+ "\0"
+ /* _mesa_function_pool[29711]: WeightsvARB (dynamic) */
+ "ip\0"
+ "glWeightsvARB\0"
+ "\0"
+ /* _mesa_function_pool[29729]: Uniform1fvARB (will be remapped) */
+ "iip\0"
+ "glUniform1fv\0"
+ "glUniform1fvARB\0"
+ "\0"
+ /* _mesa_function_pool[29763]: CopyTexSubImage1D (offset 325) */
+ "iiiiii\0"
+ "glCopyTexSubImage1D\0"
+ "glCopyTexSubImage1DEXT\0"
+ "\0"
+ /* _mesa_function_pool[29814]: CullFace (offset 152) */
+ "i\0"
+ "glCullFace\0"
+ "\0"
+ /* _mesa_function_pool[29828]: BindTexture (offset 307) */
+ "ii\0"
+ "glBindTexture\0"
+ "glBindTextureEXT\0"
+ "\0"
+ /* _mesa_function_pool[29863]: BeginFragmentShaderATI (will be remapped) */
+ "\0"
+ "glBeginFragmentShaderATI\0"
+ "\0"
+ /* _mesa_function_pool[29890]: MultiTexCoord4fARB (offset 402) */
+ "iffff\0"
+ "glMultiTexCoord4f\0"
+ "glMultiTexCoord4fARB\0"
+ "\0"
+ /* _mesa_function_pool[29936]: VertexAttribs3svNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs3svNV\0"
+ "\0"
+ /* _mesa_function_pool[29962]: StencilFunc (offset 243) */
+ "iii\0"
+ "glStencilFunc\0"
+ "\0"
+ /* _mesa_function_pool[29981]: CopyPixels (offset 255) */
+ "iiiii\0"
+ "glCopyPixels\0"
+ "\0"
+ /* _mesa_function_pool[30001]: Rectsv (offset 93) */
+ "pp\0"
+ "glRectsv\0"
+ "\0"
+ /* _mesa_function_pool[30014]: ReplacementCodeuivSUN (dynamic) */
+ "p\0"
+ "glReplacementCodeuivSUN\0"
+ "\0"
+ /* _mesa_function_pool[30041]: EnableVertexAttribArrayARB (will be remapped) */
+ "i\0"
+ "glEnableVertexAttribArray\0"
+ "glEnableVertexAttribArrayARB\0"
+ "\0"
+ /* _mesa_function_pool[30099]: NormalPointervINTEL (dynamic) */
+ "ip\0"
+ "glNormalPointervINTEL\0"
+ "\0"
+ /* _mesa_function_pool[30125]: CopyConvolutionFilter2D (offset 355) */
+ "iiiiii\0"
+ "glCopyConvolutionFilter2D\0"
+ "glCopyConvolutionFilter2DEXT\0"
+ "\0"
+ /* _mesa_function_pool[30188]: WindowPos3ivMESA (will be remapped) */
+ "p\0"
+ "glWindowPos3iv\0"
+ "glWindowPos3ivARB\0"
+ "glWindowPos3ivMESA\0"
+ "\0"
+ /* _mesa_function_pool[30243]: CopyBufferSubData (will be remapped) */
+ "iiiii\0"
+ "glCopyBufferSubData\0"
+ "\0"
+ /* _mesa_function_pool[30270]: NormalPointer (offset 318) */
+ "iip\0"
+ "glNormalPointer\0"
+ "\0"
+ /* _mesa_function_pool[30291]: TexParameterfv (offset 179) */
+ "iip\0"
+ "glTexParameterfv\0"
+ "\0"
+ /* _mesa_function_pool[30313]: IsBufferARB (will be remapped) */
+ "i\0"
+ "glIsBuffer\0"
+ "glIsBufferARB\0"
+ "\0"
+ /* _mesa_function_pool[30341]: WindowPos4iMESA (will be remapped) */
+ "iiii\0"
+ "glWindowPos4iMESA\0"
+ "\0"
+ /* _mesa_function_pool[30365]: VertexAttrib4uivARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4uiv\0"
+ "glVertexAttrib4uivARB\0"
+ "\0"
+ /* _mesa_function_pool[30410]: Tangent3bvEXT (dynamic) */
+ "p\0"
+ "glTangent3bvEXT\0"
+ "\0"
+ /* _mesa_function_pool[30429]: VertexAttribI3uivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI3uivEXT\0"
+ "glVertexAttribI3uiv\0"
+ "\0"
+ /* _mesa_function_pool[30476]: UniformMatrix3x4fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix3x4fv\0"
+ "\0"
+ /* _mesa_function_pool[30503]: ClipPlane (offset 150) */
+ "ip\0"
+ "glClipPlane\0"
+ "\0"
+ /* _mesa_function_pool[30519]: Recti (offset 90) */
+ "iiii\0"
+ "glRecti\0"
+ "\0"
+ /* _mesa_function_pool[30533]: VertexAttribI3ivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI3ivEXT\0"
+ "glVertexAttribI3iv\0"
+ "\0"
+ /* _mesa_function_pool[30578]: DrawRangeElementsBaseVertex (will be remapped) */
+ "iiiiipi\0"
+ "glDrawRangeElementsBaseVertex\0"
+ "\0"
+ /* _mesa_function_pool[30617]: TexCoordPointervINTEL (dynamic) */
+ "iip\0"
+ "glTexCoordPointervINTEL\0"
+ "\0"
+ /* _mesa_function_pool[30646]: DeleteBuffersARB (will be remapped) */
+ "ip\0"
+ "glDeleteBuffers\0"
+ "glDeleteBuffersARB\0"
+ "\0"
+ /* _mesa_function_pool[30685]: PixelTransformParameterfvEXT (dynamic) */
+ "iip\0"
+ "glPixelTransformParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[30721]: PrimitiveRestartNV (will be remapped) */
+ "\0"
+ "glPrimitiveRestartNV\0"
+ "\0"
+ /* _mesa_function_pool[30744]: WindowPos4fvMESA (will be remapped) */
+ "p\0"
+ "glWindowPos4fvMESA\0"
+ "\0"
+ /* _mesa_function_pool[30766]: GetPixelMapuiv (offset 272) */
+ "ip\0"
+ "glGetPixelMapuiv\0"
+ "\0"
+ /* _mesa_function_pool[30787]: Rectf (offset 88) */
+ "ffff\0"
+ "glRectf\0"
+ "\0"
+ /* _mesa_function_pool[30801]: VertexAttrib1sNV (will be remapped) */
+ "ii\0"
+ "glVertexAttrib1sNV\0"
+ "\0"
+ /* _mesa_function_pool[30824]: Indexfv (offset 47) */
+ "p\0"
+ "glIndexfv\0"
+ "\0"
+ /* _mesa_function_pool[30837]: SecondaryColor3svEXT (will be remapped) */
+ "p\0"
+ "glSecondaryColor3sv\0"
+ "glSecondaryColor3svEXT\0"
+ "\0"
+ /* _mesa_function_pool[30883]: LoadTransposeMatrixfARB (will be remapped) */
+ "p\0"
+ "glLoadTransposeMatrixf\0"
+ "glLoadTransposeMatrixfARB\0"
+ "\0"
+ /* _mesa_function_pool[30935]: GetPointerv (offset 329) */
+ "ip\0"
+ "glGetPointerv\0"
+ "glGetPointervEXT\0"
+ "\0"
+ /* _mesa_function_pool[30970]: Tangent3bEXT (dynamic) */
+ "iii\0"
+ "glTangent3bEXT\0"
+ "\0"
+ /* _mesa_function_pool[30990]: CombinerParameterfNV (will be remapped) */
+ "if\0"
+ "glCombinerParameterfNV\0"
+ "\0"
+ /* _mesa_function_pool[31017]: IndexMask (offset 212) */
+ "i\0"
+ "glIndexMask\0"
+ "\0"
+ /* _mesa_function_pool[31032]: BindProgramNV (will be remapped) */
+ "ii\0"
+ "glBindProgramARB\0"
+ "glBindProgramNV\0"
+ "\0"
+ /* _mesa_function_pool[31069]: VertexAttrib4svARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4sv\0"
+ "glVertexAttrib4svARB\0"
+ "\0"
+ /* _mesa_function_pool[31112]: GetFloatv (offset 262) */
+ "ip\0"
+ "glGetFloatv\0"
+ "\0"
+ /* _mesa_function_pool[31128]: CreateDebugObjectMESA (dynamic) */
+ "\0"
+ "glCreateDebugObjectMESA\0"
+ "\0"
+ /* _mesa_function_pool[31154]: GetShaderiv (will be remapped) */
+ "iip\0"
+ "glGetShaderiv\0"
+ "\0"
+ /* _mesa_function_pool[31173]: ClientWaitSync (will be remapped) */
+ "iii\0"
+ "glClientWaitSync\0"
+ "\0"
+ /* _mesa_function_pool[31195]: TexCoord4s (offset 124) */
+ "iiii\0"
+ "glTexCoord4s\0"
+ "\0"
+ /* _mesa_function_pool[31214]: TexCoord3sv (offset 117) */
+ "p\0"
+ "glTexCoord3sv\0"
+ "\0"
+ /* _mesa_function_pool[31231]: BindFragmentShaderATI (will be remapped) */
+ "i\0"
+ "glBindFragmentShaderATI\0"
+ "\0"
+ /* _mesa_function_pool[31258]: PopAttrib (offset 218) */
+ "\0"
+ "glPopAttrib\0"
+ "\0"
+ /* _mesa_function_pool[31272]: Fogfv (offset 154) */
+ "ip\0"
+ "glFogfv\0"
+ "\0"
+ /* _mesa_function_pool[31284]: UnmapBufferARB (will be remapped) */
+ "i\0"
+ "glUnmapBuffer\0"
+ "glUnmapBufferARB\0"
+ "\0"
+ /* _mesa_function_pool[31318]: InitNames (offset 197) */
+ "\0"
+ "glInitNames\0"
+ "\0"
+ /* _mesa_function_pool[31332]: Normal3sv (offset 61) */
+ "p\0"
+ "glNormal3sv\0"
+ "\0"
+ /* _mesa_function_pool[31347]: Minmax (offset 368) */
+ "iii\0"
+ "glMinmax\0"
+ "glMinmaxEXT\0"
+ "\0"
+ /* _mesa_function_pool[31373]: TexCoord4d (offset 118) */
+ "dddd\0"
+ "glTexCoord4d\0"
+ "\0"
+ /* _mesa_function_pool[31392]: DeformationMap3dSGIX (dynamic) */
+ "iddiiddiiddiip\0"
+ "glDeformationMap3dSGIX\0"
+ "\0"
+ /* _mesa_function_pool[31431]: TexCoord4f (offset 120) */
+ "ffff\0"
+ "glTexCoord4f\0"
+ "\0"
+ /* _mesa_function_pool[31450]: FogCoorddvEXT (will be remapped) */
+ "p\0"
+ "glFogCoorddv\0"
+ "glFogCoorddvEXT\0"
+ "\0"
+ /* _mesa_function_pool[31482]: FinishTextureSUNX (dynamic) */
+ "\0"
+ "glFinishTextureSUNX\0"
+ "\0"
+ /* _mesa_function_pool[31504]: GetFragmentLightfvSGIX (dynamic) */
+ "iip\0"
+ "glGetFragmentLightfvSGIX\0"
+ "\0"
+ /* _mesa_function_pool[31534]: Binormal3fvEXT (dynamic) */
+ "p\0"
+ "glBinormal3fvEXT\0"
+ "\0"
+ /* _mesa_function_pool[31554]: GetBooleanv (offset 258) */
+ "ip\0"
+ "glGetBooleanv\0"
+ "\0"
+ /* _mesa_function_pool[31572]: ColorFragmentOp3ATI (will be remapped) */
+ "iiiiiiiiiiiii\0"
+ "glColorFragmentOp3ATI\0"
+ "\0"
+ /* _mesa_function_pool[31609]: Hint (offset 158) */
+ "ii\0"
+ "glHint\0"
+ "\0"
+ /* _mesa_function_pool[31620]: Color4dv (offset 28) */
+ "p\0"
+ "glColor4dv\0"
+ "\0"
+ /* _mesa_function_pool[31634]: VertexAttrib2svARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib2sv\0"
+ "glVertexAttrib2svARB\0"
+ "\0"
+ /* _mesa_function_pool[31677]: AreProgramsResidentNV (will be remapped) */
+ "ipp\0"
+ "glAreProgramsResidentNV\0"
+ "\0"
+ /* _mesa_function_pool[31706]: WindowPos3svMESA (will be remapped) */
+ "p\0"
+ "glWindowPos3sv\0"
+ "glWindowPos3svARB\0"
+ "glWindowPos3svMESA\0"
+ "\0"
+ /* _mesa_function_pool[31761]: CopyColorSubTable (offset 347) */
+ "iiiii\0"
+ "glCopyColorSubTable\0"
+ "glCopyColorSubTableEXT\0"
+ "\0"
+ /* _mesa_function_pool[31811]: WeightdvARB (dynamic) */
+ "ip\0"
+ "glWeightdvARB\0"
+ "\0"
+ /* _mesa_function_pool[31829]: DeleteRenderbuffersEXT (will be remapped) */
+ "ip\0"
+ "glDeleteRenderbuffers\0"
+ "glDeleteRenderbuffersEXT\0"
+ "\0"
+ /* _mesa_function_pool[31880]: VertexAttrib4NubvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4Nubv\0"
+ "glVertexAttrib4NubvARB\0"
+ "\0"
+ /* _mesa_function_pool[31927]: VertexAttrib3dvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib3dvNV\0"
+ "\0"
+ /* _mesa_function_pool[31951]: GetObjectParameterfvARB (will be remapped) */
+ "iip\0"
+ "glGetObjectParameterfvARB\0"
+ "\0"
+ /* _mesa_function_pool[31982]: Vertex4iv (offset 147) */
+ "p\0"
+ "glVertex4iv\0"
+ "\0"
+ /* _mesa_function_pool[31997]: GetProgramEnvParameterdvARB (will be remapped) */
+ "iip\0"
+ "glGetProgramEnvParameterdvARB\0"
+ "\0"
+ /* _mesa_function_pool[32032]: TexCoord4dv (offset 119) */
+ "p\0"
+ "glTexCoord4dv\0"
+ "\0"
+ /* _mesa_function_pool[32049]: LockArraysEXT (will be remapped) */
+ "ii\0"
+ "glLockArraysEXT\0"
+ "\0"
+ /* _mesa_function_pool[32069]: Begin (offset 7) */
+ "i\0"
+ "glBegin\0"
+ "\0"
+ /* _mesa_function_pool[32080]: LightModeli (offset 165) */
+ "ii\0"
+ "glLightModeli\0"
+ "\0"
+ /* _mesa_function_pool[32098]: VertexAttribI4ivEXT (will be remapped) */
+ "ip\0"
+ "glVertexAttribI4ivEXT\0"
+ "glVertexAttribI4iv\0"
+ "\0"
+ /* _mesa_function_pool[32143]: Rectfv (offset 89) */
+ "pp\0"
+ "glRectfv\0"
+ "\0"
+ /* _mesa_function_pool[32156]: LightModelf (offset 163) */
+ "if\0"
+ "glLightModelf\0"
+ "\0"
+ /* _mesa_function_pool[32174]: GetTexParameterfv (offset 282) */
+ "iip\0"
+ "glGetTexParameterfv\0"
+ "\0"
+ /* _mesa_function_pool[32199]: GetLightfv (offset 264) */
+ "iip\0"
+ "glGetLightfv\0"
+ "\0"
+ /* _mesa_function_pool[32217]: PixelTransformParameterivEXT (dynamic) */
+ "iip\0"
+ "glPixelTransformParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[32253]: BinormalPointerEXT (dynamic) */
+ "iip\0"
+ "glBinormalPointerEXT\0"
+ "\0"
+ /* _mesa_function_pool[32279]: VertexAttrib1dNV (will be remapped) */
+ "id\0"
+ "glVertexAttrib1dNV\0"
+ "\0"
+ /* _mesa_function_pool[32302]: GetCombinerInputParameterivNV (will be remapped) */
+ "iiiip\0"
+ "glGetCombinerInputParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[32341]: Disable (offset 214) */
+ "i\0"
+ "glDisable\0"
+ "\0"
+ /* _mesa_function_pool[32354]: MultiTexCoord2fvARB (offset 387) */
+ "ip\0"
+ "glMultiTexCoord2fv\0"
+ "glMultiTexCoord2fvARB\0"
+ "\0"
+ /* _mesa_function_pool[32399]: GetRenderbufferParameterivEXT (will be remapped) */
+ "iip\0"
+ "glGetRenderbufferParameteriv\0"
+ "glGetRenderbufferParameterivEXT\0"
+ "\0"
+ /* _mesa_function_pool[32465]: CombinerParameterivNV (will be remapped) */
+ "ip\0"
+ "glCombinerParameterivNV\0"
+ "\0"
+ /* _mesa_function_pool[32493]: GenFragmentShadersATI (will be remapped) */
+ "i\0"
+ "glGenFragmentShadersATI\0"
+ "\0"
+ /* _mesa_function_pool[32520]: DrawArrays (offset 310) */
+ "iii\0"
+ "glDrawArrays\0"
+ "glDrawArraysEXT\0"
+ "\0"
+ /* _mesa_function_pool[32554]: WeightuivARB (dynamic) */
+ "ip\0"
+ "glWeightuivARB\0"
+ "\0"
+ /* _mesa_function_pool[32573]: VertexAttrib2sARB (will be remapped) */
+ "iii\0"
+ "glVertexAttrib2s\0"
+ "glVertexAttrib2sARB\0"
+ "\0"
+ /* _mesa_function_pool[32615]: ColorMask (offset 210) */
+ "iiii\0"
+ "glColorMask\0"
+ "\0"
+ /* _mesa_function_pool[32633]: GenAsyncMarkersSGIX (dynamic) */
+ "i\0"
+ "glGenAsyncMarkersSGIX\0"
+ "\0"
+ /* _mesa_function_pool[32658]: Tangent3svEXT (dynamic) */
+ "p\0"
+ "glTangent3svEXT\0"
+ "\0"
+ /* _mesa_function_pool[32677]: GetListParameterivSGIX (dynamic) */
+ "iip\0"
+ "glGetListParameterivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[32707]: BindBufferARB (will be remapped) */
+ "ii\0"
+ "glBindBuffer\0"
+ "glBindBufferARB\0"
+ "\0"
+ /* _mesa_function_pool[32740]: GetInfoLogARB (will be remapped) */
+ "iipp\0"
+ "glGetInfoLogARB\0"
+ "\0"
+ /* _mesa_function_pool[32762]: RasterPos4iv (offset 83) */
+ "p\0"
+ "glRasterPos4iv\0"
+ "\0"
+ /* _mesa_function_pool[32780]: Enable (offset 215) */
+ "i\0"
+ "glEnable\0"
+ "\0"
+ /* _mesa_function_pool[32792]: LineStipple (offset 167) */
+ "ii\0"
+ "glLineStipple\0"
+ "\0"
+ /* _mesa_function_pool[32810]: VertexAttribs4svNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs4svNV\0"
+ "\0"
+ /* _mesa_function_pool[32836]: EdgeFlagPointerListIBM (dynamic) */
+ "ipi\0"
+ "glEdgeFlagPointerListIBM\0"
+ "\0"
+ /* _mesa_function_pool[32866]: UniformMatrix3x2fv (will be remapped) */
+ "iiip\0"
+ "glUniformMatrix3x2fv\0"
+ "\0"
+ /* _mesa_function_pool[32893]: GetMinmaxParameterfv (offset 365) */
+ "iip\0"
+ "glGetMinmaxParameterfv\0"
+ "glGetMinmaxParameterfvEXT\0"
+ "\0"
+ /* _mesa_function_pool[32947]: VertexAttrib1fvARB (will be remapped) */
+ "ip\0"
+ "glVertexAttrib1fv\0"
+ "glVertexAttrib1fvARB\0"
+ "\0"
+ /* _mesa_function_pool[32990]: GenBuffersARB (will be remapped) */
+ "ip\0"
+ "glGenBuffers\0"
+ "glGenBuffersARB\0"
+ "\0"
+ /* _mesa_function_pool[33023]: VertexAttribs1svNV (will be remapped) */
+ "iip\0"
+ "glVertexAttribs1svNV\0"
+ "\0"
+ /* _mesa_function_pool[33049]: Vertex3fv (offset 137) */
+ "p\0"
+ "glVertex3fv\0"
+ "\0"
+ /* _mesa_function_pool[33064]: GetTexBumpParameterivATI (will be remapped) */
+ "ip\0"
+ "glGetTexBumpParameterivATI\0"
+ "\0"
+ /* _mesa_function_pool[33095]: Binormal3bEXT (dynamic) */
+ "iii\0"
+ "glBinormal3bEXT\0"
+ "\0"
+ /* _mesa_function_pool[33116]: FragmentMaterialivSGIX (dynamic) */
+ "iip\0"
+ "glFragmentMaterialivSGIX\0"
+ "\0"
+ /* _mesa_function_pool[33146]: IsRenderbufferEXT (will be remapped) */
+ "i\0"
+ "glIsRenderbuffer\0"
+ "glIsRenderbufferEXT\0"
+ "\0"
+ /* _mesa_function_pool[33186]: GenProgramsNV (will be remapped) */
+ "ip\0"
+ "glGenProgramsARB\0"
+ "glGenProgramsNV\0"
+ "\0"
+ /* _mesa_function_pool[33223]: VertexAttrib4dvNV (will be remapped) */
+ "ip\0"
+ "glVertexAttrib4dvNV\0"
+ "\0"
+ /* _mesa_function_pool[33247]: EndFragmentShaderATI (will be remapped) */
+ "\0"
+ "glEndFragmentShaderATI\0"
+ "\0"
+ /* _mesa_function_pool[33272]: Binormal3iEXT (dynamic) */
+ "iii\0"
+ "glBinormal3iEXT\0"
+ "\0"
+ /* _mesa_function_pool[33293]: WindowPos2fMESA (will be remapped) */
+ "ff\0"
+ "glWindowPos2f\0"
+ "glWindowPos2fARB\0"
+ "glWindowPos2fMESA\0"
+ "\0"
+ ;
+
+/* these functions need to be remapped */
+static const struct gl_function_pool_remap MESA_remap_table_functions[] = {
+ { 1577, AttachShader_remap_index },
+ { 9906, CreateProgram_remap_index },
+ { 23042, CreateShader_remap_index },
+ { 25529, DeleteProgram_remap_index },
+ { 18686, DeleteShader_remap_index },
+ { 23543, DetachShader_remap_index },
+ { 18052, GetAttachedShaders_remap_index },
+ { 4869, GetProgramInfoLog_remap_index },
+ { 405, GetProgramiv_remap_index },
+ { 6542, GetShaderInfoLog_remap_index },
+ { 31154, GetShaderiv_remap_index },
+ { 13361, IsProgram_remap_index },
+ { 12282, IsShader_remap_index },
+ { 10036, StencilFuncSeparate_remap_index },
+ { 3921, StencilMaskSeparate_remap_index },
+ { 7607, StencilOpSeparate_remap_index },
+ { 22330, UniformMatrix2x3fv_remap_index },
+ { 2847, UniformMatrix2x4fv_remap_index },
+ { 32866, UniformMatrix3x2fv_remap_index },
+ { 30476, UniformMatrix3x4fv_remap_index },
+ { 16309, UniformMatrix4x2fv_remap_index },
+ { 3263, UniformMatrix4x3fv_remap_index },
+ { 5030, ClampColor_remap_index },
+ { 18106, ClearBufferfi_remap_index },
+ { 17548, ClearBufferfv_remap_index },
+ { 29499, ClearBufferiv_remap_index },
+ { 13566, ClearBufferuiv_remap_index },
+ { 19969, GetStringi_remap_index },
+ { 2788, TexBuffer_remap_index },
+ { 938, FramebufferTexture_remap_index },
+ { 26555, GetBufferParameteri64v_remap_index },
+ { 10136, GetInteger64i_v_remap_index },
+ { 23356, VertexAttribDivisor_remap_index },
+ { 9924, LoadTransposeMatrixdARB_remap_index },
+ { 30883, LoadTransposeMatrixfARB_remap_index },
+ { 5608, MultTransposeMatrixdARB_remap_index },
+ { 23730, MultTransposeMatrixfARB_remap_index },
+ { 216, SampleCoverageARB_remap_index },
+ { 5834, CompressedTexImage1DARB_remap_index },
+ { 24258, CompressedTexImage2DARB_remap_index },
+ { 3984, CompressedTexImage3DARB_remap_index },
+ { 18403, CompressedTexSubImage1DARB_remap_index },
+ { 2050, CompressedTexSubImage2DARB_remap_index },
+ { 20391, CompressedTexSubImage3DARB_remap_index },
+ { 28635, GetCompressedTexImageARB_remap_index },
+ { 3829, DisableVertexAttribArrayARB_remap_index },
+ { 30041, EnableVertexAttribArrayARB_remap_index },
+ { 31997, GetProgramEnvParameterdvARB_remap_index },
+ { 23610, GetProgramEnvParameterfvARB_remap_index },
+ { 27552, GetProgramLocalParameterdvARB_remap_index },
+ { 8049, GetProgramLocalParameterfvARB_remap_index },
+ { 18537, GetProgramStringARB_remap_index },
+ { 27747, GetProgramivARB_remap_index },
+ { 20586, GetVertexAttribdvARB_remap_index },
+ { 16117, GetVertexAttribfvARB_remap_index },
+ { 9748, GetVertexAttribivARB_remap_index },
+ { 19450, ProgramEnvParameter4dARB_remap_index },
+ { 25279, ProgramEnvParameter4dvARB_remap_index },
+ { 16870, ProgramEnvParameter4fARB_remap_index },
+ { 8948, ProgramEnvParameter4fvARB_remap_index },
+ { 3947, ProgramLocalParameter4dARB_remap_index },
+ { 13071, ProgramLocalParameter4dvARB_remap_index },
+ { 29520, ProgramLocalParameter4fARB_remap_index },
+ { 25915, ProgramLocalParameter4fvARB_remap_index },
+ { 28389, ProgramStringARB_remap_index },
+ { 19700, VertexAttrib1dARB_remap_index },
+ { 15771, VertexAttrib1dvARB_remap_index },
+ { 4122, VertexAttrib1fARB_remap_index },
+ { 32947, VertexAttrib1fvARB_remap_index },
+ { 7133, VertexAttrib1sARB_remap_index },
+ { 2224, VertexAttrib1svARB_remap_index },
+ { 15202, VertexAttrib2dARB_remap_index },
+ { 17569, VertexAttrib2dvARB_remap_index },
+ { 1596, VertexAttrib2fARB_remap_index },
+ { 17682, VertexAttrib2fvARB_remap_index },
+ { 32573, VertexAttrib2sARB_remap_index },
+ { 31634, VertexAttrib2svARB_remap_index },
+ { 11287, VertexAttrib3dARB_remap_index },
+ { 8615, VertexAttrib3dvARB_remap_index },
+ { 1683, VertexAttrib3fARB_remap_index },
+ { 22593, VertexAttrib3fvARB_remap_index },
+ { 28236, VertexAttrib3sARB_remap_index },
+ { 20328, VertexAttrib3svARB_remap_index },
+ { 4895, VertexAttrib4NbvARB_remap_index },
+ { 17929, VertexAttrib4NivARB_remap_index },
+ { 22548, VertexAttrib4NsvARB_remap_index },
+ { 23562, VertexAttrib4NubARB_remap_index },
+ { 31880, VertexAttrib4NubvARB_remap_index },
+ { 19111, VertexAttrib4NuivARB_remap_index },
+ { 3136, VertexAttrib4NusvARB_remap_index },
+ { 10876, VertexAttrib4bvARB_remap_index },
+ { 26925, VertexAttrib4dARB_remap_index },
+ { 21350, VertexAttrib4dvARB_remap_index },
+ { 11441, VertexAttrib4fARB_remap_index },
+ { 11845, VertexAttrib4fvARB_remap_index },
+ { 10252, VertexAttrib4ivARB_remap_index },
+ { 17362, VertexAttrib4sARB_remap_index },
+ { 31069, VertexAttrib4svARB_remap_index },
+ { 16675, VertexAttrib4ubvARB_remap_index },
+ { 30365, VertexAttrib4uivARB_remap_index },
+ { 20139, VertexAttrib4usvARB_remap_index },
+ { 22145, VertexAttribPointerARB_remap_index },
+ { 32707, BindBufferARB_remap_index },
+ { 6840, BufferDataARB_remap_index },
+ { 1498, BufferSubDataARB_remap_index },
+ { 30646, DeleteBuffersARB_remap_index },
+ { 32990, GenBuffersARB_remap_index },
+ { 17725, GetBufferParameterivARB_remap_index },
+ { 16822, GetBufferPointervARB_remap_index },
+ { 1451, GetBufferSubDataARB_remap_index },
+ { 30313, IsBufferARB_remap_index },
+ { 26399, MapBufferARB_remap_index },
+ { 31284, UnmapBufferARB_remap_index },
+ { 312, BeginQueryARB_remap_index },
+ { 19795, DeleteQueriesARB_remap_index },
+ { 12172, EndQueryARB_remap_index },
+ { 29114, GenQueriesARB_remap_index },
+ { 1942, GetQueryObjectivARB_remap_index },
+ { 17406, GetQueryObjectuivARB_remap_index },
+ { 1740, GetQueryivARB_remap_index },
+ { 20046, IsQueryARB_remap_index },
+ { 8225, AttachObjectARB_remap_index },
+ { 18648, CompileShaderARB_remap_index },
+ { 3205, CreateProgramObjectARB_remap_index },
+ { 6785, CreateShaderObjectARB_remap_index },
+ { 14504, DeleteObjectARB_remap_index },
+ { 24049, DetachObjectARB_remap_index },
+ { 11917, GetActiveUniformARB_remap_index },
+ { 9423, GetAttachedObjectsARB_remap_index },
+ { 9730, GetHandleARB_remap_index },
+ { 32740, GetInfoLogARB_remap_index },
+ { 31951, GetObjectParameterfvARB_remap_index },
+ { 27426, GetObjectParameterivARB_remap_index },
+ { 28872, GetShaderSourceARB_remap_index },
+ { 28096, GetUniformLocationARB_remap_index },
+ { 23832, GetUniformfvARB_remap_index },
+ { 12646, GetUniformivARB_remap_index },
+ { 20184, LinkProgramARB_remap_index },
+ { 20242, ShaderSourceARB_remap_index },
+ { 7507, Uniform1fARB_remap_index },
+ { 29729, Uniform1fvARB_remap_index },
+ { 22114, Uniform1iARB_remap_index },
+ { 21039, Uniform1ivARB_remap_index },
+ { 2173, Uniform2fARB_remap_index },
+ { 14340, Uniform2fvARB_remap_index },
+ { 26286, Uniform2iARB_remap_index },
+ { 2293, Uniform2ivARB_remap_index },
+ { 18758, Uniform3fARB_remap_index },
+ { 9453, Uniform3fvARB_remap_index },
+ { 6396, Uniform3iARB_remap_index },
+ { 16928, Uniform3ivARB_remap_index },
+ { 19256, Uniform4fARB_remap_index },
+ { 23696, Uniform4fvARB_remap_index },
+ { 24958, Uniform4iARB_remap_index },
+ { 20552, Uniform4ivARB_remap_index },
+ { 8277, UniformMatrix2fvARB_remap_index },
+ { 17, UniformMatrix3fvARB_remap_index },
+ { 2690, UniformMatrix4fvARB_remap_index },
+ { 25391, UseProgramObjectARB_remap_index },
+ { 14890, ValidateProgramARB_remap_index },
+ { 21393, BindAttribLocationARB_remap_index },
+ { 4940, GetActiveAttribARB_remap_index },
+ { 16576, GetAttribLocationARB_remap_index },
+ { 29447, DrawBuffersARB_remap_index },
+ { 29310, ClampColorARB_remap_index },
+ { 17974, DrawArraysInstancedARB_remap_index },
+ { 6457, DrawElementsInstancedARB_remap_index },
+ { 13176, RenderbufferStorageMultisample_remap_index },
+ { 13647, FramebufferTextureARB_remap_index },
+ { 25817, FramebufferTextureFaceARB_remap_index },
+ { 24198, ProgramParameteriARB_remap_index },
+ { 23514, VertexAttribDivisorARB_remap_index },
+ { 19304, FlushMappedBufferRange_remap_index },
+ { 27863, MapBufferRange_remap_index },
+ { 27770, TexBufferARB_remap_index },
+ { 16420, BindVertexArray_remap_index },
+ { 14713, GenVertexArrays_remap_index },
+ { 30243, CopyBufferSubData_remap_index },
+ { 31173, ClientWaitSync_remap_index },
+ { 2609, DeleteSync_remap_index },
+ { 7174, FenceSync_remap_index },
+ { 15261, GetInteger64v_remap_index },
+ { 22655, GetSynciv_remap_index },
+ { 29386, IsSync_remap_index },
+ { 9371, WaitSync_remap_index },
+ { 3797, DrawElementsBaseVertex_remap_index },
+ { 30578, DrawRangeElementsBaseVertex_remap_index },
+ { 26430, MultiDrawElementsBaseVertex_remap_index },
+ { 16642, BlendEquationSeparateiARB_remap_index },
+ { 17818, BlendEquationiARB_remap_index },
+ { 12615, BlendFuncSeparateiARB_remap_index },
+ { 9796, BlendFunciARB_remap_index },
+ { 5091, BindTransformFeedback_remap_index },
+ { 3232, DeleteTransformFeedbacks_remap_index },
+ { 6429, DrawTransformFeedback_remap_index },
+ { 9590, GenTransformFeedbacks_remap_index },
+ { 28279, IsTransformFeedback_remap_index },
+ { 26010, PauseTransformFeedback_remap_index },
+ { 5528, ResumeTransformFeedback_remap_index },
+ { 21713, ClearDepthf_remap_index },
+ { 6733, DepthRangef_remap_index },
+ { 14525, GetShaderPrecisionFormat_remap_index },
+ { 9976, ReleaseShaderCompiler_remap_index },
+ { 10919, ShaderBinary_remap_index },
+ { 5396, PolygonOffsetEXT_remap_index },
+ { 23277, GetPixelTexGenParameterfvSGIS_remap_index },
+ { 4417, GetPixelTexGenParameterivSGIS_remap_index },
+ { 23010, PixelTexGenParameterfSGIS_remap_index },
+ { 624, PixelTexGenParameterfvSGIS_remap_index },
+ { 12684, PixelTexGenParameteriSGIS_remap_index },
+ { 13821, PixelTexGenParameterivSGIS_remap_index },
+ { 18302, SampleMaskSGIS_remap_index },
+ { 19986, SamplePatternSGIS_remap_index },
+ { 26359, ColorPointerEXT_remap_index },
+ { 17612, EdgeFlagPointerEXT_remap_index },
+ { 6050, IndexPointerEXT_remap_index },
+ { 6130, NormalPointerEXT_remap_index },
+ { 15855, TexCoordPointerEXT_remap_index },
+ { 6963, VertexPointerEXT_remap_index },
+ { 3599, PointParameterfEXT_remap_index },
+ { 7814, PointParameterfvEXT_remap_index },
+ { 32049, LockArraysEXT_remap_index },
+ { 14954, UnlockArraysEXT_remap_index },
+ { 1267, SecondaryColor3bEXT_remap_index },
+ { 7973, SecondaryColor3bvEXT_remap_index },
+ { 10429, SecondaryColor3dEXT_remap_index },
+ { 25587, SecondaryColor3dvEXT_remap_index },
+ { 28145, SecondaryColor3fEXT_remap_index },
+ { 18339, SecondaryColor3fvEXT_remap_index },
+ { 470, SecondaryColor3iEXT_remap_index },
+ { 16165, SecondaryColor3ivEXT_remap_index },
+ { 10064, SecondaryColor3sEXT_remap_index },
+ { 30837, SecondaryColor3svEXT_remap_index },
+ { 27262, SecondaryColor3ubEXT_remap_index },
+ { 21284, SecondaryColor3ubvEXT_remap_index },
+ { 12926, SecondaryColor3uiEXT_remap_index },
+ { 22897, SecondaryColor3uivEXT_remap_index },
+ { 25867, SecondaryColor3usEXT_remap_index },
+ { 12999, SecondaryColor3usvEXT_remap_index },
+ { 11788, SecondaryColorPointerEXT_remap_index },
+ { 25681, MultiDrawArraysEXT_remap_index },
+ { 20974, MultiDrawElementsEXT_remap_index },
+ { 21169, FogCoordPointerEXT_remap_index },
+ { 4566, FogCoorddEXT_remap_index },
+ { 31450, FogCoorddvEXT_remap_index },
+ { 4683, FogCoordfEXT_remap_index },
+ { 27185, FogCoordfvEXT_remap_index },
+ { 19208, PixelTexGenSGIX_remap_index },
+ { 27790, BlendFuncSeparateEXT_remap_index },
+ { 6875, FlushVertexArrayRangeNV_remap_index },
+ { 5345, VertexArrayRangeNV_remap_index },
+ { 28210, CombinerInputNV_remap_index },
+ { 2116, CombinerOutputNV_remap_index },
+ { 30990, CombinerParameterfNV_remap_index },
+ { 5219, CombinerParameterfvNV_remap_index },
+ { 22379, CombinerParameteriNV_remap_index },
+ { 32465, CombinerParameterivNV_remap_index },
+ { 7251, FinalCombinerInputNV_remap_index },
+ { 9817, GetCombinerInputParameterfvNV_remap_index },
+ { 32302, GetCombinerInputParameterivNV_remap_index },
+ { 13922, GetCombinerOutputParameterfvNV_remap_index },
+ { 13750, GetCombinerOutputParameterivNV_remap_index },
+ { 6637, GetFinalCombinerInputParameterfvNV_remap_index },
+ { 24830, GetFinalCombinerInputParameterivNV_remap_index },
+ { 12593, ResizeBuffersMESA_remap_index },
+ { 11114, WindowPos2dMESA_remap_index },
+ { 1060, WindowPos2dvMESA_remap_index },
+ { 33293, WindowPos2fMESA_remap_index },
+ { 7918, WindowPos2fvMESA_remap_index },
+ { 18249, WindowPos2iMESA_remap_index },
+ { 20459, WindowPos2ivMESA_remap_index },
+ { 21073, WindowPos2sMESA_remap_index },
+ { 5748, WindowPos2svMESA_remap_index },
+ { 7743, WindowPos3dMESA_remap_index },
+ { 14068, WindowPos3dvMESA_remap_index },
+ { 516, WindowPos3fMESA_remap_index },
+ { 15015, WindowPos3fvMESA_remap_index },
+ { 24091, WindowPos3iMESA_remap_index },
+ { 30188, WindowPos3ivMESA_remap_index },
+ { 18903, WindowPos3sMESA_remap_index },
+ { 31706, WindowPos3svMESA_remap_index },
+ { 11065, WindowPos4dMESA_remap_index },
+ { 17066, WindowPos4dvMESA_remap_index },
+ { 14027, WindowPos4fMESA_remap_index },
+ { 30744, WindowPos4fvMESA_remap_index },
+ { 30341, WindowPos4iMESA_remap_index },
+ { 12396, WindowPos4ivMESA_remap_index },
+ { 19087, WindowPos4sMESA_remap_index },
+ { 3183, WindowPos4svMESA_remap_index },
+ { 13789, MultiModeDrawArraysIBM_remap_index },
+ { 28985, MultiModeDrawElementsIBM_remap_index },
+ { 12200, DeleteFencesNV_remap_index },
+ { 28057, FinishFenceNV_remap_index },
+ { 3721, GenFencesNV_remap_index },
+ { 17046, GetFenceivNV_remap_index },
+ { 8210, IsFenceNV_remap_index },
+ { 13677, SetFenceNV_remap_index },
+ { 4178, TestFenceNV_remap_index },
+ { 31677, AreProgramsResidentNV_remap_index },
+ { 31032, BindProgramNV_remap_index },
+ { 25950, DeleteProgramsNV_remap_index },
+ { 21502, ExecuteProgramNV_remap_index },
+ { 33186, GenProgramsNV_remap_index },
+ { 23382, GetProgramParameterdvNV_remap_index },
+ { 10491, GetProgramParameterfvNV_remap_index },
+ { 26333, GetProgramStringNV_remap_index },
+ { 24468, GetProgramivNV_remap_index },
+ { 23645, GetTrackMatrixivNV_remap_index },
+ { 26127, GetVertexAttribPointervNV_remap_index },
+ { 24763, GetVertexAttribdvNV_remap_index },
+ { 9266, GetVertexAttribfvNV_remap_index },
+ { 18510, GetVertexAttribivNV_remap_index },
+ { 19334, IsProgramNV_remap_index },
+ { 9349, LoadProgramNV_remap_index },
+ { 27886, ProgramParameters4dvNV_remap_index },
+ { 24398, ProgramParameters4fvNV_remap_index },
+ { 20763, RequestResidentProgramsNV_remap_index },
+ { 22357, TrackMatrixNV_remap_index },
+ { 32279, VertexAttrib1dNV_remap_index },
+ { 13588, VertexAttrib1dvNV_remap_index },
+ { 28491, VertexAttrib1fNV_remap_index },
+ { 2415, VertexAttrib1fvNV_remap_index },
+ { 30801, VertexAttrib1sNV_remap_index },
+ { 15088, VertexAttrib1svNV_remap_index },
+ { 4845, VertexAttrib2dNV_remap_index },
+ { 13481, VertexAttrib2dvNV_remap_index },
+ { 20218, VertexAttrib2fNV_remap_index },
+ { 13047, VertexAttrib2fvNV_remap_index },
+ { 5960, VertexAttrib2sNV_remap_index },
+ { 18957, VertexAttrib2svNV_remap_index },
+ { 11262, VertexAttrib3dNV_remap_index },
+ { 31927, VertexAttrib3dvNV_remap_index },
+ { 10303, VertexAttrib3fNV_remap_index },
+ { 24790, VertexAttrib3fvNV_remap_index },
+ { 22200, VertexAttrib3sNV_remap_index },
+ { 23672, VertexAttrib3svNV_remap_index },
+ { 28959, VertexAttrib4dNV_remap_index },
+ { 33223, VertexAttrib4dvNV_remap_index },
+ { 4467, VertexAttrib4fNV_remap_index },
+ { 9399, VertexAttrib4fvNV_remap_index },
+ { 26809, VertexAttrib4sNV_remap_index },
+ { 1409, VertexAttrib4svNV_remap_index },
+ { 5003, VertexAttrib4ubNV_remap_index },
+ { 778, VertexAttrib4ubvNV_remap_index },
+ { 21682, VertexAttribPointerNV_remap_index },
+ { 2267, VertexAttribs1dvNV_remap_index },
+ { 26215, VertexAttribs1fvNV_remap_index },
+ { 33023, VertexAttribs1svNV_remap_index },
+ { 10328, VertexAttribs2dvNV_remap_index },
+ { 25352, VertexAttribs2fvNV_remap_index },
+ { 17638, VertexAttribs2svNV_remap_index },
+ { 5247, VertexAttribs3dvNV_remap_index },
+ { 2147, VertexAttribs3fvNV_remap_index },
+ { 29936, VertexAttribs3svNV_remap_index },
+ { 26899, VertexAttribs4dvNV_remap_index },
+ { 5319, VertexAttribs4fvNV_remap_index },
+ { 32810, VertexAttribs4svNV_remap_index },
+ { 29684, VertexAttribs4ubvNV_remap_index },
+ { 26969, GetTexBumpParameterfvATI_remap_index },
+ { 33064, GetTexBumpParameterivATI_remap_index },
+ { 18620, TexBumpParameterfvATI_remap_index },
+ { 20634, TexBumpParameterivATI_remap_index },
+ { 15634, AlphaFragmentOp1ATI_remap_index },
+ { 25633, AlphaFragmentOp2ATI_remap_index },
+ { 24706, AlphaFragmentOp3ATI_remap_index },
+ { 29863, BeginFragmentShaderATI_remap_index },
+ { 31231, BindFragmentShaderATI_remap_index },
+ { 23801, ColorFragmentOp1ATI_remap_index },
+ { 4345, ColorFragmentOp2ATI_remap_index },
+ { 31572, ColorFragmentOp3ATI_remap_index },
+ { 5485, DeleteFragmentShaderATI_remap_index },
+ { 33247, EndFragmentShaderATI_remap_index },
+ { 32493, GenFragmentShadersATI_remap_index },
+ { 25506, PassTexCoordATI_remap_index },
+ { 6943, SampleMapATI_remap_index },
+ { 27080, SetFragmentShaderConstantATI_remap_index },
+ { 363, PointParameteriNV_remap_index },
+ { 14229, PointParameterivNV_remap_index },
+ { 28798, ActiveStencilFaceEXT_remap_index },
+ { 27526, BindVertexArrayAPPLE_remap_index },
+ { 2737, DeleteVertexArraysAPPLE_remap_index },
+ { 18079, GenVertexArraysAPPLE_remap_index },
+ { 23447, IsVertexArrayAPPLE_remap_index },
+ { 819, GetProgramNamedParameterdvNV_remap_index },
+ { 3562, GetProgramNamedParameterfvNV_remap_index },
+ { 27000, ProgramNamedParameter4dNV_remap_index },
+ { 14588, ProgramNamedParameter4dvNV_remap_index },
+ { 8882, ProgramNamedParameter4fNV_remap_index },
+ { 11753, ProgramNamedParameter4fvNV_remap_index },
+ { 16977, PrimitiveRestartIndexNV_remap_index },
+ { 30721, PrimitiveRestartNV_remap_index },
+ { 24377, DepthBoundsEXT_remap_index },
+ { 1159, BlendEquationSeparateEXT_remap_index },
+ { 14789, BindFramebufferEXT_remap_index },
+ { 25726, BindRenderbufferEXT_remap_index },
+ { 9646, CheckFramebufferStatusEXT_remap_index },
+ { 22698, DeleteFramebuffersEXT_remap_index },
+ { 31829, DeleteRenderbuffersEXT_remap_index },
+ { 13505, FramebufferRenderbufferEXT_remap_index },
+ { 13694, FramebufferTexture1DEXT_remap_index },
+ { 11547, FramebufferTexture2DEXT_remap_index },
+ { 11167, FramebufferTexture3DEXT_remap_index },
+ { 23313, GenFramebuffersEXT_remap_index },
+ { 17503, GenRenderbuffersEXT_remap_index },
+ { 6679, GenerateMipmapEXT_remap_index },
+ { 21775, GetFramebufferAttachmentParameterivEXT_remap_index },
+ { 32399, GetRenderbufferParameterivEXT_remap_index },
+ { 20514, IsFramebufferEXT_remap_index },
+ { 33146, IsRenderbufferEXT_remap_index },
+ { 8157, RenderbufferStorageEXT_remap_index },
+ { 695, BlitFramebufferEXT_remap_index },
+ { 14374, BufferParameteriAPPLE_remap_index },
+ { 19366, FlushMappedBufferRangeAPPLE_remap_index },
+ { 1815, BindFragDataLocationEXT_remap_index },
+ { 24490, GetFragDataLocationEXT_remap_index },
+ { 10606, GetUniformuivEXT_remap_index },
+ { 2933, GetVertexAttribIivEXT_remap_index },
+ { 4195, GetVertexAttribIuivEXT_remap_index },
+ { 12033, Uniform1uiEXT_remap_index },
+ { 27971, Uniform1uivEXT_remap_index },
+ { 22296, Uniform2uiEXT_remap_index },
+ { 4309, Uniform2uivEXT_remap_index },
+ { 29238, Uniform3uiEXT_remap_index },
+ { 14735, Uniform3uivEXT_remap_index },
+ { 3486, Uniform4uiEXT_remap_index },
+ { 8658, Uniform4uivEXT_remap_index },
+ { 18467, VertexAttribI1iEXT_remap_index },
+ { 965, VertexAttribI1ivEXT_remap_index },
+ { 2516, VertexAttribI1uiEXT_remap_index },
+ { 12775, VertexAttribI1uivEXT_remap_index },
+ { 81, VertexAttribI2iEXT_remap_index },
+ { 23913, VertexAttribI2ivEXT_remap_index },
+ { 5273, VertexAttribI2uiEXT_remap_index },
+ { 4728, VertexAttribI2uivEXT_remap_index },
+ { 26601, VertexAttribI3iEXT_remap_index },
+ { 30533, VertexAttribI3ivEXT_remap_index },
+ { 3340, VertexAttribI3uiEXT_remap_index },
+ { 30429, VertexAttribI3uivEXT_remap_index },
+ { 22026, VertexAttribI4bvEXT_remap_index },
+ { 14667, VertexAttribI4iEXT_remap_index },
+ { 32098, VertexAttribI4ivEXT_remap_index },
+ { 13408, VertexAttribI4svEXT_remap_index },
+ { 16529, VertexAttribI4ubvEXT_remap_index },
+ { 16228, VertexAttribI4uiEXT_remap_index },
+ { 5419, VertexAttribI4uivEXT_remap_index },
+ { 11330, VertexAttribI4usvEXT_remap_index },
+ { 18564, VertexAttribIPointerEXT_remap_index },
+ { 3027, FramebufferTextureLayerEXT_remap_index },
+ { 5660, ColorMaskIndexedEXT_remap_index },
+ { 18981, DisableIndexedEXT_remap_index },
+ { 26646, EnableIndexedEXT_remap_index },
+ { 21730, GetBooleanIndexedvEXT_remap_index },
+ { 10941, GetIntegerIndexedvEXT_remap_index },
+ { 22774, IsEnabledIndexedEXT_remap_index },
+ { 22674, ClearColorIiEXT_remap_index },
+ { 3436, ClearColorIuiEXT_remap_index },
+ { 9856, GetTexParameterIivEXT_remap_index },
+ { 5908, GetTexParameterIuivEXT_remap_index },
+ { 2983, TexParameterIivEXT_remap_index },
+ { 26468, TexParameterIuivEXT_remap_index },
+ { 4596, BeginConditionalRenderNV_remap_index },
+ { 25456, EndConditionalRenderNV_remap_index },
+ { 9293, BeginTransformFeedbackEXT_remap_index },
+ { 19016, BindBufferBaseEXT_remap_index },
+ { 18875, BindBufferOffsetEXT_remap_index },
+ { 12221, BindBufferRangeEXT_remap_index },
+ { 14289, EndTransformFeedbackEXT_remap_index },
+ { 10804, GetTransformFeedbackVaryingEXT_remap_index },
+ { 20819, TransformFeedbackVaryingsEXT_remap_index },
+ { 29585, ProvokingVertexEXT_remap_index },
+ { 10752, GetTexParameterPointervAPPLE_remap_index },
+ { 5047, TextureRangeAPPLE_remap_index },
+ { 11619, GetObjectParameterivAPPLE_remap_index },
+ { 19941, ObjectPurgeableAPPLE_remap_index },
+ { 5702, ObjectUnpurgeableAPPLE_remap_index },
+ { 17325, ActiveProgramEXT_remap_index },
+ { 17296, CreateShaderProgramEXT_remap_index },
+ { 28583, UseShaderProgramEXT_remap_index },
+ { 16508, TextureBarrierNV_remap_index },
+ { 28824, StencilFuncSeparateATI_remap_index },
+ { 18168, ProgramEnvParameters4fvEXT_remap_index },
+ { 17190, ProgramLocalParameters4fvEXT_remap_index },
+ { 14157, GetQueryObjecti64vEXT_remap_index },
+ { 10354, GetQueryObjectui64vEXT_remap_index },
+ { 23870, EGLImageTargetRenderbufferStorageOES_remap_index },
+ { 12139, EGLImageTargetTexture2DOES_remap_index },
+ { -1, -1 }
+};
+
+/* these functions are in the ABI, but have alternative names */
+static const struct gl_function_remap MESA_alt_functions[] = {
+ /* from GL_EXT_blend_color */
+ { 2655, _gloffset_BlendColor },
+ /* from GL_EXT_blend_minmax */
+ { 11224, _gloffset_BlendEquation },
+ /* from GL_EXT_color_subtable */
+ { 17088, _gloffset_ColorSubTable },
+ { 31761, _gloffset_CopyColorSubTable },
+ /* from GL_EXT_convolution */
+ { 257, _gloffset_ConvolutionFilter1D },
+ { 2454, _gloffset_CopyConvolutionFilter1D },
+ { 4058, _gloffset_GetConvolutionParameteriv },
+ { 8506, _gloffset_ConvolutionFilter2D },
+ { 8708, _gloffset_ConvolutionParameteriv },
+ { 9168, _gloffset_ConvolutionParameterfv },
+ { 20662, _gloffset_GetSeparableFilter },
+ { 24145, _gloffset_SeparableFilter2D },
+ { 25008, _gloffset_ConvolutionParameteri },
+ { 25131, _gloffset_ConvolutionParameterf },
+ { 26835, _gloffset_GetConvolutionParameterfv },
+ { 27692, _gloffset_GetConvolutionFilter },
+ { 30125, _gloffset_CopyConvolutionFilter2D },
+ /* from GL_EXT_copy_texture */
+ { 15148, _gloffset_CopyTexSubImage3D },
+ { 16775, _gloffset_CopyTexImage2D },
+ { 24616, _gloffset_CopyTexImage1D },
+ { 27373, _gloffset_CopyTexSubImage2D },
+ { 29763, _gloffset_CopyTexSubImage1D },
+ /* from GL_EXT_draw_range_elements */
+ { 9505, _gloffset_DrawRangeElements },
+ /* from GL_EXT_histogram */
+ { 856, _gloffset_Histogram },
+ { 3522, _gloffset_ResetHistogram },
+ { 10002, _gloffset_GetMinmax },
+ { 15482, _gloffset_GetHistogramParameterfv },
+ { 24541, _gloffset_GetMinmaxParameteriv },
+ { 26725, _gloffset_ResetMinmax },
+ { 27589, _gloffset_GetHistogramParameteriv },
+ { 28758, _gloffset_GetHistogram },
+ { 31347, _gloffset_Minmax },
+ { 32893, _gloffset_GetMinmaxParameterfv },
+ /* from GL_EXT_paletted_texture */
+ { 8368, _gloffset_ColorTable },
+ { 15328, _gloffset_GetColorTable },
+ { 23060, _gloffset_GetColorTableParameterfv },
+ { 25187, _gloffset_GetColorTableParameteriv },
+ /* from GL_EXT_subtexture */
+ { 7089, _gloffset_TexSubImage1D },
+ { 10679, _gloffset_TexSubImage2D },
+ /* from GL_EXT_texture3D */
+ { 1774, _gloffset_TexImage3D },
+ { 22829, _gloffset_TexSubImage3D },
+ /* from GL_EXT_texture_object */
+ { 3290, _gloffset_PrioritizeTextures },
+ { 7538, _gloffset_AreTexturesResident },
+ { 13612, _gloffset_GenTextures },
+ { 15814, _gloffset_DeleteTextures },
+ { 19647, _gloffset_IsTexture },
+ { 29828, _gloffset_BindTexture },
+ /* from GL_EXT_vertex_array */
+ { 24317, _gloffset_ArrayElement },
+ { 30935, _gloffset_GetPointerv },
+ { 32520, _gloffset_DrawArrays },
+ /* from GL_SGI_color_table */
+ { 7656, _gloffset_ColorTableParameteriv },
+ { 8368, _gloffset_ColorTable },
+ { 15328, _gloffset_GetColorTable },
+ { 15438, _gloffset_CopyColorTable },
+ { 19508, _gloffset_ColorTableParameterfv },
+ { 23060, _gloffset_GetColorTableParameterfv },
+ { 25187, _gloffset_GetColorTableParameteriv },
+ /* from GL_VERSION_1_3 */
+ { 425, _gloffset_MultiTexCoord3sARB },
+ { 657, _gloffset_ActiveTextureARB },
+ { 4247, _gloffset_MultiTexCoord1fvARB },
+ { 6155, _gloffset_MultiTexCoord3dARB },
+ { 6200, _gloffset_MultiTexCoord2iARB },
+ { 6324, _gloffset_MultiTexCoord2svARB },
+ { 8324, _gloffset_MultiTexCoord2fARB },
+ { 10384, _gloffset_MultiTexCoord3fvARB },
+ { 10986, _gloffset_MultiTexCoord4sARB },
+ { 11667, _gloffset_MultiTexCoord2dvARB },
+ { 12082, _gloffset_MultiTexCoord1svARB },
+ { 12454, _gloffset_MultiTexCoord3svARB },
+ { 12515, _gloffset_MultiTexCoord4iARB },
+ { 13316, _gloffset_MultiTexCoord3iARB },
+ { 14186, _gloffset_MultiTexCoord1dARB },
+ { 14403, _gloffset_MultiTexCoord3dvARB },
+ { 15682, _gloffset_MultiTexCoord3ivARB },
+ { 15727, _gloffset_MultiTexCoord2sARB },
+ { 17145, _gloffset_MultiTexCoord4ivARB },
+ { 19158, _gloffset_ClientActiveTextureARB },
+ { 21458, _gloffset_MultiTexCoord2dARB },
+ { 21895, _gloffset_MultiTexCoord4dvARB },
+ { 22251, _gloffset_MultiTexCoord4fvARB },
+ { 23201, _gloffset_MultiTexCoord3fARB },
+ { 25771, _gloffset_MultiTexCoord4dARB },
+ { 26037, _gloffset_MultiTexCoord1sARB },
+ { 26241, _gloffset_MultiTexCoord1dvARB },
+ { 27217, _gloffset_MultiTexCoord1ivARB },
+ { 27310, _gloffset_MultiTexCoord2ivARB },
+ { 27649, _gloffset_MultiTexCoord1iARB },
+ { 29033, _gloffset_MultiTexCoord4svARB },
+ { 29627, _gloffset_MultiTexCoord1fARB },
+ { 29890, _gloffset_MultiTexCoord4fARB },
+ { 32354, _gloffset_MultiTexCoord2fvARB },
+ { -1, -1 }
+};
+
+#endif /* need_MESA_remap_table */
+
+#if defined(need_GL_3DFX_tbuffer)
+static const struct gl_function_remap GL_3DFX_tbuffer_functions[] = {
+ { 9226, -1 }, /* TbufferMask3DFX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_APPLE_flush_buffer_range)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_APPLE_flush_buffer_range_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_APPLE_object_purgeable)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_APPLE_object_purgeable_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_APPLE_texture_range)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_APPLE_texture_range_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_APPLE_vertex_array_object)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_APPLE_vertex_array_object_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_ES2_compatibility)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_ES2_compatibility_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_color_buffer_float)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_color_buffer_float_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_copy_buffer)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_copy_buffer_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_draw_buffers)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_draw_buffers_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_draw_buffers_blend)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_draw_buffers_blend_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_draw_elements_base_vertex)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_draw_elements_base_vertex_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_draw_instanced)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_draw_instanced_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_framebuffer_object)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_framebuffer_object_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_geometry_shader4)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_geometry_shader4_functions[] = {
+ { 12418, -1 }, /* FramebufferTextureLayer */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_instanced_arrays)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_instanced_arrays_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_map_buffer_range)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_map_buffer_range_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_matrix_palette)
+static const struct gl_function_remap GL_ARB_matrix_palette_functions[] = {
+ { 3773, -1 }, /* MatrixIndexusvARB */
+ { 13137, -1 }, /* MatrixIndexuivARB */
+ { 14558, -1 }, /* MatrixIndexPointerARB */
+ { 19896, -1 }, /* CurrentPaletteMatrixARB */
+ { 22945, -1 }, /* MatrixIndexubvARB */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_multisample)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_multisample_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_occlusion_query)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_occlusion_query_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_point_parameters)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_point_parameters_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_provoking_vertex)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_provoking_vertex_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_shader_objects)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_shader_objects_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_sync)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_sync_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_texture_buffer_object)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_texture_buffer_object_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_texture_compression)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_texture_compression_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_transform_feedback2)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_transform_feedback2_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_transpose_matrix)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_transpose_matrix_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_vertex_array_object)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_vertex_array_object_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_vertex_blend)
+static const struct gl_function_remap GL_ARB_vertex_blend_functions[] = {
+ { 2396, -1 }, /* WeightubvARB */
+ { 6567, -1 }, /* WeightivARB */
+ { 11089, -1 }, /* WeightPointerARB */
+ { 13904, -1 }, /* WeightfvARB */
+ { 17664, -1 }, /* WeightbvARB */
+ { 21126, -1 }, /* WeightusvARB */
+ { 24071, -1 }, /* VertexBlendARB */
+ { 29711, -1 }, /* WeightsvARB */
+ { 31811, -1 }, /* WeightdvARB */
+ { 32554, -1 }, /* WeightuivARB */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_vertex_buffer_object)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_vertex_buffer_object_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_vertex_program)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_vertex_program_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_vertex_shader)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_vertex_shader_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ARB_window_pos)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ARB_window_pos_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ATI_blend_equation_separate)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ATI_blend_equation_separate_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ATI_draw_buffers)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ATI_draw_buffers_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ATI_envmap_bumpmap)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ATI_envmap_bumpmap_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ATI_fragment_shader)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ATI_fragment_shader_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_ATI_separate_stencil)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_ATI_separate_stencil_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_blend_color)
+static const struct gl_function_remap GL_EXT_blend_color_functions[] = {
+ { 2655, _gloffset_BlendColor },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_blend_equation_separate)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_blend_equation_separate_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_blend_func_separate)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_blend_func_separate_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_blend_minmax)
+static const struct gl_function_remap GL_EXT_blend_minmax_functions[] = {
+ { 11224, _gloffset_BlendEquation },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_color_subtable)
+static const struct gl_function_remap GL_EXT_color_subtable_functions[] = {
+ { 17088, _gloffset_ColorSubTable },
+ { 31761, _gloffset_CopyColorSubTable },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_compiled_vertex_array)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_compiled_vertex_array_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_convolution)
+static const struct gl_function_remap GL_EXT_convolution_functions[] = {
+ { 257, _gloffset_ConvolutionFilter1D },
+ { 2454, _gloffset_CopyConvolutionFilter1D },
+ { 4058, _gloffset_GetConvolutionParameteriv },
+ { 8506, _gloffset_ConvolutionFilter2D },
+ { 8708, _gloffset_ConvolutionParameteriv },
+ { 9168, _gloffset_ConvolutionParameterfv },
+ { 20662, _gloffset_GetSeparableFilter },
+ { 24145, _gloffset_SeparableFilter2D },
+ { 25008, _gloffset_ConvolutionParameteri },
+ { 25131, _gloffset_ConvolutionParameterf },
+ { 26835, _gloffset_GetConvolutionParameterfv },
+ { 27692, _gloffset_GetConvolutionFilter },
+ { 30125, _gloffset_CopyConvolutionFilter2D },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_coordinate_frame)
+static const struct gl_function_remap GL_EXT_coordinate_frame_functions[] = {
+ { 10523, -1 }, /* TangentPointerEXT */
+ { 12573, -1 }, /* Binormal3ivEXT */
+ { 13269, -1 }, /* Tangent3sEXT */
+ { 14623, -1 }, /* Tangent3fvEXT */
+ { 18856, -1 }, /* Tangent3dvEXT */
+ { 19594, -1 }, /* Binormal3bvEXT */
+ { 20715, -1 }, /* Binormal3dEXT */
+ { 22877, -1 }, /* Tangent3fEXT */
+ { 25080, -1 }, /* Binormal3sEXT */
+ { 25548, -1 }, /* Tangent3ivEXT */
+ { 25567, -1 }, /* Tangent3dEXT */
+ { 26514, -1 }, /* Binormal3svEXT */
+ { 27115, -1 }, /* Binormal3fEXT */
+ { 28023, -1 }, /* Binormal3dvEXT */
+ { 29290, -1 }, /* Tangent3iEXT */
+ { 30410, -1 }, /* Tangent3bvEXT */
+ { 30970, -1 }, /* Tangent3bEXT */
+ { 31534, -1 }, /* Binormal3fvEXT */
+ { 32253, -1 }, /* BinormalPointerEXT */
+ { 32658, -1 }, /* Tangent3svEXT */
+ { 33095, -1 }, /* Binormal3bEXT */
+ { 33272, -1 }, /* Binormal3iEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_copy_texture)
+static const struct gl_function_remap GL_EXT_copy_texture_functions[] = {
+ { 15148, _gloffset_CopyTexSubImage3D },
+ { 16775, _gloffset_CopyTexImage2D },
+ { 24616, _gloffset_CopyTexImage1D },
+ { 27373, _gloffset_CopyTexSubImage2D },
+ { 29763, _gloffset_CopyTexSubImage1D },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_cull_vertex)
+static const struct gl_function_remap GL_EXT_cull_vertex_functions[] = {
+ { 8857, -1 }, /* CullParameterdvEXT */
+ { 11712, -1 }, /* CullParameterfvEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_depth_bounds_test)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_depth_bounds_test_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_draw_buffers2)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_draw_buffers2_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_draw_instanced)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_draw_instanced_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_draw_range_elements)
+static const struct gl_function_remap GL_EXT_draw_range_elements_functions[] = {
+ { 9505, _gloffset_DrawRangeElements },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_fog_coord)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_fog_coord_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_framebuffer_blit)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_framebuffer_blit_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_framebuffer_multisample)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_framebuffer_multisample_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_framebuffer_object)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_framebuffer_object_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_gpu_program_parameters)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_gpu_program_parameters_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_gpu_shader4)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_gpu_shader4_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_histogram)
+static const struct gl_function_remap GL_EXT_histogram_functions[] = {
+ { 856, _gloffset_Histogram },
+ { 3522, _gloffset_ResetHistogram },
+ { 10002, _gloffset_GetMinmax },
+ { 15482, _gloffset_GetHistogramParameterfv },
+ { 24541, _gloffset_GetMinmaxParameteriv },
+ { 26725, _gloffset_ResetMinmax },
+ { 27589, _gloffset_GetHistogramParameteriv },
+ { 28758, _gloffset_GetHistogram },
+ { 31347, _gloffset_Minmax },
+ { 32893, _gloffset_GetMinmaxParameterfv },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_index_func)
+static const struct gl_function_remap GL_EXT_index_func_functions[] = {
+ { 11498, -1 }, /* IndexFuncEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_index_material)
+static const struct gl_function_remap GL_EXT_index_material_functions[] = {
+ { 21213, -1 }, /* IndexMaterialEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_light_texture)
+static const struct gl_function_remap GL_EXT_light_texture_functions[] = {
+ { 26534, -1 }, /* ApplyTextureEXT */
+ { 26679, -1 }, /* TextureMaterialEXT */
+ { 26704, -1 }, /* TextureLightEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_multi_draw_arrays)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_multi_draw_arrays_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_multisample)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_multisample_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_paletted_texture)
+static const struct gl_function_remap GL_EXT_paletted_texture_functions[] = {
+ { 8368, _gloffset_ColorTable },
+ { 15328, _gloffset_GetColorTable },
+ { 23060, _gloffset_GetColorTableParameterfv },
+ { 25187, _gloffset_GetColorTableParameteriv },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_pixel_transform)
+static const struct gl_function_remap GL_EXT_pixel_transform_functions[] = {
+ { 21860, -1 }, /* PixelTransformParameterfEXT */
+ { 21940, -1 }, /* PixelTransformParameteriEXT */
+ { 30685, -1 }, /* PixelTransformParameterfvEXT */
+ { 32217, -1 }, /* PixelTransformParameterivEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_point_parameters)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_point_parameters_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_polygon_offset)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_polygon_offset_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_provoking_vertex)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_provoking_vertex_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_secondary_color)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_secondary_color_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_separate_shader_objects)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_separate_shader_objects_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_stencil_two_side)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_stencil_two_side_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_subtexture)
+static const struct gl_function_remap GL_EXT_subtexture_functions[] = {
+ { 7089, _gloffset_TexSubImage1D },
+ { 10679, _gloffset_TexSubImage2D },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_texture3D)
+static const struct gl_function_remap GL_EXT_texture3D_functions[] = {
+ { 1774, _gloffset_TexImage3D },
+ { 22829, _gloffset_TexSubImage3D },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_texture_array)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_texture_array_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_texture_integer)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_texture_integer_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_texture_object)
+static const struct gl_function_remap GL_EXT_texture_object_functions[] = {
+ { 3290, _gloffset_PrioritizeTextures },
+ { 7538, _gloffset_AreTexturesResident },
+ { 13612, _gloffset_GenTextures },
+ { 15814, _gloffset_DeleteTextures },
+ { 19647, _gloffset_IsTexture },
+ { 29828, _gloffset_BindTexture },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_texture_perturb_normal)
+static const struct gl_function_remap GL_EXT_texture_perturb_normal_functions[] = {
+ { 13854, -1 }, /* TextureNormalEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_timer_query)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_timer_query_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_transform_feedback)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_transform_feedback_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_vertex_array)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_EXT_vertex_array_functions[] = {
+ { 24317, _gloffset_ArrayElement },
+ { 30935, _gloffset_GetPointerv },
+ { 32520, _gloffset_DrawArrays },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_EXT_vertex_weighting)
+static const struct gl_function_remap GL_EXT_vertex_weighting_functions[] = {
+ { 19677, -1 }, /* VertexWeightfvEXT */
+ { 27058, -1 }, /* VertexWeightfEXT */
+ { 28727, -1 }, /* VertexWeightPointerEXT */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_HP_image_transform)
+static const struct gl_function_remap GL_HP_image_transform_functions[] = {
+ { 2327, -1 }, /* GetImageTransformParameterfvHP */
+ { 3739, -1 }, /* ImageTransformParameterfHP */
+ { 10217, -1 }, /* ImageTransformParameterfvHP */
+ { 11967, -1 }, /* ImageTransformParameteriHP */
+ { 12308, -1 }, /* GetImageTransformParameterivHP */
+ { 19741, -1 }, /* ImageTransformParameterivHP */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_IBM_multimode_draw_arrays)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_IBM_multimode_draw_arrays_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_IBM_vertex_array_lists)
+static const struct gl_function_remap GL_IBM_vertex_array_lists_functions[] = {
+ { 4379, -1 }, /* SecondaryColorPointerListIBM */
+ { 6021, -1 }, /* NormalPointerListIBM */
+ { 7712, -1 }, /* FogCoordPointerListIBM */
+ { 8019, -1 }, /* VertexPointerListIBM */
+ { 11888, -1 }, /* ColorPointerListIBM */
+ { 13376, -1 }, /* TexCoordPointerListIBM */
+ { 13876, -1 }, /* IndexPointerListIBM */
+ { 32836, -1 }, /* EdgeFlagPointerListIBM */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_INGR_blend_func_separate)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_INGR_blend_func_separate_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_INTEL_parallel_arrays)
+static const struct gl_function_remap GL_INTEL_parallel_arrays_functions[] = {
+ { 12716, -1 }, /* VertexPointervINTEL */
+ { 15575, -1 }, /* ColorPointervINTEL */
+ { 30099, -1 }, /* NormalPointervINTEL */
+ { 30617, -1 }, /* TexCoordPointervINTEL */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_MESA_resize_buffers)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_MESA_resize_buffers_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_MESA_shader_debug)
+static const struct gl_function_remap GL_MESA_shader_debug_functions[] = {
+ { 1638, -1 }, /* GetDebugLogLengthMESA */
+ { 3461, -1 }, /* ClearDebugLogMESA */
+ { 4540, -1 }, /* GetDebugLogMESA */
+ { 31128, -1 }, /* CreateDebugObjectMESA */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_MESA_window_pos)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_MESA_window_pos_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_condtitional_render)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_condtitional_render_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_evaluators)
+static const struct gl_function_remap GL_NV_evaluators_functions[] = {
+ { 6751, -1 }, /* GetMapAttribParameterivNV */
+ { 8474, -1 }, /* MapControlPointsNV */
+ { 8573, -1 }, /* MapParameterfvNV */
+ { 10662, -1 }, /* EvalMapsNV */
+ { 17262, -1 }, /* GetMapAttribParameterfvNV */
+ { 17479, -1 }, /* MapParameterivNV */
+ { 24931, -1 }, /* GetMapParameterivNV */
+ { 25429, -1 }, /* GetMapParameterfvNV */
+ { 29414, -1 }, /* GetMapControlPointsNV */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_fence)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_fence_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_fragment_program)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_fragment_program_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_point_sprite)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_point_sprite_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_primitive_restart)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_primitive_restart_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_register_combiners)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_register_combiners_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_register_combiners2)
+static const struct gl_function_remap GL_NV_register_combiners2_functions[] = {
+ { 15967, -1 }, /* CombinerStageParameterfvNV */
+ { 16363, -1 }, /* GetCombinerStageParameterfvNV */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_texture_barrier)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_texture_barrier_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_vertex_array_range)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_vertex_array_range_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_NV_vertex_program)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_NV_vertex_program_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_OES_EGL_image)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_OES_EGL_image_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_PGI_misc_hints)
+static const struct gl_function_remap GL_PGI_misc_hints_functions[] = {
+ { 8694, -1 }, /* HintPGI */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_detail_texture)
+static const struct gl_function_remap GL_SGIS_detail_texture_functions[] = {
+ { 16336, -1 }, /* GetDetailTexFuncSGIS */
+ { 16720, -1 }, /* DetailTexFuncSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_fog_function)
+static const struct gl_function_remap GL_SGIS_fog_function_functions[] = {
+ { 27355, -1 }, /* FogFuncSGIS */
+ { 28076, -1 }, /* GetFogFuncSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_multisample)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_SGIS_multisample_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_pixel_texture)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_SGIS_pixel_texture_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_point_parameters)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_SGIS_point_parameters_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_sharpen_texture)
+static const struct gl_function_remap GL_SGIS_sharpen_texture_functions[] = {
+ { 6812, -1 }, /* GetSharpenTexFuncSGIS */
+ { 22225, -1 }, /* SharpenTexFuncSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_texture4D)
+static const struct gl_function_remap GL_SGIS_texture4D_functions[] = {
+ { 1010, -1 }, /* TexImage4DSGIS */
+ { 15883, -1 }, /* TexSubImage4DSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_texture_color_mask)
+static const struct gl_function_remap GL_SGIS_texture_color_mask_functions[] = {
+ { 15281, -1 }, /* TextureColorMaskSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIS_texture_filter4)
+static const struct gl_function_remap GL_SGIS_texture_filter4_functions[] = {
+ { 6989, -1 }, /* GetTexFilterFuncSGIS */
+ { 16482, -1 }, /* TexFilterFuncSGIS */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_async)
+static const struct gl_function_remap GL_SGIX_async_functions[] = {
+ { 3387, -1 }, /* AsyncMarkerSGIX */
+ { 4519, -1 }, /* FinishAsyncSGIX */
+ { 5466, -1 }, /* PollAsyncSGIX */
+ { 22406, -1 }, /* DeleteAsyncMarkersSGIX */
+ { 22461, -1 }, /* IsAsyncMarkerSGIX */
+ { 32633, -1 }, /* GenAsyncMarkersSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_flush_raster)
+static const struct gl_function_remap GL_SGIX_flush_raster_functions[] = {
+ { 7366, -1 }, /* FlushRasterSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_fragment_lighting)
+static const struct gl_function_remap GL_SGIX_fragment_lighting_functions[] = {
+ { 2625, -1 }, /* FragmentMaterialfvSGIX */
+ { 5370, -1 }, /* FragmentLightiSGIX */
+ { 8086, -1 }, /* FragmentMaterialfSGIX */
+ { 8247, -1 }, /* GetFragmentLightivSGIX */
+ { 9120, -1 }, /* FragmentLightModeliSGIX */
+ { 10725, -1 }, /* FragmentLightivSGIX */
+ { 11032, -1 }, /* GetFragmentMaterialivSGIX */
+ { 16276, -1 }, /* GetFragmentMaterialfvSGIX */
+ { 19564, -1 }, /* FragmentLightModelfSGIX */
+ { 19864, -1 }, /* FragmentColorMaterialSGIX */
+ { 20281, -1 }, /* FragmentMaterialiSGIX */
+ { 21541, -1 }, /* LightEnviSGIX */
+ { 23152, -1 }, /* FragmentLightModelfvSGIX */
+ { 23487, -1 }, /* FragmentLightfvSGIX */
+ { 28460, -1 }, /* FragmentLightModelivSGIX */
+ { 28609, -1 }, /* FragmentLightfSGIX */
+ { 31504, -1 }, /* GetFragmentLightfvSGIX */
+ { 33116, -1 }, /* FragmentMaterialivSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_framezoom)
+static const struct gl_function_remap GL_SGIX_framezoom_functions[] = {
+ { 22484, -1 }, /* FrameZoomSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_igloo_interface)
+static const struct gl_function_remap GL_SGIX_igloo_interface_functions[] = {
+ { 28917, -1 }, /* IglooInterfaceSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_instruments)
+static const struct gl_function_remap GL_SGIX_instruments_functions[] = {
+ { 2805, -1 }, /* ReadInstrumentsSGIX */
+ { 6585, -1 }, /* PollInstrumentsSGIX */
+ { 10583, -1 }, /* GetInstrumentsSGIX */
+ { 12974, -1 }, /* StartInstrumentsSGIX */
+ { 16001, -1 }, /* StopInstrumentsSGIX */
+ { 17901, -1 }, /* InstrumentsBufferSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_list_priority)
+static const struct gl_function_remap GL_SGIX_list_priority_functions[] = {
+ { 1241, -1 }, /* ListParameterfSGIX */
+ { 3089, -1 }, /* GetListParameterfvSGIX */
+ { 17792, -1 }, /* ListParameteriSGIX */
+ { 18806, -1 }, /* ListParameterfvSGIX */
+ { 20947, -1 }, /* ListParameterivSGIX */
+ { 32677, -1 }, /* GetListParameterivSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_pixel_texture)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_SGIX_pixel_texture_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_polynomial_ffd)
+static const struct gl_function_remap GL_SGIX_polynomial_ffd_functions[] = {
+ { 3685, -1 }, /* LoadIdentityDeformationMapSGIX */
+ { 16101, -1 }, /* DeformSGIX */
+ { 24429, -1 }, /* DeformationMap3fSGIX */
+ { 31392, -1 }, /* DeformationMap3dSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_reference_plane)
+static const struct gl_function_remap GL_SGIX_reference_plane_functions[] = {
+ { 14832, -1 }, /* ReferencePlaneSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_sprite)
+static const struct gl_function_remap GL_SGIX_sprite_functions[] = {
+ { 9618, -1 }, /* SpriteParameterfvSGIX */
+ { 20736, -1 }, /* SpriteParameteriSGIX */
+ { 26759, -1 }, /* SpriteParameterfSGIX */
+ { 29557, -1 }, /* SpriteParameterivSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGIX_tag_sample_buffer)
+static const struct gl_function_remap GL_SGIX_tag_sample_buffer_functions[] = {
+ { 20795, -1 }, /* TagSampleBufferSGIX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SGI_color_table)
+static const struct gl_function_remap GL_SGI_color_table_functions[] = {
+ { 7656, _gloffset_ColorTableParameteriv },
+ { 8368, _gloffset_ColorTable },
+ { 15328, _gloffset_GetColorTable },
+ { 15438, _gloffset_CopyColorTable },
+ { 19508, _gloffset_ColorTableParameterfv },
+ { 23060, _gloffset_GetColorTableParameterfv },
+ { 25187, _gloffset_GetColorTableParameteriv },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SUNX_constant_data)
+static const struct gl_function_remap GL_SUNX_constant_data_functions[] = {
+ { 31482, -1 }, /* FinishTextureSUNX */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SUN_global_alpha)
+static const struct gl_function_remap GL_SUN_global_alpha_functions[] = {
+ { 3408, -1 }, /* GlobalAlphaFactorubSUN */
+ { 4818, -1 }, /* GlobalAlphaFactoriSUN */
+ { 6610, -1 }, /* GlobalAlphaFactordSUN */
+ { 9702, -1 }, /* GlobalAlphaFactoruiSUN */
+ { 10174, -1 }, /* GlobalAlphaFactorbSUN */
+ { 13289, -1 }, /* GlobalAlphaFactorfSUN */
+ { 13453, -1 }, /* GlobalAlphaFactorusSUN */
+ { 22747, -1 }, /* GlobalAlphaFactorsSUN */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SUN_mesh_array)
+static const struct gl_function_remap GL_SUN_mesh_array_functions[] = {
+ { 29348, -1 }, /* DrawMeshArraysSUN */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SUN_triangle_list)
+static const struct gl_function_remap GL_SUN_triangle_list_functions[] = {
+ { 4493, -1 }, /* ReplacementCodeubSUN */
+ { 6369, -1 }, /* ReplacementCodeubvSUN */
+ { 19229, -1 }, /* ReplacementCodeusvSUN */
+ { 19417, -1 }, /* ReplacementCodePointerSUN */
+ { 21605, -1 }, /* ReplacementCodeuiSUN */
+ { 22435, -1 }, /* ReplacementCodeusSUN */
+ { 30014, -1 }, /* ReplacementCodeuivSUN */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_SUN_vertex)
+static const struct gl_function_remap GL_SUN_vertex_functions[] = {
+ { 1115, -1 }, /* ReplacementCodeuiColor3fVertex3fvSUN */
+ { 1313, -1 }, /* TexCoord4fColor4fNormal3fVertex4fvSUN */
+ { 1539, -1 }, /* TexCoord2fColor4ubVertex3fvSUN */
+ { 1869, -1 }, /* ReplacementCodeuiVertex3fvSUN */
+ { 2003, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fvSUN */
+ { 2561, -1 }, /* ReplacementCodeuiNormal3fVertex3fSUN */
+ { 2874, -1 }, /* Color4ubVertex3fvSUN */
+ { 4652, -1 }, /* Color4ubVertex3fSUN */
+ { 4775, -1 }, /* TexCoord2fVertex3fSUN */
+ { 5119, -1 }, /* TexCoord2fColor4fNormal3fVertex3fSUN */
+ { 5570, -1 }, /* TexCoord2fNormal3fVertex3fvSUN */
+ { 6264, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN */
+ { 7044, -1 }, /* ReplacementCodeuiColor4ubVertex3fvSUN */
+ { 7403, -1 }, /* ReplacementCodeuiTexCoord2fVertex3fSUN */
+ { 8115, -1 }, /* TexCoord2fNormal3fVertex3fSUN */
+ { 8919, -1 }, /* Color3fVertex3fSUN */
+ { 10110, -1 }, /* Color3fVertex3fvSUN */
+ { 10548, -1 }, /* Color4fNormal3fVertex3fvSUN */
+ { 11377, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 12837, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fvSUN */
+ { 14448, -1 }, /* ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN */
+ { 14974, -1 }, /* TexCoord2fColor3fVertex3fSUN */
+ { 16026, -1 }, /* TexCoord4fColor4fNormal3fVertex4fSUN */
+ { 16441, -1 }, /* Color4ubVertex2fvSUN */
+ { 16745, -1 }, /* Normal3fVertex3fSUN */
+ { 17842, -1 }, /* ReplacementCodeuiColor4fNormal3fVertex3fSUN */
+ { 18203, -1 }, /* TexCoord2fColor4fNormal3fVertex3fvSUN */
+ { 19058, -1 }, /* TexCoord2fVertex3fvSUN */
+ { 19834, -1 }, /* Color4ubVertex2fSUN */
+ { 20072, -1 }, /* ReplacementCodeuiColor4ubVertex3fSUN */
+ { 22071, -1 }, /* TexCoord2fColor4ubVertex3fSUN */
+ { 22503, -1 }, /* Normal3fVertex3fvSUN */
+ { 22969, -1 }, /* Color4fNormal3fVertex3fSUN */
+ { 23978, -1 }, /* ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN */
+ { 26080, -1 }, /* ReplacementCodeuiColor3fVertex3fSUN */
+ { 27471, -1 }, /* TexCoord4fVertex4fSUN */
+ { 27917, -1 }, /* TexCoord2fColor3fVertex3fvSUN */
+ { 28304, -1 }, /* ReplacementCodeuiNormal3fVertex3fvSUN */
+ { 28431, -1 }, /* TexCoord4fVertex4fvSUN */
+ { 29165, -1 }, /* ReplacementCodeuiVertex3fSUN */
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_1_3)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_1_3_functions[] = {
+ { 425, _gloffset_MultiTexCoord3sARB },
+ { 657, _gloffset_ActiveTextureARB },
+ { 4247, _gloffset_MultiTexCoord1fvARB },
+ { 6155, _gloffset_MultiTexCoord3dARB },
+ { 6200, _gloffset_MultiTexCoord2iARB },
+ { 6324, _gloffset_MultiTexCoord2svARB },
+ { 8324, _gloffset_MultiTexCoord2fARB },
+ { 10384, _gloffset_MultiTexCoord3fvARB },
+ { 10986, _gloffset_MultiTexCoord4sARB },
+ { 11667, _gloffset_MultiTexCoord2dvARB },
+ { 12082, _gloffset_MultiTexCoord1svARB },
+ { 12454, _gloffset_MultiTexCoord3svARB },
+ { 12515, _gloffset_MultiTexCoord4iARB },
+ { 13316, _gloffset_MultiTexCoord3iARB },
+ { 14186, _gloffset_MultiTexCoord1dARB },
+ { 14403, _gloffset_MultiTexCoord3dvARB },
+ { 15682, _gloffset_MultiTexCoord3ivARB },
+ { 15727, _gloffset_MultiTexCoord2sARB },
+ { 17145, _gloffset_MultiTexCoord4ivARB },
+ { 19158, _gloffset_ClientActiveTextureARB },
+ { 21458, _gloffset_MultiTexCoord2dARB },
+ { 21895, _gloffset_MultiTexCoord4dvARB },
+ { 22251, _gloffset_MultiTexCoord4fvARB },
+ { 23201, _gloffset_MultiTexCoord3fARB },
+ { 25771, _gloffset_MultiTexCoord4dARB },
+ { 26037, _gloffset_MultiTexCoord1sARB },
+ { 26241, _gloffset_MultiTexCoord1dvARB },
+ { 27217, _gloffset_MultiTexCoord1ivARB },
+ { 27310, _gloffset_MultiTexCoord2ivARB },
+ { 27649, _gloffset_MultiTexCoord1iARB },
+ { 29033, _gloffset_MultiTexCoord4svARB },
+ { 29627, _gloffset_MultiTexCoord1fARB },
+ { 29890, _gloffset_MultiTexCoord4fARB },
+ { 32354, _gloffset_MultiTexCoord2fvARB },
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_1_4)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_1_4_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_1_5)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_1_5_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_2_0)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_2_0_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_2_1)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_2_1_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_3_0)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_3_0_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_3_1)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_3_1_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_3_2)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_3_2_functions[] = {
+ { -1, -1 }
+};
+#endif
+
+#if defined(need_GL_VERSION_3_3)
+/* functions defined in MESA_remap_table_functions are excluded */
+static const struct gl_function_remap GL_VERSION_3_3_functions[] = {
+ { -1, -1 }
+};
+#endif
+
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c index 3609577b7..066e8b427 100644 --- a/mesalib/src/mesa/main/shaderapi.c +++ b/mesalib/src/mesa/main/shaderapi.c @@ -1029,6 +1029,7 @@ static GLboolean validate_samplers(const struct gl_program *prog, char *errMsg)
{
static const char *targetName[] = {
+ "TEXTURE_BUFFER",
"TEXTURE_2D_ARRAY",
"TEXTURE_1D_ARRAY",
"TEXTURE_CUBE",
diff --git a/mesalib/src/mesa/main/shared.c b/mesalib/src/mesa/main/shared.c index 9a2b90c8e..22b3bbdd4 100644 --- a/mesalib/src/mesa/main/shared.c +++ b/mesalib/src/mesa/main/shared.c @@ -98,6 +98,7 @@ _mesa_alloc_shared_state(struct gl_context *ctx) for (i = 0; i < NUM_TEXTURE_TARGETS; i++) {
/* NOTE: the order of these enums matches the TEXTURE_x_INDEX values */
static const GLenum targets[NUM_TEXTURE_TARGETS] = {
+ GL_TEXTURE_BUFFER,
GL_TEXTURE_2D_ARRAY_EXT,
GL_TEXTURE_1D_ARRAY_EXT,
GL_TEXTURE_CUBE_MAP,
@@ -106,6 +107,7 @@ _mesa_alloc_shared_state(struct gl_context *ctx) GL_TEXTURE_2D,
GL_TEXTURE_1D
};
+ assert(Elements(targets) == NUM_TEXTURE_TARGETS);
shared->DefaultTex[i] = ctx->Driver.NewTextureObject(ctx, 0, targets[i]);
}
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index 86927d3b6..a2df4e36e 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -1,3553 +1,3831 @@ -/* - * mesa 3-D graphics library - * Version: 7.6 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - - -/** - * \file teximage.c - * Texture image-related functions. - */ - - -#include "glheader.h" -#include "bufferobj.h" -#include "context.h" -#include "enums.h" -#include "fbobject.h" -#include "framebuffer.h" -#include "hash.h" -#include "image.h" -#include "imports.h" -#include "macros.h" -#include "mfeatures.h" -#include "state.h" -#include "texcompress.h" -#include "texfetch.h" -#include "teximage.h" -#include "texstate.h" -#include "texpal.h" -#include "mtypes.h" - - -/** - * State changes which we care about for glCopyTex[Sub]Image() calls. - * In particular, we care about pixel transfer state and buffer state - * (such as glReadBuffer to make sure we read from the right renderbuffer). - */ -#define NEW_COPY_TEX_STATE (_NEW_BUFFERS | _NEW_PIXEL) - - - -/** - * We allocate texture memory on 512-byte boundaries so we can use MMX/SSE - * elsewhere. - */ -void * -_mesa_alloc_texmemory(GLsizei bytes) -{ - return _mesa_align_malloc(bytes, 512); -} - - -/** - * Free texture memory allocated with _mesa_alloc_texmemory() - */ -void -_mesa_free_texmemory(void *m) -{ - _mesa_align_free(m); -} - - -/* - * Compute floor(log_base_2(n)). - * If n < 0 return -1. - */ -static int -logbase2( int n ) -{ - GLint i = 1; - GLint log2 = 0; - - if (n < 0) - return -1; - - if (n == 0) - return 0; - - while ( n > i ) { - i *= 2; - log2++; - } - if (i != n) { - return log2 - 1; - } - else { - return log2; - } -} - - - -/** - * Return the simple base format for a given internal texture format. - * For example, given GL_LUMINANCE12_ALPHA4, return GL_LUMINANCE_ALPHA. - * - * \param ctx GL context. - * \param internalFormat the internal texture format token or 1, 2, 3, or 4. - * - * \return the corresponding \u base internal format (GL_ALPHA, GL_LUMINANCE, - * GL_LUMANCE_ALPHA, GL_INTENSITY, GL_RGB, or GL_RGBA), or -1 if invalid enum. - * - * This is the format which is used during texture application (i.e. the - * texture format and env mode determine the arithmetic used. - * - * XXX this could be static - */ -GLint -_mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) -{ - switch (internalFormat) { - case GL_ALPHA: - case GL_ALPHA4: - case GL_ALPHA8: - case GL_ALPHA12: - case GL_ALPHA16: - return GL_ALPHA; - case 1: - case GL_LUMINANCE: - case GL_LUMINANCE4: - case GL_LUMINANCE8: - case GL_LUMINANCE12: - case GL_LUMINANCE16: - return GL_LUMINANCE; - case 2: - case GL_LUMINANCE_ALPHA: - case GL_LUMINANCE4_ALPHA4: - case GL_LUMINANCE6_ALPHA2: - case GL_LUMINANCE8_ALPHA8: - case GL_LUMINANCE12_ALPHA4: - case GL_LUMINANCE12_ALPHA12: - case GL_LUMINANCE16_ALPHA16: - return GL_LUMINANCE_ALPHA; - case GL_INTENSITY: - case GL_INTENSITY4: - case GL_INTENSITY8: - case GL_INTENSITY12: - case GL_INTENSITY16: - return GL_INTENSITY; - case 3: - case GL_RGB: - case GL_R3_G3_B2: - case GL_RGB4: - case GL_RGB5: - case GL_RGB8: - case GL_RGB10: - case GL_RGB12: - case GL_RGB16: - return GL_RGB; - case 4: - case GL_RGBA: - case GL_RGBA2: - case GL_RGBA4: - case GL_RGB5_A1: - case GL_RGBA8: - case GL_RGB10_A2: - case GL_RGBA12: - case GL_RGBA16: - return GL_RGBA; - default: - ; /* fallthrough */ - } - - if (ctx->Extensions.EXT_texture_format_BGRA8888) { - switch (internalFormat) { - case GL_BGRA_EXT: - return GL_RGBA; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.EXT_paletted_texture) { - switch (internalFormat) { - case GL_COLOR_INDEX: - case GL_COLOR_INDEX1_EXT: - case GL_COLOR_INDEX2_EXT: - case GL_COLOR_INDEX4_EXT: - case GL_COLOR_INDEX8_EXT: - case GL_COLOR_INDEX12_EXT: - case GL_COLOR_INDEX16_EXT: - return GL_COLOR_INDEX; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.ARB_depth_texture) { - switch (internalFormat) { - case GL_DEPTH_COMPONENT: - case GL_DEPTH_COMPONENT16: - case GL_DEPTH_COMPONENT24: - case GL_DEPTH_COMPONENT32: - return GL_DEPTH_COMPONENT; - default: - ; /* fallthrough */ - } - } - - switch (internalFormat) { - case GL_COMPRESSED_ALPHA: - return GL_ALPHA; - case GL_COMPRESSED_LUMINANCE: - return GL_LUMINANCE; - case GL_COMPRESSED_LUMINANCE_ALPHA: - return GL_LUMINANCE_ALPHA; - case GL_COMPRESSED_INTENSITY: - return GL_INTENSITY; - case GL_COMPRESSED_RGB: - return GL_RGB; - case GL_COMPRESSED_RGBA: - return GL_RGBA; - default: - ; /* fallthrough */ - } - - if (ctx->Extensions.TDFX_texture_compression_FXT1) { - switch (internalFormat) { - case GL_COMPRESSED_RGB_FXT1_3DFX: - return GL_RGB; - case GL_COMPRESSED_RGBA_FXT1_3DFX: - return GL_RGBA; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.EXT_texture_compression_s3tc) { - switch (internalFormat) { - case GL_COMPRESSED_RGB_S3TC_DXT1_EXT: - return GL_RGB; - case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: - case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: - return GL_RGBA; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.S3_s3tc) { - switch (internalFormat) { - case GL_RGB_S3TC: - case GL_RGB4_S3TC: - return GL_RGB; - case GL_RGBA_S3TC: - case GL_RGBA4_S3TC: - return GL_RGBA; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.MESA_ycbcr_texture) { - if (internalFormat == GL_YCBCR_MESA) - return GL_YCBCR_MESA; - } - - if (ctx->Extensions.ARB_texture_float) { - switch (internalFormat) { - case GL_ALPHA16F_ARB: - case GL_ALPHA32F_ARB: - return GL_ALPHA; - case GL_RGBA16F_ARB: - case GL_RGBA32F_ARB: - return GL_RGBA; - case GL_RGB16F_ARB: - case GL_RGB32F_ARB: - return GL_RGB; - case GL_INTENSITY16F_ARB: - case GL_INTENSITY32F_ARB: - return GL_INTENSITY; - case GL_LUMINANCE16F_ARB: - case GL_LUMINANCE32F_ARB: - return GL_LUMINANCE; - case GL_LUMINANCE_ALPHA16F_ARB: - case GL_LUMINANCE_ALPHA32F_ARB: - return GL_LUMINANCE_ALPHA; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.ATI_envmap_bumpmap) { - switch (internalFormat) { - case GL_DUDV_ATI: - case GL_DU8DV8_ATI: - return GL_DUDV_ATI; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.EXT_texture_snorm) { - switch (internalFormat) { - case GL_RED_SNORM: - case GL_R8_SNORM: - case GL_R16_SNORM: - return GL_RED; - case GL_RG_SNORM: - case GL_RG8_SNORM: - case GL_RG16_SNORM: - return GL_RG; - case GL_RGB_SNORM: - case GL_RGB8_SNORM: - case GL_RGB16_SNORM: - return GL_RGB; - case GL_RGBA_SNORM: - case GL_RGBA8_SNORM: - case GL_RGBA16_SNORM: - return GL_RGBA; - case GL_ALPHA_SNORM: - case GL_ALPHA8_SNORM: - case GL_ALPHA16_SNORM: - return GL_ALPHA; - case GL_LUMINANCE_SNORM: - case GL_LUMINANCE8_SNORM: - case GL_LUMINANCE16_SNORM: - return GL_LUMINANCE; - case GL_LUMINANCE_ALPHA_SNORM: - case GL_LUMINANCE8_ALPHA8_SNORM: - case GL_LUMINANCE16_ALPHA16_SNORM: - return GL_LUMINANCE_ALPHA; - case GL_INTENSITY_SNORM: - case GL_INTENSITY8_SNORM: - case GL_INTENSITY16_SNORM: - return GL_INTENSITY; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.EXT_packed_depth_stencil) { - switch (internalFormat) { - case GL_DEPTH_STENCIL_EXT: - case GL_DEPTH24_STENCIL8_EXT: - return GL_DEPTH_STENCIL_EXT; - default: - ; /* fallthrough */ - } - } - -#if FEATURE_EXT_texture_sRGB - if (ctx->Extensions.EXT_texture_sRGB) { - switch (internalFormat) { - case GL_SRGB_EXT: - case GL_SRGB8_EXT: - case GL_COMPRESSED_SRGB_EXT: - case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT: - return GL_RGB; - case GL_SRGB_ALPHA_EXT: - case GL_SRGB8_ALPHA8_EXT: - case GL_COMPRESSED_SRGB_ALPHA_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 GL_RGBA; - case GL_SLUMINANCE_ALPHA_EXT: - case GL_SLUMINANCE8_ALPHA8_EXT: - case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT: - return GL_LUMINANCE_ALPHA; - case GL_SLUMINANCE_EXT: - case GL_SLUMINANCE8_EXT: - case GL_COMPRESSED_SLUMINANCE_EXT: - return GL_LUMINANCE; - default: - ; /* fallthrough */ - } - } -#endif /* FEATURE_EXT_texture_sRGB */ - - if (ctx->Extensions.EXT_texture_integer) { - switch (internalFormat) { - case GL_RGBA8UI_EXT: - case GL_RGBA16UI_EXT: - case GL_RGBA32UI_EXT: - case GL_RGBA8I_EXT: - case GL_RGBA16I_EXT: - case GL_RGBA32I_EXT: - return GL_RGBA; - case GL_RGB8UI_EXT: - case GL_RGB16UI_EXT: - case GL_RGB32UI_EXT: - case GL_RGB8I_EXT: - case GL_RGB16I_EXT: - case GL_RGB32I_EXT: - return GL_RGB; - case GL_ALPHA8UI_EXT: - case GL_ALPHA16UI_EXT: - case GL_ALPHA32UI_EXT: - case GL_ALPHA8I_EXT: - case GL_ALPHA16I_EXT: - case GL_ALPHA32I_EXT: - return GL_ALPHA; - case GL_INTENSITY8UI_EXT: - case GL_INTENSITY16UI_EXT: - case GL_INTENSITY32UI_EXT: - case GL_INTENSITY8I_EXT: - case GL_INTENSITY16I_EXT: - case GL_INTENSITY32I_EXT: - return GL_INTENSITY; - case GL_LUMINANCE8UI_EXT: - case GL_LUMINANCE16UI_EXT: - case GL_LUMINANCE32UI_EXT: - case GL_LUMINANCE8I_EXT: - case GL_LUMINANCE16I_EXT: - case GL_LUMINANCE32I_EXT: - return GL_LUMINANCE; - case GL_LUMINANCE_ALPHA8UI_EXT: - case GL_LUMINANCE_ALPHA16UI_EXT: - case GL_LUMINANCE_ALPHA32UI_EXT: - case GL_LUMINANCE_ALPHA8I_EXT: - case GL_LUMINANCE_ALPHA16I_EXT: - case GL_LUMINANCE_ALPHA32I_EXT: - return GL_LUMINANCE_ALPHA; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.ARB_texture_rg) { - switch (internalFormat) { - case GL_R16F: - /* R16F depends on both ARB_half_float_pixel and ARB_texture_float. - */ - if (!ctx->Extensions.ARB_half_float_pixel) - break; - /* FALLTHROUGH */ - case GL_R32F: - if (!ctx->Extensions.ARB_texture_float) - break; - return GL_RED; - case GL_R8I: - case GL_R8UI: - case GL_R16I: - case GL_R16UI: - case GL_R32I: - case GL_R32UI: - if (!ctx->Extensions.EXT_texture_integer) - break; - /* FALLTHROUGH */ - case GL_R8: - case GL_R16: - case GL_RED: - case GL_COMPRESSED_RED: - return GL_RED; - - case GL_RG16F: - /* RG16F depends on both ARB_half_float_pixel and ARB_texture_float. - */ - if (!ctx->Extensions.ARB_half_float_pixel) - break; - /* FALLTHROUGH */ - case GL_RG32F: - if (!ctx->Extensions.ARB_texture_float) - break; - return GL_RG; - case GL_RG8I: - case GL_RG8UI: - case GL_RG16I: - case GL_RG16UI: - case GL_RG32I: - case GL_RG32UI: - if (!ctx->Extensions.EXT_texture_integer) - break; - /* FALLTHROUGH */ - case GL_RG: - case GL_RG8: - case GL_RG16: - case GL_COMPRESSED_RG: - return GL_RG; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.EXT_texture_shared_exponent) { - switch (internalFormat) { - case GL_RGB9_E5_EXT: - return GL_RGB; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.EXT_packed_float) { - switch (internalFormat) { - case GL_R11F_G11F_B10F_EXT: - return GL_RGB; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.ARB_depth_buffer_float) { - switch (internalFormat) { - case GL_DEPTH_COMPONENT32F: - return GL_DEPTH_COMPONENT; - case GL_DEPTH32F_STENCIL8: - return GL_DEPTH_STENCIL; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.ARB_texture_compression_rgtc) { - switch (internalFormat) { - case GL_COMPRESSED_RED_RGTC1: - case GL_COMPRESSED_SIGNED_RED_RGTC1: - return GL_RED; - case GL_COMPRESSED_RG_RGTC2: - case GL_COMPRESSED_SIGNED_RG_RGTC2: - return GL_RG; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.EXT_texture_compression_latc) { - switch (internalFormat) { - case GL_COMPRESSED_LUMINANCE_LATC1_EXT: - case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT: - return GL_LUMINANCE; - case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT: - case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT: - return GL_LUMINANCE_ALPHA; - default: - ; /* fallthrough */ - } - } - - if (ctx->Extensions.ATI_texture_compression_3dc) { - switch (internalFormat) { - case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI: - return GL_LUMINANCE_ALPHA; - default: - ; /* fallthrough */ - } - } - - return -1; /* error */ -} - - -/** - * For cube map faces, return a face index in [0,5]. - * For other targets return 0; - */ -GLuint -_mesa_tex_target_to_face(GLenum target) -{ - if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) - return (GLuint) target - (GLuint) GL_TEXTURE_CUBE_MAP_POSITIVE_X; - else - return 0; -} - - - -/** - * Store a gl_texture_image pointer in a gl_texture_object structure - * according to the target and level parameters. - * - * \param tObj texture object. - * \param target texture target. - * \param level image level. - * \param texImage texture image. - * - * This was basically prompted by the introduction of cube maps. - */ -void -_mesa_set_tex_image(struct gl_texture_object *tObj, - GLenum target, GLint level, - struct gl_texture_image *texImage) -{ - const GLuint face = _mesa_tex_target_to_face(target); - - ASSERT(tObj); - ASSERT(texImage); - ASSERT(target != GL_TEXTURE_RECTANGLE_NV || level == 0); - - tObj->Image[face][level] = texImage; - - /* Set the 'back' pointer */ - texImage->TexObject = tObj; -} - - -/** - * Allocate a texture image structure. - * - * Called via ctx->Driver.NewTextureImage() unless overriden by a device - * driver. - * - * \return a pointer to gl_texture_image struct with all fields initialized to - * zero. - */ -struct gl_texture_image * -_mesa_new_texture_image( struct gl_context *ctx ) -{ - (void) ctx; - return CALLOC_STRUCT(gl_texture_image); -} - - -/** - * Free texture image data. - * This function is a fallback called via ctx->Driver.FreeTexImageData(). - * - * \param texImage texture image. - * - * Free the texture image data if it's not marked as client data. - */ -void -_mesa_free_texture_image_data(struct gl_context *ctx, - struct gl_texture_image *texImage) -{ - (void) ctx; - - if (texImage->Data && !texImage->IsClientData) { - /* free the old texture data */ - _mesa_free_texmemory(texImage->Data); - } - - texImage->Data = NULL; -} - - -/** - * Free texture image. - * - * \param texImage texture image. - * - * Free the texture image structure and the associated image data. - */ -void -_mesa_delete_texture_image(struct gl_context *ctx, - struct gl_texture_image *texImage) -{ - /* Free texImage->Data and/or any other driver-specific texture - * image storage. - */ - ASSERT(ctx->Driver.FreeTexImageData); - ctx->Driver.FreeTexImageData( ctx, texImage ); - - ASSERT(texImage->Data == NULL); - if (texImage->ImageOffsets) - free(texImage->ImageOffsets); - free(texImage); -} - - -/** - * Test if a target is a proxy target. - * - * \param target texture target. - * - * \return GL_TRUE if the target is a proxy target, GL_FALSE otherwise. - */ -GLboolean -_mesa_is_proxy_texture(GLenum target) -{ - /* NUM_TEXTURE_TARGETS should match number of terms below */ - assert(NUM_TEXTURE_TARGETS == 7); - - return (target == GL_PROXY_TEXTURE_1D || - target == GL_PROXY_TEXTURE_2D || - target == GL_PROXY_TEXTURE_3D || - target == GL_PROXY_TEXTURE_CUBE_MAP_ARB || - target == GL_PROXY_TEXTURE_RECTANGLE_NV || - target == GL_PROXY_TEXTURE_1D_ARRAY_EXT || - target == GL_PROXY_TEXTURE_2D_ARRAY_EXT); -} - - -/** - * Return the proxy target which corresponds to the given texture target - */ -static GLenum -get_proxy_target(GLenum target) -{ - switch (target) { - case GL_TEXTURE_1D: - case GL_PROXY_TEXTURE_1D: - return GL_PROXY_TEXTURE_1D; - case GL_TEXTURE_2D: - case GL_PROXY_TEXTURE_2D: - return GL_PROXY_TEXTURE_2D; - case GL_TEXTURE_3D: - case GL_PROXY_TEXTURE_3D: - return GL_PROXY_TEXTURE_3D; - case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB: - case GL_TEXTURE_CUBE_MAP_ARB: - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: - return GL_PROXY_TEXTURE_CUBE_MAP_ARB; - case GL_TEXTURE_RECTANGLE_NV: - case GL_PROXY_TEXTURE_RECTANGLE_NV: - return GL_PROXY_TEXTURE_RECTANGLE_NV; - case GL_TEXTURE_1D_ARRAY_EXT: - case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - return GL_PROXY_TEXTURE_1D_ARRAY_EXT; - case GL_TEXTURE_2D_ARRAY_EXT: - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - return GL_PROXY_TEXTURE_2D_ARRAY_EXT; - default: - _mesa_problem(NULL, "unexpected target in get_proxy_target()"); - return 0; - } -} - - -/** - * Get the texture object that corresponds to the target of the given - * texture unit. - * - * \param ctx GL context. - * \param texUnit texture unit. - * \param target texture target. - * - * \return pointer to the texture object on success, or NULL on failure. - * - * \sa gl_texture_unit. - */ -struct gl_texture_object * -_mesa_select_tex_object(struct gl_context *ctx, - const struct gl_texture_unit *texUnit, - GLenum target) -{ - const GLboolean arrayTex = (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); - - switch (target) { - case GL_TEXTURE_1D: - return texUnit->CurrentTex[TEXTURE_1D_INDEX]; - case GL_PROXY_TEXTURE_1D: - return ctx->Texture.ProxyTex[TEXTURE_1D_INDEX]; - case GL_TEXTURE_2D: - return texUnit->CurrentTex[TEXTURE_2D_INDEX]; - case GL_PROXY_TEXTURE_2D: - return ctx->Texture.ProxyTex[TEXTURE_2D_INDEX]; - case GL_TEXTURE_3D: - return texUnit->CurrentTex[TEXTURE_3D_INDEX]; - case GL_PROXY_TEXTURE_3D: - return ctx->Texture.ProxyTex[TEXTURE_3D_INDEX]; - case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB: - case GL_TEXTURE_CUBE_MAP_ARB: - return ctx->Extensions.ARB_texture_cube_map - ? texUnit->CurrentTex[TEXTURE_CUBE_INDEX] : NULL; - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: - return ctx->Extensions.ARB_texture_cube_map - ? ctx->Texture.ProxyTex[TEXTURE_CUBE_INDEX] : NULL; - case GL_TEXTURE_RECTANGLE_NV: - return ctx->Extensions.NV_texture_rectangle - ? texUnit->CurrentTex[TEXTURE_RECT_INDEX] : NULL; - case GL_PROXY_TEXTURE_RECTANGLE_NV: - return ctx->Extensions.NV_texture_rectangle - ? ctx->Texture.ProxyTex[TEXTURE_RECT_INDEX] : NULL; - case GL_TEXTURE_1D_ARRAY_EXT: - return arrayTex ? texUnit->CurrentTex[TEXTURE_1D_ARRAY_INDEX] : NULL; - case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - return arrayTex ? ctx->Texture.ProxyTex[TEXTURE_1D_ARRAY_INDEX] : NULL; - case GL_TEXTURE_2D_ARRAY_EXT: - return arrayTex ? texUnit->CurrentTex[TEXTURE_2D_ARRAY_INDEX] : NULL; - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - return arrayTex ? ctx->Texture.ProxyTex[TEXTURE_2D_ARRAY_INDEX] : NULL; - default: - _mesa_problem(NULL, "bad target in _mesa_select_tex_object()"); - return NULL; - } -} - - -/** - * Return pointer to texture object for given target on current texture unit. - */ -struct gl_texture_object * -_mesa_get_current_tex_object(struct gl_context *ctx, GLenum target) -{ - struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx); - return _mesa_select_tex_object(ctx, texUnit, target); -} - - -/** - * Get a texture image pointer from a texture object, given a texture - * target and mipmap level. The target and level parameters should - * have already been error-checked. - * - * \param ctx GL context. - * \param texObj texture unit. - * \param target texture target. - * \param level image level. - * - * \return pointer to the texture image structure, or NULL on failure. - */ -struct gl_texture_image * -_mesa_select_tex_image(struct gl_context *ctx, - const struct gl_texture_object *texObj, - GLenum target, GLint level) -{ - const GLuint face = _mesa_tex_target_to_face(target); - - ASSERT(texObj); - ASSERT(level >= 0); - ASSERT(level < MAX_TEXTURE_LEVELS); - - return texObj->Image[face][level]; -} - - -/** - * Like _mesa_select_tex_image() but if the image doesn't exist, allocate - * it and install it. Only return NULL if passed a bad parameter or run - * out of memory. - */ -struct gl_texture_image * -_mesa_get_tex_image(struct gl_context *ctx, struct gl_texture_object *texObj, - GLenum target, GLint level) -{ - struct gl_texture_image *texImage; - - if (!texObj) - return NULL; - - texImage = _mesa_select_tex_image(ctx, texObj, target, level); - if (!texImage) { - texImage = ctx->Driver.NewTextureImage(ctx); - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "texture image allocation"); - return NULL; - } - - _mesa_set_tex_image(texObj, target, level, texImage); - } - - return texImage; -} - - -/** - * Return pointer to the specified proxy texture image. - * Note that proxy textures are per-context, not per-texture unit. - * \return pointer to texture image or NULL if invalid target, invalid - * level, or out of memory. - */ -struct gl_texture_image * -_mesa_get_proxy_tex_image(struct gl_context *ctx, GLenum target, GLint level) -{ - struct gl_texture_image *texImage; - GLuint texIndex; - - if (level < 0 ) - return NULL; - - switch (target) { - case GL_PROXY_TEXTURE_1D: - if (level >= ctx->Const.MaxTextureLevels) - return NULL; - texIndex = TEXTURE_1D_INDEX; - break; - case GL_PROXY_TEXTURE_2D: - if (level >= ctx->Const.MaxTextureLevels) - return NULL; - texIndex = TEXTURE_2D_INDEX; - break; - case GL_PROXY_TEXTURE_3D: - if (level >= ctx->Const.Max3DTextureLevels) - return NULL; - texIndex = TEXTURE_3D_INDEX; - break; - case GL_PROXY_TEXTURE_CUBE_MAP: - if (level >= ctx->Const.MaxCubeTextureLevels) - return NULL; - texIndex = TEXTURE_CUBE_INDEX; - break; - case GL_PROXY_TEXTURE_RECTANGLE_NV: - if (level > 0) - return NULL; - texIndex = TEXTURE_RECT_INDEX; - break; - case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - if (level >= ctx->Const.MaxTextureLevels) - return NULL; - texIndex = TEXTURE_1D_ARRAY_INDEX; - break; - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - if (level >= ctx->Const.MaxTextureLevels) - return NULL; - texIndex = TEXTURE_2D_ARRAY_INDEX; - break; - default: - return NULL; - } - - texImage = ctx->Texture.ProxyTex[texIndex]->Image[0][level]; - if (!texImage) { - texImage = ctx->Driver.NewTextureImage(ctx); - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "proxy texture allocation"); - return NULL; - } - ctx->Texture.ProxyTex[texIndex]->Image[0][level] = texImage; - /* Set the 'back' pointer */ - texImage->TexObject = ctx->Texture.ProxyTex[texIndex]; - } - return texImage; -} - - -/** - * Get the maximum number of allowed mipmap levels. - * - * \param ctx GL context. - * \param target texture target. - * - * \return the maximum number of allowed mipmap levels for the given - * texture target, or zero if passed a bad target. - * - * \sa gl_constants. - */ -GLint -_mesa_max_texture_levels(struct gl_context *ctx, GLenum target) -{ - switch (target) { - case GL_TEXTURE_1D: - case GL_PROXY_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_PROXY_TEXTURE_2D: - return ctx->Const.MaxTextureLevels; - case GL_TEXTURE_3D: - case GL_PROXY_TEXTURE_3D: - return ctx->Const.Max3DTextureLevels; - case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB: - case GL_TEXTURE_CUBE_MAP_ARB: - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: - return ctx->Extensions.ARB_texture_cube_map - ? ctx->Const.MaxCubeTextureLevels : 0; - case GL_TEXTURE_RECTANGLE_NV: - case GL_PROXY_TEXTURE_RECTANGLE_NV: - return ctx->Extensions.NV_texture_rectangle ? 1 : 0; - case GL_TEXTURE_1D_ARRAY_EXT: - case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - case GL_TEXTURE_2D_ARRAY_EXT: - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array) - ? ctx->Const.MaxTextureLevels : 0; - default: - return 0; /* bad target */ - } -} - - -/** - * Return number of dimensions per mipmap level for the given texture target. - */ -GLint -_mesa_get_texture_dimensions(GLenum target) -{ - switch (target) { - case GL_TEXTURE_1D: - case GL_PROXY_TEXTURE_1D: - return 1; - case GL_TEXTURE_2D: - case GL_TEXTURE_RECTANGLE: - case GL_TEXTURE_CUBE_MAP: - case GL_PROXY_TEXTURE_2D: - case GL_PROXY_TEXTURE_RECTANGLE: - case GL_PROXY_TEXTURE_CUBE_MAP: - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - case GL_TEXTURE_1D_ARRAY: - case GL_PROXY_TEXTURE_1D_ARRAY: - return 2; - case GL_TEXTURE_3D: - case GL_PROXY_TEXTURE_3D: - case GL_TEXTURE_2D_ARRAY: - case GL_PROXY_TEXTURE_2D_ARRAY: - return 3; - default: - _mesa_problem(NULL, "invalid target 0x%x in get_texture_dimensions()", - target); - return 2; - } -} - - - - -#if 000 /* not used anymore */ -/* - * glTexImage[123]D can accept a NULL image pointer. In this case we - * create a texture image with unspecified image contents per the OpenGL - * spec. - */ -static GLubyte * -make_null_texture(GLint width, GLint height, GLint depth, GLenum format) -{ - const GLint components = _mesa_components_in_format(format); - const GLint numPixels = width * height * depth; - GLubyte *data = (GLubyte *) MALLOC(numPixels * components * sizeof(GLubyte)); - -#ifdef DEBUG - /* - * Let's see if anyone finds this. If glTexImage2D() is called with - * a NULL image pointer then load the texture image with something - * interesting instead of leaving it indeterminate. - */ - if (data) { - static const char message[8][32] = { - " X X XXXXX XXX X ", - " XX XX X X X X X ", - " X X X X X X X ", - " X X XXXX XXX XXXXX ", - " X X X X X X ", - " X X X X X X X ", - " X X XXXXX XXX X X ", - " " - }; - - GLubyte *imgPtr = data; - GLint h, i, j, k; - for (h = 0; h < depth; h++) { - for (i = 0; i < height; i++) { - GLint srcRow = 7 - (i % 8); - for (j = 0; j < width; j++) { - GLint srcCol = j % 32; - GLubyte texel = (message[srcRow][srcCol]=='X') ? 255 : 70; - for (k = 0; k < components; k++) { - *imgPtr++ = texel; - } - } - } - } - } -#endif - - return data; -} -#endif - - - -/** - * Reset the fields of a gl_texture_image struct to zero. - * - * \param img texture image structure. - * - * This is called when a proxy texture test fails, we set all the - * image members (except DriverData) to zero. - * It's also used in glTexImage[123]D as a safeguard to be sure all - * required fields get initialized properly by the Driver.TexImage[123]D - * functions. - */ -static void -clear_teximage_fields(struct gl_texture_image *img) -{ - ASSERT(img); - img->_BaseFormat = 0; - img->InternalFormat = 0; - img->Border = 0; - img->Width = 0; - img->Height = 0; - img->Depth = 0; - img->RowStride = 0; - if (img->ImageOffsets) { - free(img->ImageOffsets); - img->ImageOffsets = NULL; - } - img->Width2 = 0; - img->Height2 = 0; - img->Depth2 = 0; - img->WidthLog2 = 0; - img->HeightLog2 = 0; - img->DepthLog2 = 0; - img->Data = NULL; - img->TexFormat = MESA_FORMAT_NONE; - img->FetchTexelc = NULL; - img->FetchTexelf = NULL; -} - - -/** - * Initialize basic fields of the gl_texture_image struct. - * - * \param ctx GL context. - * \param target texture target (GL_TEXTURE_1D, GL_TEXTURE_RECTANGLE, etc). - * \param img texture image structure to be initialized. - * \param width image width. - * \param height image height. - * \param depth image depth. - * \param border image border. - * \param internalFormat internal format. - * \param format the actual hardware format (one of MESA_FORMAT_*) - * - * Fills in the fields of \p img with the given information. - * Note: width, height and depth include the border. - */ -void -_mesa_init_teximage_fields(struct gl_context *ctx, GLenum target, - struct gl_texture_image *img, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, GLenum internalFormat, - gl_format format) -{ - GLint i, dims; - - ASSERT(img); - ASSERT(width >= 0); - ASSERT(height >= 0); - ASSERT(depth >= 0); - - img->_BaseFormat = _mesa_base_tex_format( ctx, internalFormat ); - ASSERT(img->_BaseFormat > 0); - img->InternalFormat = internalFormat; - img->Border = border; - img->Width = width; - img->Height = height; - img->Depth = depth; - - img->Width2 = width - 2 * border; /* == 1 << img->WidthLog2; */ - img->WidthLog2 = logbase2(img->Width2); - - if (height == 1) { /* 1-D texture */ - img->Height2 = 1; - img->HeightLog2 = 0; - } - else { - img->Height2 = height - 2 * border; /* == 1 << img->HeightLog2; */ - img->HeightLog2 = logbase2(img->Height2); - } - - if (depth == 1) { /* 2-D texture */ - img->Depth2 = 1; - img->DepthLog2 = 0; - } - else { - img->Depth2 = depth - 2 * border; /* == 1 << img->DepthLog2; */ - img->DepthLog2 = logbase2(img->Depth2); - } - - img->MaxLog2 = MAX2(img->WidthLog2, img->HeightLog2); - - if ((width == 1 || _mesa_is_pow_two(img->Width2)) && - (height == 1 || _mesa_is_pow_two(img->Height2)) && - (depth == 1 || _mesa_is_pow_two(img->Depth2))) - img->_IsPowerOfTwo = GL_TRUE; - else - img->_IsPowerOfTwo = GL_FALSE; - - /* RowStride and ImageOffsets[] describe how to address texels in 'Data' */ - img->RowStride = width; - /* Allocate the ImageOffsets array and initialize to typical values. - * We allocate the array for 1D/2D textures too in order to avoid special- - * case code in the texstore routines. - */ - if (img->ImageOffsets) - free(img->ImageOffsets); - img->ImageOffsets = (GLuint *) malloc(depth * sizeof(GLuint)); - for (i = 0; i < depth; i++) { - img->ImageOffsets[i] = i * width * height; - } - - /* Compute Width/Height/DepthScale for mipmap lod computation */ - if (target == GL_TEXTURE_RECTANGLE_NV) { - /* scale = 1.0 since texture coords directly map to texels */ - img->WidthScale = 1.0; - img->HeightScale = 1.0; - img->DepthScale = 1.0; - } - else { - img->WidthScale = (GLfloat) img->Width; - img->HeightScale = (GLfloat) img->Height; - img->DepthScale = (GLfloat) img->Depth; - } - - img->TexFormat = format; - - dims = _mesa_get_texture_dimensions(target); - - _mesa_set_fetch_functions(img, dims); -} - - -/** - * Free and clear fields of the gl_texture_image struct. - * - * \param ctx GL context. - * \param texImage texture image structure to be cleared. - * - * After the call, \p texImage will have no data associated with it. Its - * fields are cleared so that its parent object will test incomplete. - */ -void -_mesa_clear_texture_image(struct gl_context *ctx, - struct gl_texture_image *texImage) -{ - ctx->Driver.FreeTexImageData(ctx, texImage); - clear_teximage_fields(texImage); -} - - -/** - * This is the fallback for Driver.TestProxyTexImage(). Test the texture - * level, width, height and depth against the ctx->Const limits for textures. - * - * A hardware driver might override this function if, for example, the - * max 3D texture size is 512x512x64 (i.e. not a cube). - * - * Note that width, height, depth == 0 is not an error. However, a - * texture with zero width/height/depth will be considered "incomplete" - * and texturing will effectively be disabled. - * - * \param target one of GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_2D, - * GL_PROXY_TEXTURE_3D, GL_PROXY_TEXTURE_RECTANGLE_NV, - * GL_PROXY_TEXTURE_CUBE_MAP_ARB. - * \param level as passed to glTexImage - * \param internalFormat as passed to glTexImage - * \param format as passed to glTexImage - * \param type as passed to glTexImage - * \param width as passed to glTexImage - * \param height as passed to glTexImage - * \param depth as passed to glTexImage - * \param border as passed to glTexImage - * \return GL_TRUE if the image is acceptable, GL_FALSE if not acceptable. - */ -GLboolean -_mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level, - GLint internalFormat, GLenum format, GLenum type, - GLint width, GLint height, GLint depth, GLint border) -{ - GLint maxSize; - - (void) internalFormat; - (void) format; - (void) type; - - switch (target) { - case GL_PROXY_TEXTURE_1D: - maxSize = 1 << (ctx->Const.MaxTextureLevels - 1); - if (width < 2 * border || width > 2 + maxSize) - return GL_FALSE; - if (level >= ctx->Const.MaxTextureLevels) - return GL_FALSE; - if (!ctx->Extensions.ARB_texture_non_power_of_two) { - if (width > 0 && !_mesa_is_pow_two(width - 2 * border)) - return GL_FALSE; - } - return GL_TRUE; - - case GL_PROXY_TEXTURE_2D: - maxSize = 1 << (ctx->Const.MaxTextureLevels - 1); - if (width < 2 * border || width > 2 + maxSize) - return GL_FALSE; - if (height < 2 * border || height > 2 + maxSize) - return GL_FALSE; - if (level >= ctx->Const.MaxTextureLevels) - return GL_FALSE; - if (!ctx->Extensions.ARB_texture_non_power_of_two) { - if (width > 0 && !_mesa_is_pow_two(width - 2 * border)) - return GL_FALSE; - if (height > 0 && !_mesa_is_pow_two(height - 2 * border)) - return GL_FALSE; - } - return GL_TRUE; - - case GL_PROXY_TEXTURE_3D: - maxSize = 1 << (ctx->Const.Max3DTextureLevels - 1); - if (width < 2 * border || width > 2 + maxSize) - return GL_FALSE; - if (height < 2 * border || height > 2 + maxSize) - return GL_FALSE; - if (depth < 2 * border || depth > 2 + maxSize) - return GL_FALSE; - if (level >= ctx->Const.Max3DTextureLevels) - return GL_FALSE; - if (!ctx->Extensions.ARB_texture_non_power_of_two) { - if (width > 0 && !_mesa_is_pow_two(width - 2 * border)) - return GL_FALSE; - if (height > 0 && !_mesa_is_pow_two(height - 2 * border)) - return GL_FALSE; - if (depth > 0 && !_mesa_is_pow_two(depth - 2 * border)) - return GL_FALSE; - } - return GL_TRUE; - - case GL_PROXY_TEXTURE_RECTANGLE_NV: - maxSize = ctx->Const.MaxTextureRectSize; - if (width < 0 || width > maxSize) - return GL_FALSE; - if (height < 0 || height > maxSize) - return GL_FALSE; - if (level != 0) - return GL_FALSE; - return GL_TRUE; - - case GL_PROXY_TEXTURE_CUBE_MAP_ARB: - maxSize = 1 << (ctx->Const.MaxCubeTextureLevels - 1); - if (width < 2 * border || width > 2 + maxSize) - return GL_FALSE; - if (height < 2 * border || height > 2 + maxSize) - return GL_FALSE; - if (level >= ctx->Const.MaxCubeTextureLevels) - return GL_FALSE; - if (!ctx->Extensions.ARB_texture_non_power_of_two) { - if (width > 0 && !_mesa_is_pow_two(width - 2 * border)) - return GL_FALSE; - if (height > 0 && !_mesa_is_pow_two(height - 2 * border)) - return GL_FALSE; - } - return GL_TRUE; - - case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - maxSize = 1 << (ctx->Const.MaxTextureLevels - 1); - if (width < 2 * border || width > 2 + maxSize) - return GL_FALSE; - if (height < 1 || height > ctx->Const.MaxArrayTextureLayers) - return GL_FALSE; - if (level >= ctx->Const.MaxTextureLevels) - return GL_FALSE; - if (!ctx->Extensions.ARB_texture_non_power_of_two) { - if (width > 0 && !_mesa_is_pow_two(width - 2 * border)) - return GL_FALSE; - } - return GL_TRUE; - - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - maxSize = 1 << (ctx->Const.MaxTextureLevels - 1); - if (width < 2 * border || width > 2 + maxSize) - return GL_FALSE; - if (height < 2 * border || height > 2 + maxSize) - return GL_FALSE; - if (depth < 1 || depth > ctx->Const.MaxArrayTextureLayers) - return GL_FALSE; - if (level >= ctx->Const.MaxTextureLevels) - return GL_FALSE; - if (!ctx->Extensions.ARB_texture_non_power_of_two) { - if (width > 0 && !_mesa_is_pow_two(width - 2 * border)) - return GL_FALSE; - if (height > 0 && !_mesa_is_pow_two(height - 2 * border)) - return GL_FALSE; - } - return GL_TRUE; - - default: - _mesa_problem(ctx, "Invalid target in _mesa_test_proxy_teximage"); - return GL_FALSE; - } -} - - -/** - * Check if the memory used by the texture would exceed the driver's limit. - * This lets us support a max 3D texture size of 8K (for example) but - * prevents allocating a full 8K x 8K x 8K texture. - * XXX this could be rolled into the proxy texture size test (above) but - * we don't have the actual texture internal format at that point. - */ -static GLboolean -legal_texture_size(struct gl_context *ctx, gl_format format, - GLint width, GLint height, GLint depth) -{ - uint64_t bytes = _mesa_format_image_size64(format, width, height, depth); - uint64_t mbytes = bytes / (1024 * 1024); /* convert to MB */ - return mbytes <= (uint64_t) ctx->Const.MaxTextureMbytes; -} - - - -/** - * Helper function to determine whether a target and specific compression - * format are supported. - */ -static GLboolean -target_can_be_compressed(const struct gl_context *ctx, GLenum target, - GLenum intFormat) -{ - (void) intFormat; /* not used yet */ - - switch (target) { - case GL_TEXTURE_2D: - case GL_PROXY_TEXTURE_2D: - return GL_TRUE; /* true for any compressed format so far */ - case GL_PROXY_TEXTURE_CUBE_MAP: - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - return ctx->Extensions.ARB_texture_cube_map; - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - case GL_TEXTURE_2D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); - default: - return GL_FALSE; - } -} - - -/** - * Check if the given texture target value is legal for a - * glTexImage1/2/3D call. - */ -static GLboolean -legal_teximage_target(struct gl_context *ctx, GLuint dims, GLenum target) -{ - switch (dims) { - case 1: - switch (target) { - case GL_TEXTURE_1D: - case GL_PROXY_TEXTURE_1D: - return GL_TRUE; - default: - return GL_FALSE; - } - case 2: - switch (target) { - case GL_TEXTURE_2D: - case GL_PROXY_TEXTURE_2D: - return GL_TRUE; - case GL_PROXY_TEXTURE_CUBE_MAP: - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - return ctx->Extensions.ARB_texture_cube_map; - case GL_TEXTURE_RECTANGLE_NV: - case GL_PROXY_TEXTURE_RECTANGLE_NV: - return ctx->Extensions.NV_texture_rectangle; - case GL_TEXTURE_1D_ARRAY_EXT: - case GL_PROXY_TEXTURE_1D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); - default: - return GL_FALSE; - } - case 3: - switch (target) { - case GL_TEXTURE_3D: - case GL_PROXY_TEXTURE_3D: - return GL_TRUE; - case GL_TEXTURE_2D_ARRAY_EXT: - case GL_PROXY_TEXTURE_2D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); - default: - return GL_FALSE; - } - default: - _mesa_problem(ctx, "invalid dims=%u in legal_teximage_target()", dims); - return GL_FALSE; - } -} - - -/** - * Check if the given texture target value is legal for a - * glTexSubImage, glCopyTexSubImage or glCopyTexImage call. - * The difference compared to legal_teximage_target() above is that - * proxy targets are not supported. - */ -static GLboolean -legal_texsubimage_target(struct gl_context *ctx, GLuint dims, GLenum target) -{ - switch (dims) { - case 1: - return target == GL_TEXTURE_1D; - case 2: - switch (target) { - case GL_TEXTURE_2D: - return GL_TRUE; - case GL_TEXTURE_CUBE_MAP_POSITIVE_X: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_X: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Y: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: - case GL_TEXTURE_CUBE_MAP_POSITIVE_Z: - case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: - return ctx->Extensions.ARB_texture_cube_map; - case GL_TEXTURE_RECTANGLE_NV: - return ctx->Extensions.NV_texture_rectangle; - case GL_TEXTURE_1D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); - default: - return GL_FALSE; - } - case 3: - switch (target) { - case GL_TEXTURE_3D: - return GL_TRUE; - case GL_TEXTURE_2D_ARRAY_EXT: - return (ctx->Extensions.MESA_texture_array || - ctx->Extensions.EXT_texture_array); - default: - return GL_FALSE; - } - default: - _mesa_problem(ctx, "invalid dims=%u in legal_texsubimage_target()", - dims); - return GL_FALSE; - } -} - - -/** - * Test the glTexImage[123]D() parameters for errors. - * - * \param ctx GL context. - * \param dimensions texture image dimensions (must be 1, 2 or 3). - * \param target texture target given by the user. - * \param level image level given by the user. - * \param internalFormat internal format given by the user. - * \param format pixel data format given by the user. - * \param type pixel data type given by the user. - * \param width image width given by the user. - * \param height image height given by the user. - * \param depth image depth given by the user. - * \param border image border given by the user. - * - * \return GL_TRUE if an error was detected, or GL_FALSE if no errors. - * - * Verifies each of the parameters against the constants specified in - * __struct gl_contextRec::Const and the supported extensions, and according - * to the OpenGL specification. - */ -static GLboolean -texture_error_check( struct gl_context *ctx, - GLuint dimensions, GLenum target, - GLint level, GLint internalFormat, - GLenum format, GLenum type, - GLint width, GLint height, - GLint depth, GLint border ) -{ - const GLenum proxyTarget = get_proxy_target(target); - const GLboolean isProxy = target == proxyTarget; - GLboolean sizeOK = GL_TRUE; - GLboolean colorFormat, indexFormat; - - /* Basic level check (more checking in ctx->Driver.TestProxyTexImage) */ - if (level < 0 || level >= MAX_TEXTURE_LEVELS) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexImage%dD(level=%d)", dimensions, level); - } - return GL_TRUE; - } - - /* Check border */ - if (border < 0 || border > 1 || - ((target == GL_TEXTURE_RECTANGLE_NV || - target == GL_PROXY_TEXTURE_RECTANGLE_NV) && border != 0)) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexImage%dD(border=%d)", dimensions, border); - } - return GL_TRUE; - } - - if (width < 0 || height < 0 || depth < 0) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexImage%dD(width, height or depth < 0)", dimensions); - } - return GL_TRUE; - } - - /* Do this simple check before calling the TestProxyTexImage() function */ - if (proxyTarget == GL_PROXY_TEXTURE_CUBE_MAP_ARB) { - sizeOK = (width == height); - } - - /* - * Use the proxy texture driver hook to see if the size/level/etc are - * legal. - */ - sizeOK = sizeOK && ctx->Driver.TestProxyTexImage(ctx, proxyTarget, level, - internalFormat, format, - type, width, height, - depth, border); - if (!sizeOK) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexImage%dD(level=%d, width=%d, height=%d, depth=%d)", - dimensions, level, width, height, depth); - } - return GL_TRUE; - } - - /* Check internalFormat */ - if (_mesa_base_tex_format(ctx, internalFormat) < 0) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexImage%dD(internalFormat=%s)", - dimensions, _mesa_lookup_enum_by_nr(internalFormat)); - } - return GL_TRUE; - } - - /* Check incoming image format and type */ - if (!_mesa_is_legal_format_and_type(ctx, format, type)) { - /* Normally, GL_INVALID_OPERATION is generated by a format/type - * mismatch (see the 1.2 spec page 94, sec 3.6.4.). But with the - * GL_EXT_texture_integer extension, some combinations should generate - * GL_INVALID_ENUM instead (grr!). - */ - if (!isProxy) { - GLenum error = _mesa_is_integer_format(format) - ? GL_INVALID_ENUM : GL_INVALID_OPERATION; - _mesa_error(ctx, error, - "glTexImage%dD(incompatible format 0x%x, type 0x%x)", - dimensions, format, type); - } - return GL_TRUE; - } - - /* make sure internal format and format basically agree */ - colorFormat = _mesa_is_color_format(format); - indexFormat = _mesa_is_index_format(format); - if ((_mesa_is_color_format(internalFormat) && !colorFormat && !indexFormat) || - (_mesa_is_index_format(internalFormat) && !indexFormat) || - (_mesa_is_depth_format(internalFormat) != _mesa_is_depth_format(format)) || - (_mesa_is_ycbcr_format(internalFormat) != _mesa_is_ycbcr_format(format)) || - (_mesa_is_depthstencil_format(internalFormat) != _mesa_is_depthstencil_format(format)) || - (_mesa_is_dudv_format(internalFormat) != _mesa_is_dudv_format(format))) { - if (!isProxy) - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexImage%dD(incompatible internalFormat 0x%x, format 0x%x)", - dimensions, internalFormat, format); - return GL_TRUE; - } - - /* additional checks for ycbcr textures */ - if (internalFormat == GL_YCBCR_MESA) { - ASSERT(ctx->Extensions.MESA_ycbcr_texture); - if (type != GL_UNSIGNED_SHORT_8_8_MESA && - type != GL_UNSIGNED_SHORT_8_8_REV_MESA) { - char message[100]; - _mesa_snprintf(message, sizeof(message), - "glTexImage%dD(format/type YCBCR mismatch", dimensions); - _mesa_error(ctx, GL_INVALID_ENUM, "%s", message); - return GL_TRUE; /* error */ - } - if (target != GL_TEXTURE_2D && - target != GL_PROXY_TEXTURE_2D && - target != GL_TEXTURE_RECTANGLE_NV && - target != GL_PROXY_TEXTURE_RECTANGLE_NV) { - if (!isProxy) - _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage(target)"); - return GL_TRUE; - } - if (border != 0) { - if (!isProxy) { - char message[100]; - _mesa_snprintf(message, sizeof(message), - "glTexImage%dD(format=GL_YCBCR_MESA and border=%d)", - dimensions, border); - _mesa_error(ctx, GL_INVALID_VALUE, "%s", message); - } - return GL_TRUE; - } - } - - /* additional checks for depth textures */ - if (_mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_COMPONENT) { - /* Only 1D, 2D and rectangular textures supported, not 3D or cubes */ - if (target != GL_TEXTURE_1D && - target != GL_PROXY_TEXTURE_1D && - target != GL_TEXTURE_2D && - target != GL_PROXY_TEXTURE_2D && - target != GL_TEXTURE_RECTANGLE_ARB && - target != GL_PROXY_TEXTURE_RECTANGLE_ARB) { - if (!isProxy) - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexImage(target/internalFormat)"); - return GL_TRUE; - } - } - - /* additional checks for compressed textures */ - if (_mesa_is_compressed_format(ctx, internalFormat)) { - if (!target_can_be_compressed(ctx, target, internalFormat)) { - if (!isProxy) - _mesa_error(ctx, GL_INVALID_ENUM, - "glTexImage%dD(target)", dimensions); - return GL_TRUE; - } - if (border != 0) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexImage%dD(border!=0)", dimensions); - } - return GL_TRUE; - } - } - - /* additional checks for integer textures */ - if (ctx->Extensions.EXT_texture_integer && - (_mesa_is_integer_format(format) != - _mesa_is_integer_format(internalFormat))) { - if (!isProxy) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexImage%dD(integer/non-integer format mismatch)", - dimensions); - } - return GL_TRUE; - } - - /* if we get here, the parameters are OK */ - return GL_FALSE; -} - - -/** - * Test glTexSubImage[123]D() parameters for errors. - * - * \param ctx GL context. - * \param dimensions texture image dimensions (must be 1, 2 or 3). - * \param target texture target given by the user. - * \param level image level given by the user. - * \param xoffset sub-image x offset given by the user. - * \param yoffset sub-image y offset given by the user. - * \param zoffset sub-image z offset given by the user. - * \param format pixel data format given by the user. - * \param type pixel data type given by the user. - * \param width image width given by the user. - * \param height image height given by the user. - * \param depth image depth given by the user. - * - * \return GL_TRUE if an error was detected, or GL_FALSE if no errors. - * - * Verifies each of the parameters against the constants specified in - * __struct gl_contextRec::Const and the supported extensions, and according - * to the OpenGL specification. - */ -static GLboolean -subtexture_error_check( struct gl_context *ctx, GLuint dimensions, - GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint width, GLint height, GLint depth, - GLenum format, GLenum type ) -{ - /* Basic level check */ - if (level < 0 || level >= MAX_TEXTURE_LEVELS) { - _mesa_error(ctx, GL_INVALID_ENUM, "glTexSubImage2D(level=%d)", level); - return GL_TRUE; - } - - /* Check for negative sizes */ - if (width < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexSubImage%dD(width=%d)", dimensions, width); - return GL_TRUE; - } - if (height < 0 && dimensions > 1) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexSubImage%dD(height=%d)", dimensions, height); - return GL_TRUE; - } - if (depth < 0 && dimensions > 2) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glTexSubImage%dD(depth=%d)", dimensions, depth); - return GL_TRUE; - } - - if (!_mesa_is_legal_format_and_type(ctx, format, type)) { - /* As with the glTexImage2D check above, the error code here - * depends on texture integer. - */ - GLenum error = _mesa_is_integer_format(format) - ? GL_INVALID_OPERATION : GL_INVALID_ENUM; - _mesa_error(ctx, error, - "glTexSubImage%dD(incompatible format 0x%x, type 0x%x)", - dimensions, format, type); - return GL_TRUE; - } - - return GL_FALSE; -} - - -/** - * Do second part of glTexSubImage which depends on the destination texture. - * \return GL_TRUE if error recorded, GL_FALSE otherwise - */ -static GLboolean -subtexture_error_check2( struct gl_context *ctx, GLuint dimensions, - GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint width, GLint height, GLint depth, - GLenum format, GLenum type, - const struct gl_texture_image *destTex ) -{ - if (!destTex) { - /* undefined image level */ - _mesa_error(ctx, GL_INVALID_OPERATION, "glTexSubImage%dD", dimensions); - return GL_TRUE; - } - - if (xoffset < -((GLint)destTex->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage%dD(xoffset)", - dimensions); - return GL_TRUE; - } - if (xoffset + width > (GLint) (destTex->Width + destTex->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage%dD(xoffset+width)", - dimensions); - return GL_TRUE; - } - if (dimensions > 1) { - if (yoffset < -((GLint)destTex->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage%dD(yoffset)", - dimensions); - return GL_TRUE; - } - if (yoffset + height > (GLint) (destTex->Height + destTex->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage%dD(yoffset+height)", - dimensions); - return GL_TRUE; - } - } - if (dimensions > 2) { - if (zoffset < -((GLint)destTex->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage3D(zoffset)"); - return GL_TRUE; - } - if (zoffset + depth > (GLint) (destTex->Depth + destTex->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage3D(zoffset+depth)"); - return GL_TRUE; - } - } - - if (_mesa_is_format_compressed(destTex->TexFormat)) { - GLuint bw, bh; - - /* do tests which depend on compression block size */ - _mesa_get_format_block_size(destTex->TexFormat, &bw, &bh); - - /* offset must be multiple of block size */ - if ((xoffset % bw != 0) || (yoffset % bh != 0)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexSubImage%dD(xoffset = %d, yoffset = %d)", - dimensions, xoffset, yoffset); - return GL_TRUE; - } - /* size must be multiple of bw by bh or equal to whole texture size */ - if ((width % bw != 0) && (GLuint) width != destTex->Width) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexSubImage%dD(width = %d)", dimensions, width); - return GL_TRUE; - } - if ((height % bh != 0) && (GLuint) height != destTex->Height) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glTexSubImage%dD(height = %d)", dimensions, height); - return GL_TRUE; - } - } - - return GL_FALSE; -} - - -/** - * Test glCopyTexImage[12]D() parameters for errors. - * - * \param ctx GL context. - * \param dimensions texture image dimensions (must be 1, 2 or 3). - * \param target texture target given by the user. - * \param level image level given by the user. - * \param internalFormat internal format given by the user. - * \param width image width given by the user. - * \param height image height given by the user. - * \param border texture border. - * - * \return GL_TRUE if an error was detected, or GL_FALSE if no errors. - * - * Verifies each of the parameters against the constants specified in - * __struct gl_contextRec::Const and the supported extensions, and according - * to the OpenGL specification. - */ -static GLboolean -copytexture_error_check( struct gl_context *ctx, GLuint dimensions, - GLenum target, GLint level, GLint internalFormat, - GLint width, GLint height, GLint border ) -{ - const GLenum proxyTarget = get_proxy_target(target); - const GLenum type = GL_FLOAT; - GLboolean sizeOK; - GLint format; - - /* check target */ - if (!legal_texsubimage_target(ctx, dimensions, target)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glCopyTexImage%uD(target=%s)", - dimensions, _mesa_lookup_enum_by_nr(target)); - return GL_TRUE; - } - - /* Basic level check (more checking in ctx->Driver.TestProxyTexImage) */ - if (level < 0 || level >= MAX_TEXTURE_LEVELS) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexImage%dD(level=%d)", dimensions, level); - return GL_TRUE; - } - - /* Check that the source buffer is complete */ - if (ctx->ReadBuffer->Name) { - if (ctx->ReadBuffer->_Status == 0) { - _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer); - } - if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, - "glCopyTexImage%dD(invalid readbuffer)", dimensions); - return GL_TRUE; - } - } - - /* Check border */ - if (border < 0 || border > 1 || - ((target == GL_TEXTURE_RECTANGLE_NV || - target == GL_PROXY_TEXTURE_RECTANGLE_NV) && border != 0)) { - return GL_TRUE; - } - - format = _mesa_base_tex_format(ctx, internalFormat); - if (format < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexImage%dD(internalFormat)", dimensions); - return GL_TRUE; - } - - if (!_mesa_source_buffer_exists(ctx, format)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexImage%dD(missing readbuffer)", dimensions); - return GL_TRUE; - } - - /* Do size, level checking */ - sizeOK = (proxyTarget == GL_PROXY_TEXTURE_CUBE_MAP_ARB) - ? (width == height) : 1; - - sizeOK = sizeOK && ctx->Driver.TestProxyTexImage(ctx, proxyTarget, level, - internalFormat, format, - type, width, height, - 1, border); - - if (!sizeOK) { - if (dimensions == 1) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexImage1D(width=%d)", width); - } - else { - ASSERT(dimensions == 2); - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexImage2D(width=%d, height=%d)", width, height); - } - return GL_TRUE; - } - - if (_mesa_is_compressed_format(ctx, internalFormat)) { - if (!target_can_be_compressed(ctx, target, internalFormat)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glCopyTexImage%dD(target)", dimensions); - return GL_TRUE; - } - if (border != 0) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexImage%dD(border!=0)", dimensions); - return GL_TRUE; - } - } - else if (_mesa_is_depth_format(internalFormat)) { - /* make sure we have depth/stencil buffers */ - if (!ctx->ReadBuffer->_DepthBuffer) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexImage%dD(no depth)", dimensions); - return GL_TRUE; - } - } - else if (_mesa_is_depthstencil_format(internalFormat)) { - /* make sure we have depth/stencil buffers */ - if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexImage%dD(no depth/stencil buffer)", dimensions); - return GL_TRUE; - } - } - - /* if we get here, the parameters are OK */ - return GL_FALSE; -} - - -/** - * Test glCopyTexSubImage[12]D() parameters for errors. - * Note that this is the first part of error checking. - * See also copytexsubimage_error_check2() below for the second part. - * - * \param ctx GL context. - * \param dimensions texture image dimensions (must be 1, 2 or 3). - * \param target texture target given by the user. - * \param level image level given by the user. - * - * \return GL_TRUE if an error was detected, or GL_FALSE if no errors. - */ -static GLboolean -copytexsubimage_error_check1( struct gl_context *ctx, GLuint dimensions, - GLenum target, GLint level) -{ - /* Check that the source buffer is complete */ - if (ctx->ReadBuffer->Name) { - if (ctx->ReadBuffer->_Status == 0) { - _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer); - } - if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) { - _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT, - "glCopyTexImage%dD(invalid readbuffer)", dimensions); - return GL_TRUE; - } - } - - /* check target (proxies not allowed) */ - if (!legal_texsubimage_target(ctx, dimensions, target)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glCopyTexSubImage%uD(target=%s)", - dimensions, _mesa_lookup_enum_by_nr(target)); - return GL_TRUE; - } - - /* Check level */ - if (level < 0 || level >= MAX_TEXTURE_LEVELS) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(level=%d)", dimensions, level); - return GL_TRUE; - } - - return GL_FALSE; -} - - -/** - * Second part of error checking for glCopyTexSubImage[12]D(). - * \param xoffset sub-image x offset given by the user. - * \param yoffset sub-image y offset given by the user. - * \param zoffset sub-image z offset given by the user. - * \param width image width given by the user. - * \param height image height given by the user. - */ -static GLboolean -copytexsubimage_error_check2( struct gl_context *ctx, GLuint dimensions, - GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, - const struct gl_texture_image *teximage ) -{ - /* check that dest tex image exists */ - if (!teximage) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexSubImage%dD(undefined texture level: %d)", - dimensions, level); - return GL_TRUE; - } - - /* Check size */ - if (width < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(width=%d)", dimensions, width); - return GL_TRUE; - } - if (dimensions > 1 && height < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(height=%d)", dimensions, height); - return GL_TRUE; - } - - /* check x/y offsets */ - if (xoffset < -((GLint)teximage->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(xoffset=%d)", dimensions, xoffset); - return GL_TRUE; - } - if (xoffset + width > (GLint) (teximage->Width + teximage->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(xoffset+width)", dimensions); - return GL_TRUE; - } - if (dimensions > 1) { - if (yoffset < -((GLint)teximage->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(yoffset=%d)", dimensions, yoffset); - return GL_TRUE; - } - /* NOTE: we're adding the border here, not subtracting! */ - if (yoffset + height > (GLint) (teximage->Height + teximage->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(yoffset+height)", dimensions); - return GL_TRUE; - } - } - - /* check z offset */ - if (dimensions > 2) { - if (zoffset < -((GLint)teximage->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(zoffset)", dimensions); - return GL_TRUE; - } - if (zoffset > (GLint) (teximage->Depth + teximage->Border)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(zoffset+depth)", dimensions); - return GL_TRUE; - } - } - - if (_mesa_is_format_compressed(teximage->TexFormat)) { - /* offset must be multiple of 4 */ - if ((xoffset & 3) || (yoffset & 3)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(xoffset or yoffset)", dimensions); - return GL_TRUE; - } - /* size must be multiple of 4 */ - if ((width & 3) != 0 && (GLuint) width != teximage->Width) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(width)", dimensions); - return GL_TRUE; - } - if ((height & 3) != 0 && (GLuint) height != teximage->Height) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCopyTexSubImage%dD(height)", dimensions); - return GL_TRUE; - } - } - - if (teximage->InternalFormat == GL_YCBCR_MESA) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyTexSubImage2D"); - return GL_TRUE; - } - - if (!_mesa_source_buffer_exists(ctx, teximage->_BaseFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexSubImage%dD(missing readbuffer, format=0x%x)", - dimensions, teximage->_BaseFormat); - return GL_TRUE; - } - - if (teximage->_BaseFormat == GL_DEPTH_COMPONENT) { - if (!ctx->ReadBuffer->_DepthBuffer) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexSubImage%dD(no depth buffer)", - dimensions); - return GL_TRUE; - } - } - else if (teximage->_BaseFormat == GL_DEPTH_STENCIL_EXT) { - if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexSubImage%dD(no depth/stencil buffer)", - dimensions); - return GL_TRUE; - } - } - - /* If copying into an integer texture, the source buffer must also be - * integer-valued. - */ - if (_mesa_is_format_integer_color(teximage->TexFormat)) { - struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer; - if (!_mesa_is_format_integer_color(rb->Format)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCopyTexSubImage%dD(source buffer is not integer format)", - dimensions); - return GL_TRUE; - } - } - - /* if we get here, the parameters are OK */ - return GL_FALSE; -} - - -/** Callback info for walking over FBO hash table */ -struct cb_info -{ - struct gl_context *ctx; - struct gl_texture_object *texObj; - GLuint level, face; -}; - - -/** - * Check render to texture callback. Called from _mesa_HashWalk(). - */ -static void -check_rtt_cb(GLuint key, void *data, void *userData) -{ - struct gl_framebuffer *fb = (struct gl_framebuffer *) data; - const struct cb_info *info = (struct cb_info *) userData; - struct gl_context *ctx = info->ctx; - const struct gl_texture_object *texObj = info->texObj; - const GLuint level = info->level, face = info->face; - - /* If this is a user-created FBO */ - if (fb->Name) { - GLuint i; - /* check if any of the FBO's attachments point to 'texObj' */ - for (i = 0; i < BUFFER_COUNT; i++) { - struct gl_renderbuffer_attachment *att = fb->Attachment + i; - if (att->Type == GL_TEXTURE && - att->Texture == texObj && - att->TextureLevel == level && - att->CubeMapFace == face) { - ASSERT(att->Texture->Image[att->CubeMapFace][att->TextureLevel]); - /* Tell driver about the new renderbuffer texture */ - ctx->Driver.RenderTexture(ctx, ctx->DrawBuffer, att); - /* Mark fb status as indeterminate to force re-validation */ - fb->_Status = 0; - } - } - } -} - - -/** - * When a texture image is specified we have to check if it's bound to - * any framebuffer objects (render to texture) in order to detect changes - * in size or format since that effects FBO completeness. - * Any FBOs rendering into the texture must be re-validated. - */ -static void -update_fbo_texture(struct gl_context *ctx, struct gl_texture_object *texObj, - GLuint face, GLuint level) -{ - /* Only check this texture if it's been marked as RenderToTexture */ - if (texObj->_RenderToTexture) { - struct cb_info info; - info.ctx = ctx; - info.texObj = texObj; - info.level = level; - info.face = face; - _mesa_HashWalk(ctx->Shared->FrameBuffers, check_rtt_cb, &info); - } -} - - -/** - * If the texture object's GenerateMipmap flag is set and we've - * changed the texture base level image, regenerate the rest of the - * mipmap levels now. - */ -static INLINE void -check_gen_mipmap(struct gl_context *ctx, GLenum target, - struct gl_texture_object *texObj, GLint level) -{ - ASSERT(target != GL_TEXTURE_CUBE_MAP); - if (texObj->GenerateMipmap && - level == texObj->BaseLevel && - level < texObj->MaxLevel) { - ASSERT(ctx->Driver.GenerateMipmap); - ctx->Driver.GenerateMipmap(ctx, target, texObj); - } -} - - -/** Debug helper: override the user-requested internal format */ -static GLenum -override_internal_format(GLenum internalFormat, GLint width, GLint height) -{ -#if 0 - if (internalFormat == GL_RGBA16F_ARB || - internalFormat == GL_RGBA32F_ARB) { - printf("Convert rgba float tex to int %d x %d\n", width, height); - return GL_RGBA; - } - else if (internalFormat == GL_RGB16F_ARB || - internalFormat == GL_RGB32F_ARB) { - printf("Convert rgb float tex to int %d x %d\n", width, height); - return GL_RGB; - } - else if (internalFormat == GL_LUMINANCE_ALPHA16F_ARB || - internalFormat == GL_LUMINANCE_ALPHA32F_ARB) { - printf("Convert luminance float tex to int %d x %d\n", width, height); - return GL_LUMINANCE_ALPHA; - } - else if (internalFormat == GL_LUMINANCE16F_ARB || - internalFormat == GL_LUMINANCE32F_ARB) { - printf("Convert luminance float tex to int %d x %d\n", width, height); - return GL_LUMINANCE; - } - else if (internalFormat == GL_ALPHA16F_ARB || - internalFormat == GL_ALPHA32F_ARB) { - printf("Convert luminance float tex to int %d x %d\n", width, height); - return GL_ALPHA; - } - /* - else if (internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT) { - internalFormat = GL_RGBA; - } - */ - else { - return internalFormat; - } -#else - return internalFormat; -#endif -} - - -/** - * Choose the actual hardware format for a texture image. - * Try to use the same format as the previous image level when possible. - * Otherwise, ask the driver for the best format. - * It's important to try to choose a consistant format for all levels - * for efficient texture memory layout/allocation. In particular, this - * comes up during automatic mipmap generation. - */ -gl_format -_mesa_choose_texture_format(struct gl_context *ctx, - struct gl_texture_object *texObj, - GLenum target, GLint level, - GLenum internalFormat, GLenum format, GLenum type) -{ - gl_format f; - - /* see if we've already chosen a format for the previous level */ - if (level > 0) { - struct gl_texture_image *prevImage = - _mesa_select_tex_image(ctx, texObj, target, level - 1); - /* See if the prev level is defined and has an internal format which - * matches the new internal format. - */ - if (prevImage && - prevImage->Width > 0 && - prevImage->InternalFormat == internalFormat) { - /* use the same format */ - ASSERT(prevImage->TexFormat != MESA_FORMAT_NONE); - return prevImage->TexFormat; - } - } - - /* choose format from scratch */ - f = ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type); - ASSERT(f != MESA_FORMAT_NONE); - return f; -} - - -/** - * Common code to implement all the glTexImage1D/2D/3D functions. - */ -static void -teximage(struct gl_context *ctx, GLuint dims, - GLenum target, GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, GLenum format, GLenum type, - const GLvoid *pixels) -{ - GLboolean error; - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glTexImage%uD %s %d %s %d %d %d %d %s %s %p\n", - dims, - _mesa_lookup_enum_by_nr(target), level, - _mesa_lookup_enum_by_nr(internalFormat), - width, height, depth, border, - _mesa_lookup_enum_by_nr(format), - _mesa_lookup_enum_by_nr(type), pixels); - - internalFormat = override_internal_format(internalFormat, width, height); - - /* target error checking */ - if (!legal_teximage_target(ctx, dims, target)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage%uD(target=%s)", - dims, _mesa_lookup_enum_by_nr(target)); - return; - } - - /* general error checking */ - error = texture_error_check(ctx, dims, target, level, internalFormat, - format, type, width, height, depth, border); - - if (_mesa_is_proxy_texture(target)) { - /* Proxy texture: just clear or set state depending on error checking */ - struct gl_texture_image *texImage = - _mesa_get_proxy_tex_image(ctx, target, level); - - if (error) { - /* when error, clear all proxy texture image parameters */ - if (texImage) - clear_teximage_fields(texImage); - } - else { - /* no error, set the tex image parameters */ - struct gl_texture_object *texObj = - _mesa_get_current_tex_object(ctx, target); - gl_format texFormat = _mesa_choose_texture_format(ctx, texObj, - target, level, - internalFormat, - format, type); - - if (legal_texture_size(ctx, texFormat, width, height, depth)) { - _mesa_init_teximage_fields(ctx, target, texImage, width, height, - depth, border, internalFormat, - texFormat); - } - else if (texImage) { - clear_teximage_fields(texImage); - } - } - } - else { - /* non-proxy target */ - const GLuint face = _mesa_tex_target_to_face(target); - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - - if (error) { - return; /* error was recorded */ - } - - if (ctx->NewState & _NEW_PIXEL) - _mesa_update_state(ctx); - - texObj = _mesa_get_current_tex_object(ctx, target); - - _mesa_lock_texture(ctx, texObj); - { - texImage = _mesa_get_tex_image(ctx, texObj, target, level); - - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage%uD", dims); - } - else { - gl_format texFormat; - - if (texImage->Data) { - ctx->Driver.FreeTexImageData( ctx, texImage ); - } - - ASSERT(texImage->Data == NULL); - texFormat = _mesa_choose_texture_format(ctx, texObj, target, level, - internalFormat, format, - type); - - if (legal_texture_size(ctx, texFormat, width, height, depth)) { - _mesa_init_teximage_fields(ctx, target, texImage, - width, height, depth, - border, internalFormat, texFormat); - - /* Give the texture to the driver. <pixels> may be null. */ - ASSERT(ctx->Driver.TexImage3D); - switch (dims) { - case 1: - ctx->Driver.TexImage1D(ctx, target, level, internalFormat, - width, border, format, - type, pixels, &ctx->Unpack, texObj, - texImage); - break; - case 2: - ctx->Driver.TexImage2D(ctx, target, level, internalFormat, - width, height, border, format, - type, pixels, &ctx->Unpack, texObj, - texImage); - break; - case 3: - ctx->Driver.TexImage3D(ctx, target, level, internalFormat, - width, height, depth, border, format, - type, pixels, &ctx->Unpack, texObj, - texImage); - break; - default: - _mesa_problem(ctx, "invalid dims=%u in teximage()", dims); - } - - check_gen_mipmap(ctx, target, texObj, level); - - update_fbo_texture(ctx, texObj, face, level); - - /* state update */ - texObj->_Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; - } - else { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage%uD", dims); - } - } - } - _mesa_unlock_texture(ctx, texObj); - } -} - - -/* - * Called from the API. Note that width includes the border. - */ -void GLAPIENTRY -_mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat, - GLsizei width, GLint border, GLenum format, - GLenum type, const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - teximage(ctx, 1, target, level, internalFormat, width, 1, 1, - border, format, type, pixels); -} - - -void GLAPIENTRY -_mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLint border, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - teximage(ctx, 2, target, level, internalFormat, width, height, 1, - border, format, type, pixels); -} - - -/* - * Called by the API or display list executor. - * Note that width and height include the border. - */ -void GLAPIENTRY -_mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - teximage(ctx, 3, target, level, internalFormat, width, height, depth, - border, format, type, pixels); -} - - -void GLAPIENTRY -_mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalFormat, - GLsizei width, GLsizei height, GLsizei depth, - GLint border, GLenum format, GLenum type, - const GLvoid *pixels ) -{ - _mesa_TexImage3D(target, level, (GLint) internalFormat, width, height, - depth, border, format, type, pixels); -} - - -#if FEATURE_OES_EGL_image -void GLAPIENTRY -_mesa_EGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image) -{ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (!ctx->Extensions.OES_EGL_image) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glEGLImageTargetTexture2DOES(unsupported)"); - return; - } - - if (target != GL_TEXTURE_2D) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glEGLImageTargetTexture2D(target=%d)", target); - return; - } - - if (ctx->NewState & _NEW_PIXEL) - _mesa_update_state(ctx); - - texObj = _mesa_get_current_tex_object(ctx, target); - _mesa_lock_texture(ctx, texObj); - - texImage = _mesa_get_tex_image(ctx, texObj, target, 0); - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glEGLImageTargetTexture2D"); - } else { - if (texImage->Data) - ctx->Driver.FreeTexImageData( ctx, texImage ); - - ASSERT(texImage->Data == NULL); - ctx->Driver.EGLImageTargetTexture2D(ctx, target, - texObj, texImage, image); - - /* state update */ - texObj->_Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; - } - _mesa_unlock_texture(ctx, texObj); - -} -#endif - - - -/** - * Implement all the glTexSubImage1/2/3D() functions. - */ -static void -texsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, const GLvoid *pixels ) -{ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glTexSubImage%uD %s %d %d %d %d %d %d %d %s %s %p\n", - dims, - _mesa_lookup_enum_by_nr(target), level, - xoffset, yoffset, zoffset, width, height, depth, - _mesa_lookup_enum_by_nr(format), - _mesa_lookup_enum_by_nr(type), pixels); - - /* check target (proxies not allowed) */ - if (!legal_texsubimage_target(ctx, dims, target)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glTexSubImage%uD(target=%s)", - dims, _mesa_lookup_enum_by_nr(target)); - return; - } - - if (ctx->NewState & _NEW_PIXEL) - _mesa_update_state(ctx); - - if (subtexture_error_check(ctx, dims, target, level, xoffset, yoffset, zoffset, - width, height, depth, format, type)) { - return; /* error was detected */ - } - - texObj = _mesa_get_current_tex_object(ctx, target); - - _mesa_lock_texture(ctx, texObj); - { - texImage = _mesa_select_tex_image(ctx, texObj, target, level); - - if (subtexture_error_check2(ctx, dims, target, level, - xoffset, yoffset, zoffset, - width, height, depth, - format, type, texImage)) { - /* error was recorded */ - } - else if (width > 0 && height > 0 && height > 0) { - /* If we have a border, offset=-1 is legal. Bias by border width. */ - switch (dims) { - case 3: - zoffset += texImage->Border; - /* fall-through */ - case 2: - yoffset += texImage->Border; - /* fall-through */ - case 1: - xoffset += texImage->Border; - } - - switch (dims) { - case 1: - ctx->Driver.TexSubImage1D(ctx, target, level, - xoffset, width, - format, type, pixels, - &ctx->Unpack, texObj, texImage ); - break; - case 2: - ctx->Driver.TexSubImage2D(ctx, target, level, - xoffset, yoffset, width, height, - format, type, pixels, - &ctx->Unpack, texObj, texImage ); - break; - case 3: - ctx->Driver.TexSubImage3D(ctx, target, level, - xoffset, yoffset, zoffset, - width, height, depth, - format, type, pixels, - &ctx->Unpack, texObj, texImage ); - break; - default: - _mesa_problem(ctx, "unexpected dims in subteximage()"); - } - - check_gen_mipmap(ctx, target, texObj, level); - - ctx->NewState |= _NEW_TEXTURE; - } - } - _mesa_unlock_texture(ctx, texObj); -} - - -void GLAPIENTRY -_mesa_TexSubImage1D( GLenum target, GLint level, - GLint xoffset, GLsizei width, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - texsubimage(ctx, 1, target, level, - xoffset, 0, 0, - width, 1, 1, - format, type, pixels); -} - - -void GLAPIENTRY -_mesa_TexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - texsubimage(ctx, 2, target, level, - xoffset, yoffset, 0, - width, height, 1, - format, type, pixels); -} - - - -void GLAPIENTRY -_mesa_TexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLenum type, - const GLvoid *pixels ) -{ - GET_CURRENT_CONTEXT(ctx); - texsubimage(ctx, 3, target, level, - xoffset, yoffset, zoffset, - width, height, depth, - format, type, pixels); -} - - - -/** - * Implement the glCopyTexImage1/2D() functions. - */ -static void -copyteximage(struct gl_context *ctx, GLuint dims, - GLenum target, GLint level, GLenum internalFormat, - GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) -{ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - const GLuint face = _mesa_tex_target_to_face(target); - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glCopyTexImage%uD %s %d %s %d %d %d %d %d\n", - dims, - _mesa_lookup_enum_by_nr(target), level, - _mesa_lookup_enum_by_nr(internalFormat), - x, y, width, height, border); - - if (ctx->NewState & NEW_COPY_TEX_STATE) - _mesa_update_state(ctx); - - if (copytexture_error_check(ctx, dims, target, level, internalFormat, - width, height, border)) - return; - - texObj = _mesa_get_current_tex_object(ctx, target); - - _mesa_lock_texture(ctx, texObj); - { - texImage = _mesa_get_tex_image(ctx, texObj, target, level); - - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage%uD", dims); - } - else { - gl_format texFormat; - - if (texImage->Data) { - ctx->Driver.FreeTexImageData( ctx, texImage ); - } - - ASSERT(texImage->Data == NULL); - - texFormat = _mesa_choose_texture_format(ctx, texObj, target, level, - internalFormat, GL_NONE, - GL_NONE); - - if (legal_texture_size(ctx, texFormat, width, height, 1)) { - _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1, - border, internalFormat, texFormat); - - ASSERT(ctx->Driver.CopyTexImage2D); - if (dims == 1) - ctx->Driver.CopyTexImage1D(ctx, target, level, internalFormat, - x, y, width, border); - else - ctx->Driver.CopyTexImage2D(ctx, target, level, internalFormat, - x, y, width, height, border); - - check_gen_mipmap(ctx, target, texObj, level); - - update_fbo_texture(ctx, texObj, face, level); - - /* state update */ - texObj->_Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; - } - else { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage%uD", dims); - } - } - } - _mesa_unlock_texture(ctx, texObj); -} - - - -void GLAPIENTRY -_mesa_CopyTexImage1D( GLenum target, GLint level, - GLenum internalFormat, - GLint x, GLint y, - GLsizei width, GLint border ) -{ - GET_CURRENT_CONTEXT(ctx); - copyteximage(ctx, 1, target, level, internalFormat, x, y, width, 1, border); -} - - - -void GLAPIENTRY -_mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat, - GLint x, GLint y, GLsizei width, GLsizei height, - GLint border ) -{ - GET_CURRENT_CONTEXT(ctx); - copyteximage(ctx, 2, target, level, internalFormat, - x, y, width, height, border); -} - - - -/** - * Implementation for glCopyTexSubImage1/2/3D() functions. - */ -static void -copytexsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint x, GLint y, GLsizei width, GLsizei height) -{ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glCopyTexSubImage%uD %s %d %d %d %d %d %d %d %d\n", - dims, - _mesa_lookup_enum_by_nr(target), - level, xoffset, yoffset, zoffset, x, y, width, height); - - if (ctx->NewState & NEW_COPY_TEX_STATE) - _mesa_update_state(ctx); - - if (copytexsubimage_error_check1(ctx, dims, target, level)) - return; - - texObj = _mesa_get_current_tex_object(ctx, target); - - _mesa_lock_texture(ctx, texObj); - { - texImage = _mesa_select_tex_image(ctx, texObj, target, level); - - if (copytexsubimage_error_check2(ctx, dims, target, level, xoffset, yoffset, - zoffset, width, height, texImage)) { - /* error was recored */ - } - else { - /* If we have a border, offset=-1 is legal. Bias by border width. */ - switch (dims) { - case 3: - zoffset += texImage->Border; - /* fall-through */ - case 2: - yoffset += texImage->Border; - /* fall-through */ - case 1: - xoffset += texImage->Border; - } - - if (_mesa_clip_copytexsubimage(ctx, &xoffset, &yoffset, &x, &y, - &width, &height)) { - switch (dims) { - case 1: - ctx->Driver.CopyTexSubImage1D(ctx, target, level, - xoffset, x, y, width); - break; - case 2: - ctx->Driver.CopyTexSubImage2D(ctx, target, level, - xoffset, yoffset, - x, y, width, height); - break; - case 3: - ctx->Driver.CopyTexSubImage3D(ctx, target, level, - xoffset, yoffset, zoffset, - x, y, width, height); - break; - default: - _mesa_problem(ctx, "bad dims in copytexsubimage()"); - } - - check_gen_mipmap(ctx, target, texObj, level); - - ctx->NewState |= _NEW_TEXTURE; - } - } - } - _mesa_unlock_texture(ctx, texObj); -} - - -void GLAPIENTRY -_mesa_CopyTexSubImage1D( GLenum target, GLint level, - GLint xoffset, GLint x, GLint y, GLsizei width ) -{ - GET_CURRENT_CONTEXT(ctx); - copytexsubimage(ctx, 1, target, level, xoffset, 0, 0, x, y, width, 1); -} - - - -void GLAPIENTRY -_mesa_CopyTexSubImage2D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint x, GLint y, GLsizei width, GLsizei height ) -{ - GET_CURRENT_CONTEXT(ctx); - copytexsubimage(ctx, 2, target, level, xoffset, yoffset, 0, x, y, - width, height); -} - - - -void GLAPIENTRY -_mesa_CopyTexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint x, GLint y, GLsizei width, GLsizei height ) -{ - GET_CURRENT_CONTEXT(ctx); - copytexsubimage(ctx, 3, target, level, xoffset, yoffset, zoffset, - x, y, width, height); -} - - - - -/**********************************************************************/ -/****** Compressed Textures ******/ -/**********************************************************************/ - - -/** - * Return expected size of a compressed texture. - */ -static GLuint -compressed_tex_size(GLsizei width, GLsizei height, GLsizei depth, - GLenum glformat) -{ - gl_format mesaFormat = _mesa_glenum_to_compressed_format(glformat); - return _mesa_format_image_size(mesaFormat, width, height, depth); -} - - -/* - * Return compressed texture block size, in pixels. - */ -static void -get_compressed_block_size(GLenum glformat, GLuint *bw, GLuint *bh) -{ - gl_format mesaFormat = _mesa_glenum_to_compressed_format(glformat); - _mesa_get_format_block_size(mesaFormat, bw, bh); -} - - -/** - * Error checking for glCompressedTexImage[123]D(). - * \return error code or GL_NO_ERROR. - */ -static GLenum -compressed_texture_error_check(struct gl_context *ctx, GLint dimensions, - GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLsizei imageSize) -{ - const GLenum proxyTarget = get_proxy_target(target); - const GLint maxLevels = _mesa_max_texture_levels(ctx, target); - GLint expectedSize; - - /* check level */ - if (level < 0 || level >= maxLevels) - return GL_INVALID_VALUE; - - if (!target_can_be_compressed(ctx, target, internalFormat)) { - return GL_INVALID_ENUM; - } - - /* This will detect any invalid internalFormat value */ - if (!_mesa_is_compressed_format(ctx, internalFormat)) - return GL_INVALID_ENUM; - - /* This should really never fail */ - if (_mesa_base_tex_format(ctx, internalFormat) < 0) - return GL_INVALID_ENUM; - - /* No compressed formats support borders at this time */ - if (border != 0) - return GL_INVALID_VALUE; - - /* For cube map, width must equal height */ - if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB && width != height) - return GL_INVALID_VALUE; - - /* check image size against compression block size */ - { - gl_format texFormat = - ctx->Driver.ChooseTextureFormat(ctx, internalFormat, - GL_NONE, GL_NONE); - GLuint bw, bh; - - _mesa_get_format_block_size(texFormat, &bw, &bh); - if ((width > bw && width % bw > 0) || - (height > bh && height % bh > 0)) { - /* - * Per GL_ARB_texture_compression: GL_INVALID_OPERATION is - * generated [...] if any parameter combinations are not - * supported by the specific compressed internal format. - */ - return GL_INVALID_OPERATION; - } - } - - /* check image sizes */ - if (!ctx->Driver.TestProxyTexImage(ctx, proxyTarget, level, - internalFormat, GL_NONE, GL_NONE, - width, height, depth, border)) { - /* See error comment above */ - return GL_INVALID_OPERATION; - } - - /* check image size in bytes */ - expectedSize = compressed_tex_size(width, height, depth, internalFormat); - if (expectedSize != imageSize) { - /* Per GL_ARB_texture_compression: GL_INVALID_VALUE is generated [...] - * if <imageSize> is not consistent with the format, dimensions, and - * contents of the specified image. - */ - return GL_INVALID_VALUE; - } - - return GL_NO_ERROR; -} - - -/** - * Error checking for glCompressedTexSubImage[123]D(). - * \warning There are some bad assumptions here about the size of compressed - * texture tiles (multiple of 4) used to test the validity of the - * offset and size parameters. - * \return error code or GL_NO_ERROR. - */ -static GLenum -compressed_subtexture_error_check(struct gl_context *ctx, GLint dimensions, - GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLsizei imageSize) -{ - GLint expectedSize, maxLevels = 0, maxTextureSize; - GLuint bw, bh; - (void) zoffset; - - if (dimensions == 1) { - /* 1D compressed textures not allowed */ - return GL_INVALID_ENUM; - } - else if (dimensions == 2) { - if (target == GL_PROXY_TEXTURE_2D) { - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (target == GL_TEXTURE_2D) { - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (target == GL_PROXY_TEXTURE_CUBE_MAP_ARB) { - if (!ctx->Extensions.ARB_texture_cube_map) - return GL_INVALID_ENUM; /*target*/ - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB && - target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) { - if (!ctx->Extensions.ARB_texture_cube_map) - return GL_INVALID_ENUM; /*target*/ - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else { - return GL_INVALID_ENUM; /*target*/ - } - } - else if (dimensions == 3) { - /* 3D compressed textures not allowed */ - return GL_INVALID_ENUM; - } - - maxTextureSize = 1 << (maxLevels - 1); - - /* this will catch any invalid compressed format token */ - if (!_mesa_is_compressed_format(ctx, format)) - return GL_INVALID_ENUM; - - if (width < 1 || width > maxTextureSize) - return GL_INVALID_VALUE; - - if ((height < 1 || height > maxTextureSize) - && dimensions > 1) - return GL_INVALID_VALUE; - - if (level < 0 || level >= maxLevels) - return GL_INVALID_VALUE; - - /* - * do checks which depend on compression block size - */ - get_compressed_block_size(format, &bw, &bh); - - if ((xoffset % bw != 0) || (yoffset % bh != 0)) - return GL_INVALID_VALUE; - - if ((width % bw != 0) && width != 2 && width != 1) - return GL_INVALID_VALUE; - - if ((height % bh != 0) && height != 2 && height != 1) - return GL_INVALID_VALUE; - - expectedSize = compressed_tex_size(width, height, depth, format); - if (expectedSize != imageSize) - return GL_INVALID_VALUE; - - return GL_NO_ERROR; -} - - -/** - * Do second part of glCompressedTexSubImage error checking. - * \return GL_TRUE if error found, GL_FALSE otherwise. - */ -static GLboolean -compressed_subtexture_error_check2(struct gl_context *ctx, GLuint dims, - GLsizei width, GLsizei height, - GLsizei depth, GLenum format, - struct gl_texture_image *texImage) -{ - - if ((GLint) format != texImage->InternalFormat) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glCompressedTexSubImage%uD(format=0x%x)", dims, format); - return GL_TRUE; - } - - if (((width == 1 || width == 2) && - width != (GLsizei) texImage->Width) || - (width > (GLsizei) texImage->Width)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCompressedTexSubImage%uD(width=%d)", dims, width); - return GL_TRUE; - } - - if (dims >= 2) { - if (((height == 1 || height == 2) && - height != (GLsizei) texImage->Height) || - (height > (GLsizei) texImage->Height)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCompressedTexSubImage%uD(height=%d)", dims, height); - return GL_TRUE; - } - } - - if (dims >= 3) { - if (((depth == 1 || depth == 2) && - depth != (GLsizei) texImage->Depth) || - (depth > (GLsizei) texImage->Depth)) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glCompressedTexSubImage%uD(depth=%d)", dims, depth); - return GL_TRUE; - } - } - - return GL_FALSE; -} - - -/** - * Implementation of the glCompressedTexImage1/2/3D() functions. - */ -static void -compressedteximage(struct gl_context *ctx, GLuint dims, - GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLsizei imageSize, const GLvoid *data) -{ - GLenum error; - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, - "glCompressedTexImage%uDARB %s %d %s %d %d %d %d %d %p\n", - dims, - _mesa_lookup_enum_by_nr(target), level, - _mesa_lookup_enum_by_nr(internalFormat), - width, height, depth, border, imageSize, data); - - /* check target */ - if (!legal_teximage_target(ctx, dims, target)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glCompressedTexImage%uD(target=%s)", - dims, _mesa_lookup_enum_by_nr(target)); - return; - } - - error = compressed_texture_error_check(ctx, dims, target, level, - internalFormat, width, height, depth, - border, imageSize); - -#if FEATURE_ES - /* XXX this is kind of a hack */ - if (error) { - _mesa_error(ctx, error, "glTexImage2D"); - return; - } - - if (dims == 2) { - switch (internalFormat) { - case GL_PALETTE4_RGB8_OES: - case GL_PALETTE4_RGBA8_OES: - case GL_PALETTE4_R5_G6_B5_OES: - case GL_PALETTE4_RGBA4_OES: - case GL_PALETTE4_RGB5_A1_OES: - case GL_PALETTE8_RGB8_OES: - case GL_PALETTE8_RGBA8_OES: - case GL_PALETTE8_R5_G6_B5_OES: - case GL_PALETTE8_RGBA4_OES: - case GL_PALETTE8_RGB5_A1_OES: - _mesa_cpal_compressed_teximage2d(target, level, internalFormat, - width, height, imageSize, data); - return; - } - } -#endif - - if (_mesa_is_proxy_texture(target)) { - /* Proxy texture: just check for errors and update proxy state */ - struct gl_texture_image *texImage; - - if (!error) { - struct gl_texture_object *texObj = - _mesa_get_current_tex_object(ctx, target); - gl_format texFormat = - _mesa_choose_texture_format(ctx, texObj, target, level, - internalFormat, GL_NONE, GL_NONE); - if (!legal_texture_size(ctx, texFormat, width, height, depth)) { - error = GL_OUT_OF_MEMORY; - } - } - - texImage = _mesa_get_proxy_tex_image(ctx, target, level); - if (texImage) { - if (error) { - /* if error, clear all proxy texture image parameters */ - clear_teximage_fields(texImage); - } - else { - /* no error: store the teximage parameters */ - _mesa_init_teximage_fields(ctx, target, texImage, width, height, - depth, border, internalFormat, - MESA_FORMAT_NONE); - } - } - } - else { - /* non-proxy target */ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - - if (error) { - _mesa_error(ctx, error, "glCompressedTexImage%uD", dims); - return; - } - - texObj = _mesa_get_current_tex_object(ctx, target); - - _mesa_lock_texture(ctx, texObj); - { - texImage = _mesa_get_tex_image(ctx, texObj, target, level); - if (!texImage) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, - "glCompressedTexImage%uD", dims); - } - else { - gl_format texFormat; - - if (texImage->Data) { - ctx->Driver.FreeTexImageData( ctx, texImage ); - } - ASSERT(texImage->Data == NULL); - - texFormat = _mesa_choose_texture_format(ctx, texObj, target, level, - internalFormat, GL_NONE, - GL_NONE); - - if (legal_texture_size(ctx, texFormat, width, height, depth)) { - _mesa_init_teximage_fields(ctx, target, texImage, - width, height, depth, - border, internalFormat, texFormat); - - switch (dims) { - case 1: - ASSERT(ctx->Driver.CompressedTexImage1D); - ctx->Driver.CompressedTexImage1D(ctx, target, level, - internalFormat, - width, - border, imageSize, data, - texObj, texImage); - break; - case 2: - ASSERT(ctx->Driver.CompressedTexImage2D); - ctx->Driver.CompressedTexImage2D(ctx, target, level, - internalFormat, - width, height, - border, imageSize, data, - texObj, texImage); - break; - case 3: - ASSERT(ctx->Driver.CompressedTexImage3D); - ctx->Driver.CompressedTexImage3D(ctx, target, level, - internalFormat, - width, height, depth, - border, imageSize, data, - texObj, texImage); - break; - default: - _mesa_problem(ctx, "bad dims in compressedteximage"); - } - - check_gen_mipmap(ctx, target, texObj, level); - - /* state update */ - texObj->_Complete = GL_FALSE; - ctx->NewState |= _NEW_TEXTURE; - } - else { - _mesa_error(ctx, GL_OUT_OF_MEMORY, - "glCompressedTexImage%uD", dims); - } - } - } - _mesa_unlock_texture(ctx, texObj); - } -} - - -void GLAPIENTRY -_mesa_CompressedTexImage1DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLint border, GLsizei imageSize, - const GLvoid *data) -{ - GET_CURRENT_CONTEXT(ctx); - compressedteximage(ctx, 1, target, level, internalFormat, - width, 1, 1, border, imageSize, data); -} - - -void GLAPIENTRY -_mesa_CompressedTexImage2DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLint border, GLsizei imageSize, - const GLvoid *data) -{ - GET_CURRENT_CONTEXT(ctx); - compressedteximage(ctx, 2, target, level, internalFormat, - width, height, 1, border, imageSize, data); -} - - -void GLAPIENTRY -_mesa_CompressedTexImage3DARB(GLenum target, GLint level, - GLenum internalFormat, GLsizei width, - GLsizei height, GLsizei depth, GLint border, - GLsizei imageSize, const GLvoid *data) -{ - GET_CURRENT_CONTEXT(ctx); - compressedteximage(ctx, 3, target, level, internalFormat, - width, height, depth, border, imageSize, data); -} - - -/** - * Common helper for glCompressedTexSubImage1/2/3D(). - */ -static void -compressed_tex_sub_image(GLuint dims, GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, GLsizei imageSize, const GLvoid *data) -{ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GLenum error; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - error = compressed_subtexture_error_check(ctx, dims, target, level, - xoffset, 0, 0, /* pos */ - width, height, depth, /* size */ - format, imageSize); - if (error) { - _mesa_error(ctx, error, "glCompressedTexSubImage%uD", dims); - return; - } - - texObj = _mesa_get_current_tex_object(ctx, target); - - _mesa_lock_texture(ctx, texObj); - { - texImage = _mesa_select_tex_image(ctx, texObj, target, level); - assert(texImage); - - if (compressed_subtexture_error_check2(ctx, dims, width, height, depth, - format, texImage)) { - /* error was recorded */ - } - else if (width > 0 && height > 0 && depth > 0) { - switch (dims) { - case 1: - if (ctx->Driver.CompressedTexSubImage1D) { - ctx->Driver.CompressedTexSubImage1D(ctx, target, level, - xoffset, width, - format, imageSize, data, - texObj, texImage); - } - break; - case 2: - if (ctx->Driver.CompressedTexSubImage2D) { - ctx->Driver.CompressedTexSubImage2D(ctx, target, level, - xoffset, yoffset, - width, height, - format, imageSize, data, - texObj, texImage); - } - break; - case 3: - if (ctx->Driver.CompressedTexSubImage3D) { - ctx->Driver.CompressedTexSubImage3D(ctx, target, level, - xoffset, yoffset, zoffset, - width, height, depth, - format, imageSize, data, - texObj, texImage); - } - break; - default: - ; - } - - check_gen_mipmap(ctx, target, texObj, level); - - ctx->NewState |= _NEW_TEXTURE; - } - } - _mesa_unlock_texture(ctx, texObj); -} - - -void GLAPIENTRY -_mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, - GLsizei width, GLenum format, - GLsizei imageSize, const GLvoid *data) -{ - compressed_tex_sub_image(1, target, level, xoffset, 0, 0, width, 1, 1, - format, imageSize, data); -} - - -void GLAPIENTRY -_mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLsizei width, GLsizei height, - GLenum format, GLsizei imageSize, - const GLvoid *data) -{ - compressed_tex_sub_image(2, target, level, xoffset, yoffset, 0, - width, height, 1, format, imageSize, data); -} - - -void GLAPIENTRY -_mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, - GLint yoffset, GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, GLenum format, - GLsizei imageSize, const GLvoid *data) -{ - compressed_tex_sub_image(3, target, level, xoffset, yoffset, zoffset, - width, height, depth, format, imageSize, data); -} +/*
+ * mesa 3-D graphics library
+ * Version: 7.6
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
+ *
+ * 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
+ * BRIAN PAUL 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.
+ */
+
+
+/**
+ * \file teximage.c
+ * Texture image-related functions.
+ */
+
+
+#include "glheader.h"
+#include "bufferobj.h"
+#include "context.h"
+#include "enums.h"
+#include "fbobject.h"
+#include "framebuffer.h"
+#include "hash.h"
+#include "image.h"
+#include "imports.h"
+#include "macros.h"
+#include "mfeatures.h"
+#include "state.h"
+#include "texcompress.h"
+#include "texfetch.h"
+#include "teximage.h"
+#include "texstate.h"
+#include "texpal.h"
+#include "mtypes.h"
+
+
+/**
+ * State changes which we care about for glCopyTex[Sub]Image() calls.
+ * In particular, we care about pixel transfer state and buffer state
+ * (such as glReadBuffer to make sure we read from the right renderbuffer).
+ */
+#define NEW_COPY_TEX_STATE (_NEW_BUFFERS | _NEW_PIXEL)
+
+
+
+/**
+ * We allocate texture memory on 512-byte boundaries so we can use MMX/SSE
+ * elsewhere.
+ */
+void *
+_mesa_alloc_texmemory(GLsizei bytes)
+{
+ return _mesa_align_malloc(bytes, 512);
+}
+
+
+/**
+ * Free texture memory allocated with _mesa_alloc_texmemory()
+ */
+void
+_mesa_free_texmemory(void *m)
+{
+ _mesa_align_free(m);
+}
+
+
+/*
+ * Compute floor(log_base_2(n)).
+ * If n < 0 return -1.
+ */
+static int
+logbase2( int n )
+{
+ GLint i = 1;
+ GLint log2 = 0;
+
+ if (n < 0)
+ return -1;
+
+ if (n == 0)
+ return 0;
+
+ while ( n > i ) {
+ i *= 2;
+ log2++;
+ }
+ if (i != n) {
+ return log2 - 1;
+ }
+ else {
+ return log2;
+ }
+}
+
+
+
+/**
+ * Return the simple base format for a given internal texture format.
+ * For example, given GL_LUMINANCE12_ALPHA4, return GL_LUMINANCE_ALPHA.
+ *
+ * \param ctx GL context.
+ * \param internalFormat the internal texture format token or 1, 2, 3, or 4.
+ *
+ * \return the corresponding \u base internal format (GL_ALPHA, GL_LUMINANCE,
+ * GL_LUMANCE_ALPHA, GL_INTENSITY, GL_RGB, or GL_RGBA), or -1 if invalid enum.
+ *
+ * This is the format which is used during texture application (i.e. the
+ * texture format and env mode determine the arithmetic used.
+ *
+ * XXX this could be static
+ */
+GLint
+_mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
+{
+ switch (internalFormat) {
+ case GL_ALPHA:
+ case GL_ALPHA4:
+ case GL_ALPHA8:
+ case GL_ALPHA12:
+ case GL_ALPHA16:
+ return GL_ALPHA;
+ case 1:
+ case GL_LUMINANCE:
+ case GL_LUMINANCE4:
+ case GL_LUMINANCE8:
+ case GL_LUMINANCE12:
+ case GL_LUMINANCE16:
+ return GL_LUMINANCE;
+ case 2:
+ case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE4_ALPHA4:
+ case GL_LUMINANCE6_ALPHA2:
+ case GL_LUMINANCE8_ALPHA8:
+ case GL_LUMINANCE12_ALPHA4:
+ case GL_LUMINANCE12_ALPHA12:
+ case GL_LUMINANCE16_ALPHA16:
+ return GL_LUMINANCE_ALPHA;
+ case GL_INTENSITY:
+ case GL_INTENSITY4:
+ case GL_INTENSITY8:
+ case GL_INTENSITY12:
+ case GL_INTENSITY16:
+ return GL_INTENSITY;
+ case 3:
+ case GL_RGB:
+ case GL_R3_G3_B2:
+ case GL_RGB4:
+ case GL_RGB5:
+ case GL_RGB8:
+ case GL_RGB10:
+ case GL_RGB12:
+ case GL_RGB16:
+ return GL_RGB;
+ case 4:
+ case GL_RGBA:
+ case GL_RGBA2:
+ case GL_RGBA4:
+ case GL_RGB5_A1:
+ case GL_RGBA8:
+ case GL_RGB10_A2:
+ case GL_RGBA12:
+ case GL_RGBA16:
+ return GL_RGBA;
+ default:
+ ; /* fallthrough */
+ }
+
+ if (ctx->Extensions.EXT_texture_format_BGRA8888) {
+ switch (internalFormat) {
+ case GL_BGRA_EXT:
+ return GL_RGBA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.EXT_paletted_texture) {
+ switch (internalFormat) {
+ case GL_COLOR_INDEX:
+ case GL_COLOR_INDEX1_EXT:
+ case GL_COLOR_INDEX2_EXT:
+ case GL_COLOR_INDEX4_EXT:
+ case GL_COLOR_INDEX8_EXT:
+ case GL_COLOR_INDEX12_EXT:
+ case GL_COLOR_INDEX16_EXT:
+ return GL_COLOR_INDEX;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.ARB_depth_texture) {
+ switch (internalFormat) {
+ case GL_DEPTH_COMPONENT:
+ case GL_DEPTH_COMPONENT16:
+ case GL_DEPTH_COMPONENT24:
+ case GL_DEPTH_COMPONENT32:
+ return GL_DEPTH_COMPONENT;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ switch (internalFormat) {
+ case GL_COMPRESSED_ALPHA:
+ return GL_ALPHA;
+ case GL_COMPRESSED_LUMINANCE:
+ return GL_LUMINANCE;
+ case GL_COMPRESSED_LUMINANCE_ALPHA:
+ return GL_LUMINANCE_ALPHA;
+ case GL_COMPRESSED_INTENSITY:
+ return GL_INTENSITY;
+ case GL_COMPRESSED_RGB:
+ return GL_RGB;
+ case GL_COMPRESSED_RGBA:
+ return GL_RGBA;
+ default:
+ ; /* fallthrough */
+ }
+
+ if (ctx->Extensions.TDFX_texture_compression_FXT1) {
+ switch (internalFormat) {
+ case GL_COMPRESSED_RGB_FXT1_3DFX:
+ return GL_RGB;
+ case GL_COMPRESSED_RGBA_FXT1_3DFX:
+ return GL_RGBA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.EXT_texture_compression_s3tc) {
+ switch (internalFormat) {
+ case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
+ return GL_RGB;
+ case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
+ case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
+ case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
+ return GL_RGBA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.S3_s3tc) {
+ switch (internalFormat) {
+ case GL_RGB_S3TC:
+ case GL_RGB4_S3TC:
+ return GL_RGB;
+ case GL_RGBA_S3TC:
+ case GL_RGBA4_S3TC:
+ return GL_RGBA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.MESA_ycbcr_texture) {
+ if (internalFormat == GL_YCBCR_MESA)
+ return GL_YCBCR_MESA;
+ }
+
+ if (ctx->Extensions.ARB_texture_float) {
+ switch (internalFormat) {
+ case GL_ALPHA16F_ARB:
+ case GL_ALPHA32F_ARB:
+ return GL_ALPHA;
+ case GL_RGBA16F_ARB:
+ case GL_RGBA32F_ARB:
+ return GL_RGBA;
+ case GL_RGB16F_ARB:
+ case GL_RGB32F_ARB:
+ return GL_RGB;
+ case GL_INTENSITY16F_ARB:
+ case GL_INTENSITY32F_ARB:
+ return GL_INTENSITY;
+ case GL_LUMINANCE16F_ARB:
+ case GL_LUMINANCE32F_ARB:
+ return GL_LUMINANCE;
+ case GL_LUMINANCE_ALPHA16F_ARB:
+ case GL_LUMINANCE_ALPHA32F_ARB:
+ return GL_LUMINANCE_ALPHA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.ATI_envmap_bumpmap) {
+ switch (internalFormat) {
+ case GL_DUDV_ATI:
+ case GL_DU8DV8_ATI:
+ return GL_DUDV_ATI;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.EXT_texture_snorm) {
+ switch (internalFormat) {
+ case GL_RED_SNORM:
+ case GL_R8_SNORM:
+ case GL_R16_SNORM:
+ return GL_RED;
+ case GL_RG_SNORM:
+ case GL_RG8_SNORM:
+ case GL_RG16_SNORM:
+ return GL_RG;
+ case GL_RGB_SNORM:
+ case GL_RGB8_SNORM:
+ case GL_RGB16_SNORM:
+ return GL_RGB;
+ case GL_RGBA_SNORM:
+ case GL_RGBA8_SNORM:
+ case GL_RGBA16_SNORM:
+ return GL_RGBA;
+ case GL_ALPHA_SNORM:
+ case GL_ALPHA8_SNORM:
+ case GL_ALPHA16_SNORM:
+ return GL_ALPHA;
+ case GL_LUMINANCE_SNORM:
+ case GL_LUMINANCE8_SNORM:
+ case GL_LUMINANCE16_SNORM:
+ return GL_LUMINANCE;
+ case GL_LUMINANCE_ALPHA_SNORM:
+ case GL_LUMINANCE8_ALPHA8_SNORM:
+ case GL_LUMINANCE16_ALPHA16_SNORM:
+ return GL_LUMINANCE_ALPHA;
+ case GL_INTENSITY_SNORM:
+ case GL_INTENSITY8_SNORM:
+ case GL_INTENSITY16_SNORM:
+ return GL_INTENSITY;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.EXT_packed_depth_stencil) {
+ switch (internalFormat) {
+ case GL_DEPTH_STENCIL_EXT:
+ case GL_DEPTH24_STENCIL8_EXT:
+ return GL_DEPTH_STENCIL_EXT;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+#if FEATURE_EXT_texture_sRGB
+ if (ctx->Extensions.EXT_texture_sRGB) {
+ switch (internalFormat) {
+ case GL_SRGB_EXT:
+ case GL_SRGB8_EXT:
+ case GL_COMPRESSED_SRGB_EXT:
+ case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
+ return GL_RGB;
+ case GL_SRGB_ALPHA_EXT:
+ case GL_SRGB8_ALPHA8_EXT:
+ case GL_COMPRESSED_SRGB_ALPHA_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 GL_RGBA;
+ case GL_SLUMINANCE_ALPHA_EXT:
+ case GL_SLUMINANCE8_ALPHA8_EXT:
+ case GL_COMPRESSED_SLUMINANCE_ALPHA_EXT:
+ return GL_LUMINANCE_ALPHA;
+ case GL_SLUMINANCE_EXT:
+ case GL_SLUMINANCE8_EXT:
+ case GL_COMPRESSED_SLUMINANCE_EXT:
+ return GL_LUMINANCE;
+ default:
+ ; /* fallthrough */
+ }
+ }
+#endif /* FEATURE_EXT_texture_sRGB */
+
+ if (ctx->Extensions.EXT_texture_integer) {
+ switch (internalFormat) {
+ case GL_RGBA8UI_EXT:
+ case GL_RGBA16UI_EXT:
+ case GL_RGBA32UI_EXT:
+ case GL_RGBA8I_EXT:
+ case GL_RGBA16I_EXT:
+ case GL_RGBA32I_EXT:
+ return GL_RGBA;
+ case GL_RGB8UI_EXT:
+ case GL_RGB16UI_EXT:
+ case GL_RGB32UI_EXT:
+ case GL_RGB8I_EXT:
+ case GL_RGB16I_EXT:
+ case GL_RGB32I_EXT:
+ return GL_RGB;
+ case GL_ALPHA8UI_EXT:
+ case GL_ALPHA16UI_EXT:
+ case GL_ALPHA32UI_EXT:
+ case GL_ALPHA8I_EXT:
+ case GL_ALPHA16I_EXT:
+ case GL_ALPHA32I_EXT:
+ return GL_ALPHA;
+ case GL_INTENSITY8UI_EXT:
+ case GL_INTENSITY16UI_EXT:
+ case GL_INTENSITY32UI_EXT:
+ case GL_INTENSITY8I_EXT:
+ case GL_INTENSITY16I_EXT:
+ case GL_INTENSITY32I_EXT:
+ return GL_INTENSITY;
+ case GL_LUMINANCE8UI_EXT:
+ case GL_LUMINANCE16UI_EXT:
+ case GL_LUMINANCE32UI_EXT:
+ case GL_LUMINANCE8I_EXT:
+ case GL_LUMINANCE16I_EXT:
+ case GL_LUMINANCE32I_EXT:
+ return GL_LUMINANCE;
+ case GL_LUMINANCE_ALPHA8UI_EXT:
+ case GL_LUMINANCE_ALPHA16UI_EXT:
+ case GL_LUMINANCE_ALPHA32UI_EXT:
+ case GL_LUMINANCE_ALPHA8I_EXT:
+ case GL_LUMINANCE_ALPHA16I_EXT:
+ case GL_LUMINANCE_ALPHA32I_EXT:
+ return GL_LUMINANCE_ALPHA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.ARB_texture_rg) {
+ switch (internalFormat) {
+ case GL_R16F:
+ /* R16F depends on both ARB_half_float_pixel and ARB_texture_float.
+ */
+ if (!ctx->Extensions.ARB_half_float_pixel)
+ break;
+ /* FALLTHROUGH */
+ case GL_R32F:
+ if (!ctx->Extensions.ARB_texture_float)
+ break;
+ return GL_RED;
+ case GL_R8I:
+ case GL_R8UI:
+ case GL_R16I:
+ case GL_R16UI:
+ case GL_R32I:
+ case GL_R32UI:
+ if (!ctx->Extensions.EXT_texture_integer)
+ break;
+ /* FALLTHROUGH */
+ case GL_R8:
+ case GL_R16:
+ case GL_RED:
+ case GL_COMPRESSED_RED:
+ return GL_RED;
+
+ case GL_RG16F:
+ /* RG16F depends on both ARB_half_float_pixel and ARB_texture_float.
+ */
+ if (!ctx->Extensions.ARB_half_float_pixel)
+ break;
+ /* FALLTHROUGH */
+ case GL_RG32F:
+ if (!ctx->Extensions.ARB_texture_float)
+ break;
+ return GL_RG;
+ case GL_RG8I:
+ case GL_RG8UI:
+ case GL_RG16I:
+ case GL_RG16UI:
+ case GL_RG32I:
+ case GL_RG32UI:
+ if (!ctx->Extensions.EXT_texture_integer)
+ break;
+ /* FALLTHROUGH */
+ case GL_RG:
+ case GL_RG8:
+ case GL_RG16:
+ case GL_COMPRESSED_RG:
+ return GL_RG;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.EXT_texture_shared_exponent) {
+ switch (internalFormat) {
+ case GL_RGB9_E5_EXT:
+ return GL_RGB;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.EXT_packed_float) {
+ switch (internalFormat) {
+ case GL_R11F_G11F_B10F_EXT:
+ return GL_RGB;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.ARB_depth_buffer_float) {
+ switch (internalFormat) {
+ case GL_DEPTH_COMPONENT32F:
+ return GL_DEPTH_COMPONENT;
+ case GL_DEPTH32F_STENCIL8:
+ return GL_DEPTH_STENCIL;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.ARB_texture_compression_rgtc) {
+ switch (internalFormat) {
+ case GL_COMPRESSED_RED_RGTC1:
+ case GL_COMPRESSED_SIGNED_RED_RGTC1:
+ return GL_RED;
+ case GL_COMPRESSED_RG_RGTC2:
+ case GL_COMPRESSED_SIGNED_RG_RGTC2:
+ return GL_RG;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.EXT_texture_compression_latc) {
+ switch (internalFormat) {
+ case GL_COMPRESSED_LUMINANCE_LATC1_EXT:
+ case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT:
+ return GL_LUMINANCE;
+ case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT:
+ case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT:
+ return GL_LUMINANCE_ALPHA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ if (ctx->Extensions.ATI_texture_compression_3dc) {
+ switch (internalFormat) {
+ case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI:
+ return GL_LUMINANCE_ALPHA;
+ default:
+ ; /* fallthrough */
+ }
+ }
+
+ return -1; /* error */
+}
+
+
+/**
+ * For cube map faces, return a face index in [0,5].
+ * For other targets return 0;
+ */
+GLuint
+_mesa_tex_target_to_face(GLenum target)
+{
+ if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB &&
+ target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB)
+ return (GLuint) target - (GLuint) GL_TEXTURE_CUBE_MAP_POSITIVE_X;
+ else
+ return 0;
+}
+
+
+
+/**
+ * Store a gl_texture_image pointer in a gl_texture_object structure
+ * according to the target and level parameters.
+ *
+ * \param tObj texture object.
+ * \param target texture target.
+ * \param level image level.
+ * \param texImage texture image.
+ *
+ * This was basically prompted by the introduction of cube maps.
+ */
+void
+_mesa_set_tex_image(struct gl_texture_object *tObj,
+ GLenum target, GLint level,
+ struct gl_texture_image *texImage)
+{
+ const GLuint face = _mesa_tex_target_to_face(target);
+
+ ASSERT(tObj);
+ ASSERT(texImage);
+ ASSERT(target != GL_TEXTURE_RECTANGLE_NV || level == 0);
+
+ tObj->Image[face][level] = texImage;
+
+ /* Set the 'back' pointer */
+ texImage->TexObject = tObj;
+}
+
+
+/**
+ * Allocate a texture image structure.
+ *
+ * Called via ctx->Driver.NewTextureImage() unless overriden by a device
+ * driver.
+ *
+ * \return a pointer to gl_texture_image struct with all fields initialized to
+ * zero.
+ */
+struct gl_texture_image *
+_mesa_new_texture_image( struct gl_context *ctx )
+{
+ (void) ctx;
+ return CALLOC_STRUCT(gl_texture_image);
+}
+
+
+/**
+ * Free texture image data.
+ * This function is a fallback called via ctx->Driver.FreeTexImageData().
+ *
+ * \param texImage texture image.
+ *
+ * Free the texture image data if it's not marked as client data.
+ */
+void
+_mesa_free_texture_image_data(struct gl_context *ctx,
+ struct gl_texture_image *texImage)
+{
+ (void) ctx;
+
+ if (texImage->Data && !texImage->IsClientData) {
+ /* free the old texture data */
+ _mesa_free_texmemory(texImage->Data);
+ }
+
+ texImage->Data = NULL;
+}
+
+
+/**
+ * Free texture image.
+ *
+ * \param texImage texture image.
+ *
+ * Free the texture image structure and the associated image data.
+ */
+void
+_mesa_delete_texture_image(struct gl_context *ctx,
+ struct gl_texture_image *texImage)
+{
+ /* Free texImage->Data and/or any other driver-specific texture
+ * image storage.
+ */
+ ASSERT(ctx->Driver.FreeTexImageData);
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+
+ ASSERT(texImage->Data == NULL);
+ if (texImage->ImageOffsets)
+ free(texImage->ImageOffsets);
+ free(texImage);
+}
+
+
+/**
+ * Test if a target is a proxy target.
+ *
+ * \param target texture target.
+ *
+ * \return GL_TRUE if the target is a proxy target, GL_FALSE otherwise.
+ */
+GLboolean
+_mesa_is_proxy_texture(GLenum target)
+{
+ /* NUM_TEXTURE_TARGETS should match number of terms below,
+ * except there's no proxy for GL_TEXTURE_BUFFER.
+ */
+ assert(NUM_TEXTURE_TARGETS == 8);
+
+ return (target == GL_PROXY_TEXTURE_1D ||
+ target == GL_PROXY_TEXTURE_2D ||
+ target == GL_PROXY_TEXTURE_3D ||
+ target == GL_PROXY_TEXTURE_CUBE_MAP_ARB ||
+ target == GL_PROXY_TEXTURE_RECTANGLE_NV ||
+ target == GL_PROXY_TEXTURE_1D_ARRAY_EXT ||
+ target == GL_PROXY_TEXTURE_2D_ARRAY_EXT);
+}
+
+
+/**
+ * Return the proxy target which corresponds to the given texture target
+ */
+static GLenum
+get_proxy_target(GLenum target)
+{
+ switch (target) {
+ case GL_TEXTURE_1D:
+ case GL_PROXY_TEXTURE_1D:
+ return GL_PROXY_TEXTURE_1D;
+ case GL_TEXTURE_2D:
+ case GL_PROXY_TEXTURE_2D:
+ return GL_PROXY_TEXTURE_2D;
+ case GL_TEXTURE_3D:
+ case GL_PROXY_TEXTURE_3D:
+ return GL_PROXY_TEXTURE_3D;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
+ return GL_PROXY_TEXTURE_CUBE_MAP_ARB;
+ case GL_TEXTURE_RECTANGLE_NV:
+ case GL_PROXY_TEXTURE_RECTANGLE_NV:
+ return GL_PROXY_TEXTURE_RECTANGLE_NV;
+ case GL_TEXTURE_1D_ARRAY_EXT:
+ case GL_PROXY_TEXTURE_1D_ARRAY_EXT:
+ return GL_PROXY_TEXTURE_1D_ARRAY_EXT;
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
+ return GL_PROXY_TEXTURE_2D_ARRAY_EXT;
+ default:
+ _mesa_problem(NULL, "unexpected target in get_proxy_target()");
+ return 0;
+ }
+}
+
+
+/**
+ * Get the texture object that corresponds to the target of the given
+ * texture unit.
+ *
+ * \param ctx GL context.
+ * \param texUnit texture unit.
+ * \param target texture target.
+ *
+ * \return pointer to the texture object on success, or NULL on failure.
+ *
+ * \sa gl_texture_unit.
+ */
+struct gl_texture_object *
+_mesa_select_tex_object(struct gl_context *ctx,
+ const struct gl_texture_unit *texUnit,
+ GLenum target)
+{
+ const GLboolean arrayTex = (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
+
+ switch (target) {
+ case GL_TEXTURE_1D:
+ return texUnit->CurrentTex[TEXTURE_1D_INDEX];
+ case GL_PROXY_TEXTURE_1D:
+ return ctx->Texture.ProxyTex[TEXTURE_1D_INDEX];
+ case GL_TEXTURE_2D:
+ return texUnit->CurrentTex[TEXTURE_2D_INDEX];
+ case GL_PROXY_TEXTURE_2D:
+ return ctx->Texture.ProxyTex[TEXTURE_2D_INDEX];
+ case GL_TEXTURE_3D:
+ return texUnit->CurrentTex[TEXTURE_3D_INDEX];
+ case GL_PROXY_TEXTURE_3D:
+ return ctx->Texture.ProxyTex[TEXTURE_3D_INDEX];
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ return ctx->Extensions.ARB_texture_cube_map
+ ? texUnit->CurrentTex[TEXTURE_CUBE_INDEX] : NULL;
+ case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
+ return ctx->Extensions.ARB_texture_cube_map
+ ? ctx->Texture.ProxyTex[TEXTURE_CUBE_INDEX] : NULL;
+ case GL_TEXTURE_RECTANGLE_NV:
+ return ctx->Extensions.NV_texture_rectangle
+ ? texUnit->CurrentTex[TEXTURE_RECT_INDEX] : NULL;
+ case GL_PROXY_TEXTURE_RECTANGLE_NV:
+ return ctx->Extensions.NV_texture_rectangle
+ ? ctx->Texture.ProxyTex[TEXTURE_RECT_INDEX] : NULL;
+ case GL_TEXTURE_1D_ARRAY_EXT:
+ return arrayTex ? texUnit->CurrentTex[TEXTURE_1D_ARRAY_INDEX] : NULL;
+ case GL_PROXY_TEXTURE_1D_ARRAY_EXT:
+ return arrayTex ? ctx->Texture.ProxyTex[TEXTURE_1D_ARRAY_INDEX] : NULL;
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ return arrayTex ? texUnit->CurrentTex[TEXTURE_2D_ARRAY_INDEX] : NULL;
+ case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
+ return arrayTex ? ctx->Texture.ProxyTex[TEXTURE_2D_ARRAY_INDEX] : NULL;
+ case GL_TEXTURE_BUFFER:
+ return ctx->Extensions.ARB_texture_buffer_object
+ ? texUnit->CurrentTex[TEXTURE_BUFFER_INDEX] : NULL;
+ default:
+ _mesa_problem(NULL, "bad target in _mesa_select_tex_object()");
+ return NULL;
+ }
+}
+
+
+/**
+ * Return pointer to texture object for given target on current texture unit.
+ */
+struct gl_texture_object *
+_mesa_get_current_tex_object(struct gl_context *ctx, GLenum target)
+{
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
+ return _mesa_select_tex_object(ctx, texUnit, target);
+}
+
+
+/**
+ * Get a texture image pointer from a texture object, given a texture
+ * target and mipmap level. The target and level parameters should
+ * have already been error-checked.
+ *
+ * \param ctx GL context.
+ * \param texObj texture unit.
+ * \param target texture target.
+ * \param level image level.
+ *
+ * \return pointer to the texture image structure, or NULL on failure.
+ */
+struct gl_texture_image *
+_mesa_select_tex_image(struct gl_context *ctx,
+ const struct gl_texture_object *texObj,
+ GLenum target, GLint level)
+{
+ const GLuint face = _mesa_tex_target_to_face(target);
+
+ ASSERT(texObj);
+ ASSERT(level >= 0);
+ ASSERT(level < MAX_TEXTURE_LEVELS);
+
+ return texObj->Image[face][level];
+}
+
+
+/**
+ * Like _mesa_select_tex_image() but if the image doesn't exist, allocate
+ * it and install it. Only return NULL if passed a bad parameter or run
+ * out of memory.
+ */
+struct gl_texture_image *
+_mesa_get_tex_image(struct gl_context *ctx, struct gl_texture_object *texObj,
+ GLenum target, GLint level)
+{
+ struct gl_texture_image *texImage;
+
+ if (!texObj)
+ return NULL;
+
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ if (!texImage) {
+ texImage = ctx->Driver.NewTextureImage(ctx);
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "texture image allocation");
+ return NULL;
+ }
+
+ _mesa_set_tex_image(texObj, target, level, texImage);
+ }
+
+ return texImage;
+}
+
+
+/**
+ * Return pointer to the specified proxy texture image.
+ * Note that proxy textures are per-context, not per-texture unit.
+ * \return pointer to texture image or NULL if invalid target, invalid
+ * level, or out of memory.
+ */
+struct gl_texture_image *
+_mesa_get_proxy_tex_image(struct gl_context *ctx, GLenum target, GLint level)
+{
+ struct gl_texture_image *texImage;
+ GLuint texIndex;
+
+ if (level < 0 )
+ return NULL;
+
+ switch (target) {
+ case GL_PROXY_TEXTURE_1D:
+ if (level >= ctx->Const.MaxTextureLevels)
+ return NULL;
+ texIndex = TEXTURE_1D_INDEX;
+ break;
+ case GL_PROXY_TEXTURE_2D:
+ if (level >= ctx->Const.MaxTextureLevels)
+ return NULL;
+ texIndex = TEXTURE_2D_INDEX;
+ break;
+ case GL_PROXY_TEXTURE_3D:
+ if (level >= ctx->Const.Max3DTextureLevels)
+ return NULL;
+ texIndex = TEXTURE_3D_INDEX;
+ break;
+ case GL_PROXY_TEXTURE_CUBE_MAP:
+ if (level >= ctx->Const.MaxCubeTextureLevels)
+ return NULL;
+ texIndex = TEXTURE_CUBE_INDEX;
+ break;
+ case GL_PROXY_TEXTURE_RECTANGLE_NV:
+ if (level > 0)
+ return NULL;
+ texIndex = TEXTURE_RECT_INDEX;
+ break;
+ case GL_PROXY_TEXTURE_1D_ARRAY_EXT:
+ if (level >= ctx->Const.MaxTextureLevels)
+ return NULL;
+ texIndex = TEXTURE_1D_ARRAY_INDEX;
+ break;
+ case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
+ if (level >= ctx->Const.MaxTextureLevels)
+ return NULL;
+ texIndex = TEXTURE_2D_ARRAY_INDEX;
+ break;
+ default:
+ return NULL;
+ }
+
+ texImage = ctx->Texture.ProxyTex[texIndex]->Image[0][level];
+ if (!texImage) {
+ texImage = ctx->Driver.NewTextureImage(ctx);
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "proxy texture allocation");
+ return NULL;
+ }
+ ctx->Texture.ProxyTex[texIndex]->Image[0][level] = texImage;
+ /* Set the 'back' pointer */
+ texImage->TexObject = ctx->Texture.ProxyTex[texIndex];
+ }
+ return texImage;
+}
+
+
+/**
+ * Get the maximum number of allowed mipmap levels.
+ *
+ * \param ctx GL context.
+ * \param target texture target.
+ *
+ * \return the maximum number of allowed mipmap levels for the given
+ * texture target, or zero if passed a bad target.
+ *
+ * \sa gl_constants.
+ */
+GLint
+_mesa_max_texture_levels(struct gl_context *ctx, GLenum target)
+{
+ switch (target) {
+ case GL_TEXTURE_1D:
+ case GL_PROXY_TEXTURE_1D:
+ case GL_TEXTURE_2D:
+ case GL_PROXY_TEXTURE_2D:
+ return ctx->Const.MaxTextureLevels;
+ case GL_TEXTURE_3D:
+ case GL_PROXY_TEXTURE_3D:
+ return ctx->Const.Max3DTextureLevels;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
+ return ctx->Extensions.ARB_texture_cube_map
+ ? ctx->Const.MaxCubeTextureLevels : 0;
+ case GL_TEXTURE_RECTANGLE_NV:
+ case GL_PROXY_TEXTURE_RECTANGLE_NV:
+ return ctx->Extensions.NV_texture_rectangle ? 1 : 0;
+ case GL_TEXTURE_1D_ARRAY_EXT:
+ case GL_PROXY_TEXTURE_1D_ARRAY_EXT:
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
+ return (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array)
+ ? ctx->Const.MaxTextureLevels : 0;
+ case GL_TEXTURE_BUFFER:
+ /* fall-through */
+ default:
+ return 0; /* bad target */
+ }
+}
+
+
+/**
+ * Return number of dimensions per mipmap level for the given texture target.
+ */
+GLint
+_mesa_get_texture_dimensions(GLenum target)
+{
+ switch (target) {
+ case GL_TEXTURE_1D:
+ case GL_PROXY_TEXTURE_1D:
+ return 1;
+ case GL_TEXTURE_2D:
+ case GL_TEXTURE_RECTANGLE:
+ case GL_TEXTURE_CUBE_MAP:
+ case GL_PROXY_TEXTURE_2D:
+ case GL_PROXY_TEXTURE_RECTANGLE:
+ case GL_PROXY_TEXTURE_CUBE_MAP:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
+ case GL_TEXTURE_1D_ARRAY:
+ case GL_PROXY_TEXTURE_1D_ARRAY:
+ return 2;
+ case GL_TEXTURE_3D:
+ case GL_PROXY_TEXTURE_3D:
+ case GL_TEXTURE_2D_ARRAY:
+ case GL_PROXY_TEXTURE_2D_ARRAY:
+ return 3;
+ case GL_TEXTURE_BUFFER:
+ /* fall-through */
+ default:
+ _mesa_problem(NULL, "invalid target 0x%x in get_texture_dimensions()",
+ target);
+ return 2;
+ }
+}
+
+
+
+
+#if 000 /* not used anymore */
+/*
+ * glTexImage[123]D can accept a NULL image pointer. In this case we
+ * create a texture image with unspecified image contents per the OpenGL
+ * spec.
+ */
+static GLubyte *
+make_null_texture(GLint width, GLint height, GLint depth, GLenum format)
+{
+ const GLint components = _mesa_components_in_format(format);
+ const GLint numPixels = width * height * depth;
+ GLubyte *data = (GLubyte *) MALLOC(numPixels * components * sizeof(GLubyte));
+
+#ifdef DEBUG
+ /*
+ * Let's see if anyone finds this. If glTexImage2D() is called with
+ * a NULL image pointer then load the texture image with something
+ * interesting instead of leaving it indeterminate.
+ */
+ if (data) {
+ static const char message[8][32] = {
+ " X X XXXXX XXX X ",
+ " XX XX X X X X X ",
+ " X X X X X X X ",
+ " X X XXXX XXX XXXXX ",
+ " X X X X X X ",
+ " X X X X X X X ",
+ " X X XXXXX XXX X X ",
+ " "
+ };
+
+ GLubyte *imgPtr = data;
+ GLint h, i, j, k;
+ for (h = 0; h < depth; h++) {
+ for (i = 0; i < height; i++) {
+ GLint srcRow = 7 - (i % 8);
+ for (j = 0; j < width; j++) {
+ GLint srcCol = j % 32;
+ GLubyte texel = (message[srcRow][srcCol]=='X') ? 255 : 70;
+ for (k = 0; k < components; k++) {
+ *imgPtr++ = texel;
+ }
+ }
+ }
+ }
+ }
+#endif
+
+ return data;
+}
+#endif
+
+
+
+/**
+ * Reset the fields of a gl_texture_image struct to zero.
+ *
+ * \param img texture image structure.
+ *
+ * This is called when a proxy texture test fails, we set all the
+ * image members (except DriverData) to zero.
+ * It's also used in glTexImage[123]D as a safeguard to be sure all
+ * required fields get initialized properly by the Driver.TexImage[123]D
+ * functions.
+ */
+static void
+clear_teximage_fields(struct gl_texture_image *img)
+{
+ ASSERT(img);
+ img->_BaseFormat = 0;
+ img->InternalFormat = 0;
+ img->Border = 0;
+ img->Width = 0;
+ img->Height = 0;
+ img->Depth = 0;
+ img->RowStride = 0;
+ if (img->ImageOffsets) {
+ free(img->ImageOffsets);
+ img->ImageOffsets = NULL;
+ }
+ img->Width2 = 0;
+ img->Height2 = 0;
+ img->Depth2 = 0;
+ img->WidthLog2 = 0;
+ img->HeightLog2 = 0;
+ img->DepthLog2 = 0;
+ img->Data = NULL;
+ img->TexFormat = MESA_FORMAT_NONE;
+ img->FetchTexelc = NULL;
+ img->FetchTexelf = NULL;
+}
+
+
+/**
+ * Initialize basic fields of the gl_texture_image struct.
+ *
+ * \param ctx GL context.
+ * \param target texture target (GL_TEXTURE_1D, GL_TEXTURE_RECTANGLE, etc).
+ * \param img texture image structure to be initialized.
+ * \param width image width.
+ * \param height image height.
+ * \param depth image depth.
+ * \param border image border.
+ * \param internalFormat internal format.
+ * \param format the actual hardware format (one of MESA_FORMAT_*)
+ *
+ * Fills in the fields of \p img with the given information.
+ * Note: width, height and depth include the border.
+ */
+void
+_mesa_init_teximage_fields(struct gl_context *ctx, GLenum target,
+ struct gl_texture_image *img,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLint border, GLenum internalFormat,
+ gl_format format)
+{
+ GLint i, dims;
+
+ ASSERT(img);
+ ASSERT(width >= 0);
+ ASSERT(height >= 0);
+ ASSERT(depth >= 0);
+
+ img->_BaseFormat = _mesa_base_tex_format( ctx, internalFormat );
+ ASSERT(img->_BaseFormat > 0);
+ img->InternalFormat = internalFormat;
+ img->Border = border;
+ img->Width = width;
+ img->Height = height;
+ img->Depth = depth;
+
+ img->Width2 = width - 2 * border; /* == 1 << img->WidthLog2; */
+ img->WidthLog2 = logbase2(img->Width2);
+
+ if (height == 1) { /* 1-D texture */
+ img->Height2 = 1;
+ img->HeightLog2 = 0;
+ }
+ else {
+ img->Height2 = height - 2 * border; /* == 1 << img->HeightLog2; */
+ img->HeightLog2 = logbase2(img->Height2);
+ }
+
+ if (depth == 1) { /* 2-D texture */
+ img->Depth2 = 1;
+ img->DepthLog2 = 0;
+ }
+ else {
+ img->Depth2 = depth - 2 * border; /* == 1 << img->DepthLog2; */
+ img->DepthLog2 = logbase2(img->Depth2);
+ }
+
+ img->MaxLog2 = MAX2(img->WidthLog2, img->HeightLog2);
+
+ if ((width == 1 || _mesa_is_pow_two(img->Width2)) &&
+ (height == 1 || _mesa_is_pow_two(img->Height2)) &&
+ (depth == 1 || _mesa_is_pow_two(img->Depth2)))
+ img->_IsPowerOfTwo = GL_TRUE;
+ else
+ img->_IsPowerOfTwo = GL_FALSE;
+
+ /* RowStride and ImageOffsets[] describe how to address texels in 'Data' */
+ img->RowStride = width;
+ /* Allocate the ImageOffsets array and initialize to typical values.
+ * We allocate the array for 1D/2D textures too in order to avoid special-
+ * case code in the texstore routines.
+ */
+ if (img->ImageOffsets)
+ free(img->ImageOffsets);
+ img->ImageOffsets = (GLuint *) malloc(depth * sizeof(GLuint));
+ for (i = 0; i < depth; i++) {
+ img->ImageOffsets[i] = i * width * height;
+ }
+
+ /* Compute Width/Height/DepthScale for mipmap lod computation */
+ if (target == GL_TEXTURE_RECTANGLE_NV) {
+ /* scale = 1.0 since texture coords directly map to texels */
+ img->WidthScale = 1.0;
+ img->HeightScale = 1.0;
+ img->DepthScale = 1.0;
+ }
+ else {
+ img->WidthScale = (GLfloat) img->Width;
+ img->HeightScale = (GLfloat) img->Height;
+ img->DepthScale = (GLfloat) img->Depth;
+ }
+
+ img->TexFormat = format;
+
+ dims = _mesa_get_texture_dimensions(target);
+
+ _mesa_set_fetch_functions(img, dims);
+}
+
+
+/**
+ * Free and clear fields of the gl_texture_image struct.
+ *
+ * \param ctx GL context.
+ * \param texImage texture image structure to be cleared.
+ *
+ * After the call, \p texImage will have no data associated with it. Its
+ * fields are cleared so that its parent object will test incomplete.
+ */
+void
+_mesa_clear_texture_image(struct gl_context *ctx,
+ struct gl_texture_image *texImage)
+{
+ ctx->Driver.FreeTexImageData(ctx, texImage);
+ clear_teximage_fields(texImage);
+}
+
+
+/**
+ * This is the fallback for Driver.TestProxyTexImage(). Test the texture
+ * level, width, height and depth against the ctx->Const limits for textures.
+ *
+ * A hardware driver might override this function if, for example, the
+ * max 3D texture size is 512x512x64 (i.e. not a cube).
+ *
+ * Note that width, height, depth == 0 is not an error. However, a
+ * texture with zero width/height/depth will be considered "incomplete"
+ * and texturing will effectively be disabled.
+ *
+ * \param target one of GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_2D,
+ * GL_PROXY_TEXTURE_3D, GL_PROXY_TEXTURE_RECTANGLE_NV,
+ * GL_PROXY_TEXTURE_CUBE_MAP_ARB.
+ * \param level as passed to glTexImage
+ * \param internalFormat as passed to glTexImage
+ * \param format as passed to glTexImage
+ * \param type as passed to glTexImage
+ * \param width as passed to glTexImage
+ * \param height as passed to glTexImage
+ * \param depth as passed to glTexImage
+ * \param border as passed to glTexImage
+ * \return GL_TRUE if the image is acceptable, GL_FALSE if not acceptable.
+ */
+GLboolean
+_mesa_test_proxy_teximage(struct gl_context *ctx, GLenum target, GLint level,
+ GLint internalFormat, GLenum format, GLenum type,
+ GLint width, GLint height, GLint depth, GLint border)
+{
+ GLint maxSize;
+
+ (void) internalFormat;
+ (void) format;
+ (void) type;
+
+ switch (target) {
+ case GL_PROXY_TEXTURE_1D:
+ maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
+ if (width < 2 * border || width > 2 + maxSize)
+ return GL_FALSE;
+ if (level >= ctx->Const.MaxTextureLevels)
+ return GL_FALSE;
+ if (!ctx->Extensions.ARB_texture_non_power_of_two) {
+ if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ return GL_FALSE;
+ }
+ return GL_TRUE;
+
+ case GL_PROXY_TEXTURE_2D:
+ maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
+ if (width < 2 * border || width > 2 + maxSize)
+ return GL_FALSE;
+ if (height < 2 * border || height > 2 + maxSize)
+ return GL_FALSE;
+ if (level >= ctx->Const.MaxTextureLevels)
+ return GL_FALSE;
+ if (!ctx->Extensions.ARB_texture_non_power_of_two) {
+ if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ return GL_FALSE;
+ if (height > 0 && !_mesa_is_pow_two(height - 2 * border))
+ return GL_FALSE;
+ }
+ return GL_TRUE;
+
+ case GL_PROXY_TEXTURE_3D:
+ maxSize = 1 << (ctx->Const.Max3DTextureLevels - 1);
+ if (width < 2 * border || width > 2 + maxSize)
+ return GL_FALSE;
+ if (height < 2 * border || height > 2 + maxSize)
+ return GL_FALSE;
+ if (depth < 2 * border || depth > 2 + maxSize)
+ return GL_FALSE;
+ if (level >= ctx->Const.Max3DTextureLevels)
+ return GL_FALSE;
+ if (!ctx->Extensions.ARB_texture_non_power_of_two) {
+ if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ return GL_FALSE;
+ if (height > 0 && !_mesa_is_pow_two(height - 2 * border))
+ return GL_FALSE;
+ if (depth > 0 && !_mesa_is_pow_two(depth - 2 * border))
+ return GL_FALSE;
+ }
+ return GL_TRUE;
+
+ case GL_PROXY_TEXTURE_RECTANGLE_NV:
+ maxSize = ctx->Const.MaxTextureRectSize;
+ if (width < 0 || width > maxSize)
+ return GL_FALSE;
+ if (height < 0 || height > maxSize)
+ return GL_FALSE;
+ if (level != 0)
+ return GL_FALSE;
+ return GL_TRUE;
+
+ case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
+ maxSize = 1 << (ctx->Const.MaxCubeTextureLevels - 1);
+ if (width < 2 * border || width > 2 + maxSize)
+ return GL_FALSE;
+ if (height < 2 * border || height > 2 + maxSize)
+ return GL_FALSE;
+ if (level >= ctx->Const.MaxCubeTextureLevels)
+ return GL_FALSE;
+ if (!ctx->Extensions.ARB_texture_non_power_of_two) {
+ if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ return GL_FALSE;
+ if (height > 0 && !_mesa_is_pow_two(height - 2 * border))
+ return GL_FALSE;
+ }
+ return GL_TRUE;
+
+ case GL_PROXY_TEXTURE_1D_ARRAY_EXT:
+ maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
+ if (width < 2 * border || width > 2 + maxSize)
+ return GL_FALSE;
+ if (height < 1 || height > ctx->Const.MaxArrayTextureLayers)
+ return GL_FALSE;
+ if (level >= ctx->Const.MaxTextureLevels)
+ return GL_FALSE;
+ if (!ctx->Extensions.ARB_texture_non_power_of_two) {
+ if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ return GL_FALSE;
+ }
+ return GL_TRUE;
+
+ case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
+ maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
+ if (width < 2 * border || width > 2 + maxSize)
+ return GL_FALSE;
+ if (height < 2 * border || height > 2 + maxSize)
+ return GL_FALSE;
+ if (depth < 1 || depth > ctx->Const.MaxArrayTextureLayers)
+ return GL_FALSE;
+ if (level >= ctx->Const.MaxTextureLevels)
+ return GL_FALSE;
+ if (!ctx->Extensions.ARB_texture_non_power_of_two) {
+ if (width > 0 && !_mesa_is_pow_two(width - 2 * border))
+ return GL_FALSE;
+ if (height > 0 && !_mesa_is_pow_two(height - 2 * border))
+ return GL_FALSE;
+ }
+ return GL_TRUE;
+
+ default:
+ _mesa_problem(ctx, "Invalid target in _mesa_test_proxy_teximage");
+ return GL_FALSE;
+ }
+}
+
+
+/**
+ * Check if the memory used by the texture would exceed the driver's limit.
+ * This lets us support a max 3D texture size of 8K (for example) but
+ * prevents allocating a full 8K x 8K x 8K texture.
+ * XXX this could be rolled into the proxy texture size test (above) but
+ * we don't have the actual texture internal format at that point.
+ */
+static GLboolean
+legal_texture_size(struct gl_context *ctx, gl_format format,
+ GLint width, GLint height, GLint depth)
+{
+ uint64_t bytes = _mesa_format_image_size64(format, width, height, depth);
+ uint64_t mbytes = bytes / (1024 * 1024); /* convert to MB */
+ return mbytes <= (uint64_t) ctx->Const.MaxTextureMbytes;
+}
+
+
+
+/**
+ * Helper function to determine whether a target and specific compression
+ * format are supported.
+ */
+static GLboolean
+target_can_be_compressed(const struct gl_context *ctx, GLenum target,
+ GLenum intFormat)
+{
+ (void) intFormat; /* not used yet */
+
+ switch (target) {
+ case GL_TEXTURE_2D:
+ case GL_PROXY_TEXTURE_2D:
+ return GL_TRUE; /* true for any compressed format so far */
+ case GL_PROXY_TEXTURE_CUBE_MAP:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
+ return ctx->Extensions.ARB_texture_cube_map;
+ case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ return (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+/**
+ * Check if the given texture target value is legal for a
+ * glTexImage1/2/3D call.
+ */
+static GLboolean
+legal_teximage_target(struct gl_context *ctx, GLuint dims, GLenum target)
+{
+ switch (dims) {
+ case 1:
+ switch (target) {
+ case GL_TEXTURE_1D:
+ case GL_PROXY_TEXTURE_1D:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+ case 2:
+ switch (target) {
+ case GL_TEXTURE_2D:
+ case GL_PROXY_TEXTURE_2D:
+ return GL_TRUE;
+ case GL_PROXY_TEXTURE_CUBE_MAP:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
+ return ctx->Extensions.ARB_texture_cube_map;
+ case GL_TEXTURE_RECTANGLE_NV:
+ case GL_PROXY_TEXTURE_RECTANGLE_NV:
+ return ctx->Extensions.NV_texture_rectangle;
+ case GL_TEXTURE_1D_ARRAY_EXT:
+ case GL_PROXY_TEXTURE_1D_ARRAY_EXT:
+ return (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
+ default:
+ return GL_FALSE;
+ }
+ case 3:
+ switch (target) {
+ case GL_TEXTURE_3D:
+ case GL_PROXY_TEXTURE_3D:
+ return GL_TRUE;
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ case GL_PROXY_TEXTURE_2D_ARRAY_EXT:
+ return (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
+ default:
+ return GL_FALSE;
+ }
+ default:
+ _mesa_problem(ctx, "invalid dims=%u in legal_teximage_target()", dims);
+ return GL_FALSE;
+ }
+}
+
+
+/**
+ * Check if the given texture target value is legal for a
+ * glTexSubImage, glCopyTexSubImage or glCopyTexImage call.
+ * The difference compared to legal_teximage_target() above is that
+ * proxy targets are not supported.
+ */
+static GLboolean
+legal_texsubimage_target(struct gl_context *ctx, GLuint dims, GLenum target)
+{
+ switch (dims) {
+ case 1:
+ return target == GL_TEXTURE_1D;
+ case 2:
+ switch (target) {
+ case GL_TEXTURE_2D:
+ return GL_TRUE;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z:
+ return ctx->Extensions.ARB_texture_cube_map;
+ case GL_TEXTURE_RECTANGLE_NV:
+ return ctx->Extensions.NV_texture_rectangle;
+ case GL_TEXTURE_1D_ARRAY_EXT:
+ return (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
+ default:
+ return GL_FALSE;
+ }
+ case 3:
+ switch (target) {
+ case GL_TEXTURE_3D:
+ return GL_TRUE;
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ return (ctx->Extensions.MESA_texture_array ||
+ ctx->Extensions.EXT_texture_array);
+ default:
+ return GL_FALSE;
+ }
+ default:
+ _mesa_problem(ctx, "invalid dims=%u in legal_texsubimage_target()",
+ dims);
+ return GL_FALSE;
+ }
+}
+
+
+/**
+ * Test the glTexImage[123]D() parameters for errors.
+ *
+ * \param ctx GL context.
+ * \param dimensions texture image dimensions (must be 1, 2 or 3).
+ * \param target texture target given by the user.
+ * \param level image level given by the user.
+ * \param internalFormat internal format given by the user.
+ * \param format pixel data format given by the user.
+ * \param type pixel data type given by the user.
+ * \param width image width given by the user.
+ * \param height image height given by the user.
+ * \param depth image depth given by the user.
+ * \param border image border given by the user.
+ *
+ * \return GL_TRUE if an error was detected, or GL_FALSE if no errors.
+ *
+ * Verifies each of the parameters against the constants specified in
+ * __struct gl_contextRec::Const and the supported extensions, and according
+ * to the OpenGL specification.
+ */
+static GLboolean
+texture_error_check( struct gl_context *ctx,
+ GLuint dimensions, GLenum target,
+ GLint level, GLint internalFormat,
+ GLenum format, GLenum type,
+ GLint width, GLint height,
+ GLint depth, GLint border )
+{
+ const GLenum proxyTarget = get_proxy_target(target);
+ const GLboolean isProxy = target == proxyTarget;
+ GLboolean sizeOK = GL_TRUE;
+ GLboolean colorFormat, indexFormat;
+
+ /* Basic level check (more checking in ctx->Driver.TestProxyTexImage) */
+ if (level < 0 || level >= MAX_TEXTURE_LEVELS) {
+ if (!isProxy) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glTexImage%dD(level=%d)", dimensions, level);
+ }
+ return GL_TRUE;
+ }
+
+ /* Check border */
+ if (border < 0 || border > 1 ||
+ ((target == GL_TEXTURE_RECTANGLE_NV ||
+ target == GL_PROXY_TEXTURE_RECTANGLE_NV) && border != 0)) {
+ if (!isProxy) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glTexImage%dD(border=%d)", dimensions, border);
+ }
+ return GL_TRUE;
+ }
+
+ if (width < 0 || height < 0 || depth < 0) {
+ if (!isProxy) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glTexImage%dD(width, height or depth < 0)", dimensions);
+ }
+ return GL_TRUE;
+ }
+
+ /* Do this simple check before calling the TestProxyTexImage() function */
+ if (proxyTarget == GL_PROXY_TEXTURE_CUBE_MAP_ARB) {
+ sizeOK = (width == height);
+ }
+
+ /*
+ * Use the proxy texture driver hook to see if the size/level/etc are
+ * legal.
+ */
+ sizeOK = sizeOK && ctx->Driver.TestProxyTexImage(ctx, proxyTarget, level,
+ internalFormat, format,
+ type, width, height,
+ depth, border);
+ if (!sizeOK) {
+ if (!isProxy) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glTexImage%dD(level=%d, width=%d, height=%d, depth=%d)",
+ dimensions, level, width, height, depth);
+ }
+ return GL_TRUE;
+ }
+
+ /* Check internalFormat */
+ if (_mesa_base_tex_format(ctx, internalFormat) < 0) {
+ if (!isProxy) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glTexImage%dD(internalFormat=%s)",
+ dimensions, _mesa_lookup_enum_by_nr(internalFormat));
+ }
+ return GL_TRUE;
+ }
+
+ /* Check incoming image format and type */
+ if (!_mesa_is_legal_format_and_type(ctx, format, type)) {
+ /* Normally, GL_INVALID_OPERATION is generated by a format/type
+ * mismatch (see the 1.2 spec page 94, sec 3.6.4.). But with the
+ * GL_EXT_texture_integer extension, some combinations should generate
+ * GL_INVALID_ENUM instead (grr!).
+ */
+ if (!isProxy) {
+ GLenum error = _mesa_is_integer_format(format)
+ ? GL_INVALID_ENUM : GL_INVALID_OPERATION;
+ _mesa_error(ctx, error,
+ "glTexImage%dD(incompatible format 0x%x, type 0x%x)",
+ dimensions, format, type);
+ }
+ return GL_TRUE;
+ }
+
+ /* make sure internal format and format basically agree */
+ colorFormat = _mesa_is_color_format(format);
+ indexFormat = _mesa_is_index_format(format);
+ if ((_mesa_is_color_format(internalFormat) && !colorFormat && !indexFormat) ||
+ (_mesa_is_index_format(internalFormat) && !indexFormat) ||
+ (_mesa_is_depth_format(internalFormat) != _mesa_is_depth_format(format)) ||
+ (_mesa_is_ycbcr_format(internalFormat) != _mesa_is_ycbcr_format(format)) ||
+ (_mesa_is_depthstencil_format(internalFormat) != _mesa_is_depthstencil_format(format)) ||
+ (_mesa_is_dudv_format(internalFormat) != _mesa_is_dudv_format(format))) {
+ if (!isProxy)
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glTexImage%dD(incompatible internalFormat 0x%x, format 0x%x)",
+ dimensions, internalFormat, format);
+ return GL_TRUE;
+ }
+
+ /* additional checks for ycbcr textures */
+ if (internalFormat == GL_YCBCR_MESA) {
+ ASSERT(ctx->Extensions.MESA_ycbcr_texture);
+ if (type != GL_UNSIGNED_SHORT_8_8_MESA &&
+ type != GL_UNSIGNED_SHORT_8_8_REV_MESA) {
+ char message[100];
+ _mesa_snprintf(message, sizeof(message),
+ "glTexImage%dD(format/type YCBCR mismatch", dimensions);
+ _mesa_error(ctx, GL_INVALID_ENUM, "%s", message);
+ return GL_TRUE; /* error */
+ }
+ if (target != GL_TEXTURE_2D &&
+ target != GL_PROXY_TEXTURE_2D &&
+ target != GL_TEXTURE_RECTANGLE_NV &&
+ target != GL_PROXY_TEXTURE_RECTANGLE_NV) {
+ if (!isProxy)
+ _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage(target)");
+ return GL_TRUE;
+ }
+ if (border != 0) {
+ if (!isProxy) {
+ char message[100];
+ _mesa_snprintf(message, sizeof(message),
+ "glTexImage%dD(format=GL_YCBCR_MESA and border=%d)",
+ dimensions, border);
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s", message);
+ }
+ return GL_TRUE;
+ }
+ }
+
+ /* additional checks for depth textures */
+ if (_mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_COMPONENT) {
+ /* Only 1D, 2D and rectangular textures supported, not 3D or cubes */
+ if (target != GL_TEXTURE_1D &&
+ target != GL_PROXY_TEXTURE_1D &&
+ target != GL_TEXTURE_2D &&
+ target != GL_PROXY_TEXTURE_2D &&
+ target != GL_TEXTURE_RECTANGLE_ARB &&
+ target != GL_PROXY_TEXTURE_RECTANGLE_ARB) {
+ if (!isProxy)
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glTexImage(target/internalFormat)");
+ return GL_TRUE;
+ }
+ }
+
+ /* additional checks for compressed textures */
+ if (_mesa_is_compressed_format(ctx, internalFormat)) {
+ if (!target_can_be_compressed(ctx, target, internalFormat)) {
+ if (!isProxy)
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glTexImage%dD(target)", dimensions);
+ return GL_TRUE;
+ }
+ if (border != 0) {
+ if (!isProxy) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glTexImage%dD(border!=0)", dimensions);
+ }
+ return GL_TRUE;
+ }
+ }
+
+ /* additional checks for integer textures */
+ if (ctx->Extensions.EXT_texture_integer &&
+ (_mesa_is_integer_format(format) !=
+ _mesa_is_integer_format(internalFormat))) {
+ if (!isProxy) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glTexImage%dD(integer/non-integer format mismatch)",
+ dimensions);
+ }
+ return GL_TRUE;
+ }
+
+ /* if we get here, the parameters are OK */
+ return GL_FALSE;
+}
+
+
+/**
+ * Test glTexSubImage[123]D() parameters for errors.
+ *
+ * \param ctx GL context.
+ * \param dimensions texture image dimensions (must be 1, 2 or 3).
+ * \param target texture target given by the user.
+ * \param level image level given by the user.
+ * \param xoffset sub-image x offset given by the user.
+ * \param yoffset sub-image y offset given by the user.
+ * \param zoffset sub-image z offset given by the user.
+ * \param format pixel data format given by the user.
+ * \param type pixel data type given by the user.
+ * \param width image width given by the user.
+ * \param height image height given by the user.
+ * \param depth image depth given by the user.
+ *
+ * \return GL_TRUE if an error was detected, or GL_FALSE if no errors.
+ *
+ * Verifies each of the parameters against the constants specified in
+ * __struct gl_contextRec::Const and the supported extensions, and according
+ * to the OpenGL specification.
+ */
+static GLboolean
+subtexture_error_check( struct gl_context *ctx, GLuint dimensions,
+ GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLint width, GLint height, GLint depth,
+ GLenum format, GLenum type )
+{
+ /* Basic level check */
+ if (level < 0 || level >= MAX_TEXTURE_LEVELS) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glTexSubImage2D(level=%d)", level);
+ return GL_TRUE;
+ }
+
+ /* Check for negative sizes */
+ if (width < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glTexSubImage%dD(width=%d)", dimensions, width);
+ return GL_TRUE;
+ }
+ if (height < 0 && dimensions > 1) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glTexSubImage%dD(height=%d)", dimensions, height);
+ return GL_TRUE;
+ }
+ if (depth < 0 && dimensions > 2) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glTexSubImage%dD(depth=%d)", dimensions, depth);
+ return GL_TRUE;
+ }
+
+ if (!_mesa_is_legal_format_and_type(ctx, format, type)) {
+ /* As with the glTexImage2D check above, the error code here
+ * depends on texture integer.
+ */
+ GLenum error = _mesa_is_integer_format(format)
+ ? GL_INVALID_OPERATION : GL_INVALID_ENUM;
+ _mesa_error(ctx, error,
+ "glTexSubImage%dD(incompatible format 0x%x, type 0x%x)",
+ dimensions, format, type);
+ return GL_TRUE;
+ }
+
+ return GL_FALSE;
+}
+
+
+/**
+ * Do second part of glTexSubImage which depends on the destination texture.
+ * \return GL_TRUE if error recorded, GL_FALSE otherwise
+ */
+static GLboolean
+subtexture_error_check2( struct gl_context *ctx, GLuint dimensions,
+ GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLint width, GLint height, GLint depth,
+ GLenum format, GLenum type,
+ const struct gl_texture_image *destTex )
+{
+ if (!destTex) {
+ /* undefined image level */
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glTexSubImage%dD", dimensions);
+ return GL_TRUE;
+ }
+
+ if (xoffset < -((GLint)destTex->Border)) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage%dD(xoffset)",
+ dimensions);
+ return GL_TRUE;
+ }
+ if (xoffset + width > (GLint) (destTex->Width + destTex->Border)) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage%dD(xoffset+width)",
+ dimensions);
+ return GL_TRUE;
+ }
+ if (dimensions > 1) {
+ if (yoffset < -((GLint)destTex->Border)) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage%dD(yoffset)",
+ dimensions);
+ return GL_TRUE;
+ }
+ if (yoffset + height > (GLint) (destTex->Height + destTex->Border)) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage%dD(yoffset+height)",
+ dimensions);
+ return GL_TRUE;
+ }
+ }
+ if (dimensions > 2) {
+ if (zoffset < -((GLint)destTex->Border)) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage3D(zoffset)");
+ return GL_TRUE;
+ }
+ if (zoffset + depth > (GLint) (destTex->Depth + destTex->Border)) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage3D(zoffset+depth)");
+ return GL_TRUE;
+ }
+ }
+
+ if (_mesa_is_format_compressed(destTex->TexFormat)) {
+ GLuint bw, bh;
+
+ /* do tests which depend on compression block size */
+ _mesa_get_format_block_size(destTex->TexFormat, &bw, &bh);
+
+ /* offset must be multiple of block size */
+ if ((xoffset % bw != 0) || (yoffset % bh != 0)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glTexSubImage%dD(xoffset = %d, yoffset = %d)",
+ dimensions, xoffset, yoffset);
+ return GL_TRUE;
+ }
+ /* size must be multiple of bw by bh or equal to whole texture size */
+ if ((width % bw != 0) && (GLuint) width != destTex->Width) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glTexSubImage%dD(width = %d)", dimensions, width);
+ return GL_TRUE;
+ }
+ if ((height % bh != 0) && (GLuint) height != destTex->Height) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glTexSubImage%dD(height = %d)", dimensions, height);
+ return GL_TRUE;
+ }
+ }
+
+ return GL_FALSE;
+}
+
+
+/**
+ * Test glCopyTexImage[12]D() parameters for errors.
+ *
+ * \param ctx GL context.
+ * \param dimensions texture image dimensions (must be 1, 2 or 3).
+ * \param target texture target given by the user.
+ * \param level image level given by the user.
+ * \param internalFormat internal format given by the user.
+ * \param width image width given by the user.
+ * \param height image height given by the user.
+ * \param border texture border.
+ *
+ * \return GL_TRUE if an error was detected, or GL_FALSE if no errors.
+ *
+ * Verifies each of the parameters against the constants specified in
+ * __struct gl_contextRec::Const and the supported extensions, and according
+ * to the OpenGL specification.
+ */
+static GLboolean
+copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
+ GLenum target, GLint level, GLint internalFormat,
+ GLint width, GLint height, GLint border )
+{
+ const GLenum proxyTarget = get_proxy_target(target);
+ const GLenum type = GL_FLOAT;
+ GLboolean sizeOK;
+ GLint format;
+
+ /* check target */
+ if (!legal_texsubimage_target(ctx, dimensions, target)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glCopyTexImage%uD(target=%s)",
+ dimensions, _mesa_lookup_enum_by_nr(target));
+ return GL_TRUE;
+ }
+
+ /* Basic level check (more checking in ctx->Driver.TestProxyTexImage) */
+ if (level < 0 || level >= MAX_TEXTURE_LEVELS) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexImage%dD(level=%d)", dimensions, level);
+ return GL_TRUE;
+ }
+
+ /* Check that the source buffer is complete */
+ if (ctx->ReadBuffer->Name) {
+ if (ctx->ReadBuffer->_Status == 0) {
+ _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer);
+ }
+ if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
+ "glCopyTexImage%dD(invalid readbuffer)", dimensions);
+ return GL_TRUE;
+ }
+ }
+
+ /* Check border */
+ if (border < 0 || border > 1 ||
+ ((target == GL_TEXTURE_RECTANGLE_NV ||
+ target == GL_PROXY_TEXTURE_RECTANGLE_NV) && border != 0)) {
+ return GL_TRUE;
+ }
+
+ format = _mesa_base_tex_format(ctx, internalFormat);
+ if (format < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexImage%dD(internalFormat)", dimensions);
+ return GL_TRUE;
+ }
+
+ if (!_mesa_source_buffer_exists(ctx, format)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexImage%dD(missing readbuffer)", dimensions);
+ return GL_TRUE;
+ }
+
+ /* Do size, level checking */
+ sizeOK = (proxyTarget == GL_PROXY_TEXTURE_CUBE_MAP_ARB)
+ ? (width == height) : 1;
+
+ sizeOK = sizeOK && ctx->Driver.TestProxyTexImage(ctx, proxyTarget, level,
+ internalFormat, format,
+ type, width, height,
+ 1, border);
+
+ if (!sizeOK) {
+ if (dimensions == 1) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexImage1D(width=%d)", width);
+ }
+ else {
+ ASSERT(dimensions == 2);
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexImage2D(width=%d, height=%d)", width, height);
+ }
+ return GL_TRUE;
+ }
+
+ if (_mesa_is_compressed_format(ctx, internalFormat)) {
+ if (!target_can_be_compressed(ctx, target, internalFormat)) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glCopyTexImage%dD(target)", dimensions);
+ return GL_TRUE;
+ }
+ if (border != 0) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexImage%dD(border!=0)", dimensions);
+ return GL_TRUE;
+ }
+ }
+ else if (_mesa_is_depth_format(internalFormat)) {
+ /* make sure we have depth/stencil buffers */
+ if (!ctx->ReadBuffer->_DepthBuffer) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexImage%dD(no depth)", dimensions);
+ return GL_TRUE;
+ }
+ }
+ else if (_mesa_is_depthstencil_format(internalFormat)) {
+ /* make sure we have depth/stencil buffers */
+ if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexImage%dD(no depth/stencil buffer)", dimensions);
+ return GL_TRUE;
+ }
+ }
+
+ /* if we get here, the parameters are OK */
+ return GL_FALSE;
+}
+
+
+/**
+ * Test glCopyTexSubImage[12]D() parameters for errors.
+ * Note that this is the first part of error checking.
+ * See also copytexsubimage_error_check2() below for the second part.
+ *
+ * \param ctx GL context.
+ * \param dimensions texture image dimensions (must be 1, 2 or 3).
+ * \param target texture target given by the user.
+ * \param level image level given by the user.
+ *
+ * \return GL_TRUE if an error was detected, or GL_FALSE if no errors.
+ */
+static GLboolean
+copytexsubimage_error_check1( struct gl_context *ctx, GLuint dimensions,
+ GLenum target, GLint level)
+{
+ /* Check that the source buffer is complete */
+ if (ctx->ReadBuffer->Name) {
+ if (ctx->ReadBuffer->_Status == 0) {
+ _mesa_test_framebuffer_completeness(ctx, ctx->ReadBuffer);
+ }
+ if (ctx->ReadBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
+ "glCopyTexImage%dD(invalid readbuffer)", dimensions);
+ return GL_TRUE;
+ }
+ }
+
+ /* check target (proxies not allowed) */
+ if (!legal_texsubimage_target(ctx, dimensions, target)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glCopyTexSubImage%uD(target=%s)",
+ dimensions, _mesa_lookup_enum_by_nr(target));
+ return GL_TRUE;
+ }
+
+ /* Check level */
+ if (level < 0 || level >= MAX_TEXTURE_LEVELS) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexSubImage%dD(level=%d)", dimensions, level);
+ return GL_TRUE;
+ }
+
+ return GL_FALSE;
+}
+
+
+/**
+ * Second part of error checking for glCopyTexSubImage[12]D().
+ * \param xoffset sub-image x offset given by the user.
+ * \param yoffset sub-image y offset given by the user.
+ * \param zoffset sub-image z offset given by the user.
+ * \param width image width given by the user.
+ * \param height image height given by the user.
+ */
+static GLboolean
+copytexsubimage_error_check2( struct gl_context *ctx, GLuint dimensions,
+ GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height,
+ const struct gl_texture_image *teximage )
+{
+ /* check that dest tex image exists */
+ if (!teximage) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexSubImage%dD(undefined texture level: %d)",
+ dimensions, level);
+ return GL_TRUE;
+ }
+
+ /* Check size */
+ if (width < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexSubImage%dD(width=%d)", dimensions, width);
+ return GL_TRUE;
+ }
+ if (dimensions > 1 && height < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexSubImage%dD(height=%d)", dimensions, height);
+ return GL_TRUE;
+ }
+
+ /* check x/y offsets */
+ if (xoffset < -((GLint)teximage->Border)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexSubImage%dD(xoffset=%d)", dimensions, xoffset);
+ return GL_TRUE;
+ }
+ if (xoffset + width > (GLint) (teximage->Width + teximage->Border)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexSubImage%dD(xoffset+width)", dimensions);
+ return GL_TRUE;
+ }
+ if (dimensions > 1) {
+ if (yoffset < -((GLint)teximage->Border)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexSubImage%dD(yoffset=%d)", dimensions, yoffset);
+ return GL_TRUE;
+ }
+ /* NOTE: we're adding the border here, not subtracting! */
+ if (yoffset + height > (GLint) (teximage->Height + teximage->Border)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexSubImage%dD(yoffset+height)", dimensions);
+ return GL_TRUE;
+ }
+ }
+
+ /* check z offset */
+ if (dimensions > 2) {
+ if (zoffset < -((GLint)teximage->Border)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexSubImage%dD(zoffset)", dimensions);
+ return GL_TRUE;
+ }
+ if (zoffset > (GLint) (teximage->Depth + teximage->Border)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexSubImage%dD(zoffset+depth)", dimensions);
+ return GL_TRUE;
+ }
+ }
+
+ if (_mesa_is_format_compressed(teximage->TexFormat)) {
+ /* offset must be multiple of 4 */
+ if ((xoffset & 3) || (yoffset & 3)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexSubImage%dD(xoffset or yoffset)", dimensions);
+ return GL_TRUE;
+ }
+ /* size must be multiple of 4 */
+ if ((width & 3) != 0 && (GLuint) width != teximage->Width) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexSubImage%dD(width)", dimensions);
+ return GL_TRUE;
+ }
+ if ((height & 3) != 0 && (GLuint) height != teximage->Height) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCopyTexSubImage%dD(height)", dimensions);
+ return GL_TRUE;
+ }
+ }
+
+ if (teximage->InternalFormat == GL_YCBCR_MESA) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glCopyTexSubImage2D");
+ return GL_TRUE;
+ }
+
+ if (!_mesa_source_buffer_exists(ctx, teximage->_BaseFormat)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexSubImage%dD(missing readbuffer, format=0x%x)",
+ dimensions, teximage->_BaseFormat);
+ return GL_TRUE;
+ }
+
+ if (teximage->_BaseFormat == GL_DEPTH_COMPONENT) {
+ if (!ctx->ReadBuffer->_DepthBuffer) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexSubImage%dD(no depth buffer)",
+ dimensions);
+ return GL_TRUE;
+ }
+ }
+ else if (teximage->_BaseFormat == GL_DEPTH_STENCIL_EXT) {
+ if (!ctx->ReadBuffer->_DepthBuffer || !ctx->ReadBuffer->_StencilBuffer) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexSubImage%dD(no depth/stencil buffer)",
+ dimensions);
+ return GL_TRUE;
+ }
+ }
+
+ /* If copying into an integer texture, the source buffer must also be
+ * integer-valued.
+ */
+ if (_mesa_is_format_integer_color(teximage->TexFormat)) {
+ struct gl_renderbuffer *rb = ctx->ReadBuffer->_ColorReadBuffer;
+ if (!_mesa_is_format_integer_color(rb->Format)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCopyTexSubImage%dD(source buffer is not integer format)",
+ dimensions);
+ return GL_TRUE;
+ }
+ }
+
+ /* if we get here, the parameters are OK */
+ return GL_FALSE;
+}
+
+
+/** Callback info for walking over FBO hash table */
+struct cb_info
+{
+ struct gl_context *ctx;
+ struct gl_texture_object *texObj;
+ GLuint level, face;
+};
+
+
+/**
+ * Check render to texture callback. Called from _mesa_HashWalk().
+ */
+static void
+check_rtt_cb(GLuint key, void *data, void *userData)
+{
+ struct gl_framebuffer *fb = (struct gl_framebuffer *) data;
+ const struct cb_info *info = (struct cb_info *) userData;
+ struct gl_context *ctx = info->ctx;
+ const struct gl_texture_object *texObj = info->texObj;
+ const GLuint level = info->level, face = info->face;
+
+ /* If this is a user-created FBO */
+ if (fb->Name) {
+ GLuint i;
+ /* check if any of the FBO's attachments point to 'texObj' */
+ for (i = 0; i < BUFFER_COUNT; i++) {
+ struct gl_renderbuffer_attachment *att = fb->Attachment + i;
+ if (att->Type == GL_TEXTURE &&
+ att->Texture == texObj &&
+ att->TextureLevel == level &&
+ att->CubeMapFace == face) {
+ ASSERT(_mesa_get_attachment_teximage(att));
+ /* Tell driver about the new renderbuffer texture */
+ ctx->Driver.RenderTexture(ctx, ctx->DrawBuffer, att);
+ /* Mark fb status as indeterminate to force re-validation */
+ fb->_Status = 0;
+ }
+ }
+ }
+}
+
+
+/**
+ * When a texture image is specified we have to check if it's bound to
+ * any framebuffer objects (render to texture) in order to detect changes
+ * in size or format since that effects FBO completeness.
+ * Any FBOs rendering into the texture must be re-validated.
+ */
+static void
+update_fbo_texture(struct gl_context *ctx, struct gl_texture_object *texObj,
+ GLuint face, GLuint level)
+{
+ /* Only check this texture if it's been marked as RenderToTexture */
+ if (texObj->_RenderToTexture) {
+ struct cb_info info;
+ info.ctx = ctx;
+ info.texObj = texObj;
+ info.level = level;
+ info.face = face;
+ _mesa_HashWalk(ctx->Shared->FrameBuffers, check_rtt_cb, &info);
+ }
+}
+
+
+/**
+ * If the texture object's GenerateMipmap flag is set and we've
+ * changed the texture base level image, regenerate the rest of the
+ * mipmap levels now.
+ */
+static INLINE void
+check_gen_mipmap(struct gl_context *ctx, GLenum target,
+ struct gl_texture_object *texObj, GLint level)
+{
+ ASSERT(target != GL_TEXTURE_CUBE_MAP);
+ if (texObj->GenerateMipmap &&
+ level == texObj->BaseLevel &&
+ level < texObj->MaxLevel) {
+ ASSERT(ctx->Driver.GenerateMipmap);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
+ }
+}
+
+
+/** Debug helper: override the user-requested internal format */
+static GLenum
+override_internal_format(GLenum internalFormat, GLint width, GLint height)
+{
+#if 0
+ if (internalFormat == GL_RGBA16F_ARB ||
+ internalFormat == GL_RGBA32F_ARB) {
+ printf("Convert rgba float tex to int %d x %d\n", width, height);
+ return GL_RGBA;
+ }
+ else if (internalFormat == GL_RGB16F_ARB ||
+ internalFormat == GL_RGB32F_ARB) {
+ printf("Convert rgb float tex to int %d x %d\n", width, height);
+ return GL_RGB;
+ }
+ else if (internalFormat == GL_LUMINANCE_ALPHA16F_ARB ||
+ internalFormat == GL_LUMINANCE_ALPHA32F_ARB) {
+ printf("Convert luminance float tex to int %d x %d\n", width, height);
+ return GL_LUMINANCE_ALPHA;
+ }
+ else if (internalFormat == GL_LUMINANCE16F_ARB ||
+ internalFormat == GL_LUMINANCE32F_ARB) {
+ printf("Convert luminance float tex to int %d x %d\n", width, height);
+ return GL_LUMINANCE;
+ }
+ else if (internalFormat == GL_ALPHA16F_ARB ||
+ internalFormat == GL_ALPHA32F_ARB) {
+ printf("Convert luminance float tex to int %d x %d\n", width, height);
+ return GL_ALPHA;
+ }
+ /*
+ else if (internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT) {
+ internalFormat = GL_RGBA;
+ }
+ */
+ else {
+ return internalFormat;
+ }
+#else
+ return internalFormat;
+#endif
+}
+
+
+/**
+ * Choose the actual hardware format for a texture image.
+ * Try to use the same format as the previous image level when possible.
+ * Otherwise, ask the driver for the best format.
+ * It's important to try to choose a consistant format for all levels
+ * for efficient texture memory layout/allocation. In particular, this
+ * comes up during automatic mipmap generation.
+ */
+gl_format
+_mesa_choose_texture_format(struct gl_context *ctx,
+ struct gl_texture_object *texObj,
+ GLenum target, GLint level,
+ GLenum internalFormat, GLenum format, GLenum type)
+{
+ gl_format f;
+
+ /* see if we've already chosen a format for the previous level */
+ if (level > 0) {
+ struct gl_texture_image *prevImage =
+ _mesa_select_tex_image(ctx, texObj, target, level - 1);
+ /* See if the prev level is defined and has an internal format which
+ * matches the new internal format.
+ */
+ if (prevImage &&
+ prevImage->Width > 0 &&
+ prevImage->InternalFormat == internalFormat) {
+ /* use the same format */
+ ASSERT(prevImage->TexFormat != MESA_FORMAT_NONE);
+ return prevImage->TexFormat;
+ }
+ }
+
+ /* choose format from scratch */
+ f = ctx->Driver.ChooseTextureFormat(ctx, internalFormat, format, type);
+ ASSERT(f != MESA_FORMAT_NONE);
+ return f;
+}
+
+
+/**
+ * Common code to implement all the glTexImage1D/2D/3D functions.
+ */
+static void
+teximage(struct gl_context *ctx, GLuint dims,
+ GLenum target, GLint level, GLint internalFormat,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLint border, GLenum format, GLenum type,
+ const GLvoid *pixels)
+{
+ GLboolean error;
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
+ _mesa_debug(ctx, "glTexImage%uD %s %d %s %d %d %d %d %s %s %p\n",
+ dims,
+ _mesa_lookup_enum_by_nr(target), level,
+ _mesa_lookup_enum_by_nr(internalFormat),
+ width, height, depth, border,
+ _mesa_lookup_enum_by_nr(format),
+ _mesa_lookup_enum_by_nr(type), pixels);
+
+ internalFormat = override_internal_format(internalFormat, width, height);
+
+ /* target error checking */
+ if (!legal_teximage_target(ctx, dims, target)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glTexImage%uD(target=%s)",
+ dims, _mesa_lookup_enum_by_nr(target));
+ return;
+ }
+
+ /* general error checking */
+ error = texture_error_check(ctx, dims, target, level, internalFormat,
+ format, type, width, height, depth, border);
+
+ if (_mesa_is_proxy_texture(target)) {
+ /* Proxy texture: just clear or set state depending on error checking */
+ struct gl_texture_image *texImage =
+ _mesa_get_proxy_tex_image(ctx, target, level);
+
+ if (error) {
+ /* when error, clear all proxy texture image parameters */
+ if (texImage)
+ clear_teximage_fields(texImage);
+ }
+ else {
+ /* no error, set the tex image parameters */
+ struct gl_texture_object *texObj =
+ _mesa_get_current_tex_object(ctx, target);
+ gl_format texFormat = _mesa_choose_texture_format(ctx, texObj,
+ target, level,
+ internalFormat,
+ format, type);
+
+ if (legal_texture_size(ctx, texFormat, width, height, depth)) {
+ _mesa_init_teximage_fields(ctx, target, texImage, width, height,
+ depth, border, internalFormat,
+ texFormat);
+ }
+ else if (texImage) {
+ clear_teximage_fields(texImage);
+ }
+ }
+ }
+ else {
+ /* non-proxy target */
+ const GLuint face = _mesa_tex_target_to_face(target);
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+
+ if (error) {
+ return; /* error was recorded */
+ }
+
+ if (ctx->NewState & _NEW_PIXEL)
+ _mesa_update_state(ctx);
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_get_tex_image(ctx, texObj, target, level);
+
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage%uD", dims);
+ }
+ else {
+ gl_format texFormat;
+
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+
+ ASSERT(texImage->Data == NULL);
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, format,
+ type);
+
+ if (legal_texture_size(ctx, texFormat, width, height, depth)) {
+ _mesa_init_teximage_fields(ctx, target, texImage,
+ width, height, depth,
+ border, internalFormat, texFormat);
+
+ /* Give the texture to the driver. <pixels> may be null. */
+ ASSERT(ctx->Driver.TexImage3D);
+ switch (dims) {
+ case 1:
+ ctx->Driver.TexImage1D(ctx, target, level, internalFormat,
+ width, border, format,
+ type, pixels, &ctx->Unpack, texObj,
+ texImage);
+ break;
+ case 2:
+ ctx->Driver.TexImage2D(ctx, target, level, internalFormat,
+ width, height, border, format,
+ type, pixels, &ctx->Unpack, texObj,
+ texImage);
+ break;
+ case 3:
+ ctx->Driver.TexImage3D(ctx, target, level, internalFormat,
+ width, height, depth, border, format,
+ type, pixels, &ctx->Unpack, texObj,
+ texImage);
+ break;
+ default:
+ _mesa_problem(ctx, "invalid dims=%u in teximage()", dims);
+ }
+
+ check_gen_mipmap(ctx, target, texObj, level);
+
+ update_fbo_texture(ctx, texObj, face, level);
+
+ /* state update */
+ texObj->_Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ else {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage%uD", dims);
+ }
+ }
+ }
+ _mesa_unlock_texture(ctx, texObj);
+ }
+}
+
+
+/*
+ * Called from the API. Note that width includes the border.
+ */
+void GLAPIENTRY
+_mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
+ GLsizei width, GLint border, GLenum format,
+ GLenum type, const GLvoid *pixels )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ teximage(ctx, 1, target, level, internalFormat, width, 1, 1,
+ border, format, type, pixels);
+}
+
+
+void GLAPIENTRY
+_mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
+ GLsizei width, GLsizei height, GLint border,
+ GLenum format, GLenum type,
+ const GLvoid *pixels )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ teximage(ctx, 2, target, level, internalFormat, width, height, 1,
+ border, format, type, pixels);
+}
+
+
+/*
+ * Called by the API or display list executor.
+ * Note that width and height include the border.
+ */
+void GLAPIENTRY
+_mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLint border, GLenum format, GLenum type,
+ const GLvoid *pixels )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ teximage(ctx, 3, target, level, internalFormat, width, height, depth,
+ border, format, type, pixels);
+}
+
+
+void GLAPIENTRY
+_mesa_TexImage3DEXT( GLenum target, GLint level, GLenum internalFormat,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLint border, GLenum format, GLenum type,
+ const GLvoid *pixels )
+{
+ _mesa_TexImage3D(target, level, (GLint) internalFormat, width, height,
+ depth, border, format, type, pixels);
+}
+
+
+#if FEATURE_OES_EGL_image
+void GLAPIENTRY
+_mesa_EGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image)
+{
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ if (!ctx->Extensions.OES_EGL_image) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glEGLImageTargetTexture2DOES(unsupported)");
+ return;
+ }
+
+ if (target != GL_TEXTURE_2D) {
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glEGLImageTargetTexture2D(target=%d)", target);
+ return;
+ }
+
+ if (ctx->NewState & _NEW_PIXEL)
+ _mesa_update_state(ctx);
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
+ _mesa_lock_texture(ctx, texObj);
+
+ texImage = _mesa_get_tex_image(ctx, texObj, target, 0);
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glEGLImageTargetTexture2D");
+ } else {
+ if (texImage->Data)
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+
+ ASSERT(texImage->Data == NULL);
+ ctx->Driver.EGLImageTargetTexture2D(ctx, target,
+ texObj, texImage, image);
+
+ /* state update */
+ texObj->_Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ _mesa_unlock_texture(ctx, texObj);
+
+}
+#endif
+
+
+
+/**
+ * Implement all the glTexSubImage1/2/3D() functions.
+ */
+static void
+texsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type, const GLvoid *pixels )
+{
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
+ _mesa_debug(ctx, "glTexSubImage%uD %s %d %d %d %d %d %d %d %s %s %p\n",
+ dims,
+ _mesa_lookup_enum_by_nr(target), level,
+ xoffset, yoffset, zoffset, width, height, depth,
+ _mesa_lookup_enum_by_nr(format),
+ _mesa_lookup_enum_by_nr(type), pixels);
+
+ /* check target (proxies not allowed) */
+ if (!legal_texsubimage_target(ctx, dims, target)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glTexSubImage%uD(target=%s)",
+ dims, _mesa_lookup_enum_by_nr(target));
+ return;
+ }
+
+ if (ctx->NewState & _NEW_PIXEL)
+ _mesa_update_state(ctx);
+
+ if (subtexture_error_check(ctx, dims, target, level, xoffset, yoffset, zoffset,
+ width, height, depth, format, type)) {
+ return; /* error was detected */
+ }
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+
+ if (subtexture_error_check2(ctx, dims, target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ format, type, texImage)) {
+ /* error was recorded */
+ }
+ else if (width > 0 && height > 0 && height > 0) {
+ /* If we have a border, offset=-1 is legal. Bias by border width. */
+ switch (dims) {
+ case 3:
+ zoffset += texImage->Border;
+ /* fall-through */
+ case 2:
+ yoffset += texImage->Border;
+ /* fall-through */
+ case 1:
+ xoffset += texImage->Border;
+ }
+
+ switch (dims) {
+ case 1:
+ ctx->Driver.TexSubImage1D(ctx, target, level,
+ xoffset, width,
+ format, type, pixels,
+ &ctx->Unpack, texObj, texImage );
+ break;
+ case 2:
+ ctx->Driver.TexSubImage2D(ctx, target, level,
+ xoffset, yoffset, width, height,
+ format, type, pixels,
+ &ctx->Unpack, texObj, texImage );
+ break;
+ case 3:
+ ctx->Driver.TexSubImage3D(ctx, target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ format, type, pixels,
+ &ctx->Unpack, texObj, texImage );
+ break;
+ default:
+ _mesa_problem(ctx, "unexpected dims in subteximage()");
+ }
+
+ check_gen_mipmap(ctx, target, texObj, level);
+
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ }
+ _mesa_unlock_texture(ctx, texObj);
+}
+
+
+void GLAPIENTRY
+_mesa_TexSubImage1D( GLenum target, GLint level,
+ GLint xoffset, GLsizei width,
+ GLenum format, GLenum type,
+ const GLvoid *pixels )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ texsubimage(ctx, 1, target, level,
+ xoffset, 0, 0,
+ width, 1, 1,
+ format, type, pixels);
+}
+
+
+void GLAPIENTRY
+_mesa_TexSubImage2D( GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLsizei width, GLsizei height,
+ GLenum format, GLenum type,
+ const GLvoid *pixels )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ texsubimage(ctx, 2, target, level,
+ xoffset, yoffset, 0,
+ width, height, 1,
+ format, type, pixels);
+}
+
+
+
+void GLAPIENTRY
+_mesa_TexSubImage3D( GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type,
+ const GLvoid *pixels )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ texsubimage(ctx, 3, target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ format, type, pixels);
+}
+
+
+
+/**
+ * Implement the glCopyTexImage1/2D() functions.
+ */
+static void
+copyteximage(struct gl_context *ctx, GLuint dims,
+ GLenum target, GLint level, GLenum internalFormat,
+ GLint x, GLint y, GLsizei width, GLsizei height, GLint border )
+{
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+ const GLuint face = _mesa_tex_target_to_face(target);
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
+ _mesa_debug(ctx, "glCopyTexImage%uD %s %d %s %d %d %d %d %d\n",
+ dims,
+ _mesa_lookup_enum_by_nr(target), level,
+ _mesa_lookup_enum_by_nr(internalFormat),
+ x, y, width, height, border);
+
+ if (ctx->NewState & NEW_COPY_TEX_STATE)
+ _mesa_update_state(ctx);
+
+ if (copytexture_error_check(ctx, dims, target, level, internalFormat,
+ width, height, border))
+ return;
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_get_tex_image(ctx, texObj, target, level);
+
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage%uD", dims);
+ }
+ else {
+ gl_format texFormat;
+
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+
+ ASSERT(texImage->Data == NULL);
+
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, GL_NONE,
+ GL_NONE);
+
+ if (legal_texture_size(ctx, texFormat, width, height, 1)) {
+ _mesa_init_teximage_fields(ctx, target, texImage, width, height, 1,
+ border, internalFormat, texFormat);
+
+ ASSERT(ctx->Driver.CopyTexImage2D);
+ if (dims == 1)
+ ctx->Driver.CopyTexImage1D(ctx, target, level, internalFormat,
+ x, y, width, border);
+ else
+ ctx->Driver.CopyTexImage2D(ctx, target, level, internalFormat,
+ x, y, width, height, border);
+
+ check_gen_mipmap(ctx, target, texObj, level);
+
+ update_fbo_texture(ctx, texObj, face, level);
+
+ /* state update */
+ texObj->_Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ else {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCopyTexImage%uD", dims);
+ }
+ }
+ }
+ _mesa_unlock_texture(ctx, texObj);
+}
+
+
+
+void GLAPIENTRY
+_mesa_CopyTexImage1D( GLenum target, GLint level,
+ GLenum internalFormat,
+ GLint x, GLint y,
+ GLsizei width, GLint border )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ copyteximage(ctx, 1, target, level, internalFormat, x, y, width, 1, border);
+}
+
+
+
+void GLAPIENTRY
+_mesa_CopyTexImage2D( GLenum target, GLint level, GLenum internalFormat,
+ GLint x, GLint y, GLsizei width, GLsizei height,
+ GLint border )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ copyteximage(ctx, 2, target, level, internalFormat,
+ x, y, width, height, border);
+}
+
+
+
+/**
+ * Implementation for glCopyTexSubImage1/2/3D() functions.
+ */
+static void
+copytexsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
+ _mesa_debug(ctx, "glCopyTexSubImage%uD %s %d %d %d %d %d %d %d %d\n",
+ dims,
+ _mesa_lookup_enum_by_nr(target),
+ level, xoffset, yoffset, zoffset, x, y, width, height);
+
+ if (ctx->NewState & NEW_COPY_TEX_STATE)
+ _mesa_update_state(ctx);
+
+ if (copytexsubimage_error_check1(ctx, dims, target, level))
+ return;
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+
+ if (copytexsubimage_error_check2(ctx, dims, target, level, xoffset, yoffset,
+ zoffset, width, height, texImage)) {
+ /* error was recored */
+ }
+ else {
+ /* If we have a border, offset=-1 is legal. Bias by border width. */
+ switch (dims) {
+ case 3:
+ zoffset += texImage->Border;
+ /* fall-through */
+ case 2:
+ yoffset += texImage->Border;
+ /* fall-through */
+ case 1:
+ xoffset += texImage->Border;
+ }
+
+ if (_mesa_clip_copytexsubimage(ctx, &xoffset, &yoffset, &x, &y,
+ &width, &height)) {
+ switch (dims) {
+ case 1:
+ ctx->Driver.CopyTexSubImage1D(ctx, target, level,
+ xoffset, x, y, width);
+ break;
+ case 2:
+ ctx->Driver.CopyTexSubImage2D(ctx, target, level,
+ xoffset, yoffset,
+ x, y, width, height);
+ break;
+ case 3:
+ ctx->Driver.CopyTexSubImage3D(ctx, target, level,
+ xoffset, yoffset, zoffset,
+ x, y, width, height);
+ break;
+ default:
+ _mesa_problem(ctx, "bad dims in copytexsubimage()");
+ }
+
+ check_gen_mipmap(ctx, target, texObj, level);
+
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ }
+ }
+ _mesa_unlock_texture(ctx, texObj);
+}
+
+
+void GLAPIENTRY
+_mesa_CopyTexSubImage1D( GLenum target, GLint level,
+ GLint xoffset, GLint x, GLint y, GLsizei width )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ copytexsubimage(ctx, 1, target, level, xoffset, 0, 0, x, y, width, 1);
+}
+
+
+
+void GLAPIENTRY
+_mesa_CopyTexSubImage2D( GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLint x, GLint y, GLsizei width, GLsizei height )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ copytexsubimage(ctx, 2, target, level, xoffset, yoffset, 0, x, y,
+ width, height);
+}
+
+
+
+void GLAPIENTRY
+_mesa_CopyTexSubImage3D( GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLint x, GLint y, GLsizei width, GLsizei height )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ copytexsubimage(ctx, 3, target, level, xoffset, yoffset, zoffset,
+ x, y, width, height);
+}
+
+
+
+
+/**********************************************************************/
+/****** Compressed Textures ******/
+/**********************************************************************/
+
+
+/**
+ * Return expected size of a compressed texture.
+ */
+static GLuint
+compressed_tex_size(GLsizei width, GLsizei height, GLsizei depth,
+ GLenum glformat)
+{
+ gl_format mesaFormat = _mesa_glenum_to_compressed_format(glformat);
+ return _mesa_format_image_size(mesaFormat, width, height, depth);
+}
+
+
+/*
+ * Return compressed texture block size, in pixels.
+ */
+static void
+get_compressed_block_size(GLenum glformat, GLuint *bw, GLuint *bh)
+{
+ gl_format mesaFormat = _mesa_glenum_to_compressed_format(glformat);
+ _mesa_get_format_block_size(mesaFormat, bw, bh);
+}
+
+
+/**
+ * Error checking for glCompressedTexImage[123]D().
+ * \return error code or GL_NO_ERROR.
+ */
+static GLenum
+compressed_texture_error_check(struct gl_context *ctx, GLint dimensions,
+ GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLsizei height, GLsizei depth, GLint border,
+ GLsizei imageSize)
+{
+ const GLenum proxyTarget = get_proxy_target(target);
+ const GLint maxLevels = _mesa_max_texture_levels(ctx, target);
+ GLint expectedSize;
+
+ /* check level */
+ if (level < 0 || level >= maxLevels)
+ return GL_INVALID_VALUE;
+
+ if (!target_can_be_compressed(ctx, target, internalFormat)) {
+ return GL_INVALID_ENUM;
+ }
+
+ /* This will detect any invalid internalFormat value */
+ if (!_mesa_is_compressed_format(ctx, internalFormat))
+ return GL_INVALID_ENUM;
+
+ /* This should really never fail */
+ if (_mesa_base_tex_format(ctx, internalFormat) < 0)
+ return GL_INVALID_ENUM;
+
+ /* No compressed formats support borders at this time */
+ if (border != 0)
+ return GL_INVALID_VALUE;
+
+ /* For cube map, width must equal height */
+ if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB &&
+ target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB && width != height)
+ return GL_INVALID_VALUE;
+
+ /* check image size against compression block size */
+ {
+ gl_format texFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, internalFormat,
+ GL_NONE, GL_NONE);
+ GLuint bw, bh;
+
+ _mesa_get_format_block_size(texFormat, &bw, &bh);
+ if ((width > bw && width % bw > 0) ||
+ (height > bh && height % bh > 0)) {
+ /*
+ * Per GL_ARB_texture_compression: GL_INVALID_OPERATION is
+ * generated [...] if any parameter combinations are not
+ * supported by the specific compressed internal format.
+ */
+ return GL_INVALID_OPERATION;
+ }
+ }
+
+ /* check image sizes */
+ if (!ctx->Driver.TestProxyTexImage(ctx, proxyTarget, level,
+ internalFormat, GL_NONE, GL_NONE,
+ width, height, depth, border)) {
+ /* See error comment above */
+ return GL_INVALID_OPERATION;
+ }
+
+ /* check image size in bytes */
+ expectedSize = compressed_tex_size(width, height, depth, internalFormat);
+ if (expectedSize != imageSize) {
+ /* Per GL_ARB_texture_compression: GL_INVALID_VALUE is generated [...]
+ * if <imageSize> is not consistent with the format, dimensions, and
+ * contents of the specified image.
+ */
+ return GL_INVALID_VALUE;
+ }
+
+ return GL_NO_ERROR;
+}
+
+
+/**
+ * Error checking for glCompressedTexSubImage[123]D().
+ * \warning There are some bad assumptions here about the size of compressed
+ * texture tiles (multiple of 4) used to test the validity of the
+ * offset and size parameters.
+ * \return error code or GL_NO_ERROR.
+ */
+static GLenum
+compressed_subtexture_error_check(struct gl_context *ctx, GLint dimensions,
+ GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLsizei imageSize)
+{
+ GLint expectedSize, maxLevels = 0, maxTextureSize;
+ GLuint bw, bh;
+ (void) zoffset;
+
+ if (dimensions == 1) {
+ /* 1D compressed textures not allowed */
+ return GL_INVALID_ENUM;
+ }
+ else if (dimensions == 2) {
+ if (target == GL_PROXY_TEXTURE_2D) {
+ maxLevels = ctx->Const.MaxTextureLevels;
+ }
+ else if (target == GL_TEXTURE_2D) {
+ maxLevels = ctx->Const.MaxTextureLevels;
+ }
+ else if (target == GL_PROXY_TEXTURE_CUBE_MAP_ARB) {
+ if (!ctx->Extensions.ARB_texture_cube_map)
+ return GL_INVALID_ENUM; /*target*/
+ maxLevels = ctx->Const.MaxCubeTextureLevels;
+ }
+ else if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB &&
+ target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) {
+ if (!ctx->Extensions.ARB_texture_cube_map)
+ return GL_INVALID_ENUM; /*target*/
+ maxLevels = ctx->Const.MaxCubeTextureLevels;
+ }
+ else {
+ return GL_INVALID_ENUM; /*target*/
+ }
+ }
+ else if (dimensions == 3) {
+ /* 3D compressed textures not allowed */
+ return GL_INVALID_ENUM;
+ }
+
+ maxTextureSize = 1 << (maxLevels - 1);
+
+ /* this will catch any invalid compressed format token */
+ if (!_mesa_is_compressed_format(ctx, format))
+ return GL_INVALID_ENUM;
+
+ if (width < 1 || width > maxTextureSize)
+ return GL_INVALID_VALUE;
+
+ if ((height < 1 || height > maxTextureSize)
+ && dimensions > 1)
+ return GL_INVALID_VALUE;
+
+ if (level < 0 || level >= maxLevels)
+ return GL_INVALID_VALUE;
+
+ /*
+ * do checks which depend on compression block size
+ */
+ get_compressed_block_size(format, &bw, &bh);
+
+ if ((xoffset % bw != 0) || (yoffset % bh != 0))
+ return GL_INVALID_VALUE;
+
+ if ((width % bw != 0) && width != 2 && width != 1)
+ return GL_INVALID_VALUE;
+
+ if ((height % bh != 0) && height != 2 && height != 1)
+ return GL_INVALID_VALUE;
+
+ expectedSize = compressed_tex_size(width, height, depth, format);
+ if (expectedSize != imageSize)
+ return GL_INVALID_VALUE;
+
+ return GL_NO_ERROR;
+}
+
+
+/**
+ * Do second part of glCompressedTexSubImage error checking.
+ * \return GL_TRUE if error found, GL_FALSE otherwise.
+ */
+static GLboolean
+compressed_subtexture_error_check2(struct gl_context *ctx, GLuint dims,
+ GLsizei width, GLsizei height,
+ GLsizei depth, GLenum format,
+ struct gl_texture_image *texImage)
+{
+
+ if ((GLint) format != texImage->InternalFormat) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glCompressedTexSubImage%uD(format=0x%x)", dims, format);
+ return GL_TRUE;
+ }
+
+ if (((width == 1 || width == 2) &&
+ width != (GLsizei) texImage->Width) ||
+ (width > (GLsizei) texImage->Width)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCompressedTexSubImage%uD(width=%d)", dims, width);
+ return GL_TRUE;
+ }
+
+ if (dims >= 2) {
+ if (((height == 1 || height == 2) &&
+ height != (GLsizei) texImage->Height) ||
+ (height > (GLsizei) texImage->Height)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCompressedTexSubImage%uD(height=%d)", dims, height);
+ return GL_TRUE;
+ }
+ }
+
+ if (dims >= 3) {
+ if (((depth == 1 || depth == 2) &&
+ depth != (GLsizei) texImage->Depth) ||
+ (depth > (GLsizei) texImage->Depth)) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glCompressedTexSubImage%uD(depth=%d)", dims, depth);
+ return GL_TRUE;
+ }
+ }
+
+ return GL_FALSE;
+}
+
+
+/**
+ * Implementation of the glCompressedTexImage1/2/3D() functions.
+ */
+static void
+compressedteximage(struct gl_context *ctx, GLuint dims,
+ GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLsizei height, GLsizei depth, GLint border,
+ GLsizei imageSize, const GLvoid *data)
+{
+ GLenum error;
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
+ _mesa_debug(ctx,
+ "glCompressedTexImage%uDARB %s %d %s %d %d %d %d %d %p\n",
+ dims,
+ _mesa_lookup_enum_by_nr(target), level,
+ _mesa_lookup_enum_by_nr(internalFormat),
+ width, height, depth, border, imageSize, data);
+
+ /* check target */
+ if (!legal_teximage_target(ctx, dims, target)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glCompressedTexImage%uD(target=%s)",
+ dims, _mesa_lookup_enum_by_nr(target));
+ return;
+ }
+
+ error = compressed_texture_error_check(ctx, dims, target, level,
+ internalFormat, width, height, depth,
+ border, imageSize);
+
+#if FEATURE_ES
+ /* XXX this is kind of a hack */
+ if (error) {
+ _mesa_error(ctx, error, "glTexImage2D");
+ return;
+ }
+
+ if (dims == 2) {
+ switch (internalFormat) {
+ case GL_PALETTE4_RGB8_OES:
+ case GL_PALETTE4_RGBA8_OES:
+ case GL_PALETTE4_R5_G6_B5_OES:
+ case GL_PALETTE4_RGBA4_OES:
+ case GL_PALETTE4_RGB5_A1_OES:
+ case GL_PALETTE8_RGB8_OES:
+ case GL_PALETTE8_RGBA8_OES:
+ case GL_PALETTE8_R5_G6_B5_OES:
+ case GL_PALETTE8_RGBA4_OES:
+ case GL_PALETTE8_RGB5_A1_OES:
+ _mesa_cpal_compressed_teximage2d(target, level, internalFormat,
+ width, height, imageSize, data);
+ return;
+ }
+ }
+#endif
+
+ if (_mesa_is_proxy_texture(target)) {
+ /* Proxy texture: just check for errors and update proxy state */
+ struct gl_texture_image *texImage;
+
+ if (!error) {
+ struct gl_texture_object *texObj =
+ _mesa_get_current_tex_object(ctx, target);
+ gl_format texFormat =
+ _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, GL_NONE, GL_NONE);
+ if (!legal_texture_size(ctx, texFormat, width, height, depth)) {
+ error = GL_OUT_OF_MEMORY;
+ }
+ }
+
+ texImage = _mesa_get_proxy_tex_image(ctx, target, level);
+ if (texImage) {
+ if (error) {
+ /* if error, clear all proxy texture image parameters */
+ clear_teximage_fields(texImage);
+ }
+ else {
+ /* no error: store the teximage parameters */
+ _mesa_init_teximage_fields(ctx, target, texImage, width, height,
+ depth, border, internalFormat,
+ MESA_FORMAT_NONE);
+ }
+ }
+ }
+ else {
+ /* non-proxy target */
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+
+ if (error) {
+ _mesa_error(ctx, error, "glCompressedTexImage%uD", dims);
+ return;
+ }
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_get_tex_image(ctx, texObj, target, level);
+ if (!texImage) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY,
+ "glCompressedTexImage%uD", dims);
+ }
+ else {
+ gl_format texFormat;
+
+ if (texImage->Data) {
+ ctx->Driver.FreeTexImageData( ctx, texImage );
+ }
+ ASSERT(texImage->Data == NULL);
+
+ texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
+ internalFormat, GL_NONE,
+ GL_NONE);
+
+ if (legal_texture_size(ctx, texFormat, width, height, depth)) {
+ _mesa_init_teximage_fields(ctx, target, texImage,
+ width, height, depth,
+ border, internalFormat, texFormat);
+
+ switch (dims) {
+ case 1:
+ ASSERT(ctx->Driver.CompressedTexImage1D);
+ ctx->Driver.CompressedTexImage1D(ctx, target, level,
+ internalFormat,
+ width,
+ border, imageSize, data,
+ texObj, texImage);
+ break;
+ case 2:
+ ASSERT(ctx->Driver.CompressedTexImage2D);
+ ctx->Driver.CompressedTexImage2D(ctx, target, level,
+ internalFormat,
+ width, height,
+ border, imageSize, data,
+ texObj, texImage);
+ break;
+ case 3:
+ ASSERT(ctx->Driver.CompressedTexImage3D);
+ ctx->Driver.CompressedTexImage3D(ctx, target, level,
+ internalFormat,
+ width, height, depth,
+ border, imageSize, data,
+ texObj, texImage);
+ break;
+ default:
+ _mesa_problem(ctx, "bad dims in compressedteximage");
+ }
+
+ check_gen_mipmap(ctx, target, texObj, level);
+
+ /* state update */
+ texObj->_Complete = GL_FALSE;
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ else {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY,
+ "glCompressedTexImage%uD", dims);
+ }
+ }
+ }
+ _mesa_unlock_texture(ctx, texObj);
+ }
+}
+
+
+void GLAPIENTRY
+_mesa_CompressedTexImage1DARB(GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLint border, GLsizei imageSize,
+ const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ compressedteximage(ctx, 1, target, level, internalFormat,
+ width, 1, 1, border, imageSize, data);
+}
+
+
+void GLAPIENTRY
+_mesa_CompressedTexImage2DARB(GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLsizei height, GLint border, GLsizei imageSize,
+ const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ compressedteximage(ctx, 2, target, level, internalFormat,
+ width, height, 1, border, imageSize, data);
+}
+
+
+void GLAPIENTRY
+_mesa_CompressedTexImage3DARB(GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLsizei height, GLsizei depth, GLint border,
+ GLsizei imageSize, const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ compressedteximage(ctx, 3, target, level, internalFormat,
+ width, height, depth, border, imageSize, data);
+}
+
+
+/**
+ * Common helper for glCompressedTexSubImage1/2/3D().
+ */
+static void
+compressed_tex_sub_image(GLuint dims, GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+ GLenum error;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ error = compressed_subtexture_error_check(ctx, dims, target, level,
+ xoffset, 0, 0, /* pos */
+ width, height, depth, /* size */
+ format, imageSize);
+ if (error) {
+ _mesa_error(ctx, error, "glCompressedTexSubImage%uD", dims);
+ return;
+ }
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ texImage = _mesa_select_tex_image(ctx, texObj, target, level);
+ assert(texImage);
+
+ if (compressed_subtexture_error_check2(ctx, dims, width, height, depth,
+ format, texImage)) {
+ /* error was recorded */
+ }
+ else if (width > 0 && height > 0 && depth > 0) {
+ switch (dims) {
+ case 1:
+ if (ctx->Driver.CompressedTexSubImage1D) {
+ ctx->Driver.CompressedTexSubImage1D(ctx, target, level,
+ xoffset, width,
+ format, imageSize, data,
+ texObj, texImage);
+ }
+ break;
+ case 2:
+ if (ctx->Driver.CompressedTexSubImage2D) {
+ ctx->Driver.CompressedTexSubImage2D(ctx, target, level,
+ xoffset, yoffset,
+ width, height,
+ format, imageSize, data,
+ texObj, texImage);
+ }
+ break;
+ case 3:
+ if (ctx->Driver.CompressedTexSubImage3D) {
+ ctx->Driver.CompressedTexSubImage3D(ctx, target, level,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ format, imageSize, data,
+ texObj, texImage);
+ }
+ break;
+ default:
+ ;
+ }
+
+ check_gen_mipmap(ctx, target, texObj, level);
+
+ ctx->NewState |= _NEW_TEXTURE;
+ }
+ }
+ _mesa_unlock_texture(ctx, texObj);
+}
+
+
+void GLAPIENTRY
+_mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
+ GLsizei width, GLenum format,
+ GLsizei imageSize, const GLvoid *data)
+{
+ compressed_tex_sub_image(1, target, level, xoffset, 0, 0, width, 1, 1,
+ format, imageSize, data);
+}
+
+
+void GLAPIENTRY
+_mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
+ GLint yoffset, GLsizei width, GLsizei height,
+ GLenum format, GLsizei imageSize,
+ const GLvoid *data)
+{
+ compressed_tex_sub_image(2, target, level, xoffset, yoffset, 0,
+ width, height, 1, format, imageSize, data);
+}
+
+
+void GLAPIENTRY
+_mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
+ GLint yoffset, GLint zoffset, GLsizei width,
+ GLsizei height, GLsizei depth, GLenum format,
+ GLsizei imageSize, const GLvoid *data)
+{
+ compressed_tex_sub_image(3, target, level, xoffset, yoffset, zoffset,
+ width, height, depth, format, imageSize, data);
+}
+
+
+/**
+ * Helper for glTexBuffer(). Check if internalFormat is legal. If so,
+ * return the basic data type and number of components for the format.
+ * \param return GL_TRUE if internalFormat is legal, GL_FALSE otherwise
+ */
+static GLboolean
+get_sized_format_info(const struct gl_context *ctx, GLenum internalFormat,
+ GLenum *datatype, GLuint *components)
+{
+ switch (internalFormat) {
+ case GL_ALPHA8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *components = 1;
+ break;
+ case GL_ALPHA16:
+ *datatype = GL_UNSIGNED_SHORT;
+ *components = 1;
+ break;
+ case GL_ALPHA16F_ARB:
+ *datatype = GL_HALF_FLOAT;
+ *components = 1;
+ break;
+ case GL_ALPHA32F_ARB:
+ *datatype = GL_FLOAT;
+ *components = 1;
+ break;
+ case GL_ALPHA8I_EXT:
+ *datatype = GL_BYTE;
+ *components = 1;
+ break;
+ case GL_ALPHA16I_EXT:
+ *datatype = GL_SHORT;
+ *components = 1;
+ break;
+ case GL_ALPHA32I_EXT:
+ *datatype = GL_INT;
+ *components = 1;
+ break;
+ case GL_ALPHA8UI_EXT:
+ *datatype = GL_UNSIGNED_BYTE;
+ *components = 1;
+ break;
+ case GL_ALPHA16UI_EXT:
+ *datatype = GL_UNSIGNED_SHORT;
+ *components = 1;
+ break;
+ case GL_ALPHA32UI_EXT:
+ *datatype = GL_UNSIGNED_INT;
+ *components = 1;
+ break;
+ case GL_LUMINANCE8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *components = 1;
+ break;
+ case GL_LUMINANCE16:
+ *datatype = GL_UNSIGNED_SHORT;
+ *components = 1;
+ break;
+ case GL_LUMINANCE16F_ARB:
+ *datatype = GL_HALF_FLOAT;
+ *components = 1;
+ break;
+ case GL_LUMINANCE32F_ARB:
+ *datatype = GL_FLOAT;
+ *components = 1;
+ break;
+ case GL_LUMINANCE8I_EXT:
+ *datatype = GL_BYTE;
+ *components = 1;
+ break;
+ case GL_LUMINANCE16I_EXT:
+ *datatype = GL_SHORT;
+ *components = 1;
+ break;
+ case GL_LUMINANCE32I_EXT:
+ *datatype = GL_INT;
+ *components = 1;
+ break;
+ case GL_LUMINANCE8UI_EXT:
+ *datatype = GL_UNSIGNED_BYTE;
+ *components = 1;
+ break;
+ case GL_LUMINANCE16UI_EXT:
+ *datatype = GL_UNSIGNED_SHORT;
+ *components = 1;
+ break;
+ case GL_LUMINANCE32UI_EXT:
+ *datatype = GL_UNSIGNED_INT;
+ *components = 1;
+ break;
+ case GL_LUMINANCE8_ALPHA8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *components = 2;
+ break;
+ case GL_LUMINANCE16_ALPHA16:
+ *datatype = GL_UNSIGNED_SHORT;
+ *components = 2;
+ break;
+ case GL_LUMINANCE_ALPHA16F_ARB:
+ *datatype = GL_HALF_FLOAT;
+ *components = 2;
+ break;
+ case GL_LUMINANCE_ALPHA32F_ARB:
+ *datatype = GL_FLOAT;
+ *components = 2;
+ break;
+ case GL_LUMINANCE_ALPHA8I_EXT:
+ *datatype = GL_BYTE;
+ *components = 2;
+ break;
+ case GL_LUMINANCE_ALPHA16I_EXT:
+ *datatype = GL_SHORT;
+ *components = 2;
+ break;
+ case GL_LUMINANCE_ALPHA32I_EXT:
+ *datatype = GL_INT;
+ *components = 2;
+ break;
+ case GL_LUMINANCE_ALPHA8UI_EXT:
+ *datatype = GL_UNSIGNED_BYTE;
+ *components = 2;
+ break;
+ case GL_LUMINANCE_ALPHA16UI_EXT:
+ *datatype = GL_UNSIGNED_SHORT;
+ *components = 2;
+ break;
+ case GL_LUMINANCE_ALPHA32UI_EXT:
+ *datatype = GL_UNSIGNED_INT;
+ *components = 2;
+ break;
+ case GL_INTENSITY8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *components = 1;
+ break;
+ case GL_INTENSITY16:
+ *datatype = GL_UNSIGNED_SHORT;
+ *components = 1;
+ break;
+ case GL_INTENSITY16F_ARB:
+ *datatype = GL_HALF_FLOAT;
+ *components = 1;
+ break;
+ case GL_INTENSITY32F_ARB:
+ *datatype = GL_FLOAT;
+ *components = 1;
+ break;
+ case GL_INTENSITY8I_EXT:
+ *datatype = GL_BYTE;
+ *components = 1;
+ break;
+ case GL_INTENSITY16I_EXT:
+ *datatype = GL_SHORT;
+ *components = 1;
+ break;
+ case GL_INTENSITY32I_EXT:
+ *datatype = GL_INT;
+ *components = 1;
+ break;
+ case GL_INTENSITY8UI_EXT:
+ *datatype = GL_UNSIGNED_BYTE;
+ *components = 1;
+ break;
+ case GL_INTENSITY16UI_EXT:
+ *datatype = GL_UNSIGNED_SHORT;
+ *components = 1;
+ break;
+ case GL_INTENSITY32UI_EXT:
+ *datatype = GL_UNSIGNED_INT;
+ *components = 1;
+ break;
+ case GL_RGBA8:
+ *datatype = GL_UNSIGNED_BYTE;
+ *components = 4;
+ break;
+ case GL_RGBA16:
+ *datatype = GL_UNSIGNED_SHORT;
+ *components = 4;
+ break;
+ case GL_RGBA16F_ARB:
+ *datatype = GL_HALF_FLOAT;
+ *components = 4;
+ break;
+ case GL_RGBA32F_ARB:
+ *datatype = GL_FLOAT;
+ *components = 4;
+ break;
+ case GL_RGBA8I_EXT:
+ *datatype = GL_BYTE;
+ *components = 4;
+ break;
+ case GL_RGBA16I_EXT:
+ *datatype = GL_SHORT;
+ *components = 4;
+ break;
+ case GL_RGBA32I_EXT:
+ *datatype = GL_INT;
+ *components = 4;
+ break;
+ case GL_RGBA8UI_EXT:
+ *datatype = GL_UNSIGNED_BYTE;
+ *components = 4;
+ break;
+ case GL_RGBA16UI_EXT:
+ *datatype = GL_UNSIGNED_SHORT;
+ *components = 4;
+ break;
+ case GL_RGBA32UI_EXT:
+ *datatype = GL_UNSIGNED_INT;
+ *components = 4;
+ break;
+ default:
+ return GL_FALSE;
+ }
+
+ if (*datatype == GL_FLOAT && !ctx->Extensions.ARB_texture_float)
+ return GL_FALSE;
+
+ if (*datatype == GL_HALF_FLOAT && !ctx->Extensions.ARB_half_float_pixel)
+ return GL_FALSE;
+
+ return GL_TRUE;
+}
+
+
+/** GL_ARB_texture_buffer_object */
+void GLAPIENTRY
+_mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer)
+{
+ struct gl_texture_object *texObj;
+ struct gl_buffer_object *bufObj;
+ GLenum dataType;
+ GLuint comps;
+
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ if (!ctx->Extensions.ARB_texture_buffer_object) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glTexBuffer");
+ return;
+ }
+
+ if (target != GL_TEXTURE_BUFFER_ARB) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glTexBuffer(target)");
+ return;
+ }
+
+ if (!get_sized_format_info(ctx, internalFormat, &dataType, &comps)) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glTexBuffer(internalFormat 0x%x)",
+ internalFormat);
+ return;
+ }
+
+ bufObj = _mesa_lookup_bufferobj(ctx, buffer);
+ if (buffer && !bufObj) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glTexBuffer(buffer %u)", buffer);
+ return;
+ }
+
+ texObj = _mesa_get_current_tex_object(ctx, target);
+
+ _mesa_lock_texture(ctx, texObj);
+ {
+ _mesa_reference_buffer_object(ctx, &texObj->BufferObject, bufObj);
+ texObj->BufferObjectFormat = internalFormat;
+ }
+ _mesa_unlock_texture(ctx, texObj);
+}
diff --git a/mesalib/src/mesa/main/teximage.h b/mesalib/src/mesa/main/teximage.h index 6ee78c461..b59961eaf 100644 --- a/mesalib/src/mesa/main/teximage.h +++ b/mesalib/src/mesa/main/teximage.h @@ -59,7 +59,8 @@ _mesa_new_texture_image( struct gl_context *ctx ); extern void
-_mesa_delete_texture_image( struct gl_context *ctx, struct gl_texture_image *teximage );
+_mesa_delete_texture_image( struct gl_context *ctx,
+ struct gl_texture_image *teximage );
extern void
_mesa_free_texture_image_data( struct gl_context *ctx,
@@ -82,7 +83,8 @@ _mesa_choose_texture_format(struct gl_context *ctx, extern void
-_mesa_clear_texture_image(struct gl_context *ctx, struct gl_texture_image *texImage);
+_mesa_clear_texture_image(struct gl_context *ctx,
+ struct gl_texture_image *texImage);
extern void
@@ -92,7 +94,8 @@ _mesa_set_tex_image(struct gl_texture_object *tObj, extern struct gl_texture_object *
-_mesa_select_tex_object(struct gl_context *ctx, const struct gl_texture_unit *texUnit,
+_mesa_select_tex_object(struct gl_context *ctx,
+ const struct gl_texture_unit *texUnit,
GLenum target);
extern struct gl_texture_object *
@@ -100,7 +103,8 @@ _mesa_get_current_tex_object(struct gl_context *ctx, GLenum target); extern struct gl_texture_image *
-_mesa_select_tex_image(struct gl_context *ctx, const struct gl_texture_object *texObj,
+_mesa_select_tex_image(struct gl_context *ctx,
+ const struct gl_texture_object *texObj,
GLenum target, GLint level);
@@ -271,6 +275,11 @@ _mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, GLsizei height, GLsizei depth, GLenum format,
GLsizei imageSize, const GLvoid *data);
+
+extern void GLAPIENTRY
+_mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer);
+
+
/*@}*/
#endif
diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c index c1e3e4dec..e08842ff6 100644 --- a/mesalib/src/mesa/main/texobj.c +++ b/mesalib/src/mesa/main/texobj.c @@ -1,1267 +1,1274 @@ -/** - * \file texobj.c - * Texture object management. - */ - -/* - * Mesa 3-D graphics library - * Version: 7.1 - * - * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - - -#include "mfeatures.h" -#include "colortab.h" -#include "context.h" -#include "enums.h" -#include "fbobject.h" -#include "formats.h" -#include "hash.h" -#include "imports.h" -#include "macros.h" -#include "teximage.h" -#include "texobj.h" -#include "texstate.h" -#include "mtypes.h" -#include "program/prog_instruction.h" - - - -/**********************************************************************/ -/** \name Internal functions */ -/*@{*/ - - -/** - * Return the gl_texture_object for a given ID. - */ -struct gl_texture_object * -_mesa_lookup_texture(struct gl_context *ctx, GLuint id) -{ - return (struct gl_texture_object *) - _mesa_HashLookup(ctx->Shared->TexObjects, id); -} - - - -/** - * Allocate and initialize a new texture object. But don't put it into the - * texture object hash table. - * - * Called via ctx->Driver.NewTextureObject, unless overridden by a device - * driver. - * - * \param shared the shared GL state structure to contain the texture object - * \param name integer name for the texture object - * \param target either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, - * GL_TEXTURE_CUBE_MAP_ARB or GL_TEXTURE_RECTANGLE_NV. zero is ok for the sake - * of GenTextures() - * - * \return pointer to new texture object. - */ -struct gl_texture_object * -_mesa_new_texture_object( struct gl_context *ctx, GLuint name, GLenum target ) -{ - struct gl_texture_object *obj; - (void) ctx; - obj = MALLOC_STRUCT(gl_texture_object); - _mesa_initialize_texture_object(obj, name, target); - return obj; -} - - -/** - * Initialize a new texture object to default values. - * \param obj the texture object - * \param name the texture name - * \param target the texture target - */ -void -_mesa_initialize_texture_object( struct gl_texture_object *obj, - GLuint name, GLenum target ) -{ - ASSERT(target == 0 || - target == GL_TEXTURE_1D || - target == GL_TEXTURE_2D || - target == GL_TEXTURE_3D || - target == GL_TEXTURE_CUBE_MAP_ARB || - target == GL_TEXTURE_RECTANGLE_NV || - target == GL_TEXTURE_1D_ARRAY_EXT || - target == GL_TEXTURE_2D_ARRAY_EXT); - - memset(obj, 0, sizeof(*obj)); - /* init the non-zero fields */ - _glthread_INIT_MUTEX(obj->Mutex); - obj->RefCount = 1; - obj->Name = name; - obj->Target = target; - obj->Priority = 1.0F; - if (target == GL_TEXTURE_RECTANGLE_NV) { - obj->WrapS = GL_CLAMP_TO_EDGE; - obj->WrapT = GL_CLAMP_TO_EDGE; - obj->WrapR = GL_CLAMP_TO_EDGE; - obj->MinFilter = GL_LINEAR; - } - else { - obj->WrapS = GL_REPEAT; - obj->WrapT = GL_REPEAT; - obj->WrapR = GL_REPEAT; - obj->MinFilter = GL_NEAREST_MIPMAP_LINEAR; - } - obj->MagFilter = GL_LINEAR; - obj->MinLod = -1000.0; - obj->MaxLod = 1000.0; - obj->LodBias = 0.0; - obj->BaseLevel = 0; - obj->MaxLevel = 1000; - obj->MaxAnisotropy = 1.0; - obj->CompareMode = GL_NONE; /* ARB_shadow */ - obj->CompareFunc = GL_LEQUAL; /* ARB_shadow */ - obj->CompareFailValue = 0.0F; /* ARB_shadow_ambient */ - obj->DepthMode = GL_LUMINANCE; /* ARB_depth_texture */ - obj->Swizzle[0] = GL_RED; - obj->Swizzle[1] = GL_GREEN; - obj->Swizzle[2] = GL_BLUE; - obj->Swizzle[3] = GL_ALPHA; - obj->_Swizzle = SWIZZLE_NOOP; - obj->sRGBDecode = GL_DECODE_EXT; -} - - -/** - * Some texture initialization can't be finished until we know which - * target it's getting bound to (GL_TEXTURE_1D/2D/etc). - */ -static void -finish_texture_init(struct gl_context *ctx, GLenum target, - struct gl_texture_object *obj) -{ - assert(obj->Target == 0); - - if (target == GL_TEXTURE_RECTANGLE_NV) { - /* have to init wrap and filter state here - kind of klunky */ - obj->WrapS = GL_CLAMP_TO_EDGE; - obj->WrapT = GL_CLAMP_TO_EDGE; - obj->WrapR = GL_CLAMP_TO_EDGE; - obj->MinFilter = GL_LINEAR; - if (ctx->Driver.TexParameter) { - static const GLfloat fparam_wrap[1] = {(GLfloat) GL_CLAMP_TO_EDGE}; - static const GLfloat fparam_filter[1] = {(GLfloat) GL_LINEAR}; - ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_WRAP_S, fparam_wrap); - ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_WRAP_T, fparam_wrap); - ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_WRAP_R, fparam_wrap); - ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_MIN_FILTER, fparam_filter); - } - } -} - - -/** - * Deallocate a texture object struct. It should have already been - * removed from the texture object pool. - * Called via ctx->Driver.DeleteTexture() if not overriden by a driver. - * - * \param shared the shared GL state to which the object belongs. - * \param texObj the texture object to delete. - */ -void -_mesa_delete_texture_object(struct gl_context *ctx, - struct gl_texture_object *texObj) -{ - GLuint i, face; - - /* Set Target to an invalid value. With some assertions elsewhere - * we can try to detect possible use of deleted textures. - */ - texObj->Target = 0x99; - - _mesa_free_colortable_data(&texObj->Palette); - - /* free the texture images */ - for (face = 0; face < 6; face++) { - for (i = 0; i < MAX_TEXTURE_LEVELS; i++) { - if (texObj->Image[face][i]) { - _mesa_delete_texture_image( ctx, texObj->Image[face][i] ); - } - } - } - - /* destroy the mutex -- it may have allocated memory (eg on bsd) */ - _glthread_DESTROY_MUTEX(texObj->Mutex); - - /* free this object */ - free(texObj); -} - - - -/** - * Copy texture object state from one texture object to another. - * Use for glPush/PopAttrib. - * - * \param dest destination texture object. - * \param src source texture object. - */ -void -_mesa_copy_texture_object( struct gl_texture_object *dest, - const struct gl_texture_object *src ) -{ - dest->Target = src->Target; - dest->Name = src->Name; - dest->Priority = src->Priority; - dest->BorderColor.f[0] = src->BorderColor.f[0]; - dest->BorderColor.f[1] = src->BorderColor.f[1]; - dest->BorderColor.f[2] = src->BorderColor.f[2]; - dest->BorderColor.f[3] = src->BorderColor.f[3]; - dest->WrapS = src->WrapS; - dest->WrapT = src->WrapT; - dest->WrapR = src->WrapR; - dest->MinFilter = src->MinFilter; - dest->MagFilter = src->MagFilter; - dest->MinLod = src->MinLod; - dest->MaxLod = src->MaxLod; - dest->LodBias = src->LodBias; - dest->BaseLevel = src->BaseLevel; - dest->MaxLevel = src->MaxLevel; - dest->MaxAnisotropy = src->MaxAnisotropy; - dest->CompareMode = src->CompareMode; - dest->CompareFunc = src->CompareFunc; - dest->CompareFailValue = src->CompareFailValue; - dest->DepthMode = src->DepthMode; - dest->_MaxLevel = src->_MaxLevel; - dest->_MaxLambda = src->_MaxLambda; - dest->GenerateMipmap = src->GenerateMipmap; - dest->Palette = src->Palette; - dest->_Complete = src->_Complete; - COPY_4V(dest->Swizzle, src->Swizzle); - dest->_Swizzle = src->_Swizzle; -} - - -/** - * Free all texture images of the given texture object. - * - * \param ctx GL context. - * \param t texture object. - * - * \sa _mesa_clear_texture_image(). - */ -void -_mesa_clear_texture_object(struct gl_context *ctx, - struct gl_texture_object *texObj) -{ - GLuint i, j; - - if (texObj->Target == 0) - return; - - for (i = 0; i < MAX_FACES; i++) { - for (j = 0; j < MAX_TEXTURE_LEVELS; j++) { - struct gl_texture_image *texImage = texObj->Image[i][j]; - if (texImage) - _mesa_clear_texture_image(ctx, texImage); - } - } -} - - -/** - * Check if the given texture object is valid by examining its Target field. - * For debugging only. - */ -static GLboolean -valid_texture_object(const struct gl_texture_object *tex) -{ - switch (tex->Target) { - case 0: - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_TEXTURE_3D: - case GL_TEXTURE_CUBE_MAP_ARB: - case GL_TEXTURE_RECTANGLE_NV: - case GL_TEXTURE_1D_ARRAY_EXT: - case GL_TEXTURE_2D_ARRAY_EXT: - return GL_TRUE; - case 0x99: - _mesa_problem(NULL, "invalid reference to a deleted texture object"); - return GL_FALSE; - default: - _mesa_problem(NULL, "invalid texture object Target 0x%x, Id = %u", - tex->Target, tex->Name); - return GL_FALSE; - } -} - - -/** - * Reference (or unreference) a texture object. - * If '*ptr', decrement *ptr's refcount (and delete if it becomes zero). - * If 'tex' is non-null, increment its refcount. - */ -void -_mesa_reference_texobj(struct gl_texture_object **ptr, - struct gl_texture_object *tex) -{ - assert(ptr); - if (*ptr == tex) { - /* no change */ - return; - } - - if (*ptr) { - /* Unreference the old texture */ - GLboolean deleteFlag = GL_FALSE; - struct gl_texture_object *oldTex = *ptr; - - ASSERT(valid_texture_object(oldTex)); - (void) valid_texture_object; /* silence warning in release builds */ - - _glthread_LOCK_MUTEX(oldTex->Mutex); - ASSERT(oldTex->RefCount > 0); - oldTex->RefCount--; - - deleteFlag = (oldTex->RefCount == 0); - _glthread_UNLOCK_MUTEX(oldTex->Mutex); - - if (deleteFlag) { - GET_CURRENT_CONTEXT(ctx); - if (ctx) - ctx->Driver.DeleteTexture(ctx, oldTex); - else - _mesa_problem(NULL, "Unable to delete texture, no context"); - } - - *ptr = NULL; - } - assert(!*ptr); - - if (tex) { - /* reference new texture */ - ASSERT(valid_texture_object(tex)); - _glthread_LOCK_MUTEX(tex->Mutex); - if (tex->RefCount == 0) { - /* this texture's being deleted (look just above) */ - /* Not sure this can every really happen. Warn if it does. */ - _mesa_problem(NULL, "referencing deleted texture object"); - *ptr = NULL; - } - else { - tex->RefCount++; - *ptr = tex; - } - _glthread_UNLOCK_MUTEX(tex->Mutex); - } -} - - - -/** - * Mark a texture object as incomplete. - * \param t texture object - * \param fmt... string describing why it's incomplete (for debugging). - */ -static void -incomplete(struct gl_texture_object *t, const char *fmt, ...) -{ -#if 0 - va_list args; - char s[100]; - - va_start(args, fmt); - vsnprintf(s, sizeof(s), fmt, args); - va_end(args); - - printf("Texture Obj %d incomplete because: %s\n", t->Name, s); -#endif - t->_Complete = GL_FALSE; -} - - -/** - * Examine a texture object to determine if it is complete. - * - * The gl_texture_object::Complete flag will be set to GL_TRUE or GL_FALSE - * accordingly. - * - * \param ctx GL context. - * \param t texture object. - * - * According to the texture target, verifies that each of the mipmaps is - * present and has the expected size. - */ -void -_mesa_test_texobj_completeness( const struct gl_context *ctx, - struct gl_texture_object *t ) -{ - const GLint baseLevel = t->BaseLevel; - GLint maxLog2 = 0, maxLevels = 0; - - t->_Complete = GL_TRUE; /* be optimistic */ - - /* Detect cases where the application set the base level to an invalid - * value. - */ - if ((baseLevel < 0) || (baseLevel >= MAX_TEXTURE_LEVELS)) { - incomplete(t, "base level = %d is invalid", baseLevel); - return; - } - - /* Always need the base level image */ - if (!t->Image[0][baseLevel]) { - incomplete(t, "Image[baseLevel=%d] == NULL", baseLevel); - return; - } - - /* Check width/height/depth for zero */ - if (t->Image[0][baseLevel]->Width == 0 || - t->Image[0][baseLevel]->Height == 0 || - t->Image[0][baseLevel]->Depth == 0) { - incomplete(t, "texture width = 0"); - return; - } - - /* Compute _MaxLevel */ - if ((t->Target == GL_TEXTURE_1D) || - (t->Target == GL_TEXTURE_1D_ARRAY_EXT)) { - maxLog2 = t->Image[0][baseLevel]->WidthLog2; - maxLevels = ctx->Const.MaxTextureLevels; - } - else if ((t->Target == GL_TEXTURE_2D) || - (t->Target == GL_TEXTURE_2D_ARRAY_EXT)) { - maxLog2 = MAX2(t->Image[0][baseLevel]->WidthLog2, - t->Image[0][baseLevel]->HeightLog2); - maxLevels = ctx->Const.MaxTextureLevels; - } - else if (t->Target == GL_TEXTURE_3D) { - GLint max = MAX2(t->Image[0][baseLevel]->WidthLog2, - t->Image[0][baseLevel]->HeightLog2); - maxLog2 = MAX2(max, (GLint)(t->Image[0][baseLevel]->DepthLog2)); - maxLevels = ctx->Const.Max3DTextureLevels; - } - else if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) { - maxLog2 = MAX2(t->Image[0][baseLevel]->WidthLog2, - t->Image[0][baseLevel]->HeightLog2); - maxLevels = ctx->Const.MaxCubeTextureLevels; - } - else if (t->Target == GL_TEXTURE_RECTANGLE_NV) { - maxLog2 = 0; /* not applicable */ - maxLevels = 1; /* no mipmapping */ - } - else { - _mesa_problem(ctx, "Bad t->Target in _mesa_test_texobj_completeness"); - return; - } - - ASSERT(maxLevels > 0); - - if (t->MaxLevel < t->BaseLevel) { - incomplete(t, "MAX_LEVEL (%d) < BASE_LEVEL (%d)", - t->MaxLevel, t->BaseLevel); - return; - } - - t->_MaxLevel = baseLevel + maxLog2; - t->_MaxLevel = MIN2(t->_MaxLevel, t->MaxLevel); - t->_MaxLevel = MIN2(t->_MaxLevel, maxLevels - 1); - - /* Compute _MaxLambda = q - b (see the 1.2 spec) used during mipmapping */ - t->_MaxLambda = (GLfloat) (t->_MaxLevel - t->BaseLevel); - - if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) { - /* make sure that all six cube map level 0 images are the same size */ - const GLuint w = t->Image[0][baseLevel]->Width2; - const GLuint h = t->Image[0][baseLevel]->Height2; - GLuint face; - for (face = 1; face < 6; face++) { - if (t->Image[face][baseLevel] == NULL || - t->Image[face][baseLevel]->Width2 != w || - t->Image[face][baseLevel]->Height2 != h) { - incomplete(t, "Cube face missing or mismatched size"); - return; - } - } - } - - /* extra checking for mipmaps */ - if (t->MinFilter != GL_NEAREST && t->MinFilter != GL_LINEAR) { - /* - * Mipmapping: determine if we have a complete set of mipmaps - */ - GLint i; - GLint minLevel = baseLevel; - GLint maxLevel = t->_MaxLevel; - - if (minLevel > maxLevel) { - incomplete(t, "minLevel > maxLevel"); - return; - } - - /* Test dimension-independent attributes */ - for (i = minLevel; i <= maxLevel; i++) { - if (t->Image[0][i]) { - if (t->Image[0][i]->TexFormat != t->Image[0][baseLevel]->TexFormat) { - incomplete(t, "Format[i] != Format[baseLevel]"); - return; - } - if (t->Image[0][i]->Border != t->Image[0][baseLevel]->Border) { - incomplete(t, "Border[i] != Border[baseLevel]"); - return; - } - } - } - - /* Test things which depend on number of texture image dimensions */ - if ((t->Target == GL_TEXTURE_1D) || - (t->Target == GL_TEXTURE_1D_ARRAY_EXT)) { - /* Test 1-D mipmaps */ - GLuint width = t->Image[0][baseLevel]->Width2; - for (i = baseLevel + 1; i < maxLevels; i++) { - if (width > 1) { - width /= 2; - } - if (i >= minLevel && i <= maxLevel) { - if (!t->Image[0][i]) { - incomplete(t, "1D Image[0][i] == NULL"); - return; - } - if (t->Image[0][i]->Width2 != width ) { - incomplete(t, "1D Image[0][i] bad width"); - return; - } - } - if (width == 1) { - return; /* found smallest needed mipmap, all done! */ - } - } - } - else if ((t->Target == GL_TEXTURE_2D) || - (t->Target == GL_TEXTURE_2D_ARRAY_EXT)) { - /* Test 2-D mipmaps */ - GLuint width = t->Image[0][baseLevel]->Width2; - GLuint height = t->Image[0][baseLevel]->Height2; - for (i = baseLevel + 1; i < maxLevels; i++) { - if (width > 1) { - width /= 2; - } - if (height > 1) { - height /= 2; - } - if (i >= minLevel && i <= maxLevel) { - if (!t->Image[0][i]) { - incomplete(t, "2D Image[0][i] == NULL"); - return; - } - if (t->Image[0][i]->Width2 != width) { - incomplete(t, "2D Image[0][i] bad width"); - return; - } - if (t->Image[0][i]->Height2 != height) { - incomplete(t, "2D Image[0][i] bad height"); - return; - } - if (width==1 && height==1) { - return; /* found smallest needed mipmap, all done! */ - } - } - } - } - else if (t->Target == GL_TEXTURE_3D) { - /* Test 3-D mipmaps */ - GLuint width = t->Image[0][baseLevel]->Width2; - GLuint height = t->Image[0][baseLevel]->Height2; - GLuint depth = t->Image[0][baseLevel]->Depth2; - for (i = baseLevel + 1; i < maxLevels; i++) { - if (width > 1) { - width /= 2; - } - if (height > 1) { - height /= 2; - } - if (depth > 1) { - depth /= 2; - } - if (i >= minLevel && i <= maxLevel) { - if (!t->Image[0][i]) { - incomplete(t, "3D Image[0][i] == NULL"); - return; - } - if (t->Image[0][i]->_BaseFormat == GL_DEPTH_COMPONENT) { - incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex"); - return; - } - if (t->Image[0][i]->Width2 != width) { - incomplete(t, "3D Image[0][i] bad width"); - return; - } - if (t->Image[0][i]->Height2 != height) { - incomplete(t, "3D Image[0][i] bad height"); - return; - } - if (t->Image[0][i]->Depth2 != depth) { - incomplete(t, "3D Image[0][i] bad depth"); - return; - } - } - if (width == 1 && height == 1 && depth == 1) { - return; /* found smallest needed mipmap, all done! */ - } - } - } - else if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) { - /* make sure 6 cube faces are consistant */ - GLuint width = t->Image[0][baseLevel]->Width2; - GLuint height = t->Image[0][baseLevel]->Height2; - for (i = baseLevel + 1; i < maxLevels; i++) { - if (width > 1) { - width /= 2; - } - if (height > 1) { - height /= 2; - } - if (i >= minLevel && i <= maxLevel) { - GLuint face; - for (face = 0; face < 6; face++) { - /* check that we have images defined */ - if (!t->Image[face][i]) { - incomplete(t, "CubeMap Image[n][i] == NULL"); - return; - } - /* Don't support GL_DEPTH_COMPONENT for cube maps */ - if (t->Image[face][i]->_BaseFormat == GL_DEPTH_COMPONENT) { - incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex"); - return; - } - /* check that all six images have same size */ - if (t->Image[face][i]->Width2 != width || - t->Image[face][i]->Height2 != height) { - incomplete(t, "CubeMap Image[n][i] bad size"); - return; - } - } - } - if (width == 1 && height == 1) { - return; /* found smallest needed mipmap, all done! */ - } - } - } - else if (t->Target == GL_TEXTURE_RECTANGLE_NV) { - /* XXX special checking? */ - } - else { - /* Target = ??? */ - _mesa_problem(ctx, "Bug in gl_test_texture_object_completeness\n"); - } - } -} - - -/** - * Check if the given cube map texture is "cube complete" as defined in - * the OpenGL specification. - */ -GLboolean -_mesa_cube_complete(const struct gl_texture_object *texObj) -{ - const GLint baseLevel = texObj->BaseLevel; - const struct gl_texture_image *img0, *img; - GLuint face; - - if (texObj->Target != GL_TEXTURE_CUBE_MAP) - return GL_FALSE; - - if ((baseLevel < 0) || (baseLevel >= MAX_TEXTURE_LEVELS)) - return GL_FALSE; - - /* check first face */ - img0 = texObj->Image[0][baseLevel]; - if (!img0 || - img0->Width < 1 || - img0->Width != img0->Height) - return GL_FALSE; - - /* check remaining faces vs. first face */ - for (face = 1; face < 6; face++) { - img = texObj->Image[face][baseLevel]; - if (!img || - img->Width != img0->Width || - img->Height != img0->Height || - img->TexFormat != img0->TexFormat) - return GL_FALSE; - } - - return GL_TRUE; -} - - -/** - * Mark a texture object dirty. It forces the object to be incomplete - * and optionally forces the context to re-validate its state. - * - * \param ctx GL context. - * \param texObj texture object. - * \param invalidate_state also invalidate context state. - */ -void -_mesa_dirty_texobj(struct gl_context *ctx, struct gl_texture_object *texObj, - GLboolean invalidate_state) -{ - texObj->_Complete = GL_FALSE; - if (invalidate_state) - ctx->NewState |= _NEW_TEXTURE; -} - - -/** - * Return pointer to a default/fallback texture. - * The texture is a 2D 8x8 RGBA texture with all texels = (0,0,0,1). - * That's the value a sampler should get when sampling from an - * incomplete texture. - */ -struct gl_texture_object * -_mesa_get_fallback_texture(struct gl_context *ctx) -{ - if (!ctx->Shared->FallbackTex) { - /* create fallback texture now */ - static GLubyte texels[8 * 8][4]; - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - gl_format texFormat; - GLuint i; - - for (i = 0; i < 8 * 8; i++) { - texels[i][0] = - texels[i][1] = - texels[i][2] = 0x0; - texels[i][3] = 0xff; - } - - /* create texture object */ - texObj = ctx->Driver.NewTextureObject(ctx, 0, GL_TEXTURE_2D); - assert(texObj->RefCount == 1); - texObj->MinFilter = GL_NEAREST; - texObj->MagFilter = GL_NEAREST; - - /* create level[0] texture image */ - texImage = _mesa_get_tex_image(ctx, texObj, GL_TEXTURE_2D, 0); - - texFormat = ctx->Driver.ChooseTextureFormat(ctx, GL_RGBA, GL_RGBA, - GL_UNSIGNED_BYTE); - - /* init the image fields */ - _mesa_init_teximage_fields(ctx, GL_TEXTURE_2D, texImage, - 8, 8, 1, 0, GL_RGBA, texFormat); - - ASSERT(texImage->TexFormat != MESA_FORMAT_NONE); - - /* set image data */ - ctx->Driver.TexImage2D(ctx, GL_TEXTURE_2D, 0, GL_RGBA, - 8, 8, 0, - GL_RGBA, GL_UNSIGNED_BYTE, texels, - &ctx->DefaultPacking, texObj, texImage); - - _mesa_test_texobj_completeness(ctx, texObj); - assert(texObj->_Complete); - - ctx->Shared->FallbackTex = texObj; - } - return ctx->Shared->FallbackTex; -} - - -/*@}*/ - - -/***********************************************************************/ -/** \name API functions */ -/*@{*/ - - -/** - * Generate texture names. - * - * \param n number of texture names to be generated. - * \param textures an array in which will hold the generated texture names. - * - * \sa glGenTextures(). - * - * Calls _mesa_HashFindFreeKeyBlock() to find a block of free texture - * IDs which are stored in \p textures. Corresponding empty texture - * objects are also generated. - */ -void GLAPIENTRY -_mesa_GenTextures( GLsizei n, GLuint *textures ) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint first; - GLint i; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (n < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glGenTextures" ); - return; - } - - if (!textures) - return; - - /* - * This must be atomic (generation and allocation of texture IDs) - */ - _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - - first = _mesa_HashFindFreeKeyBlock(ctx->Shared->TexObjects, n); - - /* Allocate new, empty texture objects */ - for (i = 0; i < n; i++) { - struct gl_texture_object *texObj; - GLuint name = first + i; - GLenum target = 0; - texObj = (*ctx->Driver.NewTextureObject)( ctx, name, target); - if (!texObj) { - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenTextures"); - return; - } - - /* insert into hash table */ - _mesa_HashInsert(ctx->Shared->TexObjects, texObj->Name, texObj); - - textures[i] = name; - } - - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); -} - - -/** - * Check if the given texture object is bound to the current draw or - * read framebuffer. If so, Unbind it. - */ -static void -unbind_texobj_from_fbo(struct gl_context *ctx, - struct gl_texture_object *texObj) -{ - const GLuint n = (ctx->DrawBuffer == ctx->ReadBuffer) ? 1 : 2; - GLuint i; - - for (i = 0; i < n; i++) { - struct gl_framebuffer *fb = (i == 0) ? ctx->DrawBuffer : ctx->ReadBuffer; - if (fb->Name) { - GLuint j; - for (j = 0; j < BUFFER_COUNT; j++) { - if (fb->Attachment[j].Type == GL_TEXTURE && - fb->Attachment[j].Texture == texObj) { - _mesa_remove_attachment(ctx, fb->Attachment + j); - } - } - } - } -} - - -/** - * Check if the given texture object is bound to any texture image units and - * unbind it if so (revert to default textures). - */ -static void -unbind_texobj_from_texunits(struct gl_context *ctx, - struct gl_texture_object *texObj) -{ - GLuint u, tex; - - for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++) { - struct gl_texture_unit *unit = &ctx->Texture.Unit[u]; - for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { - if (texObj == unit->CurrentTex[tex]) { - _mesa_reference_texobj(&unit->CurrentTex[tex], - ctx->Shared->DefaultTex[tex]); - ASSERT(unit->CurrentTex[tex]); - break; - } - } - } -} - - -/** - * Delete named textures. - * - * \param n number of textures to be deleted. - * \param textures array of texture IDs to be deleted. - * - * \sa glDeleteTextures(). - * - * If we're about to delete a texture that's currently bound to any - * texture unit, unbind the texture first. Decrement the reference - * count on the texture object and delete it if it's zero. - * Recall that texture objects can be shared among several rendering - * contexts. - */ -void GLAPIENTRY -_mesa_DeleteTextures( GLsizei n, const GLuint *textures) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* too complex */ - - if (!textures) - return; - - for (i = 0; i < n; i++) { - if (textures[i] > 0) { - struct gl_texture_object *delObj - = _mesa_lookup_texture(ctx, textures[i]); - - if (delObj) { - _mesa_lock_texture(ctx, delObj); - - /* Check if texture is bound to any framebuffer objects. - * If so, unbind. - * See section 4.4.2.3 of GL_EXT_framebuffer_object. - */ - unbind_texobj_from_fbo(ctx, delObj); - - /* Check if this texture is currently bound to any texture units. - * If so, unbind it. - */ - unbind_texobj_from_texunits(ctx, delObj); - - _mesa_unlock_texture(ctx, delObj); - - ctx->NewState |= _NEW_TEXTURE; - - /* The texture _name_ is now free for re-use. - * Remove it from the hash table now. - */ - _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - _mesa_HashRemove(ctx->Shared->TexObjects, delObj->Name); - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - - /* Unreference the texobj. If refcount hits zero, the texture - * will be deleted. - */ - _mesa_reference_texobj(&delObj, NULL); - } - } - } -} - - -/** - * Convert a GL texture target enum such as GL_TEXTURE_2D or GL_TEXTURE_3D - * into the corresponding Mesa texture target index. - * Note that proxy targets are not valid here. - * \return TEXTURE_x_INDEX or -1 if target is invalid - */ -static GLint -target_enum_to_index(GLenum target) -{ - switch (target) { - case GL_TEXTURE_1D: - return TEXTURE_1D_INDEX; - case GL_TEXTURE_2D: - return TEXTURE_2D_INDEX; - case GL_TEXTURE_3D: - return TEXTURE_3D_INDEX; - case GL_TEXTURE_CUBE_MAP_ARB: - return TEXTURE_CUBE_INDEX; - case GL_TEXTURE_RECTANGLE_NV: - return TEXTURE_RECT_INDEX; - case GL_TEXTURE_1D_ARRAY_EXT: - return TEXTURE_1D_ARRAY_INDEX; - case GL_TEXTURE_2D_ARRAY_EXT: - return TEXTURE_2D_ARRAY_INDEX; - default: - return -1; - } -} - - -/** - * Bind a named texture to a texturing target. - * - * \param target texture target. - * \param texName texture name. - * - * \sa glBindTexture(). - * - * Determines the old texture object bound and returns immediately if rebinding - * the same texture. Get the current texture which is either a default texture - * if name is null, a named texture from the hash, or a new texture if the - * given texture name is new. Increments its reference count, binds it, and - * calls dd_function_table::BindTexture. Decrements the old texture reference - * count and deletes it if it reaches zero. - */ -void GLAPIENTRY -_mesa_BindTexture( GLenum target, GLuint texName ) -{ - GET_CURRENT_CONTEXT(ctx); - struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx); - struct gl_texture_object *newTexObj = NULL; - GLint targetIndex; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glBindTexture %s %d\n", - _mesa_lookup_enum_by_nr(target), (GLint) texName); - - targetIndex = target_enum_to_index(target); - if (targetIndex < 0) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBindTexture(target)"); - return; - } - assert(targetIndex < NUM_TEXTURE_TARGETS); - - /* - * Get pointer to new texture object (newTexObj) - */ - if (texName == 0) { - /* Use a default texture object */ - newTexObj = ctx->Shared->DefaultTex[targetIndex]; - } - else { - /* non-default texture object */ - newTexObj = _mesa_lookup_texture(ctx, texName); - if (newTexObj) { - /* error checking */ - if (newTexObj->Target != 0 && newTexObj->Target != target) { - /* the named texture object's target doesn't match the given target */ - _mesa_error( ctx, GL_INVALID_OPERATION, - "glBindTexture(target mismatch)" ); - return; - } - if (newTexObj->Target == 0) { - finish_texture_init(ctx, target, newTexObj); - } - } - else { - /* if this is a new texture id, allocate a texture object now */ - newTexObj = (*ctx->Driver.NewTextureObject)(ctx, texName, target); - if (!newTexObj) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindTexture"); - return; - } - - /* and insert it into hash table */ - _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - _mesa_HashInsert(ctx->Shared->TexObjects, texName, newTexObj); - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - } - newTexObj->Target = target; - } - - assert(valid_texture_object(newTexObj)); - - /* Check if this texture is only used by this context and is already bound. - * If so, just return. - */ - { - GLboolean early_out; - _glthread_LOCK_MUTEX(ctx->Shared->Mutex); - early_out = ((ctx->Shared->RefCount == 1) - && (newTexObj == texUnit->CurrentTex[targetIndex])); - _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex); - if (early_out) { - return; - } - } - - /* flush before changing binding */ - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - - /* Do the actual binding. The refcount on the previously bound - * texture object will be decremented. It'll be deleted if the - * count hits zero. - */ - _mesa_reference_texobj(&texUnit->CurrentTex[targetIndex], newTexObj); - ASSERT(texUnit->CurrentTex[targetIndex]); - - /* Pass BindTexture call to device driver */ - if (ctx->Driver.BindTexture) - (*ctx->Driver.BindTexture)( ctx, target, newTexObj ); -} - - -/** - * Set texture priorities. - * - * \param n number of textures. - * \param texName texture names. - * \param priorities corresponding texture priorities. - * - * \sa glPrioritizeTextures(). - * - * Looks up each texture in the hash, clamps the corresponding priority between - * 0.0 and 1.0, and calls dd_function_table::PrioritizeTexture. - */ -void GLAPIENTRY -_mesa_PrioritizeTextures( GLsizei n, const GLuint *texName, - const GLclampf *priorities ) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (n < 0) { - _mesa_error( ctx, GL_INVALID_VALUE, "glPrioritizeTextures" ); - return; - } - - if (!priorities) - return; - - for (i = 0; i < n; i++) { - if (texName[i] > 0) { - struct gl_texture_object *t = _mesa_lookup_texture(ctx, texName[i]); - if (t) { - t->Priority = CLAMP( priorities[i], 0.0F, 1.0F ); - } - } - } - - ctx->NewState |= _NEW_TEXTURE; -} - - - -/** - * See if textures are loaded in texture memory. - * - * \param n number of textures to query. - * \param texName array with the texture names. - * \param residences array which will hold the residence status. - * - * \return GL_TRUE if all textures are resident and \p residences is left unchanged, - * - * \sa glAreTexturesResident(). - * - * Looks up each texture in the hash and calls - * dd_function_table::IsTextureResident. - */ -GLboolean GLAPIENTRY -_mesa_AreTexturesResident(GLsizei n, const GLuint *texName, - GLboolean *residences) -{ - GET_CURRENT_CONTEXT(ctx); - GLboolean allResident = GL_TRUE; - GLint i, j; - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - - if (n < 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(n)"); - return GL_FALSE; - } - - if (!texName || !residences) - return GL_FALSE; - - for (i = 0; i < n; i++) { - struct gl_texture_object *t; - if (texName[i] == 0) { - _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident"); - return GL_FALSE; - } - t = _mesa_lookup_texture(ctx, texName[i]); - if (!t) { - _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident"); - return GL_FALSE; - } - if (!ctx->Driver.IsTextureResident || - ctx->Driver.IsTextureResident(ctx, t)) { - /* The texture is resident */ - if (!allResident) - residences[i] = GL_TRUE; - } - else { - /* The texture is not resident */ - if (allResident) { - allResident = GL_FALSE; - for (j = 0; j < i; j++) - residences[j] = GL_TRUE; - } - residences[i] = GL_FALSE; - } - } - - return allResident; -} - - -/** - * See if a name corresponds to a texture. - * - * \param texture texture name. - * - * \return GL_TRUE if texture name corresponds to a texture, or GL_FALSE - * otherwise. - * - * \sa glIsTexture(). - * - * Calls _mesa_HashLookup(). - */ -GLboolean GLAPIENTRY -_mesa_IsTexture( GLuint texture ) -{ - struct gl_texture_object *t; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE); - - if (!texture) - return GL_FALSE; - - t = _mesa_lookup_texture(ctx, texture); - - /* IsTexture is true only after object has been bound once. */ - return t && t->Target; -} - - -/** - * Simplest implementation of texture locking: grab the shared tex - * mutex. Examine the shared context state timestamp and if there has - * been a change, set the appropriate bits in ctx->NewState. - * - * This is used to deal with synchronizing things when a texture object - * is used/modified by different contexts (or threads) which are sharing - * the texture. - * - * See also _mesa_lock/unlock_texture() in teximage.h - */ -void -_mesa_lock_context_textures( struct gl_context *ctx ) -{ - _glthread_LOCK_MUTEX(ctx->Shared->TexMutex); - - if (ctx->Shared->TextureStateStamp != ctx->TextureStateTimestamp) { - ctx->NewState |= _NEW_TEXTURE; - ctx->TextureStateTimestamp = ctx->Shared->TextureStateStamp; - } -} - - -void -_mesa_unlock_context_textures( struct gl_context *ctx ) -{ - assert(ctx->Shared->TextureStateStamp == ctx->TextureStateTimestamp); - _glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex); -} - -/*@}*/ +/**
+ * \file texobj.c
+ * Texture object management.
+ */
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
+ *
+ * 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
+ * BRIAN PAUL 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.
+ */
+
+
+#include "mfeatures.h"
+#include "bufferobj.h"
+#include "colortab.h"
+#include "context.h"
+#include "enums.h"
+#include "fbobject.h"
+#include "formats.h"
+#include "hash.h"
+#include "imports.h"
+#include "macros.h"
+#include "teximage.h"
+#include "texobj.h"
+#include "texstate.h"
+#include "mtypes.h"
+#include "program/prog_instruction.h"
+
+
+
+/**********************************************************************/
+/** \name Internal functions */
+/*@{*/
+
+
+/**
+ * Return the gl_texture_object for a given ID.
+ */
+struct gl_texture_object *
+_mesa_lookup_texture(struct gl_context *ctx, GLuint id)
+{
+ return (struct gl_texture_object *)
+ _mesa_HashLookup(ctx->Shared->TexObjects, id);
+}
+
+
+
+/**
+ * Allocate and initialize a new texture object. But don't put it into the
+ * texture object hash table.
+ *
+ * Called via ctx->Driver.NewTextureObject, unless overridden by a device
+ * driver.
+ *
+ * \param shared the shared GL state structure to contain the texture object
+ * \param name integer name for the texture object
+ * \param target either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D,
+ * GL_TEXTURE_CUBE_MAP_ARB or GL_TEXTURE_RECTANGLE_NV. zero is ok for the sake
+ * of GenTextures()
+ *
+ * \return pointer to new texture object.
+ */
+struct gl_texture_object *
+_mesa_new_texture_object( struct gl_context *ctx, GLuint name, GLenum target )
+{
+ struct gl_texture_object *obj;
+ (void) ctx;
+ obj = MALLOC_STRUCT(gl_texture_object);
+ _mesa_initialize_texture_object(obj, name, target);
+ return obj;
+}
+
+
+/**
+ * Initialize a new texture object to default values.
+ * \param obj the texture object
+ * \param name the texture name
+ * \param target the texture target
+ */
+void
+_mesa_initialize_texture_object( struct gl_texture_object *obj,
+ GLuint name, GLenum target )
+{
+ ASSERT(target == 0 ||
+ target == GL_TEXTURE_1D ||
+ target == GL_TEXTURE_2D ||
+ target == GL_TEXTURE_3D ||
+ target == GL_TEXTURE_CUBE_MAP_ARB ||
+ target == GL_TEXTURE_RECTANGLE_NV ||
+ target == GL_TEXTURE_1D_ARRAY_EXT ||
+ target == GL_TEXTURE_2D_ARRAY_EXT ||
+ target == GL_TEXTURE_BUFFER);
+
+ memset(obj, 0, sizeof(*obj));
+ /* init the non-zero fields */
+ _glthread_INIT_MUTEX(obj->Mutex);
+ obj->RefCount = 1;
+ obj->Name = name;
+ obj->Target = target;
+ obj->Priority = 1.0F;
+ if (target == GL_TEXTURE_RECTANGLE_NV) {
+ obj->WrapS = GL_CLAMP_TO_EDGE;
+ obj->WrapT = GL_CLAMP_TO_EDGE;
+ obj->WrapR = GL_CLAMP_TO_EDGE;
+ obj->MinFilter = GL_LINEAR;
+ }
+ else {
+ obj->WrapS = GL_REPEAT;
+ obj->WrapT = GL_REPEAT;
+ obj->WrapR = GL_REPEAT;
+ obj->MinFilter = GL_NEAREST_MIPMAP_LINEAR;
+ }
+ obj->MagFilter = GL_LINEAR;
+ obj->MinLod = -1000.0;
+ obj->MaxLod = 1000.0;
+ obj->LodBias = 0.0;
+ obj->BaseLevel = 0;
+ obj->MaxLevel = 1000;
+ obj->MaxAnisotropy = 1.0;
+ obj->CompareMode = GL_NONE; /* ARB_shadow */
+ obj->CompareFunc = GL_LEQUAL; /* ARB_shadow */
+ obj->CompareFailValue = 0.0F; /* ARB_shadow_ambient */
+ obj->DepthMode = GL_LUMINANCE; /* ARB_depth_texture */
+ obj->Swizzle[0] = GL_RED;
+ obj->Swizzle[1] = GL_GREEN;
+ obj->Swizzle[2] = GL_BLUE;
+ obj->Swizzle[3] = GL_ALPHA;
+ obj->_Swizzle = SWIZZLE_NOOP;
+ obj->sRGBDecode = GL_DECODE_EXT;
+}
+
+
+/**
+ * Some texture initialization can't be finished until we know which
+ * target it's getting bound to (GL_TEXTURE_1D/2D/etc).
+ */
+static void
+finish_texture_init(struct gl_context *ctx, GLenum target,
+ struct gl_texture_object *obj)
+{
+ assert(obj->Target == 0);
+
+ if (target == GL_TEXTURE_RECTANGLE_NV) {
+ /* have to init wrap and filter state here - kind of klunky */
+ obj->WrapS = GL_CLAMP_TO_EDGE;
+ obj->WrapT = GL_CLAMP_TO_EDGE;
+ obj->WrapR = GL_CLAMP_TO_EDGE;
+ obj->MinFilter = GL_LINEAR;
+ if (ctx->Driver.TexParameter) {
+ static const GLfloat fparam_wrap[1] = {(GLfloat) GL_CLAMP_TO_EDGE};
+ static const GLfloat fparam_filter[1] = {(GLfloat) GL_LINEAR};
+ ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_WRAP_S, fparam_wrap);
+ ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_WRAP_T, fparam_wrap);
+ ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_WRAP_R, fparam_wrap);
+ ctx->Driver.TexParameter(ctx, target, obj, GL_TEXTURE_MIN_FILTER, fparam_filter);
+ }
+ }
+}
+
+
+/**
+ * Deallocate a texture object struct. It should have already been
+ * removed from the texture object pool.
+ * Called via ctx->Driver.DeleteTexture() if not overriden by a driver.
+ *
+ * \param shared the shared GL state to which the object belongs.
+ * \param texObj the texture object to delete.
+ */
+void
+_mesa_delete_texture_object(struct gl_context *ctx,
+ struct gl_texture_object *texObj)
+{
+ GLuint i, face;
+
+ /* Set Target to an invalid value. With some assertions elsewhere
+ * we can try to detect possible use of deleted textures.
+ */
+ texObj->Target = 0x99;
+
+ _mesa_free_colortable_data(&texObj->Palette);
+
+ /* free the texture images */
+ for (face = 0; face < 6; face++) {
+ for (i = 0; i < MAX_TEXTURE_LEVELS; i++) {
+ if (texObj->Image[face][i]) {
+ _mesa_delete_texture_image( ctx, texObj->Image[face][i] );
+ }
+ }
+ }
+
+ _mesa_reference_buffer_object(ctx, &texObj->BufferObject, NULL);
+
+ /* destroy the mutex -- it may have allocated memory (eg on bsd) */
+ _glthread_DESTROY_MUTEX(texObj->Mutex);
+
+ /* free this object */
+ free(texObj);
+}
+
+
+
+/**
+ * Copy texture object state from one texture object to another.
+ * Use for glPush/PopAttrib.
+ *
+ * \param dest destination texture object.
+ * \param src source texture object.
+ */
+void
+_mesa_copy_texture_object( struct gl_texture_object *dest,
+ const struct gl_texture_object *src )
+{
+ dest->Target = src->Target;
+ dest->Name = src->Name;
+ dest->Priority = src->Priority;
+ dest->BorderColor.f[0] = src->BorderColor.f[0];
+ dest->BorderColor.f[1] = src->BorderColor.f[1];
+ dest->BorderColor.f[2] = src->BorderColor.f[2];
+ dest->BorderColor.f[3] = src->BorderColor.f[3];
+ dest->WrapS = src->WrapS;
+ dest->WrapT = src->WrapT;
+ dest->WrapR = src->WrapR;
+ dest->MinFilter = src->MinFilter;
+ dest->MagFilter = src->MagFilter;
+ dest->MinLod = src->MinLod;
+ dest->MaxLod = src->MaxLod;
+ dest->LodBias = src->LodBias;
+ dest->BaseLevel = src->BaseLevel;
+ dest->MaxLevel = src->MaxLevel;
+ dest->MaxAnisotropy = src->MaxAnisotropy;
+ dest->CompareMode = src->CompareMode;
+ dest->CompareFunc = src->CompareFunc;
+ dest->CompareFailValue = src->CompareFailValue;
+ dest->DepthMode = src->DepthMode;
+ dest->_MaxLevel = src->_MaxLevel;
+ dest->_MaxLambda = src->_MaxLambda;
+ dest->GenerateMipmap = src->GenerateMipmap;
+ dest->Palette = src->Palette;
+ dest->_Complete = src->_Complete;
+ COPY_4V(dest->Swizzle, src->Swizzle);
+ dest->_Swizzle = src->_Swizzle;
+}
+
+
+/**
+ * Free all texture images of the given texture object.
+ *
+ * \param ctx GL context.
+ * \param t texture object.
+ *
+ * \sa _mesa_clear_texture_image().
+ */
+void
+_mesa_clear_texture_object(struct gl_context *ctx,
+ struct gl_texture_object *texObj)
+{
+ GLuint i, j;
+
+ if (texObj->Target == 0)
+ return;
+
+ for (i = 0; i < MAX_FACES; i++) {
+ for (j = 0; j < MAX_TEXTURE_LEVELS; j++) {
+ struct gl_texture_image *texImage = texObj->Image[i][j];
+ if (texImage)
+ _mesa_clear_texture_image(ctx, texImage);
+ }
+ }
+}
+
+
+/**
+ * Check if the given texture object is valid by examining its Target field.
+ * For debugging only.
+ */
+static GLboolean
+valid_texture_object(const struct gl_texture_object *tex)
+{
+ switch (tex->Target) {
+ case 0:
+ case GL_TEXTURE_1D:
+ case GL_TEXTURE_2D:
+ case GL_TEXTURE_3D:
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ case GL_TEXTURE_RECTANGLE_NV:
+ case GL_TEXTURE_1D_ARRAY_EXT:
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ case GL_TEXTURE_BUFFER:
+ return GL_TRUE;
+ case 0x99:
+ _mesa_problem(NULL, "invalid reference to a deleted texture object");
+ return GL_FALSE;
+ default:
+ _mesa_problem(NULL, "invalid texture object Target 0x%x, Id = %u",
+ tex->Target, tex->Name);
+ return GL_FALSE;
+ }
+}
+
+
+/**
+ * Reference (or unreference) a texture object.
+ * If '*ptr', decrement *ptr's refcount (and delete if it becomes zero).
+ * If 'tex' is non-null, increment its refcount.
+ */
+void
+_mesa_reference_texobj(struct gl_texture_object **ptr,
+ struct gl_texture_object *tex)
+{
+ assert(ptr);
+ if (*ptr == tex) {
+ /* no change */
+ return;
+ }
+
+ if (*ptr) {
+ /* Unreference the old texture */
+ GLboolean deleteFlag = GL_FALSE;
+ struct gl_texture_object *oldTex = *ptr;
+
+ ASSERT(valid_texture_object(oldTex));
+ (void) valid_texture_object; /* silence warning in release builds */
+
+ _glthread_LOCK_MUTEX(oldTex->Mutex);
+ ASSERT(oldTex->RefCount > 0);
+ oldTex->RefCount--;
+
+ deleteFlag = (oldTex->RefCount == 0);
+ _glthread_UNLOCK_MUTEX(oldTex->Mutex);
+
+ if (deleteFlag) {
+ GET_CURRENT_CONTEXT(ctx);
+ if (ctx)
+ ctx->Driver.DeleteTexture(ctx, oldTex);
+ else
+ _mesa_problem(NULL, "Unable to delete texture, no context");
+ }
+
+ *ptr = NULL;
+ }
+ assert(!*ptr);
+
+ if (tex) {
+ /* reference new texture */
+ ASSERT(valid_texture_object(tex));
+ _glthread_LOCK_MUTEX(tex->Mutex);
+ if (tex->RefCount == 0) {
+ /* this texture's being deleted (look just above) */
+ /* Not sure this can every really happen. Warn if it does. */
+ _mesa_problem(NULL, "referencing deleted texture object");
+ *ptr = NULL;
+ }
+ else {
+ tex->RefCount++;
+ *ptr = tex;
+ }
+ _glthread_UNLOCK_MUTEX(tex->Mutex);
+ }
+}
+
+
+
+/**
+ * Mark a texture object as incomplete.
+ * \param t texture object
+ * \param fmt... string describing why it's incomplete (for debugging).
+ */
+static void
+incomplete(struct gl_texture_object *t, const char *fmt, ...)
+{
+#if 0
+ va_list args;
+ char s[100];
+
+ va_start(args, fmt);
+ vsnprintf(s, sizeof(s), fmt, args);
+ va_end(args);
+
+ printf("Texture Obj %d incomplete because: %s\n", t->Name, s);
+#endif
+ t->_Complete = GL_FALSE;
+}
+
+
+/**
+ * Examine a texture object to determine if it is complete.
+ *
+ * The gl_texture_object::Complete flag will be set to GL_TRUE or GL_FALSE
+ * accordingly.
+ *
+ * \param ctx GL context.
+ * \param t texture object.
+ *
+ * According to the texture target, verifies that each of the mipmaps is
+ * present and has the expected size.
+ */
+void
+_mesa_test_texobj_completeness( const struct gl_context *ctx,
+ struct gl_texture_object *t )
+{
+ const GLint baseLevel = t->BaseLevel;
+ GLint maxLog2 = 0, maxLevels = 0;
+
+ t->_Complete = GL_TRUE; /* be optimistic */
+
+ /* Detect cases where the application set the base level to an invalid
+ * value.
+ */
+ if ((baseLevel < 0) || (baseLevel >= MAX_TEXTURE_LEVELS)) {
+ incomplete(t, "base level = %d is invalid", baseLevel);
+ return;
+ }
+
+ /* Always need the base level image */
+ if (!t->Image[0][baseLevel]) {
+ incomplete(t, "Image[baseLevel=%d] == NULL", baseLevel);
+ return;
+ }
+
+ /* Check width/height/depth for zero */
+ if (t->Image[0][baseLevel]->Width == 0 ||
+ t->Image[0][baseLevel]->Height == 0 ||
+ t->Image[0][baseLevel]->Depth == 0) {
+ incomplete(t, "texture width = 0");
+ return;
+ }
+
+ /* Compute _MaxLevel */
+ if ((t->Target == GL_TEXTURE_1D) ||
+ (t->Target == GL_TEXTURE_1D_ARRAY_EXT)) {
+ maxLog2 = t->Image[0][baseLevel]->WidthLog2;
+ maxLevels = ctx->Const.MaxTextureLevels;
+ }
+ else if ((t->Target == GL_TEXTURE_2D) ||
+ (t->Target == GL_TEXTURE_2D_ARRAY_EXT)) {
+ maxLog2 = MAX2(t->Image[0][baseLevel]->WidthLog2,
+ t->Image[0][baseLevel]->HeightLog2);
+ maxLevels = ctx->Const.MaxTextureLevels;
+ }
+ else if (t->Target == GL_TEXTURE_3D) {
+ GLint max = MAX2(t->Image[0][baseLevel]->WidthLog2,
+ t->Image[0][baseLevel]->HeightLog2);
+ maxLog2 = MAX2(max, (GLint)(t->Image[0][baseLevel]->DepthLog2));
+ maxLevels = ctx->Const.Max3DTextureLevels;
+ }
+ else if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) {
+ maxLog2 = MAX2(t->Image[0][baseLevel]->WidthLog2,
+ t->Image[0][baseLevel]->HeightLog2);
+ maxLevels = ctx->Const.MaxCubeTextureLevels;
+ }
+ else if (t->Target == GL_TEXTURE_RECTANGLE_NV) {
+ maxLog2 = 0; /* not applicable */
+ maxLevels = 1; /* no mipmapping */
+ }
+ else {
+ _mesa_problem(ctx, "Bad t->Target in _mesa_test_texobj_completeness");
+ return;
+ }
+
+ ASSERT(maxLevels > 0);
+
+ if (t->MaxLevel < t->BaseLevel) {
+ incomplete(t, "MAX_LEVEL (%d) < BASE_LEVEL (%d)",
+ t->MaxLevel, t->BaseLevel);
+ return;
+ }
+
+ t->_MaxLevel = baseLevel + maxLog2;
+ t->_MaxLevel = MIN2(t->_MaxLevel, t->MaxLevel);
+ t->_MaxLevel = MIN2(t->_MaxLevel, maxLevels - 1);
+
+ /* Compute _MaxLambda = q - b (see the 1.2 spec) used during mipmapping */
+ t->_MaxLambda = (GLfloat) (t->_MaxLevel - t->BaseLevel);
+
+ if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) {
+ /* make sure that all six cube map level 0 images are the same size */
+ const GLuint w = t->Image[0][baseLevel]->Width2;
+ const GLuint h = t->Image[0][baseLevel]->Height2;
+ GLuint face;
+ for (face = 1; face < 6; face++) {
+ if (t->Image[face][baseLevel] == NULL ||
+ t->Image[face][baseLevel]->Width2 != w ||
+ t->Image[face][baseLevel]->Height2 != h) {
+ incomplete(t, "Cube face missing or mismatched size");
+ return;
+ }
+ }
+ }
+
+ /* extra checking for mipmaps */
+ if (t->MinFilter != GL_NEAREST && t->MinFilter != GL_LINEAR) {
+ /*
+ * Mipmapping: determine if we have a complete set of mipmaps
+ */
+ GLint i;
+ GLint minLevel = baseLevel;
+ GLint maxLevel = t->_MaxLevel;
+
+ if (minLevel > maxLevel) {
+ incomplete(t, "minLevel > maxLevel");
+ return;
+ }
+
+ /* Test dimension-independent attributes */
+ for (i = minLevel; i <= maxLevel; i++) {
+ if (t->Image[0][i]) {
+ if (t->Image[0][i]->TexFormat != t->Image[0][baseLevel]->TexFormat) {
+ incomplete(t, "Format[i] != Format[baseLevel]");
+ return;
+ }
+ if (t->Image[0][i]->Border != t->Image[0][baseLevel]->Border) {
+ incomplete(t, "Border[i] != Border[baseLevel]");
+ return;
+ }
+ }
+ }
+
+ /* Test things which depend on number of texture image dimensions */
+ if ((t->Target == GL_TEXTURE_1D) ||
+ (t->Target == GL_TEXTURE_1D_ARRAY_EXT)) {
+ /* Test 1-D mipmaps */
+ GLuint width = t->Image[0][baseLevel]->Width2;
+ for (i = baseLevel + 1; i < maxLevels; i++) {
+ if (width > 1) {
+ width /= 2;
+ }
+ if (i >= minLevel && i <= maxLevel) {
+ if (!t->Image[0][i]) {
+ incomplete(t, "1D Image[0][i] == NULL");
+ return;
+ }
+ if (t->Image[0][i]->Width2 != width ) {
+ incomplete(t, "1D Image[0][i] bad width");
+ return;
+ }
+ }
+ if (width == 1) {
+ return; /* found smallest needed mipmap, all done! */
+ }
+ }
+ }
+ else if ((t->Target == GL_TEXTURE_2D) ||
+ (t->Target == GL_TEXTURE_2D_ARRAY_EXT)) {
+ /* Test 2-D mipmaps */
+ GLuint width = t->Image[0][baseLevel]->Width2;
+ GLuint height = t->Image[0][baseLevel]->Height2;
+ for (i = baseLevel + 1; i < maxLevels; i++) {
+ if (width > 1) {
+ width /= 2;
+ }
+ if (height > 1) {
+ height /= 2;
+ }
+ if (i >= minLevel && i <= maxLevel) {
+ if (!t->Image[0][i]) {
+ incomplete(t, "2D Image[0][i] == NULL");
+ return;
+ }
+ if (t->Image[0][i]->Width2 != width) {
+ incomplete(t, "2D Image[0][i] bad width");
+ return;
+ }
+ if (t->Image[0][i]->Height2 != height) {
+ incomplete(t, "2D Image[0][i] bad height");
+ return;
+ }
+ if (width==1 && height==1) {
+ return; /* found smallest needed mipmap, all done! */
+ }
+ }
+ }
+ }
+ else if (t->Target == GL_TEXTURE_3D) {
+ /* Test 3-D mipmaps */
+ GLuint width = t->Image[0][baseLevel]->Width2;
+ GLuint height = t->Image[0][baseLevel]->Height2;
+ GLuint depth = t->Image[0][baseLevel]->Depth2;
+ for (i = baseLevel + 1; i < maxLevels; i++) {
+ if (width > 1) {
+ width /= 2;
+ }
+ if (height > 1) {
+ height /= 2;
+ }
+ if (depth > 1) {
+ depth /= 2;
+ }
+ if (i >= minLevel && i <= maxLevel) {
+ if (!t->Image[0][i]) {
+ incomplete(t, "3D Image[0][i] == NULL");
+ return;
+ }
+ if (t->Image[0][i]->_BaseFormat == GL_DEPTH_COMPONENT) {
+ incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex");
+ return;
+ }
+ if (t->Image[0][i]->Width2 != width) {
+ incomplete(t, "3D Image[0][i] bad width");
+ return;
+ }
+ if (t->Image[0][i]->Height2 != height) {
+ incomplete(t, "3D Image[0][i] bad height");
+ return;
+ }
+ if (t->Image[0][i]->Depth2 != depth) {
+ incomplete(t, "3D Image[0][i] bad depth");
+ return;
+ }
+ }
+ if (width == 1 && height == 1 && depth == 1) {
+ return; /* found smallest needed mipmap, all done! */
+ }
+ }
+ }
+ else if (t->Target == GL_TEXTURE_CUBE_MAP_ARB) {
+ /* make sure 6 cube faces are consistant */
+ GLuint width = t->Image[0][baseLevel]->Width2;
+ GLuint height = t->Image[0][baseLevel]->Height2;
+ for (i = baseLevel + 1; i < maxLevels; i++) {
+ if (width > 1) {
+ width /= 2;
+ }
+ if (height > 1) {
+ height /= 2;
+ }
+ if (i >= minLevel && i <= maxLevel) {
+ GLuint face;
+ for (face = 0; face < 6; face++) {
+ /* check that we have images defined */
+ if (!t->Image[face][i]) {
+ incomplete(t, "CubeMap Image[n][i] == NULL");
+ return;
+ }
+ /* Don't support GL_DEPTH_COMPONENT for cube maps */
+ if (t->Image[face][i]->_BaseFormat == GL_DEPTH_COMPONENT) {
+ incomplete(t, "GL_DEPTH_COMPONENT only works with 1/2D tex");
+ return;
+ }
+ /* check that all six images have same size */
+ if (t->Image[face][i]->Width2 != width ||
+ t->Image[face][i]->Height2 != height) {
+ incomplete(t, "CubeMap Image[n][i] bad size");
+ return;
+ }
+ }
+ }
+ if (width == 1 && height == 1) {
+ return; /* found smallest needed mipmap, all done! */
+ }
+ }
+ }
+ else if (t->Target == GL_TEXTURE_RECTANGLE_NV) {
+ /* XXX special checking? */
+ }
+ else {
+ /* Target = ??? */
+ _mesa_problem(ctx, "Bug in gl_test_texture_object_completeness\n");
+ }
+ }
+}
+
+
+/**
+ * Check if the given cube map texture is "cube complete" as defined in
+ * the OpenGL specification.
+ */
+GLboolean
+_mesa_cube_complete(const struct gl_texture_object *texObj)
+{
+ const GLint baseLevel = texObj->BaseLevel;
+ const struct gl_texture_image *img0, *img;
+ GLuint face;
+
+ if (texObj->Target != GL_TEXTURE_CUBE_MAP)
+ return GL_FALSE;
+
+ if ((baseLevel < 0) || (baseLevel >= MAX_TEXTURE_LEVELS))
+ return GL_FALSE;
+
+ /* check first face */
+ img0 = texObj->Image[0][baseLevel];
+ if (!img0 ||
+ img0->Width < 1 ||
+ img0->Width != img0->Height)
+ return GL_FALSE;
+
+ /* check remaining faces vs. first face */
+ for (face = 1; face < 6; face++) {
+ img = texObj->Image[face][baseLevel];
+ if (!img ||
+ img->Width != img0->Width ||
+ img->Height != img0->Height ||
+ img->TexFormat != img0->TexFormat)
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
+}
+
+
+/**
+ * Mark a texture object dirty. It forces the object to be incomplete
+ * and optionally forces the context to re-validate its state.
+ *
+ * \param ctx GL context.
+ * \param texObj texture object.
+ * \param invalidate_state also invalidate context state.
+ */
+void
+_mesa_dirty_texobj(struct gl_context *ctx, struct gl_texture_object *texObj,
+ GLboolean invalidate_state)
+{
+ texObj->_Complete = GL_FALSE;
+ if (invalidate_state)
+ ctx->NewState |= _NEW_TEXTURE;
+}
+
+
+/**
+ * Return pointer to a default/fallback texture.
+ * The texture is a 2D 8x8 RGBA texture with all texels = (0,0,0,1).
+ * That's the value a sampler should get when sampling from an
+ * incomplete texture.
+ */
+struct gl_texture_object *
+_mesa_get_fallback_texture(struct gl_context *ctx)
+{
+ if (!ctx->Shared->FallbackTex) {
+ /* create fallback texture now */
+ static GLubyte texels[8 * 8][4];
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+ gl_format texFormat;
+ GLuint i;
+
+ for (i = 0; i < 8 * 8; i++) {
+ texels[i][0] =
+ texels[i][1] =
+ texels[i][2] = 0x0;
+ texels[i][3] = 0xff;
+ }
+
+ /* create texture object */
+ texObj = ctx->Driver.NewTextureObject(ctx, 0, GL_TEXTURE_2D);
+ assert(texObj->RefCount == 1);
+ texObj->MinFilter = GL_NEAREST;
+ texObj->MagFilter = GL_NEAREST;
+
+ /* create level[0] texture image */
+ texImage = _mesa_get_tex_image(ctx, texObj, GL_TEXTURE_2D, 0);
+
+ texFormat = ctx->Driver.ChooseTextureFormat(ctx, GL_RGBA, GL_RGBA,
+ GL_UNSIGNED_BYTE);
+
+ /* init the image fields */
+ _mesa_init_teximage_fields(ctx, GL_TEXTURE_2D, texImage,
+ 8, 8, 1, 0, GL_RGBA, texFormat);
+
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+
+ /* set image data */
+ ctx->Driver.TexImage2D(ctx, GL_TEXTURE_2D, 0, GL_RGBA,
+ 8, 8, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, texels,
+ &ctx->DefaultPacking, texObj, texImage);
+
+ _mesa_test_texobj_completeness(ctx, texObj);
+ assert(texObj->_Complete);
+
+ ctx->Shared->FallbackTex = texObj;
+ }
+ return ctx->Shared->FallbackTex;
+}
+
+
+/*@}*/
+
+
+/***********************************************************************/
+/** \name API functions */
+/*@{*/
+
+
+/**
+ * Generate texture names.
+ *
+ * \param n number of texture names to be generated.
+ * \param textures an array in which will hold the generated texture names.
+ *
+ * \sa glGenTextures().
+ *
+ * Calls _mesa_HashFindFreeKeyBlock() to find a block of free texture
+ * IDs which are stored in \p textures. Corresponding empty texture
+ * objects are also generated.
+ */
+void GLAPIENTRY
+_mesa_GenTextures( GLsizei n, GLuint *textures )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLuint first;
+ GLint i;
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (n < 0) {
+ _mesa_error( ctx, GL_INVALID_VALUE, "glGenTextures" );
+ return;
+ }
+
+ if (!textures)
+ return;
+
+ /*
+ * This must be atomic (generation and allocation of texture IDs)
+ */
+ _glthread_LOCK_MUTEX(ctx->Shared->Mutex);
+
+ first = _mesa_HashFindFreeKeyBlock(ctx->Shared->TexObjects, n);
+
+ /* Allocate new, empty texture objects */
+ for (i = 0; i < n; i++) {
+ struct gl_texture_object *texObj;
+ GLuint name = first + i;
+ GLenum target = 0;
+ texObj = (*ctx->Driver.NewTextureObject)( ctx, name, target);
+ if (!texObj) {
+ _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGenTextures");
+ return;
+ }
+
+ /* insert into hash table */
+ _mesa_HashInsert(ctx->Shared->TexObjects, texObj->Name, texObj);
+
+ textures[i] = name;
+ }
+
+ _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
+}
+
+
+/**
+ * Check if the given texture object is bound to the current draw or
+ * read framebuffer. If so, Unbind it.
+ */
+static void
+unbind_texobj_from_fbo(struct gl_context *ctx,
+ struct gl_texture_object *texObj)
+{
+ const GLuint n = (ctx->DrawBuffer == ctx->ReadBuffer) ? 1 : 2;
+ GLuint i;
+
+ for (i = 0; i < n; i++) {
+ struct gl_framebuffer *fb = (i == 0) ? ctx->DrawBuffer : ctx->ReadBuffer;
+ if (fb->Name) {
+ GLuint j;
+ for (j = 0; j < BUFFER_COUNT; j++) {
+ if (fb->Attachment[j].Type == GL_TEXTURE &&
+ fb->Attachment[j].Texture == texObj) {
+ _mesa_remove_attachment(ctx, fb->Attachment + j);
+ }
+ }
+ }
+ }
+}
+
+
+/**
+ * Check if the given texture object is bound to any texture image units and
+ * unbind it if so (revert to default textures).
+ */
+static void
+unbind_texobj_from_texunits(struct gl_context *ctx,
+ struct gl_texture_object *texObj)
+{
+ GLuint u, tex;
+
+ for (u = 0; u < MAX_TEXTURE_IMAGE_UNITS; u++) {
+ struct gl_texture_unit *unit = &ctx->Texture.Unit[u];
+ for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
+ if (texObj == unit->CurrentTex[tex]) {
+ _mesa_reference_texobj(&unit->CurrentTex[tex],
+ ctx->Shared->DefaultTex[tex]);
+ ASSERT(unit->CurrentTex[tex]);
+ break;
+ }
+ }
+ }
+}
+
+
+/**
+ * Delete named textures.
+ *
+ * \param n number of textures to be deleted.
+ * \param textures array of texture IDs to be deleted.
+ *
+ * \sa glDeleteTextures().
+ *
+ * If we're about to delete a texture that's currently bound to any
+ * texture unit, unbind the texture first. Decrement the reference
+ * count on the texture object and delete it if it's zero.
+ * Recall that texture objects can be shared among several rendering
+ * contexts.
+ */
+void GLAPIENTRY
+_mesa_DeleteTextures( GLsizei n, const GLuint *textures)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLint i;
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); /* too complex */
+
+ if (!textures)
+ return;
+
+ for (i = 0; i < n; i++) {
+ if (textures[i] > 0) {
+ struct gl_texture_object *delObj
+ = _mesa_lookup_texture(ctx, textures[i]);
+
+ if (delObj) {
+ _mesa_lock_texture(ctx, delObj);
+
+ /* Check if texture is bound to any framebuffer objects.
+ * If so, unbind.
+ * See section 4.4.2.3 of GL_EXT_framebuffer_object.
+ */
+ unbind_texobj_from_fbo(ctx, delObj);
+
+ /* Check if this texture is currently bound to any texture units.
+ * If so, unbind it.
+ */
+ unbind_texobj_from_texunits(ctx, delObj);
+
+ _mesa_unlock_texture(ctx, delObj);
+
+ ctx->NewState |= _NEW_TEXTURE;
+
+ /* The texture _name_ is now free for re-use.
+ * Remove it from the hash table now.
+ */
+ _glthread_LOCK_MUTEX(ctx->Shared->Mutex);
+ _mesa_HashRemove(ctx->Shared->TexObjects, delObj->Name);
+ _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
+
+ /* Unreference the texobj. If refcount hits zero, the texture
+ * will be deleted.
+ */
+ _mesa_reference_texobj(&delObj, NULL);
+ }
+ }
+ }
+}
+
+
+/**
+ * Convert a GL texture target enum such as GL_TEXTURE_2D or GL_TEXTURE_3D
+ * into the corresponding Mesa texture target index.
+ * Note that proxy targets are not valid here.
+ * \return TEXTURE_x_INDEX or -1 if target is invalid
+ */
+static GLint
+target_enum_to_index(GLenum target)
+{
+ switch (target) {
+ case GL_TEXTURE_1D:
+ return TEXTURE_1D_INDEX;
+ case GL_TEXTURE_2D:
+ return TEXTURE_2D_INDEX;
+ case GL_TEXTURE_3D:
+ return TEXTURE_3D_INDEX;
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ return TEXTURE_CUBE_INDEX;
+ case GL_TEXTURE_RECTANGLE_NV:
+ return TEXTURE_RECT_INDEX;
+ case GL_TEXTURE_1D_ARRAY_EXT:
+ return TEXTURE_1D_ARRAY_INDEX;
+ case GL_TEXTURE_2D_ARRAY_EXT:
+ return TEXTURE_2D_ARRAY_INDEX;
+ case GL_TEXTURE_BUFFER_ARB:
+ return TEXTURE_BUFFER_INDEX;
+ default:
+ return -1;
+ }
+}
+
+
+/**
+ * Bind a named texture to a texturing target.
+ *
+ * \param target texture target.
+ * \param texName texture name.
+ *
+ * \sa glBindTexture().
+ *
+ * Determines the old texture object bound and returns immediately if rebinding
+ * the same texture. Get the current texture which is either a default texture
+ * if name is null, a named texture from the hash, or a new texture if the
+ * given texture name is new. Increments its reference count, binds it, and
+ * calls dd_function_table::BindTexture. Decrements the old texture reference
+ * count and deletes it if it reaches zero.
+ */
+void GLAPIENTRY
+_mesa_BindTexture( GLenum target, GLuint texName )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_texture_unit *texUnit = _mesa_get_current_tex_unit(ctx);
+ struct gl_texture_object *newTexObj = NULL;
+ GLint targetIndex;
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
+ _mesa_debug(ctx, "glBindTexture %s %d\n",
+ _mesa_lookup_enum_by_nr(target), (GLint) texName);
+
+ targetIndex = target_enum_to_index(target);
+ if (targetIndex < 0) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindTexture(target)");
+ return;
+ }
+ assert(targetIndex < NUM_TEXTURE_TARGETS);
+
+ /*
+ * Get pointer to new texture object (newTexObj)
+ */
+ if (texName == 0) {
+ /* Use a default texture object */
+ newTexObj = ctx->Shared->DefaultTex[targetIndex];
+ }
+ else {
+ /* non-default texture object */
+ newTexObj = _mesa_lookup_texture(ctx, texName);
+ if (newTexObj) {
+ /* error checking */
+ if (newTexObj->Target != 0 && newTexObj->Target != target) {
+ /* the named texture object's target doesn't match the given target */
+ _mesa_error( ctx, GL_INVALID_OPERATION,
+ "glBindTexture(target mismatch)" );
+ return;
+ }
+ if (newTexObj->Target == 0) {
+ finish_texture_init(ctx, target, newTexObj);
+ }
+ }
+ else {
+ /* if this is a new texture id, allocate a texture object now */
+ newTexObj = (*ctx->Driver.NewTextureObject)(ctx, texName, target);
+ if (!newTexObj) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBindTexture");
+ return;
+ }
+
+ /* and insert it into hash table */
+ _glthread_LOCK_MUTEX(ctx->Shared->Mutex);
+ _mesa_HashInsert(ctx->Shared->TexObjects, texName, newTexObj);
+ _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
+ }
+ newTexObj->Target = target;
+ }
+
+ assert(valid_texture_object(newTexObj));
+
+ /* Check if this texture is only used by this context and is already bound.
+ * If so, just return.
+ */
+ {
+ GLboolean early_out;
+ _glthread_LOCK_MUTEX(ctx->Shared->Mutex);
+ early_out = ((ctx->Shared->RefCount == 1)
+ && (newTexObj == texUnit->CurrentTex[targetIndex]));
+ _glthread_UNLOCK_MUTEX(ctx->Shared->Mutex);
+ if (early_out) {
+ return;
+ }
+ }
+
+ /* flush before changing binding */
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+
+ /* Do the actual binding. The refcount on the previously bound
+ * texture object will be decremented. It'll be deleted if the
+ * count hits zero.
+ */
+ _mesa_reference_texobj(&texUnit->CurrentTex[targetIndex], newTexObj);
+ ASSERT(texUnit->CurrentTex[targetIndex]);
+
+ /* Pass BindTexture call to device driver */
+ if (ctx->Driver.BindTexture)
+ (*ctx->Driver.BindTexture)( ctx, target, newTexObj );
+}
+
+
+/**
+ * Set texture priorities.
+ *
+ * \param n number of textures.
+ * \param texName texture names.
+ * \param priorities corresponding texture priorities.
+ *
+ * \sa glPrioritizeTextures().
+ *
+ * Looks up each texture in the hash, clamps the corresponding priority between
+ * 0.0 and 1.0, and calls dd_function_table::PrioritizeTexture.
+ */
+void GLAPIENTRY
+_mesa_PrioritizeTextures( GLsizei n, const GLuint *texName,
+ const GLclampf *priorities )
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLint i;
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+
+ if (n < 0) {
+ _mesa_error( ctx, GL_INVALID_VALUE, "glPrioritizeTextures" );
+ return;
+ }
+
+ if (!priorities)
+ return;
+
+ for (i = 0; i < n; i++) {
+ if (texName[i] > 0) {
+ struct gl_texture_object *t = _mesa_lookup_texture(ctx, texName[i]);
+ if (t) {
+ t->Priority = CLAMP( priorities[i], 0.0F, 1.0F );
+ }
+ }
+ }
+
+ ctx->NewState |= _NEW_TEXTURE;
+}
+
+
+
+/**
+ * See if textures are loaded in texture memory.
+ *
+ * \param n number of textures to query.
+ * \param texName array with the texture names.
+ * \param residences array which will hold the residence status.
+ *
+ * \return GL_TRUE if all textures are resident and \p residences is left unchanged,
+ *
+ * \sa glAreTexturesResident().
+ *
+ * Looks up each texture in the hash and calls
+ * dd_function_table::IsTextureResident.
+ */
+GLboolean GLAPIENTRY
+_mesa_AreTexturesResident(GLsizei n, const GLuint *texName,
+ GLboolean *residences)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLboolean allResident = GL_TRUE;
+ GLint i, j;
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident(n)");
+ return GL_FALSE;
+ }
+
+ if (!texName || !residences)
+ return GL_FALSE;
+
+ for (i = 0; i < n; i++) {
+ struct gl_texture_object *t;
+ if (texName[i] == 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident");
+ return GL_FALSE;
+ }
+ t = _mesa_lookup_texture(ctx, texName[i]);
+ if (!t) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glAreTexturesResident");
+ return GL_FALSE;
+ }
+ if (!ctx->Driver.IsTextureResident ||
+ ctx->Driver.IsTextureResident(ctx, t)) {
+ /* The texture is resident */
+ if (!allResident)
+ residences[i] = GL_TRUE;
+ }
+ else {
+ /* The texture is not resident */
+ if (allResident) {
+ allResident = GL_FALSE;
+ for (j = 0; j < i; j++)
+ residences[j] = GL_TRUE;
+ }
+ residences[i] = GL_FALSE;
+ }
+ }
+
+ return allResident;
+}
+
+
+/**
+ * See if a name corresponds to a texture.
+ *
+ * \param texture texture name.
+ *
+ * \return GL_TRUE if texture name corresponds to a texture, or GL_FALSE
+ * otherwise.
+ *
+ * \sa glIsTexture().
+ *
+ * Calls _mesa_HashLookup().
+ */
+GLboolean GLAPIENTRY
+_mesa_IsTexture( GLuint texture )
+{
+ struct gl_texture_object *t;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
+
+ if (!texture)
+ return GL_FALSE;
+
+ t = _mesa_lookup_texture(ctx, texture);
+
+ /* IsTexture is true only after object has been bound once. */
+ return t && t->Target;
+}
+
+
+/**
+ * Simplest implementation of texture locking: grab the shared tex
+ * mutex. Examine the shared context state timestamp and if there has
+ * been a change, set the appropriate bits in ctx->NewState.
+ *
+ * This is used to deal with synchronizing things when a texture object
+ * is used/modified by different contexts (or threads) which are sharing
+ * the texture.
+ *
+ * See also _mesa_lock/unlock_texture() in teximage.h
+ */
+void
+_mesa_lock_context_textures( struct gl_context *ctx )
+{
+ _glthread_LOCK_MUTEX(ctx->Shared->TexMutex);
+
+ if (ctx->Shared->TextureStateStamp != ctx->TextureStateTimestamp) {
+ ctx->NewState |= _NEW_TEXTURE;
+ ctx->TextureStateTimestamp = ctx->Shared->TextureStateStamp;
+ }
+}
+
+
+void
+_mesa_unlock_context_textures( struct gl_context *ctx )
+{
+ assert(ctx->Shared->TextureStateStamp == ctx->TextureStateTimestamp);
+ _glthread_UNLOCK_MUTEX(ctx->Shared->TexMutex);
+}
+
+/*@}*/
diff --git a/mesalib/src/mesa/main/texobj.h b/mesalib/src/mesa/main/texobj.h index 09c738fda..0bad63867 100644 --- a/mesalib/src/mesa/main/texobj.h +++ b/mesalib/src/mesa/main/texobj.h @@ -52,14 +52,16 @@ _mesa_initialize_texture_object( struct gl_texture_object *obj, GLuint name, GLenum target );
extern void
-_mesa_delete_texture_object( struct gl_context *ctx, struct gl_texture_object *obj );
+_mesa_delete_texture_object( struct gl_context *ctx,
+ struct gl_texture_object *obj );
extern void
_mesa_copy_texture_object( struct gl_texture_object *dest,
const struct gl_texture_object *src );
extern void
-_mesa_clear_texture_object(struct gl_context *ctx, struct gl_texture_object *obj);
+_mesa_clear_texture_object(struct gl_context *ctx,
+ struct gl_texture_object *obj);
extern void
_mesa_reference_texobj(struct gl_texture_object **ptr,
diff --git a/mesalib/src/mesa/main/texrender.c b/mesalib/src/mesa/main/texrender.c index 1546f1962..2766bd6c5 100644 --- a/mesalib/src/mesa/main/texrender.c +++ b/mesalib/src/mesa/main/texrender.c @@ -1,6 +1,7 @@ #include "context.h"
#include "colormac.h"
+#include "fbobject.h"
#include "macros.h"
#include "texfetch.h"
#include "teximage.h"
@@ -525,7 +526,7 @@ wrap_texture(struct gl_context *ctx, struct gl_renderbuffer_attachment *att) * update the internal format info, etc.
*/
static void
-update_wrapper(struct gl_context *ctx, const struct gl_renderbuffer_attachment *att)
+update_wrapper(struct gl_context *ctx, struct gl_renderbuffer_attachment *att)
{
struct texture_renderbuffer *trb
= (struct texture_renderbuffer *) att->Renderbuffer;
@@ -533,7 +534,7 @@ update_wrapper(struct gl_context *ctx, const struct gl_renderbuffer_attachment * (void) ctx;
ASSERT(trb);
- trb->TexImage = att->Texture->Image[att->CubeMapFace][att->TextureLevel];
+ trb->TexImage = _mesa_get_attachment_teximage(att);
ASSERT(trb->TexImage);
trb->Store = _mesa_get_texel_store_func(trb->TexImage->TexFormat);
diff --git a/mesalib/src/mesa/main/texstate.c b/mesalib/src/mesa/main/texstate.c index 41d531f59..35ab1ad4e 100644 --- a/mesalib/src/mesa/main/texstate.c +++ b/mesalib/src/mesa/main/texstate.c @@ -1,841 +1,850 @@ -/* - * Mesa 3-D graphics library - * Version: 7.5 - * - * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. - * - * 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 - * BRIAN PAUL 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. - */ - -/** - * \file texstate.c - * - * Texture state handling. - */ - -#include "glheader.h" -#include "mfeatures.h" -#include "colormac.h" -#include "colortab.h" -#include "context.h" -#include "enums.h" -#include "macros.h" -#include "texobj.h" -#include "teximage.h" -#include "texstate.h" -#include "mtypes.h" - - - -/** - * Default texture combine environment state. This is used to initialize - * a context's texture units and as the basis for converting "classic" - * texture environmnets to ARB_texture_env_combine style values. - */ -static const struct gl_tex_env_combine_state default_combine_state = { - GL_MODULATE, GL_MODULATE, - { GL_TEXTURE, GL_PREVIOUS, GL_CONSTANT, GL_CONSTANT }, - { GL_TEXTURE, GL_PREVIOUS, GL_CONSTANT, GL_CONSTANT }, - { GL_SRC_COLOR, GL_SRC_COLOR, GL_SRC_ALPHA, GL_SRC_ALPHA }, - { GL_SRC_ALPHA, GL_SRC_ALPHA, GL_SRC_ALPHA, GL_SRC_ALPHA }, - 0, 0, - 2, 2 -}; - - - -/** - * Used by glXCopyContext to copy texture state from one context to another. - */ -void -_mesa_copy_texture_state( const struct gl_context *src, struct gl_context *dst ) -{ - GLuint u, tex; - - ASSERT(src); - ASSERT(dst); - - dst->Texture.CurrentUnit = src->Texture.CurrentUnit; - dst->Texture._GenFlags = src->Texture._GenFlags; - dst->Texture._TexGenEnabled = src->Texture._TexGenEnabled; - dst->Texture._TexMatEnabled = src->Texture._TexMatEnabled; - dst->Texture.SharedPalette = src->Texture.SharedPalette; - - /* per-unit state */ - for (u = 0; u < src->Const.MaxCombinedTextureImageUnits; u++) { - dst->Texture.Unit[u].Enabled = src->Texture.Unit[u].Enabled; - dst->Texture.Unit[u].EnvMode = src->Texture.Unit[u].EnvMode; - COPY_4V(dst->Texture.Unit[u].EnvColor, src->Texture.Unit[u].EnvColor); - dst->Texture.Unit[u].TexGenEnabled = src->Texture.Unit[u].TexGenEnabled; - dst->Texture.Unit[u].GenS = src->Texture.Unit[u].GenS; - dst->Texture.Unit[u].GenT = src->Texture.Unit[u].GenT; - dst->Texture.Unit[u].GenR = src->Texture.Unit[u].GenR; - dst->Texture.Unit[u].GenQ = src->Texture.Unit[u].GenQ; - dst->Texture.Unit[u].LodBias = src->Texture.Unit[u].LodBias; - - /* GL_EXT_texture_env_combine */ - dst->Texture.Unit[u].Combine = src->Texture.Unit[u].Combine; - - /* GL_ATI_envmap_bumpmap - need this? */ - dst->Texture.Unit[u].BumpTarget = src->Texture.Unit[u].BumpTarget; - COPY_4V(dst->Texture.Unit[u].RotMatrix, src->Texture.Unit[u].RotMatrix); - - /* - * XXX strictly speaking, we should compare texture names/ids and - * bind textures in the dest context according to id. For now, only - * copy bindings if the contexts share the same pool of textures to - * avoid refcounting bugs. - */ - if (dst->Shared == src->Shared) { - /* copy texture object bindings, not contents of texture objects */ - _mesa_lock_context_textures(dst); - - for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { - _mesa_reference_texobj(&dst->Texture.Unit[u].CurrentTex[tex], - src->Texture.Unit[u].CurrentTex[tex]); - } - _mesa_unlock_context_textures(dst); - } - } -} - - -/* - * For debugging - */ -void -_mesa_print_texunit_state( struct gl_context *ctx, GLuint unit ) -{ - const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit; - printf("Texture Unit %d\n", unit); - printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_lookup_enum_by_nr(texUnit->EnvMode)); - printf(" GL_COMBINE_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeRGB)); - printf(" GL_COMBINE_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeA)); - printf(" GL_SOURCE0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[0])); - printf(" GL_SOURCE1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[1])); - printf(" GL_SOURCE2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[2])); - printf(" GL_SOURCE0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[0])); - printf(" GL_SOURCE1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[1])); - printf(" GL_SOURCE2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[2])); - printf(" GL_OPERAND0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[0])); - printf(" GL_OPERAND1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[1])); - printf(" GL_OPERAND2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[2])); - printf(" GL_OPERAND0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[0])); - printf(" GL_OPERAND1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[1])); - printf(" GL_OPERAND2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[2])); - printf(" GL_RGB_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftRGB); - printf(" GL_ALPHA_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftA); - printf(" GL_TEXTURE_ENV_COLOR = (%f, %f, %f, %f)\n", texUnit->EnvColor[0], texUnit->EnvColor[1], texUnit->EnvColor[2], texUnit->EnvColor[3]); -} - - - -/**********************************************************************/ -/* Texture Environment */ -/**********************************************************************/ - -/** - * Convert "classic" texture environment to ARB_texture_env_combine style - * environments. - * - * \param state texture_env_combine state vector to be filled-in. - * \param mode Classic texture environment mode (i.e., \c GL_REPLACE, - * \c GL_BLEND, \c GL_DECAL, etc.). - * \param texBaseFormat Base format of the texture associated with the - * texture unit. - */ -static void -calculate_derived_texenv( struct gl_tex_env_combine_state *state, - GLenum mode, GLenum texBaseFormat ) -{ - GLenum mode_rgb; - GLenum mode_a; - - *state = default_combine_state; - - switch (texBaseFormat) { - case GL_ALPHA: - state->SourceRGB[0] = GL_PREVIOUS; - break; - - case GL_LUMINANCE_ALPHA: - case GL_INTENSITY: - case GL_RGBA: - break; - - case GL_LUMINANCE: - case GL_RED: - case GL_RG: - case GL_RGB: - case GL_YCBCR_MESA: - case GL_DUDV_ATI: - state->SourceA[0] = GL_PREVIOUS; - break; - - default: - _mesa_problem(NULL, - "Invalid texBaseFormat 0x%x in calculate_derived_texenv", - texBaseFormat); - return; - } - - if (mode == GL_REPLACE_EXT) - mode = GL_REPLACE; - - switch (mode) { - case GL_REPLACE: - case GL_MODULATE: - mode_rgb = (texBaseFormat == GL_ALPHA) ? GL_REPLACE : mode; - mode_a = mode; - break; - - case GL_DECAL: - mode_rgb = GL_INTERPOLATE; - mode_a = GL_REPLACE; - - state->SourceA[0] = GL_PREVIOUS; - - /* Having alpha / luminance / intensity textures replace using the - * incoming fragment color matches the definition in NV_texture_shader. - * The 1.5 spec simply marks these as "undefined". - */ - switch (texBaseFormat) { - case GL_ALPHA: - case GL_LUMINANCE: - case GL_LUMINANCE_ALPHA: - case GL_INTENSITY: - state->SourceRGB[0] = GL_PREVIOUS; - break; - case GL_RED: - case GL_RG: - case GL_RGB: - case GL_YCBCR_MESA: - case GL_DUDV_ATI: - mode_rgb = GL_REPLACE; - break; - case GL_RGBA: - state->SourceRGB[2] = GL_TEXTURE; - break; - } - break; - - case GL_BLEND: - mode_rgb = GL_INTERPOLATE; - mode_a = GL_MODULATE; - - switch (texBaseFormat) { - case GL_ALPHA: - mode_rgb = GL_REPLACE; - break; - case GL_INTENSITY: - mode_a = GL_INTERPOLATE; - state->SourceA[0] = GL_CONSTANT; - state->OperandA[2] = GL_SRC_ALPHA; - /* FALLTHROUGH */ - case GL_LUMINANCE: - case GL_RED: - case GL_RG: - case GL_RGB: - case GL_LUMINANCE_ALPHA: - case GL_RGBA: - case GL_YCBCR_MESA: - case GL_DUDV_ATI: - state->SourceRGB[2] = GL_TEXTURE; - state->SourceA[2] = GL_TEXTURE; - state->SourceRGB[0] = GL_CONSTANT; - state->OperandRGB[2] = GL_SRC_COLOR; - break; - } - break; - - case GL_ADD: - mode_rgb = (texBaseFormat == GL_ALPHA) ? GL_REPLACE : GL_ADD; - mode_a = (texBaseFormat == GL_INTENSITY) ? GL_ADD : GL_MODULATE; - break; - - default: - _mesa_problem(NULL, - "Invalid texture env mode 0x%x in calculate_derived_texenv", - mode); - return; - } - - state->ModeRGB = (state->SourceRGB[0] != GL_PREVIOUS) - ? mode_rgb : GL_REPLACE; - state->ModeA = (state->SourceA[0] != GL_PREVIOUS) - ? mode_a : GL_REPLACE; -} - - - - -/* GL_ARB_multitexture */ -void GLAPIENTRY -_mesa_ActiveTextureARB(GLenum texture) -{ - const GLuint texUnit = texture - GL_TEXTURE0; - GLuint k; - GET_CURRENT_CONTEXT(ctx); - - /* See OpenGL spec for glActiveTexture: */ - k = MAX2(ctx->Const.MaxCombinedTextureImageUnits, - ctx->Const.MaxTextureCoordUnits); - - ASSERT(k <= Elements(ctx->Texture.Unit)); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glActiveTexture %s\n", - _mesa_lookup_enum_by_nr(texture)); - - if (texUnit >= k) { - _mesa_error(ctx, GL_INVALID_ENUM, "glActiveTexture(texture=%s)", - _mesa_lookup_enum_by_nr(texture)); - return; - } - - if (ctx->Texture.CurrentUnit == texUnit) - return; - - FLUSH_VERTICES(ctx, _NEW_TEXTURE); - - ctx->Texture.CurrentUnit = texUnit; - if (ctx->Transform.MatrixMode == GL_TEXTURE) { - /* update current stack pointer */ - ctx->CurrentStack = &ctx->TextureMatrixStack[texUnit]; - } -} - - -/* GL_ARB_multitexture */ -void GLAPIENTRY -_mesa_ClientActiveTextureARB(GLenum texture) -{ - GET_CURRENT_CONTEXT(ctx); - GLuint texUnit = texture - GL_TEXTURE0; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) - _mesa_debug(ctx, "glClientActiveTexture %s\n", - _mesa_lookup_enum_by_nr(texture)); - - if (texUnit >= ctx->Const.MaxTextureCoordUnits) { - _mesa_error(ctx, GL_INVALID_ENUM, "glClientActiveTexture(texture)"); - return; - } - - if (ctx->Array.ActiveTexture == texUnit) - return; - - FLUSH_VERTICES(ctx, _NEW_ARRAY); - ctx->Array.ActiveTexture = texUnit; -} - - - -/**********************************************************************/ -/***** State management *****/ -/**********************************************************************/ - - -/** - * \note This routine refers to derived texture attribute values to - * compute the ENABLE_TEXMAT flags, but is only called on - * _NEW_TEXTURE_MATRIX. On changes to _NEW_TEXTURE, the ENABLE_TEXMAT - * flags are updated by _mesa_update_textures(), below. - * - * \param ctx GL context. - */ -static void -update_texture_matrices( struct gl_context *ctx ) -{ - GLuint u; - - ctx->Texture._TexMatEnabled = 0x0; - - for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) { - ASSERT(u < Elements(ctx->TextureMatrixStack)); - if (_math_matrix_is_dirty(ctx->TextureMatrixStack[u].Top)) { - _math_matrix_analyse( ctx->TextureMatrixStack[u].Top ); - - if (ctx->Texture.Unit[u]._ReallyEnabled && - ctx->TextureMatrixStack[u].Top->type != MATRIX_IDENTITY) - ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(u); - } - } -} - - -/** - * Examine texture unit's combine/env state to update derived state. - */ -static void -update_tex_combine(struct gl_context *ctx, struct gl_texture_unit *texUnit) -{ - struct gl_tex_env_combine_state *combine; - - /* Set the texUnit->_CurrentCombine field to point to the user's combiner - * state, or the combiner state which is derived from traditional texenv - * mode. - */ - if (texUnit->EnvMode == GL_COMBINE || - texUnit->EnvMode == GL_COMBINE4_NV) { - texUnit->_CurrentCombine = & texUnit->Combine; - } - else { - const struct gl_texture_object *texObj = texUnit->_Current; - GLenum format = texObj->Image[0][texObj->BaseLevel]->_BaseFormat; - if (format == GL_COLOR_INDEX) { - format = GL_RGBA; /* a bit of a hack */ - } - else if (format == GL_DEPTH_COMPONENT || - format == GL_DEPTH_STENCIL_EXT) { - format = texObj->DepthMode; - } - calculate_derived_texenv(&texUnit->_EnvMode, texUnit->EnvMode, format); - texUnit->_CurrentCombine = & texUnit->_EnvMode; - } - - combine = texUnit->_CurrentCombine; - - /* Determine number of source RGB terms in the combiner function */ - switch (combine->ModeRGB) { - case GL_REPLACE: - combine->_NumArgsRGB = 1; - break; - case GL_ADD: - case GL_ADD_SIGNED: - if (texUnit->EnvMode == GL_COMBINE4_NV) - combine->_NumArgsRGB = 4; - else - combine->_NumArgsRGB = 2; - break; - case GL_MODULATE: - case GL_SUBTRACT: - case GL_DOT3_RGB: - case GL_DOT3_RGBA: - case GL_DOT3_RGB_EXT: - case GL_DOT3_RGBA_EXT: - combine->_NumArgsRGB = 2; - break; - case GL_INTERPOLATE: - case GL_MODULATE_ADD_ATI: - case GL_MODULATE_SIGNED_ADD_ATI: - case GL_MODULATE_SUBTRACT_ATI: - combine->_NumArgsRGB = 3; - break; - case GL_BUMP_ENVMAP_ATI: - /* no real arguments for this case */ - combine->_NumArgsRGB = 0; - break; - default: - combine->_NumArgsRGB = 0; - _mesa_problem(ctx, "invalid RGB combine mode in update_texture_state"); - return; - } - - /* Determine number of source Alpha terms in the combiner function */ - switch (combine->ModeA) { - case GL_REPLACE: - combine->_NumArgsA = 1; - break; - case GL_ADD: - case GL_ADD_SIGNED: - if (texUnit->EnvMode == GL_COMBINE4_NV) - combine->_NumArgsA = 4; - else - combine->_NumArgsA = 2; - break; - case GL_MODULATE: - case GL_SUBTRACT: - combine->_NumArgsA = 2; - break; - case GL_INTERPOLATE: - case GL_MODULATE_ADD_ATI: - case GL_MODULATE_SIGNED_ADD_ATI: - case GL_MODULATE_SUBTRACT_ATI: - combine->_NumArgsA = 3; - break; - default: - combine->_NumArgsA = 0; - _mesa_problem(ctx, "invalid Alpha combine mode in update_texture_state"); - break; - } -} - - -/** - * \note This routine refers to derived texture matrix values to - * compute the ENABLE_TEXMAT flags, but is only called on - * _NEW_TEXTURE. On changes to _NEW_TEXTURE_MATRIX, the ENABLE_TEXMAT - * flags are updated by _mesa_update_texture_matrices, above. - * - * \param ctx GL context. - */ -static void -update_texture_state( struct gl_context *ctx ) -{ - GLuint unit; - struct gl_fragment_program *fprog = NULL; - struct gl_vertex_program *vprog = NULL; - GLbitfield enabledFragUnits = 0x0; - - if (ctx->Shader.CurrentVertexProgram && - ctx->Shader.CurrentVertexProgram->LinkStatus) { - vprog = ctx->Shader.CurrentVertexProgram->VertexProgram; - } else if (ctx->VertexProgram._Enabled) { - /* XXX enable this if/when non-shader vertex programs get - * texture fetches: - vprog = ctx->VertexProgram.Current; - */ - } - - if (ctx->Shader.CurrentFragmentProgram && - ctx->Shader.CurrentFragmentProgram->LinkStatus) { - fprog = ctx->Shader.CurrentFragmentProgram->FragmentProgram; - } - else if (ctx->FragmentProgram._Enabled) { - fprog = ctx->FragmentProgram.Current; - } - - /* FINISHME: Geometry shader texture accesses should also be considered - * FINISHME: here. - */ - - /* TODO: only set this if there are actual changes */ - ctx->NewState |= _NEW_TEXTURE; - - ctx->Texture._EnabledUnits = 0x0; - ctx->Texture._GenFlags = 0x0; - ctx->Texture._TexMatEnabled = 0x0; - ctx->Texture._TexGenEnabled = 0x0; - - /* - * Update texture unit state. - */ - for (unit = 0; unit < ctx->Const.MaxCombinedTextureImageUnits; unit++) { - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - GLbitfield enabledVertTargets = 0x0; - GLbitfield enabledFragTargets = 0x0; - GLbitfield enabledTargets = 0x0; - GLuint texIndex; - - /* Get the bitmask of texture target enables. - * enableBits will be a mask of the TEXTURE_*_BIT flags indicating - * which texture targets are enabled (fixed function) or referenced - * by a fragment program/program. When multiple flags are set, we'll - * settle on the one with highest priority (see below). - */ - if (vprog) { - enabledVertTargets |= vprog->Base.TexturesUsed[unit]; - } - - if (fprog) { - enabledFragTargets |= fprog->Base.TexturesUsed[unit]; - } - else { - /* fixed-function fragment program */ - enabledFragTargets |= texUnit->Enabled; - } - - enabledTargets = enabledVertTargets | enabledFragTargets; - - texUnit->_ReallyEnabled = 0x0; - - if (enabledTargets == 0x0) { - /* neither vertex nor fragment processing uses this unit */ - continue; - } - - /* Look for the highest priority texture target that's enabled (or used - * by the vert/frag shaders) and "complete". That's the one we'll use - * for texturing. If we're using vert/frag program we're guaranteed - * that bitcount(enabledBits) <= 1. - * Note that the TEXTURE_x_INDEX values are in high to low priority. - */ - for (texIndex = 0; texIndex < NUM_TEXTURE_TARGETS; texIndex++) { - if (enabledTargets & (1 << texIndex)) { - struct gl_texture_object *texObj = texUnit->CurrentTex[texIndex]; - if (!texObj->_Complete) { - _mesa_test_texobj_completeness(ctx, texObj); - } - if (texObj->_Complete) { - texUnit->_ReallyEnabled = 1 << texIndex; - _mesa_reference_texobj(&texUnit->_Current, texObj); - break; - } - } - } - - if (!texUnit->_ReallyEnabled) { - if (fprog) { - /* If we get here it means the shader is expecting a texture - * object, but there isn't one (or it's incomplete). Use the - * fallback texture. - */ - struct gl_texture_object *texObj = _mesa_get_fallback_texture(ctx); - texUnit->_ReallyEnabled = 1 << TEXTURE_2D_INDEX; - _mesa_reference_texobj(&texUnit->_Current, texObj); - } - else { - /* fixed-function: texture unit is really disabled */ - continue; - } - } - - /* if we get here, we know this texture unit is enabled */ - - ctx->Texture._EnabledUnits |= (1 << unit); - - if (enabledFragTargets) - enabledFragUnits |= (1 << unit); - - update_tex_combine(ctx, texUnit); - } - - - /* Determine which texture coordinate sets are actually needed */ - if (fprog) { - const GLuint coordMask = (1 << MAX_TEXTURE_COORD_UNITS) - 1; - ctx->Texture._EnabledCoordUnits - = (fprog->Base.InputsRead >> FRAG_ATTRIB_TEX0) & coordMask; - } - else { - ctx->Texture._EnabledCoordUnits = enabledFragUnits; - } - - /* Setup texgen for those texture coordinate sets that are in use */ - for (unit = 0; unit < ctx->Const.MaxTextureCoordUnits; unit++) { - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - - texUnit->_GenFlags = 0x0; - - if (!(ctx->Texture._EnabledCoordUnits & (1 << unit))) - continue; - - if (texUnit->TexGenEnabled) { - if (texUnit->TexGenEnabled & S_BIT) { - texUnit->_GenFlags |= texUnit->GenS._ModeBit; - } - if (texUnit->TexGenEnabled & T_BIT) { - texUnit->_GenFlags |= texUnit->GenT._ModeBit; - } - if (texUnit->TexGenEnabled & R_BIT) { - texUnit->_GenFlags |= texUnit->GenR._ModeBit; - } - if (texUnit->TexGenEnabled & Q_BIT) { - texUnit->_GenFlags |= texUnit->GenQ._ModeBit; - } - - ctx->Texture._TexGenEnabled |= ENABLE_TEXGEN(unit); - ctx->Texture._GenFlags |= texUnit->_GenFlags; - } - - ASSERT(unit < Elements(ctx->TextureMatrixStack)); - if (ctx->TextureMatrixStack[unit].Top->type != MATRIX_IDENTITY) - ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(unit); - } -} - - -/** - * Update texture-related derived state. - */ -void -_mesa_update_texture( struct gl_context *ctx, GLuint new_state ) -{ - if (new_state & _NEW_TEXTURE_MATRIX) - update_texture_matrices( ctx ); - - if (new_state & (_NEW_TEXTURE | _NEW_PROGRAM)) - update_texture_state( ctx ); -} - - -/**********************************************************************/ -/***** Initialization *****/ -/**********************************************************************/ - -/** - * Allocate the proxy textures for the given context. - * - * \param ctx the context to allocate proxies for. - * - * \return GL_TRUE on success, or GL_FALSE on failure - * - * If run out of memory part way through the allocations, clean up and return - * GL_FALSE. - */ -static GLboolean -alloc_proxy_textures( struct gl_context *ctx ) -{ - static const GLenum targets[] = { - GL_TEXTURE_1D, - GL_TEXTURE_2D, - GL_TEXTURE_3D, - GL_TEXTURE_CUBE_MAP_ARB, - GL_TEXTURE_RECTANGLE_NV, - GL_TEXTURE_1D_ARRAY_EXT, - GL_TEXTURE_2D_ARRAY_EXT - }; - GLint tgt; - - ASSERT(Elements(targets) == NUM_TEXTURE_TARGETS); - - for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { - if (!(ctx->Texture.ProxyTex[tgt] - = ctx->Driver.NewTextureObject(ctx, 0, targets[tgt]))) { - /* out of memory, free what we did allocate */ - while (--tgt >= 0) { - ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]); - } - return GL_FALSE; - } - } - - assert(ctx->Texture.ProxyTex[0]->RefCount == 1); /* sanity check */ - return GL_TRUE; -} - - -/** - * Initialize a texture unit. - * - * \param ctx GL context. - * \param unit texture unit number to be initialized. - */ -static void -init_texture_unit( struct gl_context *ctx, GLuint unit ) -{ - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - GLuint tex; - - texUnit->EnvMode = GL_MODULATE; - ASSIGN_4V( texUnit->EnvColor, 0.0, 0.0, 0.0, 0.0 ); - - texUnit->Combine = default_combine_state; - texUnit->_EnvMode = default_combine_state; - texUnit->_CurrentCombine = & texUnit->_EnvMode; - texUnit->BumpTarget = GL_TEXTURE0; - - texUnit->TexGenEnabled = 0x0; - texUnit->GenS.Mode = GL_EYE_LINEAR; - texUnit->GenT.Mode = GL_EYE_LINEAR; - texUnit->GenR.Mode = GL_EYE_LINEAR; - texUnit->GenQ.Mode = GL_EYE_LINEAR; - texUnit->GenS._ModeBit = TEXGEN_EYE_LINEAR; - texUnit->GenT._ModeBit = TEXGEN_EYE_LINEAR; - texUnit->GenR._ModeBit = TEXGEN_EYE_LINEAR; - texUnit->GenQ._ModeBit = TEXGEN_EYE_LINEAR; - - /* Yes, these plane coefficients are correct! */ - ASSIGN_4V( texUnit->GenS.ObjectPlane, 1.0, 0.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->GenT.ObjectPlane, 0.0, 1.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->GenR.ObjectPlane, 0.0, 0.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->GenQ.ObjectPlane, 0.0, 0.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->GenS.EyePlane, 1.0, 0.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->GenT.EyePlane, 0.0, 1.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->GenR.EyePlane, 0.0, 0.0, 0.0, 0.0 ); - ASSIGN_4V( texUnit->GenQ.EyePlane, 0.0, 0.0, 0.0, 0.0 ); - - /* no mention of this in spec, but maybe id matrix expected? */ - ASSIGN_4V( texUnit->RotMatrix, 1.0, 0.0, 0.0, 1.0 ); - - /* initialize current texture object ptrs to the shared default objects */ - for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { - _mesa_reference_texobj(&texUnit->CurrentTex[tex], - ctx->Shared->DefaultTex[tex]); - } -} - - -/** - * Initialize texture state for the given context. - */ -GLboolean -_mesa_init_texture(struct gl_context *ctx) -{ - GLuint u; - - /* Texture group */ - ctx->Texture.CurrentUnit = 0; /* multitexture */ - ctx->Texture._EnabledUnits = 0x0; - ctx->Texture.SharedPalette = GL_FALSE; - _mesa_init_colortable(&ctx->Texture.Palette); - - for (u = 0; u < Elements(ctx->Texture.Unit); u++) - init_texture_unit(ctx, u); - - /* After we're done initializing the context's texture state the default - * texture objects' refcounts should be at least - * MAX_COMBINED_TEXTURE_IMAGE_UNITS + 1. - */ - assert(ctx->Shared->DefaultTex[TEXTURE_1D_INDEX]->RefCount - >= MAX_COMBINED_TEXTURE_IMAGE_UNITS + 1); - - /* Allocate proxy textures */ - if (!alloc_proxy_textures( ctx )) - return GL_FALSE; - - return GL_TRUE; -} - - -/** - * Free dynamically-allocted texture data attached to the given context. - */ -void -_mesa_free_texture_data(struct gl_context *ctx) -{ - GLuint u, tgt; - - /* unreference current textures */ - for (u = 0; u < Elements(ctx->Texture.Unit); u++) { - /* The _Current texture could account for another reference */ - _mesa_reference_texobj(&ctx->Texture.Unit[u]._Current, NULL); - - for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { - _mesa_reference_texobj(&ctx->Texture.Unit[u].CurrentTex[tgt], NULL); - } - } - - /* Free proxy texture objects */ - for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) - ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]); -} - - -/** - * Update the default texture objects in the given context to reference those - * specified in the shared state and release those referencing the old - * shared state. - */ -void -_mesa_update_default_objects_texture(struct gl_context *ctx) -{ - GLuint u, tex; - - for (u = 0; u < Elements(ctx->Texture.Unit); u++) { - struct gl_texture_unit *texUnit = &ctx->Texture.Unit[u]; - for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) { - _mesa_reference_texobj(&texUnit->CurrentTex[tex], - ctx->Shared->DefaultTex[tex]); - } - } -} +/*
+ * Mesa 3-D graphics library
+ * Version: 7.5
+ *
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
+ *
+ * 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
+ * BRIAN PAUL 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.
+ */
+
+/**
+ * \file texstate.c
+ *
+ * Texture state handling.
+ */
+
+#include "glheader.h"
+#include "mfeatures.h"
+#include "bufferobj.h"
+#include "colormac.h"
+#include "colortab.h"
+#include "context.h"
+#include "enums.h"
+#include "macros.h"
+#include "texobj.h"
+#include "teximage.h"
+#include "texstate.h"
+#include "mtypes.h"
+
+
+
+/**
+ * Default texture combine environment state. This is used to initialize
+ * a context's texture units and as the basis for converting "classic"
+ * texture environmnets to ARB_texture_env_combine style values.
+ */
+static const struct gl_tex_env_combine_state default_combine_state = {
+ GL_MODULATE, GL_MODULATE,
+ { GL_TEXTURE, GL_PREVIOUS, GL_CONSTANT, GL_CONSTANT },
+ { GL_TEXTURE, GL_PREVIOUS, GL_CONSTANT, GL_CONSTANT },
+ { GL_SRC_COLOR, GL_SRC_COLOR, GL_SRC_ALPHA, GL_SRC_ALPHA },
+ { GL_SRC_ALPHA, GL_SRC_ALPHA, GL_SRC_ALPHA, GL_SRC_ALPHA },
+ 0, 0,
+ 2, 2
+};
+
+
+
+/**
+ * Used by glXCopyContext to copy texture state from one context to another.
+ */
+void
+_mesa_copy_texture_state( const struct gl_context *src, struct gl_context *dst )
+{
+ GLuint u, tex;
+
+ ASSERT(src);
+ ASSERT(dst);
+
+ dst->Texture.CurrentUnit = src->Texture.CurrentUnit;
+ dst->Texture._GenFlags = src->Texture._GenFlags;
+ dst->Texture._TexGenEnabled = src->Texture._TexGenEnabled;
+ dst->Texture._TexMatEnabled = src->Texture._TexMatEnabled;
+ dst->Texture.SharedPalette = src->Texture.SharedPalette;
+
+ /* per-unit state */
+ for (u = 0; u < src->Const.MaxCombinedTextureImageUnits; u++) {
+ dst->Texture.Unit[u].Enabled = src->Texture.Unit[u].Enabled;
+ dst->Texture.Unit[u].EnvMode = src->Texture.Unit[u].EnvMode;
+ COPY_4V(dst->Texture.Unit[u].EnvColor, src->Texture.Unit[u].EnvColor);
+ dst->Texture.Unit[u].TexGenEnabled = src->Texture.Unit[u].TexGenEnabled;
+ dst->Texture.Unit[u].GenS = src->Texture.Unit[u].GenS;
+ dst->Texture.Unit[u].GenT = src->Texture.Unit[u].GenT;
+ dst->Texture.Unit[u].GenR = src->Texture.Unit[u].GenR;
+ dst->Texture.Unit[u].GenQ = src->Texture.Unit[u].GenQ;
+ dst->Texture.Unit[u].LodBias = src->Texture.Unit[u].LodBias;
+
+ /* GL_EXT_texture_env_combine */
+ dst->Texture.Unit[u].Combine = src->Texture.Unit[u].Combine;
+
+ /* GL_ATI_envmap_bumpmap - need this? */
+ dst->Texture.Unit[u].BumpTarget = src->Texture.Unit[u].BumpTarget;
+ COPY_4V(dst->Texture.Unit[u].RotMatrix, src->Texture.Unit[u].RotMatrix);
+
+ /*
+ * XXX strictly speaking, we should compare texture names/ids and
+ * bind textures in the dest context according to id. For now, only
+ * copy bindings if the contexts share the same pool of textures to
+ * avoid refcounting bugs.
+ */
+ if (dst->Shared == src->Shared) {
+ /* copy texture object bindings, not contents of texture objects */
+ _mesa_lock_context_textures(dst);
+
+ for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
+ _mesa_reference_texobj(&dst->Texture.Unit[u].CurrentTex[tex],
+ src->Texture.Unit[u].CurrentTex[tex]);
+ }
+ _mesa_unlock_context_textures(dst);
+ }
+ }
+}
+
+
+/*
+ * For debugging
+ */
+void
+_mesa_print_texunit_state( struct gl_context *ctx, GLuint unit )
+{
+ const struct gl_texture_unit *texUnit = ctx->Texture.Unit + unit;
+ printf("Texture Unit %d\n", unit);
+ printf(" GL_TEXTURE_ENV_MODE = %s\n", _mesa_lookup_enum_by_nr(texUnit->EnvMode));
+ printf(" GL_COMBINE_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeRGB));
+ printf(" GL_COMBINE_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.ModeA));
+ printf(" GL_SOURCE0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[0]));
+ printf(" GL_SOURCE1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[1]));
+ printf(" GL_SOURCE2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceRGB[2]));
+ printf(" GL_SOURCE0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[0]));
+ printf(" GL_SOURCE1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[1]));
+ printf(" GL_SOURCE2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.SourceA[2]));
+ printf(" GL_OPERAND0_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[0]));
+ printf(" GL_OPERAND1_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[1]));
+ printf(" GL_OPERAND2_RGB = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandRGB[2]));
+ printf(" GL_OPERAND0_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[0]));
+ printf(" GL_OPERAND1_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[1]));
+ printf(" GL_OPERAND2_ALPHA = %s\n", _mesa_lookup_enum_by_nr(texUnit->Combine.OperandA[2]));
+ printf(" GL_RGB_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftRGB);
+ printf(" GL_ALPHA_SCALE = %d\n", 1 << texUnit->Combine.ScaleShiftA);
+ printf(" GL_TEXTURE_ENV_COLOR = (%f, %f, %f, %f)\n", texUnit->EnvColor[0], texUnit->EnvColor[1], texUnit->EnvColor[2], texUnit->EnvColor[3]);
+}
+
+
+
+/**********************************************************************/
+/* Texture Environment */
+/**********************************************************************/
+
+/**
+ * Convert "classic" texture environment to ARB_texture_env_combine style
+ * environments.
+ *
+ * \param state texture_env_combine state vector to be filled-in.
+ * \param mode Classic texture environment mode (i.e., \c GL_REPLACE,
+ * \c GL_BLEND, \c GL_DECAL, etc.).
+ * \param texBaseFormat Base format of the texture associated with the
+ * texture unit.
+ */
+static void
+calculate_derived_texenv( struct gl_tex_env_combine_state *state,
+ GLenum mode, GLenum texBaseFormat )
+{
+ GLenum mode_rgb;
+ GLenum mode_a;
+
+ *state = default_combine_state;
+
+ switch (texBaseFormat) {
+ case GL_ALPHA:
+ state->SourceRGB[0] = GL_PREVIOUS;
+ break;
+
+ case GL_LUMINANCE_ALPHA:
+ case GL_INTENSITY:
+ case GL_RGBA:
+ break;
+
+ case GL_LUMINANCE:
+ case GL_RED:
+ case GL_RG:
+ case GL_RGB:
+ case GL_YCBCR_MESA:
+ case GL_DUDV_ATI:
+ state->SourceA[0] = GL_PREVIOUS;
+ break;
+
+ default:
+ _mesa_problem(NULL,
+ "Invalid texBaseFormat 0x%x in calculate_derived_texenv",
+ texBaseFormat);
+ return;
+ }
+
+ if (mode == GL_REPLACE_EXT)
+ mode = GL_REPLACE;
+
+ switch (mode) {
+ case GL_REPLACE:
+ case GL_MODULATE:
+ mode_rgb = (texBaseFormat == GL_ALPHA) ? GL_REPLACE : mode;
+ mode_a = mode;
+ break;
+
+ case GL_DECAL:
+ mode_rgb = GL_INTERPOLATE;
+ mode_a = GL_REPLACE;
+
+ state->SourceA[0] = GL_PREVIOUS;
+
+ /* Having alpha / luminance / intensity textures replace using the
+ * incoming fragment color matches the definition in NV_texture_shader.
+ * The 1.5 spec simply marks these as "undefined".
+ */
+ switch (texBaseFormat) {
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ case GL_LUMINANCE_ALPHA:
+ case GL_INTENSITY:
+ state->SourceRGB[0] = GL_PREVIOUS;
+ break;
+ case GL_RED:
+ case GL_RG:
+ case GL_RGB:
+ case GL_YCBCR_MESA:
+ case GL_DUDV_ATI:
+ mode_rgb = GL_REPLACE;
+ break;
+ case GL_RGBA:
+ state->SourceRGB[2] = GL_TEXTURE;
+ break;
+ }
+ break;
+
+ case GL_BLEND:
+ mode_rgb = GL_INTERPOLATE;
+ mode_a = GL_MODULATE;
+
+ switch (texBaseFormat) {
+ case GL_ALPHA:
+ mode_rgb = GL_REPLACE;
+ break;
+ case GL_INTENSITY:
+ mode_a = GL_INTERPOLATE;
+ state->SourceA[0] = GL_CONSTANT;
+ state->OperandA[2] = GL_SRC_ALPHA;
+ /* FALLTHROUGH */
+ case GL_LUMINANCE:
+ case GL_RED:
+ case GL_RG:
+ case GL_RGB:
+ case GL_LUMINANCE_ALPHA:
+ case GL_RGBA:
+ case GL_YCBCR_MESA:
+ case GL_DUDV_ATI:
+ state->SourceRGB[2] = GL_TEXTURE;
+ state->SourceA[2] = GL_TEXTURE;
+ state->SourceRGB[0] = GL_CONSTANT;
+ state->OperandRGB[2] = GL_SRC_COLOR;
+ break;
+ }
+ break;
+
+ case GL_ADD:
+ mode_rgb = (texBaseFormat == GL_ALPHA) ? GL_REPLACE : GL_ADD;
+ mode_a = (texBaseFormat == GL_INTENSITY) ? GL_ADD : GL_MODULATE;
+ break;
+
+ default:
+ _mesa_problem(NULL,
+ "Invalid texture env mode 0x%x in calculate_derived_texenv",
+ mode);
+ return;
+ }
+
+ state->ModeRGB = (state->SourceRGB[0] != GL_PREVIOUS)
+ ? mode_rgb : GL_REPLACE;
+ state->ModeA = (state->SourceA[0] != GL_PREVIOUS)
+ ? mode_a : GL_REPLACE;
+}
+
+
+
+
+/* GL_ARB_multitexture */
+void GLAPIENTRY
+_mesa_ActiveTextureARB(GLenum texture)
+{
+ const GLuint texUnit = texture - GL_TEXTURE0;
+ GLuint k;
+ GET_CURRENT_CONTEXT(ctx);
+
+ /* See OpenGL spec for glActiveTexture: */
+ k = MAX2(ctx->Const.MaxCombinedTextureImageUnits,
+ ctx->Const.MaxTextureCoordUnits);
+
+ ASSERT(k <= Elements(ctx->Texture.Unit));
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
+ _mesa_debug(ctx, "glActiveTexture %s\n",
+ _mesa_lookup_enum_by_nr(texture));
+
+ if (texUnit >= k) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glActiveTexture(texture=%s)",
+ _mesa_lookup_enum_by_nr(texture));
+ return;
+ }
+
+ if (ctx->Texture.CurrentUnit == texUnit)
+ return;
+
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+
+ ctx->Texture.CurrentUnit = texUnit;
+ if (ctx->Transform.MatrixMode == GL_TEXTURE) {
+ /* update current stack pointer */
+ ctx->CurrentStack = &ctx->TextureMatrixStack[texUnit];
+ }
+}
+
+
+/* GL_ARB_multitexture */
+void GLAPIENTRY
+_mesa_ClientActiveTextureARB(GLenum texture)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLuint texUnit = texture - GL_TEXTURE0;
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE))
+ _mesa_debug(ctx, "glClientActiveTexture %s\n",
+ _mesa_lookup_enum_by_nr(texture));
+
+ if (texUnit >= ctx->Const.MaxTextureCoordUnits) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glClientActiveTexture(texture)");
+ return;
+ }
+
+ if (ctx->Array.ActiveTexture == texUnit)
+ return;
+
+ FLUSH_VERTICES(ctx, _NEW_ARRAY);
+ ctx->Array.ActiveTexture = texUnit;
+}
+
+
+
+/**********************************************************************/
+/***** State management *****/
+/**********************************************************************/
+
+
+/**
+ * \note This routine refers to derived texture attribute values to
+ * compute the ENABLE_TEXMAT flags, but is only called on
+ * _NEW_TEXTURE_MATRIX. On changes to _NEW_TEXTURE, the ENABLE_TEXMAT
+ * flags are updated by _mesa_update_textures(), below.
+ *
+ * \param ctx GL context.
+ */
+static void
+update_texture_matrices( struct gl_context *ctx )
+{
+ GLuint u;
+
+ ctx->Texture._TexMatEnabled = 0x0;
+
+ for (u = 0; u < ctx->Const.MaxTextureCoordUnits; u++) {
+ ASSERT(u < Elements(ctx->TextureMatrixStack));
+ if (_math_matrix_is_dirty(ctx->TextureMatrixStack[u].Top)) {
+ _math_matrix_analyse( ctx->TextureMatrixStack[u].Top );
+
+ if (ctx->Texture.Unit[u]._ReallyEnabled &&
+ ctx->TextureMatrixStack[u].Top->type != MATRIX_IDENTITY)
+ ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(u);
+ }
+ }
+}
+
+
+/**
+ * Examine texture unit's combine/env state to update derived state.
+ */
+static void
+update_tex_combine(struct gl_context *ctx, struct gl_texture_unit *texUnit)
+{
+ struct gl_tex_env_combine_state *combine;
+
+ /* Set the texUnit->_CurrentCombine field to point to the user's combiner
+ * state, or the combiner state which is derived from traditional texenv
+ * mode.
+ */
+ if (texUnit->EnvMode == GL_COMBINE ||
+ texUnit->EnvMode == GL_COMBINE4_NV) {
+ texUnit->_CurrentCombine = & texUnit->Combine;
+ }
+ else {
+ const struct gl_texture_object *texObj = texUnit->_Current;
+ GLenum format = texObj->Image[0][texObj->BaseLevel]->_BaseFormat;
+ if (format == GL_COLOR_INDEX) {
+ format = GL_RGBA; /* a bit of a hack */
+ }
+ else if (format == GL_DEPTH_COMPONENT ||
+ format == GL_DEPTH_STENCIL_EXT) {
+ format = texObj->DepthMode;
+ }
+ calculate_derived_texenv(&texUnit->_EnvMode, texUnit->EnvMode, format);
+ texUnit->_CurrentCombine = & texUnit->_EnvMode;
+ }
+
+ combine = texUnit->_CurrentCombine;
+
+ /* Determine number of source RGB terms in the combiner function */
+ switch (combine->ModeRGB) {
+ case GL_REPLACE:
+ combine->_NumArgsRGB = 1;
+ break;
+ case GL_ADD:
+ case GL_ADD_SIGNED:
+ if (texUnit->EnvMode == GL_COMBINE4_NV)
+ combine->_NumArgsRGB = 4;
+ else
+ combine->_NumArgsRGB = 2;
+ break;
+ case GL_MODULATE:
+ case GL_SUBTRACT:
+ case GL_DOT3_RGB:
+ case GL_DOT3_RGBA:
+ case GL_DOT3_RGB_EXT:
+ case GL_DOT3_RGBA_EXT:
+ combine->_NumArgsRGB = 2;
+ break;
+ case GL_INTERPOLATE:
+ case GL_MODULATE_ADD_ATI:
+ case GL_MODULATE_SIGNED_ADD_ATI:
+ case GL_MODULATE_SUBTRACT_ATI:
+ combine->_NumArgsRGB = 3;
+ break;
+ case GL_BUMP_ENVMAP_ATI:
+ /* no real arguments for this case */
+ combine->_NumArgsRGB = 0;
+ break;
+ default:
+ combine->_NumArgsRGB = 0;
+ _mesa_problem(ctx, "invalid RGB combine mode in update_texture_state");
+ return;
+ }
+
+ /* Determine number of source Alpha terms in the combiner function */
+ switch (combine->ModeA) {
+ case GL_REPLACE:
+ combine->_NumArgsA = 1;
+ break;
+ case GL_ADD:
+ case GL_ADD_SIGNED:
+ if (texUnit->EnvMode == GL_COMBINE4_NV)
+ combine->_NumArgsA = 4;
+ else
+ combine->_NumArgsA = 2;
+ break;
+ case GL_MODULATE:
+ case GL_SUBTRACT:
+ combine->_NumArgsA = 2;
+ break;
+ case GL_INTERPOLATE:
+ case GL_MODULATE_ADD_ATI:
+ case GL_MODULATE_SIGNED_ADD_ATI:
+ case GL_MODULATE_SUBTRACT_ATI:
+ combine->_NumArgsA = 3;
+ break;
+ default:
+ combine->_NumArgsA = 0;
+ _mesa_problem(ctx, "invalid Alpha combine mode in update_texture_state");
+ break;
+ }
+}
+
+
+/**
+ * \note This routine refers to derived texture matrix values to
+ * compute the ENABLE_TEXMAT flags, but is only called on
+ * _NEW_TEXTURE. On changes to _NEW_TEXTURE_MATRIX, the ENABLE_TEXMAT
+ * flags are updated by _mesa_update_texture_matrices, above.
+ *
+ * \param ctx GL context.
+ */
+static void
+update_texture_state( struct gl_context *ctx )
+{
+ GLuint unit;
+ struct gl_fragment_program *fprog = NULL;
+ struct gl_vertex_program *vprog = NULL;
+ GLbitfield enabledFragUnits = 0x0;
+
+ if (ctx->Shader.CurrentVertexProgram &&
+ ctx->Shader.CurrentVertexProgram->LinkStatus) {
+ vprog = ctx->Shader.CurrentVertexProgram->VertexProgram;
+ } else if (ctx->VertexProgram._Enabled) {
+ /* XXX enable this if/when non-shader vertex programs get
+ * texture fetches:
+ vprog = ctx->VertexProgram.Current;
+ */
+ }
+
+ if (ctx->Shader.CurrentFragmentProgram &&
+ ctx->Shader.CurrentFragmentProgram->LinkStatus) {
+ fprog = ctx->Shader.CurrentFragmentProgram->FragmentProgram;
+ }
+ else if (ctx->FragmentProgram._Enabled) {
+ fprog = ctx->FragmentProgram.Current;
+ }
+
+ /* FINISHME: Geometry shader texture accesses should also be considered
+ * FINISHME: here.
+ */
+
+ /* TODO: only set this if there are actual changes */
+ ctx->NewState |= _NEW_TEXTURE;
+
+ ctx->Texture._EnabledUnits = 0x0;
+ ctx->Texture._GenFlags = 0x0;
+ ctx->Texture._TexMatEnabled = 0x0;
+ ctx->Texture._TexGenEnabled = 0x0;
+
+ /*
+ * Update texture unit state.
+ */
+ for (unit = 0; unit < ctx->Const.MaxCombinedTextureImageUnits; unit++) {
+ struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
+ GLbitfield enabledVertTargets = 0x0;
+ GLbitfield enabledFragTargets = 0x0;
+ GLbitfield enabledTargets = 0x0;
+ GLuint texIndex;
+
+ /* Get the bitmask of texture target enables.
+ * enableBits will be a mask of the TEXTURE_*_BIT flags indicating
+ * which texture targets are enabled (fixed function) or referenced
+ * by a fragment program/program. When multiple flags are set, we'll
+ * settle on the one with highest priority (see below).
+ */
+ if (vprog) {
+ enabledVertTargets |= vprog->Base.TexturesUsed[unit];
+ }
+
+ if (fprog) {
+ enabledFragTargets |= fprog->Base.TexturesUsed[unit];
+ }
+ else {
+ /* fixed-function fragment program */
+ enabledFragTargets |= texUnit->Enabled;
+ }
+
+ enabledTargets = enabledVertTargets | enabledFragTargets;
+
+ texUnit->_ReallyEnabled = 0x0;
+
+ if (enabledTargets == 0x0) {
+ /* neither vertex nor fragment processing uses this unit */
+ continue;
+ }
+
+ /* Look for the highest priority texture target that's enabled (or used
+ * by the vert/frag shaders) and "complete". That's the one we'll use
+ * for texturing. If we're using vert/frag program we're guaranteed
+ * that bitcount(enabledBits) <= 1.
+ * Note that the TEXTURE_x_INDEX values are in high to low priority.
+ */
+ for (texIndex = 0; texIndex < NUM_TEXTURE_TARGETS; texIndex++) {
+ if (enabledTargets & (1 << texIndex)) {
+ struct gl_texture_object *texObj = texUnit->CurrentTex[texIndex];
+ if (!texObj->_Complete) {
+ _mesa_test_texobj_completeness(ctx, texObj);
+ }
+ if (texObj->_Complete) {
+ texUnit->_ReallyEnabled = 1 << texIndex;
+ _mesa_reference_texobj(&texUnit->_Current, texObj);
+ break;
+ }
+ }
+ }
+
+ if (!texUnit->_ReallyEnabled) {
+ if (fprog) {
+ /* If we get here it means the shader is expecting a texture
+ * object, but there isn't one (or it's incomplete). Use the
+ * fallback texture.
+ */
+ struct gl_texture_object *texObj = _mesa_get_fallback_texture(ctx);
+ texUnit->_ReallyEnabled = 1 << TEXTURE_2D_INDEX;
+ _mesa_reference_texobj(&texUnit->_Current, texObj);
+ }
+ else {
+ /* fixed-function: texture unit is really disabled */
+ continue;
+ }
+ }
+
+ /* if we get here, we know this texture unit is enabled */
+
+ ctx->Texture._EnabledUnits |= (1 << unit);
+
+ if (enabledFragTargets)
+ enabledFragUnits |= (1 << unit);
+
+ update_tex_combine(ctx, texUnit);
+ }
+
+
+ /* Determine which texture coordinate sets are actually needed */
+ if (fprog) {
+ const GLuint coordMask = (1 << MAX_TEXTURE_COORD_UNITS) - 1;
+ ctx->Texture._EnabledCoordUnits
+ = (fprog->Base.InputsRead >> FRAG_ATTRIB_TEX0) & coordMask;
+ }
+ else {
+ ctx->Texture._EnabledCoordUnits = enabledFragUnits;
+ }
+
+ /* Setup texgen for those texture coordinate sets that are in use */
+ for (unit = 0; unit < ctx->Const.MaxTextureCoordUnits; unit++) {
+ struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
+
+ texUnit->_GenFlags = 0x0;
+
+ if (!(ctx->Texture._EnabledCoordUnits & (1 << unit)))
+ continue;
+
+ if (texUnit->TexGenEnabled) {
+ if (texUnit->TexGenEnabled & S_BIT) {
+ texUnit->_GenFlags |= texUnit->GenS._ModeBit;
+ }
+ if (texUnit->TexGenEnabled & T_BIT) {
+ texUnit->_GenFlags |= texUnit->GenT._ModeBit;
+ }
+ if (texUnit->TexGenEnabled & R_BIT) {
+ texUnit->_GenFlags |= texUnit->GenR._ModeBit;
+ }
+ if (texUnit->TexGenEnabled & Q_BIT) {
+ texUnit->_GenFlags |= texUnit->GenQ._ModeBit;
+ }
+
+ ctx->Texture._TexGenEnabled |= ENABLE_TEXGEN(unit);
+ ctx->Texture._GenFlags |= texUnit->_GenFlags;
+ }
+
+ ASSERT(unit < Elements(ctx->TextureMatrixStack));
+ if (ctx->TextureMatrixStack[unit].Top->type != MATRIX_IDENTITY)
+ ctx->Texture._TexMatEnabled |= ENABLE_TEXMAT(unit);
+ }
+}
+
+
+/**
+ * Update texture-related derived state.
+ */
+void
+_mesa_update_texture( struct gl_context *ctx, GLuint new_state )
+{
+ if (new_state & _NEW_TEXTURE_MATRIX)
+ update_texture_matrices( ctx );
+
+ if (new_state & (_NEW_TEXTURE | _NEW_PROGRAM))
+ update_texture_state( ctx );
+}
+
+
+/**********************************************************************/
+/***** Initialization *****/
+/**********************************************************************/
+
+/**
+ * Allocate the proxy textures for the given context.
+ *
+ * \param ctx the context to allocate proxies for.
+ *
+ * \return GL_TRUE on success, or GL_FALSE on failure
+ *
+ * If run out of memory part way through the allocations, clean up and return
+ * GL_FALSE.
+ */
+static GLboolean
+alloc_proxy_textures( struct gl_context *ctx )
+{
+ static const GLenum targets[] = {
+ GL_TEXTURE_1D,
+ GL_TEXTURE_2D,
+ GL_TEXTURE_3D,
+ GL_TEXTURE_CUBE_MAP_ARB,
+ GL_TEXTURE_RECTANGLE_NV,
+ GL_TEXTURE_1D_ARRAY_EXT,
+ GL_TEXTURE_2D_ARRAY_EXT,
+ GL_TEXTURE_BUFFER
+ };
+ GLint tgt;
+
+ ASSERT(Elements(targets) == NUM_TEXTURE_TARGETS);
+
+ for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
+ if (!(ctx->Texture.ProxyTex[tgt]
+ = ctx->Driver.NewTextureObject(ctx, 0, targets[tgt]))) {
+ /* out of memory, free what we did allocate */
+ while (--tgt >= 0) {
+ ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]);
+ }
+ return GL_FALSE;
+ }
+ }
+
+ assert(ctx->Texture.ProxyTex[0]->RefCount == 1); /* sanity check */
+ return GL_TRUE;
+}
+
+
+/**
+ * Initialize a texture unit.
+ *
+ * \param ctx GL context.
+ * \param unit texture unit number to be initialized.
+ */
+static void
+init_texture_unit( struct gl_context *ctx, GLuint unit )
+{
+ struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
+ GLuint tex;
+
+ texUnit->EnvMode = GL_MODULATE;
+ ASSIGN_4V( texUnit->EnvColor, 0.0, 0.0, 0.0, 0.0 );
+
+ texUnit->Combine = default_combine_state;
+ texUnit->_EnvMode = default_combine_state;
+ texUnit->_CurrentCombine = & texUnit->_EnvMode;
+ texUnit->BumpTarget = GL_TEXTURE0;
+
+ texUnit->TexGenEnabled = 0x0;
+ texUnit->GenS.Mode = GL_EYE_LINEAR;
+ texUnit->GenT.Mode = GL_EYE_LINEAR;
+ texUnit->GenR.Mode = GL_EYE_LINEAR;
+ texUnit->GenQ.Mode = GL_EYE_LINEAR;
+ texUnit->GenS._ModeBit = TEXGEN_EYE_LINEAR;
+ texUnit->GenT._ModeBit = TEXGEN_EYE_LINEAR;
+ texUnit->GenR._ModeBit = TEXGEN_EYE_LINEAR;
+ texUnit->GenQ._ModeBit = TEXGEN_EYE_LINEAR;
+
+ /* Yes, these plane coefficients are correct! */
+ ASSIGN_4V( texUnit->GenS.ObjectPlane, 1.0, 0.0, 0.0, 0.0 );
+ ASSIGN_4V( texUnit->GenT.ObjectPlane, 0.0, 1.0, 0.0, 0.0 );
+ ASSIGN_4V( texUnit->GenR.ObjectPlane, 0.0, 0.0, 0.0, 0.0 );
+ ASSIGN_4V( texUnit->GenQ.ObjectPlane, 0.0, 0.0, 0.0, 0.0 );
+ ASSIGN_4V( texUnit->GenS.EyePlane, 1.0, 0.0, 0.0, 0.0 );
+ ASSIGN_4V( texUnit->GenT.EyePlane, 0.0, 1.0, 0.0, 0.0 );
+ ASSIGN_4V( texUnit->GenR.EyePlane, 0.0, 0.0, 0.0, 0.0 );
+ ASSIGN_4V( texUnit->GenQ.EyePlane, 0.0, 0.0, 0.0, 0.0 );
+
+ /* no mention of this in spec, but maybe id matrix expected? */
+ ASSIGN_4V( texUnit->RotMatrix, 1.0, 0.0, 0.0, 1.0 );
+
+ /* initialize current texture object ptrs to the shared default objects */
+ for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
+ _mesa_reference_texobj(&texUnit->CurrentTex[tex],
+ ctx->Shared->DefaultTex[tex]);
+ }
+}
+
+
+/**
+ * Initialize texture state for the given context.
+ */
+GLboolean
+_mesa_init_texture(struct gl_context *ctx)
+{
+ GLuint u;
+
+ /* Texture group */
+ ctx->Texture.CurrentUnit = 0; /* multitexture */
+ ctx->Texture._EnabledUnits = 0x0;
+ ctx->Texture.SharedPalette = GL_FALSE;
+ _mesa_init_colortable(&ctx->Texture.Palette);
+
+ for (u = 0; u < Elements(ctx->Texture.Unit); u++)
+ init_texture_unit(ctx, u);
+
+ /* After we're done initializing the context's texture state the default
+ * texture objects' refcounts should be at least
+ * MAX_COMBINED_TEXTURE_IMAGE_UNITS + 1.
+ */
+ assert(ctx->Shared->DefaultTex[TEXTURE_1D_INDEX]->RefCount
+ >= MAX_COMBINED_TEXTURE_IMAGE_UNITS + 1);
+
+ /* Allocate proxy textures */
+ if (!alloc_proxy_textures( ctx ))
+ return GL_FALSE;
+
+ /* GL_ARB_texture_buffer_object */
+ _mesa_reference_buffer_object(ctx, &ctx->Texture.BufferObject,
+ ctx->Shared->NullBufferObj);
+
+ return GL_TRUE;
+}
+
+
+/**
+ * Free dynamically-allocted texture data attached to the given context.
+ */
+void
+_mesa_free_texture_data(struct gl_context *ctx)
+{
+ GLuint u, tgt;
+
+ /* unreference current textures */
+ for (u = 0; u < Elements(ctx->Texture.Unit); u++) {
+ /* The _Current texture could account for another reference */
+ _mesa_reference_texobj(&ctx->Texture.Unit[u]._Current, NULL);
+
+ for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) {
+ _mesa_reference_texobj(&ctx->Texture.Unit[u].CurrentTex[tgt], NULL);
+ }
+ }
+
+ /* Free proxy texture objects */
+ for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++)
+ ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]);
+
+ /* GL_ARB_texture_buffer_object */
+ _mesa_reference_buffer_object(ctx, &ctx->Texture.BufferObject, NULL);
+}
+
+
+/**
+ * Update the default texture objects in the given context to reference those
+ * specified in the shared state and release those referencing the old
+ * shared state.
+ */
+void
+_mesa_update_default_objects_texture(struct gl_context *ctx)
+{
+ GLuint u, tex;
+
+ for (u = 0; u < Elements(ctx->Texture.Unit); u++) {
+ struct gl_texture_unit *texUnit = &ctx->Texture.Unit[u];
+ for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
+ _mesa_reference_texobj(&texUnit->CurrentTex[tex],
+ ctx->Shared->DefaultTex[tex]);
+ }
+ }
+}
diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c index eb37490e1..3f0a79d39 100644 --- a/mesalib/src/mesa/main/texstore.c +++ b/mesalib/src/mesa/main/texstore.c @@ -1,4856 +1,4856 @@ -/* - * Mesa 3-D graphics library - * Version: 7.5 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * Copyright (c) 2008-2009 VMware, Inc. - * - * 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 - * BRIAN PAUL 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. - */ - -/* - * Authors: - * Brian Paul - */ - -/** - * The GL texture image functions in teximage.c basically just do - * error checking and data structure allocation. They in turn call - * device driver functions which actually copy/convert/store the user's - * texture image data. - * - * However, most device drivers will be able to use the fallback functions - * in this file. That is, most drivers will have the following bit of - * code: - * ctx->Driver.TexImage1D = _mesa_store_teximage1d; - * ctx->Driver.TexImage2D = _mesa_store_teximage2d; - * ctx->Driver.TexImage3D = _mesa_store_teximage3d; - * etc... - * - * Texture image processing is actually kind of complicated. We have to do: - * Format/type conversions - * pixel unpacking - * pixel transfer (scale, bais, lookup, etc) - * - * These functions can handle most everything, including processing full - * images and sub-images. - */ - - -#include "glheader.h" -#include "bufferobj.h" -#include "colormac.h" -#include "image.h" -#include "macros.h" -#include "mipmap.h" -#include "mfeatures.h" -#include "mtypes.h" -#include "pack.h" -#include "pbo.h" -#include "imports.h" -#include "pack.h" -#include "texcompress.h" -#include "texcompress_fxt1.h" -#include "texcompress_rgtc.h" -#include "texcompress_s3tc.h" -#include "teximage.h" -#include "texstore.h" -#include "enums.h" - - -enum { - ZERO = 4, - ONE = 5 -}; - - -/** - * Texture image storage function. - */ -typedef GLboolean (*StoreTexImageFunc)(TEXSTORE_PARAMS); - - -/** - * Return GL_TRUE if the given image format is one that be converted - * to another format by swizzling. - */ -static GLboolean -can_swizzle(GLenum logicalBaseFormat) -{ - switch (logicalBaseFormat) { - case GL_RGBA: - case GL_RGB: - case GL_LUMINANCE_ALPHA: - case GL_INTENSITY: - case GL_ALPHA: - case GL_LUMINANCE: - case GL_RED: - case GL_GREEN: - case GL_BLUE: - case GL_BGR: - case GL_BGRA: - case GL_ABGR_EXT: - case GL_RG: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - - -enum { - IDX_LUMINANCE = 0, - IDX_ALPHA, - IDX_INTENSITY, - IDX_LUMINANCE_ALPHA, - IDX_RGB, - IDX_RGBA, - IDX_RED, - IDX_GREEN, - IDX_BLUE, - IDX_BGR, - IDX_BGRA, - IDX_ABGR, - IDX_RG, - MAX_IDX -}; - -#define MAP1(x) MAP4(x, ZERO, ZERO, ZERO) -#define MAP2(x,y) MAP4(x, y, ZERO, ZERO) -#define MAP3(x,y,z) MAP4(x, y, z, ZERO) -#define MAP4(x,y,z,w) { x, y, z, w, ZERO, ONE } - - -static const struct { - GLubyte format_idx; - GLubyte to_rgba[6]; - GLubyte from_rgba[6]; -} mappings[MAX_IDX] = -{ - { - IDX_LUMINANCE, - MAP4(0,0,0,ONE), - MAP1(0) - }, - - { - IDX_ALPHA, - MAP4(ZERO, ZERO, ZERO, 0), - MAP1(3) - }, - - { - IDX_INTENSITY, - MAP4(0, 0, 0, 0), - MAP1(0), - }, - - { - IDX_LUMINANCE_ALPHA, - MAP4(0,0,0,1), - MAP2(0,3) - }, - - { - IDX_RGB, - MAP4(0,1,2,ONE), - MAP3(0,1,2) - }, - - { - IDX_RGBA, - MAP4(0,1,2,3), - MAP4(0,1,2,3), - }, - - { - IDX_RED, - MAP4(0, ZERO, ZERO, ONE), - MAP1(0), - }, - - { - IDX_GREEN, - MAP4(ZERO, 0, ZERO, ONE), - MAP1(1), - }, - - { - IDX_BLUE, - MAP4(ZERO, ZERO, 0, ONE), - MAP1(2), - }, - - { - IDX_BGR, - MAP4(2,1,0,ONE), - MAP3(2,1,0) - }, - - { - IDX_BGRA, - MAP4(2,1,0,3), - MAP4(2,1,0,3) - }, - - { - IDX_ABGR, - MAP4(3,2,1,0), - MAP4(3,2,1,0) - }, - - { - IDX_RG, - MAP4(0, 1, ZERO, ONE), - MAP2(0, 1) - }, -}; - - - -/** - * Convert a GL image format enum to an IDX_* value (see above). - */ -static int -get_map_idx(GLenum value) -{ - switch (value) { - case GL_LUMINANCE: return IDX_LUMINANCE; - case GL_ALPHA: return IDX_ALPHA; - case GL_INTENSITY: return IDX_INTENSITY; - case GL_LUMINANCE_ALPHA: return IDX_LUMINANCE_ALPHA; - case GL_RGB: return IDX_RGB; - case GL_RGBA: return IDX_RGBA; - case GL_RED: return IDX_RED; - case GL_GREEN: return IDX_GREEN; - case GL_BLUE: return IDX_BLUE; - case GL_BGR: return IDX_BGR; - case GL_BGRA: return IDX_BGRA; - case GL_ABGR_EXT: return IDX_ABGR; - case GL_RG: return IDX_RG; - default: - _mesa_problem(NULL, "Unexpected inFormat"); - return 0; - } -} - - -/** - * When promoting texture formats (see below) we need to compute the - * mapping of dest components back to source components. - * This function does that. - * \param inFormat the incoming format of the texture - * \param outFormat the final texture format - * \return map[6] a full 6-component map - */ -static void -compute_component_mapping(GLenum inFormat, GLenum outFormat, - GLubyte *map) -{ - const int inFmt = get_map_idx(inFormat); - const int outFmt = get_map_idx(outFormat); - const GLubyte *in2rgba = mappings[inFmt].to_rgba; - const GLubyte *rgba2out = mappings[outFmt].from_rgba; - int i; - - for (i = 0; i < 4; i++) - map[i] = in2rgba[rgba2out[i]]; - - map[ZERO] = ZERO; - map[ONE] = ONE; - -#if 0 - printf("from %x/%s to %x/%s map %d %d %d %d %d %d\n", - inFormat, _mesa_lookup_enum_by_nr(inFormat), - outFormat, _mesa_lookup_enum_by_nr(outFormat), - map[0], - map[1], - map[2], - map[3], - map[4], - map[5]); -#endif -} - - -/** - * Make a temporary (color) texture image with GLfloat components. - * Apply all needed pixel unpacking and pixel transfer operations. - * Note that there are both logicalBaseFormat and textureBaseFormat parameters. - * Suppose the user specifies GL_LUMINANCE as the internal texture format - * but the graphics hardware doesn't support luminance textures. So, we might - * use an RGB hardware format instead. - * If logicalBaseFormat != textureBaseFormat we have some extra work to do. - * - * \param ctx the rendering context - * \param dims image dimensions: 1, 2 or 3 - * \param logicalBaseFormat basic texture derived from the user's - * internal texture format value - * \param textureBaseFormat the actual basic format of the texture - * \param srcWidth source image width - * \param srcHeight source image height - * \param srcDepth source image depth - * \param srcFormat source image format - * \param srcType source image type - * \param srcAddr source image address - * \param srcPacking source image pixel packing - * \return resulting image with format = textureBaseFormat and type = GLfloat. - */ -GLfloat * -_mesa_make_temp_float_image(struct gl_context *ctx, GLuint dims, - GLenum logicalBaseFormat, - GLenum textureBaseFormat, - GLint srcWidth, GLint srcHeight, GLint srcDepth, - GLenum srcFormat, GLenum srcType, - const GLvoid *srcAddr, - const struct gl_pixelstore_attrib *srcPacking, - GLbitfield transferOps) -{ - GLfloat *tempImage; - const GLint components = _mesa_components_in_format(logicalBaseFormat); - const GLint srcStride = - _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType); - GLfloat *dst; - GLint img, row; - - ASSERT(dims >= 1 && dims <= 3); - - ASSERT(logicalBaseFormat == GL_RGBA || - logicalBaseFormat == GL_RGB || - logicalBaseFormat == GL_RG || - logicalBaseFormat == GL_RED || - logicalBaseFormat == GL_LUMINANCE_ALPHA || - logicalBaseFormat == GL_LUMINANCE || - logicalBaseFormat == GL_ALPHA || - logicalBaseFormat == GL_INTENSITY || - logicalBaseFormat == GL_COLOR_INDEX || - logicalBaseFormat == GL_DEPTH_COMPONENT); - - ASSERT(textureBaseFormat == GL_RGBA || - textureBaseFormat == GL_RGB || - textureBaseFormat == GL_RG || - textureBaseFormat == GL_RED || - textureBaseFormat == GL_LUMINANCE_ALPHA || - textureBaseFormat == GL_LUMINANCE || - textureBaseFormat == GL_ALPHA || - textureBaseFormat == GL_INTENSITY || - textureBaseFormat == GL_COLOR_INDEX || - textureBaseFormat == GL_DEPTH_COMPONENT); - - tempImage = (GLfloat *) malloc(srcWidth * srcHeight * srcDepth - * components * sizeof(GLfloat)); - if (!tempImage) - return NULL; - - dst = tempImage; - for (img = 0; img < srcDepth; img++) { - const GLubyte *src - = (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr, - srcWidth, srcHeight, - srcFormat, srcType, - img, 0, 0); - for (row = 0; row < srcHeight; row++) { - _mesa_unpack_color_span_float(ctx, srcWidth, logicalBaseFormat, - dst, srcFormat, srcType, src, - srcPacking, transferOps); - dst += srcWidth * components; - src += srcStride; - } - } - - if (logicalBaseFormat != textureBaseFormat) { - /* more work */ - GLint texComponents = _mesa_components_in_format(textureBaseFormat); - GLint logComponents = _mesa_components_in_format(logicalBaseFormat); - GLfloat *newImage; - GLint i, n; - GLubyte map[6]; - - /* we only promote up to RGB, RGBA and LUMINANCE_ALPHA formats for now */ - ASSERT(textureBaseFormat == GL_RGB || textureBaseFormat == GL_RGBA || - textureBaseFormat == GL_LUMINANCE_ALPHA); - - /* The actual texture format should have at least as many components - * as the logical texture format. - */ - ASSERT(texComponents >= logComponents); - - newImage = (GLfloat *) malloc(srcWidth * srcHeight * srcDepth - * texComponents * sizeof(GLfloat)); - if (!newImage) { - free(tempImage); - return NULL; - } - - compute_component_mapping(logicalBaseFormat, textureBaseFormat, map); - - n = srcWidth * srcHeight * srcDepth; - for (i = 0; i < n; i++) { - GLint k; - for (k = 0; k < texComponents; k++) { - GLint j = map[k]; - if (j == ZERO) - newImage[i * texComponents + k] = 0.0F; - else if (j == ONE) - newImage[i * texComponents + k] = 1.0F; - else - newImage[i * texComponents + k] = tempImage[i * logComponents + j]; - } - } - - free(tempImage); - tempImage = newImage; - } - - return tempImage; -} - - -/** - * Make temporary image with uint pixel values. Used for unsigned - * integer-valued textures. - */ -static GLuint * -make_temp_uint_image(struct gl_context *ctx, GLuint dims, - GLenum logicalBaseFormat, - GLenum textureBaseFormat, - GLint srcWidth, GLint srcHeight, GLint srcDepth, - GLenum srcFormat, GLenum srcType, - const GLvoid *srcAddr, - const struct gl_pixelstore_attrib *srcPacking) -{ - GLuint *tempImage; - const GLint components = _mesa_components_in_format(logicalBaseFormat); - const GLint srcStride = - _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType); - GLuint *dst; - GLint img, row; - - ASSERT(dims >= 1 && dims <= 3); - - ASSERT(logicalBaseFormat == GL_RGBA || - logicalBaseFormat == GL_RGB || - logicalBaseFormat == GL_RG || - logicalBaseFormat == GL_RED || - logicalBaseFormat == GL_LUMINANCE_ALPHA || - logicalBaseFormat == GL_LUMINANCE || - logicalBaseFormat == GL_INTENSITY || - logicalBaseFormat == GL_ALPHA); - - ASSERT(textureBaseFormat == GL_RGBA || - textureBaseFormat == GL_RGB || - textureBaseFormat == GL_RG || - textureBaseFormat == GL_RED || - textureBaseFormat == GL_LUMINANCE_ALPHA || - textureBaseFormat == GL_LUMINANCE || - textureBaseFormat == GL_ALPHA); - - tempImage = (GLuint *) malloc(srcWidth * srcHeight * srcDepth - * components * sizeof(GLuint)); - if (!tempImage) - return NULL; - - dst = tempImage; - for (img = 0; img < srcDepth; img++) { - const GLubyte *src - = (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr, - srcWidth, srcHeight, - srcFormat, srcType, - img, 0, 0); - for (row = 0; row < srcHeight; row++) { - _mesa_unpack_color_span_uint(ctx, srcWidth, logicalBaseFormat, - dst, srcFormat, srcType, src, - srcPacking); - dst += srcWidth * components; - src += srcStride; - } - } - - if (logicalBaseFormat != textureBaseFormat) { - /* more work */ - GLint texComponents = _mesa_components_in_format(textureBaseFormat); - GLint logComponents = _mesa_components_in_format(logicalBaseFormat); - GLuint *newImage; - GLint i, n; - GLubyte map[6]; - - /* we only promote up to RGB, RGBA and LUMINANCE_ALPHA formats for now */ - ASSERT(textureBaseFormat == GL_RGB || textureBaseFormat == GL_RGBA || - textureBaseFormat == GL_LUMINANCE_ALPHA); - - /* The actual texture format should have at least as many components - * as the logical texture format. - */ - ASSERT(texComponents >= logComponents); - - newImage = (GLuint *) malloc(srcWidth * srcHeight * srcDepth - * texComponents * sizeof(GLuint)); - if (!newImage) { - free(tempImage); - return NULL; - } - - compute_component_mapping(logicalBaseFormat, textureBaseFormat, map); - - n = srcWidth * srcHeight * srcDepth; - for (i = 0; i < n; i++) { - GLint k; - for (k = 0; k < texComponents; k++) { - GLint j = map[k]; - if (j == ZERO) - newImage[i * texComponents + k] = 0.0F; - else if (j == ONE) - newImage[i * texComponents + k] = 1.0F; - else - newImage[i * texComponents + k] = tempImage[i * logComponents + j]; - } - } - - free(tempImage); - tempImage = newImage; - } - - return tempImage; -} - - - -/** - * Make a temporary (color) texture image with GLchan components. - * Apply all needed pixel unpacking and pixel transfer operations. - * Note that there are both logicalBaseFormat and textureBaseFormat parameters. - * Suppose the user specifies GL_LUMINANCE as the internal texture format - * but the graphics hardware doesn't support luminance textures. So, we might - * use an RGB hardware format instead. - * If logicalBaseFormat != textureBaseFormat we have some extra work to do. - * - * \param ctx the rendering context - * \param dims image dimensions: 1, 2 or 3 - * \param logicalBaseFormat basic texture derived from the user's - * internal texture format value - * \param textureBaseFormat the actual basic format of the texture - * \param srcWidth source image width - * \param srcHeight source image height - * \param srcDepth source image depth - * \param srcFormat source image format - * \param srcType source image type - * \param srcAddr source image address - * \param srcPacking source image pixel packing - * \return resulting image with format = textureBaseFormat and type = GLchan. - */ -GLchan * -_mesa_make_temp_chan_image(struct gl_context *ctx, GLuint dims, - GLenum logicalBaseFormat, - GLenum textureBaseFormat, - GLint srcWidth, GLint srcHeight, GLint srcDepth, - GLenum srcFormat, GLenum srcType, - const GLvoid *srcAddr, - const struct gl_pixelstore_attrib *srcPacking) -{ - GLuint transferOps = ctx->_ImageTransferState; - const GLint components = _mesa_components_in_format(logicalBaseFormat); - GLint img, row; - GLchan *tempImage, *dst; - - ASSERT(dims >= 1 && dims <= 3); - - ASSERT(logicalBaseFormat == GL_RGBA || - logicalBaseFormat == GL_RGB || - logicalBaseFormat == GL_RG || - logicalBaseFormat == GL_RED || - logicalBaseFormat == GL_LUMINANCE_ALPHA || - logicalBaseFormat == GL_LUMINANCE || - logicalBaseFormat == GL_ALPHA || - logicalBaseFormat == GL_INTENSITY); - - ASSERT(textureBaseFormat == GL_RGBA || - textureBaseFormat == GL_RGB || - textureBaseFormat == GL_RG || - textureBaseFormat == GL_RED || - textureBaseFormat == GL_LUMINANCE_ALPHA || - textureBaseFormat == GL_LUMINANCE || - textureBaseFormat == GL_ALPHA || - textureBaseFormat == GL_INTENSITY); - - /* unpack and transfer the source image */ - tempImage = (GLchan *) malloc(srcWidth * srcHeight * srcDepth - * components * sizeof(GLchan)); - if (!tempImage) { - return NULL; - } - - dst = tempImage; - for (img = 0; img < srcDepth; img++) { - const GLint srcStride = - _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType); - const GLubyte *src = - (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr, - srcWidth, srcHeight, - srcFormat, srcType, - img, 0, 0); - for (row = 0; row < srcHeight; row++) { - _mesa_unpack_color_span_chan(ctx, srcWidth, logicalBaseFormat, dst, - srcFormat, srcType, src, srcPacking, - transferOps); - dst += srcWidth * components; - src += srcStride; - } - } - - if (logicalBaseFormat != textureBaseFormat) { - /* one more conversion step */ - GLint texComponents = _mesa_components_in_format(textureBaseFormat); - GLint logComponents = _mesa_components_in_format(logicalBaseFormat); - GLchan *newImage; - GLint i, n; - GLubyte map[6]; - - /* we only promote up to RGB, RGBA and LUMINANCE_ALPHA formats for now */ - ASSERT(textureBaseFormat == GL_RGB || textureBaseFormat == GL_RGBA || - textureBaseFormat == GL_LUMINANCE_ALPHA); - - /* The actual texture format should have at least as many components - * as the logical texture format. - */ - ASSERT(texComponents >= logComponents); - - newImage = (GLchan *) malloc(srcWidth * srcHeight * srcDepth - * texComponents * sizeof(GLchan)); - if (!newImage) { - free(tempImage); - return NULL; - } - - compute_component_mapping(logicalBaseFormat, textureBaseFormat, map); - - n = srcWidth * srcHeight * srcDepth; - for (i = 0; i < n; i++) { - GLint k; - for (k = 0; k < texComponents; k++) { - GLint j = map[k]; - if (j == ZERO) - newImage[i * texComponents + k] = 0; - else if (j == ONE) - newImage[i * texComponents + k] = CHAN_MAX; - else - newImage[i * texComponents + k] = tempImage[i * logComponents + j]; - } - } - - free(tempImage); - tempImage = newImage; - } - - return tempImage; -} - - -/** - * Copy GLubyte pixels from <src> to <dst> with swizzling. - * \param dst destination pixels - * \param dstComponents number of color components in destination pixels - * \param src source pixels - * \param srcComponents number of color components in source pixels - * \param map the swizzle mapping. map[X] says where to find the X component - * in the source image's pixels. For example, if the source image - * is GL_BGRA and X = red, map[0] yields 2. - * \param count number of pixels to copy/swizzle. - */ -static void -swizzle_copy(GLubyte *dst, GLuint dstComponents, const GLubyte *src, - GLuint srcComponents, const GLubyte *map, GLuint count) -{ -#define SWZ_CPY(dst, src, count, dstComps, srcComps) \ - do { \ - GLuint i; \ - for (i = 0; i < count; i++) { \ - GLuint j; \ - if (srcComps == 4) { \ - COPY_4UBV(tmp, src); \ - } \ - else { \ - for (j = 0; j < srcComps; j++) { \ - tmp[j] = src[j]; \ - } \ - } \ - src += srcComps; \ - for (j = 0; j < dstComps; j++) { \ - dst[j] = tmp[map[j]]; \ - } \ - dst += dstComps; \ - } \ - } while (0) - - GLubyte tmp[6]; - - tmp[ZERO] = 0x0; - tmp[ONE] = 0xff; - - ASSERT(srcComponents <= 4); - ASSERT(dstComponents <= 4); - - switch (dstComponents) { - case 4: - switch (srcComponents) { - case 4: - SWZ_CPY(dst, src, count, 4, 4); - break; - case 3: - SWZ_CPY(dst, src, count, 4, 3); - break; - case 2: - SWZ_CPY(dst, src, count, 4, 2); - break; - case 1: - SWZ_CPY(dst, src, count, 4, 1); - break; - default: - ; - } - break; - case 3: - switch (srcComponents) { - case 4: - SWZ_CPY(dst, src, count, 3, 4); - break; - case 3: - SWZ_CPY(dst, src, count, 3, 3); - break; - case 2: - SWZ_CPY(dst, src, count, 3, 2); - break; - case 1: - SWZ_CPY(dst, src, count, 3, 1); - break; - default: - ; - } - break; - case 2: - switch (srcComponents) { - case 4: - SWZ_CPY(dst, src, count, 2, 4); - break; - case 3: - SWZ_CPY(dst, src, count, 2, 3); - break; - case 2: - SWZ_CPY(dst, src, count, 2, 2); - break; - case 1: - SWZ_CPY(dst, src, count, 2, 1); - break; - default: - ; - } - break; - case 1: - switch (srcComponents) { - case 4: - SWZ_CPY(dst, src, count, 1, 4); - break; - case 3: - SWZ_CPY(dst, src, count, 1, 3); - break; - case 2: - SWZ_CPY(dst, src, count, 1, 2); - break; - case 1: - SWZ_CPY(dst, src, count, 1, 1); - break; - default: - ; - } - break; - default: - ; - } -#undef SWZ_CPY -} - - - -static const GLubyte map_identity[6] = { 0, 1, 2, 3, ZERO, ONE }; -static const GLubyte map_3210[6] = { 3, 2, 1, 0, ZERO, ONE }; - - -/** - * For 1-byte/pixel formats (or 8_8_8_8 packed formats), return a - * mapping array depending on endianness. - */ -static const GLubyte * -type_mapping( GLenum srcType ) -{ - switch (srcType) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - return map_identity; - case GL_UNSIGNED_INT_8_8_8_8: - return _mesa_little_endian() ? map_3210 : map_identity; - case GL_UNSIGNED_INT_8_8_8_8_REV: - return _mesa_little_endian() ? map_identity : map_3210; - default: - return NULL; - } -} - - -/** - * For 1-byte/pixel formats (or 8_8_8_8 packed formats), return a - * mapping array depending on pixelstore byte swapping state. - */ -static const GLubyte * -byteswap_mapping( GLboolean swapBytes, - GLenum srcType ) -{ - if (!swapBytes) - return map_identity; - - switch (srcType) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - return map_identity; - case GL_UNSIGNED_INT_8_8_8_8: - case GL_UNSIGNED_INT_8_8_8_8_REV: - return map_3210; - default: - return NULL; - } -} - - - -/** - * Transfer a GLubyte texture image with component swizzling. - */ -static void -_mesa_swizzle_ubyte_image(struct gl_context *ctx, - GLuint dimensions, - GLenum srcFormat, - GLenum srcType, - - GLenum baseInternalFormat, - - const GLubyte *rgba2dst, - GLuint dstComponents, - - GLvoid *dstAddr, - GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, - GLint dstRowStride, - const GLuint *dstImageOffsets, - - GLint srcWidth, GLint srcHeight, GLint srcDepth, - const GLvoid *srcAddr, - const struct gl_pixelstore_attrib *srcPacking ) -{ - GLint srcComponents = _mesa_components_in_format(srcFormat); - const GLubyte *srctype2ubyte, *swap; - GLubyte map[4], src2base[6], base2rgba[6]; - GLint i; - const GLint srcRowStride = - _mesa_image_row_stride(srcPacking, srcWidth, - srcFormat, GL_UNSIGNED_BYTE); - const GLint srcImageStride - = _mesa_image_image_stride(srcPacking, srcWidth, srcHeight, srcFormat, - GL_UNSIGNED_BYTE); - const GLubyte *srcImage - = (const GLubyte *) _mesa_image_address(dimensions, srcPacking, srcAddr, - srcWidth, srcHeight, srcFormat, - GL_UNSIGNED_BYTE, 0, 0, 0); - - (void) ctx; - - /* Translate from src->baseInternal->GL_RGBA->dst. This will - * correctly deal with RGBA->RGB->RGBA conversions where the final - * A value must be 0xff regardless of the incoming alpha values. - */ - compute_component_mapping(srcFormat, baseInternalFormat, src2base); - compute_component_mapping(baseInternalFormat, GL_RGBA, base2rgba); - swap = byteswap_mapping(srcPacking->SwapBytes, srcType); - srctype2ubyte = type_mapping(srcType); - - - for (i = 0; i < 4; i++) - map[i] = srctype2ubyte[swap[src2base[base2rgba[rgba2dst[i]]]]]; - -/* printf("map %d %d %d %d\n", map[0], map[1], map[2], map[3]); */ - - if (srcComponents == dstComponents && - srcRowStride == dstRowStride && - srcRowStride == srcWidth * srcComponents && - dimensions < 3) { - /* 1 and 2D images only */ - GLubyte *dstImage = (GLubyte *) dstAddr - + dstYoffset * dstRowStride - + dstXoffset * dstComponents; - swizzle_copy(dstImage, dstComponents, srcImage, srcComponents, map, - srcWidth * srcHeight); - } - else { - GLint img, row; - for (img = 0; img < srcDepth; img++) { - const GLubyte *srcRow = srcImage; - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * dstComponents - + dstYoffset * dstRowStride - + dstXoffset * dstComponents; - for (row = 0; row < srcHeight; row++) { - swizzle_copy(dstRow, dstComponents, srcRow, srcComponents, map, srcWidth); - dstRow += dstRowStride; - srcRow += srcRowStride; - } - srcImage += srcImageStride; - } - } -} - - -/** - * Teximage storage routine for when a simple memcpy will do. - * No pixel transfer operations or special texel encodings allowed. - * 1D, 2D and 3D images supported. - */ -static void -memcpy_texture(struct gl_context *ctx, - GLuint dimensions, - gl_format dstFormat, - GLvoid *dstAddr, - GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, - GLint dstRowStride, - const GLuint *dstImageOffsets, - GLint srcWidth, GLint srcHeight, GLint srcDepth, - GLenum srcFormat, GLenum srcType, - const GLvoid *srcAddr, - const struct gl_pixelstore_attrib *srcPacking) -{ - const GLint srcRowStride = _mesa_image_row_stride(srcPacking, srcWidth, - srcFormat, srcType); - const GLint srcImageStride = _mesa_image_image_stride(srcPacking, - srcWidth, srcHeight, srcFormat, srcType); - const GLubyte *srcImage = (const GLubyte *) _mesa_image_address(dimensions, - srcPacking, srcAddr, srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLint bytesPerRow = srcWidth * texelBytes; - -#if 0 - /* XXX update/re-enable for dstImageOffsets array */ - const GLint bytesPerImage = srcHeight * bytesPerRow; - const GLint bytesPerTexture = srcDepth * bytesPerImage; - GLubyte *dstImage = (GLubyte *) dstAddr - + dstZoffset * dstImageStride - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - - if (dstRowStride == srcRowStride && - dstRowStride == bytesPerRow && - ((dstImageStride == srcImageStride && - dstImageStride == bytesPerImage) || - (srcDepth == 1))) { - /* one big memcpy */ - ctx->Driver.TextureMemCpy(dstImage, srcImage, bytesPerTexture); - } - else - { - GLint img, row; - for (img = 0; img < srcDepth; img++) { - const GLubyte *srcRow = srcImage; - GLubyte *dstRow = dstImage; - for (row = 0; row < srcHeight; row++) { - ctx->Driver.TextureMemCpy(dstRow, srcRow, bytesPerRow); - dstRow += dstRowStride; - srcRow += srcRowStride; - } - srcImage += srcImageStride; - dstImage += dstImageStride; - } - } -#endif - - GLint img, row; - for (img = 0; img < srcDepth; img++) { - const GLubyte *srcRow = srcImage; - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - ctx->Driver.TextureMemCpy(dstRow, srcRow, bytesPerRow); - dstRow += dstRowStride; - srcRow += srcRowStride; - } - srcImage += srcImageStride; - } -} - - - -/** - * Store a 32-bit integer depth component texture image. - */ -static GLboolean -_mesa_texstore_z32(TEXSTORE_PARAMS) -{ - const GLuint depthScale = 0xffffffff; - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - (void) dims; - ASSERT(dstFormat == MESA_FORMAT_Z32); - ASSERT(texelBytes == sizeof(GLuint)); - - if (ctx->Pixel.DepthScale == 1.0f && - ctx->Pixel.DepthBias == 0.0f && - !srcPacking->SwapBytes && - baseInternalFormat == GL_DEPTH_COMPONENT && - srcFormat == GL_DEPTH_COMPONENT && - srcType == GL_UNSIGNED_INT) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - GLint img, row; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - const GLvoid *src = _mesa_image_address(dims, srcPacking, - srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0); - _mesa_unpack_depth_span(ctx, srcWidth, - GL_UNSIGNED_INT, (GLuint *) dstRow, - depthScale, srcType, src, srcPacking); - dstRow += dstRowStride; - } - } - } - return GL_TRUE; -} - - -/** - * Store a 24-bit integer depth component texture image. - */ -static GLboolean -_mesa_texstore_x8_z24(TEXSTORE_PARAMS) -{ - const GLuint depthScale = 0xffffff; - const GLuint texelBytes = 4; - - (void) dims; - ASSERT(dstFormat == MESA_FORMAT_X8_Z24); - - { - /* general path */ - GLint img, row; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - const GLvoid *src = _mesa_image_address(dims, srcPacking, - srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0); - _mesa_unpack_depth_span(ctx, srcWidth, - GL_UNSIGNED_INT, (GLuint *) dstRow, - depthScale, srcType, src, srcPacking); - dstRow += dstRowStride; - } - } - } - return GL_TRUE; -} - - -/** - * Store a 24-bit integer depth component texture image. - */ -static GLboolean -_mesa_texstore_z24_x8(TEXSTORE_PARAMS) -{ - const GLuint depthScale = 0xffffff; - const GLuint texelBytes = 4; - - (void) dims; - ASSERT(dstFormat == MESA_FORMAT_Z24_X8); - - { - /* general path */ - GLint img, row; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - const GLvoid *src = _mesa_image_address(dims, srcPacking, - srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0); - GLuint *dst = (GLuint *) dstRow; - GLint i; - _mesa_unpack_depth_span(ctx, srcWidth, - GL_UNSIGNED_INT, dst, - depthScale, srcType, src, srcPacking); - for (i = 0; i < srcWidth; i++) - dst[i] <<= 8; - dstRow += dstRowStride; - } - } - } - return GL_TRUE; -} - - -/** - * Store a 16-bit integer depth component texture image. - */ -static GLboolean -_mesa_texstore_z16(TEXSTORE_PARAMS) -{ - const GLuint depthScale = 0xffff; - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - (void) dims; - ASSERT(dstFormat == MESA_FORMAT_Z16); - ASSERT(texelBytes == sizeof(GLushort)); - - if (ctx->Pixel.DepthScale == 1.0f && - ctx->Pixel.DepthBias == 0.0f && - !srcPacking->SwapBytes && - baseInternalFormat == GL_DEPTH_COMPONENT && - srcFormat == GL_DEPTH_COMPONENT && - srcType == GL_UNSIGNED_SHORT) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - GLint img, row; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - const GLvoid *src = _mesa_image_address(dims, srcPacking, - srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0); - GLushort *dst16 = (GLushort *) dstRow; - _mesa_unpack_depth_span(ctx, srcWidth, - GL_UNSIGNED_SHORT, dst16, depthScale, - srcType, src, srcPacking); - dstRow += dstRowStride; - } - } - } - return GL_TRUE; -} - - -/** - * Store an rgb565 or rgb565_rev texture image. - */ -static GLboolean -_mesa_texstore_rgb565(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGB565 || - dstFormat == MESA_FORMAT_RGB565_REV); - ASSERT(texelBytes == 2); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_RGB565 && - baseInternalFormat == GL_RGB && - srcFormat == GL_RGB && - srcType == GL_UNSIGNED_SHORT_5_6_5) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == GL_RGB && - srcFormat == GL_RGB && - srcType == GL_UNSIGNED_BYTE && - dims == 2) { - /* do optimized tex store */ - const GLint srcRowStride = - _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType); - const GLubyte *src = (const GLubyte *) - _mesa_image_address(dims, srcPacking, srcAddr, srcWidth, srcHeight, - srcFormat, srcType, 0, 0, 0); - GLubyte *dst = (GLubyte *) dstAddr - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - GLint row, col; - for (row = 0; row < srcHeight; row++) { - const GLubyte *srcUB = (const GLubyte *) src; - GLushort *dstUS = (GLushort *) dst; - /* check for byteswapped format */ - if (dstFormat == MESA_FORMAT_RGB565) { - for (col = 0; col < srcWidth; col++) { - dstUS[col] = PACK_COLOR_565( srcUB[0], srcUB[1], srcUB[2] ); - srcUB += 3; - } - } - else { - for (col = 0; col < srcWidth; col++) { - dstUS[col] = PACK_COLOR_565_REV( srcUB[0], srcUB[1], srcUB[2] ); - srcUB += 3; - } - } - dst += dstRowStride; - src += srcRowStride; - } - } - else { - /* general path */ - const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking); - const GLchan *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLushort *dstUS = (GLushort *) dstRow; - /* check for byteswapped format */ - if (dstFormat == MESA_FORMAT_RGB565) { - for (col = 0; col < srcWidth; col++) { - dstUS[col] = PACK_COLOR_565( CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]) ); - src += 3; - } - } - else { - for (col = 0; col < srcWidth; col++) { - dstUS[col] = PACK_COLOR_565_REV( CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]) ); - src += 3; - } - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -/** - * Store a texture in MESA_FORMAT_RGBA8888 or MESA_FORMAT_RGBA8888_REV. - */ -static GLboolean -_mesa_texstore_rgba8888(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA8888 || - dstFormat == MESA_FORMAT_RGBA8888_REV); - ASSERT(texelBytes == 4); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_RGBA8888 && - baseInternalFormat == GL_RGBA && - ((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8) || - (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && !littleEndian) || - (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) || - (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && littleEndian))) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_RGBA8888_REV && - baseInternalFormat == GL_RGBA && - ((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) || - (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && littleEndian) || - (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8) || - (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && !littleEndian))) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (!ctx->_ImageTransferState && - (srcType == GL_UNSIGNED_BYTE || - srcType == GL_UNSIGNED_INT_8_8_8_8 || - srcType == GL_UNSIGNED_INT_8_8_8_8_REV) && - can_swizzle(baseInternalFormat) && - can_swizzle(srcFormat)) { - - GLubyte dstmap[4]; - - /* dstmap - how to swizzle from RGBA to dst format: - */ - if ((littleEndian && dstFormat == MESA_FORMAT_RGBA8888) || - (!littleEndian && dstFormat == MESA_FORMAT_RGBA8888_REV)) { - dstmap[3] = 0; - dstmap[2] = 1; - dstmap[1] = 2; - dstmap[0] = 3; - } - else { - dstmap[3] = 3; - dstmap[2] = 2; - dstmap[1] = 1; - dstmap[0] = 0; - } - - _mesa_swizzle_ubyte_image(ctx, dims, - srcFormat, - srcType, - baseInternalFormat, - dstmap, 4, - dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcAddr, - srcPacking); - } - else { - /* general path */ - const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking); - const GLchan *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLuint *dstUI = (GLuint *) dstRow; - if (dstFormat == MESA_FORMAT_RGBA8888) { - for (col = 0; col < srcWidth; col++) { - dstUI[col] = PACK_COLOR_8888( CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]), - CHAN_TO_UBYTE(src[ACOMP]) ); - src += 4; - } - } - else { - for (col = 0; col < srcWidth; col++) { - dstUI[col] = PACK_COLOR_8888_REV( CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]), - CHAN_TO_UBYTE(src[ACOMP]) ); - src += 4; - } - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -static GLboolean -_mesa_texstore_argb8888(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = GL_RGBA; - - ASSERT(dstFormat == MESA_FORMAT_ARGB8888 || - dstFormat == MESA_FORMAT_ARGB8888_REV || - dstFormat == MESA_FORMAT_XRGB8888 || - dstFormat == MESA_FORMAT_XRGB8888_REV ); - ASSERT(texelBytes == 4); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - (dstFormat == MESA_FORMAT_ARGB8888 || - dstFormat == MESA_FORMAT_XRGB8888) && - baseInternalFormat == GL_RGBA && - srcFormat == GL_BGRA && - ((srcType == GL_UNSIGNED_BYTE && littleEndian) || - srcType == GL_UNSIGNED_INT_8_8_8_8_REV)) { - /* simple memcpy path (little endian) */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - (dstFormat == MESA_FORMAT_ARGB8888_REV || - dstFormat == MESA_FORMAT_XRGB8888_REV) && - baseInternalFormat == GL_RGBA && - srcFormat == GL_BGRA && - ((srcType == GL_UNSIGNED_BYTE && !littleEndian) || - srcType == GL_UNSIGNED_INT_8_8_8_8)) { - /* simple memcpy path (big endian) */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - (dstFormat == MESA_FORMAT_ARGB8888 || - dstFormat == MESA_FORMAT_XRGB8888) && - srcFormat == GL_RGB && - (baseInternalFormat == GL_RGBA || - baseInternalFormat == GL_RGB) && - srcType == GL_UNSIGNED_BYTE) { - int img, row, col; - for (img = 0; img < srcDepth; img++) { - const GLint srcRowStride = - _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType); - GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking, - srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0); - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLuint *d4 = (GLuint *) dstRow; - for (col = 0; col < srcWidth; col++) { - d4[col] = PACK_COLOR_8888(0xff, - srcRow[col * 3 + RCOMP], - srcRow[col * 3 + GCOMP], - srcRow[col * 3 + BCOMP]); - } - dstRow += dstRowStride; - srcRow += srcRowStride; - } - } - } - else if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_ARGB8888 && - srcFormat == GL_RGBA && - baseInternalFormat == GL_RGBA && - srcType == GL_UNSIGNED_BYTE) { - /* same as above case, but src data has alpha too */ - GLint img, row, col; - /* For some reason, streaming copies to write-combined regions - * are extremely sensitive to the characteristics of how the - * source data is retrieved. By reordering the source reads to - * be in-order, the speed of this operation increases by half. - * Strangely the same isn't required for the RGB path, above. - */ - for (img = 0; img < srcDepth; img++) { - const GLint srcRowStride = - _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType); - GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking, - srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0); - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLuint *d4 = (GLuint *) dstRow; - for (col = 0; col < srcWidth; col++) { - d4[col] = PACK_COLOR_8888(srcRow[col * 4 + ACOMP], - srcRow[col * 4 + RCOMP], - srcRow[col * 4 + GCOMP], - srcRow[col * 4 + BCOMP]); - } - dstRow += dstRowStride; - srcRow += srcRowStride; - } - } - } - else if (!ctx->_ImageTransferState && - (srcType == GL_UNSIGNED_BYTE || - srcType == GL_UNSIGNED_INT_8_8_8_8 || - srcType == GL_UNSIGNED_INT_8_8_8_8_REV) && - can_swizzle(baseInternalFormat) && - can_swizzle(srcFormat)) { - - GLubyte dstmap[4]; - - /* dstmap - how to swizzle from RGBA to dst format: - */ - if ((littleEndian && dstFormat == MESA_FORMAT_ARGB8888) || - (littleEndian && dstFormat == MESA_FORMAT_XRGB8888) || - (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV) || - (!littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV)) { - dstmap[3] = 3; /* alpha */ - dstmap[2] = 0; /* red */ - dstmap[1] = 1; /* green */ - dstmap[0] = 2; /* blue */ - } - else { - assert((littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV) || - (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888) || - (littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV) || - (!littleEndian && dstFormat == MESA_FORMAT_XRGB8888)); - dstmap[3] = 2; - dstmap[2] = 1; - dstmap[1] = 0; - dstmap[0] = 3; - } - - _mesa_swizzle_ubyte_image(ctx, dims, - srcFormat, - srcType, - baseInternalFormat, - dstmap, 4, - dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcAddr, - srcPacking); - } - else { - /* general path */ - const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking); - const GLchan *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLuint *dstUI = (GLuint *) dstRow; - if (dstFormat == MESA_FORMAT_ARGB8888) { - for (col = 0; col < srcWidth; col++) { - dstUI[col] = PACK_COLOR_8888( CHAN_TO_UBYTE(src[ACOMP]), - CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]) ); - src += 4; - } - } - else if (dstFormat == MESA_FORMAT_XRGB8888) { - for (col = 0; col < srcWidth; col++) { - dstUI[col] = PACK_COLOR_8888( 0xff, - CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]) ); - src += 4; - } - } - else { - for (col = 0; col < srcWidth; col++) { - dstUI[col] = PACK_COLOR_8888_REV( CHAN_TO_UBYTE(src[ACOMP]), - CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]) ); - src += 4; - } - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -static GLboolean -_mesa_texstore_rgb888(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGB888); - ASSERT(texelBytes == 3); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == GL_RGB && - srcFormat == GL_BGR && - srcType == GL_UNSIGNED_BYTE && - littleEndian) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - srcFormat == GL_RGBA && - srcType == GL_UNSIGNED_BYTE) { - /* extract RGB from RGBA */ - GLint img, row, col; - for (img = 0; img < srcDepth; img++) { - const GLint srcRowStride = - _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType); - GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking, - srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0); - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - for (col = 0; col < srcWidth; col++) { - dstRow[col * 3 + 0] = srcRow[col * 4 + BCOMP]; - dstRow[col * 3 + 1] = srcRow[col * 4 + GCOMP]; - dstRow[col * 3 + 2] = srcRow[col * 4 + RCOMP]; - } - dstRow += dstRowStride; - srcRow += srcRowStride; - } - } - } - else if (!ctx->_ImageTransferState && - srcType == GL_UNSIGNED_BYTE && - can_swizzle(baseInternalFormat) && - can_swizzle(srcFormat)) { - - GLubyte dstmap[4]; - - /* dstmap - how to swizzle from RGBA to dst format: - */ - dstmap[0] = 2; - dstmap[1] = 1; - dstmap[2] = 0; - dstmap[3] = ONE; /* ? */ - - _mesa_swizzle_ubyte_image(ctx, dims, - srcFormat, - srcType, - baseInternalFormat, - dstmap, 3, - dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcAddr, - srcPacking); - } - else { - /* general path */ - const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking); - const GLchan *src = (const GLchan *) tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { -#if 0 - if (littleEndian) { - for (col = 0; col < srcWidth; col++) { - dstRow[col * 3 + 0] = CHAN_TO_UBYTE(src[RCOMP]); - dstRow[col * 3 + 1] = CHAN_TO_UBYTE(src[GCOMP]); - dstRow[col * 3 + 2] = CHAN_TO_UBYTE(src[BCOMP]); - srcUB += 3; - } - } - else { - for (col = 0; col < srcWidth; col++) { - dstRow[col * 3 + 0] = srcUB[BCOMP]; - dstRow[col * 3 + 1] = srcUB[GCOMP]; - dstRow[col * 3 + 2] = srcUB[RCOMP]; - srcUB += 3; - } - } -#else - for (col = 0; col < srcWidth; col++) { - dstRow[col * 3 + 0] = CHAN_TO_UBYTE(src[BCOMP]); - dstRow[col * 3 + 1] = CHAN_TO_UBYTE(src[GCOMP]); - dstRow[col * 3 + 2] = CHAN_TO_UBYTE(src[RCOMP]); - src += 3; - } -#endif - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -static GLboolean -_mesa_texstore_bgr888(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_BGR888); - ASSERT(texelBytes == 3); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == GL_RGB && - srcFormat == GL_RGB && - srcType == GL_UNSIGNED_BYTE && - littleEndian) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - srcFormat == GL_RGBA && - srcType == GL_UNSIGNED_BYTE) { - /* extract BGR from RGBA */ - int img, row, col; - for (img = 0; img < srcDepth; img++) { - const GLint srcRowStride = - _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType); - GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking, - srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0); - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - for (col = 0; col < srcWidth; col++) { - dstRow[col * 3 + 0] = srcRow[col * 4 + RCOMP]; - dstRow[col * 3 + 1] = srcRow[col * 4 + GCOMP]; - dstRow[col * 3 + 2] = srcRow[col * 4 + BCOMP]; - } - dstRow += dstRowStride; - srcRow += srcRowStride; - } - } - } - else if (!ctx->_ImageTransferState && - srcType == GL_UNSIGNED_BYTE && - can_swizzle(baseInternalFormat) && - can_swizzle(srcFormat)) { - - GLubyte dstmap[4]; - - /* dstmap - how to swizzle from RGBA to dst format: - */ - dstmap[0] = 0; - dstmap[1] = 1; - dstmap[2] = 2; - dstmap[3] = ONE; /* ? */ - - _mesa_swizzle_ubyte_image(ctx, dims, - srcFormat, - srcType, - baseInternalFormat, - dstmap, 3, - dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcAddr, - srcPacking); - } - else { - /* general path */ - const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking); - const GLchan *src = (const GLchan *) tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - for (col = 0; col < srcWidth; col++) { - dstRow[col * 3 + 0] = CHAN_TO_UBYTE(src[RCOMP]); - dstRow[col * 3 + 1] = CHAN_TO_UBYTE(src[GCOMP]); - dstRow[col * 3 + 2] = CHAN_TO_UBYTE(src[BCOMP]); - src += 3; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -static GLboolean -_mesa_texstore_argb4444(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_ARGB4444 || - dstFormat == MESA_FORMAT_ARGB4444_REV); - ASSERT(texelBytes == 2); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_ARGB4444 && - baseInternalFormat == GL_RGBA && - srcFormat == GL_BGRA && - srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking); - const GLchan *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLushort *dstUS = (GLushort *) dstRow; - if (dstFormat == MESA_FORMAT_ARGB4444) { - for (col = 0; col < srcWidth; col++) { - dstUS[col] = PACK_COLOR_4444( CHAN_TO_UBYTE(src[ACOMP]), - CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]) ); - src += 4; - } - } - else { - for (col = 0; col < srcWidth; col++) { - dstUS[col] = PACK_COLOR_4444_REV( CHAN_TO_UBYTE(src[ACOMP]), - CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]) ); - src += 4; - } - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - -static GLboolean -_mesa_texstore_rgba5551(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA5551); - ASSERT(texelBytes == 2); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_RGBA5551 && - baseInternalFormat == GL_RGBA && - srcFormat == GL_RGBA && - srcType == GL_UNSIGNED_SHORT_5_5_5_1) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking); - const GLchan *src =tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLushort *dstUS = (GLushort *) dstRow; - for (col = 0; col < srcWidth; col++) { - dstUS[col] = PACK_COLOR_5551( CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]), - CHAN_TO_UBYTE(src[ACOMP]) ); - src += 4; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - -static GLboolean -_mesa_texstore_argb1555(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_ARGB1555 || - dstFormat == MESA_FORMAT_ARGB1555_REV); - ASSERT(texelBytes == 2); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_ARGB1555 && - baseInternalFormat == GL_RGBA && - srcFormat == GL_BGRA && - srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking); - const GLchan *src =tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLushort *dstUS = (GLushort *) dstRow; - if (dstFormat == MESA_FORMAT_ARGB1555) { - for (col = 0; col < srcWidth; col++) { - dstUS[col] = PACK_COLOR_1555( CHAN_TO_UBYTE(src[ACOMP]), - CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]) ); - src += 4; - } - } - else { - for (col = 0; col < srcWidth; col++) { - dstUS[col] = PACK_COLOR_1555_REV( CHAN_TO_UBYTE(src[ACOMP]), - CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]) ); - src += 4; - } - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -static GLboolean -_mesa_texstore_argb2101010(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_ARGB2101010); - ASSERT(texelBytes == 4); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_ARGB2101010 && - srcFormat == GL_BGRA && - srcType == GL_UNSIGNED_INT_2_10_10_10_REV && - baseInternalFormat == GL_RGBA) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - if (baseInternalFormat == GL_RGBA) { - for (row = 0; row < srcHeight; row++) { - GLuint *dstUI = (GLuint *) dstRow; - for (col = 0; col < srcWidth; col++) { - GLushort a,r,g,b; - - UNCLAMPED_FLOAT_TO_USHORT(a, src[ACOMP]); - UNCLAMPED_FLOAT_TO_USHORT(r, src[RCOMP]); - UNCLAMPED_FLOAT_TO_USHORT(g, src[GCOMP]); - UNCLAMPED_FLOAT_TO_USHORT(b, src[BCOMP]); - dstUI[col] = PACK_COLOR_2101010_US(a, r, g, b); - src += 4; - } - dstRow += dstRowStride; - } - } else if (baseInternalFormat == GL_RGB) { - for (row = 0; row < srcHeight; row++) { - GLuint *dstUI = (GLuint *) dstRow; - for (col = 0; col < srcWidth; col++) { - GLushort r,g,b; - - UNCLAMPED_FLOAT_TO_USHORT(r, src[RCOMP]); - UNCLAMPED_FLOAT_TO_USHORT(g, src[GCOMP]); - UNCLAMPED_FLOAT_TO_USHORT(b, src[BCOMP]); - dstUI[col] = PACK_COLOR_2101010_US(0xffff, r, g, b); - src += 4; - } - dstRow += dstRowStride; - } - } else { - ASSERT(0); - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -/** - * Do texstore for 2-channel, 4-bit/channel, unsigned normalized formats. - */ -static GLboolean -_mesa_texstore_unorm44(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_AL44); - ASSERT(texelBytes == 1); - - { - /* general path */ - const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking); - const GLchan *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLubyte *dstUS = (GLubyte *) dstRow; - for (col = 0; col < srcWidth; col++) { - /* src[0] is luminance, src[1] is alpha */ - dstUS[col] = PACK_COLOR_44( CHAN_TO_UBYTE(src[1]), - CHAN_TO_UBYTE(src[0]) ); - src += 2; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -/** - * Do texstore for 2-channel, 8-bit/channel, unsigned normalized formats. - */ -static GLboolean -_mesa_texstore_unorm88(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_AL88 || - dstFormat == MESA_FORMAT_AL88_REV || - dstFormat == MESA_FORMAT_RG88 || - dstFormat == MESA_FORMAT_RG88_REV); - ASSERT(texelBytes == 2); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - (dstFormat == MESA_FORMAT_AL88 || dstFormat == MESA_FORMAT_RG88) && - baseInternalFormat == srcFormat && - srcType == GL_UNSIGNED_BYTE && - littleEndian) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (!ctx->_ImageTransferState && - littleEndian && - srcType == GL_UNSIGNED_BYTE && - can_swizzle(baseInternalFormat) && - can_swizzle(srcFormat)) { - GLubyte dstmap[4]; - - /* dstmap - how to swizzle from RGBA to dst format: - */ - if (dstFormat == MESA_FORMAT_AL88 || dstFormat == MESA_FORMAT_AL88_REV) { - if ((littleEndian && dstFormat == MESA_FORMAT_AL88) || - (!littleEndian && dstFormat == MESA_FORMAT_AL88_REV)) { - dstmap[0] = 0; - dstmap[1] = 3; - } - else { - dstmap[0] = 3; - dstmap[1] = 0; - } - } - else { - if ((littleEndian && dstFormat == MESA_FORMAT_RG88) || - (!littleEndian && dstFormat == MESA_FORMAT_RG88_REV)) { - dstmap[0] = 0; - dstmap[1] = 1; - } - else { - dstmap[0] = 1; - dstmap[1] = 0; - } - } - dstmap[2] = ZERO; /* ? */ - dstmap[3] = ONE; /* ? */ - - _mesa_swizzle_ubyte_image(ctx, dims, - srcFormat, - srcType, - baseInternalFormat, - dstmap, 2, - dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcAddr, - srcPacking); - } - else { - /* general path */ - const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking); - const GLchan *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLushort *dstUS = (GLushort *) dstRow; - if (dstFormat == MESA_FORMAT_AL88 || - dstFormat == MESA_FORMAT_RG88) { - for (col = 0; col < srcWidth; col++) { - /* src[0] is luminance, src[1] is alpha */ - dstUS[col] = PACK_COLOR_88( CHAN_TO_UBYTE(src[1]), - CHAN_TO_UBYTE(src[0]) ); - src += 2; - } - } - else { - for (col = 0; col < srcWidth; col++) { - /* src[0] is luminance, src[1] is alpha */ - dstUS[col] = PACK_COLOR_88_REV( CHAN_TO_UBYTE(src[1]), - CHAN_TO_UBYTE(src[0]) ); - src += 2; - } - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -/** - * Do texstore for 2-channel, 16-bit/channel, unsigned normalized formats. - */ -static GLboolean -_mesa_texstore_unorm1616(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_AL1616 || - dstFormat == MESA_FORMAT_AL1616_REV || - dstFormat == MESA_FORMAT_RG1616 || - dstFormat == MESA_FORMAT_RG1616_REV); - ASSERT(texelBytes == 4); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - (dstFormat == MESA_FORMAT_AL1616 || dstFormat == MESA_FORMAT_RG1616) && - baseInternalFormat == srcFormat && - srcType == GL_UNSIGNED_SHORT && - littleEndian) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLuint *dstUI = (GLuint *) dstRow; - if (dstFormat == MESA_FORMAT_AL1616 || - dstFormat == MESA_FORMAT_RG1616) { - for (col = 0; col < srcWidth; col++) { - GLushort l, a; - - UNCLAMPED_FLOAT_TO_USHORT(l, src[0]); - UNCLAMPED_FLOAT_TO_USHORT(a, src[1]); - dstUI[col] = PACK_COLOR_1616(a, l); - src += 2; - } - } - else { - for (col = 0; col < srcWidth; col++) { - GLushort l, a; - - UNCLAMPED_FLOAT_TO_USHORT(l, src[0]); - UNCLAMPED_FLOAT_TO_USHORT(a, src[1]); - dstUI[col] = PACK_COLOR_1616_REV(a, l); - src += 2; - } - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -/* Texstore for R16, A16, L16, I16. */ -static GLboolean -_mesa_texstore_unorm16(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_R16 || - dstFormat == MESA_FORMAT_A16 || - dstFormat == MESA_FORMAT_L16 || - dstFormat == MESA_FORMAT_I16); - ASSERT(texelBytes == 2); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_UNSIGNED_SHORT && - littleEndian) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLushort *dstUS = (GLushort *) dstRow; - for (col = 0; col < srcWidth; col++) { - GLushort r; - - UNCLAMPED_FLOAT_TO_USHORT(r, src[0]); - dstUS[col] = r; - src += 1; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -static GLboolean -_mesa_texstore_rgba_16(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA_16); - ASSERT(texelBytes == 8); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == GL_RGBA && - srcFormat == GL_RGBA && - srcType == GL_UNSIGNED_SHORT) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLushort *dstUS = (GLushort *) dstRow; - for (col = 0; col < srcWidth; col++) { - GLushort r, g, b, a; - - UNCLAMPED_FLOAT_TO_USHORT(r, src[0]); - UNCLAMPED_FLOAT_TO_USHORT(g, src[1]); - UNCLAMPED_FLOAT_TO_USHORT(b, src[2]); - UNCLAMPED_FLOAT_TO_USHORT(a, src[3]); - dstUS[col*4+0] = r; - dstUS[col*4+1] = g; - dstUS[col*4+2] = b; - dstUS[col*4+3] = a; - src += 4; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -static GLboolean -_mesa_texstore_signed_rgba_16(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGB_16 || - dstFormat == MESA_FORMAT_SIGNED_RGBA_16); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == GL_RGBA && - dstFormat == MESA_FORMAT_SIGNED_RGBA_16 && - srcFormat == GL_RGBA && - srcType == GL_SHORT) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - const GLuint comps = _mesa_get_format_bytes(dstFormat) / 2; - GLint img, row, col; - - if (!tempImage) - return GL_FALSE; - - /* Note: tempImage is always float[4] / RGBA. We convert to 1, 2, - * 3 or 4 components/pixel here. - */ - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLshort *dstRowS = (GLshort *) dstRow; - if (dstFormat == MESA_FORMAT_SIGNED_RGBA_16) { - for (col = 0; col < srcWidth; col++) { - GLuint c; - for (c = 0; c < comps; c++) { - GLshort p; - UNCLAMPED_FLOAT_TO_SHORT(p, src[col * 4 + c]); - dstRowS[col * comps + c] = p; - } - } - dstRow += dstRowStride; - src += 4 * srcWidth; - } else { - for (col = 0; col < srcWidth; col++) { - GLuint c; - for (c = 0; c < comps; c++) { - GLshort p; - UNCLAMPED_FLOAT_TO_SHORT(p, src[col * 3 + c]); - dstRowS[col * comps + c] = p; - } - } - dstRow += dstRowStride; - src += 3 * srcWidth; - } - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -static GLboolean -_mesa_texstore_rgb332(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGB332); - ASSERT(texelBytes == 1); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == GL_RGB && - srcFormat == GL_RGB && srcType == GL_UNSIGNED_BYTE_3_3_2) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking); - const GLchan *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - for (col = 0; col < srcWidth; col++) { - dstRow[col] = PACK_COLOR_332( CHAN_TO_UBYTE(src[RCOMP]), - CHAN_TO_UBYTE(src[GCOMP]), - CHAN_TO_UBYTE(src[BCOMP]) ); - src += 3; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -/** - * Texstore for _mesa_texformat_a8, _mesa_texformat_l8, _mesa_texformat_i8. - */ -static GLboolean -_mesa_texstore_unorm8(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_A8 || - dstFormat == MESA_FORMAT_L8 || - dstFormat == MESA_FORMAT_I8 || - dstFormat == MESA_FORMAT_R8); - ASSERT(texelBytes == 1); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_UNSIGNED_BYTE) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (!ctx->_ImageTransferState && - srcType == GL_UNSIGNED_BYTE && - can_swizzle(baseInternalFormat) && - can_swizzle(srcFormat)) { - GLubyte dstmap[4]; - - /* dstmap - how to swizzle from RGBA to dst format: - */ - if (dstFormat == MESA_FORMAT_A8) { - dstmap[0] = 3; - } - else { - dstmap[0] = 0; - } - dstmap[1] = ZERO; /* ? */ - dstmap[2] = ZERO; /* ? */ - dstmap[3] = ONE; /* ? */ - - _mesa_swizzle_ubyte_image(ctx, dims, - srcFormat, - srcType, - baseInternalFormat, - dstmap, 1, - dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcAddr, - srcPacking); - } - else { - /* general path */ - const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking); - const GLchan *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - for (col = 0; col < srcWidth; col++) { - dstRow[col] = CHAN_TO_UBYTE(src[col]); - } - dstRow += dstRowStride; - src += srcWidth; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - - -static GLboolean -_mesa_texstore_ci8(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - - (void) dims; (void) baseInternalFormat; - ASSERT(dstFormat == MESA_FORMAT_CI8); - ASSERT(texelBytes == 1); - ASSERT(baseInternalFormat == GL_COLOR_INDEX); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - srcFormat == GL_COLOR_INDEX && - srcType == GL_UNSIGNED_BYTE) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - GLint img, row; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - const GLvoid *src = _mesa_image_address(dims, srcPacking, - srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0); - _mesa_unpack_index_span(ctx, srcWidth, GL_UNSIGNED_BYTE, dstRow, - srcType, src, srcPacking, - ctx->_ImageTransferState); - dstRow += dstRowStride; - } - } - } - return GL_TRUE; -} - - -/** - * Texstore for _mesa_texformat_ycbcr or _mesa_texformat_ycbcr_REV. - */ -static GLboolean -_mesa_texstore_ycbcr(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - - (void) ctx; (void) dims; (void) baseInternalFormat; - - ASSERT((dstFormat == MESA_FORMAT_YCBCR) || - (dstFormat == MESA_FORMAT_YCBCR_REV)); - ASSERT(texelBytes == 2); - ASSERT(ctx->Extensions.MESA_ycbcr_texture); - ASSERT(srcFormat == GL_YCBCR_MESA); - ASSERT((srcType == GL_UNSIGNED_SHORT_8_8_MESA) || - (srcType == GL_UNSIGNED_SHORT_8_8_REV_MESA)); - ASSERT(baseInternalFormat == GL_YCBCR_MESA); - - /* always just memcpy since no pixel transfer ops apply */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - - /* Check if we need byte swapping */ - /* XXX the logic here _might_ be wrong */ - if (srcPacking->SwapBytes ^ - (srcType == GL_UNSIGNED_SHORT_8_8_REV_MESA) ^ - (dstFormat == MESA_FORMAT_YCBCR_REV) ^ - !littleEndian) { - GLint img, row; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - _mesa_swap2((GLushort *) dstRow, srcWidth); - dstRow += dstRowStride; - } - } - } - return GL_TRUE; -} - -static GLboolean -_mesa_texstore_dudv8(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_DUDV8); - ASSERT(texelBytes == 2); - ASSERT(ctx->Extensions.ATI_envmap_bumpmap); - ASSERT((srcFormat == GL_DU8DV8_ATI) || - (srcFormat == GL_DUDV_ATI)); - ASSERT(baseInternalFormat == GL_DUDV_ATI); - - if (!srcPacking->SwapBytes && srcType == GL_BYTE && - littleEndian) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (srcType == GL_BYTE) { - GLubyte dstmap[4]; - - /* dstmap - how to swizzle from RGBA to dst format: - */ - if (littleEndian) { - dstmap[0] = 0; - dstmap[1] = 3; - } - else { - dstmap[0] = 3; - dstmap[1] = 0; - } - dstmap[2] = ZERO; /* ? */ - dstmap[3] = ONE; /* ? */ - - _mesa_swizzle_ubyte_image(ctx, dims, - GL_LUMINANCE_ALPHA, /* hack */ - GL_UNSIGNED_BYTE, /* hack */ - GL_LUMINANCE_ALPHA, /* hack */ - dstmap, 2, - dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcAddr, - srcPacking); - } - else { - /* general path - note this is defined for 2d textures only */ - const GLint components = _mesa_components_in_format(baseInternalFormat); - const GLint srcStride = _mesa_image_row_stride(srcPacking, srcWidth, - srcFormat, srcType); - GLbyte *tempImage, *dst, *src; - GLint row; - - tempImage = (GLbyte *) malloc(srcWidth * srcHeight * srcDepth - * components * sizeof(GLbyte)); - if (!tempImage) - return GL_FALSE; - - src = (GLbyte *) _mesa_image_address(dims, srcPacking, srcAddr, - srcWidth, srcHeight, - srcFormat, srcType, - 0, 0, 0); - - dst = tempImage; - for (row = 0; row < srcHeight; row++) { - _mesa_unpack_dudv_span_byte(ctx, srcWidth, baseInternalFormat, - dst, srcFormat, srcType, src, - srcPacking, 0); - dst += srcWidth * components; - src += srcStride; - } - - src = tempImage; - dst = (GLbyte *) dstAddr - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - memcpy(dst, src, srcWidth * texelBytes); - dst += dstRowStride; - src += srcWidth * texelBytes; - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -/** - * Store a texture in a signed normalized 8-bit format. - */ -static GLboolean -_mesa_texstore_snorm8(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_SIGNED_A8 || - dstFormat == MESA_FORMAT_SIGNED_L8 || - dstFormat == MESA_FORMAT_SIGNED_I8 || - dstFormat == MESA_FORMAT_SIGNED_R8); - ASSERT(texelBytes == 1); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_BYTE) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLbyte *dstRow = (GLbyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - for (col = 0; col < srcWidth; col++) { - dstRow[col] = FLOAT_TO_BYTE_TEX(src[col]); - } - dstRow += dstRowStride; - src += srcWidth; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -/** - * Store a texture in a signed normalized two-channel 16-bit format. - */ -static GLboolean -_mesa_texstore_snorm88(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_SIGNED_AL88 || - dstFormat == MESA_FORMAT_SIGNED_RG88_REV); - ASSERT(texelBytes == 2); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_BYTE && - littleEndian) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLbyte *dstRow = (GLbyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLbyte *dst = dstRow; - for (col = 0; col < srcWidth; col++) { - dst[0] = FLOAT_TO_BYTE_TEX(src[0]); - dst[1] = FLOAT_TO_BYTE_TEX(src[1]); - src += 2; - dst += 2; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - -/* Texstore for signed R16, A16, L16, I16. */ -static GLboolean -_mesa_texstore_snorm16(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_SIGNED_R16 || - dstFormat == MESA_FORMAT_SIGNED_A16 || - dstFormat == MESA_FORMAT_SIGNED_L16 || - dstFormat == MESA_FORMAT_SIGNED_I16); - ASSERT(texelBytes == 2); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_SHORT && - littleEndian) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLshort *dstUS = (GLshort *) dstRow; - for (col = 0; col < srcWidth; col++) { - GLushort r; - - UNCLAMPED_FLOAT_TO_SHORT(r, src[0]); - dstUS[col] = r; - src += 1; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - -/** - * Do texstore for 2-channel, 16-bit/channel, signed normalized formats. - */ -static GLboolean -_mesa_texstore_snorm1616(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_SIGNED_AL1616 || - dstFormat == MESA_FORMAT_SIGNED_GR1616); - ASSERT(texelBytes == 4); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_SHORT && - littleEndian) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLshort *dst = (GLshort *) dstRow; - for (col = 0; col < srcWidth; col++) { - GLushort l, a; - - UNCLAMPED_FLOAT_TO_SHORT(l, src[0]); - UNCLAMPED_FLOAT_TO_SHORT(a, src[1]); - dst[0] = l; - dst[1] = a; - src += 2; - dst += 2; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - -/** - * Store a texture in MESA_FORMAT_SIGNED_RGBX8888. - */ -static GLboolean -_mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBX8888); - ASSERT(texelBytes == 4); - - { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *srcRow = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLbyte *dstRow = (GLbyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLbyte *dst = dstRow; - for (col = 0; col < srcWidth; col++) { - dst[3] = FLOAT_TO_BYTE_TEX(srcRow[RCOMP]); - dst[2] = FLOAT_TO_BYTE_TEX(srcRow[GCOMP]); - dst[1] = FLOAT_TO_BYTE_TEX(srcRow[BCOMP]); - dst[0] = 0xff; - srcRow += 3; - dst += 4; - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - - -/** - * Store a texture in MESA_FORMAT_SIGNED_RGBA8888 or - * MESA_FORMAT_SIGNED_RGBA8888_REV - */ -static GLboolean -_mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS) -{ - const GLboolean littleEndian = _mesa_little_endian(); - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - - ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBA8888 || - dstFormat == MESA_FORMAT_SIGNED_RGBA8888_REV); - ASSERT(texelBytes == 4); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_SIGNED_RGBA8888 && - baseInternalFormat == GL_RGBA && - ((srcFormat == GL_RGBA && srcType == GL_BYTE && !littleEndian) || - (srcFormat == GL_ABGR_EXT && srcType == GL_BYTE && littleEndian))) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == MESA_FORMAT_SIGNED_RGBA8888_REV && - baseInternalFormat == GL_RGBA && - ((srcFormat == GL_RGBA && srcType == GL_BYTE && littleEndian) || - (srcFormat == GL_ABGR_EXT && srcType == GL_BYTE && !littleEndian))) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *srcRow = tempImage; - GLint img, row, col; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLbyte *dstRow = (GLbyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLbyte *dst = dstRow; - if (dstFormat == MESA_FORMAT_SIGNED_RGBA8888) { - for (col = 0; col < srcWidth; col++) { - dst[3] = FLOAT_TO_BYTE_TEX(srcRow[RCOMP]); - dst[2] = FLOAT_TO_BYTE_TEX(srcRow[GCOMP]); - dst[1] = FLOAT_TO_BYTE_TEX(srcRow[BCOMP]); - dst[0] = FLOAT_TO_BYTE_TEX(srcRow[ACOMP]); - srcRow += 4; - dst += 4; - } - } - else { - for (col = 0; col < srcWidth; col++) { - dst[0] = FLOAT_TO_BYTE_TEX(srcRow[RCOMP]); - dst[1] = FLOAT_TO_BYTE_TEX(srcRow[GCOMP]); - dst[2] = FLOAT_TO_BYTE_TEX(srcRow[BCOMP]); - dst[3] = FLOAT_TO_BYTE_TEX(srcRow[ACOMP]); - srcRow += 4; - dst += 4; - } - } - dstRow += dstRowStride; - } - } - free((void *) tempImage); - } - return GL_TRUE; -} - - -/** - * Store a combined depth/stencil texture image. - */ -static GLboolean -_mesa_texstore_z24_s8(TEXSTORE_PARAMS) -{ - const GLuint depthScale = 0xffffff; - const GLint srcRowStride - = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType) - / sizeof(GLuint); - GLint img, row; - - ASSERT(dstFormat == MESA_FORMAT_Z24_S8); - ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT || srcFormat == GL_DEPTH_COMPONENT); - ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || srcType == GL_UNSIGNED_INT_24_8_EXT); - - if (srcFormat != GL_DEPTH_COMPONENT && ctx->Pixel.DepthScale == 1.0f && - ctx->Pixel.DepthBias == 0.0f && - !srcPacking->SwapBytes) { - /* simple path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else if (srcFormat == GL_DEPTH_COMPONENT) { - /* In case we only upload depth we need to preserve the stencil */ - for (img = 0; img < srcDepth; img++) { - GLuint *dstRow = (GLuint *) dstAddr - + dstImageOffsets[dstZoffset + img] - + dstYoffset * dstRowStride / sizeof(GLuint) - + dstXoffset; - const GLuint *src - = (const GLuint *) _mesa_image_address(dims, srcPacking, srcAddr, - srcWidth, srcHeight, - srcFormat, srcType, - img, 0, 0); - for (row = 0; row < srcHeight; row++) { - GLuint depth[MAX_WIDTH]; - GLubyte stencil[MAX_WIDTH]; - GLint i; - GLboolean keepdepth = GL_FALSE, keepstencil = GL_FALSE; - - if (srcFormat == GL_DEPTH_COMPONENT) { /* preserve stencil */ - keepstencil = GL_TRUE; - } - else if (srcFormat == GL_STENCIL_INDEX) { /* preserve depth */ - keepdepth = GL_TRUE; - } - - if (keepdepth == GL_FALSE) - /* the 24 depth bits will be in the low position: */ - _mesa_unpack_depth_span(ctx, srcWidth, - GL_UNSIGNED_INT, /* dst type */ - keepstencil ? depth : dstRow, /* dst addr */ - depthScale, - srcType, src, srcPacking); - - if (keepstencil == GL_FALSE) - /* get the 8-bit stencil values */ - _mesa_unpack_stencil_span(ctx, srcWidth, - GL_UNSIGNED_BYTE, /* dst type */ - stencil, /* dst addr */ - srcType, src, srcPacking, - ctx->_ImageTransferState); - - for (i = 0; i < srcWidth; i++) { - if (keepstencil) - dstRow[i] = depth[i] << 8 | (dstRow[i] & 0x000000FF); - else - dstRow[i] = (dstRow[i] & 0xFFFFFF00) | (stencil[i] & 0xFF); - } - - src += srcRowStride; - dstRow += dstRowStride / sizeof(GLuint); - } - } - } - return GL_TRUE; -} - - -/** - * Store a combined depth/stencil texture image. - */ -static GLboolean -_mesa_texstore_s8_z24(TEXSTORE_PARAMS) -{ - const GLuint depthScale = 0xffffff; - const GLint srcRowStride - = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType) - / sizeof(GLuint); - GLint img, row; - - ASSERT(dstFormat == MESA_FORMAT_S8_Z24); - ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT || - srcFormat == GL_DEPTH_COMPONENT || - srcFormat == GL_STENCIL_INDEX); - ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || - srcType == GL_UNSIGNED_INT_24_8_EXT); - - for (img = 0; img < srcDepth; img++) { - GLuint *dstRow = (GLuint *) dstAddr - + dstImageOffsets[dstZoffset + img] - + dstYoffset * dstRowStride / sizeof(GLuint) - + dstXoffset; - const GLuint *src - = (const GLuint *) _mesa_image_address(dims, srcPacking, srcAddr, - srcWidth, srcHeight, - srcFormat, srcType, - img, 0, 0); - for (row = 0; row < srcHeight; row++) { - GLuint depth[MAX_WIDTH]; - GLubyte stencil[MAX_WIDTH]; - GLint i; - GLboolean keepdepth = GL_FALSE, keepstencil = GL_FALSE; - - if (srcFormat == GL_DEPTH_COMPONENT) { /* preserve stencil */ - keepstencil = GL_TRUE; - } - else if (srcFormat == GL_STENCIL_INDEX) { /* preserve depth */ - keepdepth = GL_TRUE; - } - - if (keepdepth == GL_FALSE) - /* the 24 depth bits will be in the low position: */ - _mesa_unpack_depth_span(ctx, srcWidth, - GL_UNSIGNED_INT, /* dst type */ - keepstencil ? depth : dstRow, /* dst addr */ - depthScale, - srcType, src, srcPacking); - - if (keepstencil == GL_FALSE) - /* get the 8-bit stencil values */ - _mesa_unpack_stencil_span(ctx, srcWidth, - GL_UNSIGNED_BYTE, /* dst type */ - stencil, /* dst addr */ - srcType, src, srcPacking, - ctx->_ImageTransferState); - - /* merge stencil values into depth values */ - for (i = 0; i < srcWidth; i++) { - if (keepstencil) - dstRow[i] = depth[i] | (dstRow[i] & 0xFF000000); - else - dstRow[i] = (dstRow[i] & 0xFFFFFF) | (stencil[i] << 24); - - } - src += srcRowStride; - dstRow += dstRowStride / sizeof(GLuint); - } - } - return GL_TRUE; -} - - -/** - * Store simple 8-bit/value stencil texture data. - */ -static GLboolean -_mesa_texstore_s8(TEXSTORE_PARAMS) -{ - ASSERT(dstFormat == MESA_FORMAT_S8); - ASSERT(srcFormat == GL_STENCIL_INDEX); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_UNSIGNED_BYTE) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - const GLint srcRowStride - = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType) - / sizeof(GLuint); - GLint img, row; - - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] - + dstYoffset * dstRowStride / sizeof(GLuint) - + dstXoffset; - const GLuint *src - = (const GLuint *) _mesa_image_address(dims, srcPacking, srcAddr, - srcWidth, srcHeight, - srcFormat, srcType, - img, 0, 0); - for (row = 0; row < srcHeight; row++) { - GLubyte stencil[MAX_WIDTH]; - GLint i; - - /* get the 8-bit stencil values */ - _mesa_unpack_stencil_span(ctx, srcWidth, - GL_UNSIGNED_BYTE, /* dst type */ - stencil, /* dst addr */ - srcType, src, srcPacking, - ctx->_ImageTransferState); - /* merge stencil values into depth values */ - for (i = 0; i < srcWidth; i++) - dstRow[i] = stencil[i]; - - src += srcRowStride; - dstRow += dstRowStride / sizeof(GLubyte); - } - } - - } - - return GL_TRUE; -} - - -/** - * Store an image in any of the formats: - * _mesa_texformat_rgba_float32 - * _mesa_texformat_rgb_float32 - * _mesa_texformat_alpha_float32 - * _mesa_texformat_luminance_float32 - * _mesa_texformat_luminance_alpha_float32 - * _mesa_texformat_intensity_float32 - */ -static GLboolean -_mesa_texstore_rgba_float32(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - const GLint components = _mesa_components_in_format(baseFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA_FLOAT32 || - dstFormat == MESA_FORMAT_RGB_FLOAT32 || - dstFormat == MESA_FORMAT_ALPHA_FLOAT32 || - dstFormat == MESA_FORMAT_LUMINANCE_FLOAT32 || - dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32 || - dstFormat == MESA_FORMAT_INTENSITY_FLOAT32); - ASSERT(baseInternalFormat == GL_RGBA || - baseInternalFormat == GL_RGB || - baseInternalFormat == GL_ALPHA || - baseInternalFormat == GL_LUMINANCE || - baseInternalFormat == GL_LUMINANCE_ALPHA || - baseInternalFormat == GL_INTENSITY); - ASSERT(texelBytes == components * sizeof(GLfloat)); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_FLOAT) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *srcRow = tempImage; - GLint bytesPerRow; - GLint img, row; - if (!tempImage) - return GL_FALSE; - bytesPerRow = srcWidth * components * sizeof(GLfloat); - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - memcpy(dstRow, srcRow, bytesPerRow); - dstRow += dstRowStride; - srcRow += srcWidth * components; - } - } - - free((void *) tempImage); - } - return GL_TRUE; -} - - - -/** - * As above, but store 16-bit floats. - */ -static GLboolean -_mesa_texstore_rgba_float16(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - const GLint components = _mesa_components_in_format(baseFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA_FLOAT16 || - dstFormat == MESA_FORMAT_RGB_FLOAT16 || - dstFormat == MESA_FORMAT_ALPHA_FLOAT16 || - dstFormat == MESA_FORMAT_LUMINANCE_FLOAT16 || - dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16 || - dstFormat == MESA_FORMAT_INTENSITY_FLOAT16); - ASSERT(baseInternalFormat == GL_RGBA || - baseInternalFormat == GL_RGB || - baseInternalFormat == GL_ALPHA || - baseInternalFormat == GL_LUMINANCE || - baseInternalFormat == GL_LUMINANCE_ALPHA || - baseInternalFormat == GL_INTENSITY); - ASSERT(texelBytes == components * sizeof(GLhalfARB)); - - if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_HALF_FLOAT_ARB) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, - ctx->_ImageTransferState); - const GLfloat *src = tempImage; - GLint img, row; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLhalfARB *dstTexel = (GLhalfARB *) dstRow; - GLint i; - for (i = 0; i < srcWidth * components; i++) { - dstTexel[i] = _mesa_float_to_half(src[i]); - } - dstRow += dstRowStride; - src += srcWidth * components; - } - } - - free((void *) tempImage); - } - return GL_TRUE; -} - - -/* non-normalized, signed int8 */ -static GLboolean -_mesa_texstore_rgba_int8(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - const GLint components = _mesa_components_in_format(baseFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA_INT8); - ASSERT(baseInternalFormat == GL_RGBA || - baseInternalFormat == GL_RGB || - baseInternalFormat == GL_ALPHA || - baseInternalFormat == GL_LUMINANCE || - baseInternalFormat == GL_LUMINANCE_ALPHA || - baseInternalFormat == GL_INTENSITY); - ASSERT(texelBytes == components * sizeof(GLbyte)); - - /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply - * to integer formats. - */ - if (!srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_BYTE) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, 0x0); - const GLfloat *src = tempImage; - GLint img, row; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLbyte *dstTexel = (GLbyte *) dstRow; - GLint i; - for (i = 0; i < srcWidth * components; i++) { - dstTexel[i] = (GLbyte) src[i]; - } - dstRow += dstRowStride; - src += srcWidth * components; - } - } - - free((void *) tempImage); - } - return GL_TRUE; -} - - -/* non-normalized, signed int16 */ -static GLboolean -_mesa_texstore_rgba_int16(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - const GLint components = _mesa_components_in_format(baseFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA_INT16); - ASSERT(baseInternalFormat == GL_RGBA || - baseInternalFormat == GL_RGB || - baseInternalFormat == GL_ALPHA || - baseInternalFormat == GL_LUMINANCE || - baseInternalFormat == GL_LUMINANCE_ALPHA || - baseInternalFormat == GL_INTENSITY); - ASSERT(texelBytes == components * sizeof(GLshort)); - - /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply - * to integer formats. - */ - if (!srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_SHORT) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, 0x0); - const GLfloat *src = tempImage; - GLint img, row; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLshort *dstTexel = (GLshort *) dstRow; - GLint i; - for (i = 0; i < srcWidth * components; i++) { - dstTexel[i] = (GLint) src[i]; - } - dstRow += dstRowStride; - src += srcWidth * components; - } - } - - free((void *) tempImage); - } - return GL_TRUE; -} - - -/* non-normalized, signed int32 */ -static GLboolean -_mesa_texstore_rgba_int32(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - const GLint components = _mesa_components_in_format(baseFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA_INT32); - ASSERT(baseInternalFormat == GL_RGBA || - baseInternalFormat == GL_RGB || - baseInternalFormat == GL_ALPHA || - baseInternalFormat == GL_LUMINANCE || - baseInternalFormat == GL_LUMINANCE_ALPHA || - baseInternalFormat == GL_INTENSITY); - ASSERT(texelBytes == components * sizeof(GLint)); - - /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply - * to integer formats. - */ - if (!srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_INT) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims, - baseInternalFormat, - baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, - srcPacking, 0x0); - const GLfloat *src = tempImage; - GLint img, row; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLint *dstTexel = (GLint *) dstRow; - GLint i; - for (i = 0; i < srcWidth * components; i++) { - dstTexel[i] = (GLint) src[i]; - } - dstRow += dstRowStride; - src += srcWidth * components; - } - } - - free((void *) tempImage); - } - return GL_TRUE; -} - - -/* non-normalized, unsigned int8 */ -static GLboolean -_mesa_texstore_rgba_uint8(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - const GLint components = _mesa_components_in_format(baseFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA_UINT8); - ASSERT(baseInternalFormat == GL_RGBA || - baseInternalFormat == GL_RGB || - baseInternalFormat == GL_ALPHA || - baseInternalFormat == GL_LUMINANCE || - baseInternalFormat == GL_LUMINANCE_ALPHA || - baseInternalFormat == GL_INTENSITY); - ASSERT(texelBytes == components * sizeof(GLubyte)); - - /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply - * to integer formats. - */ - if (!srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_UNSIGNED_BYTE) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLuint *tempImage = - make_temp_uint_image(ctx, dims, baseInternalFormat, baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, srcPacking); - const GLuint *src = tempImage; - GLint img, row; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLubyte *dstTexel = (GLubyte *) dstRow; - GLint i; - for (i = 0; i < srcWidth * components; i++) { - dstTexel[i] = (GLubyte) CLAMP(src[i], 0, 0xff); - } - dstRow += dstRowStride; - src += srcWidth * components; - } - } - - free((void *) tempImage); - } - return GL_TRUE; -} - - -/* non-normalized, unsigned int16 */ -static GLboolean -_mesa_texstore_rgba_uint16(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - const GLint components = _mesa_components_in_format(baseFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA_UINT16); - ASSERT(baseInternalFormat == GL_RGBA || - baseInternalFormat == GL_RGB || - baseInternalFormat == GL_ALPHA || - baseInternalFormat == GL_LUMINANCE || - baseInternalFormat == GL_LUMINANCE_ALPHA || - baseInternalFormat == GL_INTENSITY); - ASSERT(texelBytes == components * sizeof(GLushort)); - - /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply - * to integer formats. - */ - if (!srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_UNSIGNED_SHORT) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLuint *tempImage = - make_temp_uint_image(ctx, dims, baseInternalFormat, baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, srcPacking); - const GLuint *src = tempImage; - GLint img, row; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLushort *dstTexel = (GLushort *) dstRow; - GLint i; - for (i = 0; i < srcWidth * components; i++) { - dstTexel[i] = (GLushort) CLAMP(src[i], 0, 0xffff); - } - dstRow += dstRowStride; - src += srcWidth * components; - } - } - - free((void *) tempImage); - } - return GL_TRUE; -} - - -/* non-normalized, unsigned int32 */ -static GLboolean -_mesa_texstore_rgba_uint32(TEXSTORE_PARAMS) -{ - const GLuint texelBytes = _mesa_get_format_bytes(dstFormat); - const GLenum baseFormat = _mesa_get_format_base_format(dstFormat); - const GLint components = _mesa_components_in_format(baseFormat); - - ASSERT(dstFormat == MESA_FORMAT_RGBA_UINT32); - ASSERT(baseInternalFormat == GL_RGBA || - baseInternalFormat == GL_RGB || - baseInternalFormat == GL_ALPHA || - baseInternalFormat == GL_LUMINANCE || - baseInternalFormat == GL_LUMINANCE_ALPHA || - baseInternalFormat == GL_INTENSITY); - ASSERT(texelBytes == components * sizeof(GLuint)); - - /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply - * to integer formats. - */ - if (!srcPacking->SwapBytes && - baseInternalFormat == srcFormat && - srcType == GL_UNSIGNED_INT) { - /* simple memcpy path */ - memcpy_texture(ctx, dims, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, - dstImageOffsets, - srcWidth, srcHeight, srcDepth, srcFormat, srcType, - srcAddr, srcPacking); - } - else { - /* general path */ - const GLuint *tempImage = - make_temp_uint_image(ctx, dims, baseInternalFormat, baseFormat, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, srcPacking); - const GLuint *src = tempImage; - GLint img, row; - if (!tempImage) - return GL_FALSE; - for (img = 0; img < srcDepth; img++) { - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * texelBytes - + dstYoffset * dstRowStride - + dstXoffset * texelBytes; - for (row = 0; row < srcHeight; row++) { - GLuint *dstTexel = (GLuint *) dstRow; - GLint i; - for (i = 0; i < srcWidth * components; i++) { - dstTexel[i] = src[i]; - } - dstRow += dstRowStride; - src += srcWidth * components; - } - } - - free((void *) tempImage); - } - return GL_TRUE; -} - - - - -#if FEATURE_EXT_texture_sRGB -static GLboolean -_mesa_texstore_srgb8(TEXSTORE_PARAMS) -{ - gl_format newDstFormat; - GLboolean k; - - ASSERT(dstFormat == MESA_FORMAT_SRGB8); - - /* reuse normal rgb texstore code */ - newDstFormat = MESA_FORMAT_RGB888; - - k = _mesa_texstore_rgb888(ctx, dims, baseInternalFormat, - newDstFormat, dstAddr, - dstXoffset, dstYoffset, dstZoffset, - dstRowStride, dstImageOffsets, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, - srcAddr, srcPacking); - return k; -} - - -static GLboolean -_mesa_texstore_srgba8(TEXSTORE_PARAMS) -{ - gl_format newDstFormat; - GLboolean k; - - ASSERT(dstFormat == MESA_FORMAT_SRGBA8); - - /* reuse normal rgba texstore code */ - newDstFormat = MESA_FORMAT_RGBA8888; - k = _mesa_texstore_rgba8888(ctx, dims, baseInternalFormat, - newDstFormat, dstAddr, - dstXoffset, dstYoffset, dstZoffset, - dstRowStride, dstImageOffsets, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, - srcAddr, srcPacking); - return k; -} - - -static GLboolean -_mesa_texstore_sargb8(TEXSTORE_PARAMS) -{ - gl_format newDstFormat; - GLboolean k; - - ASSERT(dstFormat == MESA_FORMAT_SARGB8); - - /* reuse normal rgba texstore code */ - newDstFormat = MESA_FORMAT_ARGB8888; - - k = _mesa_texstore_argb8888(ctx, dims, baseInternalFormat, - newDstFormat, dstAddr, - dstXoffset, dstYoffset, dstZoffset, - dstRowStride, dstImageOffsets, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, - srcAddr, srcPacking); - return k; -} - - -static GLboolean -_mesa_texstore_sl8(TEXSTORE_PARAMS) -{ - gl_format newDstFormat; - GLboolean k; - - ASSERT(dstFormat == MESA_FORMAT_SL8); - - newDstFormat = MESA_FORMAT_L8; - - /* _mesa_textore_a8 handles luminance8 too */ - k = _mesa_texstore_unorm8(ctx, dims, baseInternalFormat, - newDstFormat, dstAddr, - dstXoffset, dstYoffset, dstZoffset, - dstRowStride, dstImageOffsets, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, - srcAddr, srcPacking); - return k; -} - - -static GLboolean -_mesa_texstore_sla8(TEXSTORE_PARAMS) -{ - gl_format newDstFormat; - GLboolean k; - - ASSERT(dstFormat == MESA_FORMAT_SLA8); - - /* reuse normal luminance/alpha texstore code */ - newDstFormat = MESA_FORMAT_AL88; - - k = _mesa_texstore_unorm88(ctx, dims, baseInternalFormat, - newDstFormat, dstAddr, - dstXoffset, dstYoffset, dstZoffset, - dstRowStride, dstImageOffsets, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, - srcAddr, srcPacking); - return k; -} - -#else - -/* these are used only in texstore_funcs[] below */ -#define _mesa_texstore_srgb8 NULL -#define _mesa_texstore_srgba8 NULL -#define _mesa_texstore_sargb8 NULL -#define _mesa_texstore_sl8 NULL -#define _mesa_texstore_sla8 NULL - -#endif /* FEATURE_EXT_texture_sRGB */ - - - - -/** - * Table mapping MESA_FORMAT_* to _mesa_texstore_*() - * XXX this is somewhat temporary. - */ -static const struct { - gl_format Name; - StoreTexImageFunc Store; -} -texstore_funcs[MESA_FORMAT_COUNT] = -{ - { MESA_FORMAT_NONE, NULL }, - { MESA_FORMAT_RGBA8888, _mesa_texstore_rgba8888 }, - { MESA_FORMAT_RGBA8888_REV, _mesa_texstore_rgba8888 }, - { MESA_FORMAT_ARGB8888, _mesa_texstore_argb8888 }, - { MESA_FORMAT_ARGB8888_REV, _mesa_texstore_argb8888 }, - { MESA_FORMAT_XRGB8888, _mesa_texstore_argb8888 }, - { MESA_FORMAT_XRGB8888_REV, _mesa_texstore_argb8888 }, - { MESA_FORMAT_RGB888, _mesa_texstore_rgb888 }, - { MESA_FORMAT_BGR888, _mesa_texstore_bgr888 }, - { MESA_FORMAT_RGB565, _mesa_texstore_rgb565 }, - { MESA_FORMAT_RGB565_REV, _mesa_texstore_rgb565 }, - { MESA_FORMAT_ARGB4444, _mesa_texstore_argb4444 }, - { MESA_FORMAT_ARGB4444_REV, _mesa_texstore_argb4444 }, - { MESA_FORMAT_RGBA5551, _mesa_texstore_rgba5551 }, - { MESA_FORMAT_ARGB1555, _mesa_texstore_argb1555 }, - { MESA_FORMAT_ARGB1555_REV, _mesa_texstore_argb1555 }, - { MESA_FORMAT_AL44, _mesa_texstore_unorm44 }, - { MESA_FORMAT_AL88, _mesa_texstore_unorm88 }, - { MESA_FORMAT_AL88_REV, _mesa_texstore_unorm88 }, - { MESA_FORMAT_AL1616, _mesa_texstore_unorm1616 }, - { MESA_FORMAT_AL1616_REV, _mesa_texstore_unorm1616 }, - { MESA_FORMAT_RGB332, _mesa_texstore_rgb332 }, - { MESA_FORMAT_A8, _mesa_texstore_unorm8 }, - { MESA_FORMAT_A16, _mesa_texstore_unorm16 }, - { MESA_FORMAT_L8, _mesa_texstore_unorm8 }, - { MESA_FORMAT_L16, _mesa_texstore_unorm16 }, - { MESA_FORMAT_I8, _mesa_texstore_unorm8 }, - { MESA_FORMAT_I16, _mesa_texstore_unorm16 }, - { MESA_FORMAT_CI8, _mesa_texstore_ci8 }, - { MESA_FORMAT_YCBCR, _mesa_texstore_ycbcr }, - { MESA_FORMAT_YCBCR_REV, _mesa_texstore_ycbcr }, - { MESA_FORMAT_R8, _mesa_texstore_unorm8 }, - { MESA_FORMAT_RG88, _mesa_texstore_unorm88 }, - { MESA_FORMAT_RG88_REV, _mesa_texstore_unorm88 }, - { MESA_FORMAT_R16, _mesa_texstore_unorm16 }, - { MESA_FORMAT_RG1616, _mesa_texstore_unorm1616 }, - { MESA_FORMAT_RG1616_REV, _mesa_texstore_unorm1616 }, - { MESA_FORMAT_ARGB2101010, _mesa_texstore_argb2101010 }, - { MESA_FORMAT_Z24_S8, _mesa_texstore_z24_s8 }, - { MESA_FORMAT_S8_Z24, _mesa_texstore_s8_z24 }, - { MESA_FORMAT_Z16, _mesa_texstore_z16 }, - { MESA_FORMAT_X8_Z24, _mesa_texstore_x8_z24 }, - { MESA_FORMAT_Z24_X8, _mesa_texstore_z24_x8 }, - { MESA_FORMAT_Z32, _mesa_texstore_z32 }, - { MESA_FORMAT_S8, _mesa_texstore_s8 }, - { MESA_FORMAT_SRGB8, _mesa_texstore_srgb8 }, - { MESA_FORMAT_SRGBA8, _mesa_texstore_srgba8 }, - { MESA_FORMAT_SARGB8, _mesa_texstore_sargb8 }, - { MESA_FORMAT_SL8, _mesa_texstore_sl8 }, - { MESA_FORMAT_SLA8, _mesa_texstore_sla8 }, - { MESA_FORMAT_SRGB_DXT1, _mesa_texstore_rgb_dxt1 }, - { MESA_FORMAT_SRGBA_DXT1, _mesa_texstore_rgba_dxt1 }, - { MESA_FORMAT_SRGBA_DXT3, _mesa_texstore_rgba_dxt3 }, - { MESA_FORMAT_SRGBA_DXT5, _mesa_texstore_rgba_dxt5 }, - { MESA_FORMAT_RGB_FXT1, _mesa_texstore_rgb_fxt1 }, - { MESA_FORMAT_RGBA_FXT1, _mesa_texstore_rgba_fxt1 }, - { MESA_FORMAT_RGB_DXT1, _mesa_texstore_rgb_dxt1 }, - { MESA_FORMAT_RGBA_DXT1, _mesa_texstore_rgba_dxt1 }, - { MESA_FORMAT_RGBA_DXT3, _mesa_texstore_rgba_dxt3 }, - { MESA_FORMAT_RGBA_DXT5, _mesa_texstore_rgba_dxt5 }, - { MESA_FORMAT_RGBA_FLOAT32, _mesa_texstore_rgba_float32 }, - { MESA_FORMAT_RGBA_FLOAT16, _mesa_texstore_rgba_float16 }, - { MESA_FORMAT_RGB_FLOAT32, _mesa_texstore_rgba_float32 }, - { MESA_FORMAT_RGB_FLOAT16, _mesa_texstore_rgba_float16 }, - { MESA_FORMAT_ALPHA_FLOAT32, _mesa_texstore_rgba_float32 }, - { MESA_FORMAT_ALPHA_FLOAT16, _mesa_texstore_rgba_float16 }, - { MESA_FORMAT_LUMINANCE_FLOAT32, _mesa_texstore_rgba_float32 }, - { MESA_FORMAT_LUMINANCE_FLOAT16, _mesa_texstore_rgba_float16 }, - { MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, _mesa_texstore_rgba_float32 }, - { MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, _mesa_texstore_rgba_float16 }, - { MESA_FORMAT_INTENSITY_FLOAT32, _mesa_texstore_rgba_float32 }, - { MESA_FORMAT_INTENSITY_FLOAT16, _mesa_texstore_rgba_float16 }, - - { MESA_FORMAT_RGBA_INT8, _mesa_texstore_rgba_int8 }, - { MESA_FORMAT_RGBA_INT16, _mesa_texstore_rgba_int16 }, - { MESA_FORMAT_RGBA_INT32, _mesa_texstore_rgba_int32 }, - { MESA_FORMAT_RGBA_UINT8, _mesa_texstore_rgba_uint8 }, - { MESA_FORMAT_RGBA_UINT16, _mesa_texstore_rgba_uint16 }, - { MESA_FORMAT_RGBA_UINT32, _mesa_texstore_rgba_uint32 }, - - { MESA_FORMAT_DUDV8, _mesa_texstore_dudv8 }, - - { MESA_FORMAT_SIGNED_R8, _mesa_texstore_snorm8 }, - { MESA_FORMAT_SIGNED_RG88_REV, _mesa_texstore_snorm88 }, - { MESA_FORMAT_SIGNED_RGBX8888, _mesa_texstore_signed_rgbx8888 }, - - { MESA_FORMAT_SIGNED_RGBA8888, _mesa_texstore_signed_rgba8888 }, - { MESA_FORMAT_SIGNED_RGBA8888_REV, _mesa_texstore_signed_rgba8888 }, - - { MESA_FORMAT_SIGNED_R16, _mesa_texstore_snorm16 }, - { MESA_FORMAT_SIGNED_GR1616, _mesa_texstore_snorm1616 }, - { MESA_FORMAT_SIGNED_RGB_16, _mesa_texstore_signed_rgba_16 }, - { MESA_FORMAT_SIGNED_RGBA_16, _mesa_texstore_signed_rgba_16 }, - { MESA_FORMAT_RGBA_16, _mesa_texstore_rgba_16 }, - - { MESA_FORMAT_RED_RGTC1, _mesa_texstore_red_rgtc1 }, - { MESA_FORMAT_SIGNED_RED_RGTC1, _mesa_texstore_signed_red_rgtc1 }, - { MESA_FORMAT_RG_RGTC2, _mesa_texstore_rg_rgtc2 }, - { MESA_FORMAT_SIGNED_RG_RGTC2, _mesa_texstore_signed_rg_rgtc2 }, - - /* Re-use the R/RG texstore functions. - * The code is generic enough to handle LATC too. */ - { MESA_FORMAT_L_LATC1, _mesa_texstore_red_rgtc1 }, - { MESA_FORMAT_SIGNED_L_LATC1, _mesa_texstore_signed_red_rgtc1 }, - { MESA_FORMAT_LA_LATC2, _mesa_texstore_rg_rgtc2 }, - { MESA_FORMAT_SIGNED_LA_LATC2, _mesa_texstore_signed_rg_rgtc2 }, - - { MESA_FORMAT_SIGNED_A8, _mesa_texstore_snorm8 }, - { MESA_FORMAT_SIGNED_L8, _mesa_texstore_snorm8 }, - { MESA_FORMAT_SIGNED_AL88, _mesa_texstore_snorm88 }, - { MESA_FORMAT_SIGNED_I8, _mesa_texstore_snorm8 }, - - { MESA_FORMAT_SIGNED_A16, _mesa_texstore_snorm16 }, - { MESA_FORMAT_SIGNED_L16, _mesa_texstore_snorm16 }, - { MESA_FORMAT_SIGNED_AL1616, _mesa_texstore_snorm1616 }, - { MESA_FORMAT_SIGNED_I16, _mesa_texstore_snorm16 }, -}; - - -static GLboolean -_mesa_texstore_null(TEXSTORE_PARAMS) -{ - (void) ctx; (void) dims; - (void) baseInternalFormat; - (void) dstFormat; - (void) dstAddr; - (void) dstXoffset; (void) dstYoffset; (void) dstZoffset; - (void) dstRowStride; (void) dstImageOffsets; - (void) srcWidth; (void) srcHeight; (void) srcDepth; - (void) srcFormat; (void) srcType; - (void) srcAddr; - (void) srcPacking; - - /* should never happen */ - _mesa_problem(NULL, "_mesa_texstore_null() is called"); - return GL_FALSE; -} - - -/** - * Return the StoreTexImageFunc pointer to store an image in the given format. - */ -static StoreTexImageFunc -_mesa_get_texstore_func(gl_format format) -{ -#ifdef DEBUG - GLuint i; - for (i = 0; i < MESA_FORMAT_COUNT; i++) { - ASSERT(texstore_funcs[i].Name == i); - } -#endif - ASSERT(texstore_funcs[format].Name == format); - - if (texstore_funcs[format].Store) - return texstore_funcs[format].Store; - else - return _mesa_texstore_null; -} - - -/** - * Store user data into texture memory. - * Called via glTex[Sub]Image1/2/3D() - */ -GLboolean -_mesa_texstore(TEXSTORE_PARAMS) -{ - StoreTexImageFunc storeImage; - GLboolean success; - - storeImage = _mesa_get_texstore_func(dstFormat); - - success = storeImage(ctx, dims, baseInternalFormat, - dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset, - dstRowStride, dstImageOffsets, - srcWidth, srcHeight, srcDepth, - srcFormat, srcType, srcAddr, srcPacking); - return success; -} - - -/** Return texture size in bytes */ -static GLuint -texture_size(const struct gl_texture_image *texImage) -{ - GLuint sz = _mesa_format_image_size(texImage->TexFormat, texImage->Width, - texImage->Height, texImage->Depth); - return sz; -} - - -/** Return row stride in bytes */ -static GLuint -texture_row_stride(const struct gl_texture_image *texImage) -{ - GLuint stride = _mesa_format_row_stride(texImage->TexFormat, - texImage->Width); - return stride; -} - - - -/** - * This is the software fallback for Driver.TexImage1D() - * and Driver.CopyTexImage1D(). - * \sa _mesa_store_teximage2d() - */ -void -_mesa_store_teximage1d(struct gl_context *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint border, - GLenum format, GLenum type, const GLvoid *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - GLuint sizeInBytes; - (void) border; - - /* allocate memory */ - sizeInBytes = texture_size(texImage); - texImage->Data = _mesa_alloc_texmemory(sizeInBytes); - if (!texImage->Data) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D"); - return; - } - - pixels = _mesa_validate_pbo_teximage(ctx, 1, width, 1, 1, format, type, - pixels, packing, "glTexImage1D"); - if (!pixels) { - /* Note: we check for a NULL image pointer here, _after_ we allocated - * memory for the texture. That's what the GL spec calls for. - */ - return; - } - else { - const GLint dstRowStride = 0; - GLboolean success = _mesa_texstore(ctx, 1, texImage->_BaseFormat, - texImage->TexFormat, - texImage->Data, - 0, 0, 0, /* dstX/Y/Zoffset */ - dstRowStride, - texImage->ImageOffsets, - width, 1, 1, - format, type, pixels, packing); - if (!success) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D"); - } - } - - _mesa_unmap_teximage_pbo(ctx, packing); -} - - -/** - * This is the software fallback for Driver.TexImage2D() - * and Driver.CopyTexImage2D(). - * - * This function is oriented toward storing images in main memory, rather - * than VRAM. Device driver's can easily plug in their own replacement. - */ -void -_mesa_store_teximage2d(struct gl_context *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint border, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - GLuint sizeInBytes; - (void) border; - - /* allocate memory */ - sizeInBytes = texture_size(texImage); - texImage->Data = _mesa_alloc_texmemory(sizeInBytes); - if (!texImage->Data) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); - return; - } - - pixels = _mesa_validate_pbo_teximage(ctx, 2, width, height, 1, format, type, - pixels, packing, "glTexImage2D"); - if (!pixels) { - /* Note: we check for a NULL image pointer here, _after_ we allocated - * memory for the texture. That's what the GL spec calls for. - */ - return; - } - else { - GLint dstRowStride = texture_row_stride(texImage); - GLboolean success = _mesa_texstore(ctx, 2, texImage->_BaseFormat, - texImage->TexFormat, - texImage->Data, - 0, 0, 0, /* dstX/Y/Zoffset */ - dstRowStride, - texImage->ImageOffsets, - width, height, 1, - format, type, pixels, packing); - if (!success) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D"); - } - } - - _mesa_unmap_teximage_pbo(ctx, packing); -} - - - -/** - * This is the software fallback for Driver.TexImage3D() - * and Driver.CopyTexImage3D(). - * \sa _mesa_store_teximage2d() - */ -void -_mesa_store_teximage3d(struct gl_context *ctx, GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint depth, GLint border, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - GLuint sizeInBytes; - (void) border; - - /* allocate memory */ - sizeInBytes = texture_size(texImage); - texImage->Data = _mesa_alloc_texmemory(sizeInBytes); - if (!texImage->Data) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D"); - return; - } - - pixels = _mesa_validate_pbo_teximage(ctx, 3, width, height, depth, format, - type, pixels, packing, "glTexImage3D"); - if (!pixels) { - /* Note: we check for a NULL image pointer here, _after_ we allocated - * memory for the texture. That's what the GL spec calls for. - */ - return; - } - else { - GLint dstRowStride = texture_row_stride(texImage); - GLboolean success = _mesa_texstore(ctx, 3, texImage->_BaseFormat, - texImage->TexFormat, - texImage->Data, - 0, 0, 0, /* dstX/Y/Zoffset */ - dstRowStride, - texImage->ImageOffsets, - width, height, depth, - format, type, pixels, packing); - if (!success) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D"); - } - } - - _mesa_unmap_teximage_pbo(ctx, packing); -} - - - - -/* - * This is the software fallback for Driver.TexSubImage1D() - * and Driver.CopyTexSubImage1D(). - */ -void -_mesa_store_texsubimage1d(struct gl_context *ctx, GLenum target, GLint level, - GLint xoffset, GLint width, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - /* get pointer to src pixels (may be in a pbo which we'll map here) */ - pixels = _mesa_validate_pbo_teximage(ctx, 1, width, 1, 1, format, type, - pixels, packing, "glTexSubImage1D"); - if (!pixels) - return; - - { - const GLint dstRowStride = 0; - GLboolean success = _mesa_texstore(ctx, 1, texImage->_BaseFormat, - texImage->TexFormat, - texImage->Data, - xoffset, 0, 0, /* offsets */ - dstRowStride, - texImage->ImageOffsets, - width, 1, 1, - format, type, pixels, packing); - if (!success) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage1D"); - } - } - - _mesa_unmap_teximage_pbo(ctx, packing); -} - - - -/** - * This is the software fallback for Driver.TexSubImage2D() - * and Driver.CopyTexSubImage2D(). - */ -void -_mesa_store_texsubimage2d(struct gl_context *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint width, GLint height, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - /* get pointer to src pixels (may be in a pbo which we'll map here) */ - pixels = _mesa_validate_pbo_teximage(ctx, 2, width, height, 1, format, type, - pixels, packing, "glTexSubImage2D"); - if (!pixels) - return; - - { - GLint dstRowStride = texture_row_stride(texImage); - GLboolean success = _mesa_texstore(ctx, 2, texImage->_BaseFormat, - texImage->TexFormat, - texImage->Data, - xoffset, yoffset, 0, - dstRowStride, - texImage->ImageOffsets, - width, height, 1, - format, type, pixels, packing); - if (!success) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage2D"); - } - } - - _mesa_unmap_teximage_pbo(ctx, packing); -} - - -/* - * This is the software fallback for Driver.TexSubImage3D(). - * and Driver.CopyTexSubImage3D(). - */ -void -_mesa_store_texsubimage3d(struct gl_context *ctx, GLenum target, GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLint width, GLint height, GLint depth, - GLenum format, GLenum type, const void *pixels, - const struct gl_pixelstore_attrib *packing, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - /* get pointer to src pixels (may be in a pbo which we'll map here) */ - pixels = _mesa_validate_pbo_teximage(ctx, 3, width, height, depth, format, - type, pixels, packing, - "glTexSubImage3D"); - if (!pixels) - return; - - { - GLint dstRowStride = texture_row_stride(texImage); - GLboolean success = _mesa_texstore(ctx, 3, texImage->_BaseFormat, - texImage->TexFormat, - texImage->Data, - xoffset, yoffset, zoffset, - dstRowStride, - texImage->ImageOffsets, - width, height, depth, - format, type, pixels, packing); - if (!success) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage3D"); - } - } - - _mesa_unmap_teximage_pbo(ctx, packing); -} - - -/* - * Fallback for Driver.CompressedTexImage1D() - */ -void -_mesa_store_compressed_teximage1d(struct gl_context *ctx, - GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - /* this space intentionally left blank */ - (void) ctx; - (void) target; (void) level; - (void) internalFormat; - (void) width; (void) border; - (void) imageSize; (void) data; - (void) texObj; - (void) texImage; -} - - - -/** - * Fallback for Driver.CompressedTexImage2D() - */ -void -_mesa_store_compressed_teximage2d(struct gl_context *ctx, - GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - (void) width; (void) height; (void) border; - - /* This is pretty simple, basically just do a memcpy without worrying - * about the usual image unpacking or image transfer operations. - */ - ASSERT(texObj); - ASSERT(texImage); - ASSERT(texImage->Width > 0); - ASSERT(texImage->Height > 0); - ASSERT(texImage->Depth == 1); - ASSERT(texImage->Data == NULL); /* was freed in glCompressedTexImage2DARB */ - - /* allocate storage */ - texImage->Data = _mesa_alloc_texmemory(imageSize); - if (!texImage->Data) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB"); - return; - } - - data = _mesa_validate_pbo_compressed_teximage(ctx, imageSize, data, - &ctx->Unpack, - "glCompressedTexImage2D"); - if (!data) - return; - - /* copy the data */ - memcpy(texImage->Data, data, imageSize); - - _mesa_unmap_teximage_pbo(ctx, &ctx->Unpack); -} - - - -/* - * Fallback for Driver.CompressedTexImage3D() - */ -void -_mesa_store_compressed_teximage3d(struct gl_context *ctx, - GLenum target, GLint level, - GLint internalFormat, - GLint width, GLint height, GLint depth, - GLint border, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - /* this space intentionally left blank */ - (void) ctx; - (void) target; (void) level; - (void) internalFormat; - (void) width; (void) height; (void) depth; - (void) border; - (void) imageSize; (void) data; - (void) texObj; - (void) texImage; -} - - - -/** - * Fallback for Driver.CompressedTexSubImage1D() - */ -void -_mesa_store_compressed_texsubimage1d(struct gl_context *ctx, GLenum target, - GLint level, - GLint xoffset, GLsizei width, - GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - /* there are no compressed 1D texture formats yet */ - (void) ctx; - (void) target; (void) level; - (void) xoffset; (void) width; - (void) format; - (void) imageSize; (void) data; - (void) texObj; - (void) texImage; -} - - -/** - * Fallback for Driver.CompressedTexSubImage2D() - */ -void -_mesa_store_compressed_texsubimage2d(struct gl_context *ctx, GLenum target, - GLint level, - GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - GLint bytesPerRow, destRowStride, srcRowStride; - GLint i, rows; - GLubyte *dest; - const GLubyte *src; - const gl_format texFormat = texImage->TexFormat; - const GLint destWidth = texImage->Width; - GLuint bw, bh; - - _mesa_get_format_block_size(texFormat, &bw, &bh); - - (void) level; - (void) format; - - /* these should have been caught sooner */ - ASSERT((width % bw) == 0 || width == 2 || width == 1); - ASSERT((height % bh) == 0 || height == 2 || height == 1); - ASSERT((xoffset % bw) == 0); - ASSERT((yoffset % bh) == 0); - - /* get pointer to src pixels (may be in a pbo which we'll map here) */ - data = _mesa_validate_pbo_compressed_teximage(ctx, imageSize, data, - &ctx->Unpack, - "glCompressedTexSubImage2D"); - if (!data) - return; - - srcRowStride = _mesa_format_row_stride(texFormat, width); - src = (const GLubyte *) data; - - destRowStride = _mesa_format_row_stride(texFormat, destWidth); - dest = _mesa_compressed_image_address(xoffset, yoffset, 0, - texFormat, destWidth, - (GLubyte *) texImage->Data); - - bytesPerRow = srcRowStride; /* bytes per row of blocks */ - rows = height / bh; /* rows in blocks */ - - /* copy rows of blocks */ - for (i = 0; i < rows; i++) { - memcpy(dest, src, bytesPerRow); - dest += destRowStride; - src += srcRowStride; - } - - _mesa_unmap_teximage_pbo(ctx, &ctx->Unpack); -} - - -/** - * Fallback for Driver.CompressedTexSubImage3D() - */ -void -_mesa_store_compressed_texsubimage3d(struct gl_context *ctx, GLenum target, - GLint level, - GLint xoffset, GLint yoffset, GLint zoffset, - GLsizei width, GLsizei height, GLsizei depth, - GLenum format, - GLsizei imageSize, const GLvoid *data, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - /* there are no compressed 3D texture formats yet */ - (void) ctx; - (void) target; (void) level; - (void) xoffset; (void) yoffset; (void) zoffset; - (void) width; (void) height; (void) depth; - (void) format; - (void) imageSize; (void) data; - (void) texObj; - (void) texImage; -} +/*
+ * Mesa 3-D graphics library
+ * Version: 7.5
+ *
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (c) 2008-2009 VMware, Inc.
+ *
+ * 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
+ * BRIAN PAUL 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.
+ */
+
+/*
+ * Authors:
+ * Brian Paul
+ */
+
+/**
+ * The GL texture image functions in teximage.c basically just do
+ * error checking and data structure allocation. They in turn call
+ * device driver functions which actually copy/convert/store the user's
+ * texture image data.
+ *
+ * However, most device drivers will be able to use the fallback functions
+ * in this file. That is, most drivers will have the following bit of
+ * code:
+ * ctx->Driver.TexImage1D = _mesa_store_teximage1d;
+ * ctx->Driver.TexImage2D = _mesa_store_teximage2d;
+ * ctx->Driver.TexImage3D = _mesa_store_teximage3d;
+ * etc...
+ *
+ * Texture image processing is actually kind of complicated. We have to do:
+ * Format/type conversions
+ * pixel unpacking
+ * pixel transfer (scale, bais, lookup, etc)
+ *
+ * These functions can handle most everything, including processing full
+ * images and sub-images.
+ */
+
+
+#include "glheader.h"
+#include "bufferobj.h"
+#include "colormac.h"
+#include "image.h"
+#include "macros.h"
+#include "mipmap.h"
+#include "mfeatures.h"
+#include "mtypes.h"
+#include "pack.h"
+#include "pbo.h"
+#include "imports.h"
+#include "pack.h"
+#include "texcompress.h"
+#include "texcompress_fxt1.h"
+#include "texcompress_rgtc.h"
+#include "texcompress_s3tc.h"
+#include "teximage.h"
+#include "texstore.h"
+#include "enums.h"
+
+
+enum {
+ ZERO = 4,
+ ONE = 5
+};
+
+
+/**
+ * Texture image storage function.
+ */
+typedef GLboolean (*StoreTexImageFunc)(TEXSTORE_PARAMS);
+
+
+/**
+ * Return GL_TRUE if the given image format is one that be converted
+ * to another format by swizzling.
+ */
+static GLboolean
+can_swizzle(GLenum logicalBaseFormat)
+{
+ switch (logicalBaseFormat) {
+ case GL_RGBA:
+ case GL_RGB:
+ case GL_LUMINANCE_ALPHA:
+ case GL_INTENSITY:
+ case GL_ALPHA:
+ case GL_LUMINANCE:
+ case GL_RED:
+ case GL_GREEN:
+ case GL_BLUE:
+ case GL_BGR:
+ case GL_BGRA:
+ case GL_ABGR_EXT:
+ case GL_RG:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
+
+enum {
+ IDX_LUMINANCE = 0,
+ IDX_ALPHA,
+ IDX_INTENSITY,
+ IDX_LUMINANCE_ALPHA,
+ IDX_RGB,
+ IDX_RGBA,
+ IDX_RED,
+ IDX_GREEN,
+ IDX_BLUE,
+ IDX_BGR,
+ IDX_BGRA,
+ IDX_ABGR,
+ IDX_RG,
+ MAX_IDX
+};
+
+#define MAP1(x) MAP4(x, ZERO, ZERO, ZERO)
+#define MAP2(x,y) MAP4(x, y, ZERO, ZERO)
+#define MAP3(x,y,z) MAP4(x, y, z, ZERO)
+#define MAP4(x,y,z,w) { x, y, z, w, ZERO, ONE }
+
+
+static const struct {
+ GLubyte format_idx;
+ GLubyte to_rgba[6];
+ GLubyte from_rgba[6];
+} mappings[MAX_IDX] =
+{
+ {
+ IDX_LUMINANCE,
+ MAP4(0,0,0,ONE),
+ MAP1(0)
+ },
+
+ {
+ IDX_ALPHA,
+ MAP4(ZERO, ZERO, ZERO, 0),
+ MAP1(3)
+ },
+
+ {
+ IDX_INTENSITY,
+ MAP4(0, 0, 0, 0),
+ MAP1(0),
+ },
+
+ {
+ IDX_LUMINANCE_ALPHA,
+ MAP4(0,0,0,1),
+ MAP2(0,3)
+ },
+
+ {
+ IDX_RGB,
+ MAP4(0,1,2,ONE),
+ MAP3(0,1,2)
+ },
+
+ {
+ IDX_RGBA,
+ MAP4(0,1,2,3),
+ MAP4(0,1,2,3),
+ },
+
+ {
+ IDX_RED,
+ MAP4(0, ZERO, ZERO, ONE),
+ MAP1(0),
+ },
+
+ {
+ IDX_GREEN,
+ MAP4(ZERO, 0, ZERO, ONE),
+ MAP1(1),
+ },
+
+ {
+ IDX_BLUE,
+ MAP4(ZERO, ZERO, 0, ONE),
+ MAP1(2),
+ },
+
+ {
+ IDX_BGR,
+ MAP4(2,1,0,ONE),
+ MAP3(2,1,0)
+ },
+
+ {
+ IDX_BGRA,
+ MAP4(2,1,0,3),
+ MAP4(2,1,0,3)
+ },
+
+ {
+ IDX_ABGR,
+ MAP4(3,2,1,0),
+ MAP4(3,2,1,0)
+ },
+
+ {
+ IDX_RG,
+ MAP4(0, 1, ZERO, ONE),
+ MAP2(0, 1)
+ },
+};
+
+
+
+/**
+ * Convert a GL image format enum to an IDX_* value (see above).
+ */
+static int
+get_map_idx(GLenum value)
+{
+ switch (value) {
+ case GL_LUMINANCE: return IDX_LUMINANCE;
+ case GL_ALPHA: return IDX_ALPHA;
+ case GL_INTENSITY: return IDX_INTENSITY;
+ case GL_LUMINANCE_ALPHA: return IDX_LUMINANCE_ALPHA;
+ case GL_RGB: return IDX_RGB;
+ case GL_RGBA: return IDX_RGBA;
+ case GL_RED: return IDX_RED;
+ case GL_GREEN: return IDX_GREEN;
+ case GL_BLUE: return IDX_BLUE;
+ case GL_BGR: return IDX_BGR;
+ case GL_BGRA: return IDX_BGRA;
+ case GL_ABGR_EXT: return IDX_ABGR;
+ case GL_RG: return IDX_RG;
+ default:
+ _mesa_problem(NULL, "Unexpected inFormat");
+ return 0;
+ }
+}
+
+
+/**
+ * When promoting texture formats (see below) we need to compute the
+ * mapping of dest components back to source components.
+ * This function does that.
+ * \param inFormat the incoming format of the texture
+ * \param outFormat the final texture format
+ * \return map[6] a full 6-component map
+ */
+static void
+compute_component_mapping(GLenum inFormat, GLenum outFormat,
+ GLubyte *map)
+{
+ const int inFmt = get_map_idx(inFormat);
+ const int outFmt = get_map_idx(outFormat);
+ const GLubyte *in2rgba = mappings[inFmt].to_rgba;
+ const GLubyte *rgba2out = mappings[outFmt].from_rgba;
+ int i;
+
+ for (i = 0; i < 4; i++)
+ map[i] = in2rgba[rgba2out[i]];
+
+ map[ZERO] = ZERO;
+ map[ONE] = ONE;
+
+#if 0
+ printf("from %x/%s to %x/%s map %d %d %d %d %d %d\n",
+ inFormat, _mesa_lookup_enum_by_nr(inFormat),
+ outFormat, _mesa_lookup_enum_by_nr(outFormat),
+ map[0],
+ map[1],
+ map[2],
+ map[3],
+ map[4],
+ map[5]);
+#endif
+}
+
+
+/**
+ * Make a temporary (color) texture image with GLfloat components.
+ * Apply all needed pixel unpacking and pixel transfer operations.
+ * Note that there are both logicalBaseFormat and textureBaseFormat parameters.
+ * Suppose the user specifies GL_LUMINANCE as the internal texture format
+ * but the graphics hardware doesn't support luminance textures. So, we might
+ * use an RGB hardware format instead.
+ * If logicalBaseFormat != textureBaseFormat we have some extra work to do.
+ *
+ * \param ctx the rendering context
+ * \param dims image dimensions: 1, 2 or 3
+ * \param logicalBaseFormat basic texture derived from the user's
+ * internal texture format value
+ * \param textureBaseFormat the actual basic format of the texture
+ * \param srcWidth source image width
+ * \param srcHeight source image height
+ * \param srcDepth source image depth
+ * \param srcFormat source image format
+ * \param srcType source image type
+ * \param srcAddr source image address
+ * \param srcPacking source image pixel packing
+ * \return resulting image with format = textureBaseFormat and type = GLfloat.
+ */
+GLfloat *
+_mesa_make_temp_float_image(struct gl_context *ctx, GLuint dims,
+ GLenum logicalBaseFormat,
+ GLenum textureBaseFormat,
+ GLint srcWidth, GLint srcHeight, GLint srcDepth,
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *srcAddr,
+ const struct gl_pixelstore_attrib *srcPacking,
+ GLbitfield transferOps)
+{
+ GLfloat *tempImage;
+ const GLint components = _mesa_components_in_format(logicalBaseFormat);
+ const GLint srcStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
+ GLfloat *dst;
+ GLint img, row;
+
+ ASSERT(dims >= 1 && dims <= 3);
+
+ ASSERT(logicalBaseFormat == GL_RGBA ||
+ logicalBaseFormat == GL_RGB ||
+ logicalBaseFormat == GL_RG ||
+ logicalBaseFormat == GL_RED ||
+ logicalBaseFormat == GL_LUMINANCE_ALPHA ||
+ logicalBaseFormat == GL_LUMINANCE ||
+ logicalBaseFormat == GL_ALPHA ||
+ logicalBaseFormat == GL_INTENSITY ||
+ logicalBaseFormat == GL_COLOR_INDEX ||
+ logicalBaseFormat == GL_DEPTH_COMPONENT);
+
+ ASSERT(textureBaseFormat == GL_RGBA ||
+ textureBaseFormat == GL_RGB ||
+ textureBaseFormat == GL_RG ||
+ textureBaseFormat == GL_RED ||
+ textureBaseFormat == GL_LUMINANCE_ALPHA ||
+ textureBaseFormat == GL_LUMINANCE ||
+ textureBaseFormat == GL_ALPHA ||
+ textureBaseFormat == GL_INTENSITY ||
+ textureBaseFormat == GL_COLOR_INDEX ||
+ textureBaseFormat == GL_DEPTH_COMPONENT);
+
+ tempImage = (GLfloat *) malloc(srcWidth * srcHeight * srcDepth
+ * components * sizeof(GLfloat));
+ if (!tempImage)
+ return NULL;
+
+ dst = tempImage;
+ for (img = 0; img < srcDepth; img++) {
+ const GLubyte *src
+ = (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr,
+ srcWidth, srcHeight,
+ srcFormat, srcType,
+ img, 0, 0);
+ for (row = 0; row < srcHeight; row++) {
+ _mesa_unpack_color_span_float(ctx, srcWidth, logicalBaseFormat,
+ dst, srcFormat, srcType, src,
+ srcPacking, transferOps);
+ dst += srcWidth * components;
+ src += srcStride;
+ }
+ }
+
+ if (logicalBaseFormat != textureBaseFormat) {
+ /* more work */
+ GLint texComponents = _mesa_components_in_format(textureBaseFormat);
+ GLint logComponents = _mesa_components_in_format(logicalBaseFormat);
+ GLfloat *newImage;
+ GLint i, n;
+ GLubyte map[6];
+
+ /* we only promote up to RGB, RGBA and LUMINANCE_ALPHA formats for now */
+ ASSERT(textureBaseFormat == GL_RGB || textureBaseFormat == GL_RGBA ||
+ textureBaseFormat == GL_LUMINANCE_ALPHA);
+
+ /* The actual texture format should have at least as many components
+ * as the logical texture format.
+ */
+ ASSERT(texComponents >= logComponents);
+
+ newImage = (GLfloat *) malloc(srcWidth * srcHeight * srcDepth
+ * texComponents * sizeof(GLfloat));
+ if (!newImage) {
+ free(tempImage);
+ return NULL;
+ }
+
+ compute_component_mapping(logicalBaseFormat, textureBaseFormat, map);
+
+ n = srcWidth * srcHeight * srcDepth;
+ for (i = 0; i < n; i++) {
+ GLint k;
+ for (k = 0; k < texComponents; k++) {
+ GLint j = map[k];
+ if (j == ZERO)
+ newImage[i * texComponents + k] = 0.0F;
+ else if (j == ONE)
+ newImage[i * texComponents + k] = 1.0F;
+ else
+ newImage[i * texComponents + k] = tempImage[i * logComponents + j];
+ }
+ }
+
+ free(tempImage);
+ tempImage = newImage;
+ }
+
+ return tempImage;
+}
+
+
+/**
+ * Make temporary image with uint pixel values. Used for unsigned
+ * integer-valued textures.
+ */
+static GLuint *
+make_temp_uint_image(struct gl_context *ctx, GLuint dims,
+ GLenum logicalBaseFormat,
+ GLenum textureBaseFormat,
+ GLint srcWidth, GLint srcHeight, GLint srcDepth,
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *srcAddr,
+ const struct gl_pixelstore_attrib *srcPacking)
+{
+ GLuint *tempImage;
+ const GLint components = _mesa_components_in_format(logicalBaseFormat);
+ const GLint srcStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
+ GLuint *dst;
+ GLint img, row;
+
+ ASSERT(dims >= 1 && dims <= 3);
+
+ ASSERT(logicalBaseFormat == GL_RGBA ||
+ logicalBaseFormat == GL_RGB ||
+ logicalBaseFormat == GL_RG ||
+ logicalBaseFormat == GL_RED ||
+ logicalBaseFormat == GL_LUMINANCE_ALPHA ||
+ logicalBaseFormat == GL_LUMINANCE ||
+ logicalBaseFormat == GL_INTENSITY ||
+ logicalBaseFormat == GL_ALPHA);
+
+ ASSERT(textureBaseFormat == GL_RGBA ||
+ textureBaseFormat == GL_RGB ||
+ textureBaseFormat == GL_RG ||
+ textureBaseFormat == GL_RED ||
+ textureBaseFormat == GL_LUMINANCE_ALPHA ||
+ textureBaseFormat == GL_LUMINANCE ||
+ textureBaseFormat == GL_ALPHA);
+
+ tempImage = (GLuint *) malloc(srcWidth * srcHeight * srcDepth
+ * components * sizeof(GLuint));
+ if (!tempImage)
+ return NULL;
+
+ dst = tempImage;
+ for (img = 0; img < srcDepth; img++) {
+ const GLubyte *src
+ = (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr,
+ srcWidth, srcHeight,
+ srcFormat, srcType,
+ img, 0, 0);
+ for (row = 0; row < srcHeight; row++) {
+ _mesa_unpack_color_span_uint(ctx, srcWidth, logicalBaseFormat,
+ dst, srcFormat, srcType, src,
+ srcPacking);
+ dst += srcWidth * components;
+ src += srcStride;
+ }
+ }
+
+ if (logicalBaseFormat != textureBaseFormat) {
+ /* more work */
+ GLint texComponents = _mesa_components_in_format(textureBaseFormat);
+ GLint logComponents = _mesa_components_in_format(logicalBaseFormat);
+ GLuint *newImage;
+ GLint i, n;
+ GLubyte map[6];
+
+ /* we only promote up to RGB, RGBA and LUMINANCE_ALPHA formats for now */
+ ASSERT(textureBaseFormat == GL_RGB || textureBaseFormat == GL_RGBA ||
+ textureBaseFormat == GL_LUMINANCE_ALPHA);
+
+ /* The actual texture format should have at least as many components
+ * as the logical texture format.
+ */
+ ASSERT(texComponents >= logComponents);
+
+ newImage = (GLuint *) malloc(srcWidth * srcHeight * srcDepth
+ * texComponents * sizeof(GLuint));
+ if (!newImage) {
+ free(tempImage);
+ return NULL;
+ }
+
+ compute_component_mapping(logicalBaseFormat, textureBaseFormat, map);
+
+ n = srcWidth * srcHeight * srcDepth;
+ for (i = 0; i < n; i++) {
+ GLint k;
+ for (k = 0; k < texComponents; k++) {
+ GLint j = map[k];
+ if (j == ZERO)
+ newImage[i * texComponents + k] = 0.0F;
+ else if (j == ONE)
+ newImage[i * texComponents + k] = 1.0F;
+ else
+ newImage[i * texComponents + k] = tempImage[i * logComponents + j];
+ }
+ }
+
+ free(tempImage);
+ tempImage = newImage;
+ }
+
+ return tempImage;
+}
+
+
+
+/**
+ * Make a temporary (color) texture image with GLchan components.
+ * Apply all needed pixel unpacking and pixel transfer operations.
+ * Note that there are both logicalBaseFormat and textureBaseFormat parameters.
+ * Suppose the user specifies GL_LUMINANCE as the internal texture format
+ * but the graphics hardware doesn't support luminance textures. So, we might
+ * use an RGB hardware format instead.
+ * If logicalBaseFormat != textureBaseFormat we have some extra work to do.
+ *
+ * \param ctx the rendering context
+ * \param dims image dimensions: 1, 2 or 3
+ * \param logicalBaseFormat basic texture derived from the user's
+ * internal texture format value
+ * \param textureBaseFormat the actual basic format of the texture
+ * \param srcWidth source image width
+ * \param srcHeight source image height
+ * \param srcDepth source image depth
+ * \param srcFormat source image format
+ * \param srcType source image type
+ * \param srcAddr source image address
+ * \param srcPacking source image pixel packing
+ * \return resulting image with format = textureBaseFormat and type = GLchan.
+ */
+GLchan *
+_mesa_make_temp_chan_image(struct gl_context *ctx, GLuint dims,
+ GLenum logicalBaseFormat,
+ GLenum textureBaseFormat,
+ GLint srcWidth, GLint srcHeight, GLint srcDepth,
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *srcAddr,
+ const struct gl_pixelstore_attrib *srcPacking)
+{
+ GLuint transferOps = ctx->_ImageTransferState;
+ const GLint components = _mesa_components_in_format(logicalBaseFormat);
+ GLint img, row;
+ GLchan *tempImage, *dst;
+
+ ASSERT(dims >= 1 && dims <= 3);
+
+ ASSERT(logicalBaseFormat == GL_RGBA ||
+ logicalBaseFormat == GL_RGB ||
+ logicalBaseFormat == GL_RG ||
+ logicalBaseFormat == GL_RED ||
+ logicalBaseFormat == GL_LUMINANCE_ALPHA ||
+ logicalBaseFormat == GL_LUMINANCE ||
+ logicalBaseFormat == GL_ALPHA ||
+ logicalBaseFormat == GL_INTENSITY);
+
+ ASSERT(textureBaseFormat == GL_RGBA ||
+ textureBaseFormat == GL_RGB ||
+ textureBaseFormat == GL_RG ||
+ textureBaseFormat == GL_RED ||
+ textureBaseFormat == GL_LUMINANCE_ALPHA ||
+ textureBaseFormat == GL_LUMINANCE ||
+ textureBaseFormat == GL_ALPHA ||
+ textureBaseFormat == GL_INTENSITY);
+
+ /* unpack and transfer the source image */
+ tempImage = (GLchan *) malloc(srcWidth * srcHeight * srcDepth
+ * components * sizeof(GLchan));
+ if (!tempImage) {
+ return NULL;
+ }
+
+ dst = tempImage;
+ for (img = 0; img < srcDepth; img++) {
+ const GLint srcStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
+ const GLubyte *src =
+ (const GLubyte *) _mesa_image_address(dims, srcPacking, srcAddr,
+ srcWidth, srcHeight,
+ srcFormat, srcType,
+ img, 0, 0);
+ for (row = 0; row < srcHeight; row++) {
+ _mesa_unpack_color_span_chan(ctx, srcWidth, logicalBaseFormat, dst,
+ srcFormat, srcType, src, srcPacking,
+ transferOps);
+ dst += srcWidth * components;
+ src += srcStride;
+ }
+ }
+
+ if (logicalBaseFormat != textureBaseFormat) {
+ /* one more conversion step */
+ GLint texComponents = _mesa_components_in_format(textureBaseFormat);
+ GLint logComponents = _mesa_components_in_format(logicalBaseFormat);
+ GLchan *newImage;
+ GLint i, n;
+ GLubyte map[6];
+
+ /* we only promote up to RGB, RGBA and LUMINANCE_ALPHA formats for now */
+ ASSERT(textureBaseFormat == GL_RGB || textureBaseFormat == GL_RGBA ||
+ textureBaseFormat == GL_LUMINANCE_ALPHA);
+
+ /* The actual texture format should have at least as many components
+ * as the logical texture format.
+ */
+ ASSERT(texComponents >= logComponents);
+
+ newImage = (GLchan *) malloc(srcWidth * srcHeight * srcDepth
+ * texComponents * sizeof(GLchan));
+ if (!newImage) {
+ free(tempImage);
+ return NULL;
+ }
+
+ compute_component_mapping(logicalBaseFormat, textureBaseFormat, map);
+
+ n = srcWidth * srcHeight * srcDepth;
+ for (i = 0; i < n; i++) {
+ GLint k;
+ for (k = 0; k < texComponents; k++) {
+ GLint j = map[k];
+ if (j == ZERO)
+ newImage[i * texComponents + k] = 0;
+ else if (j == ONE)
+ newImage[i * texComponents + k] = CHAN_MAX;
+ else
+ newImage[i * texComponents + k] = tempImage[i * logComponents + j];
+ }
+ }
+
+ free(tempImage);
+ tempImage = newImage;
+ }
+
+ return tempImage;
+}
+
+
+/**
+ * Copy GLubyte pixels from <src> to <dst> with swizzling.
+ * \param dst destination pixels
+ * \param dstComponents number of color components in destination pixels
+ * \param src source pixels
+ * \param srcComponents number of color components in source pixels
+ * \param map the swizzle mapping. map[X] says where to find the X component
+ * in the source image's pixels. For example, if the source image
+ * is GL_BGRA and X = red, map[0] yields 2.
+ * \param count number of pixels to copy/swizzle.
+ */
+static void
+swizzle_copy(GLubyte *dst, GLuint dstComponents, const GLubyte *src,
+ GLuint srcComponents, const GLubyte *map, GLuint count)
+{
+#define SWZ_CPY(dst, src, count, dstComps, srcComps) \
+ do { \
+ GLuint i; \
+ for (i = 0; i < count; i++) { \
+ GLuint j; \
+ if (srcComps == 4) { \
+ COPY_4UBV(tmp, src); \
+ } \
+ else { \
+ for (j = 0; j < srcComps; j++) { \
+ tmp[j] = src[j]; \
+ } \
+ } \
+ src += srcComps; \
+ for (j = 0; j < dstComps; j++) { \
+ dst[j] = tmp[map[j]]; \
+ } \
+ dst += dstComps; \
+ } \
+ } while (0)
+
+ GLubyte tmp[6];
+
+ tmp[ZERO] = 0x0;
+ tmp[ONE] = 0xff;
+
+ ASSERT(srcComponents <= 4);
+ ASSERT(dstComponents <= 4);
+
+ switch (dstComponents) {
+ case 4:
+ switch (srcComponents) {
+ case 4:
+ SWZ_CPY(dst, src, count, 4, 4);
+ break;
+ case 3:
+ SWZ_CPY(dst, src, count, 4, 3);
+ break;
+ case 2:
+ SWZ_CPY(dst, src, count, 4, 2);
+ break;
+ case 1:
+ SWZ_CPY(dst, src, count, 4, 1);
+ break;
+ default:
+ ;
+ }
+ break;
+ case 3:
+ switch (srcComponents) {
+ case 4:
+ SWZ_CPY(dst, src, count, 3, 4);
+ break;
+ case 3:
+ SWZ_CPY(dst, src, count, 3, 3);
+ break;
+ case 2:
+ SWZ_CPY(dst, src, count, 3, 2);
+ break;
+ case 1:
+ SWZ_CPY(dst, src, count, 3, 1);
+ break;
+ default:
+ ;
+ }
+ break;
+ case 2:
+ switch (srcComponents) {
+ case 4:
+ SWZ_CPY(dst, src, count, 2, 4);
+ break;
+ case 3:
+ SWZ_CPY(dst, src, count, 2, 3);
+ break;
+ case 2:
+ SWZ_CPY(dst, src, count, 2, 2);
+ break;
+ case 1:
+ SWZ_CPY(dst, src, count, 2, 1);
+ break;
+ default:
+ ;
+ }
+ break;
+ case 1:
+ switch (srcComponents) {
+ case 4:
+ SWZ_CPY(dst, src, count, 1, 4);
+ break;
+ case 3:
+ SWZ_CPY(dst, src, count, 1, 3);
+ break;
+ case 2:
+ SWZ_CPY(dst, src, count, 1, 2);
+ break;
+ case 1:
+ SWZ_CPY(dst, src, count, 1, 1);
+ break;
+ default:
+ ;
+ }
+ break;
+ default:
+ ;
+ }
+#undef SWZ_CPY
+}
+
+
+
+static const GLubyte map_identity[6] = { 0, 1, 2, 3, ZERO, ONE };
+static const GLubyte map_3210[6] = { 3, 2, 1, 0, ZERO, ONE };
+
+
+/**
+ * For 1-byte/pixel formats (or 8_8_8_8 packed formats), return a
+ * mapping array depending on endianness.
+ */
+static const GLubyte *
+type_mapping( GLenum srcType )
+{
+ switch (srcType) {
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ return map_identity;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ return _mesa_little_endian() ? map_3210 : map_identity;
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ return _mesa_little_endian() ? map_identity : map_3210;
+ default:
+ return NULL;
+ }
+}
+
+
+/**
+ * For 1-byte/pixel formats (or 8_8_8_8 packed formats), return a
+ * mapping array depending on pixelstore byte swapping state.
+ */
+static const GLubyte *
+byteswap_mapping( GLboolean swapBytes,
+ GLenum srcType )
+{
+ if (!swapBytes)
+ return map_identity;
+
+ switch (srcType) {
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ return map_identity;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ return map_3210;
+ default:
+ return NULL;
+ }
+}
+
+
+
+/**
+ * Transfer a GLubyte texture image with component swizzling.
+ */
+static void
+_mesa_swizzle_ubyte_image(struct gl_context *ctx,
+ GLuint dimensions,
+ GLenum srcFormat,
+ GLenum srcType,
+
+ GLenum baseInternalFormat,
+
+ const GLubyte *rgba2dst,
+ GLuint dstComponents,
+
+ GLvoid *dstAddr,
+ GLint dstXoffset, GLint dstYoffset, GLint dstZoffset,
+ GLint dstRowStride,
+ const GLuint *dstImageOffsets,
+
+ GLint srcWidth, GLint srcHeight, GLint srcDepth,
+ const GLvoid *srcAddr,
+ const struct gl_pixelstore_attrib *srcPacking )
+{
+ GLint srcComponents = _mesa_components_in_format(srcFormat);
+ const GLubyte *srctype2ubyte, *swap;
+ GLubyte map[4], src2base[6], base2rgba[6];
+ GLint i;
+ const GLint srcRowStride =
+ _mesa_image_row_stride(srcPacking, srcWidth,
+ srcFormat, GL_UNSIGNED_BYTE);
+ const GLint srcImageStride
+ = _mesa_image_image_stride(srcPacking, srcWidth, srcHeight, srcFormat,
+ GL_UNSIGNED_BYTE);
+ const GLubyte *srcImage
+ = (const GLubyte *) _mesa_image_address(dimensions, srcPacking, srcAddr,
+ srcWidth, srcHeight, srcFormat,
+ GL_UNSIGNED_BYTE, 0, 0, 0);
+
+ (void) ctx;
+
+ /* Translate from src->baseInternal->GL_RGBA->dst. This will
+ * correctly deal with RGBA->RGB->RGBA conversions where the final
+ * A value must be 0xff regardless of the incoming alpha values.
+ */
+ compute_component_mapping(srcFormat, baseInternalFormat, src2base);
+ compute_component_mapping(baseInternalFormat, GL_RGBA, base2rgba);
+ swap = byteswap_mapping(srcPacking->SwapBytes, srcType);
+ srctype2ubyte = type_mapping(srcType);
+
+
+ for (i = 0; i < 4; i++)
+ map[i] = srctype2ubyte[swap[src2base[base2rgba[rgba2dst[i]]]]];
+
+/* printf("map %d %d %d %d\n", map[0], map[1], map[2], map[3]); */
+
+ if (srcComponents == dstComponents &&
+ srcRowStride == dstRowStride &&
+ srcRowStride == srcWidth * srcComponents &&
+ dimensions < 3) {
+ /* 1 and 2D images only */
+ GLubyte *dstImage = (GLubyte *) dstAddr
+ + dstYoffset * dstRowStride
+ + dstXoffset * dstComponents;
+ swizzle_copy(dstImage, dstComponents, srcImage, srcComponents, map,
+ srcWidth * srcHeight);
+ }
+ else {
+ GLint img, row;
+ for (img = 0; img < srcDepth; img++) {
+ const GLubyte *srcRow = srcImage;
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * dstComponents
+ + dstYoffset * dstRowStride
+ + dstXoffset * dstComponents;
+ for (row = 0; row < srcHeight; row++) {
+ swizzle_copy(dstRow, dstComponents, srcRow, srcComponents, map, srcWidth);
+ dstRow += dstRowStride;
+ srcRow += srcRowStride;
+ }
+ srcImage += srcImageStride;
+ }
+ }
+}
+
+
+/**
+ * Teximage storage routine for when a simple memcpy will do.
+ * No pixel transfer operations or special texel encodings allowed.
+ * 1D, 2D and 3D images supported.
+ */
+static void
+memcpy_texture(struct gl_context *ctx,
+ GLuint dimensions,
+ gl_format dstFormat,
+ GLvoid *dstAddr,
+ GLint dstXoffset, GLint dstYoffset, GLint dstZoffset,
+ GLint dstRowStride,
+ const GLuint *dstImageOffsets,
+ GLint srcWidth, GLint srcHeight, GLint srcDepth,
+ GLenum srcFormat, GLenum srcType,
+ const GLvoid *srcAddr,
+ const struct gl_pixelstore_attrib *srcPacking)
+{
+ const GLint srcRowStride = _mesa_image_row_stride(srcPacking, srcWidth,
+ srcFormat, srcType);
+ const GLint srcImageStride = _mesa_image_image_stride(srcPacking,
+ srcWidth, srcHeight, srcFormat, srcType);
+ const GLubyte *srcImage = (const GLubyte *) _mesa_image_address(dimensions,
+ srcPacking, srcAddr, srcWidth, srcHeight, srcFormat, srcType, 0, 0, 0);
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLint bytesPerRow = srcWidth * texelBytes;
+
+#if 0
+ /* XXX update/re-enable for dstImageOffsets array */
+ const GLint bytesPerImage = srcHeight * bytesPerRow;
+ const GLint bytesPerTexture = srcDepth * bytesPerImage;
+ GLubyte *dstImage = (GLubyte *) dstAddr
+ + dstZoffset * dstImageStride
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+
+ if (dstRowStride == srcRowStride &&
+ dstRowStride == bytesPerRow &&
+ ((dstImageStride == srcImageStride &&
+ dstImageStride == bytesPerImage) ||
+ (srcDepth == 1))) {
+ /* one big memcpy */
+ ctx->Driver.TextureMemCpy(dstImage, srcImage, bytesPerTexture);
+ }
+ else
+ {
+ GLint img, row;
+ for (img = 0; img < srcDepth; img++) {
+ const GLubyte *srcRow = srcImage;
+ GLubyte *dstRow = dstImage;
+ for (row = 0; row < srcHeight; row++) {
+ ctx->Driver.TextureMemCpy(dstRow, srcRow, bytesPerRow);
+ dstRow += dstRowStride;
+ srcRow += srcRowStride;
+ }
+ srcImage += srcImageStride;
+ dstImage += dstImageStride;
+ }
+ }
+#endif
+
+ GLint img, row;
+ for (img = 0; img < srcDepth; img++) {
+ const GLubyte *srcRow = srcImage;
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ ctx->Driver.TextureMemCpy(dstRow, srcRow, bytesPerRow);
+ dstRow += dstRowStride;
+ srcRow += srcRowStride;
+ }
+ srcImage += srcImageStride;
+ }
+}
+
+
+
+/**
+ * Store a 32-bit integer depth component texture image.
+ */
+static GLboolean
+_mesa_texstore_z32(TEXSTORE_PARAMS)
+{
+ const GLuint depthScale = 0xffffffff;
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ (void) dims;
+ ASSERT(dstFormat == MESA_FORMAT_Z32);
+ ASSERT(texelBytes == sizeof(GLuint));
+
+ if (ctx->Pixel.DepthScale == 1.0f &&
+ ctx->Pixel.DepthBias == 0.0f &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == GL_DEPTH_COMPONENT &&
+ srcFormat == GL_DEPTH_COMPONENT &&
+ srcType == GL_UNSIGNED_INT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ GLint img, row;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ const GLvoid *src = _mesa_image_address(dims, srcPacking,
+ srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
+ _mesa_unpack_depth_span(ctx, srcWidth,
+ GL_UNSIGNED_INT, (GLuint *) dstRow,
+ depthScale, srcType, src, srcPacking);
+ dstRow += dstRowStride;
+ }
+ }
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Store a 24-bit integer depth component texture image.
+ */
+static GLboolean
+_mesa_texstore_x8_z24(TEXSTORE_PARAMS)
+{
+ const GLuint depthScale = 0xffffff;
+ const GLuint texelBytes = 4;
+
+ (void) dims;
+ ASSERT(dstFormat == MESA_FORMAT_X8_Z24);
+
+ {
+ /* general path */
+ GLint img, row;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ const GLvoid *src = _mesa_image_address(dims, srcPacking,
+ srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
+ _mesa_unpack_depth_span(ctx, srcWidth,
+ GL_UNSIGNED_INT, (GLuint *) dstRow,
+ depthScale, srcType, src, srcPacking);
+ dstRow += dstRowStride;
+ }
+ }
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Store a 24-bit integer depth component texture image.
+ */
+static GLboolean
+_mesa_texstore_z24_x8(TEXSTORE_PARAMS)
+{
+ const GLuint depthScale = 0xffffff;
+ const GLuint texelBytes = 4;
+
+ (void) dims;
+ ASSERT(dstFormat == MESA_FORMAT_Z24_X8);
+
+ {
+ /* general path */
+ GLint img, row;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ const GLvoid *src = _mesa_image_address(dims, srcPacking,
+ srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
+ GLuint *dst = (GLuint *) dstRow;
+ GLint i;
+ _mesa_unpack_depth_span(ctx, srcWidth,
+ GL_UNSIGNED_INT, dst,
+ depthScale, srcType, src, srcPacking);
+ for (i = 0; i < srcWidth; i++)
+ dst[i] <<= 8;
+ dstRow += dstRowStride;
+ }
+ }
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Store a 16-bit integer depth component texture image.
+ */
+static GLboolean
+_mesa_texstore_z16(TEXSTORE_PARAMS)
+{
+ const GLuint depthScale = 0xffff;
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ (void) dims;
+ ASSERT(dstFormat == MESA_FORMAT_Z16);
+ ASSERT(texelBytes == sizeof(GLushort));
+
+ if (ctx->Pixel.DepthScale == 1.0f &&
+ ctx->Pixel.DepthBias == 0.0f &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == GL_DEPTH_COMPONENT &&
+ srcFormat == GL_DEPTH_COMPONENT &&
+ srcType == GL_UNSIGNED_SHORT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ GLint img, row;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ const GLvoid *src = _mesa_image_address(dims, srcPacking,
+ srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
+ GLushort *dst16 = (GLushort *) dstRow;
+ _mesa_unpack_depth_span(ctx, srcWidth,
+ GL_UNSIGNED_SHORT, dst16, depthScale,
+ srcType, src, srcPacking);
+ dstRow += dstRowStride;
+ }
+ }
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Store an rgb565 or rgb565_rev texture image.
+ */
+static GLboolean
+_mesa_texstore_rgb565(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGB565 ||
+ dstFormat == MESA_FORMAT_RGB565_REV);
+ ASSERT(texelBytes == 2);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ dstFormat == MESA_FORMAT_RGB565 &&
+ baseInternalFormat == GL_RGB &&
+ srcFormat == GL_RGB &&
+ srcType == GL_UNSIGNED_SHORT_5_6_5) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == GL_RGB &&
+ srcFormat == GL_RGB &&
+ srcType == GL_UNSIGNED_BYTE &&
+ dims == 2) {
+ /* do optimized tex store */
+ const GLint srcRowStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
+ const GLubyte *src = (const GLubyte *)
+ _mesa_image_address(dims, srcPacking, srcAddr, srcWidth, srcHeight,
+ srcFormat, srcType, 0, 0, 0);
+ GLubyte *dst = (GLubyte *) dstAddr
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ GLint row, col;
+ for (row = 0; row < srcHeight; row++) {
+ const GLubyte *srcUB = (const GLubyte *) src;
+ GLushort *dstUS = (GLushort *) dst;
+ /* check for byteswapped format */
+ if (dstFormat == MESA_FORMAT_RGB565) {
+ for (col = 0; col < srcWidth; col++) {
+ dstUS[col] = PACK_COLOR_565( srcUB[0], srcUB[1], srcUB[2] );
+ srcUB += 3;
+ }
+ }
+ else {
+ for (col = 0; col < srcWidth; col++) {
+ dstUS[col] = PACK_COLOR_565_REV( srcUB[0], srcUB[1], srcUB[2] );
+ srcUB += 3;
+ }
+ }
+ dst += dstRowStride;
+ src += srcRowStride;
+ }
+ }
+ else {
+ /* general path */
+ const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLchan *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLushort *dstUS = (GLushort *) dstRow;
+ /* check for byteswapped format */
+ if (dstFormat == MESA_FORMAT_RGB565) {
+ for (col = 0; col < srcWidth; col++) {
+ dstUS[col] = PACK_COLOR_565( CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]) );
+ src += 3;
+ }
+ }
+ else {
+ for (col = 0; col < srcWidth; col++) {
+ dstUS[col] = PACK_COLOR_565_REV( CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]) );
+ src += 3;
+ }
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Store a texture in MESA_FORMAT_RGBA8888 or MESA_FORMAT_RGBA8888_REV.
+ */
+static GLboolean
+_mesa_texstore_rgba8888(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA8888 ||
+ dstFormat == MESA_FORMAT_RGBA8888_REV);
+ ASSERT(texelBytes == 4);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ dstFormat == MESA_FORMAT_RGBA8888 &&
+ baseInternalFormat == GL_RGBA &&
+ ((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8) ||
+ (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && !littleEndian) ||
+ (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) ||
+ (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && littleEndian))) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ dstFormat == MESA_FORMAT_RGBA8888_REV &&
+ baseInternalFormat == GL_RGBA &&
+ ((srcFormat == GL_RGBA && srcType == GL_UNSIGNED_INT_8_8_8_8_REV) ||
+ (srcFormat == GL_RGBA && srcType == GL_UNSIGNED_BYTE && littleEndian) ||
+ (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_INT_8_8_8_8) ||
+ (srcFormat == GL_ABGR_EXT && srcType == GL_UNSIGNED_BYTE && !littleEndian))) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else if (!ctx->_ImageTransferState &&
+ (srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8 ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV) &&
+ can_swizzle(baseInternalFormat) &&
+ can_swizzle(srcFormat)) {
+
+ GLubyte dstmap[4];
+
+ /* dstmap - how to swizzle from RGBA to dst format:
+ */
+ if ((littleEndian && dstFormat == MESA_FORMAT_RGBA8888) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_RGBA8888_REV)) {
+ dstmap[3] = 0;
+ dstmap[2] = 1;
+ dstmap[1] = 2;
+ dstmap[0] = 3;
+ }
+ else {
+ dstmap[3] = 3;
+ dstmap[2] = 2;
+ dstmap[1] = 1;
+ dstmap[0] = 0;
+ }
+
+ _mesa_swizzle_ubyte_image(ctx, dims,
+ srcFormat,
+ srcType,
+ baseInternalFormat,
+ dstmap, 4,
+ dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcAddr,
+ srcPacking);
+ }
+ else {
+ /* general path */
+ const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLchan *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *dstUI = (GLuint *) dstRow;
+ if (dstFormat == MESA_FORMAT_RGBA8888) {
+ for (col = 0; col < srcWidth; col++) {
+ dstUI[col] = PACK_COLOR_8888( CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]),
+ CHAN_TO_UBYTE(src[ACOMP]) );
+ src += 4;
+ }
+ }
+ else {
+ for (col = 0; col < srcWidth; col++) {
+ dstUI[col] = PACK_COLOR_8888_REV( CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]),
+ CHAN_TO_UBYTE(src[ACOMP]) );
+ src += 4;
+ }
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+static GLboolean
+_mesa_texstore_argb8888(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = GL_RGBA;
+
+ ASSERT(dstFormat == MESA_FORMAT_ARGB8888 ||
+ dstFormat == MESA_FORMAT_ARGB8888_REV ||
+ dstFormat == MESA_FORMAT_XRGB8888 ||
+ dstFormat == MESA_FORMAT_XRGB8888_REV );
+ ASSERT(texelBytes == 4);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ (dstFormat == MESA_FORMAT_ARGB8888 ||
+ dstFormat == MESA_FORMAT_XRGB8888) &&
+ baseInternalFormat == GL_RGBA &&
+ srcFormat == GL_BGRA &&
+ ((srcType == GL_UNSIGNED_BYTE && littleEndian) ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV)) {
+ /* simple memcpy path (little endian) */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ (dstFormat == MESA_FORMAT_ARGB8888_REV ||
+ dstFormat == MESA_FORMAT_XRGB8888_REV) &&
+ baseInternalFormat == GL_RGBA &&
+ srcFormat == GL_BGRA &&
+ ((srcType == GL_UNSIGNED_BYTE && !littleEndian) ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8)) {
+ /* simple memcpy path (big endian) */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ (dstFormat == MESA_FORMAT_ARGB8888 ||
+ dstFormat == MESA_FORMAT_XRGB8888) &&
+ srcFormat == GL_RGB &&
+ (baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB) &&
+ srcType == GL_UNSIGNED_BYTE) {
+ int img, row, col;
+ for (img = 0; img < srcDepth; img++) {
+ const GLint srcRowStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
+ GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking,
+ srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *d4 = (GLuint *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ d4[col] = PACK_COLOR_8888(0xff,
+ srcRow[col * 3 + RCOMP],
+ srcRow[col * 3 + GCOMP],
+ srcRow[col * 3 + BCOMP]);
+ }
+ dstRow += dstRowStride;
+ srcRow += srcRowStride;
+ }
+ }
+ }
+ else if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ dstFormat == MESA_FORMAT_ARGB8888 &&
+ srcFormat == GL_RGBA &&
+ baseInternalFormat == GL_RGBA &&
+ srcType == GL_UNSIGNED_BYTE) {
+ /* same as above case, but src data has alpha too */
+ GLint img, row, col;
+ /* For some reason, streaming copies to write-combined regions
+ * are extremely sensitive to the characteristics of how the
+ * source data is retrieved. By reordering the source reads to
+ * be in-order, the speed of this operation increases by half.
+ * Strangely the same isn't required for the RGB path, above.
+ */
+ for (img = 0; img < srcDepth; img++) {
+ const GLint srcRowStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
+ GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking,
+ srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *d4 = (GLuint *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ d4[col] = PACK_COLOR_8888(srcRow[col * 4 + ACOMP],
+ srcRow[col * 4 + RCOMP],
+ srcRow[col * 4 + GCOMP],
+ srcRow[col * 4 + BCOMP]);
+ }
+ dstRow += dstRowStride;
+ srcRow += srcRowStride;
+ }
+ }
+ }
+ else if (!ctx->_ImageTransferState &&
+ (srcType == GL_UNSIGNED_BYTE ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8 ||
+ srcType == GL_UNSIGNED_INT_8_8_8_8_REV) &&
+ can_swizzle(baseInternalFormat) &&
+ can_swizzle(srcFormat)) {
+
+ GLubyte dstmap[4];
+
+ /* dstmap - how to swizzle from RGBA to dst format:
+ */
+ if ((littleEndian && dstFormat == MESA_FORMAT_ARGB8888) ||
+ (littleEndian && dstFormat == MESA_FORMAT_XRGB8888) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV)) {
+ dstmap[3] = 3; /* alpha */
+ dstmap[2] = 0; /* red */
+ dstmap[1] = 1; /* green */
+ dstmap[0] = 2; /* blue */
+ }
+ else {
+ assert((littleEndian && dstFormat == MESA_FORMAT_ARGB8888_REV) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_ARGB8888) ||
+ (littleEndian && dstFormat == MESA_FORMAT_XRGB8888_REV) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_XRGB8888));
+ dstmap[3] = 2;
+ dstmap[2] = 1;
+ dstmap[1] = 0;
+ dstmap[0] = 3;
+ }
+
+ _mesa_swizzle_ubyte_image(ctx, dims,
+ srcFormat,
+ srcType,
+ baseInternalFormat,
+ dstmap, 4,
+ dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcAddr,
+ srcPacking);
+ }
+ else {
+ /* general path */
+ const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLchan *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *dstUI = (GLuint *) dstRow;
+ if (dstFormat == MESA_FORMAT_ARGB8888) {
+ for (col = 0; col < srcWidth; col++) {
+ dstUI[col] = PACK_COLOR_8888( CHAN_TO_UBYTE(src[ACOMP]),
+ CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]) );
+ src += 4;
+ }
+ }
+ else if (dstFormat == MESA_FORMAT_XRGB8888) {
+ for (col = 0; col < srcWidth; col++) {
+ dstUI[col] = PACK_COLOR_8888( 0xff,
+ CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]) );
+ src += 4;
+ }
+ }
+ else {
+ for (col = 0; col < srcWidth; col++) {
+ dstUI[col] = PACK_COLOR_8888_REV( CHAN_TO_UBYTE(src[ACOMP]),
+ CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]) );
+ src += 4;
+ }
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+static GLboolean
+_mesa_texstore_rgb888(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGB888);
+ ASSERT(texelBytes == 3);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == GL_RGB &&
+ srcFormat == GL_BGR &&
+ srcType == GL_UNSIGNED_BYTE &&
+ littleEndian) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ srcFormat == GL_RGBA &&
+ srcType == GL_UNSIGNED_BYTE) {
+ /* extract RGB from RGBA */
+ GLint img, row, col;
+ for (img = 0; img < srcDepth; img++) {
+ const GLint srcRowStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
+ GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking,
+ srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ for (col = 0; col < srcWidth; col++) {
+ dstRow[col * 3 + 0] = srcRow[col * 4 + BCOMP];
+ dstRow[col * 3 + 1] = srcRow[col * 4 + GCOMP];
+ dstRow[col * 3 + 2] = srcRow[col * 4 + RCOMP];
+ }
+ dstRow += dstRowStride;
+ srcRow += srcRowStride;
+ }
+ }
+ }
+ else if (!ctx->_ImageTransferState &&
+ srcType == GL_UNSIGNED_BYTE &&
+ can_swizzle(baseInternalFormat) &&
+ can_swizzle(srcFormat)) {
+
+ GLubyte dstmap[4];
+
+ /* dstmap - how to swizzle from RGBA to dst format:
+ */
+ dstmap[0] = 2;
+ dstmap[1] = 1;
+ dstmap[2] = 0;
+ dstmap[3] = ONE; /* ? */
+
+ _mesa_swizzle_ubyte_image(ctx, dims,
+ srcFormat,
+ srcType,
+ baseInternalFormat,
+ dstmap, 3,
+ dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcAddr,
+ srcPacking);
+ }
+ else {
+ /* general path */
+ const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLchan *src = (const GLchan *) tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+#if 0
+ if (littleEndian) {
+ for (col = 0; col < srcWidth; col++) {
+ dstRow[col * 3 + 0] = CHAN_TO_UBYTE(src[RCOMP]);
+ dstRow[col * 3 + 1] = CHAN_TO_UBYTE(src[GCOMP]);
+ dstRow[col * 3 + 2] = CHAN_TO_UBYTE(src[BCOMP]);
+ srcUB += 3;
+ }
+ }
+ else {
+ for (col = 0; col < srcWidth; col++) {
+ dstRow[col * 3 + 0] = srcUB[BCOMP];
+ dstRow[col * 3 + 1] = srcUB[GCOMP];
+ dstRow[col * 3 + 2] = srcUB[RCOMP];
+ srcUB += 3;
+ }
+ }
+#else
+ for (col = 0; col < srcWidth; col++) {
+ dstRow[col * 3 + 0] = CHAN_TO_UBYTE(src[BCOMP]);
+ dstRow[col * 3 + 1] = CHAN_TO_UBYTE(src[GCOMP]);
+ dstRow[col * 3 + 2] = CHAN_TO_UBYTE(src[RCOMP]);
+ src += 3;
+ }
+#endif
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+static GLboolean
+_mesa_texstore_bgr888(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_BGR888);
+ ASSERT(texelBytes == 3);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == GL_RGB &&
+ srcFormat == GL_RGB &&
+ srcType == GL_UNSIGNED_BYTE &&
+ littleEndian) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ srcFormat == GL_RGBA &&
+ srcType == GL_UNSIGNED_BYTE) {
+ /* extract BGR from RGBA */
+ int img, row, col;
+ for (img = 0; img < srcDepth; img++) {
+ const GLint srcRowStride =
+ _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType);
+ GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking,
+ srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0);
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ for (col = 0; col < srcWidth; col++) {
+ dstRow[col * 3 + 0] = srcRow[col * 4 + RCOMP];
+ dstRow[col * 3 + 1] = srcRow[col * 4 + GCOMP];
+ dstRow[col * 3 + 2] = srcRow[col * 4 + BCOMP];
+ }
+ dstRow += dstRowStride;
+ srcRow += srcRowStride;
+ }
+ }
+ }
+ else if (!ctx->_ImageTransferState &&
+ srcType == GL_UNSIGNED_BYTE &&
+ can_swizzle(baseInternalFormat) &&
+ can_swizzle(srcFormat)) {
+
+ GLubyte dstmap[4];
+
+ /* dstmap - how to swizzle from RGBA to dst format:
+ */
+ dstmap[0] = 0;
+ dstmap[1] = 1;
+ dstmap[2] = 2;
+ dstmap[3] = ONE; /* ? */
+
+ _mesa_swizzle_ubyte_image(ctx, dims,
+ srcFormat,
+ srcType,
+ baseInternalFormat,
+ dstmap, 3,
+ dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcAddr,
+ srcPacking);
+ }
+ else {
+ /* general path */
+ const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLchan *src = (const GLchan *) tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ for (col = 0; col < srcWidth; col++) {
+ dstRow[col * 3 + 0] = CHAN_TO_UBYTE(src[RCOMP]);
+ dstRow[col * 3 + 1] = CHAN_TO_UBYTE(src[GCOMP]);
+ dstRow[col * 3 + 2] = CHAN_TO_UBYTE(src[BCOMP]);
+ src += 3;
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+static GLboolean
+_mesa_texstore_argb4444(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_ARGB4444 ||
+ dstFormat == MESA_FORMAT_ARGB4444_REV);
+ ASSERT(texelBytes == 2);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ dstFormat == MESA_FORMAT_ARGB4444 &&
+ baseInternalFormat == GL_RGBA &&
+ srcFormat == GL_BGRA &&
+ srcType == GL_UNSIGNED_SHORT_4_4_4_4_REV) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLchan *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLushort *dstUS = (GLushort *) dstRow;
+ if (dstFormat == MESA_FORMAT_ARGB4444) {
+ for (col = 0; col < srcWidth; col++) {
+ dstUS[col] = PACK_COLOR_4444( CHAN_TO_UBYTE(src[ACOMP]),
+ CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]) );
+ src += 4;
+ }
+ }
+ else {
+ for (col = 0; col < srcWidth; col++) {
+ dstUS[col] = PACK_COLOR_4444_REV( CHAN_TO_UBYTE(src[ACOMP]),
+ CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]) );
+ src += 4;
+ }
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+static GLboolean
+_mesa_texstore_rgba5551(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA5551);
+ ASSERT(texelBytes == 2);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ dstFormat == MESA_FORMAT_RGBA5551 &&
+ baseInternalFormat == GL_RGBA &&
+ srcFormat == GL_RGBA &&
+ srcType == GL_UNSIGNED_SHORT_5_5_5_1) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLchan *src =tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLushort *dstUS = (GLushort *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ dstUS[col] = PACK_COLOR_5551( CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]),
+ CHAN_TO_UBYTE(src[ACOMP]) );
+ src += 4;
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+static GLboolean
+_mesa_texstore_argb1555(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_ARGB1555 ||
+ dstFormat == MESA_FORMAT_ARGB1555_REV);
+ ASSERT(texelBytes == 2);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ dstFormat == MESA_FORMAT_ARGB1555 &&
+ baseInternalFormat == GL_RGBA &&
+ srcFormat == GL_BGRA &&
+ srcType == GL_UNSIGNED_SHORT_1_5_5_5_REV) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLchan *src =tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLushort *dstUS = (GLushort *) dstRow;
+ if (dstFormat == MESA_FORMAT_ARGB1555) {
+ for (col = 0; col < srcWidth; col++) {
+ dstUS[col] = PACK_COLOR_1555( CHAN_TO_UBYTE(src[ACOMP]),
+ CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]) );
+ src += 4;
+ }
+ }
+ else {
+ for (col = 0; col < srcWidth; col++) {
+ dstUS[col] = PACK_COLOR_1555_REV( CHAN_TO_UBYTE(src[ACOMP]),
+ CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]) );
+ src += 4;
+ }
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+static GLboolean
+_mesa_texstore_argb2101010(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_ARGB2101010);
+ ASSERT(texelBytes == 4);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ dstFormat == MESA_FORMAT_ARGB2101010 &&
+ srcFormat == GL_BGRA &&
+ srcType == GL_UNSIGNED_INT_2_10_10_10_REV &&
+ baseInternalFormat == GL_RGBA) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ if (baseInternalFormat == GL_RGBA) {
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *dstUI = (GLuint *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ GLushort a,r,g,b;
+
+ UNCLAMPED_FLOAT_TO_USHORT(a, src[ACOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(r, src[RCOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(g, src[GCOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(b, src[BCOMP]);
+ dstUI[col] = PACK_COLOR_2101010_US(a, r, g, b);
+ src += 4;
+ }
+ dstRow += dstRowStride;
+ }
+ } else if (baseInternalFormat == GL_RGB) {
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *dstUI = (GLuint *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ GLushort r,g,b;
+
+ UNCLAMPED_FLOAT_TO_USHORT(r, src[RCOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(g, src[GCOMP]);
+ UNCLAMPED_FLOAT_TO_USHORT(b, src[BCOMP]);
+ dstUI[col] = PACK_COLOR_2101010_US(0xffff, r, g, b);
+ src += 4;
+ }
+ dstRow += dstRowStride;
+ }
+ } else {
+ ASSERT(0);
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Do texstore for 2-channel, 4-bit/channel, unsigned normalized formats.
+ */
+static GLboolean
+_mesa_texstore_unorm44(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_AL44);
+ ASSERT(texelBytes == 1);
+
+ {
+ /* general path */
+ const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLchan *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLubyte *dstUS = (GLubyte *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ /* src[0] is luminance, src[1] is alpha */
+ dstUS[col] = PACK_COLOR_44( CHAN_TO_UBYTE(src[1]),
+ CHAN_TO_UBYTE(src[0]) );
+ src += 2;
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Do texstore for 2-channel, 8-bit/channel, unsigned normalized formats.
+ */
+static GLboolean
+_mesa_texstore_unorm88(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_AL88 ||
+ dstFormat == MESA_FORMAT_AL88_REV ||
+ dstFormat == MESA_FORMAT_RG88 ||
+ dstFormat == MESA_FORMAT_RG88_REV);
+ ASSERT(texelBytes == 2);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ (dstFormat == MESA_FORMAT_AL88 || dstFormat == MESA_FORMAT_RG88) &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_UNSIGNED_BYTE &&
+ littleEndian) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else if (!ctx->_ImageTransferState &&
+ littleEndian &&
+ srcType == GL_UNSIGNED_BYTE &&
+ can_swizzle(baseInternalFormat) &&
+ can_swizzle(srcFormat)) {
+ GLubyte dstmap[4];
+
+ /* dstmap - how to swizzle from RGBA to dst format:
+ */
+ if (dstFormat == MESA_FORMAT_AL88 || dstFormat == MESA_FORMAT_AL88_REV) {
+ if ((littleEndian && dstFormat == MESA_FORMAT_AL88) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_AL88_REV)) {
+ dstmap[0] = 0;
+ dstmap[1] = 3;
+ }
+ else {
+ dstmap[0] = 3;
+ dstmap[1] = 0;
+ }
+ }
+ else {
+ if ((littleEndian && dstFormat == MESA_FORMAT_RG88) ||
+ (!littleEndian && dstFormat == MESA_FORMAT_RG88_REV)) {
+ dstmap[0] = 0;
+ dstmap[1] = 1;
+ }
+ else {
+ dstmap[0] = 1;
+ dstmap[1] = 0;
+ }
+ }
+ dstmap[2] = ZERO; /* ? */
+ dstmap[3] = ONE; /* ? */
+
+ _mesa_swizzle_ubyte_image(ctx, dims,
+ srcFormat,
+ srcType,
+ baseInternalFormat,
+ dstmap, 2,
+ dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcAddr,
+ srcPacking);
+ }
+ else {
+ /* general path */
+ const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLchan *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLushort *dstUS = (GLushort *) dstRow;
+ if (dstFormat == MESA_FORMAT_AL88 ||
+ dstFormat == MESA_FORMAT_RG88) {
+ for (col = 0; col < srcWidth; col++) {
+ /* src[0] is luminance, src[1] is alpha */
+ dstUS[col] = PACK_COLOR_88( CHAN_TO_UBYTE(src[1]),
+ CHAN_TO_UBYTE(src[0]) );
+ src += 2;
+ }
+ }
+ else {
+ for (col = 0; col < srcWidth; col++) {
+ /* src[0] is luminance, src[1] is alpha */
+ dstUS[col] = PACK_COLOR_88_REV( CHAN_TO_UBYTE(src[1]),
+ CHAN_TO_UBYTE(src[0]) );
+ src += 2;
+ }
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Do texstore for 2-channel, 16-bit/channel, unsigned normalized formats.
+ */
+static GLboolean
+_mesa_texstore_unorm1616(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_AL1616 ||
+ dstFormat == MESA_FORMAT_AL1616_REV ||
+ dstFormat == MESA_FORMAT_RG1616 ||
+ dstFormat == MESA_FORMAT_RG1616_REV);
+ ASSERT(texelBytes == 4);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ (dstFormat == MESA_FORMAT_AL1616 || dstFormat == MESA_FORMAT_RG1616) &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_UNSIGNED_SHORT &&
+ littleEndian) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *dstUI = (GLuint *) dstRow;
+ if (dstFormat == MESA_FORMAT_AL1616 ||
+ dstFormat == MESA_FORMAT_RG1616) {
+ for (col = 0; col < srcWidth; col++) {
+ GLushort l, a;
+
+ UNCLAMPED_FLOAT_TO_USHORT(l, src[0]);
+ UNCLAMPED_FLOAT_TO_USHORT(a, src[1]);
+ dstUI[col] = PACK_COLOR_1616(a, l);
+ src += 2;
+ }
+ }
+ else {
+ for (col = 0; col < srcWidth; col++) {
+ GLushort l, a;
+
+ UNCLAMPED_FLOAT_TO_USHORT(l, src[0]);
+ UNCLAMPED_FLOAT_TO_USHORT(a, src[1]);
+ dstUI[col] = PACK_COLOR_1616_REV(a, l);
+ src += 2;
+ }
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/* Texstore for R16, A16, L16, I16. */
+static GLboolean
+_mesa_texstore_unorm16(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_R16 ||
+ dstFormat == MESA_FORMAT_A16 ||
+ dstFormat == MESA_FORMAT_L16 ||
+ dstFormat == MESA_FORMAT_I16);
+ ASSERT(texelBytes == 2);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_UNSIGNED_SHORT &&
+ littleEndian) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLushort *dstUS = (GLushort *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ GLushort r;
+
+ UNCLAMPED_FLOAT_TO_USHORT(r, src[0]);
+ dstUS[col] = r;
+ src += 1;
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+static GLboolean
+_mesa_texstore_rgba_16(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_16);
+ ASSERT(texelBytes == 8);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == GL_RGBA &&
+ srcFormat == GL_RGBA &&
+ srcType == GL_UNSIGNED_SHORT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLushort *dstUS = (GLushort *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ GLushort r, g, b, a;
+
+ UNCLAMPED_FLOAT_TO_USHORT(r, src[0]);
+ UNCLAMPED_FLOAT_TO_USHORT(g, src[1]);
+ UNCLAMPED_FLOAT_TO_USHORT(b, src[2]);
+ UNCLAMPED_FLOAT_TO_USHORT(a, src[3]);
+ dstUS[col*4+0] = r;
+ dstUS[col*4+1] = g;
+ dstUS[col*4+2] = b;
+ dstUS[col*4+3] = a;
+ src += 4;
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+static GLboolean
+_mesa_texstore_signed_rgba_16(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGB_16 ||
+ dstFormat == MESA_FORMAT_SIGNED_RGBA_16);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == GL_RGBA &&
+ dstFormat == MESA_FORMAT_SIGNED_RGBA_16 &&
+ srcFormat == GL_RGBA &&
+ srcType == GL_SHORT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *src = tempImage;
+ const GLuint comps = _mesa_get_format_bytes(dstFormat) / 2;
+ GLint img, row, col;
+
+ if (!tempImage)
+ return GL_FALSE;
+
+ /* Note: tempImage is always float[4] / RGBA. We convert to 1, 2,
+ * 3 or 4 components/pixel here.
+ */
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLshort *dstRowS = (GLshort *) dstRow;
+ if (dstFormat == MESA_FORMAT_SIGNED_RGBA_16) {
+ for (col = 0; col < srcWidth; col++) {
+ GLuint c;
+ for (c = 0; c < comps; c++) {
+ GLshort p;
+ UNCLAMPED_FLOAT_TO_SHORT(p, src[col * 4 + c]);
+ dstRowS[col * comps + c] = p;
+ }
+ }
+ dstRow += dstRowStride;
+ src += 4 * srcWidth;
+ } else {
+ for (col = 0; col < srcWidth; col++) {
+ GLuint c;
+ for (c = 0; c < comps; c++) {
+ GLshort p;
+ UNCLAMPED_FLOAT_TO_SHORT(p, src[col * 3 + c]);
+ dstRowS[col * comps + c] = p;
+ }
+ }
+ dstRow += dstRowStride;
+ src += 3 * srcWidth;
+ }
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+static GLboolean
+_mesa_texstore_rgb332(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGB332);
+ ASSERT(texelBytes == 1);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == GL_RGB &&
+ srcFormat == GL_RGB && srcType == GL_UNSIGNED_BYTE_3_3_2) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLchan *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ for (col = 0; col < srcWidth; col++) {
+ dstRow[col] = PACK_COLOR_332( CHAN_TO_UBYTE(src[RCOMP]),
+ CHAN_TO_UBYTE(src[GCOMP]),
+ CHAN_TO_UBYTE(src[BCOMP]) );
+ src += 3;
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Texstore for _mesa_texformat_a8, _mesa_texformat_l8, _mesa_texformat_i8.
+ */
+static GLboolean
+_mesa_texstore_unorm8(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_A8 ||
+ dstFormat == MESA_FORMAT_L8 ||
+ dstFormat == MESA_FORMAT_I8 ||
+ dstFormat == MESA_FORMAT_R8);
+ ASSERT(texelBytes == 1);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_UNSIGNED_BYTE) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else if (!ctx->_ImageTransferState &&
+ srcType == GL_UNSIGNED_BYTE &&
+ can_swizzle(baseInternalFormat) &&
+ can_swizzle(srcFormat)) {
+ GLubyte dstmap[4];
+
+ /* dstmap - how to swizzle from RGBA to dst format:
+ */
+ if (dstFormat == MESA_FORMAT_A8) {
+ dstmap[0] = 3;
+ }
+ else {
+ dstmap[0] = 0;
+ }
+ dstmap[1] = ZERO; /* ? */
+ dstmap[2] = ZERO; /* ? */
+ dstmap[3] = ONE; /* ? */
+
+ _mesa_swizzle_ubyte_image(ctx, dims,
+ srcFormat,
+ srcType,
+ baseInternalFormat,
+ dstmap, 1,
+ dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcAddr,
+ srcPacking);
+ }
+ else {
+ /* general path */
+ const GLchan *tempImage = _mesa_make_temp_chan_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking);
+ const GLchan *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ for (col = 0; col < srcWidth; col++) {
+ dstRow[col] = CHAN_TO_UBYTE(src[col]);
+ }
+ dstRow += dstRowStride;
+ src += srcWidth;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+
+static GLboolean
+_mesa_texstore_ci8(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+
+ (void) dims; (void) baseInternalFormat;
+ ASSERT(dstFormat == MESA_FORMAT_CI8);
+ ASSERT(texelBytes == 1);
+ ASSERT(baseInternalFormat == GL_COLOR_INDEX);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ srcFormat == GL_COLOR_INDEX &&
+ srcType == GL_UNSIGNED_BYTE) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ GLint img, row;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ const GLvoid *src = _mesa_image_address(dims, srcPacking,
+ srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, row, 0);
+ _mesa_unpack_index_span(ctx, srcWidth, GL_UNSIGNED_BYTE, dstRow,
+ srcType, src, srcPacking,
+ ctx->_ImageTransferState);
+ dstRow += dstRowStride;
+ }
+ }
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Texstore for _mesa_texformat_ycbcr or _mesa_texformat_ycbcr_REV.
+ */
+static GLboolean
+_mesa_texstore_ycbcr(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+
+ (void) ctx; (void) dims; (void) baseInternalFormat;
+
+ ASSERT((dstFormat == MESA_FORMAT_YCBCR) ||
+ (dstFormat == MESA_FORMAT_YCBCR_REV));
+ ASSERT(texelBytes == 2);
+ ASSERT(ctx->Extensions.MESA_ycbcr_texture);
+ ASSERT(srcFormat == GL_YCBCR_MESA);
+ ASSERT((srcType == GL_UNSIGNED_SHORT_8_8_MESA) ||
+ (srcType == GL_UNSIGNED_SHORT_8_8_REV_MESA));
+ ASSERT(baseInternalFormat == GL_YCBCR_MESA);
+
+ /* always just memcpy since no pixel transfer ops apply */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+
+ /* Check if we need byte swapping */
+ /* XXX the logic here _might_ be wrong */
+ if (srcPacking->SwapBytes ^
+ (srcType == GL_UNSIGNED_SHORT_8_8_REV_MESA) ^
+ (dstFormat == MESA_FORMAT_YCBCR_REV) ^
+ !littleEndian) {
+ GLint img, row;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ _mesa_swap2((GLushort *) dstRow, srcWidth);
+ dstRow += dstRowStride;
+ }
+ }
+ }
+ return GL_TRUE;
+}
+
+static GLboolean
+_mesa_texstore_dudv8(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_DUDV8);
+ ASSERT(texelBytes == 2);
+ ASSERT(ctx->Extensions.ATI_envmap_bumpmap);
+ ASSERT((srcFormat == GL_DU8DV8_ATI) ||
+ (srcFormat == GL_DUDV_ATI));
+ ASSERT(baseInternalFormat == GL_DUDV_ATI);
+
+ if (!srcPacking->SwapBytes && srcType == GL_BYTE &&
+ littleEndian) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else if (srcType == GL_BYTE) {
+ GLubyte dstmap[4];
+
+ /* dstmap - how to swizzle from RGBA to dst format:
+ */
+ if (littleEndian) {
+ dstmap[0] = 0;
+ dstmap[1] = 3;
+ }
+ else {
+ dstmap[0] = 3;
+ dstmap[1] = 0;
+ }
+ dstmap[2] = ZERO; /* ? */
+ dstmap[3] = ONE; /* ? */
+
+ _mesa_swizzle_ubyte_image(ctx, dims,
+ GL_LUMINANCE_ALPHA, /* hack */
+ GL_UNSIGNED_BYTE, /* hack */
+ GL_LUMINANCE_ALPHA, /* hack */
+ dstmap, 2,
+ dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcAddr,
+ srcPacking);
+ }
+ else {
+ /* general path - note this is defined for 2d textures only */
+ const GLint components = _mesa_components_in_format(baseInternalFormat);
+ const GLint srcStride = _mesa_image_row_stride(srcPacking, srcWidth,
+ srcFormat, srcType);
+ GLbyte *tempImage, *dst, *src;
+ GLint row;
+
+ tempImage = (GLbyte *) malloc(srcWidth * srcHeight * srcDepth
+ * components * sizeof(GLbyte));
+ if (!tempImage)
+ return GL_FALSE;
+
+ src = (GLbyte *) _mesa_image_address(dims, srcPacking, srcAddr,
+ srcWidth, srcHeight,
+ srcFormat, srcType,
+ 0, 0, 0);
+
+ dst = tempImage;
+ for (row = 0; row < srcHeight; row++) {
+ _mesa_unpack_dudv_span_byte(ctx, srcWidth, baseInternalFormat,
+ dst, srcFormat, srcType, src,
+ srcPacking, 0);
+ dst += srcWidth * components;
+ src += srcStride;
+ }
+
+ src = tempImage;
+ dst = (GLbyte *) dstAddr
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ memcpy(dst, src, srcWidth * texelBytes);
+ dst += dstRowStride;
+ src += srcWidth * texelBytes;
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Store a texture in a signed normalized 8-bit format.
+ */
+static GLboolean
+_mesa_texstore_snorm8(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_A8 ||
+ dstFormat == MESA_FORMAT_SIGNED_L8 ||
+ dstFormat == MESA_FORMAT_SIGNED_I8 ||
+ dstFormat == MESA_FORMAT_SIGNED_R8);
+ ASSERT(texelBytes == 1);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_BYTE) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLbyte *dstRow = (GLbyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ for (col = 0; col < srcWidth; col++) {
+ dstRow[col] = FLOAT_TO_BYTE_TEX(src[col]);
+ }
+ dstRow += dstRowStride;
+ src += srcWidth;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Store a texture in a signed normalized two-channel 16-bit format.
+ */
+static GLboolean
+_mesa_texstore_snorm88(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_AL88 ||
+ dstFormat == MESA_FORMAT_SIGNED_RG88_REV);
+ ASSERT(texelBytes == 2);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_BYTE &&
+ littleEndian) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLbyte *dstRow = (GLbyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLbyte *dst = dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ dst[0] = FLOAT_TO_BYTE_TEX(src[0]);
+ dst[1] = FLOAT_TO_BYTE_TEX(src[1]);
+ src += 2;
+ dst += 2;
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+/* Texstore for signed R16, A16, L16, I16. */
+static GLboolean
+_mesa_texstore_snorm16(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_R16 ||
+ dstFormat == MESA_FORMAT_SIGNED_A16 ||
+ dstFormat == MESA_FORMAT_SIGNED_L16 ||
+ dstFormat == MESA_FORMAT_SIGNED_I16);
+ ASSERT(texelBytes == 2);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_SHORT &&
+ littleEndian) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLshort *dstUS = (GLshort *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ GLushort r;
+
+ UNCLAMPED_FLOAT_TO_SHORT(r, src[0]);
+ dstUS[col] = r;
+ src += 1;
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+/**
+ * Do texstore for 2-channel, 16-bit/channel, signed normalized formats.
+ */
+static GLboolean
+_mesa_texstore_snorm1616(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_AL1616 ||
+ dstFormat == MESA_FORMAT_SIGNED_GR1616);
+ ASSERT(texelBytes == 4);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_SHORT &&
+ littleEndian) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *src = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLshort *dst = (GLshort *) dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ GLushort l, a;
+
+ UNCLAMPED_FLOAT_TO_SHORT(l, src[0]);
+ UNCLAMPED_FLOAT_TO_SHORT(a, src[1]);
+ dst[0] = l;
+ dst[1] = a;
+ src += 2;
+ dst += 2;
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+/**
+ * Store a texture in MESA_FORMAT_SIGNED_RGBX8888.
+ */
+static GLboolean
+_mesa_texstore_signed_rgbx8888(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBX8888);
+ ASSERT(texelBytes == 4);
+
+ {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *srcRow = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLbyte *dstRow = (GLbyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLbyte *dst = dstRow;
+ for (col = 0; col < srcWidth; col++) {
+ dst[3] = FLOAT_TO_BYTE_TEX(srcRow[RCOMP]);
+ dst[2] = FLOAT_TO_BYTE_TEX(srcRow[GCOMP]);
+ dst[1] = FLOAT_TO_BYTE_TEX(srcRow[BCOMP]);
+ dst[0] = 127;
+ srcRow += 3;
+ dst += 4;
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+
+/**
+ * Store a texture in MESA_FORMAT_SIGNED_RGBA8888 or
+ * MESA_FORMAT_SIGNED_RGBA8888_REV
+ */
+static GLboolean
+_mesa_texstore_signed_rgba8888(TEXSTORE_PARAMS)
+{
+ const GLboolean littleEndian = _mesa_little_endian();
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_SIGNED_RGBA8888 ||
+ dstFormat == MESA_FORMAT_SIGNED_RGBA8888_REV);
+ ASSERT(texelBytes == 4);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ dstFormat == MESA_FORMAT_SIGNED_RGBA8888 &&
+ baseInternalFormat == GL_RGBA &&
+ ((srcFormat == GL_RGBA && srcType == GL_BYTE && !littleEndian) ||
+ (srcFormat == GL_ABGR_EXT && srcType == GL_BYTE && littleEndian))) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ dstFormat == MESA_FORMAT_SIGNED_RGBA8888_REV &&
+ baseInternalFormat == GL_RGBA &&
+ ((srcFormat == GL_RGBA && srcType == GL_BYTE && littleEndian) ||
+ (srcFormat == GL_ABGR_EXT && srcType == GL_BYTE && !littleEndian))) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *srcRow = tempImage;
+ GLint img, row, col;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLbyte *dstRow = (GLbyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLbyte *dst = dstRow;
+ if (dstFormat == MESA_FORMAT_SIGNED_RGBA8888) {
+ for (col = 0; col < srcWidth; col++) {
+ dst[3] = FLOAT_TO_BYTE_TEX(srcRow[RCOMP]);
+ dst[2] = FLOAT_TO_BYTE_TEX(srcRow[GCOMP]);
+ dst[1] = FLOAT_TO_BYTE_TEX(srcRow[BCOMP]);
+ dst[0] = FLOAT_TO_BYTE_TEX(srcRow[ACOMP]);
+ srcRow += 4;
+ dst += 4;
+ }
+ }
+ else {
+ for (col = 0; col < srcWidth; col++) {
+ dst[0] = FLOAT_TO_BYTE_TEX(srcRow[RCOMP]);
+ dst[1] = FLOAT_TO_BYTE_TEX(srcRow[GCOMP]);
+ dst[2] = FLOAT_TO_BYTE_TEX(srcRow[BCOMP]);
+ dst[3] = FLOAT_TO_BYTE_TEX(srcRow[ACOMP]);
+ srcRow += 4;
+ dst += 4;
+ }
+ }
+ dstRow += dstRowStride;
+ }
+ }
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Store a combined depth/stencil texture image.
+ */
+static GLboolean
+_mesa_texstore_z24_s8(TEXSTORE_PARAMS)
+{
+ const GLuint depthScale = 0xffffff;
+ const GLint srcRowStride
+ = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType)
+ / sizeof(GLuint);
+ GLint img, row;
+
+ ASSERT(dstFormat == MESA_FORMAT_Z24_S8);
+ ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT || srcFormat == GL_DEPTH_COMPONENT);
+ ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT || srcType == GL_UNSIGNED_INT_24_8_EXT);
+
+ if (srcFormat != GL_DEPTH_COMPONENT && ctx->Pixel.DepthScale == 1.0f &&
+ ctx->Pixel.DepthBias == 0.0f &&
+ !srcPacking->SwapBytes) {
+ /* simple path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else if (srcFormat == GL_DEPTH_COMPONENT) {
+ /* In case we only upload depth we need to preserve the stencil */
+ for (img = 0; img < srcDepth; img++) {
+ GLuint *dstRow = (GLuint *) dstAddr
+ + dstImageOffsets[dstZoffset + img]
+ + dstYoffset * dstRowStride / sizeof(GLuint)
+ + dstXoffset;
+ const GLuint *src
+ = (const GLuint *) _mesa_image_address(dims, srcPacking, srcAddr,
+ srcWidth, srcHeight,
+ srcFormat, srcType,
+ img, 0, 0);
+ for (row = 0; row < srcHeight; row++) {
+ GLuint depth[MAX_WIDTH];
+ GLubyte stencil[MAX_WIDTH];
+ GLint i;
+ GLboolean keepdepth = GL_FALSE, keepstencil = GL_FALSE;
+
+ if (srcFormat == GL_DEPTH_COMPONENT) { /* preserve stencil */
+ keepstencil = GL_TRUE;
+ }
+ else if (srcFormat == GL_STENCIL_INDEX) { /* preserve depth */
+ keepdepth = GL_TRUE;
+ }
+
+ if (keepdepth == GL_FALSE)
+ /* the 24 depth bits will be in the low position: */
+ _mesa_unpack_depth_span(ctx, srcWidth,
+ GL_UNSIGNED_INT, /* dst type */
+ keepstencil ? depth : dstRow, /* dst addr */
+ depthScale,
+ srcType, src, srcPacking);
+
+ if (keepstencil == GL_FALSE)
+ /* get the 8-bit stencil values */
+ _mesa_unpack_stencil_span(ctx, srcWidth,
+ GL_UNSIGNED_BYTE, /* dst type */
+ stencil, /* dst addr */
+ srcType, src, srcPacking,
+ ctx->_ImageTransferState);
+
+ for (i = 0; i < srcWidth; i++) {
+ if (keepstencil)
+ dstRow[i] = depth[i] << 8 | (dstRow[i] & 0x000000FF);
+ else
+ dstRow[i] = (dstRow[i] & 0xFFFFFF00) | (stencil[i] & 0xFF);
+ }
+
+ src += srcRowStride;
+ dstRow += dstRowStride / sizeof(GLuint);
+ }
+ }
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Store a combined depth/stencil texture image.
+ */
+static GLboolean
+_mesa_texstore_s8_z24(TEXSTORE_PARAMS)
+{
+ const GLuint depthScale = 0xffffff;
+ const GLint srcRowStride
+ = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType)
+ / sizeof(GLuint);
+ GLint img, row;
+
+ ASSERT(dstFormat == MESA_FORMAT_S8_Z24);
+ ASSERT(srcFormat == GL_DEPTH_STENCIL_EXT ||
+ srcFormat == GL_DEPTH_COMPONENT ||
+ srcFormat == GL_STENCIL_INDEX);
+ ASSERT(srcFormat != GL_DEPTH_STENCIL_EXT ||
+ srcType == GL_UNSIGNED_INT_24_8_EXT);
+
+ for (img = 0; img < srcDepth; img++) {
+ GLuint *dstRow = (GLuint *) dstAddr
+ + dstImageOffsets[dstZoffset + img]
+ + dstYoffset * dstRowStride / sizeof(GLuint)
+ + dstXoffset;
+ const GLuint *src
+ = (const GLuint *) _mesa_image_address(dims, srcPacking, srcAddr,
+ srcWidth, srcHeight,
+ srcFormat, srcType,
+ img, 0, 0);
+ for (row = 0; row < srcHeight; row++) {
+ GLuint depth[MAX_WIDTH];
+ GLubyte stencil[MAX_WIDTH];
+ GLint i;
+ GLboolean keepdepth = GL_FALSE, keepstencil = GL_FALSE;
+
+ if (srcFormat == GL_DEPTH_COMPONENT) { /* preserve stencil */
+ keepstencil = GL_TRUE;
+ }
+ else if (srcFormat == GL_STENCIL_INDEX) { /* preserve depth */
+ keepdepth = GL_TRUE;
+ }
+
+ if (keepdepth == GL_FALSE)
+ /* the 24 depth bits will be in the low position: */
+ _mesa_unpack_depth_span(ctx, srcWidth,
+ GL_UNSIGNED_INT, /* dst type */
+ keepstencil ? depth : dstRow, /* dst addr */
+ depthScale,
+ srcType, src, srcPacking);
+
+ if (keepstencil == GL_FALSE)
+ /* get the 8-bit stencil values */
+ _mesa_unpack_stencil_span(ctx, srcWidth,
+ GL_UNSIGNED_BYTE, /* dst type */
+ stencil, /* dst addr */
+ srcType, src, srcPacking,
+ ctx->_ImageTransferState);
+
+ /* merge stencil values into depth values */
+ for (i = 0; i < srcWidth; i++) {
+ if (keepstencil)
+ dstRow[i] = depth[i] | (dstRow[i] & 0xFF000000);
+ else
+ dstRow[i] = (dstRow[i] & 0xFFFFFF) | (stencil[i] << 24);
+
+ }
+ src += srcRowStride;
+ dstRow += dstRowStride / sizeof(GLuint);
+ }
+ }
+ return GL_TRUE;
+}
+
+
+/**
+ * Store simple 8-bit/value stencil texture data.
+ */
+static GLboolean
+_mesa_texstore_s8(TEXSTORE_PARAMS)
+{
+ ASSERT(dstFormat == MESA_FORMAT_S8);
+ ASSERT(srcFormat == GL_STENCIL_INDEX);
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_UNSIGNED_BYTE) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ const GLint srcRowStride
+ = _mesa_image_row_stride(srcPacking, srcWidth, srcFormat, srcType)
+ / sizeof(GLuint);
+ GLint img, row;
+
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img]
+ + dstYoffset * dstRowStride / sizeof(GLuint)
+ + dstXoffset;
+ const GLuint *src
+ = (const GLuint *) _mesa_image_address(dims, srcPacking, srcAddr,
+ srcWidth, srcHeight,
+ srcFormat, srcType,
+ img, 0, 0);
+ for (row = 0; row < srcHeight; row++) {
+ GLubyte stencil[MAX_WIDTH];
+ GLint i;
+
+ /* get the 8-bit stencil values */
+ _mesa_unpack_stencil_span(ctx, srcWidth,
+ GL_UNSIGNED_BYTE, /* dst type */
+ stencil, /* dst addr */
+ srcType, src, srcPacking,
+ ctx->_ImageTransferState);
+ /* merge stencil values into depth values */
+ for (i = 0; i < srcWidth; i++)
+ dstRow[i] = stencil[i];
+
+ src += srcRowStride;
+ dstRow += dstRowStride / sizeof(GLubyte);
+ }
+ }
+
+ }
+
+ return GL_TRUE;
+}
+
+
+/**
+ * Store an image in any of the formats:
+ * _mesa_texformat_rgba_float32
+ * _mesa_texformat_rgb_float32
+ * _mesa_texformat_alpha_float32
+ * _mesa_texformat_luminance_float32
+ * _mesa_texformat_luminance_alpha_float32
+ * _mesa_texformat_intensity_float32
+ */
+static GLboolean
+_mesa_texstore_rgba_float32(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_FLOAT32 ||
+ dstFormat == MESA_FORMAT_RGB_FLOAT32 ||
+ dstFormat == MESA_FORMAT_ALPHA_FLOAT32 ||
+ dstFormat == MESA_FORMAT_LUMINANCE_FLOAT32 ||
+ dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32 ||
+ dstFormat == MESA_FORMAT_INTENSITY_FLOAT32);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLfloat));
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_FLOAT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *srcRow = tempImage;
+ GLint bytesPerRow;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ bytesPerRow = srcWidth * components * sizeof(GLfloat);
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ memcpy(dstRow, srcRow, bytesPerRow);
+ dstRow += dstRowStride;
+ srcRow += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+
+/**
+ * As above, but store 16-bit floats.
+ */
+static GLboolean
+_mesa_texstore_rgba_float16(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_FLOAT16 ||
+ dstFormat == MESA_FORMAT_RGB_FLOAT16 ||
+ dstFormat == MESA_FORMAT_ALPHA_FLOAT16 ||
+ dstFormat == MESA_FORMAT_LUMINANCE_FLOAT16 ||
+ dstFormat == MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16 ||
+ dstFormat == MESA_FORMAT_INTENSITY_FLOAT16);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLhalfARB));
+
+ if (!ctx->_ImageTransferState &&
+ !srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_HALF_FLOAT_ARB) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking,
+ ctx->_ImageTransferState);
+ const GLfloat *src = tempImage;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLhalfARB *dstTexel = (GLhalfARB *) dstRow;
+ GLint i;
+ for (i = 0; i < srcWidth * components; i++) {
+ dstTexel[i] = _mesa_float_to_half(src[i]);
+ }
+ dstRow += dstRowStride;
+ src += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/* non-normalized, signed int8 */
+static GLboolean
+_mesa_texstore_rgba_int8(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_INT8);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLbyte));
+
+ /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
+ * to integer formats.
+ */
+ if (!srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_BYTE) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking, 0x0);
+ const GLfloat *src = tempImage;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLbyte *dstTexel = (GLbyte *) dstRow;
+ GLint i;
+ for (i = 0; i < srcWidth * components; i++) {
+ dstTexel[i] = (GLbyte) src[i];
+ }
+ dstRow += dstRowStride;
+ src += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/* non-normalized, signed int16 */
+static GLboolean
+_mesa_texstore_rgba_int16(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_INT16);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLshort));
+
+ /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
+ * to integer formats.
+ */
+ if (!srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_SHORT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking, 0x0);
+ const GLfloat *src = tempImage;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLshort *dstTexel = (GLshort *) dstRow;
+ GLint i;
+ for (i = 0; i < srcWidth * components; i++) {
+ dstTexel[i] = (GLint) src[i];
+ }
+ dstRow += dstRowStride;
+ src += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/* non-normalized, signed int32 */
+static GLboolean
+_mesa_texstore_rgba_int32(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_INT32);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLint));
+
+ /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
+ * to integer formats.
+ */
+ if (!srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_INT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLfloat *tempImage = _mesa_make_temp_float_image(ctx, dims,
+ baseInternalFormat,
+ baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr,
+ srcPacking, 0x0);
+ const GLfloat *src = tempImage;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLint *dstTexel = (GLint *) dstRow;
+ GLint i;
+ for (i = 0; i < srcWidth * components; i++) {
+ dstTexel[i] = (GLint) src[i];
+ }
+ dstRow += dstRowStride;
+ src += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/* non-normalized, unsigned int8 */
+static GLboolean
+_mesa_texstore_rgba_uint8(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_UINT8);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLubyte));
+
+ /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
+ * to integer formats.
+ */
+ if (!srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_UNSIGNED_BYTE) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLuint *tempImage =
+ make_temp_uint_image(ctx, dims, baseInternalFormat, baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr, srcPacking);
+ const GLuint *src = tempImage;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLubyte *dstTexel = (GLubyte *) dstRow;
+ GLint i;
+ for (i = 0; i < srcWidth * components; i++) {
+ dstTexel[i] = (GLubyte) CLAMP(src[i], 0, 0xff);
+ }
+ dstRow += dstRowStride;
+ src += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/* non-normalized, unsigned int16 */
+static GLboolean
+_mesa_texstore_rgba_uint16(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_UINT16);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLushort));
+
+ /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
+ * to integer formats.
+ */
+ if (!srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_UNSIGNED_SHORT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLuint *tempImage =
+ make_temp_uint_image(ctx, dims, baseInternalFormat, baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr, srcPacking);
+ const GLuint *src = tempImage;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLushort *dstTexel = (GLushort *) dstRow;
+ GLint i;
+ for (i = 0; i < srcWidth * components; i++) {
+ dstTexel[i] = (GLushort) CLAMP(src[i], 0, 0xffff);
+ }
+ dstRow += dstRowStride;
+ src += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+/* non-normalized, unsigned int32 */
+static GLboolean
+_mesa_texstore_rgba_uint32(TEXSTORE_PARAMS)
+{
+ const GLuint texelBytes = _mesa_get_format_bytes(dstFormat);
+ const GLenum baseFormat = _mesa_get_format_base_format(dstFormat);
+ const GLint components = _mesa_components_in_format(baseFormat);
+
+ ASSERT(dstFormat == MESA_FORMAT_RGBA_UINT32);
+ ASSERT(baseInternalFormat == GL_RGBA ||
+ baseInternalFormat == GL_RGB ||
+ baseInternalFormat == GL_ALPHA ||
+ baseInternalFormat == GL_LUMINANCE ||
+ baseInternalFormat == GL_LUMINANCE_ALPHA ||
+ baseInternalFormat == GL_INTENSITY);
+ ASSERT(texelBytes == components * sizeof(GLuint));
+
+ /* Note: Pixel transfer ops (scale, bias, table lookup) do not apply
+ * to integer formats.
+ */
+ if (!srcPacking->SwapBytes &&
+ baseInternalFormat == srcFormat &&
+ srcType == GL_UNSIGNED_INT) {
+ /* simple memcpy path */
+ memcpy_texture(ctx, dims,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride,
+ dstImageOffsets,
+ srcWidth, srcHeight, srcDepth, srcFormat, srcType,
+ srcAddr, srcPacking);
+ }
+ else {
+ /* general path */
+ const GLuint *tempImage =
+ make_temp_uint_image(ctx, dims, baseInternalFormat, baseFormat,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr, srcPacking);
+ const GLuint *src = tempImage;
+ GLint img, row;
+ if (!tempImage)
+ return GL_FALSE;
+ for (img = 0; img < srcDepth; img++) {
+ GLubyte *dstRow = (GLubyte *) dstAddr
+ + dstImageOffsets[dstZoffset + img] * texelBytes
+ + dstYoffset * dstRowStride
+ + dstXoffset * texelBytes;
+ for (row = 0; row < srcHeight; row++) {
+ GLuint *dstTexel = (GLuint *) dstRow;
+ GLint i;
+ for (i = 0; i < srcWidth * components; i++) {
+ dstTexel[i] = src[i];
+ }
+ dstRow += dstRowStride;
+ src += srcWidth * components;
+ }
+ }
+
+ free((void *) tempImage);
+ }
+ return GL_TRUE;
+}
+
+
+
+
+#if FEATURE_EXT_texture_sRGB
+static GLboolean
+_mesa_texstore_srgb8(TEXSTORE_PARAMS)
+{
+ gl_format newDstFormat;
+ GLboolean k;
+
+ ASSERT(dstFormat == MESA_FORMAT_SRGB8);
+
+ /* reuse normal rgb texstore code */
+ newDstFormat = MESA_FORMAT_RGB888;
+
+ k = _mesa_texstore_rgb888(ctx, dims, baseInternalFormat,
+ newDstFormat, dstAddr,
+ dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType,
+ srcAddr, srcPacking);
+ return k;
+}
+
+
+static GLboolean
+_mesa_texstore_srgba8(TEXSTORE_PARAMS)
+{
+ gl_format newDstFormat;
+ GLboolean k;
+
+ ASSERT(dstFormat == MESA_FORMAT_SRGBA8);
+
+ /* reuse normal rgba texstore code */
+ newDstFormat = MESA_FORMAT_RGBA8888;
+ k = _mesa_texstore_rgba8888(ctx, dims, baseInternalFormat,
+ newDstFormat, dstAddr,
+ dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType,
+ srcAddr, srcPacking);
+ return k;
+}
+
+
+static GLboolean
+_mesa_texstore_sargb8(TEXSTORE_PARAMS)
+{
+ gl_format newDstFormat;
+ GLboolean k;
+
+ ASSERT(dstFormat == MESA_FORMAT_SARGB8);
+
+ /* reuse normal rgba texstore code */
+ newDstFormat = MESA_FORMAT_ARGB8888;
+
+ k = _mesa_texstore_argb8888(ctx, dims, baseInternalFormat,
+ newDstFormat, dstAddr,
+ dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType,
+ srcAddr, srcPacking);
+ return k;
+}
+
+
+static GLboolean
+_mesa_texstore_sl8(TEXSTORE_PARAMS)
+{
+ gl_format newDstFormat;
+ GLboolean k;
+
+ ASSERT(dstFormat == MESA_FORMAT_SL8);
+
+ newDstFormat = MESA_FORMAT_L8;
+
+ /* _mesa_textore_a8 handles luminance8 too */
+ k = _mesa_texstore_unorm8(ctx, dims, baseInternalFormat,
+ newDstFormat, dstAddr,
+ dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType,
+ srcAddr, srcPacking);
+ return k;
+}
+
+
+static GLboolean
+_mesa_texstore_sla8(TEXSTORE_PARAMS)
+{
+ gl_format newDstFormat;
+ GLboolean k;
+
+ ASSERT(dstFormat == MESA_FORMAT_SLA8);
+
+ /* reuse normal luminance/alpha texstore code */
+ newDstFormat = MESA_FORMAT_AL88;
+
+ k = _mesa_texstore_unorm88(ctx, dims, baseInternalFormat,
+ newDstFormat, dstAddr,
+ dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType,
+ srcAddr, srcPacking);
+ return k;
+}
+
+#else
+
+/* these are used only in texstore_funcs[] below */
+#define _mesa_texstore_srgb8 NULL
+#define _mesa_texstore_srgba8 NULL
+#define _mesa_texstore_sargb8 NULL
+#define _mesa_texstore_sl8 NULL
+#define _mesa_texstore_sla8 NULL
+
+#endif /* FEATURE_EXT_texture_sRGB */
+
+
+
+
+/**
+ * Table mapping MESA_FORMAT_* to _mesa_texstore_*()
+ * XXX this is somewhat temporary.
+ */
+static const struct {
+ gl_format Name;
+ StoreTexImageFunc Store;
+}
+texstore_funcs[MESA_FORMAT_COUNT] =
+{
+ { MESA_FORMAT_NONE, NULL },
+ { MESA_FORMAT_RGBA8888, _mesa_texstore_rgba8888 },
+ { MESA_FORMAT_RGBA8888_REV, _mesa_texstore_rgba8888 },
+ { MESA_FORMAT_ARGB8888, _mesa_texstore_argb8888 },
+ { MESA_FORMAT_ARGB8888_REV, _mesa_texstore_argb8888 },
+ { MESA_FORMAT_XRGB8888, _mesa_texstore_argb8888 },
+ { MESA_FORMAT_XRGB8888_REV, _mesa_texstore_argb8888 },
+ { MESA_FORMAT_RGB888, _mesa_texstore_rgb888 },
+ { MESA_FORMAT_BGR888, _mesa_texstore_bgr888 },
+ { MESA_FORMAT_RGB565, _mesa_texstore_rgb565 },
+ { MESA_FORMAT_RGB565_REV, _mesa_texstore_rgb565 },
+ { MESA_FORMAT_ARGB4444, _mesa_texstore_argb4444 },
+ { MESA_FORMAT_ARGB4444_REV, _mesa_texstore_argb4444 },
+ { MESA_FORMAT_RGBA5551, _mesa_texstore_rgba5551 },
+ { MESA_FORMAT_ARGB1555, _mesa_texstore_argb1555 },
+ { MESA_FORMAT_ARGB1555_REV, _mesa_texstore_argb1555 },
+ { MESA_FORMAT_AL44, _mesa_texstore_unorm44 },
+ { MESA_FORMAT_AL88, _mesa_texstore_unorm88 },
+ { MESA_FORMAT_AL88_REV, _mesa_texstore_unorm88 },
+ { MESA_FORMAT_AL1616, _mesa_texstore_unorm1616 },
+ { MESA_FORMAT_AL1616_REV, _mesa_texstore_unorm1616 },
+ { MESA_FORMAT_RGB332, _mesa_texstore_rgb332 },
+ { MESA_FORMAT_A8, _mesa_texstore_unorm8 },
+ { MESA_FORMAT_A16, _mesa_texstore_unorm16 },
+ { MESA_FORMAT_L8, _mesa_texstore_unorm8 },
+ { MESA_FORMAT_L16, _mesa_texstore_unorm16 },
+ { MESA_FORMAT_I8, _mesa_texstore_unorm8 },
+ { MESA_FORMAT_I16, _mesa_texstore_unorm16 },
+ { MESA_FORMAT_CI8, _mesa_texstore_ci8 },
+ { MESA_FORMAT_YCBCR, _mesa_texstore_ycbcr },
+ { MESA_FORMAT_YCBCR_REV, _mesa_texstore_ycbcr },
+ { MESA_FORMAT_R8, _mesa_texstore_unorm8 },
+ { MESA_FORMAT_RG88, _mesa_texstore_unorm88 },
+ { MESA_FORMAT_RG88_REV, _mesa_texstore_unorm88 },
+ { MESA_FORMAT_R16, _mesa_texstore_unorm16 },
+ { MESA_FORMAT_RG1616, _mesa_texstore_unorm1616 },
+ { MESA_FORMAT_RG1616_REV, _mesa_texstore_unorm1616 },
+ { MESA_FORMAT_ARGB2101010, _mesa_texstore_argb2101010 },
+ { MESA_FORMAT_Z24_S8, _mesa_texstore_z24_s8 },
+ { MESA_FORMAT_S8_Z24, _mesa_texstore_s8_z24 },
+ { MESA_FORMAT_Z16, _mesa_texstore_z16 },
+ { MESA_FORMAT_X8_Z24, _mesa_texstore_x8_z24 },
+ { MESA_FORMAT_Z24_X8, _mesa_texstore_z24_x8 },
+ { MESA_FORMAT_Z32, _mesa_texstore_z32 },
+ { MESA_FORMAT_S8, _mesa_texstore_s8 },
+ { MESA_FORMAT_SRGB8, _mesa_texstore_srgb8 },
+ { MESA_FORMAT_SRGBA8, _mesa_texstore_srgba8 },
+ { MESA_FORMAT_SARGB8, _mesa_texstore_sargb8 },
+ { MESA_FORMAT_SL8, _mesa_texstore_sl8 },
+ { MESA_FORMAT_SLA8, _mesa_texstore_sla8 },
+ { MESA_FORMAT_SRGB_DXT1, _mesa_texstore_rgb_dxt1 },
+ { MESA_FORMAT_SRGBA_DXT1, _mesa_texstore_rgba_dxt1 },
+ { MESA_FORMAT_SRGBA_DXT3, _mesa_texstore_rgba_dxt3 },
+ { MESA_FORMAT_SRGBA_DXT5, _mesa_texstore_rgba_dxt5 },
+ { MESA_FORMAT_RGB_FXT1, _mesa_texstore_rgb_fxt1 },
+ { MESA_FORMAT_RGBA_FXT1, _mesa_texstore_rgba_fxt1 },
+ { MESA_FORMAT_RGB_DXT1, _mesa_texstore_rgb_dxt1 },
+ { MESA_FORMAT_RGBA_DXT1, _mesa_texstore_rgba_dxt1 },
+ { MESA_FORMAT_RGBA_DXT3, _mesa_texstore_rgba_dxt3 },
+ { MESA_FORMAT_RGBA_DXT5, _mesa_texstore_rgba_dxt5 },
+ { MESA_FORMAT_RGBA_FLOAT32, _mesa_texstore_rgba_float32 },
+ { MESA_FORMAT_RGBA_FLOAT16, _mesa_texstore_rgba_float16 },
+ { MESA_FORMAT_RGB_FLOAT32, _mesa_texstore_rgba_float32 },
+ { MESA_FORMAT_RGB_FLOAT16, _mesa_texstore_rgba_float16 },
+ { MESA_FORMAT_ALPHA_FLOAT32, _mesa_texstore_rgba_float32 },
+ { MESA_FORMAT_ALPHA_FLOAT16, _mesa_texstore_rgba_float16 },
+ { MESA_FORMAT_LUMINANCE_FLOAT32, _mesa_texstore_rgba_float32 },
+ { MESA_FORMAT_LUMINANCE_FLOAT16, _mesa_texstore_rgba_float16 },
+ { MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32, _mesa_texstore_rgba_float32 },
+ { MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16, _mesa_texstore_rgba_float16 },
+ { MESA_FORMAT_INTENSITY_FLOAT32, _mesa_texstore_rgba_float32 },
+ { MESA_FORMAT_INTENSITY_FLOAT16, _mesa_texstore_rgba_float16 },
+
+ { MESA_FORMAT_RGBA_INT8, _mesa_texstore_rgba_int8 },
+ { MESA_FORMAT_RGBA_INT16, _mesa_texstore_rgba_int16 },
+ { MESA_FORMAT_RGBA_INT32, _mesa_texstore_rgba_int32 },
+ { MESA_FORMAT_RGBA_UINT8, _mesa_texstore_rgba_uint8 },
+ { MESA_FORMAT_RGBA_UINT16, _mesa_texstore_rgba_uint16 },
+ { MESA_FORMAT_RGBA_UINT32, _mesa_texstore_rgba_uint32 },
+
+ { MESA_FORMAT_DUDV8, _mesa_texstore_dudv8 },
+
+ { MESA_FORMAT_SIGNED_R8, _mesa_texstore_snorm8 },
+ { MESA_FORMAT_SIGNED_RG88_REV, _mesa_texstore_snorm88 },
+ { MESA_FORMAT_SIGNED_RGBX8888, _mesa_texstore_signed_rgbx8888 },
+
+ { MESA_FORMAT_SIGNED_RGBA8888, _mesa_texstore_signed_rgba8888 },
+ { MESA_FORMAT_SIGNED_RGBA8888_REV, _mesa_texstore_signed_rgba8888 },
+
+ { MESA_FORMAT_SIGNED_R16, _mesa_texstore_snorm16 },
+ { MESA_FORMAT_SIGNED_GR1616, _mesa_texstore_snorm1616 },
+ { MESA_FORMAT_SIGNED_RGB_16, _mesa_texstore_signed_rgba_16 },
+ { MESA_FORMAT_SIGNED_RGBA_16, _mesa_texstore_signed_rgba_16 },
+ { MESA_FORMAT_RGBA_16, _mesa_texstore_rgba_16 },
+
+ { MESA_FORMAT_RED_RGTC1, _mesa_texstore_red_rgtc1 },
+ { MESA_FORMAT_SIGNED_RED_RGTC1, _mesa_texstore_signed_red_rgtc1 },
+ { MESA_FORMAT_RG_RGTC2, _mesa_texstore_rg_rgtc2 },
+ { MESA_FORMAT_SIGNED_RG_RGTC2, _mesa_texstore_signed_rg_rgtc2 },
+
+ /* Re-use the R/RG texstore functions.
+ * The code is generic enough to handle LATC too. */
+ { MESA_FORMAT_L_LATC1, _mesa_texstore_red_rgtc1 },
+ { MESA_FORMAT_SIGNED_L_LATC1, _mesa_texstore_signed_red_rgtc1 },
+ { MESA_FORMAT_LA_LATC2, _mesa_texstore_rg_rgtc2 },
+ { MESA_FORMAT_SIGNED_LA_LATC2, _mesa_texstore_signed_rg_rgtc2 },
+
+ { MESA_FORMAT_SIGNED_A8, _mesa_texstore_snorm8 },
+ { MESA_FORMAT_SIGNED_L8, _mesa_texstore_snorm8 },
+ { MESA_FORMAT_SIGNED_AL88, _mesa_texstore_snorm88 },
+ { MESA_FORMAT_SIGNED_I8, _mesa_texstore_snorm8 },
+
+ { MESA_FORMAT_SIGNED_A16, _mesa_texstore_snorm16 },
+ { MESA_FORMAT_SIGNED_L16, _mesa_texstore_snorm16 },
+ { MESA_FORMAT_SIGNED_AL1616, _mesa_texstore_snorm1616 },
+ { MESA_FORMAT_SIGNED_I16, _mesa_texstore_snorm16 },
+};
+
+
+static GLboolean
+_mesa_texstore_null(TEXSTORE_PARAMS)
+{
+ (void) ctx; (void) dims;
+ (void) baseInternalFormat;
+ (void) dstFormat;
+ (void) dstAddr;
+ (void) dstXoffset; (void) dstYoffset; (void) dstZoffset;
+ (void) dstRowStride; (void) dstImageOffsets;
+ (void) srcWidth; (void) srcHeight; (void) srcDepth;
+ (void) srcFormat; (void) srcType;
+ (void) srcAddr;
+ (void) srcPacking;
+
+ /* should never happen */
+ _mesa_problem(NULL, "_mesa_texstore_null() is called");
+ return GL_FALSE;
+}
+
+
+/**
+ * Return the StoreTexImageFunc pointer to store an image in the given format.
+ */
+static StoreTexImageFunc
+_mesa_get_texstore_func(gl_format format)
+{
+#ifdef DEBUG
+ GLuint i;
+ for (i = 0; i < MESA_FORMAT_COUNT; i++) {
+ ASSERT(texstore_funcs[i].Name == i);
+ }
+#endif
+ ASSERT(texstore_funcs[format].Name == format);
+
+ if (texstore_funcs[format].Store)
+ return texstore_funcs[format].Store;
+ else
+ return _mesa_texstore_null;
+}
+
+
+/**
+ * Store user data into texture memory.
+ * Called via glTex[Sub]Image1/2/3D()
+ */
+GLboolean
+_mesa_texstore(TEXSTORE_PARAMS)
+{
+ StoreTexImageFunc storeImage;
+ GLboolean success;
+
+ storeImage = _mesa_get_texstore_func(dstFormat);
+
+ success = storeImage(ctx, dims, baseInternalFormat,
+ dstFormat, dstAddr, dstXoffset, dstYoffset, dstZoffset,
+ dstRowStride, dstImageOffsets,
+ srcWidth, srcHeight, srcDepth,
+ srcFormat, srcType, srcAddr, srcPacking);
+ return success;
+}
+
+
+/** Return texture size in bytes */
+static GLuint
+texture_size(const struct gl_texture_image *texImage)
+{
+ GLuint sz = _mesa_format_image_size(texImage->TexFormat, texImage->Width,
+ texImage->Height, texImage->Depth);
+ return sz;
+}
+
+
+/** Return row stride in bytes */
+static GLuint
+texture_row_stride(const struct gl_texture_image *texImage)
+{
+ GLuint stride = _mesa_format_row_stride(texImage->TexFormat,
+ texImage->Width);
+ return stride;
+}
+
+
+
+/**
+ * This is the software fallback for Driver.TexImage1D()
+ * and Driver.CopyTexImage1D().
+ * \sa _mesa_store_teximage2d()
+ */
+void
+_mesa_store_teximage1d(struct gl_context *ctx, GLenum target, GLint level,
+ GLint internalFormat,
+ GLint width, GLint border,
+ GLenum format, GLenum type, const GLvoid *pixels,
+ const struct gl_pixelstore_attrib *packing,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ GLuint sizeInBytes;
+ (void) border;
+
+ /* allocate memory */
+ sizeInBytes = texture_size(texImage);
+ texImage->Data = _mesa_alloc_texmemory(sizeInBytes);
+ if (!texImage->Data) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D");
+ return;
+ }
+
+ pixels = _mesa_validate_pbo_teximage(ctx, 1, width, 1, 1, format, type,
+ pixels, packing, "glTexImage1D");
+ if (!pixels) {
+ /* Note: we check for a NULL image pointer here, _after_ we allocated
+ * memory for the texture. That's what the GL spec calls for.
+ */
+ return;
+ }
+ else {
+ const GLint dstRowStride = 0;
+ GLboolean success = _mesa_texstore(ctx, 1, texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ 0, 0, 0, /* dstX/Y/Zoffset */
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, 1, 1,
+ format, type, pixels, packing);
+ if (!success) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage1D");
+ }
+ }
+
+ _mesa_unmap_teximage_pbo(ctx, packing);
+}
+
+
+/**
+ * This is the software fallback for Driver.TexImage2D()
+ * and Driver.CopyTexImage2D().
+ *
+ * This function is oriented toward storing images in main memory, rather
+ * than VRAM. Device driver's can easily plug in their own replacement.
+ */
+void
+_mesa_store_teximage2d(struct gl_context *ctx, GLenum target, GLint level,
+ GLint internalFormat,
+ GLint width, GLint height, GLint border,
+ GLenum format, GLenum type, const void *pixels,
+ const struct gl_pixelstore_attrib *packing,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ GLuint sizeInBytes;
+ (void) border;
+
+ /* allocate memory */
+ sizeInBytes = texture_size(texImage);
+ texImage->Data = _mesa_alloc_texmemory(sizeInBytes);
+ if (!texImage->Data) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D");
+ return;
+ }
+
+ pixels = _mesa_validate_pbo_teximage(ctx, 2, width, height, 1, format, type,
+ pixels, packing, "glTexImage2D");
+ if (!pixels) {
+ /* Note: we check for a NULL image pointer here, _after_ we allocated
+ * memory for the texture. That's what the GL spec calls for.
+ */
+ return;
+ }
+ else {
+ GLint dstRowStride = texture_row_stride(texImage);
+ GLboolean success = _mesa_texstore(ctx, 2, texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ 0, 0, 0, /* dstX/Y/Zoffset */
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, height, 1,
+ format, type, pixels, packing);
+ if (!success) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D");
+ }
+ }
+
+ _mesa_unmap_teximage_pbo(ctx, packing);
+}
+
+
+
+/**
+ * This is the software fallback for Driver.TexImage3D()
+ * and Driver.CopyTexImage3D().
+ * \sa _mesa_store_teximage2d()
+ */
+void
+_mesa_store_teximage3d(struct gl_context *ctx, GLenum target, GLint level,
+ GLint internalFormat,
+ GLint width, GLint height, GLint depth, GLint border,
+ GLenum format, GLenum type, const void *pixels,
+ const struct gl_pixelstore_attrib *packing,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ GLuint sizeInBytes;
+ (void) border;
+
+ /* allocate memory */
+ sizeInBytes = texture_size(texImage);
+ texImage->Data = _mesa_alloc_texmemory(sizeInBytes);
+ if (!texImage->Data) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D");
+ return;
+ }
+
+ pixels = _mesa_validate_pbo_teximage(ctx, 3, width, height, depth, format,
+ type, pixels, packing, "glTexImage3D");
+ if (!pixels) {
+ /* Note: we check for a NULL image pointer here, _after_ we allocated
+ * memory for the texture. That's what the GL spec calls for.
+ */
+ return;
+ }
+ else {
+ GLint dstRowStride = texture_row_stride(texImage);
+ GLboolean success = _mesa_texstore(ctx, 3, texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ 0, 0, 0, /* dstX/Y/Zoffset */
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, height, depth,
+ format, type, pixels, packing);
+ if (!success) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage3D");
+ }
+ }
+
+ _mesa_unmap_teximage_pbo(ctx, packing);
+}
+
+
+
+
+/*
+ * This is the software fallback for Driver.TexSubImage1D()
+ * and Driver.CopyTexSubImage1D().
+ */
+void
+_mesa_store_texsubimage1d(struct gl_context *ctx, GLenum target, GLint level,
+ GLint xoffset, GLint width,
+ GLenum format, GLenum type, const void *pixels,
+ const struct gl_pixelstore_attrib *packing,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ /* get pointer to src pixels (may be in a pbo which we'll map here) */
+ pixels = _mesa_validate_pbo_teximage(ctx, 1, width, 1, 1, format, type,
+ pixels, packing, "glTexSubImage1D");
+ if (!pixels)
+ return;
+
+ {
+ const GLint dstRowStride = 0;
+ GLboolean success = _mesa_texstore(ctx, 1, texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ xoffset, 0, 0, /* offsets */
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, 1, 1,
+ format, type, pixels, packing);
+ if (!success) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage1D");
+ }
+ }
+
+ _mesa_unmap_teximage_pbo(ctx, packing);
+}
+
+
+
+/**
+ * This is the software fallback for Driver.TexSubImage2D()
+ * and Driver.CopyTexSubImage2D().
+ */
+void
+_mesa_store_texsubimage2d(struct gl_context *ctx, GLenum target, GLint level,
+ GLint xoffset, GLint yoffset,
+ GLint width, GLint height,
+ GLenum format, GLenum type, const void *pixels,
+ const struct gl_pixelstore_attrib *packing,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ /* get pointer to src pixels (may be in a pbo which we'll map here) */
+ pixels = _mesa_validate_pbo_teximage(ctx, 2, width, height, 1, format, type,
+ pixels, packing, "glTexSubImage2D");
+ if (!pixels)
+ return;
+
+ {
+ GLint dstRowStride = texture_row_stride(texImage);
+ GLboolean success = _mesa_texstore(ctx, 2, texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ xoffset, yoffset, 0,
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, height, 1,
+ format, type, pixels, packing);
+ if (!success) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage2D");
+ }
+ }
+
+ _mesa_unmap_teximage_pbo(ctx, packing);
+}
+
+
+/*
+ * This is the software fallback for Driver.TexSubImage3D().
+ * and Driver.CopyTexSubImage3D().
+ */
+void
+_mesa_store_texsubimage3d(struct gl_context *ctx, GLenum target, GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLint width, GLint height, GLint depth,
+ GLenum format, GLenum type, const void *pixels,
+ const struct gl_pixelstore_attrib *packing,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ /* get pointer to src pixels (may be in a pbo which we'll map here) */
+ pixels = _mesa_validate_pbo_teximage(ctx, 3, width, height, depth, format,
+ type, pixels, packing,
+ "glTexSubImage3D");
+ if (!pixels)
+ return;
+
+ {
+ GLint dstRowStride = texture_row_stride(texImage);
+ GLboolean success = _mesa_texstore(ctx, 3, texImage->_BaseFormat,
+ texImage->TexFormat,
+ texImage->Data,
+ xoffset, yoffset, zoffset,
+ dstRowStride,
+ texImage->ImageOffsets,
+ width, height, depth,
+ format, type, pixels, packing);
+ if (!success) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexSubImage3D");
+ }
+ }
+
+ _mesa_unmap_teximage_pbo(ctx, packing);
+}
+
+
+/*
+ * Fallback for Driver.CompressedTexImage1D()
+ */
+void
+_mesa_store_compressed_teximage1d(struct gl_context *ctx,
+ GLenum target, GLint level,
+ GLint internalFormat,
+ GLint width, GLint border,
+ GLsizei imageSize, const GLvoid *data,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ /* this space intentionally left blank */
+ (void) ctx;
+ (void) target; (void) level;
+ (void) internalFormat;
+ (void) width; (void) border;
+ (void) imageSize; (void) data;
+ (void) texObj;
+ (void) texImage;
+}
+
+
+
+/**
+ * Fallback for Driver.CompressedTexImage2D()
+ */
+void
+_mesa_store_compressed_teximage2d(struct gl_context *ctx,
+ GLenum target, GLint level,
+ GLint internalFormat,
+ GLint width, GLint height, GLint border,
+ GLsizei imageSize, const GLvoid *data,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ (void) width; (void) height; (void) border;
+
+ /* This is pretty simple, basically just do a memcpy without worrying
+ * about the usual image unpacking or image transfer operations.
+ */
+ ASSERT(texObj);
+ ASSERT(texImage);
+ ASSERT(texImage->Width > 0);
+ ASSERT(texImage->Height > 0);
+ ASSERT(texImage->Depth == 1);
+ ASSERT(texImage->Data == NULL); /* was freed in glCompressedTexImage2DARB */
+
+ /* allocate storage */
+ texImage->Data = _mesa_alloc_texmemory(imageSize);
+ if (!texImage->Data) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB");
+ return;
+ }
+
+ data = _mesa_validate_pbo_compressed_teximage(ctx, imageSize, data,
+ &ctx->Unpack,
+ "glCompressedTexImage2D");
+ if (!data)
+ return;
+
+ /* copy the data */
+ memcpy(texImage->Data, data, imageSize);
+
+ _mesa_unmap_teximage_pbo(ctx, &ctx->Unpack);
+}
+
+
+
+/*
+ * Fallback for Driver.CompressedTexImage3D()
+ */
+void
+_mesa_store_compressed_teximage3d(struct gl_context *ctx,
+ GLenum target, GLint level,
+ GLint internalFormat,
+ GLint width, GLint height, GLint depth,
+ GLint border,
+ GLsizei imageSize, const GLvoid *data,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ /* this space intentionally left blank */
+ (void) ctx;
+ (void) target; (void) level;
+ (void) internalFormat;
+ (void) width; (void) height; (void) depth;
+ (void) border;
+ (void) imageSize; (void) data;
+ (void) texObj;
+ (void) texImage;
+}
+
+
+
+/**
+ * Fallback for Driver.CompressedTexSubImage1D()
+ */
+void
+_mesa_store_compressed_texsubimage1d(struct gl_context *ctx, GLenum target,
+ GLint level,
+ GLint xoffset, GLsizei width,
+ GLenum format,
+ GLsizei imageSize, const GLvoid *data,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ /* there are no compressed 1D texture formats yet */
+ (void) ctx;
+ (void) target; (void) level;
+ (void) xoffset; (void) width;
+ (void) format;
+ (void) imageSize; (void) data;
+ (void) texObj;
+ (void) texImage;
+}
+
+
+/**
+ * Fallback for Driver.CompressedTexSubImage2D()
+ */
+void
+_mesa_store_compressed_texsubimage2d(struct gl_context *ctx, GLenum target,
+ GLint level,
+ GLint xoffset, GLint yoffset,
+ GLsizei width, GLsizei height,
+ GLenum format,
+ GLsizei imageSize, const GLvoid *data,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ GLint bytesPerRow, destRowStride, srcRowStride;
+ GLint i, rows;
+ GLubyte *dest;
+ const GLubyte *src;
+ const gl_format texFormat = texImage->TexFormat;
+ const GLint destWidth = texImage->Width;
+ GLuint bw, bh;
+
+ _mesa_get_format_block_size(texFormat, &bw, &bh);
+
+ (void) level;
+ (void) format;
+
+ /* these should have been caught sooner */
+ ASSERT((width % bw) == 0 || width == 2 || width == 1);
+ ASSERT((height % bh) == 0 || height == 2 || height == 1);
+ ASSERT((xoffset % bw) == 0);
+ ASSERT((yoffset % bh) == 0);
+
+ /* get pointer to src pixels (may be in a pbo which we'll map here) */
+ data = _mesa_validate_pbo_compressed_teximage(ctx, imageSize, data,
+ &ctx->Unpack,
+ "glCompressedTexSubImage2D");
+ if (!data)
+ return;
+
+ srcRowStride = _mesa_format_row_stride(texFormat, width);
+ src = (const GLubyte *) data;
+
+ destRowStride = _mesa_format_row_stride(texFormat, destWidth);
+ dest = _mesa_compressed_image_address(xoffset, yoffset, 0,
+ texFormat, destWidth,
+ (GLubyte *) texImage->Data);
+
+ bytesPerRow = srcRowStride; /* bytes per row of blocks */
+ rows = height / bh; /* rows in blocks */
+
+ /* copy rows of blocks */
+ for (i = 0; i < rows; i++) {
+ memcpy(dest, src, bytesPerRow);
+ dest += destRowStride;
+ src += srcRowStride;
+ }
+
+ _mesa_unmap_teximage_pbo(ctx, &ctx->Unpack);
+}
+
+
+/**
+ * Fallback for Driver.CompressedTexSubImage3D()
+ */
+void
+_mesa_store_compressed_texsubimage3d(struct gl_context *ctx, GLenum target,
+ GLint level,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format,
+ GLsizei imageSize, const GLvoid *data,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage)
+{
+ /* there are no compressed 3D texture formats yet */
+ (void) ctx;
+ (void) target; (void) level;
+ (void) xoffset; (void) yoffset; (void) zoffset;
+ (void) width; (void) height; (void) depth;
+ (void) format;
+ (void) imageSize; (void) data;
+ (void) texObj;
+ (void) texImage;
+}
diff --git a/mesalib/src/mesa/main/version.c b/mesalib/src/mesa/main/version.c index c7a0d69a4..6dbdb3ac6 100644 --- a/mesalib/src/mesa/main/version.c +++ b/mesalib/src/mesa/main/version.c @@ -1,288 +1,293 @@ -/* - * Mesa 3-D graphics library - * - * Copyright (C) 2010 VMware, Inc. All Rights Reserved. - * - * 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 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. - */ - - -#include "imports.h" -#include "mtypes.h" -#include "version.h" - - - -/** - * Examine enabled GL extensions to determine GL version. - * Return major and minor version numbers. - */ -static void -compute_version(struct gl_context *ctx) -{ - GLuint major, minor; - static const int max = 100; - - const GLboolean ver_1_3 = (ctx->Extensions.ARB_multisample && - ctx->Extensions.ARB_multitexture && - ctx->Extensions.ARB_texture_border_clamp && - ctx->Extensions.ARB_texture_compression && - ctx->Extensions.ARB_texture_cube_map && - ctx->Extensions.EXT_texture_env_add && - ctx->Extensions.ARB_texture_env_combine && - ctx->Extensions.ARB_texture_env_dot3); - const GLboolean ver_1_4 = (ver_1_3 && - ctx->Extensions.ARB_depth_texture && - ctx->Extensions.ARB_shadow && - ctx->Extensions.ARB_texture_env_crossbar && - ctx->Extensions.ARB_texture_mirrored_repeat && - ctx->Extensions.ARB_window_pos && - ctx->Extensions.EXT_blend_color && - ctx->Extensions.EXT_blend_func_separate && - ctx->Extensions.EXT_blend_minmax && - ctx->Extensions.EXT_blend_subtract && - ctx->Extensions.EXT_fog_coord && - ctx->Extensions.EXT_multi_draw_arrays && - ctx->Extensions.EXT_point_parameters && - ctx->Extensions.EXT_secondary_color && - ctx->Extensions.EXT_stencil_wrap && - ctx->Extensions.EXT_texture_lod_bias && - ctx->Extensions.SGIS_generate_mipmap); - const GLboolean ver_1_5 = (ver_1_4 && - ctx->Extensions.ARB_occlusion_query && - ctx->Extensions.ARB_vertex_buffer_object && - ctx->Extensions.EXT_shadow_funcs); - const GLboolean ver_2_0 = (ver_1_5 && - ctx->Extensions.ARB_draw_buffers && - ctx->Extensions.ARB_point_sprite && - ctx->Extensions.ARB_shader_objects && - ctx->Extensions.ARB_vertex_shader && - ctx->Extensions.ARB_fragment_shader && - ctx->Extensions.ARB_texture_non_power_of_two && - ctx->Extensions.EXT_blend_equation_separate && - - /* Technically, 2.0 requires the functionality - * of the EXT version. Enable 2.0 if either - * extension is available, and assume that a - * driver that only exposes the ATI extension - * will fallback to software when necessary. - */ - (ctx->Extensions.EXT_stencil_two_side - || ctx->Extensions.ATI_separate_stencil)); - const GLboolean ver_2_1 = (ver_2_0 && - ctx->Const.GLSLVersion >= 120 && - ctx->Extensions.EXT_pixel_buffer_object && - ctx->Extensions.EXT_texture_sRGB); - const GLboolean ver_3_0 = (ver_2_1 && - ctx->Extensions.ARB_color_buffer_float && - ctx->Extensions.ARB_depth_buffer_float && - ctx->Extensions.ARB_half_float_pixel && - ctx->Extensions.ARB_map_buffer_range && - ctx->Extensions.ARB_texture_float && - ctx->Extensions.ARB_texture_rg && - ctx->Extensions.ARB_texture_compression_rgtc && - ctx->Extensions.APPLE_vertex_array_object && - ctx->Extensions.EXT_draw_buffers2 && - ctx->Extensions.EXT_framebuffer_blit && - ctx->Extensions.EXT_framebuffer_multisample && - ctx->Extensions.EXT_framebuffer_object && - ctx->Extensions.EXT_framebuffer_sRGB && - ctx->Extensions.EXT_packed_depth_stencil && - ctx->Extensions.EXT_packed_float && - ctx->Extensions.EXT_texture_array && - ctx->Extensions.EXT_texture_integer && - ctx->Extensions.EXT_texture_shared_exponent && - ctx->Extensions.EXT_transform_feedback && - ctx->Extensions.NV_conditional_render); - const GLboolean ver_3_1 = (ver_3_0 && - ctx->Extensions.ARB_copy_buffer && - ctx->Extensions.ARB_draw_instanced && - ctx->Extensions.ARB_texture_buffer_object && - ctx->Extensions.ARB_uniform_buffer_object && - ctx->Extensions.EXT_texture_snorm && - ctx->Extensions.NV_primitive_restart && - ctx->Extensions.NV_texture_rectangle && - ctx->Const.MaxVertexTextureImageUnits >= 16); - const GLboolean ver_3_2 = (ver_3_1 && - ctx->Extensions.ARB_depth_clamp && - ctx->Extensions.ARB_draw_elements_base_vertex && - ctx->Extensions.ARB_fragment_coord_conventions && - ctx->Extensions.ARB_geometry_shader4 && - ctx->Extensions.EXT_provoking_vertex && - ctx->Extensions.ARB_seamless_cube_map && - ctx->Extensions.ARB_sync && - ctx->Extensions.ARB_texture_multisample && - ctx->Extensions.EXT_vertex_array_bgra); - const GLboolean ver_3_3 = (ver_3_2 && - ctx->Extensions.ARB_blend_func_extended && - ctx->Extensions.ARB_explicit_attrib_location && - ctx->Extensions.ARB_instanced_arrays && - ctx->Extensions.ARB_occlusion_query2 && - ctx->Extensions.ARB_sampler_objects && - ctx->Extensions.ARB_texture_rgb10_a2ui && - ctx->Extensions.ARB_timer_query && - ctx->Extensions.ARB_vertex_type_2_10_10_10_rev && - ctx->Extensions.EXT_texture_swizzle); - - if (ver_3_3) { - major = 3; - minor = 3; - } - else if (ver_3_2) { - major = 3; - minor = 2; - } - else if (ver_3_1) { - major = 3; - minor = 1; - } - else if (ver_3_0) { - major = 3; - minor = 0; - } - else if (ver_2_1) { - major = 2; - minor = 1; - } - else if (ver_2_0) { - major = 2; - minor = 0; - } - else if (ver_1_5) { - major = 1; - minor = 5; - } - else if (ver_1_4) { - major = 1; - minor = 4; - } - else if (ver_1_3) { - major = 1; - minor = 3; - } - else { - major = 1; - minor = 2; - } - - ctx->VersionMajor = major; - ctx->VersionMinor = minor; - ctx->VersionString = (char *) malloc(max); - if (ctx->VersionString) { - _mesa_snprintf(ctx->VersionString, max, - "%u.%u Mesa " MESA_VERSION_STRING, - ctx->VersionMajor, ctx->VersionMinor); - } -} - -static void -compute_version_es1(struct gl_context *ctx) -{ - static const int max = 100; - - /* OpenGL ES 1.0 is derived from OpenGL 1.3 */ - const GLboolean ver_1_0 = (ctx->Extensions.ARB_multisample && - ctx->Extensions.ARB_multitexture && - ctx->Extensions.ARB_texture_compression && - ctx->Extensions.EXT_texture_env_add && - ctx->Extensions.ARB_texture_env_combine && - ctx->Extensions.ARB_texture_env_dot3); - /* OpenGL ES 1.1 is derived from OpenGL 1.5 */ - const GLboolean ver_1_1 = (ver_1_0 && - ctx->Extensions.EXT_point_parameters && - ctx->Extensions.SGIS_generate_mipmap && - ctx->Extensions.ARB_vertex_buffer_object); - - if (ver_1_1) { - ctx->VersionMajor = 1; - ctx->VersionMinor = 1; - } else if (ver_1_0) { - ctx->VersionMajor = 1; - ctx->VersionMinor = 0; - } else { - _mesa_problem(ctx, "Incomplete OpenGL ES 1.0 support."); - } - - ctx->VersionString = (char *) malloc(max); - if (ctx->VersionString) { - _mesa_snprintf(ctx->VersionString, max, - "OpenGL ES-CM 1.%d Mesa " MESA_VERSION_STRING, - ctx->VersionMinor); - } -} - -static void -compute_version_es2(struct gl_context *ctx) -{ - static const int max = 100; - - /* OpenGL ES 2.0 is derived from OpenGL 2.0 */ - const GLboolean ver_2_0 = (ctx->Extensions.ARB_multisample && - ctx->Extensions.ARB_multitexture && - ctx->Extensions.ARB_texture_compression && - ctx->Extensions.ARB_texture_cube_map && - ctx->Extensions.ARB_texture_mirrored_repeat && - ctx->Extensions.EXT_blend_color && - ctx->Extensions.EXT_blend_func_separate && - ctx->Extensions.EXT_blend_minmax && - ctx->Extensions.EXT_blend_subtract && - ctx->Extensions.EXT_stencil_wrap && - ctx->Extensions.ARB_vertex_buffer_object && - ctx->Extensions.ARB_shader_objects && - ctx->Extensions.ARB_vertex_shader && - ctx->Extensions.ARB_fragment_shader && - ctx->Extensions.ARB_texture_non_power_of_two && - ctx->Extensions.EXT_blend_equation_separate); - if (ver_2_0) { - ctx->VersionMajor = 2; - ctx->VersionMinor = 0; - } else { - _mesa_problem(ctx, "Incomplete OpenGL ES 2.0 support."); - } - - ctx->VersionString = (char *) malloc(max); - if (ctx->VersionString) { - _mesa_snprintf(ctx->VersionString, max, - "OpenGL ES 2.0 Mesa " MESA_VERSION_STRING); - } -} - -/** - * Set the context's VersionMajor, VersionMinor, VersionString fields. - * This should only be called once as part of context initialization - * or to perform version check for GLX_ARB_create_context_profile. - */ -void -_mesa_compute_version(struct gl_context *ctx) -{ - if (ctx->VersionMajor) - return; - - switch (ctx->API) { - case API_OPENGL: - compute_version(ctx); - break; - case API_OPENGLES: - compute_version_es1(ctx); - break; - case API_OPENGLES2: - compute_version_es2(ctx); - break; - } - -} +/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 2010 VMware, Inc. All Rights Reserved.
+ *
+ * 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 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.
+ */
+
+
+#include "imports.h"
+#include "mtypes.h"
+#include "version.h"
+#include "git_sha1.h"
+
+
+
+/**
+ * Examine enabled GL extensions to determine GL version.
+ * Return major and minor version numbers.
+ */
+static void
+compute_version(struct gl_context *ctx)
+{
+ GLuint major, minor;
+ static const int max = 100;
+
+ const GLboolean ver_1_3 = (ctx->Extensions.ARB_multisample &&
+ ctx->Extensions.ARB_multitexture &&
+ ctx->Extensions.ARB_texture_border_clamp &&
+ ctx->Extensions.ARB_texture_compression &&
+ ctx->Extensions.ARB_texture_cube_map &&
+ ctx->Extensions.EXT_texture_env_add &&
+ ctx->Extensions.ARB_texture_env_combine &&
+ ctx->Extensions.ARB_texture_env_dot3);
+ const GLboolean ver_1_4 = (ver_1_3 &&
+ ctx->Extensions.ARB_depth_texture &&
+ ctx->Extensions.ARB_shadow &&
+ ctx->Extensions.ARB_texture_env_crossbar &&
+ ctx->Extensions.ARB_texture_mirrored_repeat &&
+ ctx->Extensions.ARB_window_pos &&
+ ctx->Extensions.EXT_blend_color &&
+ ctx->Extensions.EXT_blend_func_separate &&
+ ctx->Extensions.EXT_blend_minmax &&
+ ctx->Extensions.EXT_blend_subtract &&
+ ctx->Extensions.EXT_fog_coord &&
+ ctx->Extensions.EXT_multi_draw_arrays &&
+ ctx->Extensions.EXT_point_parameters &&
+ ctx->Extensions.EXT_secondary_color &&
+ ctx->Extensions.EXT_stencil_wrap &&
+ ctx->Extensions.EXT_texture_lod_bias &&
+ ctx->Extensions.SGIS_generate_mipmap);
+ const GLboolean ver_1_5 = (ver_1_4 &&
+ ctx->Extensions.ARB_occlusion_query &&
+ ctx->Extensions.ARB_vertex_buffer_object &&
+ ctx->Extensions.EXT_shadow_funcs);
+ const GLboolean ver_2_0 = (ver_1_5 &&
+ ctx->Extensions.ARB_draw_buffers &&
+ ctx->Extensions.ARB_point_sprite &&
+ ctx->Extensions.ARB_shader_objects &&
+ ctx->Extensions.ARB_vertex_shader &&
+ ctx->Extensions.ARB_fragment_shader &&
+ ctx->Extensions.ARB_texture_non_power_of_two &&
+ ctx->Extensions.EXT_blend_equation_separate &&
+
+ /* Technically, 2.0 requires the functionality
+ * of the EXT version. Enable 2.0 if either
+ * extension is available, and assume that a
+ * driver that only exposes the ATI extension
+ * will fallback to software when necessary.
+ */
+ (ctx->Extensions.EXT_stencil_two_side
+ || ctx->Extensions.ATI_separate_stencil));
+ const GLboolean ver_2_1 = (ver_2_0 &&
+ ctx->Const.GLSLVersion >= 120 &&
+ ctx->Extensions.EXT_pixel_buffer_object &&
+ ctx->Extensions.EXT_texture_sRGB);
+ const GLboolean ver_3_0 = (ver_2_1 &&
+ ctx->Extensions.ARB_color_buffer_float &&
+ ctx->Extensions.ARB_depth_buffer_float &&
+ ctx->Extensions.ARB_half_float_pixel &&
+ ctx->Extensions.ARB_map_buffer_range &&
+ ctx->Extensions.ARB_texture_float &&
+ ctx->Extensions.ARB_texture_rg &&
+ ctx->Extensions.ARB_texture_compression_rgtc &&
+ ctx->Extensions.APPLE_vertex_array_object &&
+ ctx->Extensions.EXT_draw_buffers2 &&
+ ctx->Extensions.EXT_framebuffer_blit &&
+ ctx->Extensions.EXT_framebuffer_multisample &&
+ ctx->Extensions.EXT_framebuffer_object &&
+ ctx->Extensions.EXT_framebuffer_sRGB &&
+ ctx->Extensions.EXT_packed_depth_stencil &&
+ ctx->Extensions.EXT_packed_float &&
+ ctx->Extensions.EXT_texture_array &&
+ ctx->Extensions.EXT_texture_integer &&
+ ctx->Extensions.EXT_texture_shared_exponent &&
+ ctx->Extensions.EXT_transform_feedback &&
+ ctx->Extensions.NV_conditional_render);
+ const GLboolean ver_3_1 = (ver_3_0 &&
+ ctx->Extensions.ARB_copy_buffer &&
+ ctx->Extensions.ARB_draw_instanced &&
+ ctx->Extensions.ARB_texture_buffer_object &&
+ ctx->Extensions.ARB_uniform_buffer_object &&
+ ctx->Extensions.EXT_texture_snorm &&
+ ctx->Extensions.NV_primitive_restart &&
+ ctx->Extensions.NV_texture_rectangle &&
+ ctx->Const.MaxVertexTextureImageUnits >= 16);
+ const GLboolean ver_3_2 = (ver_3_1 &&
+ ctx->Extensions.ARB_depth_clamp &&
+ ctx->Extensions.ARB_draw_elements_base_vertex &&
+ ctx->Extensions.ARB_fragment_coord_conventions &&
+ ctx->Extensions.ARB_geometry_shader4 &&
+ ctx->Extensions.EXT_provoking_vertex &&
+ ctx->Extensions.ARB_seamless_cube_map &&
+ ctx->Extensions.ARB_sync &&
+ ctx->Extensions.ARB_texture_multisample &&
+ ctx->Extensions.EXT_vertex_array_bgra);
+ const GLboolean ver_3_3 = (ver_3_2 &&
+ ctx->Extensions.ARB_blend_func_extended &&
+ ctx->Extensions.ARB_explicit_attrib_location &&
+ ctx->Extensions.ARB_instanced_arrays &&
+ ctx->Extensions.ARB_occlusion_query2 &&
+ ctx->Extensions.ARB_sampler_objects &&
+ ctx->Extensions.ARB_texture_rgb10_a2ui &&
+ ctx->Extensions.ARB_timer_query &&
+ ctx->Extensions.ARB_vertex_type_2_10_10_10_rev &&
+ ctx->Extensions.EXT_texture_swizzle);
+
+ if (ver_3_3) {
+ major = 3;
+ minor = 3;
+ }
+ else if (ver_3_2) {
+ major = 3;
+ minor = 2;
+ }
+ else if (ver_3_1) {
+ major = 3;
+ minor = 1;
+ }
+ else if (ver_3_0) {
+ major = 3;
+ minor = 0;
+ }
+ else if (ver_2_1) {
+ major = 2;
+ minor = 1;
+ }
+ else if (ver_2_0) {
+ major = 2;
+ minor = 0;
+ }
+ else if (ver_1_5) {
+ major = 1;
+ minor = 5;
+ }
+ else if (ver_1_4) {
+ major = 1;
+ minor = 4;
+ }
+ else if (ver_1_3) {
+ major = 1;
+ minor = 3;
+ }
+ else {
+ major = 1;
+ minor = 2;
+ }
+
+ ctx->VersionMajor = major;
+ ctx->VersionMinor = minor;
+ ctx->VersionString = (char *) malloc(max);
+ if (ctx->VersionString) {
+ _mesa_snprintf(ctx->VersionString, max,
+ "%u.%u Mesa " MESA_VERSION_STRING
+#ifdef MESA_GIT_SHA1
+ " (" MESA_GIT_SHA1 ")"
+#endif
+ ,
+ ctx->VersionMajor, ctx->VersionMinor);
+ }
+}
+
+static void
+compute_version_es1(struct gl_context *ctx)
+{
+ static const int max = 100;
+
+ /* OpenGL ES 1.0 is derived from OpenGL 1.3 */
+ const GLboolean ver_1_0 = (ctx->Extensions.ARB_multisample &&
+ ctx->Extensions.ARB_multitexture &&
+ ctx->Extensions.ARB_texture_compression &&
+ ctx->Extensions.EXT_texture_env_add &&
+ ctx->Extensions.ARB_texture_env_combine &&
+ ctx->Extensions.ARB_texture_env_dot3);
+ /* OpenGL ES 1.1 is derived from OpenGL 1.5 */
+ const GLboolean ver_1_1 = (ver_1_0 &&
+ ctx->Extensions.EXT_point_parameters &&
+ ctx->Extensions.SGIS_generate_mipmap &&
+ ctx->Extensions.ARB_vertex_buffer_object);
+
+ if (ver_1_1) {
+ ctx->VersionMajor = 1;
+ ctx->VersionMinor = 1;
+ } else if (ver_1_0) {
+ ctx->VersionMajor = 1;
+ ctx->VersionMinor = 0;
+ } else {
+ _mesa_problem(ctx, "Incomplete OpenGL ES 1.0 support.");
+ }
+
+ ctx->VersionString = (char *) malloc(max);
+ if (ctx->VersionString) {
+ _mesa_snprintf(ctx->VersionString, max,
+ "OpenGL ES-CM 1.%d Mesa " MESA_VERSION_STRING,
+ ctx->VersionMinor);
+ }
+}
+
+static void
+compute_version_es2(struct gl_context *ctx)
+{
+ static const int max = 100;
+
+ /* OpenGL ES 2.0 is derived from OpenGL 2.0 */
+ const GLboolean ver_2_0 = (ctx->Extensions.ARB_multisample &&
+ ctx->Extensions.ARB_multitexture &&
+ ctx->Extensions.ARB_texture_compression &&
+ ctx->Extensions.ARB_texture_cube_map &&
+ ctx->Extensions.ARB_texture_mirrored_repeat &&
+ ctx->Extensions.EXT_blend_color &&
+ ctx->Extensions.EXT_blend_func_separate &&
+ ctx->Extensions.EXT_blend_minmax &&
+ ctx->Extensions.EXT_blend_subtract &&
+ ctx->Extensions.EXT_stencil_wrap &&
+ ctx->Extensions.ARB_vertex_buffer_object &&
+ ctx->Extensions.ARB_shader_objects &&
+ ctx->Extensions.ARB_vertex_shader &&
+ ctx->Extensions.ARB_fragment_shader &&
+ ctx->Extensions.ARB_texture_non_power_of_two &&
+ ctx->Extensions.EXT_blend_equation_separate);
+ if (ver_2_0) {
+ ctx->VersionMajor = 2;
+ ctx->VersionMinor = 0;
+ } else {
+ _mesa_problem(ctx, "Incomplete OpenGL ES 2.0 support.");
+ }
+
+ ctx->VersionString = (char *) malloc(max);
+ if (ctx->VersionString) {
+ _mesa_snprintf(ctx->VersionString, max,
+ "OpenGL ES 2.0 Mesa " MESA_VERSION_STRING);
+ }
+}
+
+/**
+ * Set the context's VersionMajor, VersionMinor, VersionString fields.
+ * This should only be called once as part of context initialization
+ * or to perform version check for GLX_ARB_create_context_profile.
+ */
+void
+_mesa_compute_version(struct gl_context *ctx)
+{
+ if (ctx->VersionMajor)
+ return;
+
+ switch (ctx->API) {
+ case API_OPENGL:
+ compute_version(ctx);
+ break;
+ case API_OPENGLES:
+ compute_version_es1(ctx);
+ break;
+ case API_OPENGLES2:
+ compute_version_es2(ctx);
+ break;
+ }
+
+}
|