diff --git a/examples/opengl/OpenGL.cpp b/examples/opengl/OpenGL.cpp
index c2d16978f..26d611d52 100644
--- a/examples/opengl/OpenGL.cpp
+++ b/examples/opengl/OpenGL.cpp
@@ -36,13 +36,6 @@ int main()
     text.setColor(sf::Color(255, 255, 255, 170));
     text.setPosition(250.f, 450.f);
 
-    // Make the window the active target for OpenGL calls
-    // Note: If using sf::Texture or sf::Shader with OpenGL,
-    // be sure to call sf::Texture::getMaximumSize() and/or
-    // sf::Shader::isAvailable() at least once before calling
-    // setActive(), as those functions will cause a context switch
-    window.setActive();
-
     // Load an OpenGL texture.
     // We could directly use a sf::Texture as an OpenGL texture (with its Bind() member function),
     // but here we want more control on it (generate mipmaps, ...) so we create a new one from an image
diff --git a/include/SFML/Graphics/Shader.hpp b/include/SFML/Graphics/Shader.hpp
index 55cc3bb73..505d878ab 100644
--- a/include/SFML/Graphics/Shader.hpp
+++ b/include/SFML/Graphics/Shader.hpp
@@ -498,9 +498,6 @@ public:
     /// the shader features. If it returns false, then
     /// any attempt to use sf::Shader will fail.
     ///
-    /// Note: The first call to this function, whether by your
-    /// code or SFML will result in a context switch.
-    ///
     /// \return True if shaders are supported, false otherwise
     ///
     ////////////////////////////////////////////////////////////
diff --git a/include/SFML/Graphics/Texture.hpp b/include/SFML/Graphics/Texture.hpp
index 247153136..39e312ee4 100644
--- a/include/SFML/Graphics/Texture.hpp
+++ b/include/SFML/Graphics/Texture.hpp
@@ -472,9 +472,6 @@ public:
     /// You can expect a value of 512 pixels for low-end graphics
     /// card, and up to 8192 pixels or more for newer hardware.
     ///
-    /// Note: The first call to this function, whether by your
-    /// code or SFML will result in a context switch.
-    ///
     /// \return Maximum size allowed for textures, in pixels
     ///
     ////////////////////////////////////////////////////////////
diff --git a/include/SFML/Window/Context.hpp b/include/SFML/Window/Context.hpp
index 29df67c0e..e8920c1db 100644
--- a/include/SFML/Window/Context.hpp
+++ b/include/SFML/Window/Context.hpp
@@ -77,7 +77,28 @@ public:
     ////////////////////////////////////////////////////////////
     bool setActive(bool active);
 
-public:
+    ////////////////////////////////////////////////////////////
+    /// \brief Get the settings of the context
+    ///
+    /// Note that these settings may be different than the ones
+    /// passed to the constructor; they are indeed adjusted if the
+    /// original settings are not directly supported by the system.
+    ///
+    /// \return Structure containing the settings
+    ///
+    ////////////////////////////////////////////////////////////
+    const ContextSettings& getSettings() const;
+
+    ////////////////////////////////////////////////////////////
+    /// \brief Check whether a given OpenGL extension is available
+    ///
+    /// \param name Name of the extension to check for
+    ///
+    /// \return True if available, false if unavailable
+    ///
+    ////////////////////////////////////////////////////////////
+    static bool isExtensionAvailable(const char* name);
+
     ////////////////////////////////////////////////////////////
     /// \brief Get the address of an OpenGL function
     ///
@@ -88,6 +109,14 @@ public:
     ////////////////////////////////////////////////////////////
     static GlFunctionPointer getFunction(const char* name);
 
+    ////////////////////////////////////////////////////////////
+    /// \brief Get the currently active context
+    ///
+    /// \return The currently active context or NULL if none is active
+    ///
+    ////////////////////////////////////////////////////////////
+    static const Context* getActiveContext();
+
     ////////////////////////////////////////////////////////////
     /// \brief Construct a in-memory context
     ///
diff --git a/src/SFML/Graphics/GLExtensions.cpp b/src/SFML/Graphics/GLExtensions.cpp
index 0c257e83a..3949ee3b6 100644
--- a/src/SFML/Graphics/GLExtensions.cpp
+++ b/src/SFML/Graphics/GLExtensions.cpp
@@ -26,6 +26,7 @@
 // Headers
 ////////////////////////////////////////////////////////////
 #include <SFML/Graphics/GLExtensions.hpp>
+#include <SFML/Window/Context.hpp>
 #include <SFML/System/Err.hpp>
 
 
@@ -40,9 +41,16 @@ void ensureExtensionsInit()
     static bool initialized = false;
     if (!initialized)
     {
+        const Context* context = Context::getActiveContext();
+
+        if (!context)
+            return;
+
         sfogl_LoadFunctions();
 
-        if (!sfogl_IsVersionGEQ(1, 1))
+        ContextSettings settings = context->getSettings();
+
+        if ((settings.majorVersion < 1) || ((settings.majorVersion == 1) && (settings.minorVersion < 1)))
         {
             err() << "sfml-graphics requires support for OpenGL 1.1 or greater" << std::endl;
             err() << "Ensure that hardware acceleration is enabled if available" << std::endl;
diff --git a/src/SFML/Graphics/GLExtensions.txt b/src/SFML/Graphics/GLExtensions.txt
index 033404d2d..7e84e8309 100644
--- a/src/SFML/Graphics/GLExtensions.txt
+++ b/src/SFML/Graphics/GLExtensions.txt
@@ -1,10 +1,8 @@
 // Created with:
-// https://bitbucket.org/KhronosGroup/glloadgen
-// Commit d143d66ac90d538ed06f806188714861b8e8e2f9
-// lua LoadGen.lua -style=pointer_c -spec=gl -version=1.1 -indent=space -prefix=sf -extfile=GLExtensions.txt GLLoader
+// lua LoadGen.lua
 
 SGIS_texture_edge_clamp
-//EXT_texture_edge_clamp
+EXT_texture_edge_clamp
 EXT_blend_minmax
 EXT_blend_subtract
 ARB_multitexture
diff --git a/src/SFML/Graphics/GLLoader.cpp b/src/SFML/Graphics/GLLoader.cpp
index e82cd7a2c..025a038b8 100644
--- a/src/SFML/Graphics/GLLoader.cpp
+++ b/src/SFML/Graphics/GLLoader.cpp
@@ -26,25 +26,9 @@
 // Headers
 ////////////////////////////////////////////////////////////
 #include <SFML/Graphics/GLLoader.hpp>
-#include <SFML/Graphics/GLCheck.hpp>
 #include <SFML/Window/Context.hpp>
-#include <cstdlib>
-#include <cstring>
-#include <cstddef>
 
-#if !defined(GL_MAJOR_VERSION)
-    #define GL_MAJOR_VERSION 0x821B
-#endif
-
-#if !defined(GL_MINOR_VERSION)
-    #define GL_MINOR_VERSION 0x821C
-#endif
-
-#if !defined(GL_NUM_EXTENSIONS)
-    #define GL_NUM_EXTENSIONS 0x821D
-#endif
-
-static sf::GlFunctionPointer IntGetProcAddress(const char* name)
+static sf::GlFunctionPointer glLoaderGetProcAddress(const char* name)
 {
     return sf::Context::getFunction(name);
 }
@@ -63,258 +47,762 @@ int sfogl_ext_ARB_texture_non_power_of_two = sfogl_LOAD_FAILED;
 int sfogl_ext_EXT_blend_equation_separate = sfogl_LOAD_FAILED;
 int sfogl_ext_EXT_framebuffer_object = sfogl_LOAD_FAILED;
 
-void (CODEGEN_FUNCPTR *sf_ptrc_glBlendEquationEXT)(GLenum) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glBlendEquationEXT)(GLenum) = NULL;
 
 static int Load_EXT_blend_minmax()
 {
     int numFailed = 0;
-    sf_ptrc_glBlendEquationEXT = (void (CODEGEN_FUNCPTR *)(GLenum))IntGetProcAddress("glBlendEquationEXT");
-    if(!sf_ptrc_glBlendEquationEXT) numFailed++;
+
+    sf_ptrc_glBlendEquationEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLenum)>(glLoaderGetProcAddress("glBlendEquationEXT"));
+    if (!sf_ptrc_glBlendEquationEXT)
+        numFailed++;
+
     return numFailed;
 }
 
-void (CODEGEN_FUNCPTR *sf_ptrc_glActiveTextureARB)(GLenum) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glClientActiveTextureARB)(GLenum) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glActiveTextureARB)(GLenum) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glClientActiveTextureARB)(GLenum) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1dARB)(GLenum, GLdouble) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1dvARB)(GLenum, const GLdouble*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1fARB)(GLenum, GLfloat) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1fvARB)(GLenum, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1iARB)(GLenum, GLint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1ivARB)(GLenum, const GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1sARB)(GLenum, GLshort) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1svARB)(GLenum, const GLshort*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2dARB)(GLenum, GLdouble, GLdouble) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2dvARB)(GLenum, const GLdouble*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2fARB)(GLenum, GLfloat, GLfloat) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2fvARB)(GLenum, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2iARB)(GLenum, GLint, GLint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2ivARB)(GLenum, const GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2sARB)(GLenum, GLshort, GLshort) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2svARB)(GLenum, const GLshort*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3dARB)(GLenum, GLdouble, GLdouble, GLdouble) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3dvARB)(GLenum, const GLdouble*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3fARB)(GLenum, GLfloat, GLfloat, GLfloat) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3fvARB)(GLenum, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3iARB)(GLenum, GLint, GLint, GLint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3ivARB)(GLenum, const GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3sARB)(GLenum, GLshort, GLshort, GLshort) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3svARB)(GLenum, const GLshort*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4dARB)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4dvARB)(GLenum, const GLdouble*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4fARB)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4fvARB)(GLenum, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4iARB)(GLenum, GLint, GLint, GLint, GLint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4ivARB)(GLenum, const GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4sARB)(GLenum, GLshort, GLshort, GLshort, GLshort) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4svARB)(GLenum, const GLshort*) = NULL;
 
 static int Load_ARB_multitexture()
 {
     int numFailed = 0;
-    sf_ptrc_glActiveTextureARB = (void (CODEGEN_FUNCPTR *)(GLenum))IntGetProcAddress("glActiveTextureARB");
-    if(!sf_ptrc_glActiveTextureARB) numFailed++;
-    sf_ptrc_glClientActiveTextureARB = (void (CODEGEN_FUNCPTR *)(GLenum))IntGetProcAddress("glClientActiveTextureARB");
-    if(!sf_ptrc_glClientActiveTextureARB) numFailed++;
+
+    sf_ptrc_glActiveTextureARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum)>(glLoaderGetProcAddress("glActiveTextureARB"));
+    if (!sf_ptrc_glActiveTextureARB)
+        numFailed++;
+
+    sf_ptrc_glClientActiveTextureARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum)>(glLoaderGetProcAddress("glClientActiveTextureARB"));
+    if (!sf_ptrc_glClientActiveTextureARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord1dARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLdouble)>(glLoaderGetProcAddress("glMultiTexCoord1dARB"));
+    if (!sf_ptrc_glMultiTexCoord1dARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord1dvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLdouble*)>(glLoaderGetProcAddress("glMultiTexCoord1dvARB"));
+    if (!sf_ptrc_glMultiTexCoord1dvARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord1fARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLfloat)>(glLoaderGetProcAddress("glMultiTexCoord1fARB"));
+    if (!sf_ptrc_glMultiTexCoord1fARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord1fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLfloat*)>(glLoaderGetProcAddress("glMultiTexCoord1fvARB"));
+    if (!sf_ptrc_glMultiTexCoord1fvARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord1iARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLint)>(glLoaderGetProcAddress("glMultiTexCoord1iARB"));
+    if (!sf_ptrc_glMultiTexCoord1iARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord1ivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLint*)>(glLoaderGetProcAddress("glMultiTexCoord1ivARB"));
+    if (!sf_ptrc_glMultiTexCoord1ivARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord1sARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLshort)>(glLoaderGetProcAddress("glMultiTexCoord1sARB"));
+    if (!sf_ptrc_glMultiTexCoord1sARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord1svARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLshort*)>(glLoaderGetProcAddress("glMultiTexCoord1svARB"));
+    if (!sf_ptrc_glMultiTexCoord1svARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord2dARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLdouble, GLdouble)>(glLoaderGetProcAddress("glMultiTexCoord2dARB"));
+    if (!sf_ptrc_glMultiTexCoord2dARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord2dvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLdouble*)>(glLoaderGetProcAddress("glMultiTexCoord2dvARB"));
+    if (!sf_ptrc_glMultiTexCoord2dvARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord2fARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLfloat, GLfloat)>(glLoaderGetProcAddress("glMultiTexCoord2fARB"));
+    if (!sf_ptrc_glMultiTexCoord2fARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord2fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLfloat*)>(glLoaderGetProcAddress("glMultiTexCoord2fvARB"));
+    if (!sf_ptrc_glMultiTexCoord2fvARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord2iARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLint, GLint)>(glLoaderGetProcAddress("glMultiTexCoord2iARB"));
+    if (!sf_ptrc_glMultiTexCoord2iARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord2ivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLint*)>(glLoaderGetProcAddress("glMultiTexCoord2ivARB"));
+    if (!sf_ptrc_glMultiTexCoord2ivARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord2sARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLshort, GLshort)>(glLoaderGetProcAddress("glMultiTexCoord2sARB"));
+    if (!sf_ptrc_glMultiTexCoord2sARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord2svARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLshort*)>(glLoaderGetProcAddress("glMultiTexCoord2svARB"));
+    if (!sf_ptrc_glMultiTexCoord2svARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord3dARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLdouble, GLdouble, GLdouble)>(glLoaderGetProcAddress("glMultiTexCoord3dARB"));
+    if (!sf_ptrc_glMultiTexCoord3dARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord3dvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLdouble*)>(glLoaderGetProcAddress("glMultiTexCoord3dvARB"));
+    if (!sf_ptrc_glMultiTexCoord3dvARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord3fARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLfloat, GLfloat, GLfloat)>(glLoaderGetProcAddress("glMultiTexCoord3fARB"));
+    if (!sf_ptrc_glMultiTexCoord3fARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord3fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLfloat*)>(glLoaderGetProcAddress("glMultiTexCoord3fvARB"));
+    if (!sf_ptrc_glMultiTexCoord3fvARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord3iARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLint, GLint, GLint)>(glLoaderGetProcAddress("glMultiTexCoord3iARB"));
+    if (!sf_ptrc_glMultiTexCoord3iARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord3ivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLint*)>(glLoaderGetProcAddress("glMultiTexCoord3ivARB"));
+    if (!sf_ptrc_glMultiTexCoord3ivARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord3sARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLshort, GLshort, GLshort)>(glLoaderGetProcAddress("glMultiTexCoord3sARB"));
+    if (!sf_ptrc_glMultiTexCoord3sARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord3svARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLshort*)>(glLoaderGetProcAddress("glMultiTexCoord3svARB"));
+    if (!sf_ptrc_glMultiTexCoord3svARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord4dARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble)>(glLoaderGetProcAddress("glMultiTexCoord4dARB"));
+    if (!sf_ptrc_glMultiTexCoord4dARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord4dvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLdouble*)>(glLoaderGetProcAddress("glMultiTexCoord4dvARB"));
+    if (!sf_ptrc_glMultiTexCoord4dvARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord4fARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat)>(glLoaderGetProcAddress("glMultiTexCoord4fARB"));
+    if (!sf_ptrc_glMultiTexCoord4fARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord4fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLfloat*)>(glLoaderGetProcAddress("glMultiTexCoord4fvARB"));
+    if (!sf_ptrc_glMultiTexCoord4fvARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord4iARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLint, GLint, GLint, GLint)>(glLoaderGetProcAddress("glMultiTexCoord4iARB"));
+    if (!sf_ptrc_glMultiTexCoord4iARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord4ivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLint*)>(glLoaderGetProcAddress("glMultiTexCoord4ivARB"));
+    if (!sf_ptrc_glMultiTexCoord4ivARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord4sARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLshort, GLshort, GLshort, GLshort)>(glLoaderGetProcAddress("glMultiTexCoord4sARB"));
+    if (!sf_ptrc_glMultiTexCoord4sARB)
+        numFailed++;
+
+    sf_ptrc_glMultiTexCoord4svARB = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, const GLshort*)>(glLoaderGetProcAddress("glMultiTexCoord4svARB"));
+    if (!sf_ptrc_glMultiTexCoord4svARB)
+        numFailed++;
+
     return numFailed;
 }
 
-void (CODEGEN_FUNCPTR *sf_ptrc_glBlendFuncSeparateEXT)(GLenum, GLenum, GLenum, GLenum) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glBlendFuncSeparateEXT)(GLenum, GLenum, GLenum, GLenum) = NULL;
 
 static int Load_EXT_blend_func_separate()
 {
     int numFailed = 0;
-    sf_ptrc_glBlendFuncSeparateEXT = (void (CODEGEN_FUNCPTR *)(GLenum, GLenum, GLenum, GLenum))IntGetProcAddress("glBlendFuncSeparateEXT");
-    if(!sf_ptrc_glBlendFuncSeparateEXT) numFailed++;
+
+    sf_ptrc_glBlendFuncSeparateEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLenum, GLenum, GLenum)>(glLoaderGetProcAddress("glBlendFuncSeparateEXT"));
+    if (!sf_ptrc_glBlendFuncSeparateEXT)
+        numFailed++;
+
     return numFailed;
 }
 
