Anonymous avatar Anonymous committed 8329dcf

Removed GLee, replaced with glLoadGen files, using the extension list provided in the extlist.txt file.
The code compiles cleanly and runs a few simple scripts, but that means nothing.
Extensive testing to follow.

Comments (0)

Files changed (13)

platform/msvc2010/liblove.vcxproj

     <ClCompile Include="..\..\src\modules\graphics\Image.cpp" />
     <ClCompile Include="..\..\src\modules\graphics\opengl\Canvas.cpp" />
     <ClCompile Include="..\..\src\modules\graphics\opengl\Font.cpp" />
-    <ClCompile Include="..\..\src\modules\graphics\opengl\GLee.c" />
+    <ClCompile Include="..\..\src\modules\graphics\opengl\gl_glload.c" />
     <ClCompile Include="..\..\src\modules\graphics\opengl\Graphics.cpp" />
     <ClCompile Include="..\..\src\modules\graphics\opengl\Image.cpp" />
     <ClCompile Include="..\..\src\modules\graphics\opengl\OpenGL.cpp" />
     <ClInclude Include="..\..\src\modules\graphics\Image.h" />
     <ClInclude Include="..\..\src\modules\graphics\opengl\Canvas.h" />
     <ClInclude Include="..\..\src\modules\graphics\opengl\Font.h" />
-    <ClInclude Include="..\..\src\modules\graphics\opengl\GLee.h" />
+    <ClInclude Include="..\..\src\modules\graphics\opengl\gl_glload.h" />
     <ClInclude Include="..\..\src\modules\graphics\opengl\Graphics.h" />
     <ClInclude Include="..\..\src\modules\graphics\opengl\Image.h" />
     <ClInclude Include="..\..\src\modules\graphics\opengl\OpenGL.h" />

platform/msvc2010/liblove.vcxproj.filters

     <ClCompile Include="..\..\src\modules\graphics\opengl\Font.cpp">
       <Filter>modules\graphics\opengl</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\modules\graphics\opengl\GLee.c">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\src\modules\graphics\opengl\Graphics.cpp">
       <Filter>modules\graphics\opengl</Filter>
     </ClCompile>
     <ClCompile Include="..\..\src\modules\system\sdl\System.cpp">
       <Filter>modules\system\sdl</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\modules\graphics\opengl\gl_glload.c">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <None Include="..\..\src\scripts\boot.lua">
     <ClInclude Include="..\..\src\modules\graphics\opengl\Font.h">
       <Filter>modules\graphics\opengl</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\src\modules\graphics\opengl\GLee.h">
-      <Filter>modules\graphics\opengl</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\src\modules\graphics\opengl\Graphics.h">
       <Filter>modules\graphics\opengl</Filter>
     </ClInclude>
     <ClInclude Include="..\..\src\modules\system\sdl\System.h">
       <Filter>modules\system\sdl</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\src\modules\graphics\opengl\gl_glload.h">
+      <Filter>modules\graphics\opengl</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="love.rc" />

src/modules/graphics/opengl/Canvas.cpp

 		}
 
 		// set up multiple render targets
-		if (GLEE_VERSION_2_0)
+		if (gl.isVersionAtLeast(2, 0))
 			glDrawBuffers(drawbuffers.size(), &drawbuffers[0]);
-		else if (GLEE_ARB_draw_buffers)
+		else if (ogl_ext_ARB_draw_buffers)
 			glDrawBuffersARB(drawbuffers.size(), &drawbuffers[0]);
 	}
 };
 		}
 
 		// set up multiple render targets
-		if (GLEE_VERSION_2_0)
+		if (gl.isVersionAtLeast(2, 0))
 			glDrawBuffers(drawbuffers.size(), &drawbuffers[0]);