-void (CODEGEN_FUNCPTR *sf_ptrc_glAttachObjectARB)(GLhandleARB, GLhandleARB) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glCompileShaderARB)(GLhandleARB) = NULL;
-GLhandleARB (CODEGEN_FUNCPTR *sf_ptrc_glCreateProgramObjectARB)() = NULL;
-GLhandleARB (CODEGEN_FUNCPTR *sf_ptrc_glCreateShaderObjectARB)(GLenum) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glDeleteObjectARB)(GLhandleARB) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glDetachObjectARB)(GLhandleARB, GLhandleARB) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGetActiveUniformARB)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGetAttachedObjectsARB)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *) = NULL;
-GLhandleARB (CODEGEN_FUNCPTR *sf_ptrc_glGetHandleARB)(GLenum) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGetInfoLogARB)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGetObjectParameterfvARB)(GLhandleARB, GLenum, GLfloat *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGetObjectParameterivARB)(GLhandleARB, GLenum, GLint *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGetShaderSourceARB)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *) = NULL;
-GLint (CODEGEN_FUNCPTR *sf_ptrc_glGetUniformLocationARB)(GLhandleARB, const GLcharARB *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGetUniformfvARB)(GLhandleARB, GLint, GLfloat *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGetUniformivARB)(GLhandleARB, GLint, GLint *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glLinkProgramARB)(GLhandleARB) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glShaderSourceARB)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform1fARB)(GLint, GLfloat) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform1fvARB)(GLint, GLsizei, const GLfloat *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform1iARB)(GLint, GLint) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform1ivARB)(GLint, GLsizei, const GLint *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform2fARB)(GLint, GLfloat, GLfloat) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform2fvARB)(GLint, GLsizei, const GLfloat *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform2iARB)(GLint, GLint, GLint) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform2ivARB)(GLint, GLsizei, const GLint *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform3fARB)(GLint, GLfloat, GLfloat, GLfloat) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform3fvARB)(GLint, GLsizei, const GLfloat *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform3iARB)(GLint, GLint, GLint, GLint) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform3ivARB)(GLint, GLsizei, const GLint *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform4fARB)(GLint, GLfloat, GLfloat, GLfloat, GLfloat) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform4fvARB)(GLint, GLsizei, const GLfloat *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform4iARB)(GLint, GLint, GLint, GLint, GLint) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniform4ivARB)(GLint, GLsizei, const GLint *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniformMatrix2fvARB)(GLint, GLsizei, GLboolean, const GLfloat *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniformMatrix3fvARB)(GLint, GLsizei, GLboolean, const GLfloat *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUniformMatrix4fvARB)(GLint, GLsizei, GLboolean, const GLfloat *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glUseProgramObjectARB)(GLhandleARB) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glValidateProgramARB)(GLhandleARB) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glAttachObjectARB)(GLhandleARB, GLhandleARB) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glCompileShaderARB)(GLhandleARB) = NULL;
+GLhandleARB (GL_FUNCPTR *sf_ptrc_glCreateProgramObjectARB)() = NULL;
+GLhandleARB (GL_FUNCPTR *sf_ptrc_glCreateShaderObjectARB)(GLenum) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glDeleteObjectARB)(GLhandleARB) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glDetachObjectARB)(GLhandleARB, GLhandleARB) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetActiveUniformARB)(GLhandleARB, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLcharARB*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetAttachedObjectsARB)(GLhandleARB, GLsizei, GLsizei*, GLhandleARB*) = NULL;
+GLhandleARB (GL_FUNCPTR *sf_ptrc_glGetHandleARB)(GLenum) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetInfoLogARB)(GLhandleARB, GLsizei, GLsizei*, GLcharARB*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetObjectParameterfvARB)(GLhandleARB, GLenum, GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetObjectParameterivARB)(GLhandleARB, GLenum, GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetShaderSourceARB)(GLhandleARB, GLsizei, GLsizei*, GLcharARB*) = NULL;
+GLint (GL_FUNCPTR *sf_ptrc_glGetUniformLocationARB)(GLhandleARB, const GLcharARB*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetUniformfvARB)(GLhandleARB, GLint, GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetUniformivARB)(GLhandleARB, GLint, GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glLinkProgramARB)(GLhandleARB) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glShaderSourceARB)(GLhandleARB, GLsizei, const GLcharARB**, const GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform1fARB)(GLint, GLfloat) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform1fvARB)(GLint, GLsizei, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform1iARB)(GLint, GLint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform1ivARB)(GLint, GLsizei, const GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform2fARB)(GLint, GLfloat, GLfloat) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform2fvARB)(GLint, GLsizei, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform2iARB)(GLint, GLint, GLint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform2ivARB)(GLint, GLsizei, const GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform3fARB)(GLint, GLfloat, GLfloat, GLfloat) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform3fvARB)(GLint, GLsizei, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform3iARB)(GLint, GLint, GLint, GLint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform3ivARB)(GLint, GLsizei, const GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform4fARB)(GLint, GLfloat, GLfloat, GLfloat, GLfloat) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform4fvARB)(GLint, GLsizei, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform4iARB)(GLint, GLint, GLint, GLint, GLint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniform4ivARB)(GLint, GLsizei, const GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniformMatrix2fvARB)(GLint, GLsizei, GLboolean, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniformMatrix3fvARB)(GLint, GLsizei, GLboolean, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUniformMatrix4fvARB)(GLint, GLsizei, GLboolean, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glUseProgramObjectARB)(GLhandleARB) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glValidateProgramARB)(GLhandleARB) = NULL;
 
 static int Load_ARB_shader_objects()
 {
     int numFailed = 0;
-    sf_ptrc_glAttachObjectARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB, GLhandleARB))IntGetProcAddress("glAttachObjectARB");
-    if(!sf_ptrc_glAttachObjectARB) numFailed++;
-    sf_ptrc_glCompileShaderARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB))IntGetProcAddress("glCompileShaderARB");
-    if(!sf_ptrc_glCompileShaderARB) numFailed++;
-    sf_ptrc_glCreateProgramObjectARB = (GLhandleARB (CODEGEN_FUNCPTR *)())IntGetProcAddress("glCreateProgramObjectARB");
-    if(!sf_ptrc_glCreateProgramObjectARB) numFailed++;
-    sf_ptrc_glCreateShaderObjectARB = (GLhandleARB (CODEGEN_FUNCPTR *)(GLenum))IntGetProcAddress("glCreateShaderObjectARB");
-    if(!sf_ptrc_glCreateShaderObjectARB) numFailed++;
-    sf_ptrc_glDeleteObjectARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB))IntGetProcAddress("glDeleteObjectARB");
-    if(!sf_ptrc_glDeleteObjectARB) numFailed++;
-    sf_ptrc_glDetachObjectARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB, GLhandleARB))IntGetProcAddress("glDetachObjectARB");
-    if(!sf_ptrc_glDetachObjectARB) numFailed++;
-    sf_ptrc_glGetActiveUniformARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *))IntGetProcAddress("glGetActiveUniformARB");
-    if(!sf_ptrc_glGetActiveUniformARB) numFailed++;
-    sf_ptrc_glGetAttachedObjectsARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *))IntGetProcAddress("glGetAttachedObjectsARB");
-    if(!sf_ptrc_glGetAttachedObjectsARB) numFailed++;
-    sf_ptrc_glGetHandleARB = (GLhandleARB (CODEGEN_FUNCPTR *)(GLenum))IntGetProcAddress("glGetHandleARB");
-    if(!sf_ptrc_glGetHandleARB) numFailed++;
-    sf_ptrc_glGetInfoLogARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *))IntGetProcAddress("glGetInfoLogARB");
-    if(!sf_ptrc_glGetInfoLogARB) numFailed++;
-    sf_ptrc_glGetObjectParameterfvARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB, GLenum, GLfloat *))IntGetProcAddress("glGetObjectParameterfvARB");
-    if(!sf_ptrc_glGetObjectParameterfvARB) numFailed++;
-    sf_ptrc_glGetObjectParameterivARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB, GLenum, GLint *))IntGetProcAddress("glGetObjectParameterivARB");
-    if(!sf_ptrc_glGetObjectParameterivARB) numFailed++;
-    sf_ptrc_glGetShaderSourceARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *))IntGetProcAddress("glGetShaderSourceARB");
-    if(!sf_ptrc_glGetShaderSourceARB) numFailed++;
-    sf_ptrc_glGetUniformLocationARB = (GLint (CODEGEN_FUNCPTR *)(GLhandleARB, const GLcharARB *))IntGetProcAddress("glGetUniformLocationARB");
-    if(!sf_ptrc_glGetUniformLocationARB) numFailed++;
-    sf_ptrc_glGetUniformfvARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB, GLint, GLfloat *))IntGetProcAddress("glGetUniformfvARB");
-    if(!sf_ptrc_glGetUniformfvARB) numFailed++;
-    sf_ptrc_glGetUniformivARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB, GLint, GLint *))IntGetProcAddress("glGetUniformivARB");
-    if(!sf_ptrc_glGetUniformivARB) numFailed++;
-    sf_ptrc_glLinkProgramARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB))IntGetProcAddress("glLinkProgramARB");
-    if(!sf_ptrc_glLinkProgramARB) numFailed++;
-    sf_ptrc_glShaderSourceARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *))IntGetProcAddress("glShaderSourceARB");
-    if(!sf_ptrc_glShaderSourceARB) numFailed++;
-    sf_ptrc_glUniform1fARB = (void (CODEGEN_FUNCPTR *)(GLint, GLfloat))IntGetProcAddress("glUniform1fARB");
-    if(!sf_ptrc_glUniform1fARB) numFailed++;
-    sf_ptrc_glUniform1fvARB = (void (CODEGEN_FUNCPTR *)(GLint, GLsizei, const GLfloat *))IntGetProcAddress("glUniform1fvARB");
-    if(!sf_ptrc_glUniform1fvARB) numFailed++;
-    sf_ptrc_glUniform1iARB = (void (CODEGEN_FUNCPTR *)(GLint, GLint))IntGetProcAddress("glUniform1iARB");
-    if(!sf_ptrc_glUniform1iARB) numFailed++;
-    sf_ptrc_glUniform1ivARB = (void (CODEGEN_FUNCPTR *)(GLint, GLsizei, const GLint *))IntGetProcAddress("glUniform1ivARB");
-    if(!sf_ptrc_glUniform1ivARB) numFailed++;
-    sf_ptrc_glUniform2fARB = (void (CODEGEN_FUNCPTR *)(GLint, GLfloat, GLfloat))IntGetProcAddress("glUniform2fARB");
-    if(!sf_ptrc_glUniform2fARB) numFailed++;
-    sf_ptrc_glUniform2fvARB = (void (CODEGEN_FUNCPTR *)(GLint, GLsizei, const GLfloat *))IntGetProcAddress("glUniform2fvARB");
-    if(!sf_ptrc_glUniform2fvARB) numFailed++;
-    sf_ptrc_glUniform2iARB = (void (CODEGEN_FUNCPTR *)(GLint, GLint, GLint))IntGetProcAddress("glUniform2iARB");
-    if(!sf_ptrc_glUniform2iARB) numFailed++;
-    sf_ptrc_glUniform2ivARB = (void (CODEGEN_FUNCPTR *)(GLint, GLsizei, const GLint *))IntGetProcAddress("glUniform2ivARB");
-    if(!sf_ptrc_glUniform2ivARB) numFailed++;
-    sf_ptrc_glUniform3fARB = (void (CODEGEN_FUNCPTR *)(GLint, GLfloat, GLfloat, GLfloat))IntGetProcAddress("glUniform3fARB");
-    if(!sf_ptrc_glUniform3fARB) numFailed++;
-    sf_ptrc_glUniform3fvARB = (void (CODEGEN_FUNCPTR *)(GLint, GLsizei, const GLfloat *))IntGetProcAddress("glUniform3fvARB");
-    if(!sf_ptrc_glUniform3fvARB) numFailed++;
-    sf_ptrc_glUniform3iARB = (void (CODEGEN_FUNCPTR *)(GLint, GLint, GLint, GLint))IntGetProcAddress("glUniform3iARB");
-    if(!sf_ptrc_glUniform3iARB) numFailed++;
-    sf_ptrc_glUniform3ivARB = (void (CODEGEN_FUNCPTR *)(GLint, GLsizei, const GLint *))IntGetProcAddress("glUniform3ivARB");
-    if(!sf_ptrc_glUniform3ivARB) numFailed++;
-    sf_ptrc_glUniform4fARB = (void (CODEGEN_FUNCPTR *)(GLint, GLfloat, GLfloat, GLfloat, GLfloat))IntGetProcAddress("glUniform4fARB");
-    if(!sf_ptrc_glUniform4fARB) numFailed++;
-    sf_ptrc_glUniform4fvARB = (void (CODEGEN_FUNCPTR *)(GLint, GLsizei, const GLfloat *))IntGetProcAddress("glUniform4fvARB");
-    if(!sf_ptrc_glUniform4fvARB) numFailed++;
-    sf_ptrc_glUniform4iARB = (void (CODEGEN_FUNCPTR *)(GLint, GLint, GLint, GLint, GLint))IntGetProcAddress("glUniform4iARB");
-    if(!sf_ptrc_glUniform4iARB) numFailed++;
-    sf_ptrc_glUniform4ivARB = (void (CODEGEN_FUNCPTR *)(GLint, GLsizei, const GLint *))IntGetProcAddress("glUniform4ivARB");
-    if(!sf_ptrc_glUniform4ivARB) numFailed++;
-    sf_ptrc_glUniformMatrix2fvARB = (void (CODEGEN_FUNCPTR *)(GLint, GLsizei, GLboolean, const GLfloat *))IntGetProcAddress("glUniformMatrix2fvARB");
-    if(!sf_ptrc_glUniformMatrix2fvARB) numFailed++;
-    sf_ptrc_glUniformMatrix3fvARB = (void (CODEGEN_FUNCPTR *)(GLint, GLsizei, GLboolean, const GLfloat *))IntGetProcAddress("glUniformMatrix3fvARB");
-    if(!sf_ptrc_glUniformMatrix3fvARB) numFailed++;
-    sf_ptrc_glUniformMatrix4fvARB = (void (CODEGEN_FUNCPTR *)(GLint, GLsizei, GLboolean, const GLfloat *))IntGetProcAddress("glUniformMatrix4fvARB");
-    if(!sf_ptrc_glUniformMatrix4fvARB) numFailed++;
-    sf_ptrc_glUseProgramObjectARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB))IntGetProcAddress("glUseProgramObjectARB");
-    if(!sf_ptrc_glUseProgramObjectARB) numFailed++;
-    sf_ptrc_glValidateProgramARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB))IntGetProcAddress("glValidateProgramARB");
-    if(!sf_ptrc_glValidateProgramARB) numFailed++;
+
+    sf_ptrc_glAttachObjectARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB, GLhandleARB)>(glLoaderGetProcAddress("glAttachObjectARB"));
+    if (!sf_ptrc_glAttachObjectARB)
+        numFailed++;
+
+    sf_ptrc_glCompileShaderARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB)>(glLoaderGetProcAddress("glCompileShaderARB"));
+    if (!sf_ptrc_glCompileShaderARB)
+        numFailed++;
+
+    sf_ptrc_glCreateProgramObjectARB = reinterpret_cast<GLhandleARB (GL_FUNCPTR *)()>(glLoaderGetProcAddress("glCreateProgramObjectARB"));
+    if (!sf_ptrc_glCreateProgramObjectARB)
+        numFailed++;
+
+    sf_ptrc_glCreateShaderObjectARB = reinterpret_cast<GLhandleARB (GL_FUNCPTR *)(GLenum)>(glLoaderGetProcAddress("glCreateShaderObjectARB"));
+    if (!sf_ptrc_glCreateShaderObjectARB)
+        numFailed++;
+
+    sf_ptrc_glDeleteObjectARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB)>(glLoaderGetProcAddress("glDeleteObjectARB"));
+    if (!sf_ptrc_glDeleteObjectARB)
+        numFailed++;
+
+    sf_ptrc_glDetachObjectARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB, GLhandleARB)>(glLoaderGetProcAddress("glDetachObjectARB"));
+    if (!sf_ptrc_glDetachObjectARB)
+        numFailed++;
+
+    sf_ptrc_glGetActiveUniformARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLcharARB*)>(glLoaderGetProcAddress("glGetActiveUniformARB"));
+    if (!sf_ptrc_glGetActiveUniformARB)
+        numFailed++;
+
+    sf_ptrc_glGetAttachedObjectsARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB, GLsizei, GLsizei*, GLhandleARB*)>(glLoaderGetProcAddress("glGetAttachedObjectsARB"));
+    if (!sf_ptrc_glGetAttachedObjectsARB)
+        numFailed++;
+
+    sf_ptrc_glGetHandleARB = reinterpret_cast<GLhandleARB (GL_FUNCPTR *)(GLenum)>(glLoaderGetProcAddress("glGetHandleARB"));
+    if (!sf_ptrc_glGetHandleARB)
+        numFailed++;
+
+    sf_ptrc_glGetInfoLogARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB, GLsizei, GLsizei*, GLcharARB*)>(glLoaderGetProcAddress("glGetInfoLogARB"));
+    if (!sf_ptrc_glGetInfoLogARB)
+        numFailed++;
+
+    sf_ptrc_glGetObjectParameterfvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB, GLenum, GLfloat*)>(glLoaderGetProcAddress("glGetObjectParameterfvARB"));
+    if (!sf_ptrc_glGetObjectParameterfvARB)
+        numFailed++;
+
+    sf_ptrc_glGetObjectParameterivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB, GLenum, GLint*)>(glLoaderGetProcAddress("glGetObjectParameterivARB"));
+    if (!sf_ptrc_glGetObjectParameterivARB)
+        numFailed++;
+
+    sf_ptrc_glGetShaderSourceARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB, GLsizei, GLsizei*, GLcharARB*)>(glLoaderGetProcAddress("glGetShaderSourceARB"));
+    if (!sf_ptrc_glGetShaderSourceARB)
+        numFailed++;
+
+    sf_ptrc_glGetUniformLocationARB = reinterpret_cast<GLint (GL_FUNCPTR *)(GLhandleARB, const GLcharARB*)>(glLoaderGetProcAddress("glGetUniformLocationARB"));
+    if (!sf_ptrc_glGetUniformLocationARB)
+        numFailed++;
+
+    sf_ptrc_glGetUniformfvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB, GLint, GLfloat*)>(glLoaderGetProcAddress("glGetUniformfvARB"));
+    if (!sf_ptrc_glGetUniformfvARB)
+        numFailed++;
+
+    sf_ptrc_glGetUniformivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB, GLint, GLint*)>(glLoaderGetProcAddress("glGetUniformivARB"));
+    if (!sf_ptrc_glGetUniformivARB)
+        numFailed++;
+
+    sf_ptrc_glLinkProgramARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB)>(glLoaderGetProcAddress("glLinkProgramARB"));
+    if (!sf_ptrc_glLinkProgramARB)
+        numFailed++;
+
+    sf_ptrc_glShaderSourceARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB, GLsizei, const GLcharARB**, const GLint*)>(glLoaderGetProcAddress("glShaderSourceARB"));
+    if (!sf_ptrc_glShaderSourceARB)
+        numFailed++;
+
+    sf_ptrc_glUniform1fARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLfloat)>(glLoaderGetProcAddress("glUniform1fARB"));
+    if (!sf_ptrc_glUniform1fARB)
+        numFailed++;
+
+    sf_ptrc_glUniform1fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLsizei, const GLfloat*)>(glLoaderGetProcAddress("glUniform1fvARB"));
+    if (!sf_ptrc_glUniform1fvARB)
+        numFailed++;
+
+    sf_ptrc_glUniform1iARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLint)>(glLoaderGetProcAddress("glUniform1iARB"));
+    if (!sf_ptrc_glUniform1iARB)
+        numFailed++;
+
+    sf_ptrc_glUniform1ivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLsizei, const GLint*)>(glLoaderGetProcAddress("glUniform1ivARB"));
+    if (!sf_ptrc_glUniform1ivARB)
+        numFailed++;
+
+    sf_ptrc_glUniform2fARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLfloat, GLfloat)>(glLoaderGetProcAddress("glUniform2fARB"));
+    if (!sf_ptrc_glUniform2fARB)
+        numFailed++;
+
+    sf_ptrc_glUniform2fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLsizei, const GLfloat*)>(glLoaderGetProcAddress("glUniform2fvARB"));
+    if (!sf_ptrc_glUniform2fvARB)
+        numFailed++;
+
+    sf_ptrc_glUniform2iARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLint, GLint)>(glLoaderGetProcAddress("glUniform2iARB"));
+    if (!sf_ptrc_glUniform2iARB)
+        numFailed++;
+
+    sf_ptrc_glUniform2ivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLsizei, const GLint*)>(glLoaderGetProcAddress("glUniform2ivARB"));
+    if (!sf_ptrc_glUniform2ivARB)
+        numFailed++;
+
+    sf_ptrc_glUniform3fARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLfloat, GLfloat, GLfloat)>(glLoaderGetProcAddress("glUniform3fARB"));
+    if (!sf_ptrc_glUniform3fARB)
+        numFailed++;
+
+    sf_ptrc_glUniform3fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLsizei, const GLfloat*)>(glLoaderGetProcAddress("glUniform3fvARB"));
+    if (!sf_ptrc_glUniform3fvARB)
+        numFailed++;
+
+    sf_ptrc_glUniform3iARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLint, GLint, GLint)>(glLoaderGetProcAddress("glUniform3iARB"));
+    if (!sf_ptrc_glUniform3iARB)
+        numFailed++;
+
+    sf_ptrc_glUniform3ivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLsizei, const GLint*)>(glLoaderGetProcAddress("glUniform3ivARB"));
+    if (!sf_ptrc_glUniform3ivARB)
+        numFailed++;
+
+    sf_ptrc_glUniform4fARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLfloat, GLfloat, GLfloat, GLfloat)>(glLoaderGetProcAddress("glUniform4fARB"));
+    if (!sf_ptrc_glUniform4fARB)
+        numFailed++;
+
+    sf_ptrc_glUniform4fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLsizei, const GLfloat*)>(glLoaderGetProcAddress("glUniform4fvARB"));
+    if (!sf_ptrc_glUniform4fvARB)
+        numFailed++;
+
+    sf_ptrc_glUniform4iARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLint, GLint, GLint, GLint)>(glLoaderGetProcAddress("glUniform4iARB"));
+    if (!sf_ptrc_glUniform4iARB)
+        numFailed++;
+
+    sf_ptrc_glUniform4ivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLsizei, const GLint*)>(glLoaderGetProcAddress("glUniform4ivARB"));
+    if (!sf_ptrc_glUniform4ivARB)
+        numFailed++;
+
+    sf_ptrc_glUniformMatrix2fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLsizei, GLboolean, const GLfloat*)>(glLoaderGetProcAddress("glUniformMatrix2fvARB"));
+    if (!sf_ptrc_glUniformMatrix2fvARB)
+        numFailed++;
+
+    sf_ptrc_glUniformMatrix3fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLsizei, GLboolean, const GLfloat*)>(glLoaderGetProcAddress("glUniformMatrix3fvARB"));
+    if (!sf_ptrc_glUniformMatrix3fvARB)
+        numFailed++;
+
+    sf_ptrc_glUniformMatrix4fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLint, GLsizei, GLboolean, const GLfloat*)>(glLoaderGetProcAddress("glUniformMatrix4fvARB"));
+    if (!sf_ptrc_glUniformMatrix4fvARB)
+        numFailed++;
+
+    sf_ptrc_glUseProgramObjectARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB)>(glLoaderGetProcAddress("glUseProgramObjectARB"));
+    if (!sf_ptrc_glUseProgramObjectARB)
+        numFailed++;
+
+    sf_ptrc_glValidateProgramARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB)>(glLoaderGetProcAddress("glValidateProgramARB"));
+    if (!sf_ptrc_glValidateProgramARB)
+        numFailed++;
+
     return numFailed;
 }
 
-void (CODEGEN_FUNCPTR *sf_ptrc_glBindAttribLocationARB)(GLhandleARB, GLuint, const GLcharARB *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGetActiveAttribARB)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *) = NULL;
-GLint (CODEGEN_FUNCPTR *sf_ptrc_glGetAttribLocationARB)(GLhandleARB, const GLcharARB *) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glBindAttribLocationARB)(GLhandleARB, GLuint, const GLcharARB*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glDisableVertexAttribArrayARB)(GLuint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glEnableVertexAttribArrayARB)(GLuint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetActiveAttribARB)(GLhandleARB, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLcharARB*) = NULL;
+GLint (GL_FUNCPTR *sf_ptrc_glGetAttribLocationARB)(GLhandleARB, const GLcharARB*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetVertexAttribPointervARB)(GLuint, GLenum, void**) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetVertexAttribdvARB)(GLuint, GLenum, GLdouble*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetVertexAttribfvARB)(GLuint, GLenum, GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetVertexAttribivARB)(GLuint, GLenum, GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib1dARB)(GLuint, GLdouble) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib1dvARB)(GLuint, const GLdouble*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib1fARB)(GLuint, GLfloat) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib1fvARB)(GLuint, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib1sARB)(GLuint, GLshort) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib1svARB)(GLuint, const GLshort*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib2dARB)(GLuint, GLdouble, GLdouble) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib2dvARB)(GLuint, const GLdouble*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib2fARB)(GLuint, GLfloat, GLfloat) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib2fvARB)(GLuint, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib2sARB)(GLuint, GLshort, GLshort) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib2svARB)(GLuint, const GLshort*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib3dARB)(GLuint, GLdouble, GLdouble, GLdouble) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib3dvARB)(GLuint, const GLdouble*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib3fARB)(GLuint, GLfloat, GLfloat, GLfloat) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib3fvARB)(GLuint, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib3sARB)(GLuint, GLshort, GLshort, GLshort) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib3svARB)(GLuint, const GLshort*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NbvARB)(GLuint, const GLbyte*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NivARB)(GLuint, const GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NsvARB)(GLuint, const GLshort*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NubARB)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NubvARB)(GLuint, const GLubyte*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NuivARB)(GLuint, const GLuint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NusvARB)(GLuint, const GLushort*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4bvARB)(GLuint, const GLbyte*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4dARB)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4dvARB)(GLuint, const GLdouble*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4fARB)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4fvARB)(GLuint, const GLfloat*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4ivARB)(GLuint, const GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4sARB)(GLuint, GLshort, GLshort, GLshort, GLshort) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4svARB)(GLuint, const GLshort*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4ubvARB)(GLuint, const GLubyte*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4uivARB)(GLuint, const GLuint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4usvARB)(GLuint, const GLushort*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glVertexAttribPointerARB)(GLuint, GLint, GLenum, GLboolean, GLsizei, const void*) = NULL;
 
 static int Load_ARB_vertex_shader()
 {
     int numFailed = 0;
-    sf_ptrc_glBindAttribLocationARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB, GLuint, const GLcharARB *))IntGetProcAddress("glBindAttribLocationARB");
-    if(!sf_ptrc_glBindAttribLocationARB) numFailed++;
-    sf_ptrc_glGetActiveAttribARB = (void (CODEGEN_FUNCPTR *)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *))IntGetProcAddress("glGetActiveAttribARB");
-    if(!sf_ptrc_glGetActiveAttribARB) numFailed++;
-    sf_ptrc_glGetAttribLocationARB = (GLint (CODEGEN_FUNCPTR *)(GLhandleARB, const GLcharARB *))IntGetProcAddress("glGetAttribLocationARB");
-    if(!sf_ptrc_glGetAttribLocationARB) numFailed++;
+
+    sf_ptrc_glBindAttribLocationARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB, GLuint, const GLcharARB*)>(glLoaderGetProcAddress("glBindAttribLocationARB"));
+    if (!sf_ptrc_glBindAttribLocationARB)
+        numFailed++;
+
+    sf_ptrc_glDisableVertexAttribArrayARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint)>(glLoaderGetProcAddress("glDisableVertexAttribArrayARB"));
+    if (!sf_ptrc_glDisableVertexAttribArrayARB)
+        numFailed++;
+
+    sf_ptrc_glEnableVertexAttribArrayARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint)>(glLoaderGetProcAddress("glEnableVertexAttribArrayARB"));
+    if (!sf_ptrc_glEnableVertexAttribArrayARB)
+        numFailed++;
+
+    sf_ptrc_glGetActiveAttribARB = reinterpret_cast<void (GL_FUNCPTR *)(GLhandleARB, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLcharARB*)>(glLoaderGetProcAddress("glGetActiveAttribARB"));
+    if (!sf_ptrc_glGetActiveAttribARB)
+        numFailed++;
+
+    sf_ptrc_glGetAttribLocationARB = reinterpret_cast<GLint (GL_FUNCPTR *)(GLhandleARB, const GLcharARB*)>(glLoaderGetProcAddress("glGetAttribLocationARB"));
+    if (!sf_ptrc_glGetAttribLocationARB)
+        numFailed++;
+
+    sf_ptrc_glGetVertexAttribPointervARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLenum, void**)>(glLoaderGetProcAddress("glGetVertexAttribPointervARB"));
+    if (!sf_ptrc_glGetVertexAttribPointervARB)
+        numFailed++;
+
+    sf_ptrc_glGetVertexAttribdvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLenum, GLdouble*)>(glLoaderGetProcAddress("glGetVertexAttribdvARB"));
+    if (!sf_ptrc_glGetVertexAttribdvARB)
+        numFailed++;
+
+    sf_ptrc_glGetVertexAttribfvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLenum, GLfloat*)>(glLoaderGetProcAddress("glGetVertexAttribfvARB"));
+    if (!sf_ptrc_glGetVertexAttribfvARB)
+        numFailed++;
+
+    sf_ptrc_glGetVertexAttribivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLenum, GLint*)>(glLoaderGetProcAddress("glGetVertexAttribivARB"));
+    if (!sf_ptrc_glGetVertexAttribivARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib1dARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLdouble)>(glLoaderGetProcAddress("glVertexAttrib1dARB"));
+    if (!sf_ptrc_glVertexAttrib1dARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib1dvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLdouble*)>(glLoaderGetProcAddress("glVertexAttrib1dvARB"));
+    if (!sf_ptrc_glVertexAttrib1dvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib1fARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLfloat)>(glLoaderGetProcAddress("glVertexAttrib1fARB"));
+    if (!sf_ptrc_glVertexAttrib1fARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib1fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLfloat*)>(glLoaderGetProcAddress("glVertexAttrib1fvARB"));
+    if (!sf_ptrc_glVertexAttrib1fvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib1sARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLshort)>(glLoaderGetProcAddress("glVertexAttrib1sARB"));
+    if (!sf_ptrc_glVertexAttrib1sARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib1svARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLshort*)>(glLoaderGetProcAddress("glVertexAttrib1svARB"));
+    if (!sf_ptrc_glVertexAttrib1svARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib2dARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLdouble, GLdouble)>(glLoaderGetProcAddress("glVertexAttrib2dARB"));
+    if (!sf_ptrc_glVertexAttrib2dARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib2dvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLdouble*)>(glLoaderGetProcAddress("glVertexAttrib2dvARB"));
+    if (!sf_ptrc_glVertexAttrib2dvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib2fARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLfloat, GLfloat)>(glLoaderGetProcAddress("glVertexAttrib2fARB"));
+    if (!sf_ptrc_glVertexAttrib2fARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib2fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLfloat*)>(glLoaderGetProcAddress("glVertexAttrib2fvARB"));
+    if (!sf_ptrc_glVertexAttrib2fvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib2sARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLshort, GLshort)>(glLoaderGetProcAddress("glVertexAttrib2sARB"));
+    if (!sf_ptrc_glVertexAttrib2sARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib2svARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLshort*)>(glLoaderGetProcAddress("glVertexAttrib2svARB"));
+    if (!sf_ptrc_glVertexAttrib2svARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib3dARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLdouble, GLdouble, GLdouble)>(glLoaderGetProcAddress("glVertexAttrib3dARB"));
+    if (!sf_ptrc_glVertexAttrib3dARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib3dvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLdouble*)>(glLoaderGetProcAddress("glVertexAttrib3dvARB"));
+    if (!sf_ptrc_glVertexAttrib3dvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib3fARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLfloat, GLfloat, GLfloat)>(glLoaderGetProcAddress("glVertexAttrib3fARB"));
+    if (!sf_ptrc_glVertexAttrib3fARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib3fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLfloat*)>(glLoaderGetProcAddress("glVertexAttrib3fvARB"));
+    if (!sf_ptrc_glVertexAttrib3fvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib3sARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLshort, GLshort, GLshort)>(glLoaderGetProcAddress("glVertexAttrib3sARB"));
+    if (!sf_ptrc_glVertexAttrib3sARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib3svARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLshort*)>(glLoaderGetProcAddress("glVertexAttrib3svARB"));
+    if (!sf_ptrc_glVertexAttrib3svARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4NbvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLbyte*)>(glLoaderGetProcAddress("glVertexAttrib4NbvARB"));
+    if (!sf_ptrc_glVertexAttrib4NbvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4NivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLint*)>(glLoaderGetProcAddress("glVertexAttrib4NivARB"));
+    if (!sf_ptrc_glVertexAttrib4NivARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4NsvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLshort*)>(glLoaderGetProcAddress("glVertexAttrib4NsvARB"));
+    if (!sf_ptrc_glVertexAttrib4NsvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4NubARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)>(glLoaderGetProcAddress("glVertexAttrib4NubARB"));
+    if (!sf_ptrc_glVertexAttrib4NubARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4NubvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLubyte*)>(glLoaderGetProcAddress("glVertexAttrib4NubvARB"));
+    if (!sf_ptrc_glVertexAttrib4NubvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4NuivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLuint*)>(glLoaderGetProcAddress("glVertexAttrib4NuivARB"));
+    if (!sf_ptrc_glVertexAttrib4NuivARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4NusvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLushort*)>(glLoaderGetProcAddress("glVertexAttrib4NusvARB"));
+    if (!sf_ptrc_glVertexAttrib4NusvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4bvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLbyte*)>(glLoaderGetProcAddress("glVertexAttrib4bvARB"));
+    if (!sf_ptrc_glVertexAttrib4bvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4dARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)>(glLoaderGetProcAddress("glVertexAttrib4dARB"));
+    if (!sf_ptrc_glVertexAttrib4dARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4dvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLdouble*)>(glLoaderGetProcAddress("glVertexAttrib4dvARB"));
+    if (!sf_ptrc_glVertexAttrib4dvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4fARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)>(glLoaderGetProcAddress("glVertexAttrib4fARB"));
+    if (!sf_ptrc_glVertexAttrib4fARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4fvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLfloat*)>(glLoaderGetProcAddress("glVertexAttrib4fvARB"));
+    if (!sf_ptrc_glVertexAttrib4fvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4ivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLint*)>(glLoaderGetProcAddress("glVertexAttrib4ivARB"));
+    if (!sf_ptrc_glVertexAttrib4ivARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4sARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLshort, GLshort, GLshort, GLshort)>(glLoaderGetProcAddress("glVertexAttrib4sARB"));
+    if (!sf_ptrc_glVertexAttrib4sARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4svARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLshort*)>(glLoaderGetProcAddress("glVertexAttrib4svARB"));
+    if (!sf_ptrc_glVertexAttrib4svARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4ubvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLubyte*)>(glLoaderGetProcAddress("glVertexAttrib4ubvARB"));
+    if (!sf_ptrc_glVertexAttrib4ubvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4uivARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLuint*)>(glLoaderGetProcAddress("glVertexAttrib4uivARB"));
+    if (!sf_ptrc_glVertexAttrib4uivARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttrib4usvARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, const GLushort*)>(glLoaderGetProcAddress("glVertexAttrib4usvARB"));
+    if (!sf_ptrc_glVertexAttrib4usvARB)
+        numFailed++;
+
+    sf_ptrc_glVertexAttribPointerARB = reinterpret_cast<void (GL_FUNCPTR *)(GLuint, GLint, GLenum, GLboolean, GLsizei, const void*)>(glLoaderGetProcAddress("glVertexAttribPointerARB"));
+    if (!sf_ptrc_glVertexAttribPointerARB)
+        numFailed++;
+
     return numFailed;
 }
 
-void (CODEGEN_FUNCPTR *sf_ptrc_glBlendEquationSeparateEXT)(GLenum, GLenum) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glBlendEquationSeparateEXT)(GLenum, GLenum) = NULL;
 
 static int Load_EXT_blend_equation_separate()
 {
     int numFailed = 0;
-    sf_ptrc_glBlendEquationSeparateEXT = (void (CODEGEN_FUNCPTR *)(GLenum, GLenum))IntGetProcAddress("glBlendEquationSeparateEXT");
-    if(!sf_ptrc_glBlendEquationSeparateEXT) numFailed++;
+
+    sf_ptrc_glBlendEquationSeparateEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLenum)>(glLoaderGetProcAddress("glBlendEquationSeparateEXT"));
+    if (!sf_ptrc_glBlendEquationSeparateEXT)
+        numFailed++;
+
     return numFailed;
 }
 
-void (CODEGEN_FUNCPTR *sf_ptrc_glBindFramebufferEXT)(GLenum, GLuint) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glBindRenderbufferEXT)(GLenum, GLuint) = NULL;
-GLenum (CODEGEN_FUNCPTR *sf_ptrc_glCheckFramebufferStatusEXT)(GLenum) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glDeleteFramebuffersEXT)(GLsizei, const GLuint *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glDeleteRenderbuffersEXT)(GLsizei, const GLuint *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glFramebufferRenderbufferEXT)(GLenum, GLenum, GLenum, GLuint) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glFramebufferTexture1DEXT)(GLenum, GLenum, GLenum, GLuint, GLint) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glFramebufferTexture2DEXT)(GLenum, GLenum, GLenum, GLuint, GLint) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glFramebufferTexture3DEXT)(GLenum, GLenum, GLenum, GLuint, GLint, GLint) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGenFramebuffersEXT)(GLsizei, GLuint *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGenRenderbuffersEXT)(GLsizei, GLuint *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGenerateMipmapEXT)(GLenum) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGetFramebufferAttachmentParameterivEXT)(GLenum, GLenum, GLenum, GLint *) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glGetRenderbufferParameterivEXT)(GLenum, GLenum, GLint *) = NULL;
-GLboolean (CODEGEN_FUNCPTR *sf_ptrc_glIsFramebufferEXT)(GLuint) = NULL;
-GLboolean (CODEGEN_FUNCPTR *sf_ptrc_glIsRenderbufferEXT)(GLuint) = NULL;
-void (CODEGEN_FUNCPTR *sf_ptrc_glRenderbufferStorageEXT)(GLenum, GLenum, GLsizei, GLsizei) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glBindFramebufferEXT)(GLenum, GLuint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glBindRenderbufferEXT)(GLenum, GLuint) = NULL;
+GLenum (GL_FUNCPTR *sf_ptrc_glCheckFramebufferStatusEXT)(GLenum) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glDeleteFramebuffersEXT)(GLsizei, const GLuint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glDeleteRenderbuffersEXT)(GLsizei, const GLuint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glFramebufferRenderbufferEXT)(GLenum, GLenum, GLenum, GLuint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glFramebufferTexture1DEXT)(GLenum, GLenum, GLenum, GLuint, GLint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glFramebufferTexture2DEXT)(GLenum, GLenum, GLenum, GLuint, GLint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glFramebufferTexture3DEXT)(GLenum, GLenum, GLenum, GLuint, GLint, GLint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGenFramebuffersEXT)(GLsizei, GLuint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGenRenderbuffersEXT)(GLsizei, GLuint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGenerateMipmapEXT)(GLenum) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetFramebufferAttachmentParameterivEXT)(GLenum, GLenum, GLenum, GLint*) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glGetRenderbufferParameterivEXT)(GLenum, GLenum, GLint*) = NULL;
+GLboolean (GL_FUNCPTR *sf_ptrc_glIsFramebufferEXT)(GLuint) = NULL;
+GLboolean (GL_FUNCPTR *sf_ptrc_glIsRenderbufferEXT)(GLuint) = NULL;
+void (GL_FUNCPTR *sf_ptrc_glRenderbufferStorageEXT)(GLenum, GLenum, GLsizei, GLsizei) = NULL;
 
 static int Load_EXT_framebuffer_object()
 {
     int numFailed = 0;
-    sf_ptrc_glBindFramebufferEXT = (void (CODEGEN_FUNCPTR *)(GLenum, GLuint))IntGetProcAddress("glBindFramebufferEXT");
-    if(!sf_ptrc_glBindFramebufferEXT) numFailed++;
-    sf_ptrc_glBindRenderbufferEXT = (void (CODEGEN_FUNCPTR *)(GLenum, GLuint))IntGetProcAddress("glBindRenderbufferEXT");
-    if(!sf_ptrc_glBindRenderbufferEXT) numFailed++;
-    sf_ptrc_glCheckFramebufferStatusEXT = (GLenum (CODEGEN_FUNCPTR *)(GLenum))IntGetProcAddress("glCheckFramebufferStatusEXT");
-    if(!sf_ptrc_glCheckFramebufferStatusEXT) numFailed++;
-    sf_ptrc_glDeleteFramebuffersEXT = (void (CODEGEN_FUNCPTR *)(GLsizei, const GLuint *))IntGetProcAddress("glDeleteFramebuffersEXT");
-    if(!sf_ptrc_glDeleteFramebuffersEXT) numFailed++;
-    sf_ptrc_glDeleteRenderbuffersEXT = (void (CODEGEN_FUNCPTR *)(GLsizei, const GLuint *))IntGetProcAddress("glDeleteRenderbuffersEXT");
-    if(!sf_ptrc_glDeleteRenderbuffersEXT) numFailed++;
-    sf_ptrc_glFramebufferRenderbufferEXT = (void (CODEGEN_FUNCPTR *)(GLenum, GLenum, GLenum, GLuint))IntGetProcAddress("glFramebufferRenderbufferEXT");
-    if(!sf_ptrc_glFramebufferRenderbufferEXT) numFailed++;
-    sf_ptrc_glFramebufferTexture1DEXT = (void (CODEGEN_FUNCPTR *)(GLenum, GLenum, GLenum, GLuint, GLint))IntGetProcAddress("glFramebufferTexture1DEXT");
-    if(!sf_ptrc_glFramebufferTexture1DEXT) numFailed++;
-    sf_ptrc_glFramebufferTexture2DEXT = (void (CODEGEN_FUNCPTR *)(GLenum, GLenum, GLenum, GLuint, GLint))IntGetProcAddress("glFramebufferTexture2DEXT");
-    if(!sf_ptrc_glFramebufferTexture2DEXT) numFailed++;
-    sf_ptrc_glFramebufferTexture3DEXT = (void (CODEGEN_FUNCPTR *)(GLenum, GLenum, GLenum, GLuint, GLint, GLint))IntGetProcAddress("glFramebufferTexture3DEXT");
-    if(!sf_ptrc_glFramebufferTexture3DEXT) numFailed++;
-    sf_ptrc_glGenFramebuffersEXT = (void (CODEGEN_FUNCPTR *)(GLsizei, GLuint *))IntGetProcAddress("glGenFramebuffersEXT");
-    if(!sf_ptrc_glGenFramebuffersEXT) numFailed++;
-    sf_ptrc_glGenRenderbuffersEXT = (void (CODEGEN_FUNCPTR *)(GLsizei, GLuint *))IntGetProcAddress("glGenRenderbuffersEXT");
-    if(!sf_ptrc_glGenRenderbuffersEXT) numFailed++;
-    sf_ptrc_glGenerateMipmapEXT = (void (CODEGEN_FUNCPTR *)(GLenum))IntGetProcAddress("glGenerateMipmapEXT");
-    if(!sf_ptrc_glGenerateMipmapEXT) numFailed++;
-    sf_ptrc_glGetFramebufferAttachmentParameterivEXT = (void (CODEGEN_FUNCPTR *)(GLenum, GLenum, GLenum, GLint *))IntGetProcAddress("glGetFramebufferAttachmentParameterivEXT");
-    if(!sf_ptrc_glGetFramebufferAttachmentParameterivEXT) numFailed++;
-    sf_ptrc_glGetRenderbufferParameterivEXT = (void (CODEGEN_FUNCPTR *)(GLenum, GLenum, GLint *))IntGetProcAddress("glGetRenderbufferParameterivEXT");
-    if(!sf_ptrc_glGetRenderbufferParameterivEXT) numFailed++;
-    sf_ptrc_glIsFramebufferEXT = (GLboolean (CODEGEN_FUNCPTR *)(GLuint))IntGetProcAddress("glIsFramebufferEXT");
-    if(!sf_ptrc_glIsFramebufferEXT) numFailed++;
-    sf_ptrc_glIsRenderbufferEXT = (GLboolean (CODEGEN_FUNCPTR *)(GLuint))IntGetProcAddress("glIsRenderbufferEXT");
-    if(!sf_ptrc_glIsRenderbufferEXT) numFailed++;
-    sf_ptrc_glRenderbufferStorageEXT = (void (CODEGEN_FUNCPTR *)(GLenum, GLenum, GLsizei, GLsizei))IntGetProcAddress("glRenderbufferStorageEXT");
-    if(!sf_ptrc_glRenderbufferStorageEXT) numFailed++;
-    return numFailed;
-}
 
-static int Load_Version_1_1()
-{
-    int numFailed = 0;
+    sf_ptrc_glBindFramebufferEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLuint)>(glLoaderGetProcAddress("glBindFramebufferEXT"));
+    if (!sf_ptrc_glBindFramebufferEXT)
+        numFailed++;
+
+    sf_ptrc_glBindRenderbufferEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLuint)>(glLoaderGetProcAddress("glBindRenderbufferEXT"));
+    if (!sf_ptrc_glBindRenderbufferEXT)
+        numFailed++;
+
+    sf_ptrc_glCheckFramebufferStatusEXT = reinterpret_cast<GLenum (GL_FUNCPTR *)(GLenum)>(glLoaderGetProcAddress("glCheckFramebufferStatusEXT"));
+    if (!sf_ptrc_glCheckFramebufferStatusEXT)
+        numFailed++;
+
+    sf_ptrc_glDeleteFramebuffersEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLsizei, const GLuint*)>(glLoaderGetProcAddress("glDeleteFramebuffersEXT"));
+    if (!sf_ptrc_glDeleteFramebuffersEXT)
+        numFailed++;
+
+    sf_ptrc_glDeleteRenderbuffersEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLsizei, const GLuint*)>(glLoaderGetProcAddress("glDeleteRenderbuffersEXT"));
+    if (!sf_ptrc_glDeleteRenderbuffersEXT)
+        numFailed++;
+
+    sf_ptrc_glFramebufferRenderbufferEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLenum, GLenum, GLuint)>(glLoaderGetProcAddress("glFramebufferRenderbufferEXT"));
+    if (!sf_ptrc_glFramebufferRenderbufferEXT)
+        numFailed++;
+
+    sf_ptrc_glFramebufferTexture1DEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLenum, GLenum, GLuint, GLint)>(glLoaderGetProcAddress("glFramebufferTexture1DEXT"));
+    if (!sf_ptrc_glFramebufferTexture1DEXT)
+        numFailed++;
+
+    sf_ptrc_glFramebufferTexture2DEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLenum, GLenum, GLuint, GLint)>(glLoaderGetProcAddress("glFramebufferTexture2DEXT"));
+    if (!sf_ptrc_glFramebufferTexture2DEXT)
+        numFailed++;
+
+    sf_ptrc_glFramebufferTexture3DEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLenum, GLenum, GLuint, GLint, GLint)>(glLoaderGetProcAddress("glFramebufferTexture3DEXT"));
+    if (!sf_ptrc_glFramebufferTexture3DEXT)
+        numFailed++;
+
+    sf_ptrc_glGenFramebuffersEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLsizei, GLuint*)>(glLoaderGetProcAddress("glGenFramebuffersEXT"));
+    if (!sf_ptrc_glGenFramebuffersEXT)
+        numFailed++;
+
+    sf_ptrc_glGenRenderbuffersEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLsizei, GLuint*)>(glLoaderGetProcAddress("glGenRenderbuffersEXT"));
+    if (!sf_ptrc_glGenRenderbuffersEXT)
+        numFailed++;
+
+    sf_ptrc_glGenerateMipmapEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLenum)>(glLoaderGetProcAddress("glGenerateMipmapEXT"));
+    if (!sf_ptrc_glGenerateMipmapEXT)
+        numFailed++;
+
+    sf_ptrc_glGetFramebufferAttachmentParameterivEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLenum, GLenum, GLint*)>(glLoaderGetProcAddress("glGetFramebufferAttachmentParameterivEXT"));
+    if (!sf_ptrc_glGetFramebufferAttachmentParameterivEXT)
+        numFailed++;
+
+    sf_ptrc_glGetRenderbufferParameterivEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLenum, GLint*)>(glLoaderGetProcAddress("glGetRenderbufferParameterivEXT"));
+    if (!sf_ptrc_glGetRenderbufferParameterivEXT)
+        numFailed++;
+
+    sf_ptrc_glIsFramebufferEXT = reinterpret_cast<GLboolean (GL_FUNCPTR *)(GLuint)>(glLoaderGetProcAddress("glIsFramebufferEXT"));
+    if (!sf_ptrc_glIsFramebufferEXT)
+        numFailed++;
+
+    sf_ptrc_glIsRenderbufferEXT = reinterpret_cast<GLboolean (GL_FUNCPTR *)(GLuint)>(glLoaderGetProcAddress("glIsRenderbufferEXT"));
+    if (!sf_ptrc_glIsRenderbufferEXT)
+        numFailed++;
+
+    sf_ptrc_glRenderbufferStorageEXT = reinterpret_cast<void (GL_FUNCPTR *)(GLenum, GLenum, GLsizei, GLsizei)>(glLoaderGetProcAddress("glRenderbufferStorageEXT"));
+    if (!sf_ptrc_glRenderbufferStorageEXT)
+        numFailed++;
+
     return numFailed;
 }
 
 typedef int (*PFN_LOADFUNCPOINTERS)();
 typedef struct sfogl_StrToExtMap_s
 {
-    const char *extensionName;
-    int *extensionVariable;
+    const char* extensionName;
+    int* extensionVariable;
     PFN_LOADFUNCPOINTERS LoadExtension;
 } sfogl_StrToExtMap;
 