-		else if (GLEE_ARB_draw_buffers)
+		else if (ogl_ext_ARB_draw_buffers)
 			glDrawBuffersARB(drawbuffers.size(), &drawbuffers[0]);
 	}
 };
 {
 	if (!strategy)
 	{
-		if (GLEE_VERSION_3_0 || GLEE_ARB_framebuffer_object)
+		if (gl.isVersionAtLeast(3, 0) || ogl_ext_ARB_framebuffer_object)
 			strategy = &strategyGL3;
-		else if (GLEE_EXT_framebuffer_object && GLEE_EXT_packed_depth_stencil)
+		else if (ogl_ext_EXT_framebuffer_object && ogl_ext_EXT_packed_depth_stencil)
 			strategy = &strategyPackedEXT;
-		else if (GLEE_EXT_framebuffer_object && strategyEXT.isSupported())
+		else if (ogl_ext_EXT_framebuffer_object && strategyEXT.isSupported())
 			strategy = &strategyEXT;
 		else
 			strategy = &strategyNone;
 
 bool Canvas::isHDRSupported()
 {
-	return GLEE_VERSION_3_0 || (isSupported() && GLEE_ARB_texture_float);
+	return gl.isVersionAtLeast(3, 0) || (isSupported() && ogl_ext_ARB_texture_float);
 }
 
 bool Canvas::isMultiCanvasSupported()
 {
-	if (!(isSupported() && (GLEE_VERSION_2_0 || GLEE_ARB_draw_buffers)))
+	if (!(isSupported() && (gl.isVersionAtLeast(2, 0) || ogl_ext_ARB_draw_buffers)))
 		return false;
 
 	if (maxFBOColorAttachments == 0 || maxDrawBuffers == 0)
 
 	// We don't need to worry about multiple FBO attachments or global clear
 	// color state when OpenGL 3.0+ is supported.
-	if (GLEE_VERSION_3_0)
+	if (gl.isVersionAtLeast(3, 0))
 	{
 		glClearBufferfv(GL_COLOR, 0, glcolor);
 

src/modules/graphics/opengl/Graphics.cpp

 	setViewportSize(width, height);
 
 	// Make sure antialiasing works when set elsewhere
-	if (GLEE_VERSION_1_3 || GLEE_ARB_multisample)
+	if (gl.isVersionAtLeast(1, 3) || ogl_ext_ARB_multisample)
 		glEnable(GL_MULTISAMPLE);
 
 	// Enable blending
 	glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
 
 	// Auto-generated mipmaps should be the best quality possible
-	if (GLEE_VERSION_1_4 || GLEE_SGIS_generate_mipmap)
+	if (gl.isVersionAtLeast(1, 4) || ogl_ext_SGIS_generate_mipmap)
 		glHint(GL_GENERATE_MIPMAP_HINT, GL_NICEST);
 
 	// Enable textures
 
 void Graphics::setBlendMode(Graphics::BlendMode mode)
 {
-	const int gl_1_4 = GLEE_VERSION_1_4;
+	const int gl_1_4 = gl.isVersionAtLeast(1, 4);
 
 	GLenum func = GL_FUNC_ADD;
 	GLenum src_rgb = GL_ONE;
 	switch (mode)
 	{
 	case BLEND_ALPHA:
-		if (gl_1_4 || GLEE_EXT_blend_func_separate)
+		if (gl_1_4 || ogl_ext_EXT_blend_func_separate)
 		{
 			src_rgb = GL_SRC_ALPHA;
 			src_a = GL_ONE;
 		break;
 	}
 
-	if (gl_1_4 || GLEE_ARB_imaging)
+	if (gl_1_4 || ogl_ext_ARB_imaging)
 		glBlendEquation(func);
-	else if (GLEE_EXT_blend_minmax && GLEE_EXT_blend_subtract)
+	else if (ogl_ext_EXT_blend_minmax && ogl_ext_EXT_blend_subtract)
 		glBlendEquationEXT(func);
 	else
 	{
 	{
 		if (gl_1_4)
 			glBlendFuncSeparate(src_rgb, dst_rgb, src_a, dst_a);
-		else if (GLEE_EXT_blend_func_separate)
+		else if (ogl_ext_EXT_blend_func_separate)
 			glBlendFuncSeparateEXT(src_rgb, dst_rgb, src_a, dst_a);
 		else
 			throw Exception("This graphics card does not support separated rgb and alpha blend functions!");
 
 Graphics::BlendMode Graphics::getBlendMode() const
 {
-	const int gl_1_4 = GLEE_VERSION_1_4;
+	const int gl_1_4 = gl.isVersionAtLeast(1, 4);
 
 	GLint src_rgb, src_a, dst_rgb, dst_a;
 	GLint equation = GL_FUNC_ADD;
 
-	if (gl_1_4 || GLEE_EXT_blend_func_separate)
+	if (gl_1_4 || ogl_ext_EXT_blend_func_separate)
 	{
 		glGetIntegerv(GL_BLEND_SRC_RGB, &src_rgb);
 		glGetIntegerv(GL_BLEND_SRC_ALPHA, &src_a);
 		dst_a = dst_rgb;
 	}
 
-	if (gl_1_4 || GLEE_ARB_imaging || (GLEE_EXT_blend_minmax && GLEE_EXT_blend_subtract))
+	if (gl_1_4 || ogl_ext_ARB_imaging || (ogl_ext_EXT_blend_minmax && ogl_ext_EXT_blend_subtract))
 		glGetIntegerv(GL_BLEND_EQUATION, &equation);
 
 	if (equation == GL_FUNC_REVERSE_SUBTRACT)  // && src == GL_SRC_ALPHA && dst == GL_ONE

src/modules/graphics/opengl/Image.cpp

 	int mipmapcount = cdata->getMipmapCount();
 
 	// We have to inform OpenGL if the image doesn't have all mipmap levels.
-	if (GLEE_VERSION_1_2 || GLEE_SGIS_texture_lod)
+	if (gl.isVersionAtLeast(1, 2) || ogl_ext_SGIS_texture_lod)
 	{
 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, mipmapcount - 1);
 	}
 	// Prevent other threads from changing the ImageData while we upload it.
 	love::thread::Lock lock(data->getMutex());
 
-	if (hasNpot() && (GLEE_VERSION_3_0 || GLEE_ARB_framebuffer_object))
+	if (hasNpot() && (gl.isVersionAtLeast(3, 0) || ogl_ext_ARB_framebuffer_object))
 	{
 		// AMD/ATI drivers have several bugs when generating mipmaps,
 		// re-uploading the entire base image seems to be required.
 
 bool Image::hasNpot()
 {
-	return GLEE_VERSION_2_0 || GLEE_ARB_texture_non_power_of_two;
+	return gl.isVersionAtLeast(2, 0) || ogl_ext_ARB_texture_non_power_of_two;
 }
 
 bool Image::hasAnisotropicFilteringSupport()
 {
-	return GLEE_EXT_texture_filter_anisotropic;
+	return ogl_ext_EXT_texture_filter_anisotropic;
 }
 
 bool Image::hasMipmapSupport()
 {
-	return GLEE_VERSION_1_4 || GLEE_SGIS_generate_mipmap;
+	return gl.isVersionAtLeast(1, 4) || ogl_ext_SGIS_generate_mipmap;
 }
 
 bool Image::hasMipmapSharpnessSupport()
 {
-	return GLEE_VERSION_1_4 || GLEE_EXT_texture_lod_bias;
+	return gl.isVersionAtLeast(1, 4) || ogl_ext_EXT_texture_lod_bias;
 }
 
 bool Image::hasCompressedTextureSupport()
 {
-	return GLEE_VERSION_1_3 || GLEE_ARB_texture_compression;
+	return gl.isVersionAtLeast(1, 3) || ogl_ext_ARB_texture_compression;
 }
 
 bool Image::hasCompressedTextureSupport(image::CompressedData::Format format)
 	case image::CompressedData::FORMAT_DXT1:
 	case image::CompressedData::FORMAT_DXT3:
 	case image::CompressedData::FORMAT_DXT5:
-		return GLEE_EXT_texture_compression_s3tc;
+		return ogl_ext_EXT_texture_compression_s3tc;
 	case image::CompressedData::FORMAT_BC4:
 	case image::CompressedData::FORMAT_BC4s:
 	case image::CompressedData::FORMAT_BC5:
 	case image::CompressedData::FORMAT_BC5s:
-		return (GLEE_VERSION_3_0 || GLEE_ARB_texture_compression_rgtc || GLEE_EXT_texture_compression_rgtc);
+		return (gl.isVersionAtLeast(3, 0) || ogl_ext_ARB_texture_compression_rgtc || ogl_ext_EXT_texture_compression_rgtc);
 	default:
 		break;
 	}

src/modules/graphics/opengl/OpenGL.cpp

 
 // STL
 #include <algorithm>
+#include <string.h>
+#include <stdlib.h>
 
 namespace love
 {
 	contextInitialized = false;
 }
 
+void OpenGL::ParseOpenGLVersion()
+{
+	const char *strVersion = (const char *)glGetString(GL_VERSION);
+	const char *strDotPos = NULL;
+	int iLength = 0;
+	char strWorkBuff[10];
+	minorVersion = 0;
+	majorVersion = 0;
+		
+	strDotPos = strchr(strVersion, '.');
+	if(!strDotPos)
+		return;
+		
+	iLength = (int)((ptrdiff_t)strDotPos - (ptrdiff_t)strVersion);
+	strncpy(strWorkBuff, strVersion, iLength);
+	strWorkBuff[iLength] = '\0';
+		
+	majorVersion = atoi(strWorkBuff);
+	strDotPos = strchr(strVersion + iLength + 1, ' ');
+	if(!strDotPos)
+	{
+		/*No extra data. Take the whole rest of the string.*/
+		strcpy(strWorkBuff, strVersion + iLength + 1);
+	}
+	else
+	{
+		/*Copy only up until the space.*/
+		int iLengthMinor = (int)((ptrdiff_t)strDotPos - (ptrdiff_t)strVersion);
+		iLengthMinor = iLengthMinor - (iLength + 1);
+		strncpy(strWorkBuff, strVersion + iLength + 1, iLengthMinor);
+		strWorkBuff[iLengthMinor] = '\0';
+	}
+		
+	minorVersion = atoi(strWorkBuff);
+}
+
+
 void OpenGL::initOpenGLFunctions()
 {
+	ogl_CheckExtensions();
+	ParseOpenGLVersion();
+
 	// The functionality of the core and ARB VBOs are identical, so we can
 	// assign the pointers of the core functions to the names of the ARB
 	// functions, if the latter isn't supported but the former is.
-	if (GLEE_VERSION_1_5 && !GLEE_ARB_vertex_buffer_object)
+	if (gl.isVersionAtLeast(1, 5) && !ogl_ext_ARB_vertex_buffer_object)
 	{
-		glBindBufferARB = (GLEEPFNGLBINDBUFFERARBPROC) glBindBuffer;
-		glBufferDataARB = (GLEEPFNGLBUFFERDATAARBPROC) glBufferData;
-		glBufferSubDataARB = (GLEEPFNGLBUFFERSUBDATAARBPROC) glBufferSubData;
-		glDeleteBuffersARB = (GLEEPFNGLDELETEBUFFERSARBPROC) glDeleteBuffers;
-		glGenBuffersARB = (GLEEPFNGLGENBUFFERSARBPROC) glGenBuffers;
-		glGetBufferParameterivARB = (GLEEPFNGLGETBUFFERPARAMETERIVARBPROC) glGetBufferParameteriv;
-		glGetBufferPointervARB = (GLEEPFNGLGETBUFFERPOINTERVARBPROC) glGetBufferPointerv;
-		glGetBufferSubDataARB = (GLEEPFNGLGETBUFFERSUBDATAARBPROC) glGetBufferSubData;
-		glIsBufferARB = (GLEEPFNGLISBUFFERARBPROC) glIsBuffer;
-		glMapBufferARB = (GLEEPFNGLMAPBUFFERARBPROC) glMapBuffer;
-		glUnmapBufferARB = (GLEEPFNGLUNMAPBUFFERARBPROC) glUnmapBuffer;
+		//No need for the cast. If they were not the same type, then the function call would fail anyway.
+		glBindBufferARB = glBindBuffer;
+		glBufferDataARB = glBufferData;
+		glBufferSubDataARB = glBufferSubData;
+		glDeleteBuffersARB = glDeleteBuffers;
+		glGenBuffersARB = glGenBuffers;
+		glGetBufferParameterivARB = glGetBufferParameteriv;
+		glGetBufferPointervARB = glGetBufferPointerv;
+		glGetBufferSubDataARB = glGetBufferSubData;
+		glIsBufferARB = glIsBuffer;
+		glMapBufferARB = glMapBuffer;
+		glUnmapBufferARB = glUnmapBuffer;
 	}
 
 	// Same deal for compressed textures.
-	if (GLEE_VERSION_1_3 && !GLEE_ARB_texture_compression)
+	if (gl.isVersionAtLeast(1, 3) && !ogl_ext_ARB_texture_compression)
 	{
-		glCompressedTexImage2DARB = (GLEEPFNGLCOMPRESSEDTEXIMAGE2DARBPROC) glCompressedTexImage2D;
-		glCompressedTexSubImage2DARB = (GLEEPFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) glCompressedTexSubImage2D;
-		glGetCompressedTexImageARB = (GLEEPFNGLGETCOMPRESSEDTEXIMAGEARBPROC) glGetCompressedTexImage;
+		glCompressedTexImage2DARB = glCompressedTexImage2D;
+		glCompressedTexSubImage2DARB = glCompressedTexSubImage2D;
+		glGetCompressedTexImageARB = glGetCompressedTexImage;
 	}
 }
 
 void OpenGL::initMaxValues()
 {
 	// We'll need this value to clamp anisotropy.
-	if (GLEE_EXT_texture_filter_anisotropic)
+	if (ogl_ext_EXT_texture_filter_anisotropic)
 		glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAnisotropy);
 	else
 		maxAnisotropy = 1.0f;
 
 	float anisotropy = 1.0f;
 
-	if (GLEE_EXT_texture_filter_anisotropic)
+	if (ogl_ext_EXT_texture_filter_anisotropic)
 	{
 		anisotropy = std::min(std::max(f.anisotropy, 1.0f), maxAnisotropy);
 		glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, anisotropy);
 		break;
 	}
 
-	if (GLEE_EXT_texture_filter_anisotropic)
+	if (ogl_ext_EXT_texture_filter_anisotropic)
 		glGetTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, &f.anisotropy);
 
 	return f;

src/modules/graphics/opengl/OpenGL.h

 #ifndef LOVE_GRAPHICS_OPENGL_OPENGL_H
 #define LOVE_GRAPHICS_OPENGL_OPENGL_H
 
-#include "GLee.h"
+#include "gl_glload.h"
 
 // LOVE
 #include "graphics/Color.h"
 	 **/
 	int getMaxTextureSize() const;
 
+	bool isVersionAtLeast(int testMajor, int testMinor) const
+	{
+		if(testMajor > majorVersion) return true;
+		if(testMajor < majorVersion) return false;
+		if(testMinor >= minorVersion) return true;
+		return false;
+	}
+
 private:
 
 	void initOpenGLFunctions();
 	float maxAnisotropy;
 	int maxTextureSize;
 
+	int majorVersion;
+	int minorVersion;
+
+	void ParseOpenGLVersion();
+
 	// Tracked OpenGL state.
 	struct
 	{

src/modules/graphics/opengl/Shader.cpp

 	const char *tmp = 0;
 
 	// GL_SHADING_LANGUAGE_VERSION isn't available in OpenGL < 2.0.
-	if (GL_VERSION_2_0 || GLEE_ARB_shading_language_100)
+	if (gl.isVersionAtLeast(2, 0) || ogl_ext_ARB_shading_language_100)
 		tmp = (const char *) glGetString(GL_SHADING_LANGUAGE_VERSION);
 
 	if (tmp == 0)
 
 bool Shader::isSupported()
 {
-	return GLEE_VERSION_2_0 && getGLSLVersion() >= "1.2";
+	return gl.isVersionAtLeast(2, 0) && getGLSLVersion() >= "1.2";
 }
 
 StringMap<Shader::ShaderType, Shader::TYPE_MAX_ENUM>::Entry Shader::typeNameEntries[] =

src/modules/graphics/opengl/VertexBuffer.cpp

 	, is_mapped(false)
 	, is_dirty(true)
 {
-	if (!(GLEE_ARB_vertex_buffer_object || GLEE_VERSION_1_5))
+	if (!(ogl_ext_ARB_vertex_buffer_object || gl.isVersionAtLeast(1, 5)))
 		throw love::Exception("Not supported");
 
 	bool ok = load(false);
 	else
 	{
 		// Not all systems have access to some faster paths...
-		if (GLEE_APPLE_flush_buffer_range)
+		if (ogl_ext_APPLE_flush_buffer_range)
 		{
 			void *mapdata = glMapBufferARB(getTarget(), GL_WRITE_ONLY);
 
 	// We don't want to flush the entire buffer when we just modify a small
 	// portion of it (VBO::fill without VBO::map), so we'll handle the flushing
 	// ourselves when we can.
-	if (GLEE_APPLE_flush_buffer_range)
+	if (ogl_ext_APPLE_flush_buffer_range)
 		glBufferParameteriAPPLE(getTarget(), GL_BUFFER_FLUSHING_UNMAP_APPLE, GL_FALSE);
 
 	return (GL_NO_ERROR == err);

src/modules/graphics/opengl/gl_glload.c

+#include <stdlib.h>
+#include <string.h>
+#include <stddef.h>
+#include "gl_glload.h"
+
+#if defined(__APPLE__)
+#include <mach-o/dyld.h>
+
+static void* AppleGLGetProcAddress (const GLubyte *name)
+{
+  static const struct mach_header* image = NULL;
+  NSSymbol symbol;
+  char* symbolName;
+  if (NULL == image)
+  {
+    image = NSAddImage("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", NSADDIMAGE_OPTION_RETURN_ON_ERROR);
+  }
+  /* prepend a '_' for the Unix C symbol mangling convention */
+  symbolName = malloc(strlen((const char*)name) + 2);
+  strcpy(symbolName+1, (const char*)name);
+  symbolName[0] = '_';
+  symbol = NULL;
+  /* if (NSIsSymbolNameDefined(symbolName))
+	 symbol = NSLookupAndBindSymbol(symbolName); */
+  symbol = image ? NSLookupSymbolInImage(image, symbolName, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR) : NULL;
+  free(symbolName);
+  return symbol ? NSAddressOfSymbol(symbol) : NULL;
+}
+#endif /* __APPLE__ */
+
+#if defined(__sgi) || defined (__sun)
+#include <dlfcn.h>
+#include <stdio.h>
+
+static void* SunGetProcAddress (const GLubyte* name)
+{
+  static void* h = NULL;
+  static void* gpa;
+
+  if (h == NULL)
+  {
+    if ((h = dlopen(NULL, RTLD_LAZY | RTLD_LOCAL)) == NULL) return NULL;
+    gpa = dlsym(h, "glXGetProcAddress");
+  }
+
+  if (gpa != NULL)
+    return ((void*(*)(const GLubyte*))gpa)(name);
+  else
+    return dlsym(h, (const char*)name);
+}
+#endif /* __sgi || __sun */
+
+#if defined(_WIN32)
+
+#ifdef _MSC_VER
+#pragma warning(disable: 4055)
+#pragma warning(disable: 4054)
+#endif
+
+static int TestPointer(const PROC pTest)
+{
+	ptrdiff_t iTest;
+	if(!pTest) return 0;
+	iTest = (ptrdiff_t)pTest;
+	
+	if(iTest == 1 || iTest == 2 || iTest == 3 || iTest == -1) return 0;
+	
+	return 1;
+}
+
+static PROC WinGetProcAddress(const char *name)
+{
+	HMODULE glMod = NULL;
+	PROC pFunc = wglGetProcAddress((LPCSTR)name);
+	if(TestPointer(pFunc))
+	{
+		return pFunc;
+	}
+	glMod = GetModuleHandleA("OpenGL32.dll");
+	return (PROC)GetProcAddress(glMod, (LPCSTR)name);
+}
+	
+#define IntGetProcAddress(name) WinGetProcAddress(name)
+#else
+	#if defined(__APPLE__)
+		#define IntGetProcAddress(name) AppleGLGetProcAddress(name)
+	#else
+		#if defined(__sgi) || defined(__sun)
+			#define IntGetProcAddress(name) SunGetProcAddress(name)
+		#else /* GLX */
+		    #include <GL/glx.h>
+
+			#define IntGetProcAddress(name) (*glXGetProcAddressARB)((const GLubyte*)name)
+		#endif
+	#endif
+#endif
+
+int ogl_ext_APPLE_flush_buffer_range = 0;
+int ogl_ext_ARB_draw_buffers = 0;
+int ogl_ext_ARB_framebuffer_object = 0;
+int ogl_ext_ARB_imaging = 0;
+int ogl_ext_ARB_multisample = 0;
+int ogl_ext_ARB_shading_language_100 = 0;
+int ogl_ext_ARB_texture_compression = 0;
+int ogl_ext_ARB_texture_compression_rgtc = 0;
+int ogl_ext_ARB_texture_float = 0;
+int ogl_ext_ARB_texture_non_power_of_two = 0;
+int ogl_ext_ARB_vertex_buffer_object = 0;
+int ogl_ext_EXT_blend_func_separate = 0;
+int ogl_ext_EXT_blend_minmax = 0;
+int ogl_ext_EXT_blend_subtract = 0;
+int ogl_ext_EXT_framebuffer_object = 0;
+int ogl_ext_EXT_packed_depth_stencil = 0;
+int ogl_ext_EXT_texture_compression_rgtc = 0;
+int ogl_ext_EXT_texture_compression_s3tc = 0;
+int ogl_ext_EXT_texture_filter_anisotropic = 0;
+int ogl_ext_EXT_framebuffer_blit = 0;
+int ogl_ext_EXT_texture_lod_bias = 0;
+int ogl_ext_SGIS_generate_mipmap = 0;
+int ogl_ext_SGIS_texture_lod = 0;
+
+// Extension: APPLE_flush_buffer_range
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBUFFERPARAMETERIAPPLEPROC)(GLenum, GLenum, GLint);
+static void CODEGEN_FUNCPTR Switch_BufferParameteriAPPLE(GLenum target, GLenum pname, GLint param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFLUSHMAPPEDBUFFERRANGEAPPLEPROC)(GLenum, GLintptr, GLsizeiptr);
+static void CODEGEN_FUNCPTR Switch_FlushMappedBufferRangeAPPLE(GLenum target, GLintptr offset, GLsizeiptr size);
+
+// Extension: ARB_draw_buffers
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDRAWBUFFERSARBPROC)(GLsizei, const GLenum *);
+static void CODEGEN_FUNCPTR Switch_DrawBuffersARB(GLsizei n, const GLenum * bufs);
+
+// Extension: ARB_framebuffer_object
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBINDFRAMEBUFFERPROC)(GLenum, GLuint);
+static void CODEGEN_FUNCPTR Switch_BindFramebuffer(GLenum target, GLuint framebuffer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBINDRENDERBUFFERPROC)(GLenum, GLuint);
+static void CODEGEN_FUNCPTR Switch_BindRenderbuffer(GLenum target, GLuint renderbuffer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBLITFRAMEBUFFERPROC)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
+static void CODEGEN_FUNCPTR Switch_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+typedef GLenum (CODEGEN_FUNCPTR *PFN_PTRC_GLCHECKFRAMEBUFFERSTATUSPROC)(GLenum);
+static GLenum CODEGEN_FUNCPTR Switch_CheckFramebufferStatus(GLenum target);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDELETEFRAMEBUFFERSPROC)(GLsizei, const GLuint *);
+static void CODEGEN_FUNCPTR Switch_DeleteFramebuffers(GLsizei n, const GLuint * framebuffers);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDELETERENDERBUFFERSPROC)(GLsizei, const GLuint *);
+static void CODEGEN_FUNCPTR Switch_DeleteRenderbuffers(GLsizei n, const GLuint * renderbuffers);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFRAMEBUFFERRENDERBUFFERPROC)(GLenum, GLenum, GLenum, GLuint);
+static void CODEGEN_FUNCPTR Switch_FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFRAMEBUFFERTEXTURE1DPROC)(GLenum, GLenum, GLenum, GLuint, GLint);
+static void CODEGEN_FUNCPTR Switch_FramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFRAMEBUFFERTEXTURE2DPROC)(GLenum, GLenum, GLenum, GLuint, GLint);
+static void CODEGEN_FUNCPTR Switch_FramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFRAMEBUFFERTEXTURE3DPROC)(GLenum, GLenum, GLenum, GLuint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_FramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFRAMEBUFFERTEXTURELAYERPROC)(GLenum, GLenum, GLuint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGENFRAMEBUFFERSPROC)(GLsizei, GLuint *);
+static void CODEGEN_FUNCPTR Switch_GenFramebuffers(GLsizei n, GLuint * framebuffers);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGENRENDERBUFFERSPROC)(GLsizei, GLuint *);
+static void CODEGEN_FUNCPTR Switch_GenRenderbuffers(GLsizei n, GLuint * renderbuffers);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGENERATEMIPMAPPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_GenerateMipmap(GLenum target);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC)(GLenum, GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETRENDERBUFFERPARAMETERIVPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params);
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLISFRAMEBUFFERPROC)(GLuint);
+static GLboolean CODEGEN_FUNCPTR Switch_IsFramebuffer(GLuint framebuffer);
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLISRENDERBUFFERPROC)(GLuint);
+static GLboolean CODEGEN_FUNCPTR Switch_IsRenderbuffer(GLuint renderbuffer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRENDERBUFFERSTORAGEPROC)(GLenum, GLenum, GLsizei, GLsizei);
+static void CODEGEN_FUNCPTR Switch_RenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRENDERBUFFERSTORAGEMULTISAMPLEPROC)(GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+static void CODEGEN_FUNCPTR Switch_RenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+
+// Extension: ARB_imaging
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLORSUBTABLEPROC)(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_ColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLORTABLEPROC)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_ColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLORTABLEPARAMETERFVPROC)(GLenum, GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLORTABLEPARAMETERIVPROC)(GLenum, GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_ColorTableParameteriv(GLenum target, GLenum pname, const GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCONVOLUTIONFILTER1DPROC)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_ConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCONVOLUTIONFILTER2DPROC)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_ConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCONVOLUTIONPARAMETERFPROC)(GLenum, GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCONVOLUTIONPARAMETERFVPROC)(GLenum, GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCONVOLUTIONPARAMETERIPROC)(GLenum, GLenum, GLint);
+static void CODEGEN_FUNCPTR Switch_ConvolutionParameteri(GLenum target, GLenum pname, GLint params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCONVOLUTIONPARAMETERIVPROC)(GLenum, GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOPYCOLORSUBTABLEPROC)(GLenum, GLsizei, GLint, GLint, GLsizei);
+static void CODEGEN_FUNCPTR Switch_CopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOPYCOLORTABLEPROC)(GLenum, GLenum, GLint, GLint, GLsizei);
+static void CODEGEN_FUNCPTR Switch_CopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOPYCONVOLUTIONFILTER1DPROC)(GLenum, GLenum, GLint, GLint, GLsizei);
+static void CODEGEN_FUNCPTR Switch_CopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOPYCONVOLUTIONFILTER2DPROC)(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei);
+static void CODEGEN_FUNCPTR Switch_CopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETCOLORTABLEPROC)(GLenum, GLenum, GLenum, GLvoid *);
+static void CODEGEN_FUNCPTR Switch_GetColorTable(GLenum target, GLenum format, GLenum type, GLvoid * table);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETCOLORTABLEPARAMETERFVPROC)(GLenum, GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetColorTableParameterfv(GLenum target, GLenum pname, GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETCOLORTABLEPARAMETERIVPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetColorTableParameteriv(GLenum target, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETCONVOLUTIONFILTERPROC)(GLenum, GLenum, GLenum, GLvoid *);
+static void CODEGEN_FUNCPTR Switch_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid * image);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETCONVOLUTIONPARAMETERFVPROC)(GLenum, GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETCONVOLUTIONPARAMETERIVPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETHISTOGRAMPROC)(GLenum, GLboolean, GLenum, GLenum, GLvoid *);
+static void CODEGEN_FUNCPTR Switch_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETHISTOGRAMPARAMETERFVPROC)(GLenum, GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetHistogramParameterfv(GLenum target, GLenum pname, GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETHISTOGRAMPARAMETERIVPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetHistogramParameteriv(GLenum target, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETMINMAXPROC)(GLenum, GLboolean, GLenum, GLenum, GLvoid *);
+static void CODEGEN_FUNCPTR Switch_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETMINMAXPARAMETERFVPROC)(GLenum, GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETMINMAXPARAMETERIVPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETSEPARABLEFILTERPROC)(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *);
+static void CODEGEN_FUNCPTR Switch_GetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLHISTOGRAMPROC)(GLenum, GLsizei, GLenum, GLboolean);
+static void CODEGEN_FUNCPTR Switch_Histogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMINMAXPROC)(GLenum, GLenum, GLboolean);
+static void CODEGEN_FUNCPTR Switch_Minmax(GLenum target, GLenum internalformat, GLboolean sink);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRESETHISTOGRAMPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_ResetHistogram(GLenum target);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRESETMINMAXPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_ResetMinmax(GLenum target);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSEPARABLEFILTER2DPROC)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_SeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column);
+
+// Extension: ARB_multisample
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSAMPLECOVERAGEARBPROC)(GLfloat, GLboolean);
+static void CODEGEN_FUNCPTR Switch_SampleCoverageARB(GLfloat value, GLboolean invert);
+
+// Extension: ARB_texture_compression
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOMPRESSEDTEXIMAGE1DARBPROC)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_CompressedTexImage1DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOMPRESSEDTEXIMAGE2DARBPROC)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_CompressedTexImage2DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOMPRESSEDTEXIMAGE3DARBPROC)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_CompressedTexImage3DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOMPRESSEDTEXSUBIMAGE1DARBPROC)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOMPRESSEDTEXSUBIMAGE2DARBPROC)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOMPRESSEDTEXSUBIMAGE3DARBPROC)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETCOMPRESSEDTEXIMAGEARBPROC)(GLenum, GLint, GLvoid *);
+static void CODEGEN_FUNCPTR Switch_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid * img);
+
+// Extension: ARB_vertex_buffer_object
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBINDBUFFERARBPROC)(GLenum, GLuint);
+static void CODEGEN_FUNCPTR Switch_BindBufferARB(GLenum target, GLuint buffer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBUFFERDATAARBPROC)(GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
+static void CODEGEN_FUNCPTR Switch_BufferDataARB(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBUFFERSUBDATAARBPROC)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_BufferSubDataARB(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDELETEBUFFERSARBPROC)(GLsizei, const GLuint *);
+static void CODEGEN_FUNCPTR Switch_DeleteBuffersARB(GLsizei n, const GLuint * buffers);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGENBUFFERSARBPROC)(GLsizei, GLuint *);
+static void CODEGEN_FUNCPTR Switch_GenBuffersARB(GLsizei n, GLuint * buffers);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETBUFFERPARAMETERIVARBPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetBufferParameterivARB(GLenum target, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETBUFFERPOINTERVARBPROC)(GLenum, GLenum, GLvoid **);
+static void CODEGEN_FUNCPTR Switch_GetBufferPointervARB(GLenum target, GLenum pname, GLvoid ** params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETBUFFERSUBDATAARBPROC)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *);
+static void CODEGEN_FUNCPTR Switch_GetBufferSubDataARB(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data);
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLISBUFFERARBPROC)(GLuint);
+static GLboolean CODEGEN_FUNCPTR Switch_IsBufferARB(GLuint buffer);
+typedef void * (CODEGEN_FUNCPTR *PFN_PTRC_GLMAPBUFFERARBPROC)(GLenum, GLenum);
+static void * CODEGEN_FUNCPTR Switch_MapBufferARB(GLenum target, GLenum access);
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLUNMAPBUFFERARBPROC)(GLenum);
+static GLboolean CODEGEN_FUNCPTR Switch_UnmapBufferARB(GLenum target);
+
+// Extension: EXT_blend_func_separate
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBLENDFUNCSEPARATEEXTPROC)(GLenum, GLenum, GLenum, GLenum);
+static void CODEGEN_FUNCPTR Switch_BlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+
+// Extension: EXT_blend_minmax
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBLENDEQUATIONEXTPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_BlendEquationEXT(GLenum mode);
+
+// Extension: EXT_framebuffer_object
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBINDFRAMEBUFFEREXTPROC)(GLenum, GLuint);
+static void CODEGEN_FUNCPTR Switch_BindFramebufferEXT(GLenum target, GLuint framebuffer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBINDRENDERBUFFEREXTPROC)(GLenum, GLuint);
+static void CODEGEN_FUNCPTR Switch_BindRenderbufferEXT(GLenum target, GLuint renderbuffer);
+typedef GLenum (CODEGEN_FUNCPTR *PFN_PTRC_GLCHECKFRAMEBUFFERSTATUSEXTPROC)(GLenum);
+static GLenum CODEGEN_FUNCPTR Switch_CheckFramebufferStatusEXT(GLenum target);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDELETEFRAMEBUFFERSEXTPROC)(GLsizei, const GLuint *);
+static void CODEGEN_FUNCPTR Switch_DeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDELETERENDERBUFFERSEXTPROC)(GLsizei, const GLuint *);
+static void CODEGEN_FUNCPTR Switch_DeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFRAMEBUFFERRENDERBUFFEREXTPROC)(GLenum, GLenum, GLenum, GLuint);
+static void CODEGEN_FUNCPTR Switch_FramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFRAMEBUFFERTEXTURE1DEXTPROC)(GLenum, GLenum, GLenum, GLuint, GLint);
+static void CODEGEN_FUNCPTR Switch_FramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFRAMEBUFFERTEXTURE2DEXTPROC)(GLenum, GLenum, GLenum, GLuint, GLint);
+static void CODEGEN_FUNCPTR Switch_FramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFRAMEBUFFERTEXTURE3DEXTPROC)(GLenum, GLenum, GLenum, GLuint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_FramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGENFRAMEBUFFERSEXTPROC)(GLsizei, GLuint *);
+static void CODEGEN_FUNCPTR Switch_GenFramebuffersEXT(GLsizei n, GLuint * framebuffers);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGENRENDERBUFFERSEXTPROC)(GLsizei, GLuint *);
+static void CODEGEN_FUNCPTR Switch_GenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGENERATEMIPMAPEXTPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_GenerateMipmapEXT(GLenum target);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC)(GLenum, GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETRENDERBUFFERPARAMETERIVEXTPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params);
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLISFRAMEBUFFEREXTPROC)(GLuint);
+static GLboolean CODEGEN_FUNCPTR Switch_IsFramebufferEXT(GLuint framebuffer);
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLISRENDERBUFFEREXTPROC)(GLuint);
+static GLboolean CODEGEN_FUNCPTR Switch_IsRenderbufferEXT(GLuint renderbuffer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRENDERBUFFERSTORAGEEXTPROC)(GLenum, GLenum, GLsizei, GLsizei);
+static void CODEGEN_FUNCPTR Switch_RenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+
+// Extension: EXT_framebuffer_blit
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBLITFRAMEBUFFEREXTPROC)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum);
+static void CODEGEN_FUNCPTR Switch_BlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+
+// Extension: 1.0
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLACCUMPROC)(GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Accum(GLenum op, GLfloat value);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLALPHAFUNCPROC)(GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_AlphaFunc(GLenum func, GLfloat ref);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBEGINPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_Begin(GLenum mode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBITMAPPROC)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *);
+static void CODEGEN_FUNCPTR Switch_Bitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBLENDFUNCPROC)(GLenum, GLenum);
+static void CODEGEN_FUNCPTR Switch_BlendFunc(GLenum sfactor, GLenum dfactor);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCALLLISTPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_CallList(GLuint list);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCALLLISTSPROC)(GLsizei, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_CallLists(GLsizei n, GLenum type, const GLvoid * lists);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCLEARPROC)(GLbitfield);
+static void CODEGEN_FUNCPTR Switch_Clear(GLbitfield mask);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCLEARACCUMPROC)(GLfloat, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_ClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCLEARCOLORPROC)(GLfloat, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_ClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCLEARDEPTHPROC)(GLdouble);
+static void CODEGEN_FUNCPTR Switch_ClearDepth(GLdouble depth);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCLEARINDEXPROC)(GLfloat);
+static void CODEGEN_FUNCPTR Switch_ClearIndex(GLfloat c);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCLEARSTENCILPROC)(GLint);
+static void CODEGEN_FUNCPTR Switch_ClearStencil(GLint s);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCLIPPLANEPROC)(GLenum, const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_ClipPlane(GLenum plane, const GLdouble * equation);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3BPROC)(GLbyte, GLbyte, GLbyte);
+static void CODEGEN_FUNCPTR Switch_Color3b(GLbyte red, GLbyte green, GLbyte blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3BVPROC)(const GLbyte *);
+static void CODEGEN_FUNCPTR Switch_Color3bv(const GLbyte * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3DPROC)(GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_Color3d(GLdouble red, GLdouble green, GLdouble blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_Color3dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3FPROC)(GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Color3f(GLfloat red, GLfloat green, GLfloat blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Color3fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3IPROC)(GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_Color3i(GLint red, GLint green, GLint blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_Color3iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3SPROC)(GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_Color3s(GLshort red, GLshort green, GLshort blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_Color3sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3UBPROC)(GLubyte, GLubyte, GLubyte);
+static void CODEGEN_FUNCPTR Switch_Color3ub(GLubyte red, GLubyte green, GLubyte blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3UBVPROC)(const GLubyte *);
+static void CODEGEN_FUNCPTR Switch_Color3ubv(const GLubyte * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3UIPROC)(GLuint, GLuint, GLuint);
+static void CODEGEN_FUNCPTR Switch_Color3ui(GLuint red, GLuint green, GLuint blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3UIVPROC)(const GLuint *);
+static void CODEGEN_FUNCPTR Switch_Color3uiv(const GLuint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3USPROC)(GLushort, GLushort, GLushort);
+static void CODEGEN_FUNCPTR Switch_Color3us(GLushort red, GLushort green, GLushort blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR3USVPROC)(const GLushort *);
+static void CODEGEN_FUNCPTR Switch_Color3usv(const GLushort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4BPROC)(GLbyte, GLbyte, GLbyte, GLbyte);
+static void CODEGEN_FUNCPTR Switch_Color4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4BVPROC)(const GLbyte *);
+static void CODEGEN_FUNCPTR Switch_Color4bv(const GLbyte * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4DPROC)(GLdouble, GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_Color4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_Color4dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4FPROC)(GLfloat, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Color4fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4IPROC)(GLint, GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_Color4i(GLint red, GLint green, GLint blue, GLint alpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_Color4iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4SPROC)(GLshort, GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_Color4s(GLshort red, GLshort green, GLshort blue, GLshort alpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_Color4sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4UBPROC)(GLubyte, GLubyte, GLubyte, GLubyte);
+static void CODEGEN_FUNCPTR Switch_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4UBVPROC)(const GLubyte *);
+static void CODEGEN_FUNCPTR Switch_Color4ubv(const GLubyte * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4UIPROC)(GLuint, GLuint, GLuint, GLuint);
+static void CODEGEN_FUNCPTR Switch_Color4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4UIVPROC)(const GLuint *);
+static void CODEGEN_FUNCPTR Switch_Color4uiv(const GLuint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4USPROC)(GLushort, GLushort, GLushort, GLushort);
+static void CODEGEN_FUNCPTR Switch_Color4us(GLushort red, GLushort green, GLushort blue, GLushort alpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLOR4USVPROC)(const GLushort *);
+static void CODEGEN_FUNCPTR Switch_Color4usv(const GLushort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLORMASKPROC)(GLboolean, GLboolean, GLboolean, GLboolean);
+static void CODEGEN_FUNCPTR Switch_ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLORMATERIALPROC)(GLenum, GLenum);
+static void CODEGEN_FUNCPTR Switch_ColorMaterial(GLenum face, GLenum mode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOPYPIXELSPROC)(GLint, GLint, GLsizei, GLsizei, GLenum);
+static void CODEGEN_FUNCPTR Switch_CopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCULLFACEPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_CullFace(GLenum mode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDELETELISTSPROC)(GLuint, GLsizei);
+static void CODEGEN_FUNCPTR Switch_DeleteLists(GLuint list, GLsizei range);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDEPTHFUNCPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_DepthFunc(GLenum func);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDEPTHMASKPROC)(GLboolean);
+static void CODEGEN_FUNCPTR Switch_DepthMask(GLboolean flag);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDEPTHRANGEPROC)(GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_DepthRange(GLdouble ren_near, GLdouble ren_far);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDISABLEPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_Disable(GLenum cap);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDRAWBUFFERPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_DrawBuffer(GLenum mode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDRAWPIXELSPROC)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_DrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEDGEFLAGPROC)(GLboolean);
+static void CODEGEN_FUNCPTR Switch_EdgeFlag(GLboolean flag);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEDGEFLAGVPROC)(const GLboolean *);
+static void CODEGEN_FUNCPTR Switch_EdgeFlagv(const GLboolean * flag);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLENABLEPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_Enable(GLenum cap);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLENDPROC)();
+static void CODEGEN_FUNCPTR Switch_End();
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLENDLISTPROC)();
+static void CODEGEN_FUNCPTR Switch_EndList();
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEVALCOORD1DPROC)(GLdouble);
+static void CODEGEN_FUNCPTR Switch_EvalCoord1d(GLdouble u);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEVALCOORD1DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_EvalCoord1dv(const GLdouble * u);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEVALCOORD1FPROC)(GLfloat);
+static void CODEGEN_FUNCPTR Switch_EvalCoord1f(GLfloat u);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEVALCOORD1FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_EvalCoord1fv(const GLfloat * u);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEVALCOORD2DPROC)(GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_EvalCoord2d(GLdouble u, GLdouble v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEVALCOORD2DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_EvalCoord2dv(const GLdouble * u);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEVALCOORD2FPROC)(GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_EvalCoord2f(GLfloat u, GLfloat v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEVALCOORD2FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_EvalCoord2fv(const GLfloat * u);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEVALMESH1PROC)(GLenum, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_EvalMesh1(GLenum mode, GLint i1, GLint i2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEVALMESH2PROC)(GLenum, GLint, GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEVALPOINT1PROC)(GLint);
+static void CODEGEN_FUNCPTR Switch_EvalPoint1(GLint i);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEVALPOINT2PROC)(GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_EvalPoint2(GLint i, GLint j);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFEEDBACKBUFFERPROC)(GLsizei, GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_FeedbackBuffer(GLsizei size, GLenum type, GLfloat * buffer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFINISHPROC)();
+static void CODEGEN_FUNCPTR Switch_Finish();
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFLUSHPROC)();
+static void CODEGEN_FUNCPTR Switch_Flush();
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFOGFPROC)(GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Fogf(GLenum pname, GLfloat param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFOGFVPROC)(GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Fogfv(GLenum pname, const GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFOGIPROC)(GLenum, GLint);
+static void CODEGEN_FUNCPTR Switch_Fogi(GLenum pname, GLint param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFOGIVPROC)(GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_Fogiv(GLenum pname, const GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFRONTFACEPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_FrontFace(GLenum mode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFRUSTUMPROC)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_Frustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+typedef GLuint (CODEGEN_FUNCPTR *PFN_PTRC_GLGENLISTSPROC)(GLsizei);
+static GLuint CODEGEN_FUNCPTR Switch_GenLists(GLsizei range);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETBOOLEANVPROC)(GLenum, GLboolean *);
+static void CODEGEN_FUNCPTR Switch_GetBooleanv(GLenum pname, GLboolean * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETCLIPPLANEPROC)(GLenum, GLdouble *);
+static void CODEGEN_FUNCPTR Switch_GetClipPlane(GLenum plane, GLdouble * equation);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETDOUBLEVPROC)(GLenum, GLdouble *);
+static void CODEGEN_FUNCPTR Switch_GetDoublev(GLenum pname, GLdouble * params);
+typedef GLenum (CODEGEN_FUNCPTR *PFN_PTRC_GLGETERRORPROC)();
+static GLenum CODEGEN_FUNCPTR Switch_GetError();
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETFLOATVPROC)(GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetFloatv(GLenum pname, GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETINTEGERVPROC)(GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetIntegerv(GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETLIGHTFVPROC)(GLenum, GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetLightfv(GLenum light, GLenum pname, GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETLIGHTIVPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetLightiv(GLenum light, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETMAPDVPROC)(GLenum, GLenum, GLdouble *);
+static void CODEGEN_FUNCPTR Switch_GetMapdv(GLenum target, GLenum query, GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETMAPFVPROC)(GLenum, GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetMapfv(GLenum target, GLenum query, GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETMAPIVPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetMapiv(GLenum target, GLenum query, GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETMATERIALFVPROC)(GLenum, GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetMaterialfv(GLenum face, GLenum pname, GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETMATERIALIVPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetMaterialiv(GLenum face, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETPIXELMAPFVPROC)(GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetPixelMapfv(GLenum map, GLfloat * values);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETPIXELMAPUIVPROC)(GLenum, GLuint *);
+static void CODEGEN_FUNCPTR Switch_GetPixelMapuiv(GLenum map, GLuint * values);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETPIXELMAPUSVPROC)(GLenum, GLushort *);
+static void CODEGEN_FUNCPTR Switch_GetPixelMapusv(GLenum map, GLushort * values);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETPOLYGONSTIPPLEPROC)(GLubyte *);
+static void CODEGEN_FUNCPTR Switch_GetPolygonStipple(GLubyte * mask);
+typedef const GLubyte * (CODEGEN_FUNCPTR *PFN_PTRC_GLGETSTRINGPROC)(GLenum);
+static const GLubyte * CODEGEN_FUNCPTR Switch_GetString(GLenum name);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETTEXENVFVPROC)(GLenum, GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetTexEnvfv(GLenum target, GLenum pname, GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETTEXENVIVPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetTexEnviv(GLenum target, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETTEXGENDVPROC)(GLenum, GLenum, GLdouble *);
+static void CODEGEN_FUNCPTR Switch_GetTexGendv(GLenum coord, GLenum pname, GLdouble * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETTEXGENFVPROC)(GLenum, GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetTexGenfv(GLenum coord, GLenum pname, GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETTEXGENIVPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetTexGeniv(GLenum coord, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETTEXIMAGEPROC)(GLenum, GLint, GLenum, GLenum, GLvoid *);
+static void CODEGEN_FUNCPTR Switch_GetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETTEXLEVELPARAMETERFVPROC)(GLenum, GLint, GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETTEXLEVELPARAMETERIVPROC)(GLenum, GLint, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETTEXPARAMETERFVPROC)(GLenum, GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetTexParameterfv(GLenum target, GLenum pname, GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETTEXPARAMETERIVPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetTexParameteriv(GLenum target, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLHINTPROC)(GLenum, GLenum);
+static void CODEGEN_FUNCPTR Switch_Hint(GLenum target, GLenum mode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINDEXMASKPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_IndexMask(GLuint mask);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINDEXDPROC)(GLdouble);
+static void CODEGEN_FUNCPTR Switch_Indexd(GLdouble c);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINDEXDVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_Indexdv(const GLdouble * c);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINDEXFPROC)(GLfloat);
+static void CODEGEN_FUNCPTR Switch_Indexf(GLfloat c);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINDEXFVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Indexfv(const GLfloat * c);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINDEXIPROC)(GLint);
+static void CODEGEN_FUNCPTR Switch_Indexi(GLint c);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINDEXIVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_Indexiv(const GLint * c);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINDEXSPROC)(GLshort);
+static void CODEGEN_FUNCPTR Switch_Indexs(GLshort c);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINDEXSVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_Indexsv(const GLshort * c);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINITNAMESPROC)();
+static void CODEGEN_FUNCPTR Switch_InitNames();
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLISENABLEDPROC)(GLenum);
+static GLboolean CODEGEN_FUNCPTR Switch_IsEnabled(GLenum cap);
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLISLISTPROC)(GLuint);
+static GLboolean CODEGEN_FUNCPTR Switch_IsList(GLuint list);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLIGHTMODELFPROC)(GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_LightModelf(GLenum pname, GLfloat param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLIGHTMODELFVPROC)(GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_LightModelfv(GLenum pname, const GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLIGHTMODELIPROC)(GLenum, GLint);
+static void CODEGEN_FUNCPTR Switch_LightModeli(GLenum pname, GLint param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLIGHTMODELIVPROC)(GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_LightModeliv(GLenum pname, const GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLIGHTFPROC)(GLenum, GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Lightf(GLenum light, GLenum pname, GLfloat param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLIGHTFVPROC)(GLenum, GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Lightfv(GLenum light, GLenum pname, const GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLIGHTIPROC)(GLenum, GLenum, GLint);
+static void CODEGEN_FUNCPTR Switch_Lighti(GLenum light, GLenum pname, GLint param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLIGHTIVPROC)(GLenum, GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_Lightiv(GLenum light, GLenum pname, const GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLINESTIPPLEPROC)(GLint, GLushort);
+static void CODEGEN_FUNCPTR Switch_LineStipple(GLint factor, GLushort pattern);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLINEWIDTHPROC)(GLfloat);
+static void CODEGEN_FUNCPTR Switch_LineWidth(GLfloat width);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLISTBASEPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_ListBase(GLuint base);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLOADIDENTITYPROC)();
+static void CODEGEN_FUNCPTR Switch_LoadIdentity();
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLOADMATRIXDPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_LoadMatrixd(const GLdouble * m);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLOADMATRIXFPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_LoadMatrixf(const GLfloat * m);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLOADNAMEPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_LoadName(GLuint name);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLOGICOPPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_LogicOp(GLenum opcode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMAP1DPROC)(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_Map1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMAP1FPROC)(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Map1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMAP2DPROC)(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_Map2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMAP2FPROC)(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Map2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMAPGRID1DPROC)(GLint, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_MapGrid1d(GLint un, GLdouble u1, GLdouble u2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMAPGRID1FPROC)(GLint, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_MapGrid1f(GLint un, GLfloat u1, GLfloat u2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMAPGRID2DPROC)(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_MapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMAPGRID2FPROC)(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_MapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMATERIALFPROC)(GLenum, GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Materialf(GLenum face, GLenum pname, GLfloat param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMATERIALFVPROC)(GLenum, GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Materialfv(GLenum face, GLenum pname, const GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMATERIALIPROC)(GLenum, GLenum, GLint);
+static void CODEGEN_FUNCPTR Switch_Materiali(GLenum face, GLenum pname, GLint param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMATERIALIVPROC)(GLenum, GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_Materialiv(GLenum face, GLenum pname, const GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMATRIXMODEPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_MatrixMode(GLenum mode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTMATRIXDPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_MultMatrixd(const GLdouble * m);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTMATRIXFPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_MultMatrixf(const GLfloat * m);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLNEWLISTPROC)(GLuint, GLenum);
+static void CODEGEN_FUNCPTR Switch_NewList(GLuint list, GLenum mode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLNORMAL3BPROC)(GLbyte, GLbyte, GLbyte);
+static void CODEGEN_FUNCPTR Switch_Normal3b(GLbyte nx, GLbyte ny, GLbyte nz);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLNORMAL3BVPROC)(const GLbyte *);
+static void CODEGEN_FUNCPTR Switch_Normal3bv(const GLbyte * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLNORMAL3DPROC)(GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_Normal3d(GLdouble nx, GLdouble ny, GLdouble nz);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLNORMAL3DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_Normal3dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLNORMAL3FPROC)(GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Normal3f(GLfloat nx, GLfloat ny, GLfloat nz);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLNORMAL3FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Normal3fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLNORMAL3IPROC)(GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_Normal3i(GLint nx, GLint ny, GLint nz);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLNORMAL3IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_Normal3iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLNORMAL3SPROC)(GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_Normal3s(GLshort nx, GLshort ny, GLshort nz);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLNORMAL3SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_Normal3sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLORTHOPROC)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_Ortho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPASSTHROUGHPROC)(GLfloat);
+static void CODEGEN_FUNCPTR Switch_PassThrough(GLfloat token);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPIXELMAPFVPROC)(GLenum, GLsizei, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_PixelMapfv(GLenum map, GLsizei mapsize, const GLfloat * values);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPIXELMAPUIVPROC)(GLenum, GLsizei, const GLuint *);
+static void CODEGEN_FUNCPTR Switch_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint * values);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPIXELMAPUSVPROC)(GLenum, GLsizei, const GLushort *);
+static void CODEGEN_FUNCPTR Switch_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort * values);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPIXELSTOREFPROC)(GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_PixelStoref(GLenum pname, GLfloat param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPIXELSTOREIPROC)(GLenum, GLint);
+static void CODEGEN_FUNCPTR Switch_PixelStorei(GLenum pname, GLint param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPIXELTRANSFERFPROC)(GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_PixelTransferf(GLenum pname, GLfloat param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPIXELTRANSFERIPROC)(GLenum, GLint);
+static void CODEGEN_FUNCPTR Switch_PixelTransferi(GLenum pname, GLint param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPIXELZOOMPROC)(GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_PixelZoom(GLfloat xfactor, GLfloat yfactor);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPOINTSIZEPROC)(GLfloat);
+static void CODEGEN_FUNCPTR Switch_PointSize(GLfloat size);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPOLYGONMODEPROC)(GLenum, GLenum);
+static void CODEGEN_FUNCPTR Switch_PolygonMode(GLenum face, GLenum mode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPOLYGONSTIPPLEPROC)(const GLubyte *);
+static void CODEGEN_FUNCPTR Switch_PolygonStipple(const GLubyte * mask);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPOPATTRIBPROC)();
+static void CODEGEN_FUNCPTR Switch_PopAttrib();
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPOPMATRIXPROC)();
+static void CODEGEN_FUNCPTR Switch_PopMatrix();
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPOPNAMEPROC)();
+static void CODEGEN_FUNCPTR Switch_PopName();
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPUSHATTRIBPROC)(GLbitfield);
+static void CODEGEN_FUNCPTR Switch_PushAttrib(GLbitfield mask);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPUSHMATRIXPROC)();
+static void CODEGEN_FUNCPTR Switch_PushMatrix();
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPUSHNAMEPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_PushName(GLuint name);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS2DPROC)(GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_RasterPos2d(GLdouble x, GLdouble y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS2DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_RasterPos2dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS2FPROC)(GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_RasterPos2f(GLfloat x, GLfloat y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS2FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_RasterPos2fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS2IPROC)(GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_RasterPos2i(GLint x, GLint y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS2IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_RasterPos2iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS2SPROC)(GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_RasterPos2s(GLshort x, GLshort y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS2SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_RasterPos2sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS3DPROC)(GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_RasterPos3d(GLdouble x, GLdouble y, GLdouble z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS3DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_RasterPos3dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS3FPROC)(GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_RasterPos3f(GLfloat x, GLfloat y, GLfloat z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS3FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_RasterPos3fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS3IPROC)(GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_RasterPos3i(GLint x, GLint y, GLint z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS3IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_RasterPos3iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS3SPROC)(GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_RasterPos3s(GLshort x, GLshort y, GLshort z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS3SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_RasterPos3sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS4DPROC)(GLdouble, GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS4DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_RasterPos4dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS4FPROC)(GLfloat, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS4FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_RasterPos4fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS4IPROC)(GLint, GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_RasterPos4i(GLint x, GLint y, GLint z, GLint w);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS4IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_RasterPos4iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS4SPROC)(GLshort, GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRASTERPOS4SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_RasterPos4sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLREADBUFFERPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_ReadBuffer(GLenum mode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLREADPIXELSPROC)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *);
+static void CODEGEN_FUNCPTR Switch_ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRECTDPROC)(GLdouble, GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRECTDVPROC)(const GLdouble *, const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_Rectdv(const GLdouble * v1, const GLdouble * v2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRECTFPROC)(GLfloat, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRECTFVPROC)(const GLfloat *, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Rectfv(const GLfloat * v1, const GLfloat * v2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRECTIPROC)(GLint, GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_Recti(GLint x1, GLint y1, GLint x2, GLint y2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRECTIVPROC)(const GLint *, const GLint *);
+static void CODEGEN_FUNCPTR Switch_Rectiv(const GLint * v1, const GLint * v2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRECTSPROC)(GLshort, GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLRECTSVPROC)(const GLshort *, const GLshort *);
+static void CODEGEN_FUNCPTR Switch_Rectsv(const GLshort * v1, const GLshort * v2);
+typedef GLint (CODEGEN_FUNCPTR *PFN_PTRC_GLRENDERMODEPROC)(GLenum);
+static GLint CODEGEN_FUNCPTR Switch_RenderMode(GLenum mode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLROTATEDPROC)(GLdouble, GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_Rotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLROTATEFPROC)(GLfloat, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSCALEDPROC)(GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_Scaled(GLdouble x, GLdouble y, GLdouble z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSCALEFPROC)(GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Scalef(GLfloat x, GLfloat y, GLfloat z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSCISSORPROC)(GLint, GLint, GLsizei, GLsizei);
+static void CODEGEN_FUNCPTR Switch_Scissor(GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSELECTBUFFERPROC)(GLsizei, GLuint *);
+static void CODEGEN_FUNCPTR Switch_SelectBuffer(GLsizei size, GLuint * buffer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSHADEMODELPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_ShadeModel(GLenum mode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSTENCILFUNCPROC)(GLenum, GLint, GLuint);
+static void CODEGEN_FUNCPTR Switch_StencilFunc(GLenum func, GLint ref, GLuint mask);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSTENCILMASKPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_StencilMask(GLuint mask);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSTENCILOPPROC)(GLenum, GLenum, GLenum);
+static void CODEGEN_FUNCPTR Switch_StencilOp(GLenum fail, GLenum zfail, GLenum zpass);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD1DPROC)(GLdouble);
+static void CODEGEN_FUNCPTR Switch_TexCoord1d(GLdouble s);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD1DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_TexCoord1dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD1FPROC)(GLfloat);
+static void CODEGEN_FUNCPTR Switch_TexCoord1f(GLfloat s);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD1FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_TexCoord1fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD1IPROC)(GLint);
+static void CODEGEN_FUNCPTR Switch_TexCoord1i(GLint s);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD1IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_TexCoord1iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD1SPROC)(GLshort);
+static void CODEGEN_FUNCPTR Switch_TexCoord1s(GLshort s);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD1SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_TexCoord1sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD2DPROC)(GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_TexCoord2d(GLdouble s, GLdouble t);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD2DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_TexCoord2dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD2FPROC)(GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_TexCoord2f(GLfloat s, GLfloat t);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD2FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_TexCoord2fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD2IPROC)(GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_TexCoord2i(GLint s, GLint t);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD2IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_TexCoord2iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD2SPROC)(GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_TexCoord2s(GLshort s, GLshort t);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD2SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_TexCoord2sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD3DPROC)(GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_TexCoord3d(GLdouble s, GLdouble t, GLdouble r);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD3DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_TexCoord3dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD3FPROC)(GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_TexCoord3f(GLfloat s, GLfloat t, GLfloat r);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD3FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_TexCoord3fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD3IPROC)(GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_TexCoord3i(GLint s, GLint t, GLint r);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD3IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_TexCoord3iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD3SPROC)(GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_TexCoord3s(GLshort s, GLshort t, GLshort r);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD3SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_TexCoord3sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD4DPROC)(GLdouble, GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_TexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD4DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_TexCoord4dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD4FPROC)(GLfloat, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_TexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD4FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_TexCoord4fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD4IPROC)(GLint, GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_TexCoord4i(GLint s, GLint t, GLint r, GLint q);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD4IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_TexCoord4iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD4SPROC)(GLshort, GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_TexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORD4SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_TexCoord4sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXENVFPROC)(GLenum, GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_TexEnvf(GLenum target, GLenum pname, GLfloat param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXENVFVPROC)(GLenum, GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_TexEnvfv(GLenum target, GLenum pname, const GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXENVIPROC)(GLenum, GLenum, GLint);
+static void CODEGEN_FUNCPTR Switch_TexEnvi(GLenum target, GLenum pname, GLint param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXENVIVPROC)(GLenum, GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_TexEnviv(GLenum target, GLenum pname, const GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXGENDPROC)(GLenum, GLenum, GLdouble);
+static void CODEGEN_FUNCPTR Switch_TexGend(GLenum coord, GLenum pname, GLdouble param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXGENDVPROC)(GLenum, GLenum, const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_TexGendv(GLenum coord, GLenum pname, const GLdouble * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXGENFPROC)(GLenum, GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_TexGenf(GLenum coord, GLenum pname, GLfloat param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXGENFVPROC)(GLenum, GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_TexGenfv(GLenum coord, GLenum pname, const GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXGENIPROC)(GLenum, GLenum, GLint);
+static void CODEGEN_FUNCPTR Switch_TexGeni(GLenum coord, GLenum pname, GLint param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXGENIVPROC)(GLenum, GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_TexGeniv(GLenum coord, GLenum pname, const GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXIMAGE1DPROC)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_TexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXIMAGE2DPROC)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_TexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXPARAMETERFPROC)(GLenum, GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_TexParameterf(GLenum target, GLenum pname, GLfloat param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXPARAMETERFVPROC)(GLenum, GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_TexParameterfv(GLenum target, GLenum pname, const GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXPARAMETERIPROC)(GLenum, GLenum, GLint);
+static void CODEGEN_FUNCPTR Switch_TexParameteri(GLenum target, GLenum pname, GLint param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXPARAMETERIVPROC)(GLenum, GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_TexParameteriv(GLenum target, GLenum pname, const GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTRANSLATEDPROC)(GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_Translated(GLdouble x, GLdouble y, GLdouble z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTRANSLATEFPROC)(GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Translatef(GLfloat x, GLfloat y, GLfloat z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX2DPROC)(GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_Vertex2d(GLdouble x, GLdouble y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX2DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_Vertex2dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX2FPROC)(GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Vertex2f(GLfloat x, GLfloat y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX2FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Vertex2fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX2IPROC)(GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_Vertex2i(GLint x, GLint y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX2IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_Vertex2iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX2SPROC)(GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_Vertex2s(GLshort x, GLshort y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX2SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_Vertex2sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX3DPROC)(GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_Vertex3d(GLdouble x, GLdouble y, GLdouble z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX3DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_Vertex3dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX3FPROC)(GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Vertex3f(GLfloat x, GLfloat y, GLfloat z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX3FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Vertex3fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX3IPROC)(GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_Vertex3i(GLint x, GLint y, GLint z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX3IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_Vertex3iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX3SPROC)(GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_Vertex3s(GLshort x, GLshort y, GLshort z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX3SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_Vertex3sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX4DPROC)(GLdouble, GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_Vertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX4DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_Vertex4dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX4FPROC)(GLfloat, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Vertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX4FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Vertex4fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX4IPROC)(GLint, GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_Vertex4i(GLint x, GLint y, GLint z, GLint w);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX4IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_Vertex4iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX4SPROC)(GLshort, GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_Vertex4s(GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEX4SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_Vertex4sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVIEWPORTPROC)(GLint, GLint, GLsizei, GLsizei);
+static void CODEGEN_FUNCPTR Switch_Viewport(GLint x, GLint y, GLsizei width, GLsizei height);
+
+// Extension: 1.1
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLARETEXTURESRESIDENTPROC)(GLsizei, const GLuint *, GLboolean *);
+static GLboolean CODEGEN_FUNCPTR Switch_AreTexturesResident(GLsizei n, const GLuint * textures, GLboolean * residences);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLARRAYELEMENTPROC)(GLint);
+static void CODEGEN_FUNCPTR Switch_ArrayElement(GLint i);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBINDTEXTUREPROC)(GLenum, GLuint);
+static void CODEGEN_FUNCPTR Switch_BindTexture(GLenum target, GLuint texture);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOLORPOINTERPROC)(GLint, GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_ColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOPYTEXIMAGE1DPROC)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
+static void CODEGEN_FUNCPTR Switch_CopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOPYTEXIMAGE2DPROC)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
+static void CODEGEN_FUNCPTR Switch_CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOPYTEXSUBIMAGE1DPROC)(GLenum, GLint, GLint, GLint, GLint, GLsizei);
+static void CODEGEN_FUNCPTR Switch_CopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOPYTEXSUBIMAGE2DPROC)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
+static void CODEGEN_FUNCPTR Switch_CopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDELETETEXTURESPROC)(GLsizei, const GLuint *);
+static void CODEGEN_FUNCPTR Switch_DeleteTextures(GLsizei n, const GLuint * textures);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDISABLECLIENTSTATEPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_DisableClientState(GLenum ren_array);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDRAWARRAYSPROC)(GLenum, GLint, GLsizei);
+static void CODEGEN_FUNCPTR Switch_DrawArrays(GLenum mode, GLint first, GLsizei count);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDRAWELEMENTSPROC)(GLenum, GLsizei, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_DrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLEDGEFLAGPOINTERPROC)(GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_EdgeFlagPointer(GLsizei stride, const GLvoid * pointer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLENABLECLIENTSTATEPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_EnableClientState(GLenum ren_array);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGENTEXTURESPROC)(GLsizei, GLuint *);
+static void CODEGEN_FUNCPTR Switch_GenTextures(GLsizei n, GLuint * textures);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETPOINTERVPROC)(GLenum, GLvoid **);
+static void CODEGEN_FUNCPTR Switch_GetPointerv(GLenum pname, GLvoid ** params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINDEXPOINTERPROC)(GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_IndexPointer(GLenum type, GLsizei stride, const GLvoid * pointer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINDEXUBPROC)(GLubyte);
+static void CODEGEN_FUNCPTR Switch_Indexub(GLubyte c);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINDEXUBVPROC)(const GLubyte *);
+static void CODEGEN_FUNCPTR Switch_Indexubv(const GLubyte * c);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLINTERLEAVEDARRAYSPROC)(GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_InterleavedArrays(GLenum format, GLsizei stride, const GLvoid * pointer);
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLISTEXTUREPROC)(GLuint);
+static GLboolean CODEGEN_FUNCPTR Switch_IsTexture(GLuint texture);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLNORMALPOINTERPROC)(GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_NormalPointer(GLenum type, GLsizei stride, const GLvoid * pointer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPOLYGONOFFSETPROC)(GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_PolygonOffset(GLfloat factor, GLfloat units);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPOPCLIENTATTRIBPROC)();
+static void CODEGEN_FUNCPTR Switch_PopClientAttrib();
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPRIORITIZETEXTURESPROC)(GLsizei, const GLuint *, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_PrioritizeTextures(GLsizei n, const GLuint * textures, const GLfloat * priorities);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPUSHCLIENTATTRIBPROC)(GLbitfield);
+static void CODEGEN_FUNCPTR Switch_PushClientAttrib(GLbitfield mask);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXCOORDPOINTERPROC)(GLint, GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXSUBIMAGE1DPROC)(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_TexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXSUBIMAGE2DPROC)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXPOINTERPROC)(GLint, GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_VertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
+
+// Extension: 1.2
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBLENDCOLORPROC)(GLfloat, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBLENDEQUATIONPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_BlendEquation(GLenum mode);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOPYTEXSUBIMAGE3DPROC)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
+static void CODEGEN_FUNCPTR Switch_CopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDRAWRANGEELEMENTSPROC)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXIMAGE3DPROC)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_TexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLTEXSUBIMAGE3DPROC)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_TexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels);
+
+// Extension: 1.3
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLACTIVETEXTUREPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_ActiveTexture(GLenum texture);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCLIENTACTIVETEXTUREPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_ClientActiveTexture(GLenum texture);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOMPRESSEDTEXIMAGE1DPROC)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_CompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOMPRESSEDTEXIMAGE2DPROC)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_CompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOMPRESSEDTEXIMAGE3DPROC)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_CompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOMPRESSEDTEXSUBIMAGE1DPROC)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_CompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOMPRESSEDTEXSUBIMAGE2DPROC)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_CompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOMPRESSEDTEXSUBIMAGE3DPROC)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETCOMPRESSEDTEXIMAGEPROC)(GLenum, GLint, GLvoid *);
+static void CODEGEN_FUNCPTR Switch_GetCompressedTexImage(GLenum target, GLint level, GLvoid * img);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLOADTRANSPOSEMATRIXDPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_LoadTransposeMatrixd(const GLdouble * m);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLOADTRANSPOSEMATRIXFPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_LoadTransposeMatrixf(const GLfloat * m);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTTRANSPOSEMATRIXDPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_MultTransposeMatrixd(const GLdouble * m);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTTRANSPOSEMATRIXFPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_MultTransposeMatrixf(const GLfloat * m);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD1DPROC)(GLenum, GLdouble);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord1d(GLenum target, GLdouble s);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD1DVPROC)(GLenum, const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord1dv(GLenum target, const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD1FPROC)(GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord1f(GLenum target, GLfloat s);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD1FVPROC)(GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord1fv(GLenum target, const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD1IPROC)(GLenum, GLint);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord1i(GLenum target, GLint s);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD1IVPROC)(GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord1iv(GLenum target, const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD1SPROC)(GLenum, GLshort);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord1s(GLenum target, GLshort s);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD1SVPROC)(GLenum, const GLshort *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord1sv(GLenum target, const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD2DPROC)(GLenum, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord2d(GLenum target, GLdouble s, GLdouble t);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD2DVPROC)(GLenum, const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord2dv(GLenum target, const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD2FPROC)(GLenum, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord2f(GLenum target, GLfloat s, GLfloat t);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD2FVPROC)(GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord2fv(GLenum target, const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD2IPROC)(GLenum, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord2i(GLenum target, GLint s, GLint t);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD2IVPROC)(GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord2iv(GLenum target, const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD2SPROC)(GLenum, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord2s(GLenum target, GLshort s, GLshort t);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD2SVPROC)(GLenum, const GLshort *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord2sv(GLenum target, const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD3DPROC)(GLenum, GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD3DVPROC)(GLenum, const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord3dv(GLenum target, const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD3FPROC)(GLenum, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord3f(GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD3FVPROC)(GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord3fv(GLenum target, const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD3IPROC)(GLenum, GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD3IVPROC)(GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord3iv(GLenum target, const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD3SPROC)(GLenum, GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD3SVPROC)(GLenum, const GLshort *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord3sv(GLenum target, const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD4DPROC)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD4DVPROC)(GLenum, const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord4dv(GLenum target, const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD4FPROC)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD4FVPROC)(GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord4fv(GLenum target, const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD4IPROC)(GLenum, GLint, GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD4IVPROC)(GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord4iv(GLenum target, const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD4SPROC)(GLenum, GLshort, GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTITEXCOORD4SVPROC)(GLenum, const GLshort *);
+static void CODEGEN_FUNCPTR Switch_MultiTexCoord4sv(GLenum target, const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSAMPLECOVERAGEPROC)(GLfloat, GLboolean);
+static void CODEGEN_FUNCPTR Switch_SampleCoverage(GLfloat value, GLboolean invert);
+
+// Extension: 1.4
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBLENDFUNCSEPARATEPROC)(GLenum, GLenum, GLenum, GLenum);
+static void CODEGEN_FUNCPTR Switch_BlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFOGCOORDPOINTERPROC)(GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_FogCoordPointer(GLenum type, GLsizei stride, const GLvoid * pointer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFOGCOORDDPROC)(GLdouble);
+static void CODEGEN_FUNCPTR Switch_FogCoordd(GLdouble coord);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFOGCOORDDVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_FogCoorddv(const GLdouble * coord);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFOGCOORDFPROC)(GLfloat);
+static void CODEGEN_FUNCPTR Switch_FogCoordf(GLfloat coord);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLFOGCOORDFVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_FogCoordfv(const GLfloat * coord);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTIDRAWARRAYSPROC)(GLenum, const GLint *, const GLsizei *, GLsizei);
+static void CODEGEN_FUNCPTR Switch_MultiDrawArrays(GLenum mode, const GLint * first, const GLsizei * count, GLsizei drawcount);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLMULTIDRAWELEMENTSPROC)(GLenum, const GLsizei *, GLenum, const GLvoid *const*, GLsizei);
+static void CODEGEN_FUNCPTR Switch_MultiDrawElements(GLenum mode, const GLsizei * count, GLenum type, const GLvoid *const* indices, GLsizei drawcount);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPOINTPARAMETERFPROC)(GLenum, GLfloat);
+static void CODEGEN_FUNCPTR Switch_PointParameterf(GLenum pname, GLfloat param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPOINTPARAMETERFVPROC)(GLenum, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_PointParameterfv(GLenum pname, const GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPOINTPARAMETERIPROC)(GLenum, GLint);
+static void CODEGEN_FUNCPTR Switch_PointParameteri(GLenum pname, GLint param);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLPOINTPARAMETERIVPROC)(GLenum, const GLint *);
+static void CODEGEN_FUNCPTR Switch_PointParameteriv(GLenum pname, const GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3BPROC)(GLbyte, GLbyte, GLbyte);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3b(GLbyte red, GLbyte green, GLbyte blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3BVPROC)(const GLbyte *);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3bv(const GLbyte * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3DPROC)(GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3d(GLdouble red, GLdouble green, GLdouble blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3FPROC)(GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3f(GLfloat red, GLfloat green, GLfloat blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3IPROC)(GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3i(GLint red, GLint green, GLint blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3SPROC)(GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3s(GLshort red, GLshort green, GLshort blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3UBPROC)(GLubyte, GLubyte, GLubyte);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3ub(GLubyte red, GLubyte green, GLubyte blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3UBVPROC)(const GLubyte *);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3ubv(const GLubyte * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3UIPROC)(GLuint, GLuint, GLuint);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3ui(GLuint red, GLuint green, GLuint blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3UIVPROC)(const GLuint *);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3uiv(const GLuint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3USPROC)(GLushort, GLushort, GLushort);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3us(GLushort red, GLushort green, GLushort blue);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLOR3USVPROC)(const GLushort *);
+static void CODEGEN_FUNCPTR Switch_SecondaryColor3usv(const GLushort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSECONDARYCOLORPOINTERPROC)(GLint, GLenum, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_SecondaryColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS2DPROC)(GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_WindowPos2d(GLdouble x, GLdouble y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS2DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_WindowPos2dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS2FPROC)(GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_WindowPos2f(GLfloat x, GLfloat y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS2FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_WindowPos2fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS2IPROC)(GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_WindowPos2i(GLint x, GLint y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS2IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_WindowPos2iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS2SPROC)(GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_WindowPos2s(GLshort x, GLshort y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS2SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_WindowPos2sv(const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS3DPROC)(GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_WindowPos3d(GLdouble x, GLdouble y, GLdouble z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS3DVPROC)(const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_WindowPos3dv(const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS3FPROC)(GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_WindowPos3f(GLfloat x, GLfloat y, GLfloat z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS3FVPROC)(const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_WindowPos3fv(const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS3IPROC)(GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_WindowPos3i(GLint x, GLint y, GLint z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS3IVPROC)(const GLint *);
+static void CODEGEN_FUNCPTR Switch_WindowPos3iv(const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS3SPROC)(GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_WindowPos3s(GLshort x, GLshort y, GLshort z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLWINDOWPOS3SVPROC)(const GLshort *);
+static void CODEGEN_FUNCPTR Switch_WindowPos3sv(const GLshort * v);
+
+// Extension: 1.5
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBEGINQUERYPROC)(GLenum, GLuint);
+static void CODEGEN_FUNCPTR Switch_BeginQuery(GLenum target, GLuint id);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBINDBUFFERPROC)(GLenum, GLuint);
+static void CODEGEN_FUNCPTR Switch_BindBuffer(GLenum target, GLuint buffer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBUFFERDATAPROC)(GLenum, GLsizeiptr, const GLvoid *, GLenum);
+static void CODEGEN_FUNCPTR Switch_BufferData(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBUFFERSUBDATAPROC)(GLenum, GLintptr, GLsizeiptr, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_BufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDELETEBUFFERSPROC)(GLsizei, const GLuint *);
+static void CODEGEN_FUNCPTR Switch_DeleteBuffers(GLsizei n, const GLuint * buffers);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDELETEQUERIESPROC)(GLsizei, const GLuint *);
+static void CODEGEN_FUNCPTR Switch_DeleteQueries(GLsizei n, const GLuint * ids);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLENDQUERYPROC)(GLenum);
+static void CODEGEN_FUNCPTR Switch_EndQuery(GLenum target);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGENBUFFERSPROC)(GLsizei, GLuint *);
+static void CODEGEN_FUNCPTR Switch_GenBuffers(GLsizei n, GLuint * buffers);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGENQUERIESPROC)(GLsizei, GLuint *);
+static void CODEGEN_FUNCPTR Switch_GenQueries(GLsizei n, GLuint * ids);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETBUFFERPARAMETERIVPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetBufferParameteriv(GLenum target, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETBUFFERPOINTERVPROC)(GLenum, GLenum, GLvoid **);
+static void CODEGEN_FUNCPTR Switch_GetBufferPointerv(GLenum target, GLenum pname, GLvoid ** params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETBUFFERSUBDATAPROC)(GLenum, GLintptr, GLsizeiptr, GLvoid *);
+static void CODEGEN_FUNCPTR Switch_GetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETQUERYOBJECTIVPROC)(GLuint, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetQueryObjectiv(GLuint id, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETQUERYOBJECTUIVPROC)(GLuint, GLenum, GLuint *);
+static void CODEGEN_FUNCPTR Switch_GetQueryObjectuiv(GLuint id, GLenum pname, GLuint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETQUERYIVPROC)(GLenum, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetQueryiv(GLenum target, GLenum pname, GLint * params);
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLISBUFFERPROC)(GLuint);
+static GLboolean CODEGEN_FUNCPTR Switch_IsBuffer(GLuint buffer);
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLISQUERYPROC)(GLuint);
+static GLboolean CODEGEN_FUNCPTR Switch_IsQuery(GLuint id);
+typedef void * (CODEGEN_FUNCPTR *PFN_PTRC_GLMAPBUFFERPROC)(GLenum, GLenum);
+static void * CODEGEN_FUNCPTR Switch_MapBuffer(GLenum target, GLenum access);
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLUNMAPBUFFERPROC)(GLenum);
+static GLboolean CODEGEN_FUNCPTR Switch_UnmapBuffer(GLenum target);
+
+// Extension: 2.0
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLATTACHSHADERPROC)(GLuint, GLuint);
+static void CODEGEN_FUNCPTR Switch_AttachShader(GLuint program, GLuint shader);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBINDATTRIBLOCATIONPROC)(GLuint, GLuint, const GLchar *);
+static void CODEGEN_FUNCPTR Switch_BindAttribLocation(GLuint program, GLuint index, const GLchar * name);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLBLENDEQUATIONSEPARATEPROC)(GLenum, GLenum);
+static void CODEGEN_FUNCPTR Switch_BlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLCOMPILESHADERPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_CompileShader(GLuint shader);
+typedef GLuint (CODEGEN_FUNCPTR *PFN_PTRC_GLCREATEPROGRAMPROC)();
+static GLuint CODEGEN_FUNCPTR Switch_CreateProgram();
+typedef GLuint (CODEGEN_FUNCPTR *PFN_PTRC_GLCREATESHADERPROC)(GLenum);
+static GLuint CODEGEN_FUNCPTR Switch_CreateShader(GLenum type);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDELETEPROGRAMPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_DeleteProgram(GLuint program);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDELETESHADERPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_DeleteShader(GLuint shader);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDETACHSHADERPROC)(GLuint, GLuint);
+static void CODEGEN_FUNCPTR Switch_DetachShader(GLuint program, GLuint shader);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDISABLEVERTEXATTRIBARRAYPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_DisableVertexAttribArray(GLuint index);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLDRAWBUFFERSPROC)(GLsizei, const GLenum *);
+static void CODEGEN_FUNCPTR Switch_DrawBuffers(GLsizei n, const GLenum * bufs);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLENABLEVERTEXATTRIBARRAYPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_EnableVertexAttribArray(GLuint index);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETACTIVEATTRIBPROC)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
+static void CODEGEN_FUNCPTR Switch_GetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETACTIVEUNIFORMPROC)(GLuint, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLchar *);
+static void CODEGEN_FUNCPTR Switch_GetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETATTACHEDSHADERSPROC)(GLuint, GLsizei, GLsizei *, GLuint *);
+static void CODEGEN_FUNCPTR Switch_GetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders);
+typedef GLint (CODEGEN_FUNCPTR *PFN_PTRC_GLGETATTRIBLOCATIONPROC)(GLuint, const GLchar *);
+static GLint CODEGEN_FUNCPTR Switch_GetAttribLocation(GLuint program, const GLchar * name);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETPROGRAMINFOLOGPROC)(GLuint, GLsizei, GLsizei *, GLchar *);
+static void CODEGEN_FUNCPTR Switch_GetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETPROGRAMIVPROC)(GLuint, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetProgramiv(GLuint program, GLenum pname, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETSHADERINFOLOGPROC)(GLuint, GLsizei, GLsizei *, GLchar *);
+static void CODEGEN_FUNCPTR Switch_GetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETSHADERSOURCEPROC)(GLuint, GLsizei, GLsizei *, GLchar *);
+static void CODEGEN_FUNCPTR Switch_GetShaderSource(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETSHADERIVPROC)(GLuint, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetShaderiv(GLuint shader, GLenum pname, GLint * params);
+typedef GLint (CODEGEN_FUNCPTR *PFN_PTRC_GLGETUNIFORMLOCATIONPROC)(GLuint, const GLchar *);
+static GLint CODEGEN_FUNCPTR Switch_GetUniformLocation(GLuint program, const GLchar * name);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETUNIFORMFVPROC)(GLuint, GLint, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetUniformfv(GLuint program, GLint location, GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETUNIFORMIVPROC)(GLuint, GLint, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetUniformiv(GLuint program, GLint location, GLint * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETVERTEXATTRIBPOINTERVPROC)(GLuint, GLenum, GLvoid **);
+static void CODEGEN_FUNCPTR Switch_GetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid ** pointer);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETVERTEXATTRIBDVPROC)(GLuint, GLenum, GLdouble *);
+static void CODEGEN_FUNCPTR Switch_GetVertexAttribdv(GLuint index, GLenum pname, GLdouble * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETVERTEXATTRIBFVPROC)(GLuint, GLenum, GLfloat *);
+static void CODEGEN_FUNCPTR Switch_GetVertexAttribfv(GLuint index, GLenum pname, GLfloat * params);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLGETVERTEXATTRIBIVPROC)(GLuint, GLenum, GLint *);
+static void CODEGEN_FUNCPTR Switch_GetVertexAttribiv(GLuint index, GLenum pname, GLint * params);
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLISPROGRAMPROC)(GLuint);
+static GLboolean CODEGEN_FUNCPTR Switch_IsProgram(GLuint program);
+typedef GLboolean (CODEGEN_FUNCPTR *PFN_PTRC_GLISSHADERPROC)(GLuint);
+static GLboolean CODEGEN_FUNCPTR Switch_IsShader(GLuint shader);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLLINKPROGRAMPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_LinkProgram(GLuint program);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSHADERSOURCEPROC)(GLuint, GLsizei, const GLchar *const*, const GLint *);
+static void CODEGEN_FUNCPTR Switch_ShaderSource(GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSTENCILFUNCSEPARATEPROC)(GLenum, GLenum, GLint, GLuint);
+static void CODEGEN_FUNCPTR Switch_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSTENCILMASKSEPARATEPROC)(GLenum, GLuint);
+static void CODEGEN_FUNCPTR Switch_StencilMaskSeparate(GLenum face, GLuint mask);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLSTENCILOPSEPARATEPROC)(GLenum, GLenum, GLenum, GLenum);
+static void CODEGEN_FUNCPTR Switch_StencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM1FPROC)(GLint, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Uniform1f(GLint location, GLfloat v0);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM1FVPROC)(GLint, GLsizei, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Uniform1fv(GLint location, GLsizei count, const GLfloat * value);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM1IPROC)(GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_Uniform1i(GLint location, GLint v0);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM1IVPROC)(GLint, GLsizei, const GLint *);
+static void CODEGEN_FUNCPTR Switch_Uniform1iv(GLint location, GLsizei count, const GLint * value);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM2FPROC)(GLint, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Uniform2f(GLint location, GLfloat v0, GLfloat v1);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM2FVPROC)(GLint, GLsizei, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Uniform2fv(GLint location, GLsizei count, const GLfloat * value);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM2IPROC)(GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_Uniform2i(GLint location, GLint v0, GLint v1);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM2IVPROC)(GLint, GLsizei, const GLint *);
+static void CODEGEN_FUNCPTR Switch_Uniform2iv(GLint location, GLsizei count, const GLint * value);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM3FPROC)(GLint, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Uniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM3FVPROC)(GLint, GLsizei, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Uniform3fv(GLint location, GLsizei count, const GLfloat * value);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM3IPROC)(GLint, GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_Uniform3i(GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM3IVPROC)(GLint, GLsizei, const GLint *);
+static void CODEGEN_FUNCPTR Switch_Uniform3iv(GLint location, GLsizei count, const GLint * value);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM4FPROC)(GLint, GLfloat, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_Uniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM4FVPROC)(GLint, GLsizei, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_Uniform4fv(GLint location, GLsizei count, const GLfloat * value);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM4IPROC)(GLint, GLint, GLint, GLint, GLint);
+static void CODEGEN_FUNCPTR Switch_Uniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORM4IVPROC)(GLint, GLsizei, const GLint *);
+static void CODEGEN_FUNCPTR Switch_Uniform4iv(GLint location, GLsizei count, const GLint * value);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORMMATRIX2FVPROC)(GLint, GLsizei, GLboolean, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORMMATRIX3FVPROC)(GLint, GLsizei, GLboolean, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORMMATRIX4FVPROC)(GLint, GLsizei, GLboolean, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUSEPROGRAMPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_UseProgram(GLuint program);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVALIDATEPROGRAMPROC)(GLuint);
+static void CODEGEN_FUNCPTR Switch_ValidateProgram(GLuint program);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB1DPROC)(GLuint, GLdouble);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib1d(GLuint index, GLdouble x);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB1DVPROC)(GLuint, const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib1dv(GLuint index, const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB1FPROC)(GLuint, GLfloat);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib1f(GLuint index, GLfloat x);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB1FVPROC)(GLuint, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib1fv(GLuint index, const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB1SPROC)(GLuint, GLshort);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib1s(GLuint index, GLshort x);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB1SVPROC)(GLuint, const GLshort *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib1sv(GLuint index, const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB2DPROC)(GLuint, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib2d(GLuint index, GLdouble x, GLdouble y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB2DVPROC)(GLuint, const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib2dv(GLuint index, const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB2FPROC)(GLuint, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib2f(GLuint index, GLfloat x, GLfloat y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB2FVPROC)(GLuint, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib2fv(GLuint index, const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB2SPROC)(GLuint, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib2s(GLuint index, GLshort x, GLshort y);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB2SVPROC)(GLuint, const GLshort *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib2sv(GLuint index, const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB3DPROC)(GLuint, GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB3DVPROC)(GLuint, const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib3dv(GLuint index, const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB3FPROC)(GLuint, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB3FVPROC)(GLuint, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib3fv(GLuint index, const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB3SPROC)(GLuint, GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB3SVPROC)(GLuint, const GLshort *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib3sv(GLuint index, const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4NBVPROC)(GLuint, const GLbyte *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4Nbv(GLuint index, const GLbyte * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4NIVPROC)(GLuint, const GLint *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4Niv(GLuint index, const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4NSVPROC)(GLuint, const GLshort *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4Nsv(GLuint index, const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4NUBPROC)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4NUBVPROC)(GLuint, const GLubyte *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4Nubv(GLuint index, const GLubyte * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4NUIVPROC)(GLuint, const GLuint *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4Nuiv(GLuint index, const GLuint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4NUSVPROC)(GLuint, const GLushort *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4Nusv(GLuint index, const GLushort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4BVPROC)(GLuint, const GLbyte *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4bv(GLuint index, const GLbyte * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4DPROC)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4DVPROC)(GLuint, const GLdouble *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4dv(GLuint index, const GLdouble * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4FPROC)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4FVPROC)(GLuint, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4fv(GLuint index, const GLfloat * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4IVPROC)(GLuint, const GLint *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4iv(GLuint index, const GLint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4SPROC)(GLuint, GLshort, GLshort, GLshort, GLshort);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4SVPROC)(GLuint, const GLshort *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4sv(GLuint index, const GLshort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4UBVPROC)(GLuint, const GLubyte *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4ubv(GLuint index, const GLubyte * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4UIVPROC)(GLuint, const GLuint *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4uiv(GLuint index, const GLuint * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIB4USVPROC)(GLuint, const GLushort *);
+static void CODEGEN_FUNCPTR Switch_VertexAttrib4usv(GLuint index, const GLushort * v);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLVERTEXATTRIBPOINTERPROC)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *);
+static void CODEGEN_FUNCPTR Switch_VertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer);
+
+// Extension: 2.1
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORMMATRIX2X3FVPROC)(GLint, GLsizei, GLboolean, const GLfloat *);
+static void CODEGEN_FUNCPTR Switch_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value);
+typedef void (CODEGEN_FUNCPTR *PFN_PTRC_GLUNIFORMMATRIX2X4FVPROC)(GLint, GLsizei, GLboolean, const GLfloat *);