@@ -336,18 +824,6 @@ static sfogl_StrToExtMap ExtensionMap[13] = {
 
 static int g_extensionMapSize = 13;
 
-static sfogl_StrToExtMap *FindExtEntry(const char *extensionName)
-{
-    int loop;
-    sfogl_StrToExtMap *currLoc = ExtensionMap;
-    for(loop = 0; loop < g_extensionMapSize; ++loop, ++currLoc)
-    {
-        if(strcmp(extensionName, currLoc->extensionName) == 0)
-            return currLoc;
-    }
-
-    return NULL;
-}
 
 static void ClearExtensionVars()
 {
@@ -367,188 +843,26 @@ static void ClearExtensionVars()
 }
 
 
-static void LoadExtByName(const char *extensionName)
+static void LoadExtension(sfogl_StrToExtMap& extension)
 {
-    sfogl_StrToExtMap *entry = NULL;
-    entry = FindExtEntry(extensionName);
-    if(entry)
+    if (extension.LoadExtension)
     {
-        if(entry->LoadExtension)
-        {
-            int numFailed = entry->LoadExtension();
-            if(numFailed == 0)
-            {
-                *(entry->extensionVariable) = sfogl_LOAD_SUCCEEDED;
-            }
-            else
-            {
-                *(entry->extensionVariable) = sfogl_LOAD_SUCCEEDED + numFailed;
-            }
-        }
-        else
-        {
-            *(entry->extensionVariable) = sfogl_LOAD_SUCCEEDED;
-        }
+        *(extension.extensionVariable) = sfogl_LOAD_SUCCEEDED + extension.LoadExtension();
+    }
+    else
+    {
+        *(extension.extensionVariable) = sfogl_LOAD_SUCCEEDED;
     }
 }
 
 
-static void ProcExtsFromExtString(const char *strExtList)
+void sfogl_LoadFunctions()
 {
-    if (!strExtList)
-        strExtList = "";
-
-    size_t iExtListLen = strlen(strExtList);
-    const char *strExtListEnd = strExtList + iExtListLen;
-    const char *strCurrPos = strExtList;
-    char strWorkBuff[256];
-
-    while(*strCurrPos)
-    {
-        /*Get the extension at our position.*/
-        int iStrLen = 0;
-        const char *strEndStr = strchr(strCurrPos, ' ');
-        int iStop = 0;
-        if(strEndStr == NULL)
-        {
-            strEndStr = strExtListEnd;
-            iStop = 1;
-        }
-
-        iStrLen = (int)((ptrdiff_t)strEndStr - (ptrdiff_t)strCurrPos);
-
-        if(iStrLen > 255)
-            return;
-
-        strncpy(strWorkBuff, strCurrPos, iStrLen);
-        strWorkBuff[iStrLen] = '\0';
-
-        LoadExtByName(strWorkBuff);
-
-        strCurrPos = strEndStr + 1;
-        if(iStop) break;
-    }
-}
-
-int sfogl_LoadFunctions()
-{
-    int numFailed = 0;
     ClearExtensionVars();
 
-    const char* extensionString = NULL;
-
-    if(sfogl_GetMajorVersion() < 3)
+    for (int i = 0; i < g_extensionMapSize; ++i)
     {
-        // Try to load the < 3.0 way
-        glCheck(extensionString = (const char *)glGetString(GL_EXTENSIONS));
-
-        ProcExtsFromExtString(extensionString);
-    }
-    else
-    {
-        // Try to load the >= 3.0 way
-        const GLubyte* (CODEGEN_FUNCPTR *glGetStringiFunc)(GLenum, GLuint) = NULL;
-        glGetStringiFunc = (const GLubyte* (CODEGEN_FUNCPTR *)(GLenum, GLuint))IntGetProcAddress("glGetStringi");
-
-        if (glGetStringiFunc)
-        {
-            int numExtensions = 0;
-            glCheck(glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions));
-
-            if (numExtensions)
-            {
-                for (unsigned int i = 0; i < static_cast<unsigned int>(numExtensions); ++i)
-                {
-                    glCheck(extensionString = (const char *)glGetStringiFunc(GL_EXTENSIONS, i));
-
-                    ProcExtsFromExtString(extensionString);
-                }
-            }
-        }
-    }
-
-    numFailed = Load_Version_1_1();
-
-    if(numFailed == 0)
-        return sfogl_LOAD_SUCCEEDED;
-    else
-        return sfogl_LOAD_SUCCEEDED + numFailed;
-}
-
-static int g_major_version = 0;
-static int g_minor_version = 0;
-
-static void ParseVersionFromString(int *pOutMajor, int *pOutMinor, const char *strVersion)
-{
-    const char *strDotPos = NULL;
-    int iLength = 0;
-    char strWorkBuff[10];
-    *pOutMinor = 0;
-    *pOutMajor = 0;
-
-    strDotPos = strchr(strVersion, '.');
-    if(!strDotPos)
-        return;
-
-    iLength = (int)((ptrdiff_t)strDotPos - (ptrdiff_t)strVersion);
-    strncpy(strWorkBuff, strVersion, iLength);
-    strWorkBuff[iLength] = '\0';
-
-    *pOutMajor = 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';
-    }
-
-    *pOutMinor = atoi(strWorkBuff);
-}
-
-static void GetGLVersion()
-{
-    glGetIntegerv(GL_MAJOR_VERSION, &g_major_version);
-    glGetIntegerv(GL_MINOR_VERSION, &g_minor_version);
-
-    // Check if we have to retrieve the context version using the legacy method
-    if (glGetError() == GL_INVALID_ENUM)
-    {
-        const char* versionString = NULL;
-        glCheck(versionString = (const char*)glGetString(GL_VERSION));
-        ParseVersionFromString(&g_major_version, &g_minor_version, versionString);
+        if (sf::Context::isExtensionAvailable(ExtensionMap[i].extensionName))
+            LoadExtension(ExtensionMap[i]);
     }
 }
-
-int sfogl_GetMajorVersion()
-{
-    if(g_major_version == 0)
-        GetGLVersion();
-    return g_major_version;
-}
-
-int sfogl_GetMinorVersion()
-{
-    if(g_major_version == 0) //Yes, check the major version to get the minor one.
-        GetGLVersion();
-    return g_minor_version;
-}
-
-int sfogl_IsVersionGEQ(int majorVersion, int minorVersion)
-{
-    if(g_major_version == 0)
-        GetGLVersion();
-
-    if(majorVersion > g_major_version) return 0;
-    if(majorVersion < g_major_version) return 1;
-    if(g_minor_version >= minorVersion) return 1;
-    return 0;
-}
-
diff --git a/src/SFML/Graphics/GLLoader.hpp b/src/SFML/Graphics/GLLoader.hpp
index 000640659..b3c9fddc4 100644
--- a/src/SFML/Graphics/GLLoader.hpp
+++ b/src/SFML/Graphics/GLLoader.hpp
@@ -22,8 +22,8 @@
 //
 ////////////////////////////////////////////////////////////
 
-#ifndef SF_POINTER_C_GENERATED_HEADER_OPENGL_HPP
-#define SF_POINTER_C_GENERATED_HEADER_OPENGL_HPP
+#ifndef SFML_GLLOADER_HPP
+#define SFML_GLLOADER_HPP
 
 #if defined(__glew_h__) || defined(__GLEW_H__)
 #error Attempt to include auto-generated header after including glew.h
@@ -51,50 +51,47 @@
 #define __gl_ATI_h_
 
 #ifndef APIENTRY
-    #if defined(__MINGW32__) || defined(__CYGWIN__)
-        #define APIENTRY __stdcall
+    #if defined(__MINGW32__)
+        #ifndef WIN32_LEAN_AND_MEAN
+            #define WIN32_LEAN_AND_MEAN 1
+        #endif
+        #ifndef NOMINMAX
+            #define NOMINMAX
+        #endif
+        #include <windows.h>
     #elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
-        #define APIENTRY __stdcall
+        #ifndef WIN32_LEAN_AND_MEAN
+            #define WIN32_LEAN_AND_MEAN 1
+        #endif
+        #ifndef NOMINMAX
+            #define NOMINMAX
+        #endif
+        #include <windows.h>
     #else
         #define APIENTRY
     #endif
-#endif /*APIENTRY*/
+#endif // APIENTRY
 
-#ifndef CODEGEN_FUNCPTR
-    #define CODEGEN_REMOVE_FUNCPTR
+#ifndef GL_FUNCPTR
+    #define GL_REMOVE_FUNCPTR
     #if defined(_WIN32)
-        #define CODEGEN_FUNCPTR APIENTRY
+        #define GL_FUNCPTR APIENTRY
     #else
-        #define CODEGEN_FUNCPTR
+        #define GL_FUNCPTR
     #endif
-#endif /*CODEGEN_FUNCPTR*/
+#endif // GL_FUNCPTR
 
 #ifndef GLAPI
-    #if defined(_WIN32)
-        #if defined(__MINGW32__) || defined(__CYGWIN__)
-            #define GLAPI extern
-        #else
-            #define GLAPI __declspec(dllimport)
-        #endif
-    #else
-        #define GLAPI extern
-    #endif
+    #define GLAPI extern
 #endif
 
 
-#ifndef GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
-#define GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
-
-
-#endif /*GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS*/
-
-
 #include <stddef.h>
 #ifndef GLEXT_64_TYPES_DEFINED
-/* This code block is duplicated in glxext.h, so must be protected */
+// This code block is duplicated in glxext.h, so must be protected
 #define GLEXT_64_TYPES_DEFINED
-/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
-/* (as used in the GL_EXT_timer_query extension). */
+// Define int32_t, int64_t, and uint64_t types for UST/MSC
+// (as used in the GL_EXT_timer_query extension).
 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 #include <inttypes.h>
 #elif defined(__sun__) || defined(__digital__)
@@ -106,8 +103,8 @@ typedef unsigned long int uint64_t;
 #else
 typedef long long int int64_t;
 typedef unsigned long long int uint64_t;
-#endif /* __arch64__ */
-#endif /* __STDC__ */
+#endif // __arch64__
+#endif // __STDC__
 #elif defined( __VMS ) || defined(__sgi)
 #include <inttypes.h>
 #elif defined(__SCO__) || defined(__USLC__)
@@ -123,7 +120,7 @@ typedef __int32 int32_t;
 typedef __int64 int64_t;
 typedef unsigned __int64 uint64_t;
 #else
-/* Fallback if nothing above works */
+// Fallback if nothing above works
 #include <inttypes.h>
 #endif
 #endif
@@ -163,15 +160,15 @@ typedef uint64_t GLuint64EXT;
 typedef struct __GLsync *GLsync;
 struct _cl_context;
 struct _cl_event;
-typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
-typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
+typedef void (APIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam);
+typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const void* userParam);
+typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, void* userParam);
 typedef unsigned short GLhalfNV;
 typedef GLintptr GLvdpauSurfaceNV;
 
 #ifdef __cplusplus
 extern "C" {
-#endif /*__cplusplus*/
+#endif // __cplusplus
 
 extern int sfogl_ext_SGIS_texture_edge_clamp;
 extern int sfogl_ext_EXT_texture_edge_clamp;
@@ -277,12 +274,31 @@ extern int sfogl_ext_EXT_framebuffer_object;
 #define GL_SAMPLER_CUBE_ARB 0x8B60
 #define GL_SHADER_OBJECT_ARB 0x8B48
 
+#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
+#define GL_FLOAT 0x1406
+// Copied GL_FLOAT_MAT2_ARB From: ARB_shader_objects
+// Copied GL_FLOAT_MAT3_ARB From: ARB_shader_objects
+// Copied GL_FLOAT_MAT4_ARB From: ARB_shader_objects
+// Copied GL_FLOAT_VEC2_ARB From: ARB_shader_objects
+// Copied GL_FLOAT_VEC3_ARB From: ARB_shader_objects
+// Copied GL_FLOAT_VEC4_ARB From: ARB_shader_objects
 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D
+#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
+#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
 #define GL_MAX_VARYING_FLOATS_ARB 0x8B4B
+#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C
 #define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A
 #define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89
 #define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
+#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
+#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
 #define GL_VERTEX_SHADER_ARB 0x8B31
 
 #define GL_FRAGMENT_SHADER_ARB 0x8B30
@@ -380,7 +396,14 @@ extern int sfogl_ext_EXT_framebuffer_object;
 #define GL_AND_REVERSE 0x1502
 #define GL_ATTRIB_STACK_DEPTH 0x0BB0
 #define GL_AUTO_NORMAL 0x0D80
+#define GL_AUX0 0x0409
+#define GL_AUX1 0x040A
+#define GL_AUX2 0x040B
+#define GL_AUX3 0x040C
+#define GL_AUX_BUFFERS 0x0C00
 #define GL_BACK 0x0405
+#define GL_BACK_LEFT 0x0402
+#define GL_BACK_RIGHT 0x0403
 #define GL_BITMAP 0x1A00
 #define GL_BITMAP_TOKEN 0x0704
 #define GL_BLEND 0x0BE2
@@ -457,6 +480,7 @@ extern int sfogl_ext_EXT_framebuffer_object;
 #define GL_DEPTH_SCALE 0x0D1E
 #define GL_DEPTH_TEST 0x0B71
 #define GL_DEPTH_WRITEMASK 0x0B72
+#define GL_DIFFUSE 0x1201
 #define GL_DITHER 0x0BD0
 #define GL_DOMAIN 0x0A02
 #define GL_DONT_CARE 0x1100
@@ -488,10 +512,21 @@ extern int sfogl_ext_EXT_framebuffer_object;
 #define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
 #define GL_FILL 0x1B02
 #define GL_FLAT 0x1D00
-#define GL_FLOAT 0x1406
+// Copied GL_FLOAT From: ARB_vertex_shader
+#define GL_FOG 0x0B60
+#define GL_FOG_BIT 0x00000080
+#define GL_FOG_COLOR 0x0B66
+#define GL_FOG_DENSITY 0x0B62
+#define GL_FOG_END 0x0B64
+#define GL_FOG_HINT 0x0C54
+#define GL_FOG_INDEX 0x0B61
+#define GL_FOG_MODE 0x0B65
+#define GL_FOG_START 0x0B63
 #define GL_FRONT 0x0404
 #define GL_FRONT_AND_BACK 0x0408
 #define GL_FRONT_FACE 0x0B46
+#define GL_FRONT_LEFT 0x0400
+#define GL_FRONT_RIGHT 0x0401
 #define GL_GEQUAL 0x0206
 #define GL_GREATER 0x0204
 #define GL_GREEN 0x1904
@@ -522,9 +557,22 @@ extern int sfogl_ext_EXT_framebuffer_object;
 #define GL_INVALID_VALUE 0x0501
 #define GL_INVERT 0x150A
 #define GL_KEEP 0x1E00
+#define GL_LEFT 0x0406
 #define GL_LEQUAL 0x0203
 #define GL_LESS 0x0201
+#define GL_LIGHT0 0x4000
+#define GL_LIGHT1 0x4001
+#define GL_LIGHT2 0x4002
+#define GL_LIGHT3 0x4003
+#define GL_LIGHT4 0x4004
+#define GL_LIGHT5 0x4005
+#define GL_LIGHT6 0x4006
+#define GL_LIGHT7 0x4007
 #define GL_LIGHTING 0x0B50
+#define GL_LIGHTING_BIT 0x00000040
+#define GL_LIGHT_MODEL_AMBIENT 0x0B53
+#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
+#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
 #define GL_LINE 0x1B01
 #define GL_LINEAR 0x2601
 #define GL_LINEAR_ATTENUATION 0x1208
@@ -544,6 +592,10 @@ extern int sfogl_ext_EXT_framebuffer_object;
 #define GL_LINE_WIDTH 0x0B21
 #define GL_LINE_WIDTH_GRANULARITY 0x0B23
 #define GL_LINE_WIDTH_RANGE 0x0B22
+#define GL_LIST_BASE 0x0B32
+#define GL_LIST_BIT 0x00020000
+#define GL_LIST_INDEX 0x0B33
+#define GL_LIST_MODE 0x0B30
 #define GL_LOAD 0x0101
 #define GL_LOGIC_OP 0x0BF1
 #define GL_LOGIC_OP_MODE 0x0BF0
@@ -559,6 +611,28 @@ extern int sfogl_ext_EXT_framebuffer_object;
 #define GL_LUMINANCE8 0x8040
 #define GL_LUMINANCE8_ALPHA8 0x8045
 #define GL_LUMINANCE_ALPHA 0x190A
+#define GL_MAP1_COLOR_4 0x0D90
+#define GL_MAP1_GRID_DOMAIN 0x0DD0
+#define GL_MAP1_GRID_SEGMENTS 0x0DD1
+#define GL_MAP1_INDEX 0x0D91
+#define GL_MAP1_NORMAL 0x0D92
+#define GL_MAP1_TEXTURE_COORD_1 0x0D93
+#define GL_MAP1_TEXTURE_COORD_2 0x0D94
+#define GL_MAP1_TEXTURE_COORD_3 0x0D95
+#define GL_MAP1_TEXTURE_COORD_4 0x0D96
+#define GL_MAP1_VERTEX_3 0x0D97
+#define GL_MAP1_VERTEX_4 0x0D98
+#define GL_MAP2_COLOR_4 0x0DB0
+#define GL_MAP2_GRID_DOMAIN 0x0DD2
+#define GL_MAP2_GRID_SEGMENTS 0x0DD3
+#define GL_MAP2_INDEX 0x0DB1
+#define GL_MAP2_NORMAL 0x0DB2
+#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
+#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
+#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
+#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
+#define GL_MAP2_VERTEX_3 0x0DB7
+#define GL_MAP2_VERTEX_4 0x0DB8
 #define GL_MAP_COLOR 0x0D10
 #define GL_MAP_STENCIL 0x0D11
 #define GL_MATRIX_MODE 0x0BA0
@@ -581,6 +655,7 @@ extern int sfogl_ext_EXT_framebuffer_object;
 #define GL_MODULATE 0x2100
 #define GL_MULT 0x0103
 #define GL_N3F_V3F 0x2A25
+#define GL_NAME_STACK_DEPTH 0x0D70
 #define GL_NAND 0x150E
 #define GL_NEAREST 0x2600
 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
@@ -617,6 +692,26 @@ extern int sfogl_ext_EXT_framebuffer_object;
 #define GL_PACK_SWAP_BYTES 0x0D00
 #define GL_PASS_THROUGH_TOKEN 0x0700
 #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
+#define GL_PIXEL_MAP_A_TO_A 0x0C79
+#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
+#define GL_PIXEL_MAP_B_TO_B 0x0C78
+#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
+#define GL_PIXEL_MAP_G_TO_G 0x0C77
+#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
+#define GL_PIXEL_MAP_I_TO_A 0x0C75
+#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
+#define GL_PIXEL_MAP_I_TO_B 0x0C74
+#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
+#define GL_PIXEL_MAP_I_TO_G 0x0C73
+#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
+#define GL_PIXEL_MAP_I_TO_I 0x0C70
+#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
+#define GL_PIXEL_MAP_I_TO_R 0x0C72
+#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
+#define GL_PIXEL_MAP_R_TO_R 0x0C76
+#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
+#define GL_PIXEL_MAP_S_TO_S 0x0C71
+#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
 #define GL_PIXEL_MODE_BIT 0x00000020
 #define GL_POINT 0x1B00
 #define GL_POINTS 0x0000
@@ -679,10 +774,14 @@ extern int sfogl_ext_EXT_framebuffer_object;
 #define GL_RGBA4 0x8056
 #define GL_RGBA8 0x8058
 #define GL_RGBA_MODE 0x0C31
+#define GL_RIGHT 0x0407
 #define GL_S 0x2000
 #define GL_SCISSOR_BIT 0x00080000
 #define GL_SCISSOR_BOX 0x0C10
 #define GL_SCISSOR_TEST 0x0C11
+#define GL_SELECT 0x1C02
+#define GL_SELECTION_BUFFER_POINTER 0x0DF3
+#define GL_SELECTION_BUFFER_SIZE 0x0DF4
 #define GL_SET 0x150F
 #define GL_SHADE_MODEL 0x0B54
 #define GL_SHININESS 0x1601
@@ -690,6 +789,9 @@ extern int sfogl_ext_EXT_framebuffer_object;
 #define GL_SMOOTH 0x1D01
 #define GL_SPECULAR 0x1202
 #define GL_SPHERE_MAP 0x2402
+#define GL_SPOT_CUTOFF 0x1206
+#define GL_SPOT_DIRECTION 0x1204
+#define GL_SPOT_EXPONENT 0x1205
 #define GL_SRC_ALPHA 0x0302
 #define GL_SRC_ALPHA_SATURATE 0x0308
 #define GL_SRC_COLOR 0x0300
@@ -787,252 +889,655 @@ extern int sfogl_ext_EXT_framebuffer_object;
 #define GL_ZOOM_X 0x0D16
 #define GL_ZOOM_Y 0x0D17
 
+
+
 #ifndef GL_EXT_blend_minmax
 #define GL_EXT_blend_minmax 1
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glBlendEquationEXT)(GLenum);
+extern void (GL_FUNCPTR *sf_ptrc_glBlendEquationEXT)(GLenum);
 #define glBlendEquationEXT sf_ptrc_glBlendEquationEXT
-#endif /*GL_EXT_blend_minmax*/
+#endif // GL_EXT_blend_minmax
 
 
 #ifndef GL_ARB_multitexture
 #define GL_ARB_multitexture 1
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glActiveTextureARB)(GLenum);
+extern void (GL_FUNCPTR *sf_ptrc_glActiveTextureARB)(GLenum);
 #define glActiveTextureARB sf_ptrc_glActiveTextureARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glClientActiveTextureARB)(GLenum);
+extern void (GL_FUNCPTR *sf_ptrc_glClientActiveTextureARB)(GLenum);
 #define glClientActiveTextureARB sf_ptrc_glClientActiveTextureARB
-#endif /*GL_ARB_multitexture*/
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1dARB)(GLenum, GLdouble);
+#define glMultiTexCoord1dARB sf_ptrc_glMultiTexCoord1dARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1dvARB)(GLenum, const GLdouble*);
+#define glMultiTexCoord1dvARB sf_ptrc_glMultiTexCoord1dvARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1fARB)(GLenum, GLfloat);
+#define glMultiTexCoord1fARB sf_ptrc_glMultiTexCoord1fARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1fvARB)(GLenum, const GLfloat*);
+#define glMultiTexCoord1fvARB sf_ptrc_glMultiTexCoord1fvARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1iARB)(GLenum, GLint);
+#define glMultiTexCoord1iARB sf_ptrc_glMultiTexCoord1iARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1ivARB)(GLenum, const GLint*);
+#define glMultiTexCoord1ivARB sf_ptrc_glMultiTexCoord1ivARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1sARB)(GLenum, GLshort);
+#define glMultiTexCoord1sARB sf_ptrc_glMultiTexCoord1sARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord1svARB)(GLenum, const GLshort*);
+#define glMultiTexCoord1svARB sf_ptrc_glMultiTexCoord1svARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2dARB)(GLenum, GLdouble, GLdouble);
+#define glMultiTexCoord2dARB sf_ptrc_glMultiTexCoord2dARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2dvARB)(GLenum, const GLdouble*);
+#define glMultiTexCoord2dvARB sf_ptrc_glMultiTexCoord2dvARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2fARB)(GLenum, GLfloat, GLfloat);
+#define glMultiTexCoord2fARB sf_ptrc_glMultiTexCoord2fARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2fvARB)(GLenum, const GLfloat*);
+#define glMultiTexCoord2fvARB sf_ptrc_glMultiTexCoord2fvARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2iARB)(GLenum, GLint, GLint);
+#define glMultiTexCoord2iARB sf_ptrc_glMultiTexCoord2iARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2ivARB)(GLenum, const GLint*);
+#define glMultiTexCoord2ivARB sf_ptrc_glMultiTexCoord2ivARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2sARB)(GLenum, GLshort, GLshort);
+#define glMultiTexCoord2sARB sf_ptrc_glMultiTexCoord2sARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord2svARB)(GLenum, const GLshort*);
+#define glMultiTexCoord2svARB sf_ptrc_glMultiTexCoord2svARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3dARB)(GLenum, GLdouble, GLdouble, GLdouble);
+#define glMultiTexCoord3dARB sf_ptrc_glMultiTexCoord3dARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3dvARB)(GLenum, const GLdouble*);
+#define glMultiTexCoord3dvARB sf_ptrc_glMultiTexCoord3dvARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3fARB)(GLenum, GLfloat, GLfloat, GLfloat);
+#define glMultiTexCoord3fARB sf_ptrc_glMultiTexCoord3fARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3fvARB)(GLenum, const GLfloat*);
+#define glMultiTexCoord3fvARB sf_ptrc_glMultiTexCoord3fvARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3iARB)(GLenum, GLint, GLint, GLint);
+#define glMultiTexCoord3iARB sf_ptrc_glMultiTexCoord3iARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3ivARB)(GLenum, const GLint*);
+#define glMultiTexCoord3ivARB sf_ptrc_glMultiTexCoord3ivARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3sARB)(GLenum, GLshort, GLshort, GLshort);
+#define glMultiTexCoord3sARB sf_ptrc_glMultiTexCoord3sARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord3svARB)(GLenum, const GLshort*);
+#define glMultiTexCoord3svARB sf_ptrc_glMultiTexCoord3svARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4dARB)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
+#define glMultiTexCoord4dARB sf_ptrc_glMultiTexCoord4dARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4dvARB)(GLenum, const GLdouble*);
+#define glMultiTexCoord4dvARB sf_ptrc_glMultiTexCoord4dvARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4fARB)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
+#define glMultiTexCoord4fARB sf_ptrc_glMultiTexCoord4fARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4fvARB)(GLenum, const GLfloat*);
+#define glMultiTexCoord4fvARB sf_ptrc_glMultiTexCoord4fvARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4iARB)(GLenum, GLint, GLint, GLint, GLint);
+#define glMultiTexCoord4iARB sf_ptrc_glMultiTexCoord4iARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4ivARB)(GLenum, const GLint*);
+#define glMultiTexCoord4ivARB sf_ptrc_glMultiTexCoord4ivARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4sARB)(GLenum, GLshort, GLshort, GLshort, GLshort);
+#define glMultiTexCoord4sARB sf_ptrc_glMultiTexCoord4sARB
+extern void (GL_FUNCPTR *sf_ptrc_glMultiTexCoord4svARB)(GLenum, const GLshort*);
+#define glMultiTexCoord4svARB sf_ptrc_glMultiTexCoord4svARB
+#endif // GL_ARB_multitexture
 
 #ifndef GL_EXT_blend_func_separate
 #define GL_EXT_blend_func_separate 1
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glBlendFuncSeparateEXT)(GLenum, GLenum, GLenum, GLenum);
+extern void (GL_FUNCPTR *sf_ptrc_glBlendFuncSeparateEXT)(GLenum, GLenum, GLenum, GLenum);
 #define glBlendFuncSeparateEXT sf_ptrc_glBlendFuncSeparateEXT
-#endif /*GL_EXT_blend_func_separate*/
+#endif // GL_EXT_blend_func_separate
+
 
 #ifndef GL_ARB_shader_objects
 #define GL_ARB_shader_objects 1
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glAttachObjectARB)(GLhandleARB, GLhandleARB);
+extern void (GL_FUNCPTR *sf_ptrc_glAttachObjectARB)(GLhandleARB, GLhandleARB);
 #define glAttachObjectARB sf_ptrc_glAttachObjectARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glCompileShaderARB)(GLhandleARB);
+extern void (GL_FUNCPTR *sf_ptrc_glCompileShaderARB)(GLhandleARB);
 #define glCompileShaderARB sf_ptrc_glCompileShaderARB
-extern GLhandleARB (CODEGEN_FUNCPTR *sf_ptrc_glCreateProgramObjectARB)();
+extern GLhandleARB (GL_FUNCPTR *sf_ptrc_glCreateProgramObjectARB)();
 #define glCreateProgramObjectARB sf_ptrc_glCreateProgramObjectARB
-extern GLhandleARB (CODEGEN_FUNCPTR *sf_ptrc_glCreateShaderObjectARB)(GLenum);
+extern GLhandleARB (GL_FUNCPTR *sf_ptrc_glCreateShaderObjectARB)(GLenum);
 #define glCreateShaderObjectARB sf_ptrc_glCreateShaderObjectARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glDeleteObjectARB)(GLhandleARB);
+extern void (GL_FUNCPTR *sf_ptrc_glDeleteObjectARB)(GLhandleARB);
 #define glDeleteObjectARB sf_ptrc_glDeleteObjectARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glDetachObjectARB)(GLhandleARB, GLhandleARB);
+extern void (GL_FUNCPTR *sf_ptrc_glDetachObjectARB)(GLhandleARB, GLhandleARB);
 #define glDetachObjectARB sf_ptrc_glDetachObjectARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetActiveUniformARB)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
+extern void (GL_FUNCPTR *sf_ptrc_glGetActiveUniformARB)(GLhandleARB, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLcharARB*);
 #define glGetActiveUniformARB sf_ptrc_glGetActiveUniformARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetAttachedObjectsARB)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *);
+extern void (GL_FUNCPTR *sf_ptrc_glGetAttachedObjectsARB)(GLhandleARB, GLsizei, GLsizei*, GLhandleARB*);
 #define glGetAttachedObjectsARB sf_ptrc_glGetAttachedObjectsARB
-extern GLhandleARB (CODEGEN_FUNCPTR *sf_ptrc_glGetHandleARB)(GLenum);
+extern GLhandleARB (GL_FUNCPTR *sf_ptrc_glGetHandleARB)(GLenum);
 #define glGetHandleARB sf_ptrc_glGetHandleARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetInfoLogARB)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
+extern void (GL_FUNCPTR *sf_ptrc_glGetInfoLogARB)(GLhandleARB, GLsizei, GLsizei*, GLcharARB*);
 #define glGetInfoLogARB sf_ptrc_glGetInfoLogARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetObjectParameterfvARB)(GLhandleARB, GLenum, GLfloat *);
+extern void (GL_FUNCPTR *sf_ptrc_glGetObjectParameterfvARB)(GLhandleARB, GLenum, GLfloat*);
 #define glGetObjectParameterfvARB sf_ptrc_glGetObjectParameterfvARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetObjectParameterivARB)(GLhandleARB, GLenum, GLint *);
+extern void (GL_FUNCPTR *sf_ptrc_glGetObjectParameterivARB)(GLhandleARB, GLenum, GLint*);
 #define glGetObjectParameterivARB sf_ptrc_glGetObjectParameterivARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetShaderSourceARB)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *);
+extern void (GL_FUNCPTR *sf_ptrc_glGetShaderSourceARB)(GLhandleARB, GLsizei, GLsizei*, GLcharARB*);
 #define glGetShaderSourceARB sf_ptrc_glGetShaderSourceARB
-extern GLint (CODEGEN_FUNCPTR *sf_ptrc_glGetUniformLocationARB)(GLhandleARB, const GLcharARB *);
+extern GLint (GL_FUNCPTR *sf_ptrc_glGetUniformLocationARB)(GLhandleARB, const GLcharARB*);
 #define glGetUniformLocationARB sf_ptrc_glGetUniformLocationARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetUniformfvARB)(GLhandleARB, GLint, GLfloat *);
+extern void (GL_FUNCPTR *sf_ptrc_glGetUniformfvARB)(GLhandleARB, GLint, GLfloat*);
 #define glGetUniformfvARB sf_ptrc_glGetUniformfvARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetUniformivARB)(GLhandleARB, GLint, GLint *);
+extern void (GL_FUNCPTR *sf_ptrc_glGetUniformivARB)(GLhandleARB, GLint, GLint*);
 #define glGetUniformivARB sf_ptrc_glGetUniformivARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glLinkProgramARB)(GLhandleARB);
+extern void (GL_FUNCPTR *sf_ptrc_glLinkProgramARB)(GLhandleARB);
 #define glLinkProgramARB sf_ptrc_glLinkProgramARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glShaderSourceARB)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *);
+extern void (GL_FUNCPTR *sf_ptrc_glShaderSourceARB)(GLhandleARB, GLsizei, const GLcharARB**, const GLint*);
 #define glShaderSourceARB sf_ptrc_glShaderSourceARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform1fARB)(GLint, GLfloat);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform1fARB)(GLint, GLfloat);
 #define glUniform1fARB sf_ptrc_glUniform1fARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform1fvARB)(GLint, GLsizei, const GLfloat *);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform1fvARB)(GLint, GLsizei, const GLfloat*);
 #define glUniform1fvARB sf_ptrc_glUniform1fvARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform1iARB)(GLint, GLint);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform1iARB)(GLint, GLint);
 #define glUniform1iARB sf_ptrc_glUniform1iARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform1ivARB)(GLint, GLsizei, const GLint *);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform1ivARB)(GLint, GLsizei, const GLint*);
 #define glUniform1ivARB sf_ptrc_glUniform1ivARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform2fARB)(GLint, GLfloat, GLfloat);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform2fARB)(GLint, GLfloat, GLfloat);
 #define glUniform2fARB sf_ptrc_glUniform2fARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform2fvARB)(GLint, GLsizei, const GLfloat *);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform2fvARB)(GLint, GLsizei, const GLfloat*);
 #define glUniform2fvARB sf_ptrc_glUniform2fvARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform2iARB)(GLint, GLint, GLint);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform2iARB)(GLint, GLint, GLint);
 #define glUniform2iARB sf_ptrc_glUniform2iARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform2ivARB)(GLint, GLsizei, const GLint *);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform2ivARB)(GLint, GLsizei, const GLint*);
 #define glUniform2ivARB sf_ptrc_glUniform2ivARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform3fARB)(GLint, GLfloat, GLfloat, GLfloat);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform3fARB)(GLint, GLfloat, GLfloat, GLfloat);
 #define glUniform3fARB sf_ptrc_glUniform3fARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform3fvARB)(GLint, GLsizei, const GLfloat *);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform3fvARB)(GLint, GLsizei, const GLfloat*);
 #define glUniform3fvARB sf_ptrc_glUniform3fvARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform3iARB)(GLint, GLint, GLint, GLint);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform3iARB)(GLint, GLint, GLint, GLint);
 #define glUniform3iARB sf_ptrc_glUniform3iARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform3ivARB)(GLint, GLsizei, const GLint *);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform3ivARB)(GLint, GLsizei, const GLint*);
 #define glUniform3ivARB sf_ptrc_glUniform3ivARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform4fARB)(GLint, GLfloat, GLfloat, GLfloat, GLfloat);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform4fARB)(GLint, GLfloat, GLfloat, GLfloat, GLfloat);
 #define glUniform4fARB sf_ptrc_glUniform4fARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform4fvARB)(GLint, GLsizei, const GLfloat *);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform4fvARB)(GLint, GLsizei, const GLfloat*);
 #define glUniform4fvARB sf_ptrc_glUniform4fvARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform4iARB)(GLint, GLint, GLint, GLint, GLint);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform4iARB)(GLint, GLint, GLint, GLint, GLint);
 #define glUniform4iARB sf_ptrc_glUniform4iARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform4ivARB)(GLint, GLsizei, const GLint *);
+extern void (GL_FUNCPTR *sf_ptrc_glUniform4ivARB)(GLint, GLsizei, const GLint*);
 #define glUniform4ivARB sf_ptrc_glUniform4ivARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniformMatrix2fvARB)(GLint, GLsizei, GLboolean, const GLfloat *);
+extern void (GL_FUNCPTR *sf_ptrc_glUniformMatrix2fvARB)(GLint, GLsizei, GLboolean, const GLfloat*);
 #define glUniformMatrix2fvARB sf_ptrc_glUniformMatrix2fvARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniformMatrix3fvARB)(GLint, GLsizei, GLboolean, const GLfloat *);
+extern void (GL_FUNCPTR *sf_ptrc_glUniformMatrix3fvARB)(GLint, GLsizei, GLboolean, const GLfloat*);
 #define glUniformMatrix3fvARB sf_ptrc_glUniformMatrix3fvARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniformMatrix4fvARB)(GLint, GLsizei, GLboolean, const GLfloat *);
+extern void (GL_FUNCPTR *sf_ptrc_glUniformMatrix4fvARB)(GLint, GLsizei, GLboolean, const GLfloat*);
 #define glUniformMatrix4fvARB sf_ptrc_glUniformMatrix4fvARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glUseProgramObjectARB)(GLhandleARB);
+extern void (GL_FUNCPTR *sf_ptrc_glUseProgramObjectARB)(GLhandleARB);
 #define glUseProgramObjectARB sf_ptrc_glUseProgramObjectARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glValidateProgramARB)(GLhandleARB);
+extern void (GL_FUNCPTR *sf_ptrc_glValidateProgramARB)(GLhandleARB);
 #define glValidateProgramARB sf_ptrc_glValidateProgramARB
-#endif /*GL_ARB_shader_objects*/
+#endif // GL_ARB_shader_objects
 
 #ifndef GL_ARB_vertex_shader
 #define GL_ARB_vertex_shader 1
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glBindAttribLocationARB)(GLhandleARB, GLuint, const GLcharARB *);
+extern void (GL_FUNCPTR *sf_ptrc_glBindAttribLocationARB)(GLhandleARB, GLuint, const GLcharARB*);
 #define glBindAttribLocationARB sf_ptrc_glBindAttribLocationARB
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetActiveAttribARB)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *);
+extern void (GL_FUNCPTR *sf_ptrc_glDisableVertexAttribArrayARB)(GLuint);
+#define glDisableVertexAttribArrayARB sf_ptrc_glDisableVertexAttribArrayARB
+extern void (GL_FUNCPTR *sf_ptrc_glEnableVertexAttribArrayARB)(GLuint);
+#define glEnableVertexAttribArrayARB sf_ptrc_glEnableVertexAttribArrayARB
+extern void (GL_FUNCPTR *sf_ptrc_glGetActiveAttribARB)(GLhandleARB, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLcharARB*);
 #define glGetActiveAttribARB sf_ptrc_glGetActiveAttribARB
-extern GLint (CODEGEN_FUNCPTR *sf_ptrc_glGetAttribLocationARB)(GLhandleARB, const GLcharARB *);
+extern GLint (GL_FUNCPTR *sf_ptrc_glGetAttribLocationARB)(GLhandleARB, const GLcharARB*);
 #define glGetAttribLocationARB sf_ptrc_glGetAttribLocationARB
-#endif /*GL_ARB_vertex_shader*/
+extern void (GL_FUNCPTR *sf_ptrc_glGetVertexAttribPointervARB)(GLuint, GLenum, void**);
+#define glGetVertexAttribPointervARB sf_ptrc_glGetVertexAttribPointervARB
+extern void (GL_FUNCPTR *sf_ptrc_glGetVertexAttribdvARB)(GLuint, GLenum, GLdouble*);
+#define glGetVertexAttribdvARB sf_ptrc_glGetVertexAttribdvARB
+extern void (GL_FUNCPTR *sf_ptrc_glGetVertexAttribfvARB)(GLuint, GLenum, GLfloat*);
+#define glGetVertexAttribfvARB sf_ptrc_glGetVertexAttribfvARB
+extern void (GL_FUNCPTR *sf_ptrc_glGetVertexAttribivARB)(GLuint, GLenum, GLint*);
+#define glGetVertexAttribivARB sf_ptrc_glGetVertexAttribivARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib1dARB)(GLuint, GLdouble);
+#define glVertexAttrib1dARB sf_ptrc_glVertexAttrib1dARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib1dvARB)(GLuint, const GLdouble*);
+#define glVertexAttrib1dvARB sf_ptrc_glVertexAttrib1dvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib1fARB)(GLuint, GLfloat);
+#define glVertexAttrib1fARB sf_ptrc_glVertexAttrib1fARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib1fvARB)(GLuint, const GLfloat*);
+#define glVertexAttrib1fvARB sf_ptrc_glVertexAttrib1fvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib1sARB)(GLuint, GLshort);
+#define glVertexAttrib1sARB sf_ptrc_glVertexAttrib1sARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib1svARB)(GLuint, const GLshort*);
+#define glVertexAttrib1svARB sf_ptrc_glVertexAttrib1svARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib2dARB)(GLuint, GLdouble, GLdouble);
+#define glVertexAttrib2dARB sf_ptrc_glVertexAttrib2dARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib2dvARB)(GLuint, const GLdouble*);
+#define glVertexAttrib2dvARB sf_ptrc_glVertexAttrib2dvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib2fARB)(GLuint, GLfloat, GLfloat);
+#define glVertexAttrib2fARB sf_ptrc_glVertexAttrib2fARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib2fvARB)(GLuint, const GLfloat*);
+#define glVertexAttrib2fvARB sf_ptrc_glVertexAttrib2fvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib2sARB)(GLuint, GLshort, GLshort);
+#define glVertexAttrib2sARB sf_ptrc_glVertexAttrib2sARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib2svARB)(GLuint, const GLshort*);
+#define glVertexAttrib2svARB sf_ptrc_glVertexAttrib2svARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib3dARB)(GLuint, GLdouble, GLdouble, GLdouble);
+#define glVertexAttrib3dARB sf_ptrc_glVertexAttrib3dARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib3dvARB)(GLuint, const GLdouble*);
+#define glVertexAttrib3dvARB sf_ptrc_glVertexAttrib3dvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib3fARB)(GLuint, GLfloat, GLfloat, GLfloat);
+#define glVertexAttrib3fARB sf_ptrc_glVertexAttrib3fARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib3fvARB)(GLuint, const GLfloat*);
+#define glVertexAttrib3fvARB sf_ptrc_glVertexAttrib3fvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib3sARB)(GLuint, GLshort, GLshort, GLshort);
+#define glVertexAttrib3sARB sf_ptrc_glVertexAttrib3sARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib3svARB)(GLuint, const GLshort*);
+#define glVertexAttrib3svARB sf_ptrc_glVertexAttrib3svARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NbvARB)(GLuint, const GLbyte*);
+#define glVertexAttrib4NbvARB sf_ptrc_glVertexAttrib4NbvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NivARB)(GLuint, const GLint*);
+#define glVertexAttrib4NivARB sf_ptrc_glVertexAttrib4NivARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NsvARB)(GLuint, const GLshort*);
+#define glVertexAttrib4NsvARB sf_ptrc_glVertexAttrib4NsvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NubARB)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte);
+#define glVertexAttrib4NubARB sf_ptrc_glVertexAttrib4NubARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NubvARB)(GLuint, const GLubyte*);
+#define glVertexAttrib4NubvARB sf_ptrc_glVertexAttrib4NubvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NuivARB)(GLuint, const GLuint*);
+#define glVertexAttrib4NuivARB sf_ptrc_glVertexAttrib4NuivARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4NusvARB)(GLuint, const GLushort*);
+#define glVertexAttrib4NusvARB sf_ptrc_glVertexAttrib4NusvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4bvARB)(GLuint, const GLbyte*);
+#define glVertexAttrib4bvARB sf_ptrc_glVertexAttrib4bvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4dARB)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble);
+#define glVertexAttrib4dARB sf_ptrc_glVertexAttrib4dARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4dvARB)(GLuint, const GLdouble*);
+#define glVertexAttrib4dvARB sf_ptrc_glVertexAttrib4dvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4fARB)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat);
+#define glVertexAttrib4fARB sf_ptrc_glVertexAttrib4fARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4fvARB)(GLuint, const GLfloat*);
+#define glVertexAttrib4fvARB sf_ptrc_glVertexAttrib4fvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4ivARB)(GLuint, const GLint*);
+#define glVertexAttrib4ivARB sf_ptrc_glVertexAttrib4ivARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4sARB)(GLuint, GLshort, GLshort, GLshort, GLshort);
+#define glVertexAttrib4sARB sf_ptrc_glVertexAttrib4sARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4svARB)(GLuint, const GLshort*);
+#define glVertexAttrib4svARB sf_ptrc_glVertexAttrib4svARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4ubvARB)(GLuint, const GLubyte*);
+#define glVertexAttrib4ubvARB sf_ptrc_glVertexAttrib4ubvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4uivARB)(GLuint, const GLuint*);
+#define glVertexAttrib4uivARB sf_ptrc_glVertexAttrib4uivARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttrib4usvARB)(GLuint, const GLushort*);
+#define glVertexAttrib4usvARB sf_ptrc_glVertexAttrib4usvARB
+extern void (GL_FUNCPTR *sf_ptrc_glVertexAttribPointerARB)(GLuint, GLint, GLenum, GLboolean, GLsizei, const void*);
+#define glVertexAttribPointerARB sf_ptrc_glVertexAttribPointerARB
+#endif // GL_ARB_vertex_shader
 
 
 
 #ifndef GL_EXT_blend_equation_separate
 #define GL_EXT_blend_equation_separate 1
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glBlendEquationSeparateEXT)(GLenum, GLenum);
+extern void (GL_FUNCPTR *sf_ptrc_glBlendEquationSeparateEXT)(GLenum, GLenum);
 #define glBlendEquationSeparateEXT sf_ptrc_glBlendEquationSeparateEXT
-#endif /*GL_EXT_blend_equation_separate*/
+#endif // GL_EXT_blend_equation_separate
 
 #ifndef GL_EXT_framebuffer_object
 #define GL_EXT_framebuffer_object 1
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glBindFramebufferEXT)(GLenum, GLuint);
+extern void (GL_FUNCPTR *sf_ptrc_glBindFramebufferEXT)(GLenum, GLuint);
 #define glBindFramebufferEXT sf_ptrc_glBindFramebufferEXT
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glBindRenderbufferEXT)(GLenum, GLuint);
+extern void (GL_FUNCPTR *sf_ptrc_glBindRenderbufferEXT)(GLenum, GLuint);
 #define glBindRenderbufferEXT sf_ptrc_glBindRenderbufferEXT
-extern GLenum (CODEGEN_FUNCPTR *sf_ptrc_glCheckFramebufferStatusEXT)(GLenum);
+extern GLenum (GL_FUNCPTR *sf_ptrc_glCheckFramebufferStatusEXT)(GLenum);
 #define glCheckFramebufferStatusEXT sf_ptrc_glCheckFramebufferStatusEXT
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glDeleteFramebuffersEXT)(GLsizei, const GLuint *);
+extern void (GL_FUNCPTR *sf_ptrc_glDeleteFramebuffersEXT)(GLsizei, const GLuint*);
 #define glDeleteFramebuffersEXT sf_ptrc_glDeleteFramebuffersEXT
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glDeleteRenderbuffersEXT)(GLsizei, const GLuint *);
+extern void (GL_FUNCPTR *sf_ptrc_glDeleteRenderbuffersEXT)(GLsizei, const GLuint*);
 #define glDeleteRenderbuffersEXT sf_ptrc_glDeleteRenderbuffersEXT
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glFramebufferRenderbufferEXT)(GLenum, GLenum, GLenum, GLuint);
+extern void (GL_FUNCPTR *sf_ptrc_glFramebufferRenderbufferEXT)(GLenum, GLenum, GLenum, GLuint);
 #define glFramebufferRenderbufferEXT sf_ptrc_glFramebufferRenderbufferEXT
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glFramebufferTexture1DEXT)(GLenum, GLenum, GLenum, GLuint, GLint);
+extern void (GL_FUNCPTR *sf_ptrc_glFramebufferTexture1DEXT)(GLenum, GLenum, GLenum, GLuint, GLint);
 #define glFramebufferTexture1DEXT sf_ptrc_glFramebufferTexture1DEXT
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glFramebufferTexture2DEXT)(GLenum, GLenum, GLenum, GLuint, GLint);
+extern void (GL_FUNCPTR *sf_ptrc_glFramebufferTexture2DEXT)(GLenum, GLenum, GLenum, GLuint, GLint);
 #define glFramebufferTexture2DEXT sf_ptrc_glFramebufferTexture2DEXT
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glFramebufferTexture3DEXT)(GLenum, GLenum, GLenum, GLuint, GLint, GLint);
+extern void (GL_FUNCPTR *sf_ptrc_glFramebufferTexture3DEXT)(GLenum, GLenum, GLenum, GLuint, GLint, GLint);
 #define glFramebufferTexture3DEXT sf_ptrc_glFramebufferTexture3DEXT
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGenFramebuffersEXT)(GLsizei, GLuint *);
+extern void (GL_FUNCPTR *sf_ptrc_glGenFramebuffersEXT)(GLsizei, GLuint*);
 #define glGenFramebuffersEXT sf_ptrc_glGenFramebuffersEXT
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGenRenderbuffersEXT)(GLsizei, GLuint *);
+extern void (GL_FUNCPTR *sf_ptrc_glGenRenderbuffersEXT)(GLsizei, GLuint*);
 #define glGenRenderbuffersEXT sf_ptrc_glGenRenderbuffersEXT
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGenerateMipmapEXT)(GLenum);
+extern void (GL_FUNCPTR *sf_ptrc_glGenerateMipmapEXT)(GLenum);
 #define glGenerateMipmapEXT sf_ptrc_glGenerateMipmapEXT
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetFramebufferAttachmentParameterivEXT)(GLenum, GLenum, GLenum, GLint *);
+extern void (GL_FUNCPTR *sf_ptrc_glGetFramebufferAttachmentParameterivEXT)(GLenum, GLenum, GLenum, GLint*);
 #define glGetFramebufferAttachmentParameterivEXT sf_ptrc_glGetFramebufferAttachmentParameterivEXT
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetRenderbufferParameterivEXT)(GLenum, GLenum, GLint *);
+extern void (GL_FUNCPTR *sf_ptrc_glGetRenderbufferParameterivEXT)(GLenum, GLenum, GLint*);
 #define glGetRenderbufferParameterivEXT sf_ptrc_glGetRenderbufferParameterivEXT
-extern GLboolean (CODEGEN_FUNCPTR *sf_ptrc_glIsFramebufferEXT)(GLuint);
+extern GLboolean (GL_FUNCPTR *sf_ptrc_glIsFramebufferEXT)(GLuint);
 #define glIsFramebufferEXT sf_ptrc_glIsFramebufferEXT
-extern GLboolean (CODEGEN_FUNCPTR *sf_ptrc_glIsRenderbufferEXT)(GLuint);
+extern GLboolean (GL_FUNCPTR *sf_ptrc_glIsRenderbufferEXT)(GLuint);
 #define glIsRenderbufferEXT sf_ptrc_glIsRenderbufferEXT
-extern void (CODEGEN_FUNCPTR *sf_ptrc_glRenderbufferStorageEXT)(GLenum, GLenum, GLsizei, GLsizei);
+extern void (GL_FUNCPTR *sf_ptrc_glRenderbufferStorageEXT)(GLenum, GLenum, GLsizei, GLsizei);
 #define glRenderbufferStorageEXT sf_ptrc_glRenderbufferStorageEXT
-#endif /*GL_EXT_framebuffer_object*/
+#endif // GL_EXT_framebuffer_object
 
+GLAPI void APIENTRY glAccum(GLenum, GLfloat);
+GLAPI void APIENTRY glAlphaFunc(GLenum, GLfloat);
+GLAPI void APIENTRY glBegin(GLenum);
+GLAPI void APIENTRY glBitmap(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte*);
 GLAPI void APIENTRY glBlendFunc(GLenum, GLenum);
+GLAPI void APIENTRY glCallList(GLuint);
+GLAPI void APIENTRY glCallLists(GLsizei, GLenum, const void*);
 GLAPI void APIENTRY glClear(GLbitfield);
+GLAPI void APIENTRY glClearAccum(GLfloat, GLfloat, GLfloat, GLfloat);
 GLAPI void APIENTRY glClearColor(GLfloat, GLfloat, GLfloat, GLfloat);
 GLAPI void APIENTRY glClearDepth(GLdouble);
+GLAPI void APIENTRY glClearIndex(GLfloat);
 GLAPI void APIENTRY glClearStencil(GLint);
-GLAPI void APIENTRY glClipPlane(GLenum, const GLdouble *);
+GLAPI void APIENTRY glClipPlane(GLenum, const GLdouble*);
+GLAPI void APIENTRY glColor3b(GLbyte, GLbyte, GLbyte);
+GLAPI void APIENTRY glColor3bv(const GLbyte*);
+GLAPI void APIENTRY glColor3d(GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glColor3dv(const GLdouble*);
+GLAPI void APIENTRY glColor3f(GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glColor3fv(const GLfloat*);
+GLAPI void APIENTRY glColor3i(GLint, GLint, GLint);
+GLAPI void APIENTRY glColor3iv(const GLint*);
+GLAPI void APIENTRY glColor3s(GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glColor3sv(const GLshort*);
+GLAPI void APIENTRY glColor3ub(GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glColor3ubv(const GLubyte*);
+GLAPI void APIENTRY glColor3ui(GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glColor3uiv(const GLuint*);
+GLAPI void APIENTRY glColor3us(GLushort, GLushort, GLushort);
+GLAPI void APIENTRY glColor3usv(const GLushort*);
+GLAPI void APIENTRY glColor4b(GLbyte, GLbyte, GLbyte, GLbyte);
+GLAPI void APIENTRY glColor4bv(const GLbyte*);
+GLAPI void APIENTRY glColor4d(GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glColor4dv(const GLdouble*);
+GLAPI void APIENTRY glColor4f(GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glColor4fv(const GLfloat*);
+GLAPI void APIENTRY glColor4i(GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glColor4iv(const GLint*);
+GLAPI void APIENTRY glColor4s(GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glColor4sv(const GLshort*);
+GLAPI void APIENTRY glColor4ub(GLubyte, GLubyte, GLubyte, GLubyte);
+GLAPI void APIENTRY glColor4ubv(const GLubyte*);
+GLAPI void APIENTRY glColor4ui(GLuint, GLuint, GLuint, GLuint);
+GLAPI void APIENTRY glColor4uiv(const GLuint*);
+GLAPI void APIENTRY glColor4us(GLushort, GLushort, GLushort, GLushort);
+GLAPI void APIENTRY glColor4usv(const GLushort*);
 GLAPI void APIENTRY glColorMask(GLboolean, GLboolean, GLboolean, GLboolean);
+GLAPI void APIENTRY glColorMaterial(GLenum, GLenum);
 GLAPI void APIENTRY glCopyPixels(GLint, GLint, GLsizei, GLsizei, GLenum);
 GLAPI void APIENTRY glCullFace(GLenum);
+GLAPI void APIENTRY glDeleteLists(GLuint, GLsizei);
 GLAPI void APIENTRY glDepthFunc(GLenum);
 GLAPI void APIENTRY glDepthMask(GLboolean);
 GLAPI void APIENTRY glDepthRange(GLdouble, GLdouble);
 GLAPI void APIENTRY glDisable(GLenum);
 GLAPI void APIENTRY glDrawBuffer(GLenum);
+GLAPI void APIENTRY glDrawPixels(GLsizei, GLsizei, GLenum, GLenum, const void*);
+GLAPI void APIENTRY glEdgeFlag(GLboolean);
+GLAPI void APIENTRY glEdgeFlagv(const GLboolean*);
 GLAPI void APIENTRY glEnable(GLenum);
+GLAPI void APIENTRY glEnd();
+GLAPI void APIENTRY glEndList();
+GLAPI void APIENTRY glEvalCoord1d(GLdouble);
+GLAPI void APIENTRY glEvalCoord1dv(const GLdouble*);
+GLAPI void APIENTRY glEvalCoord1f(GLfloat);
+GLAPI void APIENTRY glEvalCoord1fv(const GLfloat*);
+GLAPI void APIENTRY glEvalCoord2d(GLdouble, GLdouble);
+GLAPI void APIENTRY glEvalCoord2dv(const GLdouble*);
+GLAPI void APIENTRY glEvalCoord2f(GLfloat, GLfloat);
+GLAPI void APIENTRY glEvalCoord2fv(const GLfloat*);
+GLAPI void APIENTRY glEvalMesh1(GLenum, GLint, GLint);
+GLAPI void APIENTRY glEvalMesh2(GLenum, GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glEvalPoint1(GLint);
+GLAPI void APIENTRY glEvalPoint2(GLint, GLint);
+GLAPI void APIENTRY glFeedbackBuffer(GLsizei, GLenum, GLfloat*);
 GLAPI void APIENTRY glFinish();
 GLAPI void APIENTRY glFlush();
+GLAPI void APIENTRY glFogf(GLenum, GLfloat);
+GLAPI void APIENTRY glFogfv(GLenum, const GLfloat*);
+GLAPI void APIENTRY glFogi(GLenum, GLint);
+GLAPI void APIENTRY glFogiv(GLenum, const GLint*);
 GLAPI void APIENTRY glFrontFace(GLenum);
 GLAPI void APIENTRY glFrustum(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble);
-GLAPI void APIENTRY glGetBooleanv(GLenum, GLboolean *);
-GLAPI void APIENTRY glGetDoublev(GLenum, GLdouble *);
+GLAPI GLuint APIENTRY glGenLists(GLsizei);
+GLAPI void APIENTRY glGetBooleanv(GLenum, GLboolean*);
+GLAPI void APIENTRY glGetClipPlane(GLenum, GLdouble*);
+GLAPI void APIENTRY glGetDoublev(GLenum, GLdouble*);
 GLAPI GLenum APIENTRY glGetError();
-GLAPI void APIENTRY glGetFloatv(GLenum, GLfloat *);
-GLAPI void APIENTRY glGetIntegerv(GLenum, GLint *);
-GLAPI const GLubyte * APIENTRY glGetString(GLenum);
-GLAPI void APIENTRY glGetTexEnvfv(GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetTexEnviv(GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetTexGendv(GLenum, GLenum, GLdouble *);
-GLAPI void APIENTRY glGetTexGenfv(GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetTexGeniv(GLenum, GLenum, GLint *);
-GLAPI void APIENTRY glGetTexImage(GLenum, GLint, GLenum, GLenum, GLvoid *);
-GLAPI void APIENTRY glGetTexLevelParameterfv(GLenum, GLint, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetTexLevelParameteriv(GLenum, GLint, GLenum, GLint *);
-GLAPI void APIENTRY glGetTexParameterfv(GLenum, GLenum, GLfloat *);
-GLAPI void APIENTRY glGetTexParameteriv(GLenum, GLenum, GLint *);
+GLAPI void APIENTRY glGetFloatv(GLenum, GLfloat*);
+GLAPI void APIENTRY glGetIntegerv(GLenum, GLint*);
+GLAPI void APIENTRY glGetLightfv(GLenum, GLenum, GLfloat*);
+GLAPI void APIENTRY glGetLightiv(GLenum, GLenum, GLint*);
+GLAPI void APIENTRY glGetMapdv(GLenum, GLenum, GLdouble*);
+GLAPI void APIENTRY glGetMapfv(GLenum, GLenum, GLfloat*);
+GLAPI void APIENTRY glGetMapiv(GLenum, GLenum, GLint*);
+GLAPI void APIENTRY glGetMaterialfv(GLenum, GLenum, GLfloat*);
+GLAPI void APIENTRY glGetMaterialiv(GLenum, GLenum, GLint*);
+GLAPI void APIENTRY glGetPixelMapfv(GLenum, GLfloat*);
+GLAPI void APIENTRY glGetPixelMapuiv(GLenum, GLuint*);
+GLAPI void APIENTRY glGetPixelMapusv(GLenum, GLushort*);
+GLAPI void APIENTRY glGetPolygonStipple(GLubyte*);
+GLAPI const GLubyte* APIENTRY glGetString(GLenum);
+GLAPI void APIENTRY glGetTexEnvfv(GLenum, GLenum, GLfloat*);
+GLAPI void APIENTRY glGetTexEnviv(GLenum, GLenum, GLint*);
+GLAPI void APIENTRY glGetTexGendv(GLenum, GLenum, GLdouble*);
+GLAPI void APIENTRY glGetTexGenfv(GLenum, GLenum, GLfloat*);
+GLAPI void APIENTRY glGetTexGeniv(GLenum, GLenum, GLint*);
+GLAPI void APIENTRY glGetTexImage(GLenum, GLint, GLenum, GLenum, void*);
+GLAPI void APIENTRY glGetTexLevelParameterfv(GLenum, GLint, GLenum, GLfloat*);
+GLAPI void APIENTRY glGetTexLevelParameteriv(GLenum, GLint, GLenum, GLint*);
+GLAPI void APIENTRY glGetTexParameterfv(GLenum, GLenum, GLfloat*);
+GLAPI void APIENTRY glGetTexParameteriv(GLenum, GLenum, GLint*);
 GLAPI void APIENTRY glHint(GLenum, GLenum);
 GLAPI void APIENTRY glIndexMask(GLuint);
+GLAPI void APIENTRY glIndexd(GLdouble);
+GLAPI void APIENTRY glIndexdv(const GLdouble*);
+GLAPI void APIENTRY glIndexf(GLfloat);
+GLAPI void APIENTRY glIndexfv(const GLfloat*);
+GLAPI void APIENTRY glIndexi(GLint);
+GLAPI void APIENTRY glIndexiv(const GLint*);
+GLAPI void APIENTRY glIndexs(GLshort);
+GLAPI void APIENTRY glIndexsv(const GLshort*);
+GLAPI void APIENTRY glInitNames();
 GLAPI GLboolean APIENTRY glIsEnabled(GLenum);
+GLAPI GLboolean APIENTRY glIsList(GLuint);
+GLAPI void APIENTRY glLightModelf(GLenum, GLfloat);
+GLAPI void APIENTRY glLightModelfv(GLenum, const GLfloat*);
+GLAPI void APIENTRY glLightModeli(GLenum, GLint);
+GLAPI void APIENTRY glLightModeliv(GLenum, const GLint*);
+GLAPI void APIENTRY glLightf(GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glLightfv(GLenum, GLenum, const GLfloat*);
+GLAPI void APIENTRY glLighti(GLenum, GLenum, GLint);
+GLAPI void APIENTRY glLightiv(GLenum, GLenum, const GLint*);
+GLAPI void APIENTRY glLineStipple(GLint, GLushort);
 GLAPI void APIENTRY glLineWidth(GLfloat);
+GLAPI void APIENTRY glListBase(GLuint);
 GLAPI void APIENTRY glLoadIdentity();
-GLAPI void APIENTRY glLoadMatrixd(const GLdouble *);
-GLAPI void APIENTRY glLoadMatrixf(const GLfloat *);
+GLAPI void APIENTRY glLoadMatrixd(const GLdouble*);
+GLAPI void APIENTRY glLoadMatrixf(const GLfloat*);
+GLAPI void APIENTRY glLoadName(GLuint);
+GLAPI void APIENTRY glLogicOp(GLenum);
+GLAPI void APIENTRY glMap1d(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble*);
+GLAPI void APIENTRY glMap1f(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat*);
+GLAPI void APIENTRY glMap2d(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble*);
+GLAPI void APIENTRY glMap2f(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat*);
+GLAPI void APIENTRY glMapGrid1d(GLint, GLdouble, GLdouble);
+GLAPI void APIENTRY glMapGrid1f(GLint, GLfloat, GLfloat);
+GLAPI void APIENTRY glMapGrid2d(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble);
+GLAPI void APIENTRY glMapGrid2f(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat);
+GLAPI void APIENTRY glMaterialf(GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glMaterialfv(GLenum, GLenum, const GLfloat*);
+GLAPI void APIENTRY glMateriali(GLenum, GLenum, GLint);
+GLAPI void APIENTRY glMaterialiv(GLenum, GLenum, const GLint*);
 GLAPI void APIENTRY glMatrixMode(GLenum);
-GLAPI void APIENTRY glMultMatrixd(const GLdouble *);
-GLAPI void APIENTRY glMultMatrixf(const GLfloat *);
+GLAPI void APIENTRY glMultMatrixd(const GLdouble*);
+GLAPI void APIENTRY glMultMatrixf(const GLfloat*);
+GLAPI void APIENTRY glNewList(GLuint, GLenum);
+GLAPI void APIENTRY glNormal3b(GLbyte, GLbyte, GLbyte);
+GLAPI void APIENTRY glNormal3bv(const GLbyte*);
+GLAPI void APIENTRY glNormal3d(GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glNormal3dv(const GLdouble*);
+GLAPI void APIENTRY glNormal3f(GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glNormal3fv(const GLfloat*);
+GLAPI void APIENTRY glNormal3i(GLint, GLint, GLint);
+GLAPI void APIENTRY glNormal3iv(const GLint*);
+GLAPI void APIENTRY glNormal3s(GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glNormal3sv(const GLshort*);
 GLAPI void APIENTRY glOrtho(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glPassThrough(GLfloat);
+GLAPI void APIENTRY glPixelMapfv(GLenum, GLsizei, const GLfloat*);
+GLAPI void APIENTRY glPixelMapuiv(GLenum, GLsizei, const GLuint*);
+GLAPI void APIENTRY glPixelMapusv(GLenum, GLsizei, const GLushort*);
+GLAPI void APIENTRY glPixelStoref(GLenum, GLfloat);
+GLAPI void APIENTRY glPixelStorei(GLenum, GLint);
+GLAPI void APIENTRY glPixelTransferf(GLenum, GLfloat);
+GLAPI void APIENTRY glPixelTransferi(GLenum, GLint);
+GLAPI void APIENTRY glPixelZoom(GLfloat, GLfloat);
 GLAPI void APIENTRY glPointSize(GLfloat);
+GLAPI void APIENTRY glPolygonMode(GLenum, GLenum);
+GLAPI void APIENTRY glPolygonStipple(const GLubyte*);
 GLAPI void APIENTRY glPopAttrib();
 GLAPI void APIENTRY glPopMatrix();
+GLAPI void APIENTRY glPopName();
 GLAPI void APIENTRY glPushAttrib(GLbitfield);
 GLAPI void APIENTRY glPushMatrix();
+GLAPI void APIENTRY glPushName(GLuint);
+GLAPI void APIENTRY glRasterPos2d(GLdouble, GLdouble);
+GLAPI void APIENTRY glRasterPos2dv(const GLdouble*);
+GLAPI void APIENTRY glRasterPos2f(GLfloat, GLfloat);
+GLAPI void APIENTRY glRasterPos2fv(const GLfloat*);
+GLAPI void APIENTRY glRasterPos2i(GLint, GLint);
+GLAPI void APIENTRY glRasterPos2iv(const GLint*);
+GLAPI void APIENTRY glRasterPos2s(GLshort, GLshort);
+GLAPI void APIENTRY glRasterPos2sv(const GLshort*);
+GLAPI void APIENTRY glRasterPos3d(GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glRasterPos3dv(const GLdouble*);
+GLAPI void APIENTRY glRasterPos3f(GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glRasterPos3fv(const GLfloat*);
+GLAPI void APIENTRY glRasterPos3i(GLint, GLint, GLint);
+GLAPI void APIENTRY glRasterPos3iv(const GLint*);
+GLAPI void APIENTRY glRasterPos3s(GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glRasterPos3sv(const GLshort*);
+GLAPI void APIENTRY glRasterPos4d(GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glRasterPos4dv(const GLdouble*);
+GLAPI void APIENTRY glRasterPos4f(GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glRasterPos4fv(const GLfloat*);
+GLAPI void APIENTRY glRasterPos4i(GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glRasterPos4iv(const GLint*);
+GLAPI void APIENTRY glRasterPos4s(GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glRasterPos4sv(const GLshort*);
 GLAPI void APIENTRY glReadBuffer(GLenum);
-GLAPI void APIENTRY glReadPixels(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *);
+GLAPI void APIENTRY glReadPixels(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, void*);
+GLAPI void APIENTRY glRectd(GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glRectdv(const GLdouble*, const GLdouble*);
+GLAPI void APIENTRY glRectf(GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glRectfv(const GLfloat*, const GLfloat*);
+GLAPI void APIENTRY glRecti(GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glRectiv(const GLint*, const GLint*);
+GLAPI void APIENTRY glRects(GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glRectsv(const GLshort*, const GLshort*);
+GLAPI GLint APIENTRY glRenderMode(GLenum);
+GLAPI void APIENTRY glRotated(GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glRotatef(GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glScaled(GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glScalef(GLfloat, GLfloat, GLfloat);
 GLAPI void APIENTRY glScissor(GLint, GLint, GLsizei, GLsizei);
+GLAPI void APIENTRY glSelectBuffer(GLsizei, GLuint*);
 GLAPI void APIENTRY glShadeModel(GLenum);
 GLAPI void APIENTRY glStencilFunc(GLenum, GLint, GLuint);
 GLAPI void APIENTRY glStencilMask(GLuint);
 GLAPI void APIENTRY glStencilOp(GLenum, GLenum, GLenum);
-GLAPI void APIENTRY glTexImage1D(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *);
+GLAPI void APIENTRY glTexCoord1d(GLdouble);
+GLAPI void APIENTRY glTexCoord1dv(const GLdouble*);
+GLAPI void APIENTRY glTexCoord1f(GLfloat);
+GLAPI void APIENTRY glTexCoord1fv(const GLfloat*);
+GLAPI void APIENTRY glTexCoord1i(GLint);
+GLAPI void APIENTRY glTexCoord1iv(const GLint*);
+GLAPI void APIENTRY glTexCoord1s(GLshort);
+GLAPI void APIENTRY glTexCoord1sv(const GLshort*);
+GLAPI void APIENTRY glTexCoord2d(GLdouble, GLdouble);
+GLAPI void APIENTRY glTexCoord2dv(const GLdouble*);
+GLAPI void APIENTRY glTexCoord2f(GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord2fv(const GLfloat*);
+GLAPI void APIENTRY glTexCoord2i(GLint, GLint);
+GLAPI void APIENTRY glTexCoord2iv(const GLint*);
+GLAPI void APIENTRY glTexCoord2s(GLshort, GLshort);
+GLAPI void APIENTRY glTexCoord2sv(const GLshort*);
+GLAPI void APIENTRY glTexCoord3d(GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glTexCoord3dv(const GLdouble*);
+GLAPI void APIENTRY glTexCoord3f(GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord3fv(const GLfloat*);
+GLAPI void APIENTRY glTexCoord3i(GLint, GLint, GLint);
+GLAPI void APIENTRY glTexCoord3iv(const GLint*);
+GLAPI void APIENTRY glTexCoord3s(GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glTexCoord3sv(const GLshort*);
+GLAPI void APIENTRY glTexCoord4d(GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glTexCoord4dv(const GLdouble*);
+GLAPI void APIENTRY glTexCoord4f(GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glTexCoord4fv(const GLfloat*);
+GLAPI void APIENTRY glTexCoord4i(GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glTexCoord4iv(const GLint*);
+GLAPI void APIENTRY glTexCoord4s(GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glTexCoord4sv(const GLshort*);
+GLAPI void APIENTRY glTexEnvf(GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glTexEnvfv(GLenum, GLenum, const GLfloat*);
+GLAPI void APIENTRY glTexEnvi(GLenum, GLenum, GLint);
+GLAPI void APIENTRY glTexEnviv(GLenum, GLenum, const GLint*);
+GLAPI void APIENTRY glTexGend(GLenum, GLenum, GLdouble);
+GLAPI void APIENTRY glTexGendv(GLenum, GLenum, const GLdouble*);
+GLAPI void APIENTRY glTexGenf(GLenum, GLenum, GLfloat);
+GLAPI void APIENTRY glTexGenfv(GLenum, GLenum, const GLfloat*);
+GLAPI void APIENTRY glTexGeni(GLenum, GLenum, GLint);
+GLAPI void APIENTRY glTexGeniv(GLenum, GLenum, const GLint*);
+GLAPI void APIENTRY glTexImage1D(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const void*);
+GLAPI void APIENTRY glTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void*);
 GLAPI void APIENTRY glTexParameterf(GLenum, GLenum, GLfloat);
-GLAPI void APIENTRY glTexParameterfv(GLenum, GLenum, const GLfloat *);
+GLAPI void APIENTRY glTexParameterfv(GLenum, GLenum, const GLfloat*);
 GLAPI void APIENTRY glTexParameteri(GLenum, GLenum, GLint);
-GLAPI void APIENTRY glTexParameteriv(GLenum, GLenum, const GLint *);
+GLAPI void APIENTRY glTexParameteriv(GLenum, GLenum, const GLint*);
+GLAPI void APIENTRY glTranslated(GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glTranslatef(GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertex2d(GLdouble, GLdouble);
+GLAPI void APIENTRY glVertex2dv(const GLdouble*);
+GLAPI void APIENTRY glVertex2f(GLfloat, GLfloat);
+GLAPI void APIENTRY glVertex2fv(const GLfloat*);
+GLAPI void APIENTRY glVertex2i(GLint, GLint);
+GLAPI void APIENTRY glVertex2iv(const GLint*);
+GLAPI void APIENTRY glVertex2s(GLshort, GLshort);
+GLAPI void APIENTRY glVertex2sv(const GLshort*);
+GLAPI void APIENTRY glVertex3d(GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertex3dv(const GLdouble*);
+GLAPI void APIENTRY glVertex3f(GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertex3fv(const GLfloat*);
+GLAPI void APIENTRY glVertex3i(GLint, GLint, GLint);
+GLAPI void APIENTRY glVertex3iv(const GLint*);
+GLAPI void APIENTRY glVertex3s(GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertex3sv(const GLshort*);
+GLAPI void APIENTRY glVertex4d(GLdouble, GLdouble, GLdouble, GLdouble);
+GLAPI void APIENTRY glVertex4dv(const GLdouble*);
+GLAPI void APIENTRY glVertex4f(GLfloat, GLfloat, GLfloat, GLfloat);
+GLAPI void APIENTRY glVertex4fv(const GLfloat*);
+GLAPI void APIENTRY glVertex4i(GLint, GLint, GLint, GLint);
+GLAPI void APIENTRY glVertex4iv(const GLint*);
+GLAPI void APIENTRY glVertex4s(GLshort, GLshort, GLshort, GLshort);
+GLAPI void APIENTRY glVertex4sv(const GLshort*);
 GLAPI void APIENTRY glViewport(GLint, GLint, GLsizei, GLsizei);
 
+GLAPI GLboolean APIENTRY glAreTexturesResident(GLsizei, const GLuint*, GLboolean*);
+GLAPI void APIENTRY glArrayElement(GLint);
 GLAPI void APIENTRY glBindTexture(GLenum, GLuint);
-GLAPI void APIENTRY glColorPointer(GLint, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glColorPointer(GLint, GLenum, GLsizei, const void*);
 GLAPI void APIENTRY glCopyTexImage1D(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint);
 GLAPI void APIENTRY glCopyTexImage2D(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint);
 GLAPI void APIENTRY glCopyTexSubImage1D(GLenum, GLint, GLint, GLint, GLint, GLsizei);
 GLAPI void APIENTRY glCopyTexSubImage2D(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei);
-GLAPI void APIENTRY glDeleteTextures(GLsizei, const GLuint *);
+GLAPI void APIENTRY glDeleteTextures(GLsizei, const GLuint*);
 GLAPI void APIENTRY glDisableClientState(GLenum);
 GLAPI void APIENTRY glDrawArrays(GLenum, GLint, GLsizei);
-GLAPI void APIENTRY glDrawElements(GLenum, GLsizei, GLenum, const GLvoid *);
+GLAPI void APIENTRY glDrawElements(GLenum, GLsizei, GLenum, const void*);
+GLAPI void APIENTRY glEdgeFlagPointer(GLsizei, const void*);
 GLAPI void APIENTRY glEnableClientState(GLenum);
-GLAPI void APIENTRY glGenTextures(GLsizei, GLuint *);
-GLAPI void APIENTRY glGetPointerv(GLenum, GLvoid **);
-GLAPI void APIENTRY glNormalPointer(GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glGenTextures(GLsizei, GLuint*);
+GLAPI void APIENTRY glGetPointerv(GLenum, void**);
+GLAPI void APIENTRY glIndexPointer(GLenum, GLsizei, const void*);
+GLAPI void APIENTRY glIndexub(GLubyte);
+GLAPI void APIENTRY glIndexubv(const GLubyte*);
+GLAPI void APIENTRY glInterleavedArrays(GLenum, GLsizei, const void*);
+GLAPI GLboolean APIENTRY glIsTexture(GLuint);
+GLAPI void APIENTRY glNormalPointer(GLenum, GLsizei, const void*);
 GLAPI void APIENTRY glPolygonOffset(GLfloat, GLfloat);
 GLAPI void APIENTRY glPopClientAttrib();
+GLAPI void APIENTRY glPrioritizeTextures(GLsizei, const GLuint*, const GLfloat*);
 GLAPI void APIENTRY glPushClientAttrib(GLbitfield);
-GLAPI void APIENTRY glTexCoordPointer(GLint, GLenum, GLsizei, const GLvoid *);
-GLAPI void APIENTRY glTexSubImage1D(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glTexSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
-GLAPI void APIENTRY glVertexPointer(GLint, GLenum, GLsizei, const GLvoid *);
+GLAPI void APIENTRY glTexCoordPointer(GLint, GLenum, GLsizei, const void*);
+GLAPI void APIENTRY glTexSubImage1D(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const void*);
+GLAPI void APIENTRY glTexSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const void*);
+GLAPI void APIENTRY glVertexPointer(GLint, GLenum, GLsizei, const void*);
 
 enum sfogl_LoadStatus
 {
@@ -1040,14 +1545,10 @@ enum sfogl_LoadStatus
     sfogl_LOAD_SUCCEEDED = 1
 };
 
-int sfogl_LoadFunctions();
-
-int sfogl_GetMinorVersion();
-int sfogl_GetMajorVersion();
-int sfogl_IsVersionGEQ(int majorVersion, int minorVersion);
+void sfogl_LoadFunctions();
 
 #ifdef __cplusplus
 }
-#endif /*__cplusplus*/
+#endif // __cplusplus
 
-#endif //SF_POINTER_C_GENERATED_HEADER_OPENGL_HPP
+#endif // SFML_GLLOADER_HPP
diff --git a/src/SFML/Graphics/Shader.cpp b/src/SFML/Graphics/Shader.cpp
index ff6a6ffe5..fd08d3ab4 100644
--- a/src/SFML/Graphics/Shader.cpp
+++ b/src/SFML/Graphics/Shader.cpp
@@ -119,7 +119,21 @@ namespace
         // Create a temporary context in case the user checks
         // before a GlResource is created, thus initializing
         // the shared context
-        sf::Context context;
+        if (!sf::Context::getActiveContext())
+        {
+            sf::Context context;
+
+            // Make sure that extensions are initialized
+            sf::priv::ensureExtensionsInit();
+
+            bool available = GLEXT_multitexture         &&
+                             GLEXT_shading_language_100 &&
+                             GLEXT_shader_objects       &&
+                             GLEXT_vertex_shader        &&
+                             GLEXT_fragment_shader;
+
+            return available;
+        }
 
         // Make sure that extensions are initialized
         sf::priv::ensureExtensionsInit();
diff --git a/src/SFML/Graphics/Texture.cpp b/src/SFML/Graphics/Texture.cpp
index 4be52e7bb..d939cff94 100644
--- a/src/SFML/Graphics/Texture.cpp
+++ b/src/SFML/Graphics/Texture.cpp
@@ -58,7 +58,15 @@ namespace
         // Create a temporary context in case the user queries
         // the size before a GlResource is created, thus
         // initializing the shared context
-        sf::Context context;
+        if (!sf::Context::getActiveContext())
+        {
+            sf::Context context;
+
+            GLint size;
+            glCheck(glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size));
+
+            return static_cast<unsigned int>(size);
+        }
 
         GLint size;
         glCheck(glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size));
diff --git a/src/SFML/Window/Context.cpp b/src/SFML/Window/Context.cpp
index 0ec500a78..3b3b9dc28 100644
--- a/src/SFML/Window/Context.cpp
+++ b/src/SFML/Window/Context.cpp
@@ -27,7 +27,32 @@
 ////////////////////////////////////////////////////////////
 #include <SFML/Window/Context.hpp>
 #include <SFML/Window/GlContext.hpp>
+#include <SFML/System/ThreadLocalPtr.hpp>
+#include <SFML/OpenGL.hpp>
+#include <algorithm>
+#include <vector>
+#include <string>
 
+#if defined(SFML_SYSTEM_WINDOWS)
+
+    typedef const GLubyte* (APIENTRY *glGetStringiFuncType)(GLenum, GLuint);
+
+#else
+
+    typedef const GLubyte* (*glGetStringiFuncType)(GLenum, GLuint);
+
+#endif
+
+#if !defined(GL_NUM_EXTENSIONS)
+    #define GL_NUM_EXTENSIONS 0x821D
+#endif
+
+
+namespace
+{
+    // This per-thread variable holds the current context for each thread
+    sf::ThreadLocalPtr<sf::Context> currentContext(NULL);
+}
 
 namespace sf
 {
@@ -42,6 +67,7 @@ Context::Context()
 ////////////////////////////////////////////////////////////
 Context::~Context()
 {
+    setActive(false);
     delete m_context;
 }
 
@@ -49,7 +75,26 @@ Context::~Context()
 ////////////////////////////////////////////////////////////
 bool Context::setActive(bool active)
 {
-    return m_context->setActive(active);
+    bool result = m_context->setActive(active);
+
+    if (result)
+        currentContext = (active ? this : NULL);
+
+    return result;
+}
+
+
+////////////////////////////////////////////////////////////
+const ContextSettings& Context::getSettings() const
+{
+    return m_context->getSettings();
+}
+
+
+////////////////////////////////////////////////////////////
+const Context* Context::getActiveContext()
+{
+    return currentContext;
 }
 
 
@@ -60,6 +105,67 @@ GlFunctionPointer Context::getFunction(const char* name)
 }
 
 
+////////////////////////////////////////////////////////////
+bool Context::isExtensionAvailable(const char* name)
+{
+    static std::vector<std::string> extensions;
+    static bool loaded = false;
+
+    if (!loaded)
+    {
+        const Context* context = getActiveContext();
+
+        if (!context)
+            return false;
+
+        const char* extensionString = NULL;
+
+        if(context->getSettings().majorVersion < 3)
+        {
+            // Try to load the < 3.0 way
+            extensionString = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
+
+            do
+            {
+                const char* extension = extensionString;
+
+                while(*extensionString && (*extensionString != ' '))
+                    extensionString++;
+
+                extensions.push_back(std::string(extension, extensionString));
+            }
+            while (*extensionString++);
+        }
+        else
+        {
+            // Try to load the >= 3.0 way
+            glGetStringiFuncType glGetStringiFunc = NULL;
+            glGetStringiFunc = reinterpret_cast<glGetStringiFuncType>(getFunction("glGetStringi"));
+
+            if (glGetStringiFunc)
+            {
+                int numExtensions = 0;
+                glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions);
+
+                if (numExtensions)
+                {
+                    for (unsigned int i = 0; i < static_cast<unsigned int>(numExtensions); ++i)
+                    {
+                        extensionString = reinterpret_cast<const char*>(glGetStringiFunc(GL_EXTENSIONS, i));
+
+                        extensions.push_back(extensionString);
+                    }
+                }
+            }
+        }
+
+        loaded = true;
+    }
+
+    return std::find(extensions.begin(), extensions.end(), name) != extensions.end();
+}
+
+
 ////////////////////////////////////////////////////////////
 Context::Context(const ContextSettings& settings, unsigned int width, unsigned int height)
 {
diff --git a/src/SFML/Window/GlContext.cpp b/src/SFML/Window/GlContext.cpp
index 1a6677401..2bd9bf5f7 100644
--- a/src/SFML/Window/GlContext.cpp
+++ b/src/SFML/Window/GlContext.cpp
@@ -131,8 +131,8 @@ namespace
     ContextType* sharedContext = NULL;
 
     // Internal contexts
-    sf::ThreadLocalPtr<sf::priv::GlContext> internalContext(NULL);
-    std::set<sf::priv::GlContext*> internalContexts;
+    sf::ThreadLocalPtr<sf::Context> internalContext(NULL);
+    std::set<sf::Context*> internalContexts;
     sf::Mutex internalContextsMutex;
 
     // Check if the internal context of the current thread is valid
@@ -148,11 +148,11 @@ namespace
     }
 
     // Retrieve the internal context for the current thread
-    sf::priv::GlContext* getInternalContext()
+    sf::Context* getInternalContext()
     {
         if (!hasInternalContext())
         {
-            internalContext = sf::priv::GlContext::create();
+            internalContext = new sf::Context;
             sf::Lock lock(internalContextsMutex);
             internalContexts.insert(internalContext);
         }
@@ -171,6 +171,9 @@ void GlContext::globalInit()
 {
     Lock lock(mutex);
 
+    if (sharedContext)
+        return;
+
     // Create the shared context
     sharedContext = new ContextType(NULL);
     sharedContext->initialize();
@@ -187,13 +190,16 @@ void GlContext::globalCleanup()
 {
     Lock lock(mutex);
 
+    if (!sharedContext)
+        return;
+
     // Destroy the shared context
     delete sharedContext;
     sharedContext = NULL;
 
     // Destroy the internal contexts
     Lock internalContextsLock(internalContextsMutex);
-    for (std::set<GlContext*>::iterator it = internalContexts.begin(); it != internalContexts.end(); ++it)
+    for (std::set<Context*>::iterator it = internalContexts.begin(); it != internalContexts.end(); ++it)
         delete *it;
     internalContexts.clear();
 }
diff --git a/src/SFML/Window/Unix/GlxExtensions.cpp b/src/SFML/Window/Unix/GlxExtensions.cpp
index 029095c10..3bacdff87 100644
--- a/src/SFML/Window/Unix/GlxExtensions.cpp
+++ b/src/SFML/Window/Unix/GlxExtensions.cpp
@@ -30,6 +30,7 @@
 #include <cstdlib>
 #include <cstring>
 #include <cstddef>
+#include <string>
 
 static sf::GlFunctionPointer IntGetProcAddress(const char* name)
 {
@@ -43,13 +44,14 @@ int sfglx_ext_ARB_multisample = sfglx_LOAD_FAILED;
 int sfglx_ext_ARB_create_context = sfglx_LOAD_FAILED;
 int sfglx_ext_ARB_create_context_profile = sfglx_LOAD_FAILED;
 
-void (CODEGEN_FUNCPTR *sf_ptrc_glXSwapIntervalEXT)(Display *, GLXDrawable, int) = NULL;
+void (CODEGEN_FUNCPTR *sf_ptrc_glXSwapIntervalEXT)(Display*, GLXDrawable, int) = NULL;
 
 static int Load_EXT_swap_control(void)
 {
     int numFailed = 0;
-    sf_ptrc_glXSwapIntervalEXT = (void (CODEGEN_FUNCPTR *)(Display *, GLXDrawable, int))IntGetProcAddress("glXSwapIntervalEXT");
-    if(!sf_ptrc_glXSwapIntervalEXT) numFailed++;
+    sf_ptrc_glXSwapIntervalEXT = reinterpret_cast<void (CODEGEN_FUNCPTR*)(Display*, GLXDrawable, int)>(IntGetProcAddress("glXSwapIntervalEXT"));
+    if (!sf_ptrc_glXSwapIntervalEXT)
+        numFailed++;
     return numFailed;
 }
 
@@ -58,8 +60,9 @@ int (CODEGEN_FUNCPTR *sf_ptrc_glXSwapIntervalMESA)(int) = NULL;
 static int Load_MESA_swap_control(void)
 {
     int numFailed = 0;
-    sf_ptrc_glXSwapIntervalMESA = (int (CODEGEN_FUNCPTR *)(int))IntGetProcAddress("glXSwapIntervalMESA");
-    if(!sf_ptrc_glXSwapIntervalMESA) numFailed++;
+    sf_ptrc_glXSwapIntervalMESA = reinterpret_cast<int (CODEGEN_FUNCPTR*)(int)>(IntGetProcAddress("glXSwapIntervalMESA"));
+    if (!sf_ptrc_glXSwapIntervalMESA)
+        numFailed++;
     return numFailed;
 }
 
@@ -68,26 +71,28 @@ int (CODEGEN_FUNCPTR *sf_ptrc_glXSwapIntervalSGI)(int) = NULL;
 static int Load_SGI_swap_control(void)
 {
     int numFailed = 0;
-    sf_ptrc_glXSwapIntervalSGI = (int (CODEGEN_FUNCPTR *)(int))IntGetProcAddress("glXSwapIntervalSGI");
-    if(!sf_ptrc_glXSwapIntervalSGI) numFailed++;
+    sf_ptrc_glXSwapIntervalSGI = reinterpret_cast<int (CODEGEN_FUNCPTR *)(int)>(IntGetProcAddress("glXSwapIntervalSGI"));
+    if (!sf_ptrc_glXSwapIntervalSGI)
+        numFailed++;
     return numFailed;
 }
 
-GLXContext (CODEGEN_FUNCPTR *sf_ptrc_glXCreateContextAttribsARB)(Display *, GLXFBConfig, GLXContext, Bool, const int *) = NULL;
+GLXContext (CODEGEN_FUNCPTR *sf_ptrc_glXCreateContextAttribsARB)(Display*, GLXFBConfig, GLXContext, Bool, const int*) = NULL;
 
 static int Load_ARB_create_context(void)
 {
     int numFailed = 0;
-    sf_ptrc_glXCreateContextAttribsARB = (GLXContext (CODEGEN_FUNCPTR *)(Display *, GLXFBConfig, GLXContext, Bool, const int *))IntGetProcAddress("glXCreateContextAttribsARB");
-    if(!sf_ptrc_glXCreateContextAttribsARB) numFailed++;
+    sf_ptrc_glXCreateContextAttribsARB = reinterpret_cast<GLXContext (CODEGEN_FUNCPTR*)(Display*, GLXFBConfig, GLXContext, Bool, const int*)>(IntGetProcAddress("glXCreateContextAttribsARB"));
+    if (!sf_ptrc_glXCreateContextAttribsARB)
+        numFailed++;
     return numFailed;
 }
 
 typedef int (*PFN_LOADFUNCPOINTERS)(void);
 typedef struct sfglx_StrToExtMap_s
 {
-    const char *extensionName;
-    int *extensionVariable;
+    const char* extensionName;
+    int* extensionVariable;
     PFN_LOADFUNCPOINTERS LoadExtension;
 } sfglx_StrToExtMap;
 
@@ -102,19 +107,20 @@ static sfglx_StrToExtMap ExtensionMap[6] = {
 
 static int g_extensionMapSize = 6;
 
-static sfglx_StrToExtMap *FindExtEntry(const char *extensionName)
+
+static sfglx_StrToExtMap* FindExtEntry(const char* extensionName)
 {
-    int loop;
-    sfglx_StrToExtMap *currLoc = ExtensionMap;
-    for(loop = 0; loop < g_extensionMapSize; ++loop, ++currLoc)
+    sfglx_StrToExtMap* currLoc = ExtensionMap;
+    for (int loop = 0; loop < g_extensionMapSize; ++loop, ++currLoc)
     {
-        if(strcmp(extensionName, currLoc->extensionName) == 0)
+        if (std::strcmp(extensionName, currLoc->extensionName) == 0)
             return currLoc;
     }
 
     return NULL;
 }
 
+
 static void ClearExtensionVars(void)
 {
     sfglx_ext_EXT_swap_control = sfglx_LOAD_FAILED;
@@ -126,16 +132,16 @@ static void ClearExtensionVars(void)
 }
 
 
-static void LoadExtByName(const char *extensionName)
+static void LoadExtByName(const char* extensionName)
 {
-    sfglx_StrToExtMap *entry = NULL;
+    sfglx_StrToExtMap* entry = NULL;
     entry = FindExtEntry(extensionName);
-    if(entry)
+    if (entry)
     {
-        if(entry->LoadExtension)
+        if (entry->LoadExtension)
         {
             int numFailed = entry->LoadExtension();
-            if(numFailed == 0)
+            if (numFailed == 0)
             {
                 *(entry->extensionVariable) = sfglx_LOAD_SUCCEEDED;
             }
@@ -152,46 +158,25 @@ static void LoadExtByName(const char *extensionName)
 }
 
 
-static void ProcExtsFromExtString(const char *strExtList)
+static void ProcExtsFromExtString(const char* strExtList)
 {
-    size_t iExtListLen = strlen(strExtList);
-    const char *strExtListEnd = strExtList + iExtListLen;
-    const char *strCurrPos = strExtList;
-    char strWorkBuff[256];
-
-    while(*strCurrPos)
+    do
     {
-        /*Get the extension at our position.*/
-        int iStrLen = 0;
-        const char *strEndStr = strchr(strCurrPos, ' ');
-        int iStop = 0;
-        if(strEndStr == NULL)
-        {
-            strEndStr = strExtListEnd;
-            iStop = 1;
-        }
+        const char* begin = strExtList;
 
-        iStrLen = (int)((ptrdiff_t)strEndStr - (ptrdiff_t)strCurrPos);
+        while ((*strExtList != ' ') && *strExtList)
+            strExtList++;
 
-        if(iStrLen > 255)
-            return;
-
-        strncpy(strWorkBuff, strCurrPos, iStrLen);
-        strWorkBuff[iStrLen] = '\0';
-
-        LoadExtByName(strWorkBuff);
-
-        strCurrPos = strEndStr + 1;
-        if(iStop) break;
-    }
+        LoadExtByName(std::string(begin, strExtList).c_str());
+    } while (*strExtList++);
 }
 
-int sfglx_LoadFunctions(Display *display, int screen)
+
+int sfglx_LoadFunctions(Display* display, int screen)
 {
     ClearExtensionVars();
 
 
-    ProcExtsFromExtString((const char *)glXQueryExtensionsString(display, screen));
+    ProcExtsFromExtString(reinterpret_cast<const char*>(glXQueryExtensionsString(display, screen)));
     return sfglx_LOAD_SUCCEEDED;
 }
-
diff --git a/src/SFML/Window/Unix/GlxExtensions.hpp b/src/SFML/Window/Unix/GlxExtensions.hpp
index 9e9a74922..c749de25c 100644
--- a/src/SFML/Window/Unix/GlxExtensions.hpp
+++ b/src/SFML/Window/Unix/GlxExtensions.hpp
@@ -36,7 +36,7 @@
 #include <GL/glx.h>
 #ifdef CODEGEN_FUNCPTR
 #undef CODEGEN_FUNCPTR
-#endif /*CODEGEN_FUNCPTR*/
+#endif // CODEGEN_FUNCPTR
 #define CODEGEN_FUNCPTR
 
 #ifndef GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
@@ -58,21 +58,21 @@ typedef double GLdouble;
 typedef double GLclampd;
 #define GLvoid void
 
-#endif /*GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS*/
+#endif // GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
 
 
 #ifndef GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
 #define GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
 
 
-#endif /*GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS*/
+#endif // GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
 
 
 #ifndef GLEXT_64_TYPES_DEFINED
-/* This code block is duplicated in glext.h, so must be protected */
+// This code block is duplicated in glext.h, so must be protected
 #define GLEXT_64_TYPES_DEFINED
-/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
-/* (as used in the GLX_OML_sync_control extension). */
+// Define int32_t, int64_t, and uint64_t types for UST/MSC
+// (as used in the GLX_OML_sync_control extension).
 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 #include <inttypes.h>
 #elif defined(__sun__) || defined(__digital__)
@@ -84,8 +84,8 @@ typedef unsigned long int uint64_t;
 #else
 typedef long long int int64_t;
 typedef unsigned long long int uint64_t;
-#endif /* __arch64__ */
-#endif /* __STDC__ */
+#endif // __arch64__
+#endif // __STDC__
 #elif defined( __VMS ) || defined(__sgi)
 #include <inttypes.h>
 #elif defined(__SCO__) || defined(__USLC__)
@@ -101,7 +101,7 @@ typedef __int32 int32_t;
 typedef __int64 int64_t;
 typedef unsigned __int64 uint64_t;
 #else
-/* Fallback if nothing above works */
+// Fallback if nothing above works
 #include <inttypes.h>
 #endif
 #endif
@@ -118,28 +118,28 @@ typedef unsigned __int64 uint64_t;
     typedef struct __GLXFBConfigRec *GLXFBConfigSGIX;
     typedef XID GLXPbufferSGIX;
     typedef struct {
-        char    pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
+        char    pipeName[80]; // Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]
         int     networkId;
 } GLXHyperpipeNetworkSGIX;
     typedef struct {
-        char    pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
+        char    pipeName[80]; // Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]
         int     channel;
         unsigned int participationType;
         int     timeSlice;
 } GLXHyperpipeConfigSGIX;
     typedef struct {
-        char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
+        char pipeName[80]; // Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]
         int srcXOrigin, srcYOrigin, srcWidth, srcHeight;
         int destXOrigin, destYOrigin, destWidth, destHeight;
 } GLXPipeRect;
     typedef struct {
-        char pipeName[80]; /* Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX] */
+        char pipeName[80]; // Should be [GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]
         int XOrigin, YOrigin, maxHeight, maxWidth;
 } GLXPipeRectLimits;
 
 #ifdef __cplusplus
 extern "C" {
-#endif /*__cplusplus*/
+#endif // __cplusplus
 
 extern int sfglx_ext_EXT_swap_control;
 extern int sfglx_ext_MESA_swap_control;
@@ -168,7 +168,7 @@ extern int sfglx_ext_ARB_create_context_profile;
 #define GLX_EXT_swap_control 1
 extern void (CODEGEN_FUNCPTR *sf_ptrc_glXSwapIntervalEXT)(Display *, GLXDrawable, int);
 #define glXSwapIntervalEXT sf_ptrc_glXSwapIntervalEXT
-#endif /*GLX_EXT_swap_control*/
+#endif // GLX_EXT_swap_control
 
 // Declare entry point even if GLX header already provides glXSwapIntervalMESA
 // We won't make use of an alias here
@@ -178,13 +178,13 @@ extern int (CODEGEN_FUNCPTR *sf_ptrc_glXSwapIntervalMESA)(int);
 #define GLX_SGI_swap_control 1
 extern int (CODEGEN_FUNCPTR *sf_ptrc_glXSwapIntervalSGI)(int);
 #define glXSwapIntervalSGI sf_ptrc_glXSwapIntervalSGI
-#endif /*GLX_SGI_swap_control*/
+#endif // GLX_SGI_swap_control
 
 #ifndef GLX_ARB_create_context
 #define GLX_ARB_create_context 1
-extern GLXContext (CODEGEN_FUNCPTR *sf_ptrc_glXCreateContextAttribsARB)(Display *, GLXFBConfig, GLXContext, Bool, const int *);
+extern GLXContext (CODEGEN_FUNCPTR *sf_ptrc_glXCreateContextAttribsARB)(Display*, GLXFBConfig, GLXContext, Bool, const int*);
 #define glXCreateContextAttribsARB sf_ptrc_glXCreateContextAttribsARB
-#endif /*GLX_ARB_create_context*/
+#endif // GLX_ARB_create_context
 
 
 enum sfglx_LoadStatus
@@ -198,6 +198,6 @@ int sfglx_LoadFunctions(Display *display, int screen);
 
 #ifdef __cplusplus
 }
-#endif /*__cplusplus*/
+#endif // __cplusplus
 
-#endif /* SF_POINTER_C_GENERATED_HEADER_GLXWIN_HPP */
+#endif // SF_POINTER_C_GENERATED_HEADER_GLXWIN_HPP
diff --git a/src/SFML/Window/Win32/WglExtensions.cpp b/src/SFML/Window/Win32/WglExtensions.cpp
index 0d82b749d..fc4eaa544 100644
--- a/src/SFML/Window/Win32/WglExtensions.cpp
+++ b/src/SFML/Window/Win32/WglExtensions.cpp
@@ -30,6 +30,7 @@
 #include <cstdlib>
 #include <cstring>
 #include <cstddef>
+#include <string>
 
 static sf::GlFunctionPointer IntGetProcAddress(const char* name)
 {
@@ -48,47 +49,53 @@ BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglSwapIntervalEXT)(int) = NULL;
 static int Load_EXT_swap_control(void)
 {
     int numFailed = 0;
-    sf_ptrc_wglGetSwapIntervalEXT = (int (CODEGEN_FUNCPTR *)(void))IntGetProcAddress("wglGetSwapIntervalEXT");
-    if(!sf_ptrc_wglGetSwapIntervalEXT) numFailed++;
-    sf_ptrc_wglSwapIntervalEXT = (BOOL (CODEGEN_FUNCPTR *)(int))IntGetProcAddress("wglSwapIntervalEXT");
-    if(!sf_ptrc_wglSwapIntervalEXT) numFailed++;
+    sf_ptrc_wglGetSwapIntervalEXT = reinterpret_cast<int (CODEGEN_FUNCPTR*)(void)>(IntGetProcAddress("wglGetSwapIntervalEXT"));
+    if (!sf_ptrc_wglGetSwapIntervalEXT)
+        numFailed++;
+    sf_ptrc_wglSwapIntervalEXT = reinterpret_cast<BOOL (CODEGEN_FUNCPTR*)(int)>(IntGetProcAddress("wglSwapIntervalEXT"));
+    if (!sf_ptrc_wglSwapIntervalEXT)
+        numFailed++;
     return numFailed;
 }
 
-BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglChoosePixelFormatARB)(HDC, const int *, const FLOAT *, UINT, int *, UINT *) = NULL;
-BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglGetPixelFormatAttribfvARB)(HDC, int, int, UINT, const int *, FLOAT *) = NULL;
-BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglGetPixelFormatAttribivARB)(HDC, int, int, UINT, const int *, int *) = NULL;
+BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglChoosePixelFormatARB)(HDC, const int*, const FLOAT*, UINT, int*, UINT*) = NULL;
+BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglGetPixelFormatAttribfvARB)(HDC, int, int, UINT, const int*, FLOAT*) = NULL;
+BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglGetPixelFormatAttribivARB)(HDC, int, int, UINT, const int*, int*) = NULL;
 
 static int Load_ARB_pixel_format(void)
 {
     int numFailed = 0;
-    sf_ptrc_wglChoosePixelFormatARB = (BOOL (CODEGEN_FUNCPTR *)(HDC, const int *, const FLOAT *, UINT, int *, UINT *))IntGetProcAddress("wglChoosePixelFormatARB");
-    if(!sf_ptrc_wglChoosePixelFormatARB) numFailed++;
-    sf_ptrc_wglGetPixelFormatAttribfvARB = (BOOL (CODEGEN_FUNCPTR *)(HDC, int, int, UINT, const int *, FLOAT *))IntGetProcAddress("wglGetPixelFormatAttribfvARB");
-    if(!sf_ptrc_wglGetPixelFormatAttribfvARB) numFailed++;
-    sf_ptrc_wglGetPixelFormatAttribivARB = (BOOL (CODEGEN_FUNCPTR *)(HDC, int, int, UINT, const int *, int *))IntGetProcAddress("wglGetPixelFormatAttribivARB");
-    if(!sf_ptrc_wglGetPixelFormatAttribivARB) numFailed++;
+    sf_ptrc_wglChoosePixelFormatARB = reinterpret_cast<BOOL (CODEGEN_FUNCPTR*)(HDC, const int*, const FLOAT*, UINT, int*, UINT*)>(IntGetProcAddress("wglChoosePixelFormatARB"));
+    if (!sf_ptrc_wglChoosePixelFormatARB)
+        numFailed++;
+    sf_ptrc_wglGetPixelFormatAttribfvARB = reinterpret_cast<BOOL (CODEGEN_FUNCPTR *)(HDC, int, int, UINT, const int*, FLOAT*)>(IntGetProcAddress("wglGetPixelFormatAttribfvARB"));
+    if (!sf_ptrc_wglGetPixelFormatAttribfvARB)
+        numFailed++;
+    sf_ptrc_wglGetPixelFormatAttribivARB = reinterpret_cast<BOOL (CODEGEN_FUNCPTR*)(HDC, int, int, UINT, const int*, int*)>(IntGetProcAddress("wglGetPixelFormatAttribivARB"));
+    if (!sf_ptrc_wglGetPixelFormatAttribivARB)
+        numFailed++;
     return numFailed;
 }
 
-HGLRC (CODEGEN_FUNCPTR *sf_ptrc_wglCreateContextAttribsARB)(HDC, HGLRC, const int *) = NULL;
+HGLRC (CODEGEN_FUNCPTR *sf_ptrc_wglCreateContextAttribsARB)(HDC, HGLRC, const int*) = NULL;
 
 static int Load_ARB_create_context(void)
 {
     int numFailed = 0;
-    sf_ptrc_wglCreateContextAttribsARB = (HGLRC (CODEGEN_FUNCPTR *)(HDC, HGLRC, const int *))IntGetProcAddress("wglCreateContextAttribsARB");
-    if(!sf_ptrc_wglCreateContextAttribsARB) numFailed++;
+    sf_ptrc_wglCreateContextAttribsARB = reinterpret_cast<HGLRC (CODEGEN_FUNCPTR*)(HDC, HGLRC, const int*)>(IntGetProcAddress("wglCreateContextAttribsARB"));
+    if (!sf_ptrc_wglCreateContextAttribsARB)
+        numFailed++;
     return numFailed;
 }
 
 
-static const char * (CODEGEN_FUNCPTR *sf_ptrc_wglGetExtensionsStringARB)(HDC) = NULL;
+static const char* (CODEGEN_FUNCPTR *sf_ptrc_wglGetExtensionsStringARB)(HDC) = NULL;
 
 typedef int (*PFN_LOADFUNCPOINTERS)(void);
 typedef struct sfwgl_StrToExtMap_s
 {
-    const char *extensionName;
-    int *extensionVariable;
+    const char* extensionName;
+    int* extensionVariable;
     PFN_LOADFUNCPOINTERS LoadExtension;
 } sfwgl_StrToExtMap;
 
@@ -102,19 +109,20 @@ static sfwgl_StrToExtMap ExtensionMap[5] = {
 
 static int g_extensionMapSize = 5;
 
-static sfwgl_StrToExtMap *FindExtEntry(const char *extensionName)
+
+static sfwgl_StrToExtMap* FindExtEntry(const char* extensionName)
 {
-    int loop;
-    sfwgl_StrToExtMap *currLoc = ExtensionMap;
-    for(loop = 0; loop < g_extensionMapSize; ++loop, ++currLoc)
+    sfwgl_StrToExtMap* currLoc = ExtensionMap;
+    for (int loop = 0; loop < g_extensionMapSize; ++loop, ++currLoc)
     {
-        if(strcmp(extensionName, currLoc->extensionName) == 0)
+        if (std::strcmp(extensionName, currLoc->extensionName) == 0)
             return currLoc;
     }
 
     return NULL;
 }
 
+
 static void ClearExtensionVars(void)
 {
     sfwgl_ext_EXT_swap_control = sfwgl_LOAD_FAILED;
@@ -125,16 +133,16 @@ static void ClearExtensionVars(void)
 }
 
 
-static void LoadExtByName(const char *extensionName)
+static void LoadExtByName(const char* extensionName)
 {
-    sfwgl_StrToExtMap *entry = NULL;
+    sfwgl_StrToExtMap* entry = NULL;
     entry = FindExtEntry(extensionName);
-    if(entry)
+    if (entry)
     {
-        if(entry->LoadExtension)
+        if (entry->LoadExtension)
         {
             int numFailed = entry->LoadExtension();
-            if(numFailed == 0)
+            if (numFailed == 0)
             {
                 *(entry->extensionVariable) = sfwgl_LOAD_SUCCEEDED;
             }
@@ -151,48 +159,29 @@ static void LoadExtByName(const char *extensionName)
 }
 
 
-static void ProcExtsFromExtString(const char *strExtList)
+static void ProcExtsFromExtString(const char* strExtList)
 {
-    size_t iExtListLen = strlen(strExtList);
-    const char *strExtListEnd = strExtList + iExtListLen;
-    const char *strCurrPos = strExtList;
-    char strWorkBuff[256];
-
-    while(*strCurrPos)
+    do
     {
-        /*Get the extension at our position.*/
-        int iStrLen = 0;
-        const char *strEndStr = strchr(strCurrPos, ' ');
-        int iStop = 0;
-        if(strEndStr == NULL)
-        {
-            strEndStr = strExtListEnd;
-            iStop = 1;
-        }
+        const char* begin = strExtList;
 
-        iStrLen = (int)((ptrdiff_t)strEndStr - (ptrdiff_t)strCurrPos);
+        while ((*strExtList != ' ') && *strExtList)
+            strExtList++;
 
-        if(iStrLen > 255)
-            return;
-
-        strncpy(strWorkBuff, strCurrPos, iStrLen);
-        strWorkBuff[iStrLen] = '\0';
-
-        LoadExtByName(strWorkBuff);
-
-        strCurrPos = strEndStr + 1;
-        if(iStop) break;
-    }
+        LoadExtByName(std::string(begin, strExtList).c_str());
+    } while (*strExtList++);
 }
 
+
 int sfwgl_LoadFunctions(HDC hdc)
 {
     ClearExtensionVars();
 
-    sf_ptrc_wglGetExtensionsStringARB = (const char * (CODEGEN_FUNCPTR *)(HDC))IntGetProcAddress("wglGetExtensionsStringARB");
-    if(!sf_ptrc_wglGetExtensionsStringARB) return sfwgl_LOAD_FAILED;
+    sf_ptrc_wglGetExtensionsStringARB = reinterpret_cast<const char* (CODEGEN_FUNCPTR*)(HDC)>(IntGetProcAddress("wglGetExtensionsStringARB"));
+    if (!sf_ptrc_wglGetExtensionsStringARB)
+        return sfwgl_LOAD_FAILED;
 
-    ProcExtsFromExtString((const char *)sf_ptrc_wglGetExtensionsStringARB(hdc));
+    ProcExtsFromExtString(reinterpret_cast<const char*>(sf_ptrc_wglGetExtensionsStringARB(hdc)));
     return sfwgl_LOAD_SUCCEEDED;
 }
 
diff --git a/src/SFML/Window/Win32/WglExtensions.hpp b/src/SFML/Window/Win32/WglExtensions.hpp
index 1b389c047..b9b889f8e 100644
--- a/src/SFML/Window/Win32/WglExtensions.hpp
+++ b/src/SFML/Window/Win32/WglExtensions.hpp
@@ -41,7 +41,7 @@
 
 #ifdef CODEGEN_FUNCPTR
 #undef CODEGEN_FUNCPTR
-#endif /*CODEGEN_FUNCPTR*/
+#endif // CODEGEN_FUNCPTR
 #define CODEGEN_FUNCPTR WINAPI
 
 #ifndef GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
@@ -63,14 +63,14 @@ typedef double GLdouble;
 typedef double GLclampd;
 #define GLvoid void
 
-#endif /*GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS*/
+#endif // GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
 
 
 #ifndef GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
 #define GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
 
 
-#endif /*GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS*/
+#endif // GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
 
 
 struct _GPU_DEVICE {
@@ -90,7 +90,7 @@ typedef struct _GPU_DEVICE *PGPU_DEVICE;
 
 #ifdef __cplusplus
 extern "C" {
-#endif /*__cplusplus*/
+#endif // __cplusplus
 
 extern int sfwgl_ext_EXT_swap_control;
 extern int sfwgl_ext_ARB_multisample;
@@ -170,24 +170,24 @@ extern int (CODEGEN_FUNCPTR *sf_ptrc_wglGetSwapIntervalEXT)(void);
 #define wglGetSwapIntervalEXT sf_ptrc_wglGetSwapIntervalEXT
 extern BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglSwapIntervalEXT)(int);
 #define wglSwapIntervalEXT sf_ptrc_wglSwapIntervalEXT
-#endif /*WGL_EXT_swap_control*/
+#endif // WGL_EXT_swap_control
 
 
 #ifndef WGL_ARB_pixel_format
 #define WGL_ARB_pixel_format 1
-extern BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglChoosePixelFormatARB)(HDC, const int *, const FLOAT *, UINT, int *, UINT *);
+extern BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglChoosePixelFormatARB)(HDC, const int*, const FLOAT*, UINT, int*, UINT*);
 #define wglChoosePixelFormatARB sf_ptrc_wglChoosePixelFormatARB
-extern BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglGetPixelFormatAttribfvARB)(HDC, int, int, UINT, const int *, FLOAT *);
+extern BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglGetPixelFormatAttribfvARB)(HDC, int, int, UINT, const int*, FLOAT*);
 #define wglGetPixelFormatAttribfvARB sf_ptrc_wglGetPixelFormatAttribfvARB
-extern BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglGetPixelFormatAttribivARB)(HDC, int, int, UINT, const int *, int *);
+extern BOOL (CODEGEN_FUNCPTR *sf_ptrc_wglGetPixelFormatAttribivARB)(HDC, int, int, UINT, const int*, int*);
 #define wglGetPixelFormatAttribivARB sf_ptrc_wglGetPixelFormatAttribivARB
-#endif /*WGL_ARB_pixel_format*/
+#endif // WGL_ARB_pixel_format
 
 #ifndef WGL_ARB_create_context
 #define WGL_ARB_create_context 1
-extern HGLRC (CODEGEN_FUNCPTR *sf_ptrc_wglCreateContextAttribsARB)(HDC, HGLRC, const int *);
+extern HGLRC (CODEGEN_FUNCPTR *sf_ptrc_wglCreateContextAttribsARB)(HDC, HGLRC, const int*);
 #define wglCreateContextAttribsARB sf_ptrc_wglCreateContextAttribsARB
-#endif /*WGL_ARB_create_context*/
+#endif // WGL_ARB_create_context
 
 
 enum sfwgl_LoadStatus
@@ -201,6 +201,6 @@ int sfwgl_LoadFunctions(HDC hdc);
 
 #ifdef __cplusplus
 }
-#endif /*__cplusplus*/
+#endif // __cplusplus
 
-#endif /* SF_POINTER_C_GENERATED_HEADER_WINDOWSGL_HPP */
+#endif // SF_POINTER_C_GENERATED_HEADER_WINDOWSGL_HPP