ovr_sdk

diff LibOVR/Src/CAPI/GL/CAPI_GLE.cpp @ 0:1b39a1b46319

initial 0.4.4
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 14 Jan 2015 06:51:16 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/LibOVR/Src/CAPI/GL/CAPI_GLE.cpp	Wed Jan 14 06:51:16 2015 +0200
     1.3 @@ -0,0 +1,7884 @@
     1.4 +/************************************************************************************
     1.5 +
     1.6 +Filename    :   Render_GLE.cpp
     1.7 +Content     :   OpenGL Extensions support. Implements a stripped down glew-like 
     1.8 +                interface with some additional functionality.
     1.9 +Copyright   :   Copyright 2014 Oculus VR, LLC All Rights reserved.
    1.10 +
    1.11 +Licensed under the Apache License, Version 2.0 (the "License");
    1.12 +you may not use this file except in compliance with the License.
    1.13 +You may obtain a copy of the License at
    1.14 +
    1.15 +http://www.apache.org/licenses/LICENSE-2.0
    1.16 +
    1.17 +Unless required by applicable law or agreed to in writing, software
    1.18 +distributed under the License is distributed on an "AS IS" BASIS,
    1.19 +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    1.20 +See the License for the specific language governing permissions and
    1.21 +limitations under the License.
    1.22 +
    1.23 +************************************************************************************/
    1.24 +
    1.25 +#include "CAPI_GLE.h"
    1.26 +#include "../../Kernel/OVR_Log.h"
    1.27 +#include <string.h>
    1.28 +
    1.29 +
    1.30 +#if defined(_WIN32)
    1.31 +    #if !defined(WINAPI)
    1.32 +        #ifndef WIN32_LEAN_AND_MEAN
    1.33 +            #define WIN32_LEAN_AND_MEAN 1
    1.34 +        #endif
    1.35 +        #include <windows.h>
    1.36 +    #endif
    1.37 +
    1.38 +    #pragma comment(lib, "opengl32.lib")
    1.39 +#elif defined(__APPLE__)
    1.40 +    #include <stdlib.h>
    1.41 +    #include <string.h>
    1.42 +    #include <AvailabilityMacros.h>
    1.43 +    #include <dlfcn.h>
    1.44 +#endif
    1.45 +
    1.46 +
    1.47 +
    1.48 +//namespace OVR
    1.49 +//{
    1.50 +    // OVRTypeof
    1.51 +    // Acts the same as the C++11 decltype expression, though with reduced requirements.
    1.52 +    #if !defined(OVRTypeof)
    1.53 +        #if defined(_MSC_VER)
    1.54 +            #define OVRTypeof(x) decltype(x)    // VS2010+ unilaterally supports decltype
    1.55 +        #else
    1.56 +            #define OVRTypeof(x) __typeof__(x)  // Other compilers support decltype, but usually not unless C++11 support is present and explicitly enabled.
    1.57 +        #endif
    1.58 +    #endif
    1.59 +
    1.60 +    
    1.61 +    // GLELoadProc
    1.62 +    // Macro which implements dynamically looking up and assigning an OpenGL function.
    1.63 +    //
    1.64 +    // Example usage:
    1.65 +    //     GLELoadProc(glCopyTexSubImage3D, glCopyTexSubImage3D);
    1.66 +    // Expands to:
    1.67 +    //     gleCopyTexSubImage3D = (OVRTypeof(gleCopyTexSubImage3D)) GLEGetProcAddress("glCopyTexSubImage3D");
    1.68 +    
    1.69 +    #define GLELoadProc(var, name) var = (OVRTypeof(var))GLEGetProcAddress(#name)
    1.70 +    
    1.71 +
    1.72 +    // Disable some #defines, as we need to call these functions directly.
    1.73 +    #if defined(GLE_HOOKING_ENABLED)
    1.74 +        #if defined(_WIN32)
    1.75 +            #undef wglGetProcAddress
    1.76 +            extern "C" { GLAPI PROC GLAPIENTRY wglGetProcAddress(LPCSTR lpszProc); }
    1.77 +        #endif
    1.78 +
    1.79 +        #undef glGetString
    1.80 +        extern "C" { GLAPI const GLubyte * GLAPIENTRY glGetString(GLenum name); }
    1.81 +    #endif
    1.82 +
    1.83 +
    1.84 +    // Generic OpenGL GetProcAddress function interface. Maps to platform-specific functionality
    1.85 +    // internally. On Windows this is equivalent to wglGetProcAddress as opposed to global GetProcAddress.
    1.86 +    void* OVR::GLEGetProcAddress(const char* name)
    1.87 +    {
    1.88 +        #if defined(_WIN32)
    1.89 +            return wglGetProcAddress(name);
    1.90 +        
    1.91 +        #elif defined(__APPLE__)
    1.92 +            // Requires the OS 10.3 SDK or later.
    1.93 +            static void* dlImage = NULL;
    1.94 +            void* addr = nullptr;
    1.95 +        
    1.96 +            if(!dlImage)
    1.97 +                dlImage = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY);
    1.98 +        
    1.99 +            if(dlImage)
   1.100 +                addr = dlsym(dlImage, name);
   1.101 +        
   1.102 +            return addr;
   1.103 +        
   1.104 +        #elif defined(__ANDROID__)
   1.105 +            return eglGetProcAddress(name);
   1.106 +        
   1.107 +        #else
   1.108 +            // This was glXGetProcAddressARB in GLX versions prior to v1.4, but that was ten years ago.
   1.109 +            return (void*)glXGetProcAddress((const GLubyte*)name);
   1.110 +        #endif
   1.111 +    }
   1.112 +
   1.113 +
   1.114 +
   1.115 +    // Current context functionality
   1.116 +    static OVR::GLEContext* GLECurrentContext = NULL;
   1.117 +    
   1.118 +    OVR::GLEContext* OVR::GLEContext::GetCurrentContext()
   1.119 +    {
   1.120 +        return GLECurrentContext;
   1.121 +    }
   1.122 +
   1.123 +    void OVR::GLEContext::SetCurrentContext(OVR::GLEContext* p)
   1.124 +    {
   1.125 +        GLECurrentContext = p;
   1.126 +    }
   1.127 +        
   1.128 +
   1.129 +    
   1.130 +    OVR::GLEContext::GLEContext()
   1.131 +      : MajorVersion(0)
   1.132 +      , MinorVersion(0)
   1.133 +      , WholeVersion(0)
   1.134 +      , IsGLES(false)
   1.135 +      , IsCoreProfile(false)
   1.136 +      , EnableHookGetError(true)
   1.137 +      , PlatformMajorVersion(0)
   1.138 +      , PlatformMinorVersion(0)
   1.139 +      , PlatformWholeVersion(0)
   1.140 +    {
   1.141 +        // The following sequence is not thread-safe. Two threads could set the context to this at the same time.
   1.142 +        if(GetCurrentContext() == NULL)
   1.143 +            SetCurrentContext(this);
   1.144 +    }
   1.145 +    
   1.146 +    
   1.147 +    OVR::GLEContext::~GLEContext()
   1.148 +    {
   1.149 +        // Currently empty
   1.150 +    }
   1.151 +    
   1.152 +    
   1.153 +    void OVR::GLEContext::Init()
   1.154 +    {
   1.155 +        PlatformInit();
   1.156 +
   1.157 +        if(!IsInitialized())
   1.158 +        {
   1.159 +            InitVersion();
   1.160 +            InitExtensionLoad();
   1.161 +            InitExtensionSupport();
   1.162 +        }
   1.163 +    }
   1.164 +    
   1.165 +
   1.166 +    bool OVR::GLEContext::IsInitialized() const
   1.167 +    {
   1.168 +        return (MajorVersion != 0);
   1.169 +    }
   1.170 +
   1.171 +
   1.172 +    void OVR::GLEContext::Shutdown()
   1.173 +    {
   1.174 +        // This memset is valid only if this class has no virtual functions (similar to concept of POD).
   1.175 +        // We cannot assert this because restrictions prevent us from using C++11 type traits here.
   1.176 +        memset(this, 0, sizeof(GLEContext));
   1.177 +    }
   1.178 +
   1.179 +
   1.180 +    void OVR::GLEContext::PlatformInit()
   1.181 +    {
   1.182 +        if(!IsPlatformInitialized())
   1.183 +        {
   1.184 +            InitPlatformExtensionLoad();
   1.185 +            InitPlatformExtensionSupport();
   1.186 +            InitPlatformVersion();
   1.187 +        }
   1.188 +    }
   1.189 +
   1.190 +
   1.191 +    bool OVR::GLEContext::IsPlatformInitialized() const
   1.192 +    {
   1.193 +        return (PlatformMajorVersion != 0);
   1.194 +    }
   1.195 +
   1.196 +
   1.197 +    void OVR::GLEContext::InitVersion()
   1.198 +    {
   1.199 +        const char* version = (const char*)glGetString(GL_VERSION);
   1.200 +        int fields = 0, major = 0, minor = 0;
   1.201 +        bool isGLES = false;
   1.202 +
   1.203 +        OVR_ASSERT(version);
   1.204 +        if (version)
   1.205 +        {
   1.206 +            OVR_DEBUG_LOG(("GL_VERSION: %s", (const char*)version));
   1.207 +
   1.208 +            // Skip all leading non-digits before reading %d.
   1.209 +            // Example GL_VERSION strings:
   1.210 +            //   "1.5 ATI-1.4.18"
   1.211 +            //   "OpenGL ES-CM 3.2"
   1.212 +            OVR_DISABLE_MSVC_WARNING(4996) // "scanf may be unsafe"
   1.213 +            fields = sscanf(version, isdigit(*version) ? "%d.%d" : "%*[^0-9]%d.%d", &major, &minor);
   1.214 +            isGLES = (strstr(version, "OpenGL ES") != NULL);
   1.215 +            OVR_RESTORE_MSVC_WARNING()
   1.216 +        }
   1.217 +        else
   1.218 +        {
   1.219 +            LogText("Warning: GL_VERSION was NULL\n");
   1.220 +        }
   1.221 +
   1.222 +        // If two fields were not found,
   1.223 +        if (fields != 2)
   1.224 +        {
   1.225 +            static_assert(sizeof(major) == sizeof(GLint), "type mis-match");
   1.226 +
   1.227 +            glGetIntegerv(GL_MAJOR_VERSION, &major);
   1.228 +            glGetIntegerv(GL_MINOR_VERSION, &minor);
   1.229 +        }
   1.230 +
   1.231 +        // Write version data
   1.232 +        MajorVersion  = major;
   1.233 +        MinorVersion  = minor;
   1.234 +        WholeVersion  = (major * 100) + minor;
   1.235 +
   1.236 +        GLint profileMask = 0;
   1.237 +        if(WholeVersion >= 302)
   1.238 +        {
   1.239 +            // Older NVidia drivers have a bug with this on at least Windows.
   1.240 +            // https://www.opengl.org/discussion_boards/showthread.php/171380-NVIDIA-drivers-not-returning-the-right-profile-mas
   1.241 +            // A workaround could be to check for the GL_ARB_compatibility extension, which indicates if OpenGL is in compatibility mode,
   1.242 +            // and if not then we are in core profile mode. On Apple another solution would be to use NSOpeNGLPixelFormat
   1.243 +            // NSOpenGLView::pixelFormat to get the core profile attribute.
   1.244 +            glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &profileMask);
   1.245 +        }
   1.246 +        IsCoreProfile = (profileMask == GL_CONTEXT_CORE_PROFILE_BIT); // There's also GL_CONTEXT_COMPATIBILITY_PROFILE_BIT
   1.247 +        IsGLES        = isGLES;
   1.248 +    }
   1.249 +    
   1.250 +    
   1.251 +    void OVR::GLEContext::InitExtensionLoad()
   1.252 +    {
   1.253 +        // GL_VERSION_1_1
   1.254 +        // We don't load these but rather link to them directly.
   1.255 +        
   1.256 +        // GL_VERSION_1_2
   1.257 +        GLELoadProc(glCopyTexSubImage3D_Impl, glCopyTexSubImage3D);  // This expands to a get proc address call (e.g. wglGetProcAddress on Windows).
   1.258 +        GLELoadProc(glDrawRangeElements_Impl, glDrawRangeElements);
   1.259 +        GLELoadProc(glTexImage3D_Impl, glTexImage3D);
   1.260 +        GLELoadProc(glTexSubImage3D_Impl, glTexSubImage3D);
   1.261 +
   1.262 +        // GL_VERSION_1_3
   1.263 +        GLELoadProc(glActiveTexture_Impl, glActiveTexture);
   1.264 +        GLELoadProc(glClientActiveTexture_Impl, glClientActiveTexture);
   1.265 +        GLELoadProc(glCompressedTexImage1D_Impl, glCompressedTexImage1D);
   1.266 +        GLELoadProc(glCompressedTexImage2D_Impl, glCompressedTexImage2D);
   1.267 +        GLELoadProc(glCompressedTexImage3D_Impl, glCompressedTexImage3D);
   1.268 +        GLELoadProc(glCompressedTexSubImage1D_Impl, glCompressedTexSubImage1D);
   1.269 +        GLELoadProc(glCompressedTexSubImage2D_Impl, glCompressedTexSubImage2D);
   1.270 +        GLELoadProc(glCompressedTexSubImage3D_Impl, glCompressedTexSubImage3D);
   1.271 +        GLELoadProc(glGetCompressedTexImage_Impl, glGetCompressedTexImage);
   1.272 +        GLELoadProc(glLoadTransposeMatrixd_Impl, glLoadTransposeMatrixd);
   1.273 +        GLELoadProc(glLoadTransposeMatrixf_Impl, glLoadTransposeMatrixf);
   1.274 +        GLELoadProc(glMultTransposeMatrixd_Impl, glMultTransposeMatrixd);
   1.275 +        GLELoadProc(glMultTransposeMatrixf_Impl, glMultTransposeMatrixf);
   1.276 +        GLELoadProc(glMultiTexCoord1d_Impl, glMultiTexCoord1d);
   1.277 +        GLELoadProc(glMultiTexCoord1dv_Impl, glMultiTexCoord1dv);
   1.278 +        GLELoadProc(glMultiTexCoord1f_Impl, glMultiTexCoord1f);
   1.279 +        GLELoadProc(glMultiTexCoord1fv_Impl, glMultiTexCoord1fv);
   1.280 +        GLELoadProc(glMultiTexCoord1i_Impl, glMultiTexCoord1i);
   1.281 +        GLELoadProc(glMultiTexCoord1iv_Impl, glMultiTexCoord1iv);
   1.282 +        GLELoadProc(glMultiTexCoord1s_Impl, glMultiTexCoord1s);
   1.283 +        GLELoadProc(glMultiTexCoord1sv_Impl, glMultiTexCoord1sv);
   1.284 +        GLELoadProc(glMultiTexCoord2d_Impl, glMultiTexCoord2d);
   1.285 +        GLELoadProc(glMultiTexCoord2dv_Impl, glMultiTexCoord2dv);
   1.286 +        GLELoadProc(glMultiTexCoord2f_Impl, glMultiTexCoord2f);
   1.287 +        GLELoadProc(glMultiTexCoord2fv_Impl, glMultiTexCoord2fv);
   1.288 +        GLELoadProc(glMultiTexCoord2i_Impl, glMultiTexCoord2i);
   1.289 +        GLELoadProc(glMultiTexCoord2iv_Impl, glMultiTexCoord2iv);
   1.290 +        GLELoadProc(glMultiTexCoord2s_Impl, glMultiTexCoord2s);
   1.291 +        GLELoadProc(glMultiTexCoord2sv_Impl, glMultiTexCoord2sv);
   1.292 +        GLELoadProc(glMultiTexCoord3d_Impl, glMultiTexCoord3d);
   1.293 +        GLELoadProc(glMultiTexCoord3dv_Impl, glMultiTexCoord3dv);
   1.294 +        GLELoadProc(glMultiTexCoord3f_Impl, glMultiTexCoord3f);
   1.295 +        GLELoadProc(glMultiTexCoord3fv_Impl, glMultiTexCoord3fv);
   1.296 +        GLELoadProc(glMultiTexCoord3i_Impl, glMultiTexCoord3i);
   1.297 +        GLELoadProc(glMultiTexCoord3iv_Impl, glMultiTexCoord3iv);
   1.298 +        GLELoadProc(glMultiTexCoord3s_Impl, glMultiTexCoord3s);
   1.299 +        GLELoadProc(glMultiTexCoord3sv_Impl, glMultiTexCoord3sv);
   1.300 +        GLELoadProc(glMultiTexCoord4d_Impl, glMultiTexCoord4d);
   1.301 +        GLELoadProc(glMultiTexCoord4dv_Impl, glMultiTexCoord4dv);
   1.302 +        GLELoadProc(glMultiTexCoord4f_Impl, glMultiTexCoord4f);
   1.303 +        GLELoadProc(glMultiTexCoord4fv_Impl, glMultiTexCoord4fv);
   1.304 +        GLELoadProc(glMultiTexCoord4i_Impl, glMultiTexCoord4i);
   1.305 +        GLELoadProc(glMultiTexCoord4iv_Impl, glMultiTexCoord4iv);
   1.306 +        GLELoadProc(glMultiTexCoord4s_Impl, glMultiTexCoord4s);
   1.307 +        GLELoadProc(glMultiTexCoord4sv_Impl, glMultiTexCoord4sv);
   1.308 +        GLELoadProc(glSampleCoverage_Impl, glSampleCoverage);
   1.309 +
   1.310 +        // GL_VERSION_1_4
   1.311 +        GLELoadProc(glBlendColor_Impl, glBlendColor);
   1.312 +        GLELoadProc(glBlendEquation_Impl, glBlendEquation);
   1.313 +        GLELoadProc(glBlendFuncSeparate_Impl, glBlendFuncSeparate);
   1.314 +        GLELoadProc(glFogCoordPointer_Impl, glFogCoordPointer);
   1.315 +        GLELoadProc(glFogCoordd_Impl, glFogCoordd);
   1.316 +        GLELoadProc(glFogCoorddv_Impl, glFogCoorddv);
   1.317 +        GLELoadProc(glFogCoordf_Impl, glFogCoordf);
   1.318 +        GLELoadProc(glFogCoordfv_Impl, glFogCoordfv);
   1.319 +        GLELoadProc(glMultiDrawArrays_Impl, glMultiDrawArrays);
   1.320 +        GLELoadProc(glMultiDrawElements_Impl, glMultiDrawElements);
   1.321 +        GLELoadProc(glPointParameterf_Impl, glPointParameterf);
   1.322 +        GLELoadProc(glPointParameterfv_Impl, glPointParameterfv);
   1.323 +        GLELoadProc(glPointParameteri_Impl, glPointParameteri);
   1.324 +        GLELoadProc(glPointParameteriv_Impl, glPointParameteriv);
   1.325 +        GLELoadProc(glSecondaryColor3b_Impl, glSecondaryColor3b);
   1.326 +        GLELoadProc(glSecondaryColor3bv_Impl, glSecondaryColor3bv);
   1.327 +        GLELoadProc(glSecondaryColor3d_Impl, glSecondaryColor3d);
   1.328 +        GLELoadProc(glSecondaryColor3dv_Impl, glSecondaryColor3dv);
   1.329 +        GLELoadProc(glSecondaryColor3f_Impl, glSecondaryColor3f);
   1.330 +        GLELoadProc(glSecondaryColor3fv_Impl, glSecondaryColor3fv);
   1.331 +        GLELoadProc(glSecondaryColor3i_Impl, glSecondaryColor3i);
   1.332 +        GLELoadProc(glSecondaryColor3iv_Impl, glSecondaryColor3iv);
   1.333 +        GLELoadProc(glSecondaryColor3s_Impl, glSecondaryColor3s);
   1.334 +        GLELoadProc(glSecondaryColor3sv_Impl, glSecondaryColor3sv);
   1.335 +        GLELoadProc(glSecondaryColor3ub_Impl, glSecondaryColor3ub);
   1.336 +        GLELoadProc(glSecondaryColor3ubv_Impl, glSecondaryColor3ubv);
   1.337 +        GLELoadProc(glSecondaryColor3ui_Impl, glSecondaryColor3ui);
   1.338 +        GLELoadProc(glSecondaryColor3uiv_Impl, glSecondaryColor3uiv);
   1.339 +        GLELoadProc(glSecondaryColor3us_Impl, glSecondaryColor3us);
   1.340 +        GLELoadProc(glSecondaryColor3usv_Impl, glSecondaryColor3usv);
   1.341 +        GLELoadProc(glSecondaryColorPointer_Impl, glSecondaryColorPointer);
   1.342 +        GLELoadProc(glWindowPos2d_Impl, glWindowPos2d);
   1.343 +        GLELoadProc(glWindowPos2dv_Impl, glWindowPos2dv);
   1.344 +        GLELoadProc(glWindowPos2f_Impl, glWindowPos2f);
   1.345 +        GLELoadProc(glWindowPos2fv_Impl, glWindowPos2fv);
   1.346 +        GLELoadProc(glWindowPos2i_Impl, glWindowPos2i);
   1.347 +        GLELoadProc(glWindowPos2iv_Impl, glWindowPos2iv);
   1.348 +        GLELoadProc(glWindowPos2s_Impl, glWindowPos2s);
   1.349 +        GLELoadProc(glWindowPos2sv_Impl, glWindowPos2sv);
   1.350 +        GLELoadProc(glWindowPos3d_Impl, glWindowPos3d);
   1.351 +        GLELoadProc(glWindowPos3dv_Impl, glWindowPos3dv);
   1.352 +        GLELoadProc(glWindowPos3f_Impl, glWindowPos3f);
   1.353 +        GLELoadProc(glWindowPos3fv_Impl, glWindowPos3fv);
   1.354 +        GLELoadProc(glWindowPos3i_Impl, glWindowPos3i);
   1.355 +        GLELoadProc(glWindowPos3iv_Impl, glWindowPos3iv);
   1.356 +        GLELoadProc(glWindowPos3s_Impl, glWindowPos3s);
   1.357 +        GLELoadProc(glWindowPos3sv_Impl, glWindowPos3sv);
   1.358 +
   1.359 +        // GL_VERSION_1_5
   1.360 +        GLELoadProc(glBeginQuery_Impl, glBeginQuery);
   1.361 +        GLELoadProc(glBindBuffer_Impl, glBindBuffer);
   1.362 +        GLELoadProc(glBufferData_Impl, glBufferData);
   1.363 +        GLELoadProc(glBufferSubData_Impl, glBufferSubData);
   1.364 +        GLELoadProc(glDeleteBuffers_Impl, glDeleteBuffers);
   1.365 +        GLELoadProc(glDeleteQueries_Impl, glDeleteQueries);
   1.366 +        GLELoadProc(glEndQuery_Impl, glEndQuery);
   1.367 +        GLELoadProc(glGenBuffers_Impl, glGenBuffers);
   1.368 +        GLELoadProc(glGenQueries_Impl, glGenQueries);
   1.369 +        GLELoadProc(glGetBufferParameteriv_Impl, glGetBufferParameteriv);
   1.370 +        GLELoadProc(glGetBufferPointerv_Impl, glGetBufferPointerv);
   1.371 +        GLELoadProc(glGetBufferSubData_Impl, glGetBufferSubData);
   1.372 +        GLELoadProc(glGetQueryObjectiv_Impl, glGetQueryObjectiv);
   1.373 +        GLELoadProc(glGetQueryObjectuiv_Impl, glGetQueryObjectuiv);
   1.374 +        GLELoadProc(glGetQueryiv_Impl, glGetQueryiv);
   1.375 +        GLELoadProc(glIsBuffer_Impl, glIsBuffer);
   1.376 +        GLELoadProc(glIsQuery_Impl, glIsQuery);
   1.377 +        GLELoadProc(glMapBuffer_Impl, glMapBuffer);
   1.378 +        GLELoadProc(glUnmapBuffer_Impl, glUnmapBuffer);
   1.379 +
   1.380 +        // GL_VERSION_2_0
   1.381 +        GLELoadProc(glAttachShader_Impl, glAttachShader);
   1.382 +        GLELoadProc(glBindAttribLocation_Impl, glBindAttribLocation);
   1.383 +        GLELoadProc(glBlendEquationSeparate_Impl, glBlendEquationSeparate);
   1.384 +        GLELoadProc(glCompileShader_Impl, glCompileShader);
   1.385 +        GLELoadProc(glCreateProgram_Impl, glCreateProgram);
   1.386 +        GLELoadProc(glCreateShader_Impl, glCreateShader);
   1.387 +        GLELoadProc(glDeleteProgram_Impl, glDeleteProgram);
   1.388 +        GLELoadProc(glDeleteShader_Impl, glDeleteShader);
   1.389 +        GLELoadProc(glDetachShader_Impl, glDetachShader);
   1.390 +        GLELoadProc(glDisableVertexAttribArray_Impl, glDisableVertexAttribArray);
   1.391 +        GLELoadProc(glDrawBuffers_Impl, glDrawBuffers);
   1.392 +        GLELoadProc(glEnableVertexAttribArray_Impl, glEnableVertexAttribArray);
   1.393 +        GLELoadProc(glGetActiveAttrib_Impl, glGetActiveAttrib);
   1.394 +        GLELoadProc(glGetActiveUniform_Impl, glGetActiveUniform);
   1.395 +        GLELoadProc(glGetAttachedShaders_Impl, glGetAttachedShaders);
   1.396 +        GLELoadProc(glGetAttribLocation_Impl, glGetAttribLocation);
   1.397 +        GLELoadProc(glGetProgramInfoLog_Impl, glGetProgramInfoLog);
   1.398 +        GLELoadProc(glGetProgramiv_Impl, glGetProgramiv);
   1.399 +        GLELoadProc(glGetShaderInfoLog_Impl, glGetShaderInfoLog);
   1.400 +        GLELoadProc(glGetShaderSource_Impl, glGetShaderSource);
   1.401 +        GLELoadProc(glGetShaderiv_Impl, glGetShaderiv);
   1.402 +        GLELoadProc(glGetUniformLocation_Impl, glGetUniformLocation);
   1.403 +        GLELoadProc(glGetUniformfv_Impl, glGetUniformfv);
   1.404 +        GLELoadProc(glGetUniformiv_Impl, glGetUniformiv);
   1.405 +        GLELoadProc(glGetVertexAttribPointerv_Impl, glGetVertexAttribPointerv);
   1.406 +        GLELoadProc(glGetVertexAttribdv_Impl, glGetVertexAttribdv);
   1.407 +        GLELoadProc(glGetVertexAttribfv_Impl, glGetVertexAttribfv);
   1.408 +        GLELoadProc(glGetVertexAttribiv_Impl, glGetVertexAttribiv);
   1.409 +        GLELoadProc(glIsProgram_Impl, glIsProgram);
   1.410 +        GLELoadProc(glIsShader_Impl, glIsShader);
   1.411 +        GLELoadProc(glLinkProgram_Impl, glLinkProgram);
   1.412 +        GLELoadProc(glShaderSource_Impl, glShaderSource);
   1.413 +        GLELoadProc(glStencilFuncSeparate_Impl, glStencilFuncSeparate);
   1.414 +        GLELoadProc(glStencilMaskSeparate_Impl, glStencilMaskSeparate);
   1.415 +        GLELoadProc(glStencilOpSeparate_Impl, glStencilOpSeparate);
   1.416 +        GLELoadProc(glUniform1f_Impl, glUniform1f);
   1.417 +        GLELoadProc(glUniform1fv_Impl, glUniform1fv);
   1.418 +        GLELoadProc(glUniform1i_Impl, glUniform1i);
   1.419 +        GLELoadProc(glUniform1iv_Impl, glUniform1iv);
   1.420 +        GLELoadProc(glUniform2f_Impl, glUniform2f);
   1.421 +        GLELoadProc(glUniform2fv_Impl, glUniform2fv);
   1.422 +        GLELoadProc(glUniform2i_Impl, glUniform2i);
   1.423 +        GLELoadProc(glUniform2iv_Impl, glUniform2iv);
   1.424 +        GLELoadProc(glUniform3f_Impl, glUniform3f);
   1.425 +        GLELoadProc(glUniform3fv_Impl, glUniform3fv);
   1.426 +        GLELoadProc(glUniform3i_Impl, glUniform3i);
   1.427 +        GLELoadProc(glUniform3iv_Impl, glUniform3iv);
   1.428 +        GLELoadProc(glUniform4f_Impl, glUniform4f);
   1.429 +        GLELoadProc(glUniform4fv_Impl, glUniform4fv);
   1.430 +        GLELoadProc(glUniform4i_Impl, glUniform4i);
   1.431 +        GLELoadProc(glUniform4iv_Impl, glUniform4iv);
   1.432 +        GLELoadProc(glUniformMatrix2fv_Impl, glUniformMatrix2fv);
   1.433 +        GLELoadProc(glUniformMatrix3fv_Impl, glUniformMatrix3fv);
   1.434 +        GLELoadProc(glUniformMatrix4fv_Impl, glUniformMatrix4fv);
   1.435 +        GLELoadProc(glUseProgram_Impl, glUseProgram);
   1.436 +        GLELoadProc(glValidateProgram_Impl, glValidateProgram);
   1.437 +        GLELoadProc(glVertexAttrib1d_Impl, glVertexAttrib1d);
   1.438 +        GLELoadProc(glVertexAttrib1dv_Impl, glVertexAttrib1dv);
   1.439 +        GLELoadProc(glVertexAttrib1f_Impl, glVertexAttrib1f);
   1.440 +        GLELoadProc(glVertexAttrib1fv_Impl, glVertexAttrib1fv);
   1.441 +        GLELoadProc(glVertexAttrib1s_Impl, glVertexAttrib1s);
   1.442 +        GLELoadProc(glVertexAttrib1sv_Impl, glVertexAttrib1sv);
   1.443 +        GLELoadProc(glVertexAttrib2d_Impl, glVertexAttrib2d);
   1.444 +        GLELoadProc(glVertexAttrib2dv_Impl, glVertexAttrib2dv);
   1.445 +        GLELoadProc(glVertexAttrib2f_Impl, glVertexAttrib2f);
   1.446 +        GLELoadProc(glVertexAttrib2fv_Impl, glVertexAttrib2fv);
   1.447 +        GLELoadProc(glVertexAttrib2s_Impl, glVertexAttrib2s);
   1.448 +        GLELoadProc(glVertexAttrib2sv_Impl, glVertexAttrib2sv);
   1.449 +        GLELoadProc(glVertexAttrib3d_Impl, glVertexAttrib3d);
   1.450 +        GLELoadProc(glVertexAttrib3dv_Impl, glVertexAttrib3dv);
   1.451 +        GLELoadProc(glVertexAttrib3f_Impl, glVertexAttrib3f);
   1.452 +        GLELoadProc(glVertexAttrib3fv_Impl, glVertexAttrib3fv);
   1.453 +        GLELoadProc(glVertexAttrib3s_Impl, glVertexAttrib3s);
   1.454 +        GLELoadProc(glVertexAttrib3sv_Impl, glVertexAttrib3sv);
   1.455 +        GLELoadProc(glVertexAttrib4Nbv_Impl, glVertexAttrib4Nbv);
   1.456 +        GLELoadProc(glVertexAttrib4Niv_Impl, glVertexAttrib4Niv);
   1.457 +        GLELoadProc(glVertexAttrib4Nsv_Impl, glVertexAttrib4Nsv);
   1.458 +        GLELoadProc(glVertexAttrib4Nub_Impl, glVertexAttrib4Nub);
   1.459 +        GLELoadProc(glVertexAttrib4Nubv_Impl, glVertexAttrib4Nubv);
   1.460 +        GLELoadProc(glVertexAttrib4Nuiv_Impl, glVertexAttrib4Nuiv);
   1.461 +        GLELoadProc(glVertexAttrib4Nusv_Impl, glVertexAttrib4Nusv);
   1.462 +        GLELoadProc(glVertexAttrib4bv_Impl, glVertexAttrib4bv);
   1.463 +        GLELoadProc(glVertexAttrib4d_Impl, glVertexAttrib4d);
   1.464 +        GLELoadProc(glVertexAttrib4dv_Impl, glVertexAttrib4dv);
   1.465 +        GLELoadProc(glVertexAttrib4f_Impl, glVertexAttrib4f);
   1.466 +        GLELoadProc(glVertexAttrib4fv_Impl, glVertexAttrib4fv);
   1.467 +        GLELoadProc(glVertexAttrib4iv_Impl, glVertexAttrib4iv);
   1.468 +        GLELoadProc(glVertexAttrib4s_Impl, glVertexAttrib4s);
   1.469 +        GLELoadProc(glVertexAttrib4sv_Impl, glVertexAttrib4sv);
   1.470 +        GLELoadProc(glVertexAttrib4ubv_Impl, glVertexAttrib4ubv);
   1.471 +        GLELoadProc(glVertexAttrib4uiv_Impl, glVertexAttrib4uiv);
   1.472 +        GLELoadProc(glVertexAttrib4usv_Impl, glVertexAttrib4usv);
   1.473 +        GLELoadProc(glVertexAttribPointer_Impl, glVertexAttribPointer);
   1.474 +
   1.475 +        // GL_VERSION_2_1
   1.476 +        GLELoadProc(glUniformMatrix2x3fv_Impl, glUniformMatrix2x3fv);
   1.477 +        GLELoadProc(glUniformMatrix2x4fv_Impl, glUniformMatrix2x4fv);
   1.478 +        GLELoadProc(glUniformMatrix3x2fv_Impl, glUniformMatrix3x2fv);
   1.479 +        GLELoadProc(glUniformMatrix3x4fv_Impl, glUniformMatrix3x4fv);
   1.480 +        GLELoadProc(glUniformMatrix4x2fv_Impl, glUniformMatrix4x2fv);
   1.481 +        GLELoadProc(glUniformMatrix4x3fv_Impl, glUniformMatrix4x3fv);
   1.482 +
   1.483 +        // GL_VERSION_3_0
   1.484 +        GLELoadProc(glBeginConditionalRender_Impl, glBeginConditionalRender);
   1.485 +        GLELoadProc(glBeginTransformFeedback_Impl, glBeginTransformFeedback);
   1.486 +        GLELoadProc(glBindFragDataLocation_Impl, glBindFragDataLocation);
   1.487 +        GLELoadProc(glClampColor_Impl, glClampColor);
   1.488 +        GLELoadProc(glClearBufferfi_Impl, glClearBufferfi);
   1.489 +        GLELoadProc(glClearBufferfv_Impl, glClearBufferfv);
   1.490 +        GLELoadProc(glClearBufferiv_Impl, glClearBufferiv);
   1.491 +        GLELoadProc(glClearBufferuiv_Impl, glClearBufferuiv);
   1.492 +        GLELoadProc(glColorMaski_Impl, glColorMaski);
   1.493 +        GLELoadProc(glDisablei_Impl, glDisablei);
   1.494 +        GLELoadProc(glEnablei_Impl, glEnablei);
   1.495 +        GLELoadProc(glEndConditionalRender_Impl, glEndConditionalRender);
   1.496 +        GLELoadProc(glEndTransformFeedback_Impl, glEndTransformFeedback);
   1.497 +        GLELoadProc(glBindBufferRange_Impl, glBindBufferRange);
   1.498 +        GLELoadProc(glBindBufferBase_Impl, glBindBufferBase);
   1.499 +        GLELoadProc(glGetBooleani_v_Impl, glGetBooleani_v);
   1.500 +        GLELoadProc(glGetIntegeri_v_Impl, glGetIntegeri_v);
   1.501 +        GLELoadProc(glGetFragDataLocation_Impl, glGetFragDataLocation);
   1.502 +        GLELoadProc(glGetStringi_Impl, glGetStringi);
   1.503 +        GLELoadProc(glGetTexParameterIiv_Impl, glGetTexParameterIiv);
   1.504 +        GLELoadProc(glGetTexParameterIuiv_Impl, glGetTexParameterIuiv);
   1.505 +        GLELoadProc(glGetTransformFeedbackVarying_Impl, glGetTransformFeedbackVarying);
   1.506 +        GLELoadProc(glGetUniformuiv_Impl, glGetUniformuiv);
   1.507 +        GLELoadProc(glGetVertexAttribIiv_Impl, glGetVertexAttribIiv);
   1.508 +        GLELoadProc(glGetVertexAttribIuiv_Impl, glGetVertexAttribIuiv);
   1.509 +        GLELoadProc(glIsEnabledi_Impl, glIsEnabledi);
   1.510 +        GLELoadProc(glTexParameterIiv_Impl, glTexParameterIiv);
   1.511 +        GLELoadProc(glTexParameterIuiv_Impl, glTexParameterIuiv);
   1.512 +        GLELoadProc(glTransformFeedbackVaryings_Impl, glTransformFeedbackVaryings);
   1.513 +        GLELoadProc(glUniform1ui_Impl, glUniform1ui);
   1.514 +        GLELoadProc(glUniform1uiv_Impl, glUniform1uiv);
   1.515 +        GLELoadProc(glUniform2ui_Impl, glUniform2ui);
   1.516 +        GLELoadProc(glUniform2uiv_Impl, glUniform2uiv);
   1.517 +        GLELoadProc(glUniform3ui_Impl, glUniform3ui);
   1.518 +        GLELoadProc(glUniform3uiv_Impl, glUniform3uiv);
   1.519 +        GLELoadProc(glUniform4ui_Impl, glUniform4ui);
   1.520 +        GLELoadProc(glUniform4uiv_Impl, glUniform4uiv);
   1.521 +        GLELoadProc(glVertexAttribI1i_Impl, glVertexAttribI1i);
   1.522 +        GLELoadProc(glVertexAttribI1iv_Impl, glVertexAttribI1iv);
   1.523 +        GLELoadProc(glVertexAttribI1ui_Impl, glVertexAttribI1ui);
   1.524 +        GLELoadProc(glVertexAttribI1uiv_Impl, glVertexAttribI1uiv);
   1.525 +        GLELoadProc(glVertexAttribI2i_Impl, glVertexAttribI2i);
   1.526 +        GLELoadProc(glVertexAttribI2iv_Impl, glVertexAttribI2iv);
   1.527 +        GLELoadProc(glVertexAttribI2ui_Impl, glVertexAttribI2ui);
   1.528 +        GLELoadProc(glVertexAttribI2uiv_Impl, glVertexAttribI2uiv);
   1.529 +        GLELoadProc(glVertexAttribI3i_Impl, glVertexAttribI3i);
   1.530 +        GLELoadProc(glVertexAttribI3iv_Impl, glVertexAttribI3iv);
   1.531 +        GLELoadProc(glVertexAttribI3ui_Impl, glVertexAttribI3ui);
   1.532 +        GLELoadProc(glVertexAttribI3uiv_Impl, glVertexAttribI3uiv);
   1.533 +        GLELoadProc(glVertexAttribI4bv_Impl, glVertexAttribI4bv);
   1.534 +        GLELoadProc(glVertexAttribI4i_Impl, glVertexAttribI4i);
   1.535 +        GLELoadProc(glVertexAttribI4iv_Impl, glVertexAttribI4iv);
   1.536 +        GLELoadProc(glVertexAttribI4sv_Impl, glVertexAttribI4sv);
   1.537 +        GLELoadProc(glVertexAttribI4ubv_Impl, glVertexAttribI4ubv);
   1.538 +        GLELoadProc(glVertexAttribI4ui_Impl, glVertexAttribI4ui);
   1.539 +        GLELoadProc(glVertexAttribI4uiv_Impl, glVertexAttribI4uiv);
   1.540 +        GLELoadProc(glVertexAttribI4usv_Impl, glVertexAttribI4usv);
   1.541 +        GLELoadProc(glVertexAttribIPointer_Impl, glVertexAttribIPointer);
   1.542 +
   1.543 +        // GL_VERSION_3_1
   1.544 +        GLELoadProc(glDrawArraysInstanced_Impl, glDrawArraysInstanced);
   1.545 +        GLELoadProc(glDrawElementsInstanced_Impl, glDrawElementsInstanced);
   1.546 +        GLELoadProc(glPrimitiveRestartIndex_Impl, glPrimitiveRestartIndex);
   1.547 +        GLELoadProc(glTexBuffer_Impl, glTexBuffer);
   1.548 +
   1.549 +        // GL_VERSION_3_2
   1.550 +        GLELoadProc(glFramebufferTexture_Impl, glFramebufferTexture);
   1.551 +        GLELoadProc(glGetBufferParameteri64v_Impl, glGetBufferParameteri64v);
   1.552 +        GLELoadProc(glGetInteger64i_v_Impl, glGetInteger64i_v);
   1.553 +
   1.554 +        // GL_VERSION_3_3
   1.555 +        GLELoadProc(glVertexAttribDivisor_Impl, glVertexAttribDivisor);
   1.556 +
   1.557 +        // GL_VERSION_4_0
   1.558 +        GLELoadProc(glBlendEquationSeparatei_Impl, glBlendEquationSeparatei);
   1.559 +        GLELoadProc(glBlendEquationi_Impl, glBlendEquationi);
   1.560 +        GLELoadProc(glBlendFuncSeparatei_Impl, glBlendFuncSeparatei);
   1.561 +        GLELoadProc(glBlendFunci_Impl, glBlendFunci);
   1.562 +        GLELoadProc(glMinSampleShading_Impl, glMinSampleShading);
   1.563 +
   1.564 +        // GL_AMD_debug_output
   1.565 +        GLELoadProc(glDebugMessageCallbackAMD_Impl, glDebugMessageCallbackAMD);
   1.566 +        GLELoadProc(glDebugMessageEnableAMD_Impl, glDebugMessageEnableAMD);
   1.567 +        GLELoadProc(glDebugMessageInsertAMD_Impl, glDebugMessageInsertAMD);
   1.568 +        GLELoadProc(glGetDebugMessageLogAMD_Impl, glGetDebugMessageLogAMD);
   1.569 +
   1.570 +      #if defined(GLE_CGL_ENABLED)
   1.571 +        // GL_APPLE_element_array
   1.572 +        GLELoadProc(glDrawElementArrayAPPLE_Impl, glDrawElementArrayAPPLE);
   1.573 +        GLELoadProc(glDrawRangeElementArrayAPPLE_Impl, glDrawRangeElementArrayAPPLE);
   1.574 +        GLELoadProc(glElementPointerAPPLE_Impl, glElementPointerAPPLE);
   1.575 +        GLELoadProc(glMultiDrawElementArrayAPPLE_Impl, glMultiDrawElementArrayAPPLE);
   1.576 +        GLELoadProc(glMultiDrawRangeElementArrayAPPLE_Impl, glMultiDrawRangeElementArrayAPPLE);
   1.577 +
   1.578 +        // GL_APPLE_fence
   1.579 +        GLELoadProc(glDeleteFencesAPPLE_Impl, glDeleteFencesAPPLE);
   1.580 +        GLELoadProc(glFinishFenceAPPLE_Impl, glFinishFenceAPPLE);
   1.581 +        GLELoadProc(glFinishObjectAPPLE_Impl, glFinishObjectAPPLE);
   1.582 +        GLELoadProc(glGenFencesAPPLE_Impl, glGenFencesAPPLE);
   1.583 +        GLELoadProc(glIsFenceAPPLE_Impl, glIsFenceAPPLE);
   1.584 +        GLELoadProc(glSetFenceAPPLE_Impl, glSetFenceAPPLE);
   1.585 +        GLELoadProc(glTestFenceAPPLE_Impl, glTestFenceAPPLE);
   1.586 +        GLELoadProc(glTestObjectAPPLE_Impl, glTestObjectAPPLE);
   1.587 +
   1.588 +        // GL_APPLE_flush_buffer_range
   1.589 +        GLELoadProc(glBufferParameteriAPPLE_Impl, glMultiDrawRangeElementArrayAPPLE);
   1.590 +        GLELoadProc(glFlushMappedBufferRangeAPPLE_Impl, glFlushMappedBufferRangeAPPLE);
   1.591 +
   1.592 +        // GL_APPLE_object_purgeable
   1.593 +        GLELoadProc(glGetObjectParameterivAPPLE_Impl, glGetObjectParameterivAPPLE);
   1.594 +        GLELoadProc(glObjectPurgeableAPPLE_Impl, glObjectPurgeableAPPLE);
   1.595 +        GLELoadProc(glObjectUnpurgeableAPPLE_Impl, glObjectUnpurgeableAPPLE);
   1.596 +
   1.597 +        // GL_APPLE_texture_range
   1.598 +        GLELoadProc(glGetTexParameterPointervAPPLE_Impl, glGetTexParameterPointervAPPLE);
   1.599 +        GLELoadProc(glTextureRangeAPPLE_Impl, glTextureRangeAPPLE);
   1.600 +
   1.601 +        // GL_APPLE_vertex_array_object
   1.602 +        GLELoadProc(glBindVertexArrayAPPLE_Impl, glBindVertexArrayAPPLE);
   1.603 +        GLELoadProc(glDeleteVertexArraysAPPLE_Impl, glDeleteVertexArraysAPPLE);
   1.604 +        GLELoadProc(glGenVertexArraysAPPLE_Impl, glGenVertexArraysAPPLE);
   1.605 +        GLELoadProc(glIsVertexArrayAPPLE_Impl, glIsVertexArrayAPPLE);
   1.606 +
   1.607 +        // GL_APPLE_vertex_array_range
   1.608 +        GLELoadProc(glFlushVertexArrayRangeAPPLE_Impl, glFlushVertexArrayRangeAPPLE);
   1.609 +        GLELoadProc(glVertexArrayParameteriAPPLE_Impl, glVertexArrayParameteriAPPLE);
   1.610 +        GLELoadProc(glVertexArrayRangeAPPLE_Impl, glVertexArrayRangeAPPLE);
   1.611 +
   1.612 +        // GL_APPLE_vertex_program_evaluators
   1.613 +        GLELoadProc(glDisableVertexAttribAPPLE_Impl, glDisableVertexAttribAPPLE);
   1.614 +        GLELoadProc(glEnableVertexAttribAPPLE_Impl, glEnableVertexAttribAPPLE);
   1.615 +        GLELoadProc(glIsVertexAttribEnabledAPPLE_Impl, glIsVertexAttribEnabledAPPLE);
   1.616 +        GLELoadProc(glMapVertexAttrib1dAPPLE_Impl, glMapVertexAttrib1dAPPLE);
   1.617 +        GLELoadProc(glMapVertexAttrib1fAPPLE_Impl, glMapVertexAttrib1fAPPLE);
   1.618 +        GLELoadProc(glMapVertexAttrib2dAPPLE_Impl, glMapVertexAttrib2dAPPLE);
   1.619 +        GLELoadProc(glMapVertexAttrib2fAPPLE_Impl, glMapVertexAttrib2fAPPLE);
   1.620 +        
   1.621 +      #endif // GLE_CGL_ENABLED
   1.622 +      
   1.623 +        // GL_ARB_debug_output
   1.624 +        GLELoadProc(glDebugMessageCallbackARB_Impl, glDebugMessageCallbackARB);
   1.625 +        GLELoadProc(glDebugMessageControlARB_Impl, glDebugMessageControlARB);
   1.626 +        GLELoadProc(glDebugMessageInsertARB_Impl, glDebugMessageInsertARB);
   1.627 +        GLELoadProc(glGetDebugMessageLogARB_Impl, glGetDebugMessageLogARB);
   1.628 +        
   1.629 +        // GL_ARB_ES2_compatibility
   1.630 +        GLELoadProc(glClearDepthf_Impl, glClearDepthf);
   1.631 +        GLELoadProc(glDepthRangef_Impl, glDepthRangef);
   1.632 +        GLELoadProc(glGetShaderPrecisionFormat_Impl, glGetShaderPrecisionFormat);
   1.633 +        GLELoadProc(glReleaseShaderCompiler_Impl, glReleaseShaderCompiler);
   1.634 +        GLELoadProc(glShaderBinary_Impl, glShaderBinary);
   1.635 +
   1.636 +        // GL_ARB_framebuffer_object
   1.637 +        GLELoadProc(glBindFramebuffer_Impl, glBindFramebuffer);
   1.638 +        GLELoadProc(glBindRenderbuffer_Impl, glBindRenderbuffer);
   1.639 +        GLELoadProc(glBlitFramebuffer_Impl, glBlitFramebuffer);
   1.640 +        GLELoadProc(glCheckFramebufferStatus_Impl, glCheckFramebufferStatus);
   1.641 +        GLELoadProc(glDeleteFramebuffers_Impl, glDeleteFramebuffers);
   1.642 +        GLELoadProc(glDeleteRenderbuffers_Impl, glDeleteRenderbuffers);
   1.643 +        GLELoadProc(glFramebufferRenderbuffer_Impl, glFramebufferRenderbuffer);
   1.644 +        GLELoadProc(glFramebufferTexture1D_Impl, glFramebufferTexture1D);
   1.645 +        GLELoadProc(glFramebufferTexture2D_Impl, glFramebufferTexture2D);
   1.646 +        GLELoadProc(glFramebufferTexture3D_Impl, glFramebufferTexture3D);
   1.647 +        GLELoadProc(glFramebufferTextureLayer_Impl, glFramebufferTextureLayer);
   1.648 +        GLELoadProc(glGenFramebuffers_Impl, glGenFramebuffers);
   1.649 +        GLELoadProc(glGenRenderbuffers_Impl, glGenRenderbuffers);
   1.650 +        GLELoadProc(glGenerateMipmap_Impl, glGenerateMipmap);
   1.651 +        GLELoadProc(glGetFramebufferAttachmentParameteriv_Impl, glGetFramebufferAttachmentParameteriv);
   1.652 +        GLELoadProc(glGetRenderbufferParameteriv_Impl, glGetRenderbufferParameteriv);
   1.653 +        GLELoadProc(glIsFramebuffer_Impl, glIsFramebuffer);
   1.654 +        GLELoadProc(glIsRenderbuffer_Impl, glIsRenderbuffer);
   1.655 +        GLELoadProc(glRenderbufferStorage_Impl, glRenderbufferStorage);
   1.656 +        GLELoadProc(glRenderbufferStorageMultisample_Impl, glRenderbufferStorageMultisample);
   1.657 +
   1.658 +        if(!glBindFramebuffer_Impl) // This will rarely if ever be the case in practice with modern computers and drivers.
   1.659 +        {
   1.660 +            // See if we can map GL_EXT_framebuffer_object to GL_ARB_framebuffer_object. The former is basically a subset of the latter, but we use only that subset.
   1.661 +            GLELoadProc(glBindFramebuffer_Impl, glBindFramebufferEXT);
   1.662 +            GLELoadProc(glBindRenderbuffer_Impl, glBindRenderbufferEXT);
   1.663 +          //GLELoadProc(glBlitFramebuffer_Impl, glBlitFramebufferEXT (nonexistent));
   1.664 +            GLELoadProc(glCheckFramebufferStatus_Impl, glCheckFramebufferStatusEXT);
   1.665 +            GLELoadProc(glDeleteFramebuffers_Impl, glDeleteFramebuffersEXT);
   1.666 +            GLELoadProc(glDeleteRenderbuffers_Impl, glDeleteRenderbuffersEXT);
   1.667 +            GLELoadProc(glFramebufferRenderbuffer_Impl, glFramebufferRenderbufferEXT);
   1.668 +            GLELoadProc(glFramebufferTexture1D_Impl, glFramebufferTexture1DEXT);
   1.669 +            GLELoadProc(glFramebufferTexture2D_Impl, glFramebufferTexture2DEXT);
   1.670 +            GLELoadProc(glFramebufferTexture3D_Impl, glFramebufferTexture3DEXT);
   1.671 +          //GLELoadProc(glFramebufferTextureLayer_Impl, glFramebufferTextureLayerEXT (nonexistent));
   1.672 +            GLELoadProc(glGenFramebuffers_Impl, glGenFramebuffersEXT);
   1.673 +            GLELoadProc(glGenRenderbuffers_Impl, glGenRenderbuffersEXT);
   1.674 +            GLELoadProc(glGenerateMipmap_Impl, glGenerateMipmapEXT);
   1.675 +            GLELoadProc(glGetFramebufferAttachmentParameteriv_Impl, glGetFramebufferAttachmentParameterivEXT);
   1.676 +            GLELoadProc(glGetRenderbufferParameteriv_Impl, glGetRenderbufferParameterivEXT);
   1.677 +            GLELoadProc(glIsFramebuffer_Impl, glIsFramebufferEXT);
   1.678 +            GLELoadProc(glIsRenderbuffer_Impl, glIsRenderbufferEXT);
   1.679 +            GLELoadProc(glRenderbufferStorage_Impl, glRenderbufferStorageEXT);
   1.680 +          //GLELoadProc(glRenderbufferStorageMultisample_Impl, glRenderbufferStorageMultisampleEXT (nonexistent));
   1.681 +        }
   1.682 +        
   1.683 +        // GL_ARB_texture_multisample
   1.684 +        GLELoadProc(glGetMultisamplefv_Impl, glGetMultisamplefv);
   1.685 +        GLELoadProc(glSampleMaski_Impl, glSampleMaski);
   1.686 +        GLELoadProc(glTexImage2DMultisample_Impl, glTexImage2DMultisample);
   1.687 +        GLELoadProc(glTexImage3DMultisample_Impl, glTexImage3DMultisample);
   1.688 +        
   1.689 +        // GL_ARB_timer_query
   1.690 +        GLELoadProc(glGetQueryObjecti64v_Impl, glGetQueryObjecti64v);
   1.691 +        GLELoadProc(glGetQueryObjectui64v_Impl, glGetQueryObjectui64v);
   1.692 +        GLELoadProc(glQueryCounter_Impl, glQueryCounter);
   1.693 +
   1.694 +        // GL_ARB_vertex_array_object
   1.695 +        GLELoadProc(glBindVertexArray_Impl, glBindVertexArray);
   1.696 +        GLELoadProc(glDeleteVertexArrays_Impl, glDeleteVertexArrays);
   1.697 +        GLELoadProc(glGenVertexArrays_Impl, glGenVertexArrays);
   1.698 +        GLELoadProc(glIsVertexArray_Impl, glIsVertexArray);
   1.699 +
   1.700 +        #if defined(GLE_CGL_ENABLED) // Apple OpenGL...
   1.701 +            if(WholeVersion < 302) // It turns out that Apple OpenGL versions prior to 3.2 have glBindVertexArray, etc. but they silently fail by default. So always use the APPLE version.
   1.702 +            {
   1.703 +                glBindVertexArray_Impl    = glBindVertexArrayAPPLE_Impl;
   1.704 +                glDeleteVertexArrays_Impl = glDeleteVertexArraysAPPLE_Impl;
   1.705 +                glGenVertexArrays_Impl    = (OVRTypeof(glGenVertexArrays_Impl)) glGenVertexArraysAPPLE_Impl; // There is a const cast of the arrays argument here due to a slight difference in the Apple behavior. For our purposes it should be OK.
   1.706 +                glIsVertexArray_Impl      = glIsVertexArrayAPPLE_Impl;
   1.707 +                
   1.708 +                if(glBindVertexArray_Impl)
   1.709 +                    gle_ARB_vertex_array_object = true; // We are routing the APPLE version through our version, with the assumption that we use the ARB version the same as we would use the APPLE version.
   1.710 +            }
   1.711 +        #endif
   1.712 +        
   1.713 +        // GL_EXT_draw_buffers2
   1.714 +        GLELoadProc(glColorMaskIndexedEXT_Impl, glColorMaskIndexedEXT);
   1.715 +        GLELoadProc(glDisableIndexedEXT_Impl, glDisableIndexedEXT);
   1.716 +        GLELoadProc(glEnableIndexedEXT_Impl, glEnableIndexedEXT);
   1.717 +        GLELoadProc(glGetBooleanIndexedvEXT_Impl, glGetBooleanIndexedvEXT);
   1.718 +        GLELoadProc(glGetIntegerIndexedvEXT_Impl, glGetIntegerIndexedvEXT);
   1.719 +        GLELoadProc(glIsEnabledIndexedEXT_Impl, glIsEnabledIndexedEXT);
   1.720 +
   1.721 +        // GL_KHR_debug
   1.722 +        GLELoadProc(glDebugMessageCallback_Impl, glDebugMessageCallback);
   1.723 +        GLELoadProc(glDebugMessageControl_Impl, glDebugMessageControl);
   1.724 +        GLELoadProc(glDebugMessageInsert_Impl, glDebugMessageInsert);
   1.725 +        GLELoadProc(glGetDebugMessageLog_Impl, glGetDebugMessageLog);
   1.726 +        GLELoadProc(glGetObjectLabel_Impl, glGetObjectLabel);
   1.727 +        GLELoadProc(glGetObjectPtrLabel_Impl, glGetObjectPtrLabel);
   1.728 +        GLELoadProc(glObjectLabel_Impl, glObjectLabel);
   1.729 +        GLELoadProc(glObjectPtrLabel_Impl, glObjectPtrLabel);
   1.730 +        GLELoadProc(glPopDebugGroup_Impl, glPopDebugGroup);
   1.731 +        GLELoadProc(glPushDebugGroup_Impl, glPushDebugGroup);
   1.732 +
   1.733 +        // GL_WIN_swap_hint
   1.734 +        GLELoadProc(glAddSwapHintRectWIN_Impl, glAddSwapHintRectWIN);
   1.735 +    }
   1.736 +    
   1.737 +
   1.738 +
   1.739 +    OVR_DISABLE_MSVC_WARNING(4510 4512 4610) // default constructor could not be generated,
   1.740 +    struct ValueStringPair
   1.741 +    {
   1.742 +        bool& IsPresent;
   1.743 +        const char* ExtensionName;
   1.744 +    };
   1.745 +
   1.746 +
   1.747 +    // Helper function for InitExtensionSupport.
   1.748 +    static void CheckExtensions(ValueStringPair* pValueStringPairArray, size_t arrayCount, const char* extensions)
   1.749 +    {
   1.750 +        // We search the extesion list string for each of the individual extensions we are interested in. 
   1.751 +        // We do this by walking over the string and comparing each entry in turn to our array of entries of interest.
   1.752 +        // Example string (with patholigical extra spaces): "   ext1 ext2   ext3  "
   1.753 +           
   1.754 +        char extension[64];
   1.755 +        const char* p = extensions; // p points to the beginning of the current word
   1.756 +        const char* pEnd;           // pEnd points to one-past the last character of the current word. It is where the trailing '\0' of the string would be.
   1.757 +           
   1.758 +        while(*p)
   1.759 +        {
   1.760 +            while(*p == ' ') // Find the next word begin.
   1.761 +                ++p;
   1.762 +                
   1.763 +            pEnd = p;
   1.764 +               
   1.765 +            while((*pEnd != '\0') && (*pEnd != ' ')) // Find the next word end.
   1.766 +                ++pEnd;
   1.767 +               
   1.768 +            if(((pEnd - p) > 0) && ((size_t)(pEnd - p) < OVR_ARRAY_COUNT(extension)))
   1.769 +            {
   1.770 +                memcpy(extension, p, pEnd - p); // To consider: Revise this code to directly read from p/pEnd instead of doing a memcpy.
   1.771 +                extension[pEnd - p] = '\0';
   1.772 +                   
   1.773 +                for(size_t i = 0; i < arrayCount; i++) // For each extension we are interested in...
   1.774 +                {
   1.775 +                    ValueStringPair& vsp = pValueStringPairArray[i];
   1.776 + 
   1.777 +                    if(strcmp(extension, vsp.ExtensionName) == 0) // case-sensitive compare
   1.778 +                        pValueStringPairArray[i].IsPresent = true;
   1.779 +                }
   1.780 +            }
   1.781 +               
   1.782 +            p = pEnd;
   1.783 +        }
   1.784 +    }
   1.785 +
   1.786 +
   1.787 +    void OVR::GLEContext::InitExtensionSupport()
   1.788 +    {
   1.789 +        // It may be better in the long run to use a member STL map<const char*, bool>.
   1.790 +        // It would make this loading code cleaner, though it would make lookups slower.
   1.791 +
   1.792 +        ValueStringPair vspArray[] =
   1.793 +        {
   1.794 +            { gle_AMD_debug_output, "GL_AMD_debug_output" },
   1.795 +          #if defined(GLE_CGL_ENABLED)
   1.796 +            { gle_APPLE_aux_depth_stencil, "GL_APPLE_aux_depth_stencil" },
   1.797 +            { gle_APPLE_client_storage, "GL_APPLE_client_storage" },
   1.798 +            { gle_APPLE_element_array, "GL_APPLE_element_array" },
   1.799 +            { gle_APPLE_fence, "GL_APPLE_fence" },
   1.800 +            { gle_APPLE_float_pixels, "GL_APPLE_float_pixels" },
   1.801 +            { gle_APPLE_flush_buffer_range, "GL_APPLE_flush_buffer_range" },
   1.802 +            { gle_APPLE_object_purgeable, "GL_APPLE_object_purgeable" },
   1.803 +            { gle_APPLE_pixel_buffer, "GL_APPLE_pixel_buffer" },
   1.804 +            { gle_APPLE_rgb_422, "GL_APPLE_rgb_422" },
   1.805 +            { gle_APPLE_row_bytes, "GL_APPLE_row_bytes" },
   1.806 +            { gle_APPLE_specular_vector, "GL_APPLE_specular_vector" },
   1.807 +            { gle_APPLE_texture_range, "GL_APPLE_texture_range" },
   1.808 +            { gle_APPLE_transform_hint, "GL_APPLE_transform_hint" },
   1.809 +            { gle_APPLE_vertex_array_object, "GL_APPLE_vertex_array_object" },
   1.810 +            { gle_APPLE_vertex_array_range, "GL_APPLE_vertex_array_range" },
   1.811 +            { gle_APPLE_vertex_program_evaluators, "GL_APPLE_vertex_program_evaluators" },
   1.812 +            { gle_APPLE_ycbcr_422, "GL_APPLE_ycbcr_422" },
   1.813 +          #endif
   1.814 +            { gle_ARB_debug_output, "GL_ARB_debug_output" },
   1.815 +            { gle_ARB_depth_buffer_float, "GL_ARB_depth_buffer_float" },
   1.816 +            { gle_ARB_ES2_compatibility, "GL_ARB_ES2_compatibility" },
   1.817 +            { gle_ARB_framebuffer_object, "GL_ARB_framebuffer_object" },
   1.818 +            { gle_ARB_framebuffer_object, "GL_EXT_framebuffer_object" },    // We map glBindFramebuffer, etc. to glBindFramebufferEXT, etc. if necessary
   1.819 +            { gle_ARB_framebuffer_sRGB, "GL_ARB_framebuffer_sRGB" },
   1.820 +            { gle_ARB_texture_multisample, "GL_ARB_texture_multisample" },
   1.821 +            { gle_ARB_texture_non_power_of_two, "GL_ARB_texture_non_power_of_two" },
   1.822 +            { gle_ARB_texture_rectangle, "GL_ARB_texture_rectangle" },
   1.823 +            { gle_ARB_texture_rectangle, "GL_EXT_texture_rectangle" },  // We also check for GL_EXT_texture_rectangle and GL_NV_texture_rectangle.
   1.824 +            { gle_ARB_texture_rectangle, "GL_NV_texture_rectangle" },
   1.825 +            { gle_ARB_timer_query, "GL_ARB_timer_query" },
   1.826 +            { gle_ARB_vertex_array_object, "GL_ARB_vertex_array_object" },
   1.827 +            { gle_EXT_draw_buffers2, "GL_EXT_draw_buffers2" },
   1.828 +            { gle_EXT_texture_compression_s3tc, "GL_EXT_texture_compression_s3tc" },
   1.829 +            { gle_EXT_texture_filter_anisotropic, "GL_EXT_texture_filter_anisotropic" },
   1.830 +            { gle_KHR_debug, "GL_KHR_debug" },
   1.831 +            { gle_WIN_swap_hint, "GL_WIN_swap_hint" }
   1.832 +            // Windows WGL, Unix GLX, and Apple CGL extensions are handled below, as they require different calls from glGetString(GL_EXTENSIONS).
   1.833 +        };
   1.834 +
   1.835 +        // We cannot use glGetString(GL_EXTENSIONS) when an OpenGL core profile is active,
   1.836 +        // as it's deprecated in favor of using OpenGL 3+ glGetStringi.
   1.837 +        const char* extensions = (MajorVersion < 3) ? (const char*)glGetString(GL_EXTENSIONS) : "";
   1.838 +       
   1.839 +        if (extensions && *extensions) // If we have a space-delimited extension string to search for individual extensions...
   1.840 +        {
   1.841 +            OVR_DEBUG_LOG(("GL_EXTENSIONS: %s", (const char*)extensions));
   1.842 +            CheckExtensions(vspArray, OVR_ARRAY_COUNT(vspArray), extensions); // Call our shared helper function for this.
   1.843 +        }
   1.844 +        else
   1.845 +        {
   1.846 +            if(MajorVersion >= 3) // If glGetIntegerv(GL_NUM_EXTENSIONS, ...) is supported...
   1.847 +            {
   1.848 +                // In this case we need to match an array of individual extensions against an array of
   1.849 +                // externsions provided by glGetStringi. This is an O(n^2) operation, but at least we
   1.850 +                // are doing this only once on startup. There are a few tricks we can employ to speed
   1.851 +                // up the logic below, but they may not be worth much.
   1.852 +               
   1.853 +                GLint extensionCount = 0;
   1.854 +                glGetIntegerv(GL_NUM_EXTENSIONS, &extensionCount);
   1.855 +                GLenum err = glGetError();
   1.856 +               
   1.857 +                if(err == 0)
   1.858 +                {
   1.859 +                    #ifdef OVR_BUILD_DEBUG
   1.860 +                    OVR::StringBuffer extensionsStr;
   1.861 +                    #endif
   1.862 + 
   1.863 +                    for(GLint e = 0; e != extensionCount; ++e) // For each extension supported...
   1.864 +                    {
   1.865 +                        const char* extension = (const char*)glGetStringi(GL_EXTENSIONS, (GLuint)e);
   1.866 + 
   1.867 +                        if(extension) // glGetStringi returns NULL upon error.
   1.868 +                        {
   1.869 +                            #ifdef OVR_BUILD_DEBUG
   1.870 +                                extensionsStr.AppendFormat(" %s", extension);
   1.871 +                            #endif
   1.872 + 
   1.873 +                            for(size_t i = 0; i < OVR_ARRAY_COUNT(vspArray); i++) // For each extension we are interested in...
   1.874 +                            {
   1.875 +                                ValueStringPair& vsp = vspArray[i];
   1.876 + 
   1.877 +                                if(strcmp(extension, vsp.ExtensionName) == 0) // case-sensitive compare
   1.878 +                                    vspArray[i].IsPresent = true;
   1.879 +                            }
   1.880 +                        }
   1.881 +                        else
   1.882 +                            break;
   1.883 +                    }
   1.884 + 
   1.885 +                    OVR_DEBUG_LOG(("GL_EXTENSIONS: %s", extensionsStr.ToCStr()));
   1.886 +                }
   1.887 +            }
   1.888 +            // Else we have a problem: no means to read the extensions was successful.
   1.889 +        }
   1.890 +
   1.891 +        #if defined(GLE_CGL_ENABLED)
   1.892 +            // The following are built into Apple OpenGL 3.2+ (declared in <OpenGL/gl3.h>) and not identified as extensions.
   1.893 +            // On other platforms (e.g. Windows) these are identified as extensions and are detected above.
   1.894 +            if(WholeVersion >= 302)
   1.895 +            {
   1.896 +                gle_ARB_depth_buffer_float       = true;
   1.897 +                gle_ARB_framebuffer_object       = true;
   1.898 +                gle_ARB_framebuffer_sRGB         = true;
   1.899 +                gle_ARB_texture_multisample      = true;
   1.900 +                gle_ARB_texture_non_power_of_two = true;
   1.901 +                gle_ARB_texture_rectangle        = true;
   1.902 +                gle_ARB_vertex_array_object      = true;
   1.903 +            }
   1.904 +        #endif
   1.905 +
   1.906 +    } // GLEContext::InitExtensionSupport()
   1.907 +        
   1.908 +
   1.909 +    void OVR::GLEContext::InitPlatformVersion()
   1.910 +    {
   1.911 +        #if defined(GLE_GLX_ENABLED)
   1.912 +            const char* pGLXVersion = glXGetClientString(glXGetCurrentDisplay(), GLX_VERSION); // To do: Use a better mechanism to get the desired display.
   1.913 +            sscanf(pGLXVersion, "%d.%d", &PlatformMajorVersion, &PlatformMinorVersion);
   1.914 +
   1.915 +        #elif defined(GLE_EGL_ENABLED)
   1.916 +            const char* pEGLVersion = eglQueryString(eglGetDisplay(EGL_DEFAULT_DISPLAY), EGL_VERSION);
   1.917 +            sscanf(pEGLVersion, "%d.%d", &PlatformMajorVersion, &PlatformMinorVersion);
   1.918 +
   1.919 +        #else
   1.920 +            PlatformMajorVersion = 1;
   1.921 +            PlatformMinorVersion = 0;
   1.922 +            PlatformWholeVersion = 100;
   1.923 +        #endif
   1.924 +    }
   1.925 +
   1.926 +
   1.927 +    void OVR::GLEContext::InitPlatformExtensionLoad()
   1.928 +    {
   1.929 +        #if defined(GLE_WGL_ENABLED)
   1.930 +            // WGL
   1.931 +            // We don't load these as function pointers but rather statically link to them.
   1.932 +            // These need to be loaded via LoadLibrary instead of wglLoadLibrary.
   1.933 +
   1.934 +            #if 0
   1.935 +        	HINSTANCE hOpenGL = LoadLibraryW(L"Opengl32.dll");
   1.936 +            if(hOpenGL)
   1.937 +            {
   1.938 +                wglCopyContext_Impl            = (OVRTypeof(wglCopyContext_Impl)) GetProcAddress(hOpenGL, "wglCopyContext");
   1.939 +                wglCreateContext_Impl          = (OVRTypeof(wglCreateContext_Impl)) GetProcAddress(hOpenGL, "wglCreateContext");
   1.940 +                wglCreateLayerContext_Impl     = (OVRTypeof(wglCreateLayerContext_Impl)) GetProcAddress(hOpenGL, "wglCreateLayerContext");
   1.941 +                wglDeleteContext_Impl          = (OVRTypeof(wglDeleteContext_Impl)) GetProcAddress(hOpenGL, "wglDeleteContext");
   1.942 +                wglGetCurrentContext_Impl      = (OVRTypeof(wglGetCurrentContext_Impl)) GetProcAddress(hOpenGL, "wglGetCurrentContext");
   1.943 +                wglGetCurrentDC_Impl           = (OVRTypeof(wglGetCurrentDC_Impl)) GetProcAddress(hOpenGL, "wglGetCurrentDC");
   1.944 +                wglGetProcAddress_Impl         = (OVRTypeof(wglGetProcAddress_Impl)) GetProcAddress(hOpenGL, "wglGetProcAddress");
   1.945 +                wglMakeCurrent_Impl            = (OVRTypeof(wglMakeCurrent_Impl)) GetProcAddress(hOpenGL, "wglMakeCurrent");
   1.946 +                wglShareLists_Impl             = (OVRTypeof(wglShareLists_Impl)) GetProcAddress(hOpenGL, "wglShareLists");
   1.947 +                wglUseFontBitmapsA_Impl        = (OVRTypeof(wglUseFontBitmapsA_Impl)) GetProcAddress(hOpenGL, "wglUseFontBitmapsA");
   1.948 +                wglUseFontBitmapsW_Impl        = (OVRTypeof(wglUseFontBitmapsW_Impl)) GetProcAddress(hOpenGL, "wglUseFontBitmapsW");
   1.949 +                wglUseFontOutlinesA_Impl       = (OVRTypeof(wglUseFontOutlinesA_Impl)) GetProcAddress(hOpenGL, "wglUseFontOutlinesA");
   1.950 +                wglUseFontOutlinesW_Impl       = (OVRTypeof(wglUseFontOutlinesW_Impl)) GetProcAddress(hOpenGL, "wglUseFontOutlinesW");
   1.951 +                wglDescribeLayerPlane_Impl     = (OVRTypeof(wglDescribeLayerPlane_Impl)) GetProcAddress(hOpenGL, "wglDescribeLayerPlane");
   1.952 +                wglSetLayerPaletteEntries_Impl = (OVRTypeof(wglSetLayerPaletteEntries_Impl)) GetProcAddress(hOpenGL, "wglSetLayerPaletteEntries");
   1.953 +                wglGetLayerPaletteEntries_Impl = (OVRTypeof(wglGetLayerPaletteEntries_Impl)) GetProcAddress(hOpenGL, "wglGetLayerPaletteEntries");
   1.954 +                wglRealizeLayerPalette_Impl    = (OVRTypeof(wglRealizeLayerPalette_Impl)) GetProcAddress(hOpenGL, "wglRealizeLayerPalette");
   1.955 +                wglSwapLayerBuffers_Impl       = (OVRTypeof(wglSwapLayerBuffers_Impl)) GetProcAddress(hOpenGL, "wglSwapLayerBuffers");
   1.956 +                wglSwapMultipleBuffers_Impl    = (OVRTypeof(wglSwapMultipleBuffers_Impl)) GetProcAddress(hOpenGL, "wglSwapMultipleBuffers");
   1.957 +                FreeLibrary(hOpenGL);
   1.958 +            }
   1.959 +            #endif
   1.960 +
   1.961 +            // WGL_ARB_buffer_region
   1.962 +            GLELoadProc(wglCreateBufferRegionARB_Impl, wglCreateBufferRegionARB);
   1.963 +            GLELoadProc(wglDeleteBufferRegionARB_Impl, wglDeleteBufferRegionARB);
   1.964 +            GLELoadProc(wglSaveBufferRegionARB_Impl, wglSaveBufferRegionARB);
   1.965 +            GLELoadProc(wglRestoreBufferRegionARB_Impl, wglRestoreBufferRegionARB);
   1.966 +
   1.967 +            // WGL_ARB_extensions_string
   1.968 +            GLELoadProc(wglGetExtensionsStringARB_Impl, wglGetExtensionsStringARB);
   1.969 +
   1.970 +            // WGL_ARB_pixel_format
   1.971 +            GLELoadProc(wglGetPixelFormatAttribivARB_Impl, wglGetPixelFormatAttribivARB);
   1.972 +            GLELoadProc(wglGetPixelFormatAttribfvARB_Impl, wglGetPixelFormatAttribfvARB);
   1.973 +            GLELoadProc(wglChoosePixelFormatARB_Impl, wglChoosePixelFormatARB);
   1.974 +
   1.975 +            // WGL_ARB_make_current_read
   1.976 +            GLELoadProc(wglMakeContextCurrentARB_Impl, wglMakeContextCurrentARB);
   1.977 +            GLELoadProc(wglGetCurrentReadDCARB_Impl, wglGetCurrentReadDCARB);
   1.978 +
   1.979 +            // WGL_ARB_pbuffer
   1.980 +            GLELoadProc(wglCreatePbufferARB_Impl, wglCreatePbufferARB);
   1.981 +            GLELoadProc(wglGetPbufferDCARB_Impl, wglGetPbufferDCARB);
   1.982 +            GLELoadProc(wglReleasePbufferDCARB_Impl, wglReleasePbufferDCARB);
   1.983 +            GLELoadProc(wglDestroyPbufferARB_Impl, wglDestroyPbufferARB);
   1.984 +            GLELoadProc(wglQueryPbufferARB_Impl, wglQueryPbufferARB);
   1.985 +
   1.986 +            // WGL_ARB_render_texture
   1.987 +            GLELoadProc(wglBindTexImageARB_Impl, wglBindTexImageARB);
   1.988 +            GLELoadProc(wglReleaseTexImageARB_Impl, wglReleaseTexImageARB);
   1.989 +            GLELoadProc(wglSetPbufferAttribARB_Impl, wglSetPbufferAttribARB);
   1.990 +
   1.991 +            // WGL_NV_present_video
   1.992 +            GLELoadProc(wglEnumerateVideoDevicesNV_Impl, wglEnumerateVideoDevicesNV);
   1.993 +            GLELoadProc(wglBindVideoDeviceNV_Impl, wglBindVideoDeviceNV);
   1.994 +            GLELoadProc(wglQueryCurrentContextNV_Impl, wglQueryCurrentContextNV);
   1.995 +
   1.996 +            // WGL_ARB_create_context
   1.997 +            GLELoadProc(wglCreateContextAttribsARB_Impl, wglCreateContextAttribsARB);
   1.998 +
   1.999 +            // WGL_EXT_extensions_string
  1.1000 +            GLELoadProc(wglGetExtensionsStringEXT_Impl, wglGetExtensionsStringEXT);
  1.1001 +
  1.1002 +            // WGL_EXT_swap_control
  1.1003 +            GLELoadProc(wglGetSwapIntervalEXT_Impl, wglGetSwapIntervalEXT);
  1.1004 +            GLELoadProc(wglSwapIntervalEXT_Impl, wglSwapIntervalEXT);
  1.1005 +        
  1.1006 +            // WGL_OML_sync_control
  1.1007 +            GLELoadProc(wglGetSyncValuesOML_Impl, wglGetSyncValuesOML);
  1.1008 +            GLELoadProc(wglGetMscRateOML_Impl, wglGetMscRateOML);
  1.1009 +            GLELoadProc(wglSwapBuffersMscOML_Impl, wglSwapBuffersMscOML);
  1.1010 +            GLELoadProc(wglSwapLayerBuffersMscOML_Impl, wglSwapLayerBuffersMscOML);
  1.1011 +            GLELoadProc(wglWaitForMscOML_Impl, wglWaitForMscOML);
  1.1012 +            GLELoadProc(wglWaitForSbcOML_Impl, wglWaitForSbcOML);
  1.1013 +
  1.1014 +            // WGL_NV_video_output
  1.1015 +            GLELoadProc(wglGetVideoDeviceNV_Impl, wglGetVideoDeviceNV);
  1.1016 +            GLELoadProc(wglReleaseVideoDeviceNV_Impl, wglReleaseVideoDeviceNV);
  1.1017 +            GLELoadProc(wglBindVideoImageNV_Impl, wglBindVideoImageNV);
  1.1018 +            GLELoadProc(wglReleaseVideoImageNV_Impl, wglReleaseVideoImageNV);
  1.1019 +            GLELoadProc(wglSendPbufferToVideoNV_Impl, wglSendPbufferToVideoNV);
  1.1020 +            GLELoadProc(wglGetVideoInfoNV_Impl, wglGetVideoInfoNV);
  1.1021 +
  1.1022 +            // WGL_NV_swap_group
  1.1023 +            GLELoadProc(wglJoinSwapGroupNV_Impl, wglJoinSwapGroupNV);
  1.1024 +            GLELoadProc(wglBindSwapBarrierNV_Impl, wglBindSwapBarrierNV);
  1.1025 +            GLELoadProc(wglQuerySwapGroupNV_Impl, wglQuerySwapGroupNV);
  1.1026 +            GLELoadProc(wglQueryMaxSwapGroupsNV_Impl, wglQueryMaxSwapGroupsNV);
  1.1027 +            GLELoadProc(wglQueryFrameCountNV_Impl, wglQueryFrameCountNV);
  1.1028 +            GLELoadProc(wglResetFrameCountNV_Impl, wglResetFrameCountNV);
  1.1029 +
  1.1030 +            // WGL_NV_video_capture
  1.1031 +            GLELoadProc(wglBindVideoCaptureDeviceNV_Impl, wglBindVideoCaptureDeviceNV);
  1.1032 +            GLELoadProc(wglEnumerateVideoCaptureDevicesNV_Impl, wglEnumerateVideoCaptureDevicesNV);
  1.1033 +            GLELoadProc(wglLockVideoCaptureDeviceNV_Impl, wglLockVideoCaptureDeviceNV);
  1.1034 +            GLELoadProc(wglQueryVideoCaptureDeviceNV_Impl, wglQueryVideoCaptureDeviceNV);
  1.1035 +            GLELoadProc(wglReleaseVideoCaptureDeviceNV_Impl, wglReleaseVideoCaptureDeviceNV);
  1.1036 +
  1.1037 +            // WGL_NV_copy_image
  1.1038 +            GLELoadProc(wglCopyImageSubDataNV_Impl, wglCopyImageSubDataNV);
  1.1039 +
  1.1040 +            // WGL_NV_DX_interop
  1.1041 +            GLELoadProc(wglDXCloseDeviceNV_Impl, wglDXCloseDeviceNV);
  1.1042 +            GLELoadProc(wglDXLockObjectsNV_Impl, wglDXLockObjectsNV);
  1.1043 +            GLELoadProc(wglDXObjectAccessNV_Impl, wglDXObjectAccessNV);
  1.1044 +            GLELoadProc(wglDXOpenDeviceNV_Impl, wglDXOpenDeviceNV);
  1.1045 +            GLELoadProc(wglDXRegisterObjectNV_Impl, wglDXRegisterObjectNV);
  1.1046 +            GLELoadProc(wglDXSetResourceShareHandleNV_Impl, wglDXSetResourceShareHandleNV);
  1.1047 +            GLELoadProc(wglDXUnlockObjectsNV_Impl, wglDXUnlockObjectsNV);
  1.1048 +            GLELoadProc(wglDXUnregisterObjectNV_Impl, wglDXUnregisterObjectNV);
  1.1049 +
  1.1050 +        #elif defined(GLE_GLX_ENABLED)
  1.1051 +            // GLX_VERSION_1_1
  1.1052 +            // We don't create any pointers_Impl, because we assume these functions are always present.
  1.1053 +        
  1.1054 +            // GLX_VERSION_1_2
  1.1055 +            GLELoadProc(glXGetCurrentDisplay_Impl, glXGetCurrentDisplay);
  1.1056 +
  1.1057 +            // GLX_VERSION_1_3
  1.1058 +            GLELoadProc(glXChooseFBConfig_Impl, glXChooseFBConfig);
  1.1059 +            GLELoadProc(glXCreateNewContext_Impl, glXCreateNewContext);
  1.1060 +            GLELoadProc(glXCreatePbuffer_Impl, glXCreatePbuffer);
  1.1061 +            GLELoadProc(glXCreatePixmap_Impl, glXCreatePixmap);
  1.1062 +            GLELoadProc(glXCreateWindow_Impl, glXCreateWindow);
  1.1063 +            GLELoadProc(glXDestroyPbuffer_Impl, glXDestroyPbuffer);
  1.1064 +            GLELoadProc(glXDestroyPixmap_Impl, glXDestroyPixmap);
  1.1065 +            GLELoadProc(glXDestroyWindow_Impl, glXDestroyWindow);
  1.1066 +            GLELoadProc(glXGetCurrentReadDrawable_Impl, glXGetCurrentReadDrawable);
  1.1067 +            GLELoadProc(glXGetFBConfigAttrib_Impl, glXGetFBConfigAttrib);
  1.1068 +            GLELoadProc(glXGetFBConfigs_Impl, glXGetFBConfigs);
  1.1069 +            GLELoadProc(glXGetSelectedEvent_Impl, glXGetSelectedEvent);
  1.1070 +            GLELoadProc(glXGetVisualFromFBConfig_Impl, glXGetVisualFromFBConfig);
  1.1071 +            GLELoadProc(glXMakeContextCurrent_Impl, glXMakeContextCurrent);
  1.1072 +            GLELoadProc(glXQueryContext_Impl, glXQueryContext);
  1.1073 +            GLELoadProc(glXQueryDrawable_Impl, glXQueryDrawable);
  1.1074 +            GLELoadProc(glXSelectEvent_Impl, glXSelectEvent);
  1.1075 +
  1.1076 +            // GLX_VERSION_1_4
  1.1077 +            // Nothing to declare
  1.1078 +        
  1.1079 +            // GLX_ARB_create_context
  1.1080 +            GLELoadProc(glXCreateContextAttribsARB_Impl, glXCreateContextAttribsARB);
  1.1081 +
  1.1082 +            // GLX_EXT_swap_control
  1.1083 +            GLELoadProc(glXSwapIntervalEXT_Impl, glXSwapIntervalEXT);
  1.1084 + 
  1.1085 +            // GLX_OML_sync_control
  1.1086 +            GLELoadProc(glXGetMscRateOML_Impl, glXGetMscRateOML);
  1.1087 +            GLELoadProc(glXGetSyncValuesOML_Impl, glXGetSyncValuesOML);
  1.1088 +            GLELoadProc(glXGetSyncValuesOML_Impl, glXSwapBuffersMscOML);
  1.1089 +            GLELoadProc(glXSwapBuffersMscOML_Impl, glXSwapBuffersMscOML);
  1.1090 +            GLELoadProc(glXWaitForSbcOML_Impl, glXWaitForSbcOML);
  1.1091 +
  1.1092 +            // GLX_MESA_swap_control
  1.1093 +            GLELoadProc(glXGetSwapIntervalMESA_Impl, glXGetSwapIntervalMESA);
  1.1094 +            GLELoadProc(glXSwapIntervalMESA_Impl, glXSwapIntervalMESA);
  1.1095 +        #endif
  1.1096 +    }
  1.1097 +
  1.1098 +
  1.1099 +    void OVR::GLEContext::InitPlatformExtensionSupport()
  1.1100 +    {
  1.1101 +        #if defined(GLE_WGL_ENABLED)
  1.1102 +            // We need to use wglGetExtensionsStringARB or wglGetExtensionsStringEXT as opposed to above with glGetString(GL_EXTENSIONS).
  1.1103 +            ValueStringPair vspWGLArray[] =
  1.1104 +            {
  1.1105 +                 { gle_WGL_ARB_buffer_region, "WGL_ARB_buffer_region" }
  1.1106 +                ,{ gle_WGL_ARB_create_context, "WGL_ARB_create_context" }
  1.1107 +                ,{ gle_WGL_ARB_create_context_profile, "WGL_ARB_create_context_profile" }
  1.1108 +                ,{ gle_WGL_ARB_create_context_robustness, "WGL_ARB_create_context_robustness" }
  1.1109 +                ,{ gle_WGL_ARB_extensions_string, "WGL_ARB_extensions_string" }
  1.1110 +                ,{ gle_WGL_ARB_framebuffer_sRGB, "WGL_ARB_framebuffer_sRGB" }
  1.1111 +                ,{ gle_WGL_ARB_framebuffer_sRGB, "WGL_EXT_framebuffer_sRGB" }    // We map the EXT to the ARB.
  1.1112 +                ,{ gle_WGL_ARB_make_current_read, "WGL_ARB_make_current_read" }
  1.1113 +                ,{ gle_WGL_ARB_pbuffer, "WGL_ARB_pbuffer" }
  1.1114 +                ,{ gle_WGL_ARB_pixel_format, "WGL_ARB_pixel_format" }
  1.1115 +                ,{ gle_WGL_ARB_pixel_format_float, "WGL_ARB_pixel_format_float" }
  1.1116 +                ,{ gle_WGL_ARB_render_texture, "WGL_ARB_render_texture" }
  1.1117 +                ,{ gle_WGL_ATI_render_texture_rectangle, "WGL_ATI_render_texture_rectangle" }
  1.1118 +                ,{ gle_WGL_EXT_extensions_string, "WGL_EXT_extensions_string" }
  1.1119 +                ,{ gle_WGL_EXT_swap_control, "WGL_EXT_swap_control" }
  1.1120 +                ,{ gle_WGL_NV_copy_image, "WGL_NV_copy_image" }
  1.1121 +                ,{ gle_WGL_NV_DX_interop, "WGL_NV_DX_interop" }
  1.1122 +                ,{ gle_WGL_NV_DX_interop2, "WGL_NV_DX_interop2" }
  1.1123 +                ,{ gle_WGL_NV_present_video, "WGL_NV_present_video" }
  1.1124 +                ,{ gle_WGL_NV_render_texture_rectangle, "WGL_NV_render_texture_rectangle" }
  1.1125 +                ,{ gle_WGL_NV_swap_group, "WGL_NV_swap_group" }
  1.1126 +                ,{ gle_WGL_NV_video_capture, "WGL_NV_video_capture" }
  1.1127 +                ,{ gle_WGL_NV_video_output, "WGL_NV_video_output" }
  1.1128 +                ,{ gle_WGL_OML_sync_control, "WGL_OML_sync_control" }
  1.1129 +            };
  1.1130 +
  1.1131 +            const char* extensions = NULL;
  1.1132 +
  1.1133 +            if(wglGetExtensionsStringARB_Impl)
  1.1134 +                extensions = wglGetExtensionsStringARB_Impl(wglGetCurrentDC()); // To do: Use a better mechanism to get the desired HDC.
  1.1135 +            else if(wglGetExtensionsStringEXT_Impl)
  1.1136 +                extensions = wglGetExtensionsStringEXT_Impl();
  1.1137 +
  1.1138 +            if (extensions && *extensions)
  1.1139 +            {
  1.1140 +                OVR_DEBUG_LOG(("WGL_EXTENSIONS: %s", (const char*)extensions));
  1.1141 +                CheckExtensions(vspWGLArray, OVR_ARRAY_COUNT(vspWGLArray), extensions);
  1.1142 +            }
  1.1143 +
  1.1144 +        #elif defined(GLE_GLX_ENABLED)
  1.1145 +            ValueStringPair vspGLXArray[] =
  1.1146 +            {
  1.1147 +                 { gle_GLX_ARB_create_context,            "GLX_ARB_create_context" }
  1.1148 +                ,{ gle_GLX_ARB_create_context_profile,    "GLX_ARB_create_context_profile" }
  1.1149 +                ,{ gle_GLX_ARB_create_context_robustness, "GLX_ARB_create_context_robustness" }
  1.1150 +                ,{ gle_GLX_EXT_swap_control,              "GLX_EXT_swap_control" }
  1.1151 +                ,{ gle_GLX_OML_sync_control,              "GLX_OML_sync_control" }
  1.1152 +                ,{ gle_MESA_swap_control,                 "GLX_MESA_swap_control" }
  1.1153 +            };
  1.1154 +
  1.1155 +            const char* extensions = glXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS); // To do: Use a better mechanism to get the desired display.
  1.1156 +
  1.1157 +            if (extensions && *extensions)
  1.1158 +            {
  1.1159 +                OVR_DEBUG_LOG(("GLX_EXTENSIONS: %s", (const char*)extensions));
  1.1160 +                CheckExtensions(vspGLXArray, OVR_ARRAY_COUNT(vspGLXArray), extensions);
  1.1161 +            }
  1.1162 +        #endif
  1.1163 +    }
  1.1164 +
  1.1165 +
  1.1166 +    #if defined(GLE_HOOKING_ENABLED)
  1.1167 +
  1.1168 +        #undef glGetError
  1.1169 +        extern "C" { GLAPI GLenum GLAPIENTRY glGetError(); }
  1.1170 +
  1.1171 +        // Disabled until such time as it might be useful to enable for debug purposes.
  1.1172 +        //void OVR::GLEContext::PreHook(const char* functionName)
  1.1173 +        //{
  1.1174 +        //    if(EnableHookGetError)
  1.1175 +        //    {
  1.1176 +        //        int err = glGetError();
  1.1177 +        //
  1.1178 +        //        for(int i = 0; (i < 6) && (err != GL_NO_ERROR); i++) // 6 is an arbitrary cap to prevent infinite looping which would occur if the current GL context is invalid.
  1.1179 +        //        {
  1.1180 +        //            OVR_DEBUG_LOG(("GL Error prior to hook: %d (%#x) from %s", err, err, functionName ? functionName : "OpenGL")); OVR_UNUSED(functionName);
  1.1181 +        //            err = glGetError();
  1.1182 +        //        }
  1.1183 +        //    }
  1.1184 +        //}
  1.1185 +
  1.1186 +        void OVR::GLEContext::PostHook(const char* functionName)
  1.1187 +        {
  1.1188 +            if(EnableHookGetError)
  1.1189 +            {
  1.1190 +                // OpenGL Standard regarding error state: To allow for distributed implementations, there may be several error flags. If any single error flag has recorded an error, the value of that flag 
  1.1191 +                // is returned and that flag is reset to GL_NO_ERROR when glGetError is called. If more than one flag has recorded an error, glGetError returns and 
  1.1192 +                // clears an arbitrary error flag value. Thus, glGetError should always be called in a loop, until it returns GL_NO_ERROR, if all error flags are to be reset.
  1.1193 +                int err = glGetError();
  1.1194 +
  1.1195 +                for(int i = 0; (i < 6) && (err != GL_NO_ERROR); i++) // 6 is an arbitrary cap to prevent infinite looping which would occur if the current GL context is invalid.
  1.1196 +                {
  1.1197 +                    OVR_DEBUG_LOG(("GL Error: %d (%#x) from %s", err, err, functionName ? functionName : "OpenGL")); OVR_UNUSED(functionName);
  1.1198 +                    err = glGetError();
  1.1199 +                }
  1.1200 +            }
  1.1201 +        }
  1.1202 +
  1.1203 +
  1.1204 +        // OpenGL 1.1 link-based functions
  1.1205 +        #undef glAccum // Undefine the macro from our header so that we can directly call the real version of this function.
  1.1206 +        extern "C" { GLAPI void GLAPIENTRY glAccum(GLenum op, GLfloat value); }
  1.1207 +        void OVR::GLEContext::glAccum_Hook(GLenum op, GLfloat value)
  1.1208 +        {
  1.1209 +            glAccum(op, value);
  1.1210 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1211 +        }
  1.1212 +
  1.1213 +        #undef glAlphaFunc
  1.1214 +        extern "C" { GLAPI void GLAPIENTRY glAlphaFunc(GLenum func, GLclampf ref); }
  1.1215 +        void OVR::GLEContext::glAlphaFunc_Hook(GLenum func, GLclampf ref)
  1.1216 +        {
  1.1217 +            glAlphaFunc(func, ref);
  1.1218 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1219 +        }
  1.1220 +
  1.1221 +        #undef glAreTexturesResident
  1.1222 +        extern "C" { GLAPI GLboolean GLAPIENTRY glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences); }
  1.1223 +        GLboolean OVR::GLEContext::glAreTexturesResident_Hook(GLsizei n, const GLuint *textures, GLboolean *residences)
  1.1224 +        {
  1.1225 +            GLboolean b = glAreTexturesResident(n, textures, residences);
  1.1226 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1227 +            return b;
  1.1228 +        }
  1.1229 +
  1.1230 +        #undef glArrayElement
  1.1231 +        extern "C" { GLAPI void GLAPIENTRY glArrayElement(GLint i); }
  1.1232 +        void OVR::GLEContext::glArrayElement_Hook(GLint i)
  1.1233 +        {
  1.1234 +            glArrayElement(i);
  1.1235 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1236 +        }
  1.1237 +
  1.1238 +        #undef glBegin
  1.1239 +        extern "C" { GLAPI void GLAPIENTRY glBegin(GLenum mode); }
  1.1240 +        void OVR::GLEContext::glBegin_Hook(GLenum mode)
  1.1241 +        {
  1.1242 +            glBegin(mode);
  1.1243 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1244 +        }
  1.1245 +
  1.1246 +        #undef glBindTexture
  1.1247 +        extern "C" { GLAPI void GLAPIENTRY glBindTexture(GLenum target, GLuint texture); }
  1.1248 +        void OVR::GLEContext::glBindTexture_Hook(GLenum target, GLuint texture)
  1.1249 +        {
  1.1250 +            glBindTexture(target, texture);
  1.1251 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1252 +        }
  1.1253 +
  1.1254 +        #undef glBitmap
  1.1255 +        extern "C" { GLAPI void GLAPIENTRY glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); }
  1.1256 +        void OVR::GLEContext::glBitmap_Hook(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
  1.1257 +        {
  1.1258 +            glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap);
  1.1259 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1260 +        }
  1.1261 +
  1.1262 +        #undef glBlendFunc
  1.1263 +        extern "C" { GLAPI void GLAPIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor); }
  1.1264 +        void OVR::GLEContext::glBlendFunc_Hook(GLenum sfactor, GLenum dfactor)
  1.1265 +        {
  1.1266 +            glBlendFunc(sfactor, dfactor);
  1.1267 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1268 +        }
  1.1269 +
  1.1270 +        #undef glCallList
  1.1271 +        extern "C" { GLAPI void GLAPIENTRY glCallList(GLuint list); }
  1.1272 +        void OVR::GLEContext::glCallList_Hook(GLuint list)
  1.1273 +        {
  1.1274 +            glCallList(list);
  1.1275 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1276 +        }
  1.1277 +
  1.1278 +        #undef glCallLists
  1.1279 +        extern "C" { GLAPI void GLAPIENTRY glCallLists(GLsizei n, GLenum type, const void *lists); }
  1.1280 +        void OVR::GLEContext::glCallLists_Hook(GLsizei n, GLenum type, const void *lists)
  1.1281 +        {
  1.1282 +            glCallLists(n, type, lists);
  1.1283 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1284 +        }
  1.1285 +
  1.1286 +        #undef glClear
  1.1287 +        extern "C" { GLAPI void GLAPIENTRY glClear(GLbitfield mask); }
  1.1288 +        void OVR::GLEContext::glClear_Hook(GLbitfield mask)
  1.1289 +        {
  1.1290 +            glClear(mask);
  1.1291 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1292 +        }
  1.1293 +
  1.1294 +        #undef glClearAccum
  1.1295 +        extern "C" { GLAPI void GLAPIENTRY glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); }
  1.1296 +        void OVR::GLEContext::glClearAccum_Hook(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
  1.1297 +        {
  1.1298 +            glClearAccum(red, green, blue, alpha);
  1.1299 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1300 +        }
  1.1301 +
  1.1302 +        #undef glClearColor
  1.1303 +        extern "C" { GLAPI void GLAPIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); }
  1.1304 +        void OVR::GLEContext::glClearColor_Hook(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
  1.1305 +        {
  1.1306 +            glClearColor(red, green, blue, alpha);
  1.1307 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1308 +        }
  1.1309 +
  1.1310 +        #undef glClearDepth
  1.1311 +        extern "C" { GLAPI void GLAPIENTRY glClearDepth(GLclampd depth); }
  1.1312 +        void OVR::GLEContext::glClearDepth_Hook(GLclampd depth)
  1.1313 +        {
  1.1314 +            glClearDepth(depth);
  1.1315 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1316 +        }
  1.1317 +
  1.1318 +        #undef glClearIndex
  1.1319 +        extern "C" { GLAPI void GLAPIENTRY glClearIndex(GLfloat c); }
  1.1320 +        void OVR::GLEContext::glClearIndex_Hook(GLfloat c)
  1.1321 +        {
  1.1322 +            glClearIndex(c);
  1.1323 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1324 +        }
  1.1325 +
  1.1326 +        #undef glClearStencil
  1.1327 +        extern "C" { GLAPI void GLAPIENTRY glClearStencil(GLint s); }
  1.1328 +        void OVR::GLEContext::glClearStencil_Hook(GLint s)
  1.1329 +        {
  1.1330 +            glClearStencil(s);
  1.1331 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1332 +        }
  1.1333 +
  1.1334 +        #undef glClipPlane
  1.1335 +        extern "C" { GLAPI void GLAPIENTRY glClipPlane(GLenum plane, const GLdouble *equation); }
  1.1336 +        void OVR::GLEContext::glClipPlane_Hook(GLenum plane, const GLdouble *equation)
  1.1337 +        {
  1.1338 +            glClipPlane(plane, equation);
  1.1339 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1340 +        }
  1.1341 +
  1.1342 +        #undef glColor3b
  1.1343 +        extern "C" { GLAPI void GLAPIENTRY glColor3b(GLbyte red, GLbyte green, GLbyte blue); }
  1.1344 +        void OVR::GLEContext::glColor3b_Hook(GLbyte red, GLbyte green, GLbyte blue)
  1.1345 +        {
  1.1346 +            glColor3b(red, green, blue);
  1.1347 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1348 +        }
  1.1349 +
  1.1350 +        #undef glColor3bv
  1.1351 +        extern "C" { GLAPI void GLAPIENTRY glColor3bv(const GLbyte *v); }
  1.1352 +        void OVR::GLEContext::glColor3bv_Hook(const GLbyte *v)
  1.1353 +        {
  1.1354 +            glColor3bv(v);
  1.1355 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1356 +        }
  1.1357 +
  1.1358 +        #undef glColor3d
  1.1359 +        extern "C" { GLAPI void GLAPIENTRY glColor3d(GLdouble red, GLdouble green, GLdouble blue); }
  1.1360 +        void OVR::GLEContext::glColor3d_Hook(GLdouble red, GLdouble green, GLdouble blue)
  1.1361 +        {
  1.1362 +            glColor3d(red, green, blue);
  1.1363 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1364 +        }
  1.1365 +
  1.1366 +        #undef glColor3dv
  1.1367 +        extern "C" { GLAPI void GLAPIENTRY glColor3dv(const GLdouble *v); }
  1.1368 +        void OVR::GLEContext::glColor3dv_Hook(const GLdouble *v)
  1.1369 +        {
  1.1370 +            glColor3dv(v);
  1.1371 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1372 +        }
  1.1373 +
  1.1374 +        #undef glColor3f
  1.1375 +        extern "C" { GLAPI void GLAPIENTRY glColor3f(GLfloat red, GLfloat green, GLfloat blue); }
  1.1376 +        void OVR::GLEContext::glColor3f_Hook(GLfloat red, GLfloat green, GLfloat blue)
  1.1377 +        {
  1.1378 +            glColor3f(red, green, blue);
  1.1379 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1380 +        }
  1.1381 +
  1.1382 +        #undef glColor3fv
  1.1383 +        extern "C" { GLAPI void GLAPIENTRY glColor3fv(const GLfloat *v); }
  1.1384 +        void OVR::GLEContext::glColor3fv_Hook(const GLfloat *v)
  1.1385 +        {
  1.1386 +            glColor3fv(v);
  1.1387 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1388 +        }
  1.1389 +
  1.1390 +        #undef glColor3i
  1.1391 +        extern "C" { GLAPI void GLAPIENTRY glColor3i(GLint red, GLint green, GLint blue); }
  1.1392 +        void OVR::GLEContext::glColor3i_Hook(GLint red, GLint green, GLint blue)
  1.1393 +        {
  1.1394 +            glColor3i(red, green, blue);
  1.1395 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1396 +        }
  1.1397 +
  1.1398 +        #undef glColor3iv
  1.1399 +        extern "C" { GLAPI void GLAPIENTRY glColor3iv(const GLint *v); }
  1.1400 +        void OVR::GLEContext::glColor3iv_Hook(const GLint *v)
  1.1401 +        {
  1.1402 +            glColor3iv(v);
  1.1403 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1404 +        }
  1.1405 +
  1.1406 +        #undef glColor3s
  1.1407 +        extern "C" { GLAPI void GLAPIENTRY glColor3s(GLshort red, GLshort green, GLshort blue); }
  1.1408 +        void OVR::GLEContext::glColor3s_Hook(GLshort red, GLshort green, GLshort blue)
  1.1409 +        {
  1.1410 +            glColor3s(red, green, blue);
  1.1411 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1412 +        }
  1.1413 +
  1.1414 +        #undef glColor3sv
  1.1415 +        extern "C" { GLAPI void GLAPIENTRY glColor3sv(const GLshort *v); }
  1.1416 +        void OVR::GLEContext::glColor3sv_Hook(const GLshort *v)
  1.1417 +        {
  1.1418 +            glColor3sv(v);
  1.1419 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1420 +        }
  1.1421 +
  1.1422 +        #undef glColor3ub
  1.1423 +        extern "C" { GLAPI void GLAPIENTRY glColor3ub(GLubyte red, GLubyte green, GLubyte blue); }
  1.1424 +        void OVR::GLEContext::glColor3ub_Hook(GLubyte red, GLubyte green, GLubyte blue)
  1.1425 +        {
  1.1426 +            glColor3ub(red, green, blue);
  1.1427 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1428 +        }
  1.1429 +
  1.1430 +        #undef glColor3ubv
  1.1431 +        extern "C" { GLAPI void GLAPIENTRY glColor3ubv(const GLubyte *v); }
  1.1432 +        void OVR::GLEContext::glColor3ubv_Hook(const GLubyte *v)
  1.1433 +        {
  1.1434 +            glColor3ubv(v);
  1.1435 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1436 +        }
  1.1437 +
  1.1438 +        #undef glColor3ui
  1.1439 +        extern "C" { GLAPI void GLAPIENTRY glColor3ui(GLuint red, GLuint green, GLuint blue); }
  1.1440 +        void OVR::GLEContext::glColor3ui_Hook(GLuint red, GLuint green, GLuint blue)
  1.1441 +        {
  1.1442 +            glColor3ui(red, green, blue);
  1.1443 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1444 +        }
  1.1445 +
  1.1446 +        #undef glColor3uiv
  1.1447 +        extern "C" { GLAPI void GLAPIENTRY glColor3uiv(const GLuint *v); }
  1.1448 +        void OVR::GLEContext::glColor3uiv_Hook(const GLuint *v)
  1.1449 +        {
  1.1450 +            glColor3uiv(v);
  1.1451 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1452 +        }
  1.1453 +
  1.1454 +        #undef glColor3us
  1.1455 +        extern "C" { GLAPI void GLAPIENTRY glColor3us(GLushort red, GLushort green, GLushort blue); }
  1.1456 +        void OVR::GLEContext::glColor3us_Hook(GLushort red, GLushort green, GLushort blue)
  1.1457 +        {
  1.1458 +            glColor3us(red, green, blue);
  1.1459 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1460 +        }
  1.1461 +
  1.1462 +        #undef glColor3usv
  1.1463 +        extern "C" { GLAPI void GLAPIENTRY glColor3usv(const GLushort *v); }
  1.1464 +        void OVR::GLEContext::glColor3usv_Hook(const GLushort *v)
  1.1465 +        {
  1.1466 +            glColor3usv(v);
  1.1467 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1468 +        }
  1.1469 +
  1.1470 +        #undef glColor4b
  1.1471 +        extern "C" { GLAPI void GLAPIENTRY glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); }
  1.1472 +        void OVR::GLEContext::glColor4b_Hook(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
  1.1473 +        {
  1.1474 +            glColor4b(red, green, blue, alpha);
  1.1475 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1476 +        }
  1.1477 +
  1.1478 +        #undef glColor4bv
  1.1479 +        extern "C" { GLAPI void GLAPIENTRY glColor4bv(const GLbyte *v); }
  1.1480 +        void OVR::GLEContext::glColor4bv_Hook(const GLbyte *v)
  1.1481 +        {
  1.1482 +            glColor4bv(v);
  1.1483 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1484 +        }
  1.1485 +
  1.1486 +        #undef glColor4d
  1.1487 +        extern "C" { GLAPI void GLAPIENTRY glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); }
  1.1488 +        void OVR::GLEContext::glColor4d_Hook(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
  1.1489 +        {
  1.1490 +            glColor4d(red, green, blue, alpha);
  1.1491 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1492 +        }
  1.1493 +
  1.1494 +        #undef glColor4dv
  1.1495 +        extern "C" { GLAPI void GLAPIENTRY glColor4dv(const GLdouble *v); }
  1.1496 +        void OVR::GLEContext::glColor4dv_Hook(const GLdouble *v)
  1.1497 +        {
  1.1498 +            glColor4dv(v);
  1.1499 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1500 +        }
  1.1501 +
  1.1502 +        #undef glColor4f
  1.1503 +        extern "C" { GLAPI void GLAPIENTRY glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); }
  1.1504 +        void OVR::GLEContext::glColor4f_Hook(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
  1.1505 +        {
  1.1506 +            glColor4f(red, green, blue, alpha);
  1.1507 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1508 +        }
  1.1509 +
  1.1510 +        #undef glColor4fv
  1.1511 +        extern "C" { GLAPI void GLAPIENTRY glColor4fv(const GLfloat *v); }
  1.1512 +        void OVR::GLEContext::glColor4fv_Hook(const GLfloat *v)
  1.1513 +        {
  1.1514 +            glColor4fv(v);
  1.1515 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1516 +        }
  1.1517 +
  1.1518 +        #undef glColor4i
  1.1519 +        extern "C" { GLAPI void GLAPIENTRY glColor4i(GLint red, GLint green, GLint blue, GLint alpha); }
  1.1520 +        void OVR::GLEContext::glColor4i_Hook(GLint red, GLint green, GLint blue, GLint alpha)
  1.1521 +        {
  1.1522 +            glColor4i(red, green, blue, alpha);
  1.1523 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1524 +        }
  1.1525 +
  1.1526 +        #undef glColor4iv
  1.1527 +        extern "C" { GLAPI void GLAPIENTRY glColor4iv(const GLint *v); }
  1.1528 +        void OVR::GLEContext::glColor4iv_Hook(const GLint *v)
  1.1529 +        {
  1.1530 +            glColor4iv(v);
  1.1531 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1532 +        }
  1.1533 +
  1.1534 +        #undef glColor4s
  1.1535 +        extern "C" { GLAPI void GLAPIENTRY glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha); }
  1.1536 +        void OVR::GLEContext::glColor4s_Hook(GLshort red, GLshort green, GLshort blue, GLshort alpha)
  1.1537 +        {
  1.1538 +            glColor4s(red, green, blue, alpha);
  1.1539 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1540 +        }
  1.1541 +
  1.1542 +        #undef glColor4sv
  1.1543 +        extern "C" { GLAPI void GLAPIENTRY glColor4sv(const GLshort *v); }
  1.1544 +        void OVR::GLEContext::glColor4sv_Hook(const GLshort *v)
  1.1545 +        {
  1.1546 +            glColor4sv(v);
  1.1547 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1548 +        }
  1.1549 +
  1.1550 +        #undef glColor4ub
  1.1551 +        extern "C" { GLAPI void GLAPIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); }
  1.1552 +        void OVR::GLEContext::glColor4ub_Hook(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
  1.1553 +        {
  1.1554 +            glColor4ub(red, green, blue, alpha);
  1.1555 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1556 +        }
  1.1557 +
  1.1558 +        #undef glColor4ubv
  1.1559 +        extern "C" { GLAPI void GLAPIENTRY glColor4ubv(const GLubyte *v); }
  1.1560 +        void OVR::GLEContext::glColor4ubv_Hook(const GLubyte *v)
  1.1561 +        {
  1.1562 +            glColor4ubv(v);
  1.1563 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1564 +        }
  1.1565 +
  1.1566 +        #undef glColor4ui
  1.1567 +        extern "C" { GLAPI void GLAPIENTRY glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha); }
  1.1568 +        void OVR::GLEContext::glColor4ui_Hook(GLuint red, GLuint green, GLuint blue, GLuint alpha)
  1.1569 +        {
  1.1570 +            glColor4ui(red, green, blue, alpha);
  1.1571 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1572 +        }
  1.1573 +
  1.1574 +        #undef glColor4uiv
  1.1575 +        extern "C" { GLAPI void GLAPIENTRY glColor4uiv(const GLuint *v); }
  1.1576 +        void OVR::GLEContext::glColor4uiv_Hook(const GLuint *v)
  1.1577 +        {
  1.1578 +            glColor4uiv(v);
  1.1579 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1580 +        }
  1.1581 +
  1.1582 +        #undef glColor4us
  1.1583 +        extern "C" { GLAPI void GLAPIENTRY glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha); }
  1.1584 +        void OVR::GLEContext::glColor4us_Hook(GLushort red, GLushort green, GLushort blue, GLushort alpha)
  1.1585 +        {
  1.1586 +            glColor4us(red, green, blue, alpha);
  1.1587 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1588 +        }
  1.1589 +
  1.1590 +        #undef glColor4usv
  1.1591 +        extern "C" { GLAPI void GLAPIENTRY glColor4usv(const GLushort *v); }
  1.1592 +        void OVR::GLEContext::glColor4usv_Hook(const GLushort *v)
  1.1593 +        {
  1.1594 +            glColor4usv(v);
  1.1595 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1596 +        }
  1.1597 +
  1.1598 +        #undef glColorMask
  1.1599 +        extern "C" { GLAPI void GLAPIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); }
  1.1600 +        void OVR::GLEContext::glColorMask_Hook(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
  1.1601 +        {
  1.1602 +            glColorMask(red, green, blue, alpha);
  1.1603 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1604 +        }
  1.1605 +
  1.1606 +        #undef glColorMaterial
  1.1607 +        extern "C" { GLAPI void GLAPIENTRY glColorMaterial(GLenum face, GLenum mode); }
  1.1608 +        void OVR::GLEContext::glColorMaterial_Hook(GLenum face, GLenum mode)
  1.1609 +        {
  1.1610 +            glColorMaterial(face, mode);
  1.1611 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1612 +        }
  1.1613 +
  1.1614 +        #undef glColorPointer
  1.1615 +        extern "C" { GLAPI void GLAPIENTRY glColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer); }
  1.1616 +        void OVR::GLEContext::glColorPointer_Hook(GLint size, GLenum type, GLsizei stride, const void *pointer)
  1.1617 +        {
  1.1618 +            glColorPointer(size, type, stride, pointer);
  1.1619 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1620 +        }
  1.1621 +
  1.1622 +        #undef glCopyPixels
  1.1623 +        extern "C" { GLAPI void GLAPIENTRY glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); }
  1.1624 +        void OVR::GLEContext::glCopyPixels_Hook(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
  1.1625 +        {
  1.1626 +            glCopyPixels(x, y, width, height, type);
  1.1627 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1628 +        }
  1.1629 +
  1.1630 +        #undef glCopyTexImage1D
  1.1631 +        extern "C" { GLAPI void GLAPIENTRY glCopyTexImage1D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border); }
  1.1632 +        void OVR::GLEContext::glCopyTexImage1D_Hook(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border)
  1.1633 +        {
  1.1634 +            glCopyTexImage1D(target, level, internalFormat, x, y, width, border);
  1.1635 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1636 +        }
  1.1637 +
  1.1638 +        #undef glCopyTexImage2D
  1.1639 +        extern "C" { GLAPI void GLAPIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); }
  1.1640 +        void OVR::GLEContext::glCopyTexImage2D_Hook(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
  1.1641 +        {
  1.1642 +            glCopyTexImage2D(target, level, internalFormat, x, y, width, height, border);
  1.1643 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1644 +        }
  1.1645 +
  1.1646 +        #undef glCopyTexSubImage1D
  1.1647 +        extern "C" { GLAPI void GLAPIENTRY glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); }
  1.1648 +        void OVR::GLEContext::glCopyTexSubImage1D_Hook(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
  1.1649 +        {
  1.1650 +            glCopyTexSubImage1D(target, level, xoffset, x, y, width);
  1.1651 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1652 +        }
  1.1653 +
  1.1654 +        #undef glCopyTexSubImage2D
  1.1655 +        extern "C" { GLAPI void GLAPIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); }
  1.1656 +        void OVR::GLEContext::glCopyTexSubImage2D_Hook(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
  1.1657 +        {
  1.1658 +            glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
  1.1659 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1660 +        }
  1.1661 +
  1.1662 +        #undef glCullFace
  1.1663 +        extern "C" { GLAPI void GLAPIENTRY glCullFace(GLenum mode); }
  1.1664 +        void OVR::GLEContext::glCullFace_Hook(GLenum mode)
  1.1665 +        {
  1.1666 +            glCullFace(mode);
  1.1667 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1668 +        }
  1.1669 +
  1.1670 +        #undef glDeleteLists
  1.1671 +        extern "C" { GLAPI void GLAPIENTRY glDeleteLists(GLuint list, GLsizei range); }
  1.1672 +        void OVR::GLEContext::glDeleteLists_Hook(GLuint list, GLsizei range)
  1.1673 +        {
  1.1674 +            glDeleteLists(list, range);
  1.1675 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1676 +        }
  1.1677 +
  1.1678 +        #undef glDeleteTextures
  1.1679 +        extern "C" { GLAPI void GLAPIENTRY glDeleteTextures(GLsizei n, const GLuint *textures); }
  1.1680 +        void OVR::GLEContext::glDeleteTextures_Hook(GLsizei n, const GLuint *textures)
  1.1681 +        {
  1.1682 +            glDeleteTextures(n, textures);
  1.1683 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1684 +        }
  1.1685 +
  1.1686 +        #undef glDepthFunc
  1.1687 +        extern "C" { GLAPI void GLAPIENTRY glDepthFunc(GLenum func); }
  1.1688 +        void OVR::GLEContext::glDepthFunc_Hook(GLenum func)
  1.1689 +        {
  1.1690 +            glDepthFunc(func);
  1.1691 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1692 +        }
  1.1693 +
  1.1694 +        #undef glDepthMask
  1.1695 +        extern "C" { GLAPI void GLAPIENTRY glDepthMask(GLboolean flag); }
  1.1696 +        void OVR::GLEContext::glDepthMask_Hook(GLboolean flag)
  1.1697 +        {
  1.1698 +            glDepthMask(flag);
  1.1699 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1700 +        }
  1.1701 +
  1.1702 +        #undef glDepthRange
  1.1703 +        extern "C" { GLAPI void GLAPIENTRY glDepthRange(GLclampd zNear, GLclampd zFar); }
  1.1704 +        void OVR::GLEContext::glDepthRange_Hook(GLclampd zNear, GLclampd zFar)
  1.1705 +        {
  1.1706 +            glDepthRange(zNear, zFar);
  1.1707 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1708 +        }
  1.1709 +
  1.1710 +        #undef glDisable
  1.1711 +        extern "C" { GLAPI void GLAPIENTRY glDisable(GLenum cap); }
  1.1712 +        void OVR::GLEContext::glDisable_Hook(GLenum cap)
  1.1713 +        {
  1.1714 +            glDisable(cap);
  1.1715 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1716 +        }
  1.1717 +
  1.1718 +        #undef glDisableClientState
  1.1719 +        extern "C" { GLAPI void GLAPIENTRY glDisableClientState(GLenum array); }
  1.1720 +        void OVR::GLEContext::glDisableClientState_Hook(GLenum array)
  1.1721 +        {
  1.1722 +            glDisableClientState(array);
  1.1723 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1724 +        }
  1.1725 +
  1.1726 +        #undef glDrawArrays
  1.1727 +        extern "C" { GLAPI void GLAPIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count); }
  1.1728 +        void OVR::GLEContext::glDrawArrays_Hook(GLenum mode, GLint first, GLsizei count)
  1.1729 +        {
  1.1730 +            glDrawArrays(mode, first, count);
  1.1731 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1732 +        }
  1.1733 +
  1.1734 +        #undef glDrawBuffer
  1.1735 +        extern "C" { GLAPI void GLAPIENTRY glDrawBuffer(GLenum mode); }
  1.1736 +        void OVR::GLEContext::glDrawBuffer_Hook(GLenum mode)
  1.1737 +        {
  1.1738 +            glDrawBuffer(mode);
  1.1739 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1740 +        }
  1.1741 +
  1.1742 +        #undef glDrawElements
  1.1743 +        extern "C" { GLAPI void GLAPIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices); }
  1.1744 +        void OVR::GLEContext::glDrawElements_Hook(GLenum mode, GLsizei count, GLenum type, const void *indices)
  1.1745 +        {
  1.1746 +            glDrawElements(mode, count, type, indices);
  1.1747 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1748 +        }
  1.1749 +
  1.1750 +        #undef glDrawPixels
  1.1751 +        extern "C" { GLAPI void GLAPIENTRY glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); }
  1.1752 +        void OVR::GLEContext::glDrawPixels_Hook(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
  1.1753 +        {
  1.1754 +            glDrawPixels(width, height, format, type, pixels);
  1.1755 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1756 +        }
  1.1757 +
  1.1758 +        #undef glEdgeFlag
  1.1759 +        extern "C" { GLAPI void GLAPIENTRY glEdgeFlag(GLboolean flag); }
  1.1760 +        void OVR::GLEContext::glEdgeFlag_Hook(GLboolean flag)
  1.1761 +        {
  1.1762 +            glEdgeFlag(flag);
  1.1763 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1764 +        }
  1.1765 +
  1.1766 +        #undef glEdgeFlagPointer
  1.1767 +        extern "C" { GLAPI void GLAPIENTRY glEdgeFlagPointer(GLsizei stride, const void *pointer); }
  1.1768 +        void OVR::GLEContext::glEdgeFlagPointer_Hook(GLsizei stride, const void *pointer)
  1.1769 +        {
  1.1770 +            glEdgeFlagPointer(stride, pointer);
  1.1771 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1772 +        }
  1.1773 +
  1.1774 +        #undef glEdgeFlagv
  1.1775 +        extern "C" { GLAPI void GLAPIENTRY glEdgeFlagv(const GLboolean *flag); }
  1.1776 +        void OVR::GLEContext::glEdgeFlagv_Hook(const GLboolean *flag)
  1.1777 +        {
  1.1778 +            glEdgeFlagv(flag);
  1.1779 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1780 +        }
  1.1781 +
  1.1782 +        #undef glEnable
  1.1783 +        extern "C" { GLAPI void GLAPIENTRY glEnable(GLenum cap); }
  1.1784 +        namespace OVR {
  1.1785 +        void GLEContext::glEnable_Hook(GLenum cap)
  1.1786 +        {
  1.1787 +            glEnable(cap);
  1.1788 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1789 +        }
  1.1790 +        }
  1.1791 +
  1.1792 +        #undef glEnableClientState
  1.1793 +        extern "C" { GLAPI void GLAPIENTRY glEnableClientState(GLenum array); }
  1.1794 +        void OVR::GLEContext::glEnableClientState_Hook(GLenum array)
  1.1795 +        {
  1.1796 +            glEnableClientState(array);
  1.1797 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1798 +        }
  1.1799 +
  1.1800 +        #undef glEnd
  1.1801 +        extern "C" { GLAPI void GLAPIENTRY glEnd(); }
  1.1802 +        void OVR::GLEContext::glEnd_Hook()
  1.1803 +        {
  1.1804 +            glEnd();
  1.1805 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1806 +        }
  1.1807 +
  1.1808 +        #undef glEndList
  1.1809 +        extern "C" { GLAPI void GLAPIENTRY glEndList(); }
  1.1810 +        void OVR::GLEContext::glEndList_Hook()
  1.1811 +        {
  1.1812 +            glEndList();
  1.1813 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1814 +        }
  1.1815 +
  1.1816 +        #undef glEvalCoord1d
  1.1817 +        extern "C" { GLAPI void GLAPIENTRY glEvalCoord1d(GLdouble u); }
  1.1818 +        void OVR::GLEContext::glEvalCoord1d_Hook(GLdouble u)
  1.1819 +        {
  1.1820 +            glEvalCoord1d(u);
  1.1821 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1822 +        }
  1.1823 +
  1.1824 +        #undef glEvalCoord1dv
  1.1825 +        extern "C" { GLAPI void GLAPIENTRY glEvalCoord1dv(const GLdouble *u); }
  1.1826 +        void OVR::GLEContext::glEvalCoord1dv_Hook(const GLdouble *u)
  1.1827 +        {
  1.1828 +            glEvalCoord1dv(u);
  1.1829 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1830 +        }
  1.1831 +
  1.1832 +        #undef glEvalCoord1f
  1.1833 +        extern "C" { GLAPI void GLAPIENTRY glEvalCoord1f(GLfloat u); }
  1.1834 +        void OVR::GLEContext::glEvalCoord1f_Hook(GLfloat u)
  1.1835 +        {
  1.1836 +            glEvalCoord1f(u);
  1.1837 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1838 +        }
  1.1839 +
  1.1840 +        #undef glEvalCoord1fv
  1.1841 +        extern "C" { GLAPI void GLAPIENTRY glEvalCoord1fv(const GLfloat *u); }
  1.1842 +        void OVR::GLEContext::glEvalCoord1fv_Hook(const GLfloat *u)
  1.1843 +        {
  1.1844 +            glEvalCoord1fv(u);
  1.1845 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1846 +        }
  1.1847 +
  1.1848 +        #undef glEvalCoord2d
  1.1849 +        extern "C" { GLAPI void GLAPIENTRY glEvalCoord2d(GLdouble u, GLdouble v); }
  1.1850 +        void OVR::GLEContext::glEvalCoord2d_Hook(GLdouble u, GLdouble v)
  1.1851 +        {
  1.1852 +            glEvalCoord2d(u, v);
  1.1853 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1854 +        }
  1.1855 +
  1.1856 +        #undef glEvalCoord2dv
  1.1857 +        extern "C" { GLAPI void GLAPIENTRY glEvalCoord2dv(const GLdouble *u); }
  1.1858 +        void OVR::GLEContext::glEvalCoord2dv_Hook(const GLdouble *u)
  1.1859 +        {
  1.1860 +            glEvalCoord2dv(u);
  1.1861 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1862 +        }
  1.1863 +
  1.1864 +        #undef glEvalCoord2f
  1.1865 +        extern "C" { GLAPI void GLAPIENTRY glEvalCoord2f(GLfloat u, GLfloat v); }
  1.1866 +        void OVR::GLEContext::glEvalCoord2f_Hook(GLfloat u, GLfloat v)
  1.1867 +        {
  1.1868 +            glEvalCoord2f(u, v);
  1.1869 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1870 +        }
  1.1871 +
  1.1872 +        #undef glEvalCoord2fv
  1.1873 +        extern "C" { GLAPI void GLAPIENTRY glEvalCoord2fv(const GLfloat *u); }
  1.1874 +        void OVR::GLEContext::glEvalCoord2fv_Hook(const GLfloat *u)
  1.1875 +        {
  1.1876 +            glEvalCoord2fv(u);
  1.1877 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1878 +        }
  1.1879 +
  1.1880 +        #undef glEvalMesh1
  1.1881 +        extern "C" { GLAPI void GLAPIENTRY glEvalMesh1(GLenum mode, GLint i1, GLint i2); }
  1.1882 +        void OVR::GLEContext::glEvalMesh1_Hook(GLenum mode, GLint i1, GLint i2)
  1.1883 +        {
  1.1884 +            glEvalMesh1(mode, i1, i2);
  1.1885 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1886 +        }
  1.1887 +
  1.1888 +        #undef glEvalMesh2
  1.1889 +        extern "C" { GLAPI void GLAPIENTRY glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); }
  1.1890 +        void OVR::GLEContext::glEvalMesh2_Hook(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
  1.1891 +        {
  1.1892 +            glEvalMesh2(mode, i1, i2, j1, j2);
  1.1893 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1894 +        }
  1.1895 +
  1.1896 +        #undef glEvalPoint1
  1.1897 +        extern "C" { GLAPI void GLAPIENTRY glEvalPoint1(GLint i); }
  1.1898 +        void OVR::GLEContext::glEvalPoint1_Hook(GLint i)
  1.1899 +        {
  1.1900 +            glEvalPoint1(i);
  1.1901 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1902 +        }
  1.1903 +
  1.1904 +        #undef glEvalPoint2
  1.1905 +        extern "C" { GLAPI void GLAPIENTRY glEvalPoint2(GLint i, GLint j); }
  1.1906 +        void OVR::GLEContext::glEvalPoint2_Hook(GLint i, GLint j)
  1.1907 +        {
  1.1908 +            glEvalPoint2(i, j);
  1.1909 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1910 +        }
  1.1911 +
  1.1912 +        #undef glFeedbackBuffer
  1.1913 +        extern "C" { GLAPI void GLAPIENTRY glFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer); }
  1.1914 +        void OVR::GLEContext::glFeedbackBuffer_Hook(GLsizei size, GLenum type, GLfloat *buffer)
  1.1915 +        {
  1.1916 +            glFeedbackBuffer(size, type, buffer);
  1.1917 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1918 +        }
  1.1919 +
  1.1920 +        #undef glFinish
  1.1921 +        extern "C" { GLAPI void GLAPIENTRY glFinish(); }
  1.1922 +        void OVR::GLEContext::glFinish_Hook()
  1.1923 +        {
  1.1924 +            glFinish();
  1.1925 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1926 +        }
  1.1927 +
  1.1928 +        #undef glFlush
  1.1929 +        extern "C" { GLAPI void GLAPIENTRY glFlush(); }
  1.1930 +        void OVR::GLEContext::glFlush_Hook()
  1.1931 +        {
  1.1932 +            glFlush();
  1.1933 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1934 +        }
  1.1935 +
  1.1936 +        #undef glFogf
  1.1937 +        extern "C" { GLAPI void GLAPIENTRY glFogf(GLenum pname, GLfloat param); }
  1.1938 +        void OVR::GLEContext::glFogf_Hook(GLenum pname, GLfloat param)
  1.1939 +        {
  1.1940 +            glFogf(pname, param);
  1.1941 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1942 +        }
  1.1943 +
  1.1944 +        #undef glFogfv
  1.1945 +        extern "C" { GLAPI void GLAPIENTRY glFogfv(GLenum pname, const GLfloat *params); }
  1.1946 +        void OVR::GLEContext::glFogfv_Hook(GLenum pname, const GLfloat *params)
  1.1947 +        {
  1.1948 +            glFogfv(pname, params);
  1.1949 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1950 +        }
  1.1951 +
  1.1952 +        #undef glFogi
  1.1953 +        extern "C" { GLAPI void GLAPIENTRY glFogi(GLenum pname, GLint param); }
  1.1954 +        void OVR::GLEContext::glFogi_Hook(GLenum pname, GLint param)
  1.1955 +        {
  1.1956 +            glFogi(pname, param);
  1.1957 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1958 +        }
  1.1959 +
  1.1960 +        #undef glFogiv
  1.1961 +        extern "C" { GLAPI void GLAPIENTRY glFogiv(GLenum pname, const GLint *params); }
  1.1962 +        void OVR::GLEContext::glFogiv_Hook(GLenum pname, const GLint *params)
  1.1963 +        {
  1.1964 +            glFogiv(pname, params);
  1.1965 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1966 +        }
  1.1967 +
  1.1968 +        #undef glFrontFace
  1.1969 +        extern "C" { GLAPI void GLAPIENTRY glFrontFace(GLenum mode); }
  1.1970 +        void OVR::GLEContext::glFrontFace_Hook(GLenum mode)
  1.1971 +        {
  1.1972 +            glFrontFace(mode);
  1.1973 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1974 +        }
  1.1975 +
  1.1976 +        #undef glFrustum
  1.1977 +        extern "C" { GLAPI void GLAPIENTRY glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); }
  1.1978 +        void OVR::GLEContext::glFrustum_Hook(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
  1.1979 +        {
  1.1980 +            glFrustum(left, right, bottom, top, zNear, zFar);
  1.1981 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1982 +        }
  1.1983 +
  1.1984 +        #undef glGenLists
  1.1985 +        extern "C" { GLAPI GLuint GLAPIENTRY glGenLists(GLsizei range); }
  1.1986 +        GLuint OVR::GLEContext::glGenLists_Hook(GLsizei range)
  1.1987 +        {
  1.1988 +            GLuint u = glGenLists(range);
  1.1989 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1990 +            return u;
  1.1991 +        }
  1.1992 +
  1.1993 +        #undef glGenTextures
  1.1994 +        extern "C" { GLAPI void GLAPIENTRY glGenTextures(GLsizei n, GLuint *textures); }
  1.1995 +        void OVR::GLEContext::glGenTextures_Hook(GLsizei n, GLuint *textures)
  1.1996 +        {
  1.1997 +            glGenTextures(n, textures);
  1.1998 +            PostHook(GLE_CURRENT_FUNCTION);
  1.1999 +        }
  1.2000 +
  1.2001 +        #undef glGetBooleanv
  1.2002 +        extern "C" { GLAPI void GLAPIENTRY glGetBooleanv(GLenum pname, GLboolean *params); }
  1.2003 +        void OVR::GLEContext::glGetBooleanv_Hook(GLenum pname, GLboolean *params)
  1.2004 +        {
  1.2005 +            glGetBooleanv(pname, params);
  1.2006 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2007 +        }
  1.2008 +
  1.2009 +        #undef glGetClipPlane
  1.2010 +        extern "C" { GLAPI void GLAPIENTRY glGetClipPlane(GLenum plane, GLdouble *equation); }
  1.2011 +        void OVR::GLEContext::glGetClipPlane_Hook(GLenum plane, GLdouble *equation)
  1.2012 +        {
  1.2013 +            glGetClipPlane(plane, equation);
  1.2014 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2015 +        }
  1.2016 +
  1.2017 +        #undef glGetDoublev
  1.2018 +        extern "C" { GLAPI void GLAPIENTRY glGetDoublev(GLenum pname, GLdouble *params); }
  1.2019 +        void OVR::GLEContext::glGetDoublev_Hook(GLenum pname, GLdouble *params)
  1.2020 +        {
  1.2021 +            glGetDoublev(pname, params);
  1.2022 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2023 +        }
  1.2024 +
  1.2025 +        //#undef glGetError Not needed because we happen to do this above already.
  1.2026 +        //extern "C" { GLAPI GLenum GLAPIENTRY glGetError(); }
  1.2027 +        GLenum OVR::GLEContext::glGetError_Hook()
  1.2028 +        {
  1.2029 +            GLenum e = glGetError();
  1.2030 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2031 +            return e;
  1.2032 +        }
  1.2033 +
  1.2034 +        #undef glGetFloatv
  1.2035 +        extern "C" { GLAPI void GLAPIENTRY glGetFloatv(GLenum pname, GLfloat *params); }
  1.2036 +        void OVR::GLEContext::glGetFloatv_Hook(GLenum pname, GLfloat *params)
  1.2037 +        {
  1.2038 +            glGetFloatv(pname, params);
  1.2039 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2040 +        }
  1.2041 +
  1.2042 +        #undef glGetIntegerv
  1.2043 +        extern "C" { GLAPI void GLAPIENTRY glGetIntegerv(GLenum pname, GLint *params); }
  1.2044 +        void OVR::GLEContext::glGetIntegerv_Hook(GLenum pname, GLint *params)
  1.2045 +        {
  1.2046 +            glGetIntegerv(pname, params);
  1.2047 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2048 +        }
  1.2049 +
  1.2050 +        #undef glGetLightfv
  1.2051 +        extern "C" { GLAPI void GLAPIENTRY glGetLightfv(GLenum light, GLenum pname, GLfloat *params); }
  1.2052 +        void OVR::GLEContext::glGetLightfv_Hook(GLenum light, GLenum pname, GLfloat *params)
  1.2053 +        {
  1.2054 +            glGetLightfv(light, pname, params);
  1.2055 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2056 +        }
  1.2057 +
  1.2058 +        #undef glGetLightiv
  1.2059 +        extern "C" { GLAPI void GLAPIENTRY glGetLightiv(GLenum light, GLenum pname, GLint *params); }
  1.2060 +        void OVR::GLEContext::glGetLightiv_Hook(GLenum light, GLenum pname, GLint *params)
  1.2061 +        {
  1.2062 +            glGetLightiv(light, pname, params);
  1.2063 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2064 +        }
  1.2065 +
  1.2066 +        #undef glGetMapdv
  1.2067 +        extern "C" { GLAPI void GLAPIENTRY glGetMapdv(GLenum target, GLenum query, GLdouble *v); }
  1.2068 +        void OVR::GLEContext::glGetMapdv_Hook(GLenum target, GLenum query, GLdouble *v)
  1.2069 +        {
  1.2070 +            glGetMapdv(target, query, v);
  1.2071 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2072 +        }
  1.2073 +
  1.2074 +        #undef glGetMapfv
  1.2075 +        extern "C" { GLAPI void GLAPIENTRY glGetMapfv(GLenum target, GLenum query, GLfloat *v); }
  1.2076 +        void OVR::GLEContext::glGetMapfv_Hook(GLenum target, GLenum query, GLfloat *v)
  1.2077 +        {
  1.2078 +            glGetMapfv(target, query, v);
  1.2079 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2080 +        }
  1.2081 +
  1.2082 +        #undef glGetMapiv
  1.2083 +        extern "C" { GLAPI void GLAPIENTRY glGetMapiv(GLenum target, GLenum query, GLint *v); }
  1.2084 +        void OVR::GLEContext::glGetMapiv_Hook(GLenum target, GLenum query, GLint *v)
  1.2085 +        {
  1.2086 +            glGetMapiv(target, query, v);
  1.2087 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2088 +        }
  1.2089 +
  1.2090 +        #undef glGetMaterialfv
  1.2091 +        extern "C" { GLAPI void GLAPIENTRY glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params); }
  1.2092 +        void OVR::GLEContext::glGetMaterialfv_Hook(GLenum face, GLenum pname, GLfloat *params)
  1.2093 +        {
  1.2094 +            glGetMaterialfv(face, pname, params);
  1.2095 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2096 +        }
  1.2097 +
  1.2098 +        #undef glGetMaterialiv
  1.2099 +        extern "C" { GLAPI void GLAPIENTRY glGetMaterialiv(GLenum face, GLenum pname, GLint *params); }
  1.2100 +        void OVR::GLEContext::glGetMaterialiv_Hook(GLenum face, GLenum pname, GLint *params)
  1.2101 +        {
  1.2102 +            glGetMaterialiv(face, pname, params);
  1.2103 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2104 +        }
  1.2105 +
  1.2106 +        #undef glGetPixelMapfv
  1.2107 +        extern "C" { GLAPI void GLAPIENTRY glGetPixelMapfv(GLenum map, GLfloat *values); }
  1.2108 +        void OVR::GLEContext::glGetPixelMapfv_Hook(GLenum map, GLfloat *values)
  1.2109 +        {
  1.2110 +            glGetPixelMapfv(map, values);
  1.2111 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2112 +        }
  1.2113 +
  1.2114 +        #undef glGetPixelMapuiv
  1.2115 +        extern "C" { GLAPI void GLAPIENTRY glGetPixelMapuiv(GLenum map, GLuint *values); }
  1.2116 +        void OVR::GLEContext::glGetPixelMapuiv_Hook(GLenum map, GLuint *values)
  1.2117 +        {
  1.2118 +            glGetPixelMapuiv(map, values);
  1.2119 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2120 +        }
  1.2121 +
  1.2122 +        #undef glGetPixelMapusv
  1.2123 +        extern "C" { GLAPI void GLAPIENTRY glGetPixelMapusv(GLenum map, GLushort *values); }
  1.2124 +        void OVR::GLEContext::glGetPixelMapusv_Hook(GLenum map, GLushort *values)
  1.2125 +        {
  1.2126 +            glGetPixelMapusv(map, values);
  1.2127 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2128 +        }
  1.2129 +
  1.2130 +        #undef glGetPointerv
  1.2131 +        extern "C" { GLAPI void GLAPIENTRY glGetPointerv(GLenum pname, void* *params); }
  1.2132 +        void OVR::GLEContext::glGetPointerv_Hook(GLenum pname, void* *params)
  1.2133 +        {
  1.2134 +            glGetPointerv(pname, params);
  1.2135 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2136 +        }
  1.2137 +
  1.2138 +        #undef glGetPolygonStipple
  1.2139 +        extern "C" { GLAPI void GLAPIENTRY glGetPolygonStipple(GLubyte *mask); }
  1.2140 +        void OVR::GLEContext::glGetPolygonStipple_Hook(GLubyte *mask)
  1.2141 +        {
  1.2142 +            glGetPolygonStipple(mask);
  1.2143 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2144 +        }
  1.2145 +
  1.2146 +        // #undef glGetString // This was already disabled above.
  1.2147 +        // extern "C" { GLAPI const GLubyte * GLAPIENTRY glGetString(GLenum name); }
  1.2148 +        const GLubyte * OVR::GLEContext::glGetString_Hook(GLenum name)
  1.2149 +        {
  1.2150 +            const GLubyte * p = glGetString(name);
  1.2151 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2152 +            return p;
  1.2153 +        }
  1.2154 +
  1.2155 +        #undef glGetTexEnvfv
  1.2156 +        extern "C" { GLAPI void GLAPIENTRY glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params); }
  1.2157 +        void OVR::GLEContext::glGetTexEnvfv_Hook(GLenum target, GLenum pname, GLfloat *params)
  1.2158 +        {
  1.2159 +            glGetTexEnvfv(target, pname, params);
  1.2160 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2161 +        }
  1.2162 +
  1.2163 +        #undef glGetTexEnviv
  1.2164 +        extern "C" { GLAPI void GLAPIENTRY glGetTexEnviv(GLenum target, GLenum pname, GLint *params); }
  1.2165 +        void OVR::GLEContext::glGetTexEnviv_Hook(GLenum target, GLenum pname, GLint *params)
  1.2166 +        {
  1.2167 +            glGetTexEnviv(target, pname, params);
  1.2168 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2169 +        }
  1.2170 +
  1.2171 +        #undef glGetTexGendv
  1.2172 +        extern "C" { GLAPI void GLAPIENTRY glGetTexGendv(GLenum coord, GLenum pname, GLdouble *params); }
  1.2173 +        void OVR::GLEContext::glGetTexGendv_Hook(GLenum coord, GLenum pname, GLdouble *params)
  1.2174 +        {
  1.2175 +            glGetTexGendv(coord, pname, params);
  1.2176 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2177 +        }
  1.2178 +
  1.2179 +        #undef glGetTexGenfv
  1.2180 +        extern "C" { GLAPI void GLAPIENTRY glGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params); }
  1.2181 +        void OVR::GLEContext::glGetTexGenfv_Hook(GLenum coord, GLenum pname, GLfloat *params)
  1.2182 +        {
  1.2183 +            glGetTexGenfv(coord, pname, params);
  1.2184 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2185 +        }
  1.2186 +
  1.2187 +        #undef glGetTexGeniv
  1.2188 +        extern "C" { GLAPI void GLAPIENTRY glGetTexGeniv(GLenum coord, GLenum pname, GLint *params); }
  1.2189 +        void OVR::GLEContext::glGetTexGeniv_Hook(GLenum coord, GLenum pname, GLint *params)
  1.2190 +        {
  1.2191 +            glGetTexGeniv(coord, pname, params);
  1.2192 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2193 +        }
  1.2194 +
  1.2195 +        #undef glGetTexImage
  1.2196 +        extern "C" { GLAPI void GLAPIENTRY glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels); }
  1.2197 +        void OVR::GLEContext::glGetTexImage_Hook(GLenum target, GLint level, GLenum format, GLenum type, void *pixels)
  1.2198 +        {
  1.2199 +            glGetTexImage(target, level, format, type, pixels);
  1.2200 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2201 +        }
  1.2202 +
  1.2203 +        #undef glGetTexLevelParameterfv
  1.2204 +        extern "C" { GLAPI void GLAPIENTRY glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params); }
  1.2205 +        void OVR::GLEContext::glGetTexLevelParameterfv_Hook(GLenum target, GLint level, GLenum pname, GLfloat *params)
  1.2206 +        {
  1.2207 +            glGetTexLevelParameterfv(target, level, pname, params);
  1.2208 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2209 +        }
  1.2210 +
  1.2211 +        #undef glGetTexLevelParameteriv
  1.2212 +        extern "C" { GLAPI void GLAPIENTRY glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params); }
  1.2213 +        void OVR::GLEContext::glGetTexLevelParameteriv_Hook(GLenum target, GLint level, GLenum pname, GLint *params)
  1.2214 +        {
  1.2215 +            glGetTexLevelParameteriv(target, level, pname, params);
  1.2216 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2217 +        }
  1.2218 +
  1.2219 +        #undef glGetTexParameterfv
  1.2220 +        extern "C" { GLAPI void GLAPIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params); }
  1.2221 +        void OVR::GLEContext::glGetTexParameterfv_Hook(GLenum target, GLenum pname, GLfloat *params)
  1.2222 +        {
  1.2223 +            glGetTexParameterfv(target, pname, params);
  1.2224 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2225 +        }
  1.2226 +
  1.2227 +        #undef glGetTexParameteriv
  1.2228 +        extern "C" { GLAPI void GLAPIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint *params); }
  1.2229 +        void OVR::GLEContext::glGetTexParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
  1.2230 +        {
  1.2231 +            glGetTexParameteriv(target, pname, params);
  1.2232 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2233 +        }
  1.2234 +
  1.2235 +        #undef glHint
  1.2236 +        extern "C" { GLAPI void GLAPIENTRY glHint(GLenum target, GLenum mode); }
  1.2237 +        void OVR::GLEContext::glHint_Hook(GLenum target, GLenum mode)
  1.2238 +        {
  1.2239 +            glHint(target, mode);
  1.2240 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2241 +        }
  1.2242 +
  1.2243 +        #undef glIndexMask
  1.2244 +        extern "C" { GLAPI void GLAPIENTRY glIndexMask(GLuint mask); }
  1.2245 +        void OVR::GLEContext::glIndexMask_Hook(GLuint mask)
  1.2246 +        {
  1.2247 +            glIndexMask(mask);
  1.2248 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2249 +        }
  1.2250 +
  1.2251 +        #undef glIndexPointer
  1.2252 +        extern "C" { GLAPI void GLAPIENTRY glIndexPointer(GLenum type, GLsizei stride, const void *pointer); }
  1.2253 +        void OVR::GLEContext::glIndexPointer_Hook(GLenum type, GLsizei stride, const void *pointer)
  1.2254 +        {
  1.2255 +            glIndexPointer(type, stride, pointer);
  1.2256 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2257 +        }
  1.2258 +
  1.2259 +        #undef glIndexd
  1.2260 +        extern "C" { GLAPI void GLAPIENTRY glIndexd(GLdouble c); }
  1.2261 +        void OVR::GLEContext::glIndexd_Hook(GLdouble c)
  1.2262 +        {
  1.2263 +            glIndexd(c);
  1.2264 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2265 +        }
  1.2266 +
  1.2267 +        #undef glIndexdv
  1.2268 +        extern "C" { GLAPI void GLAPIENTRY glIndexdv(const GLdouble *c); }
  1.2269 +        void OVR::GLEContext::glIndexdv_Hook(const GLdouble *c)
  1.2270 +        {
  1.2271 +            glIndexdv(c);
  1.2272 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2273 +        }
  1.2274 +
  1.2275 +        #undef glIndexf
  1.2276 +        extern "C" { GLAPI void GLAPIENTRY glIndexf(GLfloat c); }
  1.2277 +        void OVR::GLEContext::glIndexf_Hook(GLfloat c)
  1.2278 +        {
  1.2279 +            glIndexf(c);
  1.2280 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2281 +        }
  1.2282 +
  1.2283 +        #undef glIndexfv
  1.2284 +        extern "C" { GLAPI void GLAPIENTRY glIndexfv(const GLfloat *c); }
  1.2285 +        void OVR::GLEContext::glIndexfv_Hook(const GLfloat *c)
  1.2286 +        {
  1.2287 +            glIndexfv(c);
  1.2288 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2289 +        }
  1.2290 +
  1.2291 +        #undef glIndexi
  1.2292 +        extern "C" { GLAPI void GLAPIENTRY glIndexi(GLint c); }
  1.2293 +        void OVR::GLEContext::glIndexi_Hook(GLint c)
  1.2294 +        {
  1.2295 +            glIndexi(c);
  1.2296 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2297 +        }
  1.2298 +
  1.2299 +        #undef glIndexiv
  1.2300 +        extern "C" { GLAPI void GLAPIENTRY glIndexiv(const GLint *c); }
  1.2301 +        void OVR::GLEContext::glIndexiv_Hook(const GLint *c)
  1.2302 +        {
  1.2303 +            glIndexiv(c);
  1.2304 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2305 +        }
  1.2306 +
  1.2307 +        #undef glIndexs
  1.2308 +        extern "C" { GLAPI void GLAPIENTRY glIndexs(GLshort c); }
  1.2309 +        void OVR::GLEContext::glIndexs_Hook(GLshort c)
  1.2310 +        {
  1.2311 +            glIndexs(c);
  1.2312 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2313 +        }
  1.2314 +
  1.2315 +        #undef glIndexsv
  1.2316 +        extern "C" { GLAPI void GLAPIENTRY glIndexsv(const GLshort *c); }
  1.2317 +        void OVR::GLEContext::glIndexsv_Hook(const GLshort *c)
  1.2318 +        {
  1.2319 +            glIndexsv(c);
  1.2320 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2321 +        }
  1.2322 +
  1.2323 +        #undef glIndexub
  1.2324 +        extern "C" { GLAPI void GLAPIENTRY glIndexub(GLubyte c); }
  1.2325 +        void OVR::GLEContext::glIndexub_Hook(GLubyte c)
  1.2326 +        {
  1.2327 +            glIndexub(c);
  1.2328 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2329 +        }
  1.2330 +
  1.2331 +        #undef glIndexubv
  1.2332 +        extern "C" { GLAPI void GLAPIENTRY glIndexubv(const GLubyte *c); }
  1.2333 +        void OVR::GLEContext::glIndexubv_Hook(const GLubyte *c)
  1.2334 +        {
  1.2335 +            glIndexubv(c);
  1.2336 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2337 +        }
  1.2338 +
  1.2339 +        #undef glInitNames
  1.2340 +        extern "C" { GLAPI void GLAPIENTRY glInitNames(); }
  1.2341 +        void OVR::GLEContext::glInitNames_Hook()
  1.2342 +        {
  1.2343 +            glInitNames();
  1.2344 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2345 +        }
  1.2346 +
  1.2347 +        #undef glInterleavedArrays
  1.2348 +        extern "C" { GLAPI void GLAPIENTRY glInterleavedArrays(GLenum format, GLsizei stride, const void *pointer); }
  1.2349 +        void OVR::GLEContext::glInterleavedArrays_Hook(GLenum format, GLsizei stride, const void *pointer)
  1.2350 +        {
  1.2351 +            glInterleavedArrays(format, stride, pointer);
  1.2352 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2353 +        }
  1.2354 +
  1.2355 +        #undef glIsEnabled
  1.2356 +        extern "C" { GLAPI GLboolean GLAPIENTRY glIsEnabled(GLenum cap); }
  1.2357 +        GLboolean OVR::GLEContext::glIsEnabled_Hook(GLenum cap)
  1.2358 +        {
  1.2359 +            GLboolean b = glIsEnabled(cap);
  1.2360 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2361 +            return b;
  1.2362 +        }
  1.2363 +
  1.2364 +        #undef glIsList
  1.2365 +        extern "C" { GLAPI GLboolean GLAPIENTRY glIsList(GLuint list); }
  1.2366 +        GLboolean OVR::GLEContext::glIsList_Hook(GLuint list)
  1.2367 +        {
  1.2368 +            GLboolean b = glIsList(list);
  1.2369 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2370 +            return b;
  1.2371 +        }
  1.2372 +
  1.2373 +        #undef glIsTexture
  1.2374 +        extern "C" { GLAPI GLboolean GLAPIENTRY glIsTexture(GLuint texture); }
  1.2375 +        GLboolean OVR::GLEContext::glIsTexture_Hook(GLuint texture)
  1.2376 +        {
  1.2377 +            GLboolean b = glIsTexture(texture);
  1.2378 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2379 +            return b;
  1.2380 +        }
  1.2381 +
  1.2382 +        #undef glLightModelf
  1.2383 +        extern "C" { GLAPI void GLAPIENTRY glLightModelf(GLenum pname, GLfloat param); }
  1.2384 +        void OVR::GLEContext::glLightModelf_Hook(GLenum pname, GLfloat param)
  1.2385 +        {
  1.2386 +            glLightModelf(pname, param);
  1.2387 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2388 +        }
  1.2389 +
  1.2390 +        #undef glLightModelfv
  1.2391 +        extern "C" { GLAPI void GLAPIENTRY glLightModelfv(GLenum pname, const GLfloat *params); }
  1.2392 +        void OVR::GLEContext::glLightModelfv_Hook(GLenum pname, const GLfloat *params)
  1.2393 +        {
  1.2394 +            glLightModelfv(pname, params);
  1.2395 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2396 +        }
  1.2397 +
  1.2398 +        #undef glLightModeli
  1.2399 +        extern "C" { GLAPI void GLAPIENTRY glLightModeli(GLenum pname, GLint param); }
  1.2400 +        void OVR::GLEContext::glLightModeli_Hook(GLenum pname, GLint param)
  1.2401 +        {
  1.2402 +            glLightModeli(pname, param);
  1.2403 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2404 +        }
  1.2405 +
  1.2406 +        #undef glLightModeliv
  1.2407 +        extern "C" { GLAPI void GLAPIENTRY glLightModeliv(GLenum pname, const GLint *params); }
  1.2408 +        void OVR::GLEContext::glLightModeliv_Hook(GLenum pname, const GLint *params)
  1.2409 +        {
  1.2410 +            glLightModeliv(pname, params);
  1.2411 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2412 +        }
  1.2413 +
  1.2414 +        #undef glLightf
  1.2415 +        extern "C" { GLAPI void GLAPIENTRY glLightf(GLenum light, GLenum pname, GLfloat param); }
  1.2416 +        void OVR::GLEContext::glLightf_Hook(GLenum light, GLenum pname, GLfloat param)
  1.2417 +        {
  1.2418 +            glLightf(light, pname, param);
  1.2419 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2420 +        }
  1.2421 +
  1.2422 +        #undef glLightfv
  1.2423 +        extern "C" { GLAPI void GLAPIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params); }
  1.2424 +        void OVR::GLEContext::glLightfv_Hook(GLenum light, GLenum pname, const GLfloat *params)
  1.2425 +        {
  1.2426 +            glLightfv(light, pname, params);
  1.2427 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2428 +        }
  1.2429 +
  1.2430 +        #undef glLighti
  1.2431 +        extern "C" { GLAPI void GLAPIENTRY glLighti(GLenum light, GLenum pname, GLint param); }
  1.2432 +        void OVR::GLEContext::glLighti_Hook(GLenum light, GLenum pname, GLint param)
  1.2433 +        {
  1.2434 +            glLighti(light, pname, param);
  1.2435 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2436 +        }
  1.2437 +
  1.2438 +        #undef glLightiv
  1.2439 +        extern "C" { GLAPI void GLAPIENTRY glLightiv(GLenum light, GLenum pname, const GLint *params); }
  1.2440 +        void OVR::GLEContext::glLightiv_Hook(GLenum light, GLenum pname, const GLint *params)
  1.2441 +        {
  1.2442 +            glLightiv(light, pname, params);
  1.2443 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2444 +        }
  1.2445 +
  1.2446 +        #undef glLineStipple
  1.2447 +        extern "C" { GLAPI void GLAPIENTRY glLineStipple(GLint factor, GLushort pattern); }
  1.2448 +        void OVR::GLEContext::glLineStipple_Hook(GLint factor, GLushort pattern)
  1.2449 +        {
  1.2450 +            glLineStipple(factor, pattern);
  1.2451 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2452 +        }
  1.2453 +
  1.2454 +        #undef glLineWidth
  1.2455 +        extern "C" { GLAPI void GLAPIENTRY glLineWidth(GLfloat width); }
  1.2456 +        void OVR::GLEContext::glLineWidth_Hook(GLfloat width)
  1.2457 +        {
  1.2458 +            glLineWidth(width);
  1.2459 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2460 +        }
  1.2461 +
  1.2462 +        #undef glListBase
  1.2463 +        extern "C" { GLAPI void GLAPIENTRY glListBase(GLuint base); }
  1.2464 +        void OVR::GLEContext::glListBase_Hook(GLuint base)
  1.2465 +        {
  1.2466 +            glListBase(base);
  1.2467 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2468 +        }
  1.2469 +
  1.2470 +        #undef glLoadIdentity
  1.2471 +        extern "C" { GLAPI void GLAPIENTRY glLoadIdentity(); }
  1.2472 +        void OVR::GLEContext::glLoadIdentity_Hook()
  1.2473 +        {
  1.2474 +            glLoadIdentity();
  1.2475 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2476 +        }
  1.2477 +
  1.2478 +        #undef glLoadMatrixd
  1.2479 +        extern "C" { GLAPI void GLAPIENTRY glLoadMatrixd(const GLdouble *m); }
  1.2480 +        void OVR::GLEContext::glLoadMatrixd_Hook(const GLdouble *m)
  1.2481 +        {
  1.2482 +            glLoadMatrixd(m);
  1.2483 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2484 +        }
  1.2485 +
  1.2486 +        #undef glLoadMatrixf
  1.2487 +        extern "C" { GLAPI void GLAPIENTRY glLoadMatrixf(const GLfloat *m); }
  1.2488 +        void OVR::GLEContext::glLoadMatrixf_Hook(const GLfloat *m)
  1.2489 +        {
  1.2490 +            glLoadMatrixf(m);
  1.2491 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2492 +        }
  1.2493 +
  1.2494 +        #undef glLoadName
  1.2495 +        extern "C" { GLAPI void GLAPIENTRY glLoadName(GLuint name); }
  1.2496 +        void OVR::GLEContext::glLoadName_Hook(GLuint name)
  1.2497 +        {
  1.2498 +            glLoadName(name);
  1.2499 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2500 +        }
  1.2501 +
  1.2502 +        #undef glLogicOp
  1.2503 +        extern "C" { GLAPI void GLAPIENTRY glLogicOp(GLenum opcode); }
  1.2504 +        void OVR::GLEContext::glLogicOp_Hook(GLenum opcode)
  1.2505 +        {
  1.2506 +            glLogicOp(opcode);
  1.2507 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2508 +        }
  1.2509 +
  1.2510 +        #undef glMap1d
  1.2511 +        extern "C" { GLAPI void GLAPIENTRY glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); }
  1.2512 +        void OVR::GLEContext::glMap1d_Hook(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
  1.2513 +        {
  1.2514 +            glMap1d(target, u1, u2, stride, order, points);
  1.2515 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2516 +        }
  1.2517 +
  1.2518 +        #undef glMap1f
  1.2519 +        extern "C" { GLAPI void GLAPIENTRY glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); }
  1.2520 +        void OVR::GLEContext::glMap1f_Hook(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
  1.2521 +        {
  1.2522 +            glMap1f(target, u1, u2, stride, order, points);
  1.2523 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2524 +        }
  1.2525 +
  1.2526 +        #undef glMap2d
  1.2527 +        extern "C" { GLAPI void GLAPIENTRY glMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points); }
  1.2528 +        void OVR::GLEContext::glMap2d_Hook(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)
  1.2529 +        {
  1.2530 +            glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
  1.2531 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2532 +        }
  1.2533 +
  1.2534 +        #undef glMap2f
  1.2535 +        extern "C" { GLAPI void GLAPIENTRY glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points); }
  1.2536 +        void OVR::GLEContext::glMap2f_Hook(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
  1.2537 +        {
  1.2538 +            glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
  1.2539 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2540 +        }
  1.2541 +
  1.2542 +        #undef glMapGrid1d
  1.2543 +        extern "C" { GLAPI void GLAPIENTRY glMapGrid1d(GLint un, GLdouble u1, GLdouble u2); }
  1.2544 +        void OVR::GLEContext::glMapGrid1d_Hook(GLint un, GLdouble u1, GLdouble u2)
  1.2545 +        {
  1.2546 +            glMapGrid1d(un, u1, u2);
  1.2547 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2548 +        }
  1.2549 +
  1.2550 +        #undef glMapGrid1f
  1.2551 +        extern "C" { GLAPI void GLAPIENTRY glMapGrid1f(GLint un, GLfloat u1, GLfloat u2); }
  1.2552 +        void OVR::GLEContext::glMapGrid1f_Hook(GLint un, GLfloat u1, GLfloat u2)
  1.2553 +        {
  1.2554 +            glMapGrid1f(un, u1, u2);
  1.2555 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2556 +        }
  1.2557 +
  1.2558 +        #undef glMapGrid2d
  1.2559 +        extern "C" { GLAPI void GLAPIENTRY glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); }
  1.2560 +        void OVR::GLEContext::glMapGrid2d_Hook(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
  1.2561 +        {
  1.2562 +            glMapGrid2d(un, u1, u2, vn, v1, v2);
  1.2563 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2564 +        }
  1.2565 +
  1.2566 +        #undef glMapGrid2f
  1.2567 +        extern "C" { GLAPI void GLAPIENTRY glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); }
  1.2568 +        void OVR::GLEContext::glMapGrid2f_Hook(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
  1.2569 +        {
  1.2570 +            glMapGrid2f(un, u1, u2, vn, v1, v2);
  1.2571 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2572 +        }
  1.2573 +
  1.2574 +        #undef glMaterialf
  1.2575 +        extern "C" { GLAPI void GLAPIENTRY glMaterialf(GLenum face, GLenum pname, GLfloat param); }
  1.2576 +        void OVR::GLEContext::glMaterialf_Hook(GLenum face, GLenum pname, GLfloat param)
  1.2577 +        {
  1.2578 +            glMaterialf(face, pname, param);
  1.2579 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2580 +        }
  1.2581 +
  1.2582 +        #undef glMaterialfv
  1.2583 +        extern "C" { GLAPI void GLAPIENTRY glMaterialfv(GLenum face, GLenum pname, const GLfloat *params); }
  1.2584 +        void OVR::GLEContext::glMaterialfv_Hook(GLenum face, GLenum pname, const GLfloat *params)
  1.2585 +        {
  1.2586 +            glMaterialfv(face, pname, params);
  1.2587 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2588 +        }
  1.2589 +
  1.2590 +        #undef glMateriali
  1.2591 +        extern "C" { GLAPI void GLAPIENTRY glMateriali(GLenum face, GLenum pname, GLint param); }
  1.2592 +        void OVR::GLEContext::glMateriali_Hook(GLenum face, GLenum pname, GLint param)
  1.2593 +        {
  1.2594 +            glMateriali(face, pname, param);
  1.2595 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2596 +        }
  1.2597 +
  1.2598 +        #undef glMaterialiv
  1.2599 +        extern "C" { GLAPI void GLAPIENTRY glMaterialiv(GLenum face, GLenum pname, const GLint *params); }
  1.2600 +        void OVR::GLEContext::glMaterialiv_Hook(GLenum face, GLenum pname, const GLint *params)
  1.2601 +        {
  1.2602 +            glMaterialiv(face, pname, params);
  1.2603 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2604 +        }
  1.2605 +
  1.2606 +        #undef glMatrixMode
  1.2607 +        extern "C" { GLAPI void GLAPIENTRY glMatrixMode(GLenum mode); }
  1.2608 +        void OVR::GLEContext::glMatrixMode_Hook(GLenum mode)
  1.2609 +        {
  1.2610 +            glMatrixMode(mode);
  1.2611 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2612 +        }
  1.2613 +
  1.2614 +        #undef glMultMatrixd
  1.2615 +        extern "C" { GLAPI void GLAPIENTRY glMultMatrixd(const GLdouble *m); }
  1.2616 +        void OVR::GLEContext::glMultMatrixd_Hook(const GLdouble *m)
  1.2617 +        {
  1.2618 +            glMultMatrixd(m);
  1.2619 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2620 +        }
  1.2621 +
  1.2622 +        #undef glMultMatrixf
  1.2623 +        extern "C" { GLAPI void GLAPIENTRY glMultMatrixf(const GLfloat *m); }
  1.2624 +        void OVR::GLEContext::glMultMatrixf_Hook(const GLfloat *m)
  1.2625 +        {
  1.2626 +            glMultMatrixf(m);
  1.2627 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2628 +        }
  1.2629 +
  1.2630 +        #undef glNewList
  1.2631 +        extern "C" { GLAPI void GLAPIENTRY glNewList(GLuint list, GLenum mode); }
  1.2632 +        void OVR::GLEContext::glNewList_Hook(GLuint list, GLenum mode)
  1.2633 +        {
  1.2634 +            glNewList(list, mode);
  1.2635 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2636 +        }
  1.2637 +
  1.2638 +        #undef glNormal3b
  1.2639 +        extern "C" { GLAPI void GLAPIENTRY glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz); }
  1.2640 +        void OVR::GLEContext::glNormal3b_Hook(GLbyte nx, GLbyte ny, GLbyte nz)
  1.2641 +        {
  1.2642 +            glNormal3b(nx, ny, nz);
  1.2643 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2644 +        }
  1.2645 +
  1.2646 +        #undef glNormal3bv
  1.2647 +        extern "C" { GLAPI void GLAPIENTRY glNormal3bv(const GLbyte *v); }
  1.2648 +        void OVR::GLEContext::glNormal3bv_Hook(const GLbyte *v)
  1.2649 +        {
  1.2650 +            glNormal3bv(v);
  1.2651 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2652 +        }
  1.2653 +
  1.2654 +        #undef glNormal3d
  1.2655 +        extern "C" { GLAPI void GLAPIENTRY glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz); }
  1.2656 +        void OVR::GLEContext::glNormal3d_Hook(GLdouble nx, GLdouble ny, GLdouble nz)
  1.2657 +        {
  1.2658 +            glNormal3d(nx, ny, nz);
  1.2659 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2660 +        }
  1.2661 +
  1.2662 +        #undef glNormal3dv
  1.2663 +        extern "C" { GLAPI void GLAPIENTRY glNormal3dv(const GLdouble *v); }
  1.2664 +        void OVR::GLEContext::glNormal3dv_Hook(const GLdouble *v)
  1.2665 +        {
  1.2666 +            glNormal3dv(v);
  1.2667 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2668 +        }
  1.2669 +
  1.2670 +        #undef glNormal3f
  1.2671 +        extern "C" { GLAPI void GLAPIENTRY glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz); }
  1.2672 +        void OVR::GLEContext::glNormal3f_Hook(GLfloat nx, GLfloat ny, GLfloat nz)
  1.2673 +        {
  1.2674 +            glNormal3f(nx, ny, nz);
  1.2675 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2676 +        }
  1.2677 +
  1.2678 +        #undef glNormal3fv
  1.2679 +        extern "C" { GLAPI void GLAPIENTRY glNormal3fv(const GLfloat *v); }
  1.2680 +        void OVR::GLEContext::glNormal3fv_Hook(const GLfloat *v)
  1.2681 +        {
  1.2682 +            glNormal3fv(v);
  1.2683 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2684 +        }
  1.2685 +
  1.2686 +        #undef glNormal3i
  1.2687 +        extern "C" { GLAPI void GLAPIENTRY glNormal3i(GLint nx, GLint ny, GLint nz); }
  1.2688 +        void OVR::GLEContext::glNormal3i_Hook(GLint nx, GLint ny, GLint nz)
  1.2689 +        {
  1.2690 +            glNormal3i(nx, ny, nz);
  1.2691 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2692 +        }
  1.2693 +
  1.2694 +        #undef glNormal3iv
  1.2695 +        extern "C" { GLAPI void GLAPIENTRY glNormal3iv(const GLint *v); }
  1.2696 +        void OVR::GLEContext::glNormal3iv_Hook(const GLint *v)
  1.2697 +        {
  1.2698 +            glNormal3iv(v);
  1.2699 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2700 +        }
  1.2701 +
  1.2702 +        #undef glNormal3s
  1.2703 +        extern "C" { GLAPI void GLAPIENTRY glNormal3s(GLshort nx, GLshort ny, GLshort nz); }
  1.2704 +        void OVR::GLEContext::glNormal3s_Hook(GLshort nx, GLshort ny, GLshort nz)
  1.2705 +        {
  1.2706 +            glNormal3s(nx, ny, nz);
  1.2707 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2708 +        }
  1.2709 +
  1.2710 +        #undef glNormal3sv
  1.2711 +        extern "C" { GLAPI void GLAPIENTRY glNormal3sv(const GLshort *v); }
  1.2712 +        void OVR::GLEContext::glNormal3sv_Hook(const GLshort *v)
  1.2713 +        {
  1.2714 +            glNormal3sv(v);
  1.2715 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2716 +        }
  1.2717 +
  1.2718 +        #undef glNormalPointer
  1.2719 +        extern "C" { GLAPI void GLAPIENTRY glNormalPointer(GLenum type, GLsizei stride, const void *pointer); }
  1.2720 +        void OVR::GLEContext::glNormalPointer_Hook(GLenum type, GLsizei stride, const void *pointer)
  1.2721 +        {
  1.2722 +            glNormalPointer(type, stride, pointer);
  1.2723 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2724 +        }
  1.2725 +
  1.2726 +        #undef glOrtho
  1.2727 +        extern "C" { GLAPI void GLAPIENTRY glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); }
  1.2728 +        void OVR::GLEContext::glOrtho_Hook(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
  1.2729 +        {
  1.2730 +            glOrtho(left, right, bottom, top, zNear, zFar);
  1.2731 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2732 +        }
  1.2733 +
  1.2734 +        #undef glPassThrough
  1.2735 +        extern "C" { GLAPI void GLAPIENTRY glPassThrough(GLfloat token); }
  1.2736 +        void OVR::GLEContext::glPassThrough_Hook(GLfloat token)
  1.2737 +        {
  1.2738 +            glPassThrough(token);
  1.2739 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2740 +        }
  1.2741 +
  1.2742 +        #undef glPixelMapfv
  1.2743 +        extern "C" { GLAPI void GLAPIENTRY glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values); }
  1.2744 +        void OVR::GLEContext::glPixelMapfv_Hook(GLenum map, GLsizei mapsize, const GLfloat *values)
  1.2745 +        {
  1.2746 +            glPixelMapfv(map, mapsize, values);
  1.2747 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2748 +        }
  1.2749 +
  1.2750 +        #undef glPixelMapuiv
  1.2751 +        extern "C" { GLAPI void GLAPIENTRY glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values); }
  1.2752 +        void OVR::GLEContext::glPixelMapuiv_Hook(GLenum map, GLsizei mapsize, const GLuint *values)
  1.2753 +        {
  1.2754 +            glPixelMapuiv(map, mapsize, values);
  1.2755 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2756 +        }
  1.2757 +
  1.2758 +        #undef glPixelMapusv
  1.2759 +        extern "C" { GLAPI void GLAPIENTRY glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values); }
  1.2760 +        void OVR::GLEContext::glPixelMapusv_Hook(GLenum map, GLsizei mapsize, const GLushort *values)
  1.2761 +        {
  1.2762 +            glPixelMapusv(map, mapsize, values);
  1.2763 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2764 +        }
  1.2765 +
  1.2766 +        #undef glPixelStoref
  1.2767 +        extern "C" { GLAPI void GLAPIENTRY glPixelStoref(GLenum pname, GLfloat param); }
  1.2768 +        void OVR::GLEContext::glPixelStoref_Hook(GLenum pname, GLfloat param)
  1.2769 +        {
  1.2770 +            glPixelStoref(pname, param);
  1.2771 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2772 +        }
  1.2773 +
  1.2774 +        #undef glPixelStorei
  1.2775 +        extern "C" { GLAPI void GLAPIENTRY glPixelStorei(GLenum pname, GLint param); }
  1.2776 +        void OVR::GLEContext::glPixelStorei_Hook(GLenum pname, GLint param)
  1.2777 +        {
  1.2778 +            glPixelStorei(pname, param);
  1.2779 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2780 +        }
  1.2781 +
  1.2782 +        #undef glPixelTransferf
  1.2783 +        extern "C" { GLAPI void GLAPIENTRY glPixelTransferf(GLenum pname, GLfloat param); }
  1.2784 +        void OVR::GLEContext::glPixelTransferf_Hook(GLenum pname, GLfloat param)
  1.2785 +        {
  1.2786 +            glPixelTransferf(pname, param);
  1.2787 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2788 +        }
  1.2789 +
  1.2790 +        #undef glPixelTransferi
  1.2791 +        extern "C" { GLAPI void GLAPIENTRY glPixelTransferi(GLenum pname, GLint param); }
  1.2792 +        void OVR::GLEContext::glPixelTransferi_Hook(GLenum pname, GLint param)
  1.2793 +        {
  1.2794 +            glPixelTransferi(pname, param);
  1.2795 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2796 +        }
  1.2797 +
  1.2798 +        #undef glPixelZoom
  1.2799 +        extern "C" { GLAPI void GLAPIENTRY glPixelZoom(GLfloat xfactor, GLfloat yfactor); }
  1.2800 +        void OVR::GLEContext::glPixelZoom_Hook(GLfloat xfactor, GLfloat yfactor)
  1.2801 +        {
  1.2802 +            glPixelZoom(xfactor, yfactor);
  1.2803 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2804 +        }
  1.2805 +
  1.2806 +        #undef glPointSize
  1.2807 +        extern "C" { GLAPI void GLAPIENTRY glPointSize(GLfloat size); }
  1.2808 +        void OVR::GLEContext::glPointSize_Hook(GLfloat size)
  1.2809 +        {
  1.2810 +            glPointSize(size);
  1.2811 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2812 +        }
  1.2813 +
  1.2814 +        #undef glPolygonMode
  1.2815 +        extern "C" { GLAPI void GLAPIENTRY glPolygonMode(GLenum face, GLenum mode); }
  1.2816 +        void OVR::GLEContext::glPolygonMode_Hook(GLenum face, GLenum mode)
  1.2817 +        {
  1.2818 +            glPolygonMode(face, mode);
  1.2819 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2820 +        }
  1.2821 +
  1.2822 +        #undef glPolygonOffset
  1.2823 +        extern "C" { GLAPI void GLAPIENTRY glPolygonOffset(GLfloat factor, GLfloat units); }
  1.2824 +        void OVR::GLEContext::glPolygonOffset_Hook(GLfloat factor, GLfloat units)
  1.2825 +        {
  1.2826 +            glPolygonOffset(factor, units);
  1.2827 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2828 +        }
  1.2829 +
  1.2830 +        #undef glPolygonStipple
  1.2831 +        extern "C" { GLAPI void GLAPIENTRY glPolygonStipple(const GLubyte *mask); }
  1.2832 +        void OVR::GLEContext::glPolygonStipple_Hook(const GLubyte *mask)
  1.2833 +        {
  1.2834 +            glPolygonStipple(mask);
  1.2835 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2836 +        }
  1.2837 +
  1.2838 +        #undef glPopAttrib
  1.2839 +        extern "C" { GLAPI void GLAPIENTRY glPopAttrib(); }
  1.2840 +        void OVR::GLEContext::glPopAttrib_Hook()
  1.2841 +        {
  1.2842 +            glPopAttrib();
  1.2843 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2844 +        }
  1.2845 +
  1.2846 +        #undef glPopClientAttrib
  1.2847 +        extern "C" { GLAPI void GLAPIENTRY glPopClientAttrib(); }
  1.2848 +        void OVR::GLEContext::glPopClientAttrib_Hook()
  1.2849 +        {
  1.2850 +            glPopClientAttrib();
  1.2851 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2852 +        }
  1.2853 +
  1.2854 +        #undef glPopMatrix
  1.2855 +        extern "C" { GLAPI void GLAPIENTRY glPopMatrix(); }
  1.2856 +        void OVR::GLEContext::glPopMatrix_Hook()
  1.2857 +        {
  1.2858 +            glPopMatrix();
  1.2859 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2860 +        }
  1.2861 +
  1.2862 +        #undef glPopName
  1.2863 +        extern "C" { GLAPI void GLAPIENTRY glPopName(); }
  1.2864 +        void OVR::GLEContext::glPopName_Hook()
  1.2865 +        {
  1.2866 +            glPopName();
  1.2867 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2868 +        }
  1.2869 +
  1.2870 +        #undef glPrioritizeTextures
  1.2871 +        extern "C" { GLAPI void GLAPIENTRY glPrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities); }
  1.2872 +        void OVR::GLEContext::glPrioritizeTextures_Hook(GLsizei n, const GLuint *textures, const GLclampf *priorities)
  1.2873 +        {
  1.2874 +            glPrioritizeTextures(n, textures, priorities);
  1.2875 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2876 +        }
  1.2877 +
  1.2878 +        #undef glPushAttrib
  1.2879 +        extern "C" { GLAPI void GLAPIENTRY glPushAttrib(GLbitfield mask); }
  1.2880 +        void OVR::GLEContext::glPushAttrib_Hook(GLbitfield mask)
  1.2881 +        {
  1.2882 +            glPushAttrib(mask);
  1.2883 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2884 +        }
  1.2885 +
  1.2886 +        #undef glPushClientAttrib
  1.2887 +        extern "C" { GLAPI void GLAPIENTRY glPushClientAttrib(GLbitfield mask); }
  1.2888 +        void OVR::GLEContext::glPushClientAttrib_Hook(GLbitfield mask)
  1.2889 +        {
  1.2890 +            glPushClientAttrib(mask);
  1.2891 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2892 +        }
  1.2893 +
  1.2894 +        #undef glPushMatrix
  1.2895 +        extern "C" { GLAPI void GLAPIENTRY glPushMatrix(); }
  1.2896 +        void OVR::GLEContext::glPushMatrix_Hook()
  1.2897 +        {
  1.2898 +            glPushMatrix();
  1.2899 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2900 +        }
  1.2901 +
  1.2902 +        #undef glPushName
  1.2903 +        extern "C" { GLAPI void GLAPIENTRY glPushName(GLuint name); }
  1.2904 +        void OVR::GLEContext::glPushName_Hook(GLuint name)
  1.2905 +        {
  1.2906 +            glPushName(name);
  1.2907 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2908 +        }
  1.2909 +
  1.2910 +        #undef glRasterPos2d
  1.2911 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos2d(GLdouble x, GLdouble y); }
  1.2912 +        void OVR::GLEContext::glRasterPos2d_Hook(GLdouble x, GLdouble y)
  1.2913 +        {
  1.2914 +            glRasterPos2d(x, y);
  1.2915 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2916 +        }
  1.2917 +
  1.2918 +        #undef glRasterPos2dv
  1.2919 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos2dv(const GLdouble *v); }
  1.2920 +        void OVR::GLEContext::glRasterPos2dv_Hook(const GLdouble *v)
  1.2921 +        {
  1.2922 +            glRasterPos2dv(v);
  1.2923 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2924 +        }
  1.2925 +
  1.2926 +        #undef glRasterPos2f
  1.2927 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos2f(GLfloat x, GLfloat y); }
  1.2928 +        void OVR::GLEContext::glRasterPos2f_Hook(GLfloat x, GLfloat y)
  1.2929 +        {
  1.2930 +            glRasterPos2f(x, y);
  1.2931 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2932 +        }
  1.2933 +
  1.2934 +        #undef glRasterPos2fv
  1.2935 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos2fv(const GLfloat *v); }
  1.2936 +        void OVR::GLEContext::glRasterPos2fv_Hook(const GLfloat *v)
  1.2937 +        {
  1.2938 +            glRasterPos2fv(v);
  1.2939 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2940 +        }
  1.2941 +
  1.2942 +        #undef glRasterPos2i
  1.2943 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos2i(GLint x, GLint y); }
  1.2944 +        void OVR::GLEContext::glRasterPos2i_Hook(GLint x, GLint y)
  1.2945 +        {
  1.2946 +            glRasterPos2i(x, y);
  1.2947 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2948 +        }
  1.2949 +
  1.2950 +        #undef glRasterPos2iv
  1.2951 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos2iv(const GLint *v); }
  1.2952 +        void OVR::GLEContext::glRasterPos2iv_Hook(const GLint *v)
  1.2953 +        {
  1.2954 +            glRasterPos2iv(v);
  1.2955 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2956 +        }
  1.2957 +
  1.2958 +        #undef glRasterPos2s
  1.2959 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos2s(GLshort x, GLshort y); }
  1.2960 +        void OVR::GLEContext::glRasterPos2s_Hook(GLshort x, GLshort y)
  1.2961 +        {
  1.2962 +            glRasterPos2s(x, y);
  1.2963 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2964 +        }
  1.2965 +
  1.2966 +        #undef glRasterPos2sv
  1.2967 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos2sv(const GLshort *v); }
  1.2968 +        void OVR::GLEContext::glRasterPos2sv_Hook(const GLshort *v)
  1.2969 +        {
  1.2970 +            glRasterPos2sv(v);
  1.2971 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2972 +        }
  1.2973 +
  1.2974 +        #undef glRasterPos3d
  1.2975 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos3d(GLdouble x, GLdouble y, GLdouble z); }
  1.2976 +        void OVR::GLEContext::glRasterPos3d_Hook(GLdouble x, GLdouble y, GLdouble z)
  1.2977 +        {
  1.2978 +            glRasterPos3d(x, y, z);
  1.2979 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2980 +        }
  1.2981 +
  1.2982 +        #undef glRasterPos3dv
  1.2983 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos3dv(const GLdouble *v); }
  1.2984 +        void OVR::GLEContext::glRasterPos3dv_Hook(const GLdouble *v)
  1.2985 +        {
  1.2986 +            glRasterPos3dv(v);
  1.2987 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2988 +        }
  1.2989 +
  1.2990 +        #undef glRasterPos3f
  1.2991 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos3f(GLfloat x, GLfloat y, GLfloat z); }
  1.2992 +        void OVR::GLEContext::glRasterPos3f_Hook(GLfloat x, GLfloat y, GLfloat z)
  1.2993 +        {
  1.2994 +            glRasterPos3f(x, y, z);
  1.2995 +            PostHook(GLE_CURRENT_FUNCTION);
  1.2996 +        }
  1.2997 +
  1.2998 +        #undef glRasterPos3fv
  1.2999 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos3fv(const GLfloat *v); }
  1.3000 +        void OVR::GLEContext::glRasterPos3fv_Hook(const GLfloat *v)
  1.3001 +        {
  1.3002 +            glRasterPos3fv(v);
  1.3003 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3004 +        }
  1.3005 +
  1.3006 +        #undef glRasterPos3i
  1.3007 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos3i(GLint x, GLint y, GLint z); }
  1.3008 +        void OVR::GLEContext::glRasterPos3i_Hook(GLint x, GLint y, GLint z)
  1.3009 +        {
  1.3010 +            glRasterPos3i(x, y, z);
  1.3011 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3012 +        }
  1.3013 +
  1.3014 +        #undef glRasterPos3iv
  1.3015 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos3iv(const GLint *v); }
  1.3016 +        void OVR::GLEContext::glRasterPos3iv_Hook(const GLint *v)
  1.3017 +        {
  1.3018 +            glRasterPos3iv(v);
  1.3019 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3020 +        }
  1.3021 +
  1.3022 +        #undef glRasterPos3s
  1.3023 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos3s(GLshort x, GLshort y, GLshort z); }
  1.3024 +        void OVR::GLEContext::glRasterPos3s_Hook(GLshort x, GLshort y, GLshort z)
  1.3025 +        {
  1.3026 +            glRasterPos3s(x, y, z);
  1.3027 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3028 +        }
  1.3029 +
  1.3030 +        #undef glRasterPos3sv
  1.3031 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos3sv(const GLshort *v); }
  1.3032 +        void OVR::GLEContext::glRasterPos3sv_Hook(const GLshort *v)
  1.3033 +        {
  1.3034 +            glRasterPos3sv(v);
  1.3035 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3036 +        }
  1.3037 +
  1.3038 +        #undef glRasterPos4d
  1.3039 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w); }
  1.3040 +        void OVR::GLEContext::glRasterPos4d_Hook(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  1.3041 +        {
  1.3042 +            glRasterPos4d(x, y, z, w);
  1.3043 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3044 +        }
  1.3045 +
  1.3046 +        #undef glRasterPos4dv
  1.3047 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos4dv(const GLdouble *v); }
  1.3048 +        void OVR::GLEContext::glRasterPos4dv_Hook(const GLdouble *v)
  1.3049 +        {
  1.3050 +            glRasterPos4dv(v);
  1.3051 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3052 +        }
  1.3053 +
  1.3054 +        #undef glRasterPos4f
  1.3055 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); }
  1.3056 +        void OVR::GLEContext::glRasterPos4f_Hook(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  1.3057 +        {
  1.3058 +            glRasterPos4f(x, y, z, w);
  1.3059 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3060 +        }
  1.3061 +
  1.3062 +        #undef glRasterPos4fv
  1.3063 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos4fv(const GLfloat *v); }
  1.3064 +        void OVR::GLEContext::glRasterPos4fv_Hook(const GLfloat *v)
  1.3065 +        {
  1.3066 +            glRasterPos4fv(v);
  1.3067 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3068 +        }
  1.3069 +
  1.3070 +        #undef glRasterPos4i
  1.3071 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos4i(GLint x, GLint y, GLint z, GLint w); }
  1.3072 +        void OVR::GLEContext::glRasterPos4i_Hook(GLint x, GLint y, GLint z, GLint w)
  1.3073 +        {
  1.3074 +            glRasterPos4i(x, y, z, w);
  1.3075 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3076 +        }
  1.3077 +
  1.3078 +        #undef glRasterPos4iv
  1.3079 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos4iv(const GLint *v); }
  1.3080 +        void OVR::GLEContext::glRasterPos4iv_Hook(const GLint *v)
  1.3081 +        {
  1.3082 +            glRasterPos4iv(v);
  1.3083 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3084 +        }
  1.3085 +
  1.3086 +        #undef glRasterPos4s
  1.3087 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w); }
  1.3088 +        void OVR::GLEContext::glRasterPos4s_Hook(GLshort x, GLshort y, GLshort z, GLshort w)
  1.3089 +        {
  1.3090 +            glRasterPos4s(x, y, z, w);
  1.3091 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3092 +        }
  1.3093 +
  1.3094 +        #undef glRasterPos4sv
  1.3095 +        extern "C" { GLAPI void GLAPIENTRY glRasterPos4sv(const GLshort *v); }
  1.3096 +        void OVR::GLEContext::glRasterPos4sv_Hook(const GLshort *v)
  1.3097 +        {
  1.3098 +            glRasterPos4sv(v);
  1.3099 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3100 +        }
  1.3101 +
  1.3102 +        #undef glReadBuffer
  1.3103 +        extern "C" { GLAPI void GLAPIENTRY glReadBuffer(GLenum mode); }
  1.3104 +        void OVR::GLEContext::glReadBuffer_Hook(GLenum mode)
  1.3105 +        {
  1.3106 +            glReadBuffer(mode);
  1.3107 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3108 +        }
  1.3109 +
  1.3110 +        #undef glReadPixels
  1.3111 +        extern "C" { GLAPI void GLAPIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); }
  1.3112 +        void OVR::GLEContext::glReadPixels_Hook(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels)
  1.3113 +        {
  1.3114 +            glReadPixels(x, y, width, height, format, type, pixels);
  1.3115 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3116 +        }
  1.3117 +
  1.3118 +        #undef glRectd
  1.3119 +        extern "C" { GLAPI void GLAPIENTRY glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); }
  1.3120 +        void OVR::GLEContext::glRectd_Hook(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
  1.3121 +        {
  1.3122 +            glRectd(x1, y1, x2, y2);
  1.3123 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3124 +        }
  1.3125 +
  1.3126 +        #undef glRectdv
  1.3127 +        extern "C" { GLAPI void GLAPIENTRY glRectdv(const GLdouble *v1, const GLdouble *v2); }
  1.3128 +        void OVR::GLEContext::glRectdv_Hook(const GLdouble *v1, const GLdouble *v2)
  1.3129 +        {
  1.3130 +            glRectdv(v1, v2);
  1.3131 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3132 +        }
  1.3133 +
  1.3134 +        #undef glRectf
  1.3135 +        extern "C" { GLAPI void GLAPIENTRY glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); }
  1.3136 +        void OVR::GLEContext::glRectf_Hook(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
  1.3137 +        {
  1.3138 +            glRectf(x1, y1, x2, y2);
  1.3139 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3140 +        }
  1.3141 +
  1.3142 +        #undef glRectfv
  1.3143 +        extern "C" { GLAPI void GLAPIENTRY glRectfv(const GLfloat *v1, const GLfloat *v2); }
  1.3144 +        void OVR::GLEContext::glRectfv_Hook(const GLfloat *v1, const GLfloat *v2)
  1.3145 +        {
  1.3146 +            glRectfv(v1, v2);
  1.3147 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3148 +        }
  1.3149 +
  1.3150 +        #undef glRecti
  1.3151 +        extern "C" { GLAPI void GLAPIENTRY glRecti(GLint x1, GLint y1, GLint x2, GLint y2); }
  1.3152 +        void OVR::GLEContext::glRecti_Hook(GLint x1, GLint y1, GLint x2, GLint y2)
  1.3153 +        {
  1.3154 +            glRecti(x1, y1, x2, y2);
  1.3155 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3156 +        }
  1.3157 +
  1.3158 +        #undef glRectiv
  1.3159 +        extern "C" { GLAPI void GLAPIENTRY glRectiv(const GLint *v1, const GLint *v2); }
  1.3160 +        void OVR::GLEContext::glRectiv_Hook(const GLint *v1, const GLint *v2)
  1.3161 +        {
  1.3162 +            glRectiv(v1, v2);
  1.3163 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3164 +        }
  1.3165 +
  1.3166 +        #undef glRects
  1.3167 +        extern "C" { GLAPI void GLAPIENTRY glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2); }
  1.3168 +        void OVR::GLEContext::glRects_Hook(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
  1.3169 +        {
  1.3170 +            glRects(x1, y1, x2, y2);
  1.3171 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3172 +        }
  1.3173 +
  1.3174 +        #undef glRectsv
  1.3175 +        extern "C" { GLAPI void GLAPIENTRY glRectsv(const GLshort *v1, const GLshort *v2); }
  1.3176 +        void OVR::GLEContext::glRectsv_Hook(const GLshort *v1, const GLshort *v2)
  1.3177 +        {
  1.3178 +            glRectsv(v1, v2);
  1.3179 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3180 +        }
  1.3181 +
  1.3182 +        #undef glRenderMode
  1.3183 +        extern "C" { GLAPI GLint GLAPIENTRY glRenderMode(GLenum mode); }
  1.3184 +        GLint OVR::GLEContext::glRenderMode_Hook(GLenum mode)
  1.3185 +        {
  1.3186 +            GLint  i = glRenderMode(mode);
  1.3187 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3188 +            return i;
  1.3189 +        }
  1.3190 +
  1.3191 +        #undef glRotated
  1.3192 +        extern "C" { GLAPI void GLAPIENTRY glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); }
  1.3193 +        void OVR::GLEContext::glRotated_Hook(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
  1.3194 +        {
  1.3195 +            glRotated(angle, x, y, z);
  1.3196 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3197 +        }
  1.3198 +
  1.3199 +        #undef glRotatef
  1.3200 +        extern "C" { GLAPI void GLAPIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); }
  1.3201 +        void OVR::GLEContext::glRotatef_Hook(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
  1.3202 +        {
  1.3203 +            glRotatef(angle, x, y, z);
  1.3204 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3205 +        }
  1.3206 +
  1.3207 +        #undef glScaled
  1.3208 +        extern "C" { GLAPI void GLAPIENTRY glScaled(GLdouble x, GLdouble y, GLdouble z); }
  1.3209 +        void OVR::GLEContext::glScaled_Hook(GLdouble x, GLdouble y, GLdouble z)
  1.3210 +        {
  1.3211 +            glScaled(x, y, z);
  1.3212 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3213 +        }
  1.3214 +
  1.3215 +        #undef glScalef
  1.3216 +        extern "C" { GLAPI void GLAPIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z); }
  1.3217 +        void OVR::GLEContext::glScalef_Hook(GLfloat x, GLfloat y, GLfloat z)
  1.3218 +        {
  1.3219 +            glScalef(x, y, z);
  1.3220 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3221 +        }
  1.3222 +
  1.3223 +        #undef glScissor
  1.3224 +        extern "C" { GLAPI void GLAPIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height); }
  1.3225 +        void OVR::GLEContext::glScissor_Hook(GLint x, GLint y, GLsizei width, GLsizei height)
  1.3226 +        {
  1.3227 +            glScissor(x, y, width, height);
  1.3228 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3229 +        }
  1.3230 +
  1.3231 +        #undef glSelectBuffer
  1.3232 +        extern "C" { GLAPI void GLAPIENTRY glSelectBuffer(GLsizei size, GLuint *buffer); }
  1.3233 +        void OVR::GLEContext::glSelectBuffer_Hook(GLsizei size, GLuint *buffer)
  1.3234 +        {
  1.3235 +            glSelectBuffer(size, buffer);
  1.3236 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3237 +        }
  1.3238 +
  1.3239 +        #undef glShadeModel
  1.3240 +        extern "C" { GLAPI void GLAPIENTRY glShadeModel(GLenum mode); }
  1.3241 +        void OVR::GLEContext::glShadeModel_Hook(GLenum mode)
  1.3242 +        {
  1.3243 +            glShadeModel(mode);
  1.3244 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3245 +        }
  1.3246 +
  1.3247 +        #undef glStencilFunc
  1.3248 +        extern "C" { GLAPI void GLAPIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask); }
  1.3249 +        void OVR::GLEContext::glStencilFunc_Hook(GLenum func, GLint ref, GLuint mask)
  1.3250 +        {
  1.3251 +            glStencilFunc(func, ref, mask);
  1.3252 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3253 +        }
  1.3254 +
  1.3255 +        #undef glStencilMask
  1.3256 +        extern "C" { GLAPI void GLAPIENTRY glStencilMask(GLuint mask); }
  1.3257 +        void OVR::GLEContext::glStencilMask_Hook(GLuint mask)
  1.3258 +        {
  1.3259 +            glStencilMask(mask);
  1.3260 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3261 +        }
  1.3262 +
  1.3263 +        #undef glStencilOp
  1.3264 +        extern "C" { GLAPI void GLAPIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass); }
  1.3265 +        void OVR::GLEContext::glStencilOp_Hook(GLenum fail, GLenum zfail, GLenum zpass)
  1.3266 +        {
  1.3267 +            glStencilOp(fail, zfail, zpass);
  1.3268 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3269 +        }
  1.3270 +
  1.3271 +        #undef glTexCoord1d
  1.3272 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord1d(GLdouble s); }
  1.3273 +        void OVR::GLEContext::glTexCoord1d_Hook(GLdouble s)
  1.3274 +        {
  1.3275 +            glTexCoord1d(s);
  1.3276 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3277 +        }
  1.3278 +
  1.3279 +        #undef glTexCoord1dv
  1.3280 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord1dv(const GLdouble *v); }
  1.3281 +        void OVR::GLEContext::glTexCoord1dv_Hook(const GLdouble *v)
  1.3282 +        {
  1.3283 +            glTexCoord1dv(v);
  1.3284 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3285 +        }
  1.3286 +
  1.3287 +        #undef glTexCoord1f
  1.3288 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord1f(GLfloat s); }
  1.3289 +        void OVR::GLEContext::glTexCoord1f_Hook(GLfloat s)
  1.3290 +        {
  1.3291 +            glTexCoord1f(s);
  1.3292 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3293 +        }
  1.3294 +
  1.3295 +        #undef glTexCoord1fv
  1.3296 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord1fv(const GLfloat *v); }
  1.3297 +        void OVR::GLEContext::glTexCoord1fv_Hook(const GLfloat *v)
  1.3298 +        {
  1.3299 +            glTexCoord1fv(v);
  1.3300 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3301 +        }
  1.3302 +
  1.3303 +        #undef glTexCoord1i
  1.3304 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord1i(GLint s); }
  1.3305 +        void OVR::GLEContext::glTexCoord1i_Hook(GLint s)
  1.3306 +        {
  1.3307 +            glTexCoord1i(s);
  1.3308 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3309 +        }
  1.3310 +
  1.3311 +        #undef glTexCoord1iv
  1.3312 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord1iv(const GLint *v); }
  1.3313 +        void OVR::GLEContext::glTexCoord1iv_Hook(const GLint *v)
  1.3314 +        {
  1.3315 +            glTexCoord1iv(v);
  1.3316 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3317 +        }
  1.3318 +
  1.3319 +        #undef glTexCoord1s
  1.3320 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord1s(GLshort s); }
  1.3321 +        void OVR::GLEContext::glTexCoord1s_Hook(GLshort s)
  1.3322 +        {
  1.3323 +            glTexCoord1s(s);
  1.3324 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3325 +        }
  1.3326 +
  1.3327 +        #undef glTexCoord1sv
  1.3328 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord1sv(const GLshort *v); }
  1.3329 +        void OVR::GLEContext::glTexCoord1sv_Hook(const GLshort *v)
  1.3330 +        {
  1.3331 +            glTexCoord1sv(v);
  1.3332 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3333 +        }
  1.3334 +
  1.3335 +        #undef glTexCoord2d
  1.3336 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord2d(GLdouble s, GLdouble t); }
  1.3337 +        void OVR::GLEContext::glTexCoord2d_Hook(GLdouble s, GLdouble t)
  1.3338 +        {
  1.3339 +            glTexCoord2d(s, t);
  1.3340 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3341 +        }
  1.3342 +
  1.3343 +        #undef glTexCoord2dv
  1.3344 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord2dv(const GLdouble *v); }
  1.3345 +        void OVR::GLEContext::glTexCoord2dv_Hook(const GLdouble *v)
  1.3346 +        {
  1.3347 +            glTexCoord2dv(v);
  1.3348 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3349 +        }
  1.3350 +
  1.3351 +        #undef glTexCoord2f
  1.3352 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord2f(GLfloat s, GLfloat t); }
  1.3353 +        void OVR::GLEContext::glTexCoord2f_Hook(GLfloat s, GLfloat t)
  1.3354 +        {
  1.3355 +            glTexCoord2f(s, t);
  1.3356 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3357 +        }
  1.3358 +
  1.3359 +        #undef glTexCoord2fv
  1.3360 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord2fv(const GLfloat *v); }
  1.3361 +        void OVR::GLEContext::glTexCoord2fv_Hook(const GLfloat *v)
  1.3362 +        {
  1.3363 +            glTexCoord2fv(v);
  1.3364 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3365 +        }
  1.3366 +
  1.3367 +        #undef glTexCoord2i
  1.3368 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord2i(GLint s, GLint t); }
  1.3369 +        void OVR::GLEContext::glTexCoord2i_Hook(GLint s, GLint t)
  1.3370 +        {
  1.3371 +            glTexCoord2i(s, t);
  1.3372 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3373 +        }
  1.3374 +
  1.3375 +        #undef glTexCoord2iv
  1.3376 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord2iv(const GLint *v); }
  1.3377 +        void OVR::GLEContext::glTexCoord2iv_Hook(const GLint *v)
  1.3378 +        {
  1.3379 +            glTexCoord2iv(v);
  1.3380 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3381 +        }
  1.3382 +
  1.3383 +        #undef glTexCoord2s
  1.3384 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord2s(GLshort s, GLshort t); }
  1.3385 +        void OVR::GLEContext::glTexCoord2s_Hook(GLshort s, GLshort t)
  1.3386 +        {
  1.3387 +            glTexCoord2s(s, t);
  1.3388 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3389 +        }
  1.3390 +
  1.3391 +        #undef glTexCoord2sv
  1.3392 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord2sv(const GLshort *v); }
  1.3393 +        void OVR::GLEContext::glTexCoord2sv_Hook(const GLshort *v)
  1.3394 +        {
  1.3395 +            glTexCoord2sv(v);
  1.3396 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3397 +        }
  1.3398 +
  1.3399 +        #undef glTexCoord3d
  1.3400 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord3d(GLdouble s, GLdouble t, GLdouble r); }
  1.3401 +        void OVR::GLEContext::glTexCoord3d_Hook(GLdouble s, GLdouble t, GLdouble r)
  1.3402 +        {
  1.3403 +            glTexCoord3d(s, t, r);
  1.3404 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3405 +        }
  1.3406 +
  1.3407 +        #undef glTexCoord3dv
  1.3408 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord3dv(const GLdouble *v); }
  1.3409 +        void OVR::GLEContext::glTexCoord3dv_Hook(const GLdouble *v)
  1.3410 +        {
  1.3411 +            glTexCoord3dv(v);
  1.3412 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3413 +        }
  1.3414 +
  1.3415 +        #undef glTexCoord3f
  1.3416 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord3f(GLfloat s, GLfloat t, GLfloat r); }
  1.3417 +        void OVR::GLEContext::glTexCoord3f_Hook(GLfloat s, GLfloat t, GLfloat r)
  1.3418 +        {
  1.3419 +            glTexCoord3f(s, t, r);
  1.3420 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3421 +        }
  1.3422 +
  1.3423 +        #undef glTexCoord3fv
  1.3424 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord3fv(const GLfloat *v); }
  1.3425 +        void OVR::GLEContext::glTexCoord3fv_Hook(const GLfloat *v)
  1.3426 +        {
  1.3427 +            glTexCoord3fv(v);
  1.3428 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3429 +        }
  1.3430 +
  1.3431 +        #undef glTexCoord3i
  1.3432 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord3i(GLint s, GLint t, GLint r); }
  1.3433 +        void OVR::GLEContext::glTexCoord3i_Hook(GLint s, GLint t, GLint r)
  1.3434 +        {
  1.3435 +            glTexCoord3i(s, t, r);
  1.3436 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3437 +        }
  1.3438 +
  1.3439 +        #undef glTexCoord3iv
  1.3440 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord3iv(const GLint *v); }
  1.3441 +        void OVR::GLEContext::glTexCoord3iv_Hook(const GLint *v)
  1.3442 +        {
  1.3443 +            glTexCoord3iv(v);
  1.3444 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3445 +        }
  1.3446 +
  1.3447 +        #undef glTexCoord3s
  1.3448 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord3s(GLshort s, GLshort t, GLshort r); }
  1.3449 +        void OVR::GLEContext::glTexCoord3s_Hook(GLshort s, GLshort t, GLshort r)
  1.3450 +        {
  1.3451 +            glTexCoord3s(s, t, r);
  1.3452 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3453 +        }
  1.3454 +
  1.3455 +        #undef glTexCoord3sv
  1.3456 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord3sv(const GLshort *v); }
  1.3457 +        void OVR::GLEContext::glTexCoord3sv_Hook(const GLshort *v)
  1.3458 +        {
  1.3459 +            glTexCoord3sv(v);
  1.3460 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3461 +        }
  1.3462 +
  1.3463 +        #undef glTexCoord4d
  1.3464 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q); }
  1.3465 +        void OVR::GLEContext::glTexCoord4d_Hook(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
  1.3466 +        {
  1.3467 +            glTexCoord4d(s, t, r, q);
  1.3468 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3469 +        }
  1.3470 +
  1.3471 +        #undef glTexCoord4dv
  1.3472 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord4dv(const GLdouble *v); }
  1.3473 +        void OVR::GLEContext::glTexCoord4dv_Hook(const GLdouble *v)
  1.3474 +        {
  1.3475 +            glTexCoord4dv(v);
  1.3476 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3477 +        }
  1.3478 +
  1.3479 +        #undef glTexCoord4f
  1.3480 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q); }
  1.3481 +        void OVR::GLEContext::glTexCoord4f_Hook(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
  1.3482 +        {
  1.3483 +            glTexCoord4f(s, t, r, q);
  1.3484 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3485 +        }
  1.3486 +
  1.3487 +        #undef glTexCoord4fv
  1.3488 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord4fv(const GLfloat *v); }
  1.3489 +        void OVR::GLEContext::glTexCoord4fv_Hook(const GLfloat *v)
  1.3490 +        {
  1.3491 +            glTexCoord4fv(v);
  1.3492 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3493 +        }
  1.3494 +
  1.3495 +        #undef glTexCoord4i
  1.3496 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord4i(GLint s, GLint t, GLint r, GLint q); }
  1.3497 +        void OVR::GLEContext::glTexCoord4i_Hook(GLint s, GLint t, GLint r, GLint q)
  1.3498 +        {
  1.3499 +            glTexCoord4i(s, t, r, q);
  1.3500 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3501 +        }
  1.3502 +
  1.3503 +        #undef glTexCoord4iv
  1.3504 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord4iv(const GLint *v); }
  1.3505 +        void OVR::GLEContext::glTexCoord4iv_Hook(const GLint *v)
  1.3506 +        {
  1.3507 +            glTexCoord4iv(v);
  1.3508 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3509 +        }
  1.3510 +
  1.3511 +        #undef glTexCoord4s
  1.3512 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q); }
  1.3513 +        void OVR::GLEContext::glTexCoord4s_Hook(GLshort s, GLshort t, GLshort r, GLshort q)
  1.3514 +        {
  1.3515 +            glTexCoord4s(s, t, r, q);
  1.3516 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3517 +        }
  1.3518 +
  1.3519 +        #undef glTexCoord4sv
  1.3520 +        extern "C" { GLAPI void GLAPIENTRY glTexCoord4sv(const GLshort *v); }
  1.3521 +        void OVR::GLEContext::glTexCoord4sv_Hook(const GLshort *v)
  1.3522 +        {
  1.3523 +            glTexCoord4sv(v);
  1.3524 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3525 +        }
  1.3526 +
  1.3527 +        #undef glTexCoordPointer
  1.3528 +        extern "C" { GLAPI void GLAPIENTRY glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer); }
  1.3529 +        void OVR::GLEContext::glTexCoordPointer_Hook(GLint size, GLenum type, GLsizei stride, const void *pointer)
  1.3530 +        {
  1.3531 +            glTexCoordPointer(size, type, stride, pointer);
  1.3532 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3533 +        }
  1.3534 +
  1.3535 +        #undef glTexEnvf
  1.3536 +        extern "C" { GLAPI void GLAPIENTRY glTexEnvf(GLenum target, GLenum pname, GLfloat param); }
  1.3537 +        void OVR::GLEContext::glTexEnvf_Hook(GLenum target, GLenum pname, GLfloat param)
  1.3538 +        {
  1.3539 +            glTexEnvf(target, pname, param);
  1.3540 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3541 +        }
  1.3542 +
  1.3543 +        #undef glTexEnvfv
  1.3544 +        extern "C" { GLAPI void GLAPIENTRY glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params); }
  1.3545 +        void OVR::GLEContext::glTexEnvfv_Hook(GLenum target, GLenum pname, const GLfloat *params)
  1.3546 +        {
  1.3547 +            glTexEnvfv(target, pname, params);
  1.3548 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3549 +        }
  1.3550 +
  1.3551 +        #undef glTexEnvi
  1.3552 +        extern "C" { GLAPI void GLAPIENTRY glTexEnvi(GLenum target, GLenum pname, GLint param); }
  1.3553 +        void OVR::GLEContext::glTexEnvi_Hook(GLenum target, GLenum pname, GLint param)
  1.3554 +        {
  1.3555 +            glTexEnvi(target, pname, param);
  1.3556 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3557 +        }
  1.3558 +
  1.3559 +        #undef glTexEnviv
  1.3560 +        extern "C" { GLAPI void GLAPIENTRY glTexEnviv(GLenum target, GLenum pname, const GLint *params); }
  1.3561 +        void OVR::GLEContext::glTexEnviv_Hook(GLenum target, GLenum pname, const GLint *params)
  1.3562 +        {
  1.3563 +            glTexEnviv(target, pname, params);
  1.3564 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3565 +        }
  1.3566 +
  1.3567 +        #undef glTexGend
  1.3568 +        extern "C" { GLAPI void GLAPIENTRY glTexGend(GLenum coord, GLenum pname, GLdouble param); }
  1.3569 +        void OVR::GLEContext::glTexGend_Hook(GLenum coord, GLenum pname, GLdouble param)
  1.3570 +        {
  1.3571 +            glTexGend(coord, pname, param);
  1.3572 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3573 +        }
  1.3574 +
  1.3575 +        #undef glTexGendv
  1.3576 +        extern "C" { GLAPI void GLAPIENTRY glTexGendv(GLenum coord, GLenum pname, const GLdouble *params); }
  1.3577 +        void OVR::GLEContext::glTexGendv_Hook(GLenum coord, GLenum pname, const GLdouble *params)
  1.3578 +        {
  1.3579 +            glTexGendv(coord, pname, params);
  1.3580 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3581 +        }
  1.3582 +
  1.3583 +        #undef glTexGenf
  1.3584 +        extern "C" { GLAPI void GLAPIENTRY glTexGenf(GLenum coord, GLenum pname, GLfloat param); }
  1.3585 +        void OVR::GLEContext::glTexGenf_Hook(GLenum coord, GLenum pname, GLfloat param)
  1.3586 +        {
  1.3587 +            glTexGenf(coord, pname, param);
  1.3588 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3589 +        }
  1.3590 +
  1.3591 +        #undef glTexGenfv
  1.3592 +        extern "C" { GLAPI void GLAPIENTRY glTexGenfv(GLenum coord, GLenum pname, const GLfloat *params); }
  1.3593 +        void OVR::GLEContext::glTexGenfv_Hook(GLenum coord, GLenum pname, const GLfloat *params)
  1.3594 +        {
  1.3595 +            glTexGenfv(coord, pname, params);
  1.3596 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3597 +        }
  1.3598 +
  1.3599 +        #undef glTexGeni
  1.3600 +        extern "C" { GLAPI void GLAPIENTRY glTexGeni(GLenum coord, GLenum pname, GLint param); }
  1.3601 +        void OVR::GLEContext::glTexGeni_Hook(GLenum coord, GLenum pname, GLint param)
  1.3602 +        {
  1.3603 +            glTexGeni(coord, pname, param);
  1.3604 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3605 +        }
  1.3606 +
  1.3607 +        #undef glTexGeniv
  1.3608 +        extern "C" { GLAPI void GLAPIENTRY glTexGeniv(GLenum coord, GLenum pname, const GLint *params); }
  1.3609 +        void OVR::GLEContext::glTexGeniv_Hook(GLenum coord, GLenum pname, const GLint *params)
  1.3610 +        {
  1.3611 +            glTexGeniv(coord, pname, params);
  1.3612 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3613 +        }
  1.3614 +
  1.3615 +        #undef glTexImage1D
  1.3616 +        extern "C" { GLAPI void GLAPIENTRY glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); }
  1.3617 +        void OVR::GLEContext::glTexImage1D_Hook(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels)
  1.3618 +        {
  1.3619 +            glTexImage1D(target, level, internalformat, width, border, format, type, pixels);
  1.3620 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3621 +        }
  1.3622 +
  1.3623 +        #undef glTexImage2D
  1.3624 +        extern "C" { GLAPI void GLAPIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); }
  1.3625 +        void OVR::GLEContext::glTexImage2D_Hook(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
  1.3626 +        {
  1.3627 +            glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
  1.3628 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3629 +        }
  1.3630 +
  1.3631 +        #undef glTexParameterf
  1.3632 +        extern "C" { GLAPI void GLAPIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param); }
  1.3633 +        void OVR::GLEContext::glTexParameterf_Hook(GLenum target, GLenum pname, GLfloat param)
  1.3634 +        {
  1.3635 +            glTexParameterf(target, pname, param);
  1.3636 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3637 +        }
  1.3638 +
  1.3639 +        #undef glTexParameterfv
  1.3640 +        extern "C" { GLAPI void GLAPIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params); }
  1.3641 +        void OVR::GLEContext::glTexParameterfv_Hook(GLenum target, GLenum pname, const GLfloat *params)
  1.3642 +        {
  1.3643 +            glTexParameterfv(target, pname, params);
  1.3644 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3645 +        }
  1.3646 +
  1.3647 +        #undef glTexParameteri
  1.3648 +        extern "C" { GLAPI void GLAPIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param); }
  1.3649 +        void OVR::GLEContext::glTexParameteri_Hook(GLenum target, GLenum pname, GLint param)
  1.3650 +        {
  1.3651 +            glTexParameteri(target, pname, param);
  1.3652 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3653 +        }
  1.3654 +
  1.3655 +        #undef glTexParameteriv
  1.3656 +        extern "C" { GLAPI void GLAPIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint *params); }
  1.3657 +        void OVR::GLEContext::glTexParameteriv_Hook(GLenum target, GLenum pname, const GLint *params)
  1.3658 +        {
  1.3659 +            glTexParameteriv(target, pname, params);
  1.3660 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3661 +        }
  1.3662 +
  1.3663 +        #undef glTexSubImage1D
  1.3664 +        extern "C" { GLAPI void GLAPIENTRY glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); }
  1.3665 +        void OVR::GLEContext::glTexSubImage1D_Hook(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels)
  1.3666 +        {
  1.3667 +            glTexSubImage1D(target, level, xoffset, width, format, type, pixels);
  1.3668 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3669 +        }
  1.3670 +
  1.3671 +        #undef glTexSubImage2D
  1.3672 +        extern "C" { GLAPI void GLAPIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); }
  1.3673 +        void OVR::GLEContext::glTexSubImage2D_Hook(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
  1.3674 +        {
  1.3675 +            glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
  1.3676 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3677 +        }
  1.3678 +
  1.3679 +        #undef glTranslated
  1.3680 +        extern "C" { GLAPI void GLAPIENTRY glTranslated(GLdouble x, GLdouble y, GLdouble z); }
  1.3681 +        void OVR::GLEContext::glTranslated_Hook(GLdouble x, GLdouble y, GLdouble z)
  1.3682 +        {
  1.3683 +            glTranslated(x, y, z);
  1.3684 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3685 +        }
  1.3686 +
  1.3687 +        #undef glTranslatef
  1.3688 +        extern "C" { GLAPI void GLAPIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z); }
  1.3689 +        void OVR::GLEContext::glTranslatef_Hook(GLfloat x, GLfloat y, GLfloat z)
  1.3690 +        {
  1.3691 +            glTranslatef(x, y, z);
  1.3692 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3693 +        }
  1.3694 +
  1.3695 +        #undef glVertex2d
  1.3696 +        extern "C" { GLAPI void GLAPIENTRY glVertex2d(GLdouble x, GLdouble y); }
  1.3697 +        void OVR::GLEContext::glVertex2d_Hook(GLdouble x, GLdouble y)
  1.3698 +        {
  1.3699 +            glVertex2d(x, y);
  1.3700 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3701 +        }
  1.3702 +
  1.3703 +        #undef glVertex2dv
  1.3704 +        extern "C" { GLAPI void GLAPIENTRY glVertex2dv(const GLdouble *v); }
  1.3705 +        void OVR::GLEContext::glVertex2dv_Hook(const GLdouble *v)
  1.3706 +        {
  1.3707 +            glVertex2dv(v);
  1.3708 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3709 +        }
  1.3710 +
  1.3711 +        #undef glVertex2f
  1.3712 +        extern "C" { GLAPI void GLAPIENTRY glVertex2f(GLfloat x, GLfloat y); }
  1.3713 +        void OVR::GLEContext::glVertex2f_Hook(GLfloat x, GLfloat y)
  1.3714 +        {
  1.3715 +            glVertex2f(x, y);
  1.3716 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3717 +        }
  1.3718 +
  1.3719 +        #undef glVertex2fv
  1.3720 +        extern "C" { GLAPI void GLAPIENTRY glVertex2fv(const GLfloat *v); }
  1.3721 +        void OVR::GLEContext::glVertex2fv_Hook(const GLfloat *v)
  1.3722 +        {
  1.3723 +            glVertex2fv(v);
  1.3724 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3725 +        }
  1.3726 +
  1.3727 +        #undef glVertex2i
  1.3728 +        extern "C" { GLAPI void GLAPIENTRY glVertex2i(GLint x, GLint y); }
  1.3729 +        void OVR::GLEContext::glVertex2i_Hook(GLint x, GLint y)
  1.3730 +        {
  1.3731 +            glVertex2i(x, y);
  1.3732 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3733 +        }
  1.3734 +
  1.3735 +        #undef glVertex2iv
  1.3736 +        extern "C" { GLAPI void GLAPIENTRY glVertex2iv(const GLint *v); }
  1.3737 +        void OVR::GLEContext::glVertex2iv_Hook(const GLint *v)
  1.3738 +        {
  1.3739 +            glVertex2iv(v);
  1.3740 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3741 +        }
  1.3742 +
  1.3743 +        #undef glVertex2s
  1.3744 +        extern "C" { GLAPI void GLAPIENTRY glVertex2s(GLshort x, GLshort y); }
  1.3745 +        void OVR::GLEContext::glVertex2s_Hook(GLshort x, GLshort y)
  1.3746 +        {
  1.3747 +            glVertex2s(x, y);
  1.3748 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3749 +        }
  1.3750 +
  1.3751 +        #undef glVertex2sv
  1.3752 +        extern "C" { GLAPI void GLAPIENTRY glVertex2sv(const GLshort *v); }
  1.3753 +        void OVR::GLEContext::glVertex2sv_Hook(const GLshort *v)
  1.3754 +        {
  1.3755 +            glVertex2sv(v);
  1.3756 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3757 +        }
  1.3758 +
  1.3759 +        #undef glVertex3d
  1.3760 +        extern "C" { GLAPI void GLAPIENTRY glVertex3d(GLdouble x, GLdouble y, GLdouble z); }
  1.3761 +        void OVR::GLEContext::glVertex3d_Hook(GLdouble x, GLdouble y, GLdouble z)
  1.3762 +        {
  1.3763 +            glVertex3d(x, y, z);
  1.3764 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3765 +        }
  1.3766 +
  1.3767 +        #undef glVertex3dv
  1.3768 +        extern "C" { GLAPI void GLAPIENTRY glVertex3dv(const GLdouble *v); }
  1.3769 +        void OVR::GLEContext::glVertex3dv_Hook(const GLdouble *v)
  1.3770 +        {
  1.3771 +            glVertex3dv(v);
  1.3772 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3773 +        }
  1.3774 +
  1.3775 +        #undef glVertex3f
  1.3776 +        extern "C" { GLAPI void GLAPIENTRY glVertex3f(GLfloat x, GLfloat y, GLfloat z); }
  1.3777 +        void OVR::GLEContext::glVertex3f_Hook(GLfloat x, GLfloat y, GLfloat z)
  1.3778 +        {
  1.3779 +            glVertex3f(x, y, z);
  1.3780 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3781 +        }
  1.3782 +
  1.3783 +        #undef glVertex3fv
  1.3784 +        extern "C" { GLAPI void GLAPIENTRY glVertex3fv(const GLfloat *v); }
  1.3785 +        void OVR::GLEContext::glVertex3fv_Hook(const GLfloat *v)
  1.3786 +        {
  1.3787 +            glVertex3fv(v);
  1.3788 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3789 +        }
  1.3790 +
  1.3791 +        #undef glVertex3i
  1.3792 +        extern "C" { GLAPI void GLAPIENTRY glVertex3i(GLint x, GLint y, GLint z); }
  1.3793 +        void OVR::GLEContext::glVertex3i_Hook(GLint x, GLint y, GLint z)
  1.3794 +        {
  1.3795 +            glVertex3i(x, y, z);
  1.3796 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3797 +        }
  1.3798 +
  1.3799 +        #undef glVertex3iv
  1.3800 +        extern "C" { GLAPI void GLAPIENTRY glVertex3iv(const GLint *v); }
  1.3801 +        void OVR::GLEContext::glVertex3iv_Hook(const GLint *v)
  1.3802 +        {
  1.3803 +            glVertex3iv(v);
  1.3804 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3805 +        }
  1.3806 +
  1.3807 +        #undef glVertex3s
  1.3808 +        extern "C" { GLAPI void GLAPIENTRY glVertex3s(GLshort x, GLshort y, GLshort z); }
  1.3809 +        void OVR::GLEContext::glVertex3s_Hook(GLshort x, GLshort y, GLshort z)
  1.3810 +        {
  1.3811 +            glVertex3s(x, y, z);
  1.3812 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3813 +        }
  1.3814 +
  1.3815 +        #undef glVertex3sv
  1.3816 +        extern "C" { GLAPI void GLAPIENTRY glVertex3sv(const GLshort *v); }
  1.3817 +        void OVR::GLEContext::glVertex3sv_Hook(const GLshort *v)
  1.3818 +        {
  1.3819 +            glVertex3sv(v);
  1.3820 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3821 +        }
  1.3822 +
  1.3823 +        #undef glVertex4d
  1.3824 +        extern "C" { GLAPI void GLAPIENTRY glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w); }
  1.3825 +        void OVR::GLEContext::glVertex4d_Hook(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  1.3826 +        {
  1.3827 +            glVertex4d(x, y, z, w);
  1.3828 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3829 +        }
  1.3830 +
  1.3831 +        #undef glVertex4dv
  1.3832 +        extern "C" { GLAPI void GLAPIENTRY glVertex4dv(const GLdouble *v); }
  1.3833 +        void OVR::GLEContext::glVertex4dv_Hook(const GLdouble *v)
  1.3834 +        {
  1.3835 +            glVertex4dv(v);
  1.3836 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3837 +        }
  1.3838 +
  1.3839 +        #undef glVertex4f
  1.3840 +        extern "C" { GLAPI void GLAPIENTRY glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); }
  1.3841 +        void OVR::GLEContext::glVertex4f_Hook(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  1.3842 +        {
  1.3843 +            glVertex4f(x, y, z, w);
  1.3844 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3845 +        }
  1.3846 +
  1.3847 +        #undef glVertex4fv
  1.3848 +        extern "C" { GLAPI void GLAPIENTRY glVertex4fv(const GLfloat *v); }
  1.3849 +        void OVR::GLEContext::glVertex4fv_Hook(const GLfloat *v)
  1.3850 +        {
  1.3851 +            glVertex4fv(v);
  1.3852 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3853 +        }
  1.3854 +
  1.3855 +        #undef glVertex4i
  1.3856 +        extern "C" { GLAPI void GLAPIENTRY glVertex4i(GLint x, GLint y, GLint z, GLint w); }
  1.3857 +        void OVR::GLEContext::glVertex4i_Hook(GLint x, GLint y, GLint z, GLint w)
  1.3858 +        {
  1.3859 +            glVertex4i(x, y, z, w);
  1.3860 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3861 +        }
  1.3862 +
  1.3863 +        #undef glVertex4iv
  1.3864 +        extern "C" { GLAPI void GLAPIENTRY glVertex4iv(const GLint *v); }
  1.3865 +        void OVR::GLEContext::glVertex4iv_Hook(const GLint *v)
  1.3866 +        {
  1.3867 +            glVertex4iv(v);
  1.3868 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3869 +        }
  1.3870 +
  1.3871 +        #undef glVertex4s
  1.3872 +        extern "C" { GLAPI void GLAPIENTRY glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w); }
  1.3873 +        void OVR::GLEContext::glVertex4s_Hook(GLshort x, GLshort y, GLshort z, GLshort w)
  1.3874 +        {
  1.3875 +            glVertex4s(x, y, z, w);
  1.3876 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3877 +        }
  1.3878 +
  1.3879 +        #undef glVertex4sv
  1.3880 +        extern "C" { GLAPI void GLAPIENTRY glVertex4sv(const GLshort *v); }
  1.3881 +        void OVR::GLEContext::glVertex4sv_Hook(const GLshort *v)
  1.3882 +        {
  1.3883 +            glVertex4sv(v);
  1.3884 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3885 +        }
  1.3886 +
  1.3887 +        #undef glVertexPointer
  1.3888 +        extern "C" { GLAPI void GLAPIENTRY glVertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer); }
  1.3889 +        void OVR::GLEContext::glVertexPointer_Hook(GLint size, GLenum type, GLsizei stride, const void *pointer)
  1.3890 +        {
  1.3891 +            glVertexPointer(size, type, stride, pointer);
  1.3892 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3893 +        }
  1.3894 +
  1.3895 +        #undef glViewport
  1.3896 +        extern "C" { GLAPI void GLAPIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height); }
  1.3897 +        void OVR::GLEContext::glViewport_Hook(GLint x, GLint y, GLsizei width, GLsizei height)
  1.3898 +        {
  1.3899 +            glViewport(x, y, width, height);
  1.3900 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3901 +        }
  1.3902 +
  1.3903 +
  1.3904 +
  1.3905 +        // Pointer-based functions
  1.3906 +        void OVR::GLEContext::glBlendColor_Hook(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
  1.3907 +        {
  1.3908 +            if(glBlendColor_Impl)
  1.3909 +                glBlendColor_Impl(red, green, blue, alpha);
  1.3910 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3911 +        }
  1.3912 +
  1.3913 +        void OVR::GLEContext::glBlendEquation_Hook(GLenum mode)
  1.3914 +        {
  1.3915 +            if(glBlendEquation_Impl)
  1.3916 +                glBlendEquation_Impl(mode);
  1.3917 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3918 +        }
  1.3919 +
  1.3920 +        void OVR::GLEContext::glDrawRangeElements_Hook(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)
  1.3921 +        {
  1.3922 +            if(glDrawRangeElements_Impl)
  1.3923 +                glDrawRangeElements_Impl(mode, start, end, count, type, indices);
  1.3924 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3925 +        }
  1.3926 +
  1.3927 +        void OVR::GLEContext::glTexImage3D_Hook(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
  1.3928 +        {
  1.3929 +            if(glTexImage3D_Impl)
  1.3930 +                glTexImage3D_Impl(target, level, internalformat, width, height, depth, border, format, type, pixels);
  1.3931 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3932 +        }
  1.3933 +
  1.3934 +        void OVR::GLEContext::glTexSubImage3D_Hook(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)
  1.3935 +        {
  1.3936 +            if(glTexSubImage3D_Impl)
  1.3937 +                glTexSubImage3D_Impl(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
  1.3938 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3939 +        }
  1.3940 +
  1.3941 +
  1.3942 +        void OVR::GLEContext::glCopyTexSubImage3D_Hook(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
  1.3943 +        {
  1.3944 +            if(glCopyTexSubImage3D_Impl)
  1.3945 +                glCopyTexSubImage3D_Impl(target, level, xoffset, yoffset, zoffset, x, y, width, height);
  1.3946 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3947 +        }
  1.3948 +
  1.3949 +        // GL_VERSION_1_2 deprecated functions
  1.3950 +        /* Not currently supported
  1.3951 +        void OVR::GLEContext::glColorTable_Hook(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)
  1.3952 +        {
  1.3953 +            if(glColorTable_Impl)
  1.3954 +                glColorTable_Impl(target, internalformat, width, format, type, table);
  1.3955 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3956 +        }
  1.3957 +
  1.3958 +        void OVR::GLEContext::glColorTableParameterfv_Hook(GLenum target, GLenum pname, const GLfloat *params)
  1.3959 +        {
  1.3960 +            if(glColorTableParameterfv_Impl)
  1.3961 +                glColorTableParameterfv_Impl(target, pname, params);
  1.3962 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3963 +        }
  1.3964 +
  1.3965 +        void OVR::GLEContext::glColorTableParameteriv_Hook(GLenum target, GLenum pname, const GLint *params)
  1.3966 +        {
  1.3967 +            if(glColorTableParameteriv_Impl)
  1.3968 +                glColorTableParameteriv_Impl(target, pname, params);
  1.3969 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3970 +        }
  1.3971 +
  1.3972 +        void OVR::GLEContext::glCopyColorTable_Hook(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
  1.3973 +        {
  1.3974 +            if(glCopyColorTable_Impl)
  1.3975 +                glCopyColorTable_Impl(target, internalformat, x, y, width);
  1.3976 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3977 +        }
  1.3978 +
  1.3979 +        void OVR::GLEContext::glGetColorTable_Hook(GLenum target, GLenum format, GLenum type, GLvoid *table)
  1.3980 +        {
  1.3981 +            if(glGetColorTable_Impl)
  1.3982 +                glGetColorTable_Impl(target, format, type, table);
  1.3983 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3984 +        }
  1.3985 +
  1.3986 +        void OVR::GLEContext::glGetColorTableParameterfv_Hook(GLenum target, GLenum pname, GLfloat *params)
  1.3987 +        {
  1.3988 +            if(glGetColorTableParameterfv_Impl)
  1.3989 +                glGetColorTableParameterfv_Impl(target, pname, params);
  1.3990 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3991 +        }
  1.3992 +
  1.3993 +        void OVR::GLEContext::glGetColorTableParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
  1.3994 +        {
  1.3995 +            if(glGetColorTableParameteriv_Impl)
  1.3996 +                glGetColorTableParameteriv_Impl(target, pname, params);
  1.3997 +            PostHook(GLE_CURRENT_FUNCTION);
  1.3998 +        }
  1.3999 +
  1.4000 +        void OVR::GLEContext::glColorSubTable_Hook(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data)
  1.4001 +        {
  1.4002 +            if(glColorSubTable_Impl)
  1.4003 +                glColorSubTable_Impl(target, start, count, format, type, data);
  1.4004 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4005 +        }
  1.4006 +
  1.4007 +        void OVR::GLEContext::glCopyColorSubTable_Hook(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
  1.4008 +        {
  1.4009 +            if(glCopyColorSubTable_Impl)
  1.4010 +                glCopyColorSubTable_Impl(target, start, x, y, width);
  1.4011 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4012 +        }
  1.4013 +
  1.4014 +        void OVR::GLEContext::glConvolutionFilter1D_Hook(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)
  1.4015 +        {
  1.4016 +            if(glConvolutionFilter1D_Impl)
  1.4017 +                glConvolutionFilter1D_Impl(target, internalformat, width, format, type, image);
  1.4018 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4019 +        }
  1.4020 +
  1.4021 +        void OVR::GLEContext::glConvolutionFilter2D_Hook(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
  1.4022 +        {
  1.4023 +            if(glConvolutionFilter2D_Impl)
  1.4024 +                glConvolutionFilter2D_Impl(target, internalformat, width, height, format, type, image);
  1.4025 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4026 +        }
  1.4027 +
  1.4028 +        void OVR::GLEContext::glConvolutionParameterf_Hook(GLenum target, GLenum pname, GLfloat params)
  1.4029 +        {
  1.4030 +            if(glConvolutionParameterf_Impl)
  1.4031 +                glConvolutionParameterf_Impl(target, pname, params);
  1.4032 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4033 +        }
  1.4034 +
  1.4035 +        void OVR::GLEContext::glConvolutionParameterfv_Hook(GLenum target, GLenum pname, const GLfloat *params)
  1.4036 +        {
  1.4037 +            if(glConvolutionParameterfv_Impl)
  1.4038 +                glConvolutionParameterfv_Impl(target, pname, params);
  1.4039 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4040 +        }
  1.4041 +
  1.4042 +        void OVR::GLEContext::glConvolutionParameteri_Hook(GLenum target, GLenum pname, GLint params)
  1.4043 +        {
  1.4044 +            if(glConvolutionParameteri_Impl)
  1.4045 +                glConvolutionParameteri_Impl(target, pname, params);
  1.4046 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4047 +        }
  1.4048 +
  1.4049 +        void OVR::GLEContext::glConvolutionParameteriv_Hook(GLenum target, GLenum pname, const GLint *params)
  1.4050 +        {
  1.4051 +            if(glConvolutionParameteriv_Impl)
  1.4052 +                glConvolutionParameteriv_Impl(target, pname, params);
  1.4053 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4054 +        }
  1.4055 +
  1.4056 +        void OVR::GLEContext::glCopyConvolutionFilter1D_Hook(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
  1.4057 +        {
  1.4058 +            if(glCopyConvolutionFilter1D_Impl)
  1.4059 +                glCopyConvolutionFilter1D_Impl(target, internalformat, x, y, width);
  1.4060 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4061 +        }
  1.4062 +
  1.4063 +        void OVR::GLEContext::glCopyConvolutionFilter2D_Hook(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
  1.4064 +        {
  1.4065 +            if(glCopyConvolutionFilter2D_Impl)
  1.4066 +                glCopyConvolutionFilter2D_Impl(target, internalformat, x, y, width, height);
  1.4067 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4068 +        }
  1.4069 +
  1.4070 +        void OVR::GLEContext::glGetConvolutionFilter_Hook(GLenum target, GLenum format, GLenum type, GLvoid *image)
  1.4071 +        {
  1.4072 +            if(glGetConvolutionFilter_Impl)
  1.4073 +                glGetConvolutionFilter_Impl(target, format, type, image);
  1.4074 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4075 +        }
  1.4076 +
  1.4077 +        void OVR::GLEContext::glGetConvolutionParameterfv_Hook(GLenum target, GLenum pname, GLfloat *params)
  1.4078 +        {
  1.4079 +            if(glGetConvolutionParameterfv_Impl)
  1.4080 +                glGetConvolutionParameterfv_Impl(target, pname, params);
  1.4081 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4082 +        }
  1.4083 +
  1.4084 +        void OVR::GLEContext::glGetConvolutionParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
  1.4085 +        {
  1.4086 +            if(glGetConvolutionParameteriv_Impl)
  1.4087 +                glGetConvolutionParameteriv_Impl(target, pname, params);
  1.4088 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4089 +        }
  1.4090 +
  1.4091 +        void OVR::GLEContext::glGetSeparableFilter_Hook(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)
  1.4092 +        {
  1.4093 +            if(glGetSeparableFilter_Impl)
  1.4094 +                glGetSeparableFilter_Impl(target, format, type, row, column, span);
  1.4095 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4096 +        }
  1.4097 +
  1.4098 +        void OVR::GLEContext::glSeparableFilter2D_Hook(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)
  1.4099 +        {
  1.4100 +            if(glSeparableFilter2D_Impl)
  1.4101 +                glSeparableFilter2D_Impl(target, internalformat, width, height, format, type, row, column);
  1.4102 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4103 +        }
  1.4104 +
  1.4105 +        void OVR::GLEContext::glGetHistogram_Hook(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
  1.4106 +        {
  1.4107 +            if(glGetHistogram_Impl)
  1.4108 +                glGetHistogram_Impl(target, reset, format, type, values);
  1.4109 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4110 +        }
  1.4111 +
  1.4112 +        void OVR::GLEContext::glGetHistogramParameterfv_Hook(GLenum target, GLenum pname, GLfloat *params)
  1.4113 +        {
  1.4114 +            if(glGetHistogramParameterfv_Impl)
  1.4115 +                glGetHistogramParameterfv_Impl(target, pname, params);
  1.4116 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4117 +        }
  1.4118 +
  1.4119 +        void OVR::GLEContext::glGetHistogramParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
  1.4120 +        {
  1.4121 +            if(glGetHistogramParameteriv_Impl)
  1.4122 +                glGetHistogramParameteriv_Impl(target, pname, params);
  1.4123 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4124 +        }
  1.4125 +
  1.4126 +        void OVR::GLEContext::glGetMinmax_Hook(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
  1.4127 +        {
  1.4128 +            if(glGetMinmax_Impl)
  1.4129 +                glGetMinmax_Impl(target, reset, format, type, values);
  1.4130 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4131 +        }
  1.4132 +
  1.4133 +        void OVR::GLEContext::glGetMinmaxParameterfv_Hook(GLenum target, GLenum pname, GLfloat *params)
  1.4134 +        {
  1.4135 +            if(glGetMinmaxParameterfv_Impl)
  1.4136 +                glGetMinmaxParameterfv_Impl(target, pname, params);
  1.4137 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4138 +        }
  1.4139 +
  1.4140 +        void OVR::GLEContext::glGetMinmaxParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
  1.4141 +        {
  1.4142 +            if(glGetMinmaxParameteriv_Impl)
  1.4143 +                glGetMinmaxParameteriv_Impl(target, pname, params);
  1.4144 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4145 +        }
  1.4146 +
  1.4147 +        void OVR::GLEContext::glHistogram_Hook(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
  1.4148 +        {
  1.4149 +            if(glHistogram_Impl)
  1.4150 +                glHistogram_Impl(target, width, internalformat, sink);
  1.4151 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4152 +        }
  1.4153 +
  1.4154 +        void OVR::GLEContext::glMinmax_Hook(GLenum target, GLenum internalformat, GLboolean sink)
  1.4155 +        {
  1.4156 +            if(glMinmax_Impl)
  1.4157 +                glMinmax_Impl(target, internalformat, sink);
  1.4158 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4159 +        }
  1.4160 +
  1.4161 +        void OVR::GLEContext::glResetHistogram_Hook(GLenum target)
  1.4162 +        {
  1.4163 +            if(glResetHistogram_Impl)
  1.4164 +                glResetHistogram_Impl(target);
  1.4165 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4166 +        }
  1.4167 +
  1.4168 +        void OVR::GLEContext::glResetMinmax_Hook(GLenum target)
  1.4169 +        {
  1.4170 +            if(glResetMinmax_Impl)
  1.4171 +                glResetMinmax_Impl(target);
  1.4172 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4173 +        }
  1.4174 +        */
  1.4175 +
  1.4176 +        // GL_VERSION_1_3
  1.4177 +        void OVR::GLEContext::glActiveTexture_Hook(GLenum texture)
  1.4178 +        {
  1.4179 +            if(glActiveTexture_Impl)
  1.4180 +                glActiveTexture_Impl(texture);
  1.4181 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4182 +        }
  1.4183 +
  1.4184 +        void OVR::GLEContext::glSampleCoverage_Hook(GLclampf value, GLboolean invert)
  1.4185 +        {
  1.4186 +            if(glSampleCoverage_Impl)
  1.4187 +                glSampleCoverage_Impl(value, invert);
  1.4188 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4189 +        }
  1.4190 +
  1.4191 +        void OVR::GLEContext::glCompressedTexImage3D_Hook(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)
  1.4192 +        {
  1.4193 +            if(glCompressedTexImage3D_Impl)
  1.4194 +                glCompressedTexImage3D_Impl(target, level, internalformat, width, height, depth, border, imageSize, data);
  1.4195 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4196 +        }
  1.4197 +
  1.4198 +        void OVR::GLEContext::glCompressedTexImage2D_Hook(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
  1.4199 +        {
  1.4200 +            if(glCompressedTexImage2D_Impl)
  1.4201 +                glCompressedTexImage2D_Impl(target, level, internalformat, width, height, border, imageSize, data);
  1.4202 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4203 +        }
  1.4204 +
  1.4205 +        void OVR::GLEContext::glCompressedTexImage1D_Hook(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)
  1.4206 +        {
  1.4207 +            if(glCompressedTexImage1D_Impl)
  1.4208 +                glCompressedTexImage1D_Impl(target, level, internalformat, width, border, imageSize, data);
  1.4209 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4210 +        }
  1.4211 +
  1.4212 +        void OVR::GLEContext::glCompressedTexSubImage3D_Hook(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)
  1.4213 +        {
  1.4214 +            if(glCompressedTexSubImage3D_Impl)
  1.4215 +                glCompressedTexSubImage3D_Impl(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
  1.4216 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4217 +        }
  1.4218 +
  1.4219 +        void OVR::GLEContext::glCompressedTexSubImage2D_Hook(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
  1.4220 +        {
  1.4221 +            if(glCompressedTexSubImage2D_Impl)
  1.4222 +                glCompressedTexSubImage2D_Impl(target, level, xoffset, yoffset, width, height, format, imageSize, data);
  1.4223 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4224 +        }
  1.4225 +
  1.4226 +        void OVR::GLEContext::glCompressedTexSubImage1D_Hook(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)
  1.4227 +        {
  1.4228 +            if(glCompressedTexSubImage1D_Impl)
  1.4229 +                glCompressedTexSubImage1D_Impl(target, level, xoffset, width, format, imageSize, data);
  1.4230 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4231 +        }
  1.4232 +
  1.4233 +        void OVR::GLEContext::glGetCompressedTexImage_Hook(GLenum target, GLint level, GLvoid *img)
  1.4234 +        {
  1.4235 +            if(glGetCompressedTexImage_Impl)
  1.4236 +                glGetCompressedTexImage_Impl(target, level, img);
  1.4237 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4238 +        }
  1.4239 +
  1.4240 +
  1.4241 +        // GL_VERSION_1_3 deprecated functions
  1.4242 +        void OVR::GLEContext::glClientActiveTexture_Hook(GLenum texture)
  1.4243 +        {
  1.4244 +            if(glClientActiveTexture_Impl)
  1.4245 +                glClientActiveTexture_Impl(texture);
  1.4246 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4247 +        }
  1.4248 +
  1.4249 +        void OVR::GLEContext::glMultiTexCoord1d_Hook(GLenum target, GLdouble s)
  1.4250 +        {
  1.4251 +            if(glMultiTexCoord1d_Impl)
  1.4252 +                glMultiTexCoord1d_Impl(target, s);
  1.4253 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4254 +        }
  1.4255 +
  1.4256 +        void OVR::GLEContext::glMultiTexCoord1dv_Hook(GLenum target, const GLdouble *v)
  1.4257 +        {
  1.4258 +            if(glMultiTexCoord1dv_Impl)
  1.4259 +                glMultiTexCoord1dv_Impl(target, v);
  1.4260 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4261 +        }
  1.4262 +
  1.4263 +        void OVR::GLEContext::glMultiTexCoord1f_Hook(GLenum target, GLfloat s)
  1.4264 +        {
  1.4265 +            if(glMultiTexCoord1f_Impl)
  1.4266 +                glMultiTexCoord1f_Impl(target, s);
  1.4267 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4268 +        }
  1.4269 +
  1.4270 +        void OVR::GLEContext::glMultiTexCoord1fv_Hook(GLenum target, const GLfloat *v)
  1.4271 +        {
  1.4272 +            if(glMultiTexCoord1fv_Impl)
  1.4273 +                glMultiTexCoord1fv_Impl(target, v);
  1.4274 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4275 +        }
  1.4276 +
  1.4277 +        void OVR::GLEContext::glMultiTexCoord1i_Hook(GLenum target, GLint s)
  1.4278 +        {
  1.4279 +            if(glMultiTexCoord1i_Impl)
  1.4280 +                glMultiTexCoord1i_Impl(target, s);
  1.4281 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4282 +        }
  1.4283 +
  1.4284 +        void OVR::GLEContext::glMultiTexCoord1iv_Hook(GLenum target, const GLint *v)
  1.4285 +        {
  1.4286 +            if(glMultiTexCoord1iv_Impl)
  1.4287 +                glMultiTexCoord1iv_Impl(target, v);
  1.4288 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4289 +        }
  1.4290 +
  1.4291 +        void OVR::GLEContext::glMultiTexCoord1s_Hook(GLenum target, GLshort s)
  1.4292 +        {
  1.4293 +            if(glMultiTexCoord1s_Impl)
  1.4294 +                glMultiTexCoord1s_Impl(target, s);
  1.4295 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4296 +        }
  1.4297 +
  1.4298 +        void OVR::GLEContext::glMultiTexCoord1sv_Hook(GLenum target, const GLshort *v)
  1.4299 +        {
  1.4300 +            if(glMultiTexCoord1sv_Impl)
  1.4301 +                glMultiTexCoord1sv_Impl(target, v);
  1.4302 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4303 +        }
  1.4304 +
  1.4305 +        void OVR::GLEContext::glMultiTexCoord2d_Hook(GLenum target, GLdouble s, GLdouble t)
  1.4306 +        {
  1.4307 +            if(glMultiTexCoord2d_Impl)
  1.4308 +                glMultiTexCoord2d_Impl(target, s, t);
  1.4309 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4310 +        }
  1.4311 +
  1.4312 +        void OVR::GLEContext::glMultiTexCoord2dv_Hook(GLenum target, const GLdouble *v)
  1.4313 +        {
  1.4314 +            if(glMultiTexCoord2dv_Impl)
  1.4315 +                glMultiTexCoord2dv_Impl(target, v);
  1.4316 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4317 +        }
  1.4318 +
  1.4319 +        void OVR::GLEContext::glMultiTexCoord2f_Hook(GLenum target, GLfloat s, GLfloat t)
  1.4320 +        {
  1.4321 +            if(glMultiTexCoord2f_Impl)
  1.4322 +                glMultiTexCoord2f_Impl(target, s, t);
  1.4323 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4324 +        }
  1.4325 +
  1.4326 +        void OVR::GLEContext::glMultiTexCoord2fv_Hook(GLenum target, const GLfloat *v)
  1.4327 +        {
  1.4328 +            if(glMultiTexCoord2fv_Impl)
  1.4329 +                glMultiTexCoord2fv_Impl(target, v);
  1.4330 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4331 +        }
  1.4332 +
  1.4333 +        void OVR::GLEContext::glMultiTexCoord2i_Hook(GLenum target, GLint s, GLint t)
  1.4334 +        {
  1.4335 +            if(glMultiTexCoord2i_Impl)
  1.4336 +                glMultiTexCoord2i_Impl(target, s, t);
  1.4337 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4338 +        }
  1.4339 +
  1.4340 +        void OVR::GLEContext::glMultiTexCoord2iv_Hook(GLenum target, const GLint *v)
  1.4341 +        {
  1.4342 +            if(glMultiTexCoord2iv_Impl)
  1.4343 +                glMultiTexCoord2iv_Impl(target, v);
  1.4344 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4345 +        }
  1.4346 +
  1.4347 +        void OVR::GLEContext::glMultiTexCoord2s_Hook(GLenum target, GLshort s, GLshort t)
  1.4348 +        {
  1.4349 +            if(glMultiTexCoord2s_Impl)
  1.4350 +                glMultiTexCoord2s_Impl(target, s, t);
  1.4351 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4352 +        }
  1.4353 +
  1.4354 +        void OVR::GLEContext::glMultiTexCoord2sv_Hook(GLenum target, const GLshort *v)
  1.4355 +        {
  1.4356 +            if(glMultiTexCoord2sv_Impl)
  1.4357 +                glMultiTexCoord2sv_Impl(target, v);
  1.4358 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4359 +        }
  1.4360 +
  1.4361 +        void OVR::GLEContext::glMultiTexCoord3d_Hook(GLenum target, GLdouble s, GLdouble t, GLdouble r)
  1.4362 +        {
  1.4363 +            if(glMultiTexCoord3d_Impl)
  1.4364 +                glMultiTexCoord3d_Impl(target, s, t, r);
  1.4365 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4366 +        }
  1.4367 +
  1.4368 +        void OVR::GLEContext::glMultiTexCoord3dv_Hook(GLenum target, const GLdouble *v)
  1.4369 +        {
  1.4370 +            if(glMultiTexCoord3dv_Impl)
  1.4371 +                glMultiTexCoord3dv_Impl(target, v);
  1.4372 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4373 +        }
  1.4374 +
  1.4375 +        void OVR::GLEContext::glMultiTexCoord3f_Hook(GLenum target, GLfloat s, GLfloat t, GLfloat r)
  1.4376 +        {
  1.4377 +            if(glMultiTexCoord3f_Impl)
  1.4378 +                glMultiTexCoord3f_Impl(target, s, t, r);
  1.4379 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4380 +        }
  1.4381 +
  1.4382 +        void OVR::GLEContext::glMultiTexCoord3fv_Hook(GLenum target, const GLfloat *v)
  1.4383 +        {
  1.4384 +            if(glMultiTexCoord3fv_Impl)
  1.4385 +                glMultiTexCoord3fv_Impl(target, v);
  1.4386 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4387 +        }
  1.4388 +
  1.4389 +        void OVR::GLEContext::glMultiTexCoord3i_Hook(GLenum target, GLint s, GLint t, GLint r)
  1.4390 +        {
  1.4391 +            if(glMultiTexCoord3i_Impl)
  1.4392 +                glMultiTexCoord3i_Impl(target, s, t, r);
  1.4393 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4394 +        }
  1.4395 +
  1.4396 +        void OVR::GLEContext::glMultiTexCoord3iv_Hook(GLenum target, const GLint *v)
  1.4397 +        {
  1.4398 +            if(glMultiTexCoord3iv_Impl)
  1.4399 +                glMultiTexCoord3iv_Impl(target, v);
  1.4400 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4401 +        }
  1.4402 +
  1.4403 +        void OVR::GLEContext::glMultiTexCoord3s_Hook(GLenum target, GLshort s, GLshort t, GLshort r)
  1.4404 +        {
  1.4405 +            if(glMultiTexCoord3s_Impl)
  1.4406 +                glMultiTexCoord3s_Impl(target, s, t, r);
  1.4407 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4408 +        }
  1.4409 +
  1.4410 +        void OVR::GLEContext::glMultiTexCoord3sv_Hook(GLenum target, const GLshort *v)
  1.4411 +        {
  1.4412 +            if(glMultiTexCoord3sv_Impl)
  1.4413 +                glMultiTexCoord3sv_Impl(target, v);
  1.4414 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4415 +        }
  1.4416 +
  1.4417 +        void OVR::GLEContext::glMultiTexCoord4d_Hook(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
  1.4418 +        {
  1.4419 +            if(glMultiTexCoord4d_Impl)
  1.4420 +                glMultiTexCoord4d_Impl(target, s, t, r, q);
  1.4421 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4422 +        }
  1.4423 +
  1.4424 +        void OVR::GLEContext::glMultiTexCoord4dv_Hook(GLenum target, const GLdouble *v)
  1.4425 +        {
  1.4426 +            if(glMultiTexCoord4dv_Impl)
  1.4427 +                glMultiTexCoord4dv_Impl(target, v);
  1.4428 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4429 +        }
  1.4430 +
  1.4431 +        void OVR::GLEContext::glMultiTexCoord4f_Hook(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
  1.4432 +        {
  1.4433 +            if(glMultiTexCoord4f_Impl)
  1.4434 +                glMultiTexCoord4f_Impl(target, s, t, r, q);
  1.4435 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4436 +        }
  1.4437 +
  1.4438 +        void OVR::GLEContext::glMultiTexCoord4fv_Hook(GLenum target, const GLfloat *v)
  1.4439 +        {
  1.4440 +            if(glMultiTexCoord4fv_Impl)
  1.4441 +                glMultiTexCoord4fv_Impl(target, v);
  1.4442 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4443 +        }
  1.4444 +
  1.4445 +        void OVR::GLEContext::glMultiTexCoord4i_Hook(GLenum target, GLint s, GLint t, GLint r, GLint q)
  1.4446 +        {
  1.4447 +            if(glMultiTexCoord4i_Impl)
  1.4448 +                glMultiTexCoord4i_Impl(target, s, t, r, q);
  1.4449 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4450 +        }
  1.4451 +
  1.4452 +        void OVR::GLEContext::glMultiTexCoord4iv_Hook(GLenum target, const GLint *v)
  1.4453 +        {
  1.4454 +            if(glMultiTexCoord4iv_Impl)
  1.4455 +                glMultiTexCoord4iv_Impl(target, v);
  1.4456 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4457 +        }
  1.4458 +
  1.4459 +        void OVR::GLEContext::glMultiTexCoord4s_Hook(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
  1.4460 +        {
  1.4461 +            if(glMultiTexCoord4s_Impl)
  1.4462 +                glMultiTexCoord4s_Impl(target, s, t, r, q);
  1.4463 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4464 +        }
  1.4465 +
  1.4466 +        void OVR::GLEContext::glMultiTexCoord4sv_Hook(GLenum target, const GLshort *v)
  1.4467 +        {
  1.4468 +            if(glMultiTexCoord4sv_Impl)
  1.4469 +                glMultiTexCoord4sv_Impl(target, v);
  1.4470 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4471 +        }
  1.4472 +
  1.4473 +        void OVR::GLEContext::glLoadTransposeMatrixf_Hook(const GLfloat *m)
  1.4474 +        {
  1.4475 +            if(glLoadTransposeMatrixf_Impl)
  1.4476 +                glLoadTransposeMatrixf_Impl(m);
  1.4477 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4478 +        }
  1.4479 +
  1.4480 +        void OVR::GLEContext::glLoadTransposeMatrixd_Hook(const GLdouble *m)
  1.4481 +        {
  1.4482 +            if(glLoadTransposeMatrixd_Impl)
  1.4483 +                glLoadTransposeMatrixd_Impl(m);
  1.4484 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4485 +        }
  1.4486 +
  1.4487 +        void OVR::GLEContext::glMultTransposeMatrixf_Hook(const GLfloat *m)
  1.4488 +        {
  1.4489 +            if(glMultTransposeMatrixf_Impl)
  1.4490 +                glMultTransposeMatrixf_Impl(m);
  1.4491 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4492 +        }
  1.4493 +
  1.4494 +        void OVR::GLEContext::glMultTransposeMatrixd_Hook(const GLdouble *m)
  1.4495 +        {
  1.4496 +            if(glMultTransposeMatrixd_Impl)
  1.4497 +                glMultTransposeMatrixd_Impl(m);
  1.4498 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4499 +        }
  1.4500 +
  1.4501 +
  1.4502 +        // GL_VERSION_1_4
  1.4503 +        void OVR::GLEContext::glBlendFuncSeparate_Hook(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
  1.4504 +        {
  1.4505 +            if(glBlendFuncSeparate_Impl)
  1.4506 +                glBlendFuncSeparate_Impl(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
  1.4507 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4508 +        }
  1.4509 +
  1.4510 +        void OVR::GLEContext::glMultiDrawArrays_Hook(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)
  1.4511 +        {
  1.4512 +            if(glMultiDrawArrays_Impl)
  1.4513 +                glMultiDrawArrays_Impl(mode, first, count, primcount);
  1.4514 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4515 +        }
  1.4516 +
  1.4517 +        void OVR::GLEContext::glMultiDrawElements_Hook(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount)
  1.4518 +        {
  1.4519 +            if(glMultiDrawElements_Impl)
  1.4520 +                glMultiDrawElements_Impl(mode, count, type, indices, primcount);
  1.4521 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4522 +        }
  1.4523 +
  1.4524 +        void OVR::GLEContext::glPointParameterf_Hook(GLenum pname, GLfloat param)
  1.4525 +        {
  1.4526 +            if(glPointParameterf_Impl)
  1.4527 +                glPointParameterf_Impl(pname, param);
  1.4528 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4529 +        }
  1.4530 +
  1.4531 +        void OVR::GLEContext::glPointParameterfv_Hook(GLenum pname, const GLfloat *params)
  1.4532 +        {
  1.4533 +            if(glPointParameterfv_Impl)
  1.4534 +                glPointParameterfv_Impl(pname, params);
  1.4535 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4536 +        }
  1.4537 +
  1.4538 +        void OVR::GLEContext::glPointParameteri_Hook(GLenum pname, GLint param)
  1.4539 +        {
  1.4540 +            if(glPointParameteri_Impl)
  1.4541 +                glPointParameteri_Impl(pname, param);
  1.4542 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4543 +        }
  1.4544 +
  1.4545 +        void OVR::GLEContext::glPointParameteriv_Hook(GLenum pname, const GLint *params)
  1.4546 +        {
  1.4547 +            if(glPointParameteriv_Impl)
  1.4548 +                glPointParameteriv_Impl(pname, params);
  1.4549 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4550 +        }
  1.4551 +
  1.4552 +
  1.4553 +        // GL_VERSION_1_4 deprecated functions
  1.4554 +        void OVR::GLEContext::glFogCoordf_Hook(GLfloat coord)
  1.4555 +        {
  1.4556 +            if(glFogCoordf_Impl)
  1.4557 +                glFogCoordf_Impl(coord);
  1.4558 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4559 +        }
  1.4560 +
  1.4561 +        void OVR::GLEContext::glFogCoordfv_Hook(const GLfloat *coord)
  1.4562 +        {
  1.4563 +            if(glFogCoordfv_Impl)
  1.4564 +                glFogCoordfv_Impl(coord);
  1.4565 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4566 +        }
  1.4567 +
  1.4568 +        void OVR::GLEContext::glFogCoordd_Hook(GLdouble coord)
  1.4569 +        {
  1.4570 +            if(glFogCoordd_Impl)
  1.4571 +                glFogCoordd_Impl(coord);
  1.4572 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4573 +        }
  1.4574 +
  1.4575 +        void OVR::GLEContext::glFogCoorddv_Hook(const GLdouble *coord)
  1.4576 +        {
  1.4577 +            if(glFogCoorddv_Impl)
  1.4578 +                glFogCoorddv_Impl(coord);
  1.4579 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4580 +        }
  1.4581 +
  1.4582 +        void OVR::GLEContext::glFogCoordPointer_Hook(GLenum type, GLsizei stride, const GLvoid *pointer)
  1.4583 +        {
  1.4584 +            if(glFogCoordPointer_Impl)
  1.4585 +                glFogCoordPointer_Impl(type, stride, pointer);
  1.4586 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4587 +        }
  1.4588 +
  1.4589 +        void OVR::GLEContext::glSecondaryColor3b_Hook(GLbyte red, GLbyte green, GLbyte blue)
  1.4590 +        {
  1.4591 +            if(glSecondaryColor3b_Impl)
  1.4592 +                glSecondaryColor3b_Impl(red, green, blue);
  1.4593 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4594 +        }
  1.4595 +
  1.4596 +        void OVR::GLEContext::glSecondaryColor3bv_Hook(const GLbyte *v)
  1.4597 +        {
  1.4598 +            if(glSecondaryColor3bv_Impl)
  1.4599 +                glSecondaryColor3bv_Impl(v);
  1.4600 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4601 +        }
  1.4602 +
  1.4603 +        void OVR::GLEContext::glSecondaryColor3d_Hook(GLdouble red, GLdouble green, GLdouble blue)
  1.4604 +        {
  1.4605 +            if(glSecondaryColor3d_Impl)
  1.4606 +                glSecondaryColor3d_Impl(red, green, blue);
  1.4607 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4608 +        }
  1.4609 +
  1.4610 +        void OVR::GLEContext::glSecondaryColor3dv_Hook(const GLdouble *v)
  1.4611 +        {
  1.4612 +            if(glSecondaryColor3dv_Impl)
  1.4613 +                glSecondaryColor3dv_Impl(v);
  1.4614 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4615 +        }
  1.4616 +
  1.4617 +        void OVR::GLEContext::glSecondaryColor3f_Hook(GLfloat red, GLfloat green, GLfloat blue)
  1.4618 +        {
  1.4619 +            if(glSecondaryColor3f_Impl)
  1.4620 +                glSecondaryColor3f_Impl(red, green, blue);
  1.4621 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4622 +        }
  1.4623 +
  1.4624 +        void OVR::GLEContext::glSecondaryColor3fv_Hook(const GLfloat *v)
  1.4625 +        {
  1.4626 +            if(glSecondaryColor3fv_Impl)
  1.4627 +                glSecondaryColor3fv_Impl(v);
  1.4628 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4629 +        }
  1.4630 +
  1.4631 +        void OVR::GLEContext::glSecondaryColor3i_Hook(GLint red, GLint green, GLint blue)
  1.4632 +        {
  1.4633 +            if(glSecondaryColor3i_Impl)
  1.4634 +                glSecondaryColor3i_Impl(red, green, blue);
  1.4635 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4636 +        }
  1.4637 +
  1.4638 +        void OVR::GLEContext::glSecondaryColor3iv_Hook(const GLint *v)
  1.4639 +        {
  1.4640 +            if(glSecondaryColor3iv_Impl)
  1.4641 +                glSecondaryColor3iv_Impl(v);
  1.4642 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4643 +        }
  1.4644 +
  1.4645 +        void OVR::GLEContext::glSecondaryColor3s_Hook(GLshort red, GLshort green, GLshort blue)
  1.4646 +        {
  1.4647 +            if(glSecondaryColor3s_Impl)
  1.4648 +                glSecondaryColor3s_Impl(red, green, blue);
  1.4649 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4650 +        }
  1.4651 +
  1.4652 +        void OVR::GLEContext::glSecondaryColor3sv_Hook(const GLshort *v)
  1.4653 +        {
  1.4654 +            if(glSecondaryColor3sv_Impl)
  1.4655 +                glSecondaryColor3sv_Impl(v);
  1.4656 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4657 +        }
  1.4658 +
  1.4659 +        void OVR::GLEContext::glSecondaryColor3ub_Hook(GLubyte red, GLubyte green, GLubyte blue)
  1.4660 +        {
  1.4661 +            if(glSecondaryColor3ub_Impl)
  1.4662 +                glSecondaryColor3ub_Impl(red, green, blue);
  1.4663 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4664 +        }
  1.4665 +
  1.4666 +        void OVR::GLEContext::glSecondaryColor3ubv_Hook(const GLubyte *v)
  1.4667 +        {
  1.4668 +            if(glSecondaryColor3ubv_Impl)
  1.4669 +                glSecondaryColor3ubv_Impl(v);
  1.4670 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4671 +        }
  1.4672 +
  1.4673 +        void OVR::GLEContext::glSecondaryColor3ui_Hook(GLuint red, GLuint green, GLuint blue)
  1.4674 +        {
  1.4675 +            if(glSecondaryColor3ui_Impl)
  1.4676 +                glSecondaryColor3ui_Impl(red, green, blue);
  1.4677 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4678 +        }
  1.4679 +
  1.4680 +        void OVR::GLEContext::glSecondaryColor3uiv_Hook(const GLuint *v)
  1.4681 +        {
  1.4682 +            if(glSecondaryColor3uiv_Impl)
  1.4683 +                glSecondaryColor3uiv_Impl(v);
  1.4684 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4685 +        }
  1.4686 +
  1.4687 +        void OVR::GLEContext::glSecondaryColor3us_Hook(GLushort red, GLushort green, GLushort blue)
  1.4688 +        {
  1.4689 +            if(glSecondaryColor3us_Impl)
  1.4690 +                glSecondaryColor3us_Impl(red, green, blue);
  1.4691 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4692 +        }
  1.4693 +
  1.4694 +        void OVR::GLEContext::glSecondaryColor3usv_Hook(const GLushort *v)
  1.4695 +        {
  1.4696 +            if(glSecondaryColor3usv_Impl)
  1.4697 +                glSecondaryColor3usv_Impl(v);
  1.4698 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4699 +        }
  1.4700 +
  1.4701 +        void OVR::GLEContext::glSecondaryColorPointer_Hook(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  1.4702 +        {
  1.4703 +            if(glSecondaryColorPointer_Impl)
  1.4704 +                glSecondaryColorPointer_Impl(size, type, stride, pointer);
  1.4705 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4706 +        }
  1.4707 +
  1.4708 +        void OVR::GLEContext::glWindowPos2d_Hook(GLdouble x, GLdouble y)
  1.4709 +        {
  1.4710 +            if(glWindowPos2d_Impl)
  1.4711 +                glWindowPos2d_Impl(x, y);
  1.4712 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4713 +        }
  1.4714 +
  1.4715 +        void OVR::GLEContext::glWindowPos2dv_Hook(const GLdouble *v)
  1.4716 +        {
  1.4717 +            if(glWindowPos2dv_Impl)
  1.4718 +                glWindowPos2dv_Impl(v);
  1.4719 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4720 +        }
  1.4721 +
  1.4722 +        void OVR::GLEContext::glWindowPos2f_Hook(GLfloat x, GLfloat y)
  1.4723 +        {
  1.4724 +            if(glWindowPos2f_Impl)
  1.4725 +                glWindowPos2f_Impl(x, y);
  1.4726 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4727 +        }
  1.4728 +
  1.4729 +        void OVR::GLEContext::glWindowPos2fv_Hook(const GLfloat *v)
  1.4730 +        {
  1.4731 +            if(glWindowPos2fv_Impl)
  1.4732 +                glWindowPos2fv_Impl(v);
  1.4733 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4734 +        }
  1.4735 +
  1.4736 +        void OVR::GLEContext::glWindowPos2i_Hook(GLint x, GLint y)
  1.4737 +        {
  1.4738 +            if(glWindowPos2i_Impl)
  1.4739 +                glWindowPos2i_Impl(x, y);
  1.4740 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4741 +        }
  1.4742 +
  1.4743 +        void OVR::GLEContext::glWindowPos2iv_Hook(const GLint *v)
  1.4744 +        {
  1.4745 +            if(glWindowPos2iv_Impl)
  1.4746 +                glWindowPos2iv_Impl(v);
  1.4747 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4748 +        }
  1.4749 +
  1.4750 +        void OVR::GLEContext::glWindowPos2s_Hook(GLshort x, GLshort y)
  1.4751 +        {
  1.4752 +            if(glWindowPos2s_Impl)
  1.4753 +                glWindowPos2s_Impl(x, y);
  1.4754 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4755 +        }
  1.4756 +
  1.4757 +        void OVR::GLEContext::glWindowPos2sv_Hook(const GLshort *v)
  1.4758 +        {
  1.4759 +            if(glWindowPos2sv_Impl)
  1.4760 +                glWindowPos2sv_Impl(v);
  1.4761 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4762 +        }
  1.4763 +
  1.4764 +        void OVR::GLEContext::glWindowPos3d_Hook(GLdouble x, GLdouble y, GLdouble z)
  1.4765 +        {
  1.4766 +            if(glWindowPos3d_Impl)
  1.4767 +                glWindowPos3d_Impl(x, y, z);
  1.4768 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4769 +        }
  1.4770 +
  1.4771 +        void OVR::GLEContext::glWindowPos3dv_Hook(const GLdouble *v)
  1.4772 +        {
  1.4773 +            if(glWindowPos3dv_Impl)
  1.4774 +                glWindowPos3dv_Impl(v);
  1.4775 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4776 +        }
  1.4777 +
  1.4778 +        void OVR::GLEContext::glWindowPos3f_Hook(GLfloat x, GLfloat y, GLfloat z)
  1.4779 +        {
  1.4780 +            if(glWindowPos3f_Impl)
  1.4781 +                glWindowPos3f_Impl(x, y, z);
  1.4782 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4783 +        }
  1.4784 +
  1.4785 +        void OVR::GLEContext::glWindowPos3fv_Hook(const GLfloat *v)
  1.4786 +        {
  1.4787 +            if(glWindowPos3fv_Impl)
  1.4788 +                glWindowPos3fv_Impl(v);
  1.4789 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4790 +        }
  1.4791 +
  1.4792 +        void OVR::GLEContext::glWindowPos3i_Hook(GLint x, GLint y, GLint z)
  1.4793 +        {
  1.4794 +            if(glWindowPos3i_Impl)
  1.4795 +                glWindowPos3i_Impl(x, y, z);
  1.4796 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4797 +        }
  1.4798 +
  1.4799 +        void OVR::GLEContext::glWindowPos3iv_Hook(const GLint *v)
  1.4800 +        {
  1.4801 +            if(glWindowPos3iv_Impl)
  1.4802 +                glWindowPos3iv_Impl(v);
  1.4803 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4804 +        }
  1.4805 +
  1.4806 +        void OVR::GLEContext::glWindowPos3s_Hook(GLshort x, GLshort y, GLshort z)
  1.4807 +        {
  1.4808 +            if(glWindowPos3s_Impl)
  1.4809 +                glWindowPos3s_Impl(x, y, z);
  1.4810 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4811 +        }
  1.4812 +
  1.4813 +        void OVR::GLEContext::glWindowPos3sv_Hook(const GLshort *v)
  1.4814 +        {
  1.4815 +            if(glWindowPos3sv_Impl)
  1.4816 +                glWindowPos3sv_Impl(v);
  1.4817 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4818 +        }
  1.4819 +
  1.4820 +
  1.4821 +        // GL_VERSION_1_5
  1.4822 +        void OVR::GLEContext::glGenQueries_Hook(GLsizei n, GLuint *ids)
  1.4823 +        {
  1.4824 +            if(glGenQueries_Impl)
  1.4825 +                glGenQueries_Impl(n, ids);
  1.4826 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4827 +        }
  1.4828 +
  1.4829 +        void OVR::GLEContext::glDeleteQueries_Hook(GLsizei n, const GLuint *ids)
  1.4830 +        {
  1.4831 +            if(glDeleteQueries_Impl)
  1.4832 +                glDeleteQueries_Impl(n, ids);
  1.4833 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4834 +        }
  1.4835 +
  1.4836 +        GLboolean OVR::GLEContext::glIsQuery_Hook(GLuint id)
  1.4837 +        {
  1.4838 +            GLboolean b = GL_FALSE;
  1.4839 +            if(glIsQuery_Impl)
  1.4840 +                b = glIsQuery_Impl(id);
  1.4841 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4842 +            return b;
  1.4843 +        }
  1.4844 +
  1.4845 +        void OVR::GLEContext::glBeginQuery_Hook(GLenum target, GLuint id)
  1.4846 +        {
  1.4847 +            if(glBeginQuery_Impl)
  1.4848 +                glBeginQuery_Impl(target, id);
  1.4849 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4850 +        }
  1.4851 +
  1.4852 +        void OVR::GLEContext::glEndQuery_Hook(GLenum target)
  1.4853 +        {
  1.4854 +            if(glEndQuery_Impl)
  1.4855 +                glEndQuery_Impl(target);
  1.4856 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4857 +        }
  1.4858 +
  1.4859 +        void OVR::GLEContext::glGetQueryiv_Hook(GLenum target, GLenum pname, GLint *params)
  1.4860 +        {
  1.4861 +            if(glGetQueryiv_Impl)
  1.4862 +                glGetQueryiv_Impl(target, pname, params);
  1.4863 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4864 +        }
  1.4865 +
  1.4866 +        void OVR::GLEContext::glGetQueryObjectiv_Hook(GLuint id, GLenum pname, GLint *params)
  1.4867 +        {
  1.4868 +            if(glGetQueryObjectiv_Impl)
  1.4869 +                glGetQueryObjectiv_Impl(id, pname, params);
  1.4870 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4871 +        }
  1.4872 +
  1.4873 +        void OVR::GLEContext::glGetQueryObjectuiv_Hook(GLuint id, GLenum pname, GLuint *params)
  1.4874 +        {
  1.4875 +            if(glGetQueryObjectuiv_Impl)
  1.4876 +                glGetQueryObjectuiv_Impl(id, pname, params);
  1.4877 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4878 +        }
  1.4879 +
  1.4880 +        void OVR::GLEContext::glBindBuffer_Hook(GLenum target, GLuint buffer)
  1.4881 +        {
  1.4882 +            if(glBindBuffer_Impl)
  1.4883 +                glBindBuffer_Impl(target, buffer);
  1.4884 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4885 +        }
  1.4886 +
  1.4887 +        void OVR::GLEContext::glDeleteBuffers_Hook(GLsizei n, const GLuint *buffers)
  1.4888 +        {
  1.4889 +            if(glDeleteBuffers_Impl)
  1.4890 +                glDeleteBuffers_Impl(n, buffers);
  1.4891 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4892 +        }
  1.4893 +
  1.4894 +        void OVR::GLEContext::glGenBuffers_Hook(GLsizei n, GLuint *buffers)
  1.4895 +        {
  1.4896 +            if(glGenBuffers_Impl)
  1.4897 +                glGenBuffers_Impl(n, buffers);
  1.4898 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4899 +        }
  1.4900 +
  1.4901 +        GLboolean OVR::GLEContext::glIsBuffer_Hook(GLuint buffer)
  1.4902 +        {
  1.4903 +            GLboolean b = GL_FALSE;
  1.4904 +            if(glIsBuffer_Impl)
  1.4905 +                b = glIsBuffer_Impl(buffer);
  1.4906 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4907 +            return b;
  1.4908 +        }
  1.4909 +
  1.4910 +        void OVR::GLEContext::glBufferData_Hook(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
  1.4911 +        {
  1.4912 +            if(glBufferData_Impl)
  1.4913 +                glBufferData_Impl(target, size, data, usage);
  1.4914 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4915 +        }
  1.4916 +
  1.4917 +        void OVR::GLEContext::glBufferSubData_Hook(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)
  1.4918 +        {
  1.4919 +            if(glBufferSubData_Impl)
  1.4920 +                glBufferSubData_Impl(target, offset, size, data);
  1.4921 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4922 +        }
  1.4923 +
  1.4924 +        void OVR::GLEContext::glGetBufferSubData_Hook(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data)
  1.4925 +        {
  1.4926 +            if(glGetBufferSubData_Impl)
  1.4927 +                glGetBufferSubData_Impl(target, offset, size, data);
  1.4928 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4929 +        }
  1.4930 +
  1.4931 +        GLvoid* OVR::GLEContext::glMapBuffer_Hook(GLenum target, GLenum access)
  1.4932 +        {
  1.4933 +            GLvoid* p = NULL;
  1.4934 +            if(glMapBuffer_Impl)
  1.4935 +                p = glMapBuffer_Impl(target, access);
  1.4936 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4937 +            return p;
  1.4938 +        }
  1.4939 +
  1.4940 +        GLboolean OVR::GLEContext::glUnmapBuffer_Hook(GLenum target)
  1.4941 +        {
  1.4942 +            GLboolean b = GL_FALSE;
  1.4943 +            if(glUnmapBuffer_Impl)
  1.4944 +                b = glUnmapBuffer_Impl(target);
  1.4945 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4946 +            return b;
  1.4947 +        }
  1.4948 +
  1.4949 +        void OVR::GLEContext::glGetBufferParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
  1.4950 +        {
  1.4951 +            if(glGetBufferParameteriv_Impl)
  1.4952 +                glGetBufferParameteriv_Impl(target, pname, params);
  1.4953 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4954 +        }
  1.4955 +
  1.4956 +        void OVR::GLEContext::glGetBufferPointerv_Hook(GLenum target, GLenum pname, GLvoid* *params)
  1.4957 +        {
  1.4958 +            if(glGetBufferPointerv_Impl)
  1.4959 +                glGetBufferPointerv_Impl(target, pname, params);
  1.4960 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4961 +        }
  1.4962 +
  1.4963 +
  1.4964 +        // GL_VERSION_2_0
  1.4965 +        void OVR::GLEContext::glBlendEquationSeparate_Hook(GLenum modeRGB, GLenum modeAlpha)
  1.4966 +        {
  1.4967 +            if(glBlendEquationSeparate_Impl)
  1.4968 +                glBlendEquationSeparate_Impl(modeRGB, modeAlpha);
  1.4969 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4970 +        }
  1.4971 +
  1.4972 +        void OVR::GLEContext::glDrawBuffers_Hook(GLsizei n, const GLenum *bufs)
  1.4973 +        {
  1.4974 +            if(glDrawBuffers_Impl)
  1.4975 +                glDrawBuffers_Impl(n, bufs);
  1.4976 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4977 +        }
  1.4978 +
  1.4979 +        void OVR::GLEContext::glStencilOpSeparate_Hook(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
  1.4980 +        {
  1.4981 +            if(glStencilOpSeparate_Impl)
  1.4982 +                glStencilOpSeparate_Impl(face, sfail, dpfail, dppass);
  1.4983 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4984 +        }
  1.4985 +
  1.4986 +        void OVR::GLEContext::glStencilFuncSeparate_Hook(GLenum face, GLenum func, GLint ref, GLuint mask)
  1.4987 +        {
  1.4988 +            if(glStencilFuncSeparate_Impl)
  1.4989 +                glStencilFuncSeparate_Impl(face, func, ref, mask);
  1.4990 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4991 +        }
  1.4992 +
  1.4993 +        void OVR::GLEContext::glStencilMaskSeparate_Hook(GLenum face, GLuint mask)
  1.4994 +        {
  1.4995 +            if(glStencilMaskSeparate_Impl)
  1.4996 +                glStencilMaskSeparate_Impl(face, mask);
  1.4997 +            PostHook(GLE_CURRENT_FUNCTION);
  1.4998 +        }
  1.4999 +
  1.5000 +        void OVR::GLEContext::glAttachShader_Hook(GLuint program, GLuint shader)
  1.5001 +        {
  1.5002 +            if(glAttachShader_Impl)
  1.5003 +                glAttachShader_Impl(program, shader);
  1.5004 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5005 +        }
  1.5006 +
  1.5007 +        void OVR::GLEContext::glBindAttribLocation_Hook(GLuint program, GLuint index, const GLchar *name)
  1.5008 +        {
  1.5009 +            if(glBindAttribLocation_Impl)
  1.5010 +                glBindAttribLocation_Impl(program, index, name);
  1.5011 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5012 +        }
  1.5013 +
  1.5014 +        void OVR::GLEContext::glCompileShader_Hook(GLuint shader)
  1.5015 +        {
  1.5016 +            if(glCompileShader_Impl)
  1.5017 +                glCompileShader_Impl(shader);
  1.5018 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5019 +        }
  1.5020 +
  1.5021 +        GLuint OVR::GLEContext::glCreateProgram_Hook()
  1.5022 +        {
  1.5023 +            GLuint u = 0;
  1.5024 +            if(glCreateProgram_Impl)
  1.5025 +                u = glCreateProgram_Impl();
  1.5026 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5027 +            return u;
  1.5028 +        }
  1.5029 +
  1.5030 +        GLuint OVR::GLEContext::glCreateShader_Hook(GLenum type)
  1.5031 +        {
  1.5032 +            GLuint u = 0;
  1.5033 +            if(glCreateShader_Impl)
  1.5034 +                u = glCreateShader_Impl(type);
  1.5035 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5036 +            return u;
  1.5037 +        }
  1.5038 +
  1.5039 +        void OVR::GLEContext::glDeleteProgram_Hook(GLuint program)
  1.5040 +        {
  1.5041 +            if(glDeleteProgram_Impl)
  1.5042 +                glDeleteProgram_Impl(program);
  1.5043 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5044 +        }
  1.5045 +
  1.5046 +        void OVR::GLEContext::glDeleteShader_Hook(GLuint shader)
  1.5047 +        {
  1.5048 +            if(glDeleteShader_Impl)
  1.5049 +                glDeleteShader_Impl(shader);
  1.5050 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5051 +        }
  1.5052 +
  1.5053 +        void OVR::GLEContext::glDetachShader_Hook(GLuint program, GLuint shader)
  1.5054 +        {
  1.5055 +            if(glDetachShader_Impl)
  1.5056 +                glDetachShader_Impl(program, shader);
  1.5057 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5058 +        }
  1.5059 +
  1.5060 +        void OVR::GLEContext::glDisableVertexAttribArray_Hook(GLuint index)
  1.5061 +        {
  1.5062 +            if(glDisableVertexAttribArray_Impl)
  1.5063 +                glDisableVertexAttribArray_Impl(index);
  1.5064 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5065 +        }
  1.5066 +
  1.5067 +        void OVR::GLEContext::glEnableVertexAttribArray_Hook(GLuint index)
  1.5068 +        {
  1.5069 +            if(glEnableVertexAttribArray_Impl)
  1.5070 +                glEnableVertexAttribArray_Impl(index);
  1.5071 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5072 +        }
  1.5073 +
  1.5074 +        void OVR::GLEContext::glGetActiveAttrib_Hook(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
  1.5075 +        {
  1.5076 +            if(glGetActiveAttrib_Impl)
  1.5077 +                glGetActiveAttrib_Impl(program, index, bufSize, length, size, type, name);
  1.5078 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5079 +        }
  1.5080 +
  1.5081 +        void OVR::GLEContext::glGetActiveUniform_Hook(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
  1.5082 +        {
  1.5083 +            if(glGetActiveUniform_Impl)
  1.5084 +                glGetActiveUniform_Impl(program, index, bufSize, length, size, type, name);
  1.5085 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5086 +        }
  1.5087 +
  1.5088 +        void OVR::GLEContext::glGetAttachedShaders_Hook(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj)
  1.5089 +        {
  1.5090 +            if(glGetAttachedShaders_Impl)
  1.5091 +                glGetAttachedShaders_Impl(program, maxCount, count, obj);
  1.5092 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5093 +        }
  1.5094 +
  1.5095 +        GLint OVR::GLEContext::glGetAttribLocation_Hook(GLuint program, const GLchar *name)
  1.5096 +        {
  1.5097 +            GLint i = 0;
  1.5098 +            if(glGetAttribLocation_Impl)
  1.5099 +                i = glGetAttribLocation_Impl(program, name);
  1.5100 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5101 +            return i;
  1.5102 +        }
  1.5103 +
  1.5104 +        void OVR::GLEContext::glGetProgramiv_Hook(GLuint program, GLenum pname, GLint *params)
  1.5105 +        {
  1.5106 +            if(glGetProgramiv_Impl)
  1.5107 +                glGetProgramiv_Impl(program, pname, params);
  1.5108 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5109 +        }
  1.5110 +
  1.5111 +        void OVR::GLEContext::glGetProgramInfoLog_Hook(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
  1.5112 +        {
  1.5113 +            if(glGetProgramInfoLog_Impl)
  1.5114 +                glGetProgramInfoLog_Impl(program, bufSize, length, infoLog);
  1.5115 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5116 +        }
  1.5117 +
  1.5118 +        void OVR::GLEContext::glGetShaderiv_Hook(GLuint shader, GLenum pname, GLint *params)
  1.5119 +        {
  1.5120 +            if(glGetShaderiv_Impl)
  1.5121 +                glGetShaderiv_Impl(shader, pname, params);
  1.5122 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5123 +        }
  1.5124 +
  1.5125 +        void OVR::GLEContext::glGetShaderInfoLog_Hook(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
  1.5126 +        {
  1.5127 +            if(glGetShaderInfoLog_Impl)
  1.5128 +                glGetShaderInfoLog_Impl(shader, bufSize, length, infoLog);
  1.5129 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5130 +        }
  1.5131 +
  1.5132 +        void OVR::GLEContext::glGetShaderSource_Hook(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)
  1.5133 +        {
  1.5134 +            if(glGetShaderSource_Impl)
  1.5135 +                glGetShaderSource_Impl(shader, bufSize, length, source);
  1.5136 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5137 +        }
  1.5138 +
  1.5139 +        GLint OVR::GLEContext::glGetUniformLocation_Hook(GLuint program, const GLchar *name)
  1.5140 +        {
  1.5141 +            GLint i = 0;
  1.5142 +            if(glGetUniformLocation_Impl)
  1.5143 +                i = glGetUniformLocation_Impl(program, name);
  1.5144 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5145 +            return i;
  1.5146 +        }
  1.5147 +
  1.5148 +        void OVR::GLEContext::glGetUniformfv_Hook(GLuint program, GLint location, GLfloat *params)
  1.5149 +        {
  1.5150 +            if(glGetUniformfv_Impl)
  1.5151 +                glGetUniformfv_Impl(program, location, params);
  1.5152 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5153 +        }
  1.5154 +
  1.5155 +        void OVR::GLEContext::glGetUniformiv_Hook(GLuint program, GLint location, GLint *params)
  1.5156 +        {
  1.5157 +            if(glGetUniformiv_Impl)
  1.5158 +                glGetUniformiv_Impl(program, location, params);
  1.5159 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5160 +        }
  1.5161 +
  1.5162 +        void OVR::GLEContext::glGetVertexAttribdv_Hook(GLuint index, GLenum pname, GLdouble *params)
  1.5163 +        {
  1.5164 +            if(glGetVertexAttribdv_Impl)
  1.5165 +                glGetVertexAttribdv_Impl(index, pname, params);
  1.5166 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5167 +        }
  1.5168 +
  1.5169 +        void OVR::GLEContext::glGetVertexAttribfv_Hook(GLuint index, GLenum pname, GLfloat *params)
  1.5170 +        {
  1.5171 +            if(glGetVertexAttribfv_Impl)
  1.5172 +                glGetVertexAttribfv_Impl(index, pname, params);
  1.5173 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5174 +        }
  1.5175 +
  1.5176 +        void OVR::GLEContext::glGetVertexAttribiv_Hook(GLuint index, GLenum pname, GLint *params)
  1.5177 +        {
  1.5178 +            if(glGetVertexAttribiv_Impl)
  1.5179 +                glGetVertexAttribiv_Impl(index, pname, params);
  1.5180 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5181 +        }
  1.5182 +
  1.5183 +        void OVR::GLEContext::glGetVertexAttribPointerv_Hook(GLuint index, GLenum pname, GLvoid* *pointer)
  1.5184 +        {
  1.5185 +            if(glGetVertexAttribPointerv_Impl)
  1.5186 +                glGetVertexAttribPointerv_Impl(index, pname, pointer);
  1.5187 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5188 +        }
  1.5189 +
  1.5190 +        GLboolean OVR::GLEContext::glIsProgram_Hook(GLuint program)
  1.5191 +        {
  1.5192 +            GLboolean b = GL_FALSE;
  1.5193 +            if(glIsProgram_Impl)
  1.5194 +                b = glIsProgram_Impl(program);
  1.5195 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5196 +            return b;
  1.5197 +        }
  1.5198 +
  1.5199 +        GLboolean OVR::GLEContext::glIsShader_Hook(GLuint shader)
  1.5200 +        {
  1.5201 +            GLboolean b = GL_FALSE;
  1.5202 +            if(glIsShader_Impl)
  1.5203 +                b = glIsShader_Impl(shader);
  1.5204 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5205 +            return b;
  1.5206 +        }
  1.5207 +
  1.5208 +        void OVR::GLEContext::glLinkProgram_Hook(GLuint program)
  1.5209 +        {
  1.5210 +            if(glLinkProgram_Impl)
  1.5211 +                glLinkProgram_Impl(program);
  1.5212 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5213 +        }
  1.5214 +
  1.5215 +        void OVR::GLEContext::glShaderSource_Hook(GLuint shader, GLsizei count, const GLchar* *string, const GLint *length)
  1.5216 +        {
  1.5217 +            if(glShaderSource_Impl)
  1.5218 +                glShaderSource_Impl(shader, count, string, length);
  1.5219 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5220 +        }
  1.5221 +
  1.5222 +        void OVR::GLEContext::glUseProgram_Hook(GLuint program)
  1.5223 +        {
  1.5224 +            if(glUseProgram_Impl)
  1.5225 +                glUseProgram_Impl(program);
  1.5226 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5227 +        }
  1.5228 +
  1.5229 +        void OVR::GLEContext::glUniform1f_Hook(GLint location, GLfloat v0)
  1.5230 +        {
  1.5231 +            if(glUniform1f_Impl)
  1.5232 +                glUniform1f_Impl(location, v0);
  1.5233 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5234 +        }
  1.5235 +
  1.5236 +        void OVR::GLEContext::glUniform2f_Hook(GLint location, GLfloat v0, GLfloat v1)
  1.5237 +        {
  1.5238 +            if(glUniform2f_Impl)
  1.5239 +                glUniform2f_Impl(location, v0, v1);
  1.5240 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5241 +        }
  1.5242 +
  1.5243 +        void OVR::GLEContext::glUniform3f_Hook(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
  1.5244 +        {
  1.5245 +            if(glUniform3f_Impl)
  1.5246 +                glUniform3f_Impl(location, v0, v1, v2);
  1.5247 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5248 +        }
  1.5249 +
  1.5250 +        void OVR::GLEContext::glUniform4f_Hook(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
  1.5251 +        {
  1.5252 +            if(glUniform4f_Impl)
  1.5253 +                glUniform4f_Impl(location, v0, v1, v2, v3);
  1.5254 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5255 +        }
  1.5256 +
  1.5257 +        void OVR::GLEContext::glUniform1i_Hook(GLint location, GLint v0)
  1.5258 +        {
  1.5259 +            if(glUniform1i_Impl)
  1.5260 +                glUniform1i_Impl(location, v0);
  1.5261 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5262 +        }
  1.5263 +
  1.5264 +        void OVR::GLEContext::glUniform2i_Hook(GLint location, GLint v0, GLint v1)
  1.5265 +        {
  1.5266 +            if(glUniform2i_Impl)
  1.5267 +                glUniform2i_Impl(location, v0, v1);
  1.5268 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5269 +        }
  1.5270 +
  1.5271 +        void OVR::GLEContext::glUniform3i_Hook(GLint location, GLint v0, GLint v1, GLint v2)
  1.5272 +        {
  1.5273 +            if(glUniform3i_Impl)
  1.5274 +                glUniform3i_Impl(location, v0, v1, v2);
  1.5275 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5276 +        }
  1.5277 +
  1.5278 +        void OVR::GLEContext::glUniform4i_Hook(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
  1.5279 +        {
  1.5280 +            if(glUniform4i_Impl)
  1.5281 +                glUniform4i_Impl(location, v0, v1, v2, v3);
  1.5282 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5283 +        }
  1.5284 +
  1.5285 +        void OVR::GLEContext::glUniform1fv_Hook(GLint location, GLsizei count, const GLfloat *value)
  1.5286 +        {
  1.5287 +            if(glUniform1fv_Impl)
  1.5288 +                glUniform1fv_Impl(location, count, value);
  1.5289 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5290 +        }
  1.5291 +
  1.5292 +        void OVR::GLEContext::glUniform2fv_Hook(GLint location, GLsizei count, const GLfloat *value)
  1.5293 +        {
  1.5294 +            if(glUniform2fv_Impl)
  1.5295 +                glUniform2fv_Impl(location, count, value);
  1.5296 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5297 +        }
  1.5298 +
  1.5299 +        void OVR::GLEContext::glUniform3fv_Hook(GLint location, GLsizei count, const GLfloat *value)
  1.5300 +        {
  1.5301 +            if(glUniform3fv_Impl)
  1.5302 +                glUniform3fv_Impl(location, count, value);
  1.5303 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5304 +        }
  1.5305 +
  1.5306 +        void OVR::GLEContext::glUniform4fv_Hook(GLint location, GLsizei count, const GLfloat *value)
  1.5307 +        {
  1.5308 +            if(glUniform4fv_Impl)
  1.5309 +                glUniform4fv_Impl(location, count, value);
  1.5310 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5311 +        }
  1.5312 +
  1.5313 +        void OVR::GLEContext::glUniform1iv_Hook(GLint location, GLsizei count, const GLint *value)
  1.5314 +        {
  1.5315 +            if(glUniform1iv_Impl)
  1.5316 +                glUniform1iv_Impl(location, count, value);
  1.5317 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5318 +        }
  1.5319 +
  1.5320 +        void OVR::GLEContext::glUniform2iv_Hook(GLint location, GLsizei count, const GLint *value)
  1.5321 +        {
  1.5322 +            if(glUniform2iv_Impl)
  1.5323 +                glUniform2iv_Impl(location, count, value);
  1.5324 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5325 +        }
  1.5326 +
  1.5327 +        void OVR::GLEContext::glUniform3iv_Hook(GLint location, GLsizei count, const GLint *value)
  1.5328 +        {
  1.5329 +            if(glUniform3iv_Impl)
  1.5330 +                glUniform3iv_Impl(location, count, value);
  1.5331 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5332 +        }
  1.5333 +
  1.5334 +        void OVR::GLEContext::glUniform4iv_Hook(GLint location, GLsizei count, const GLint *value)
  1.5335 +        {
  1.5336 +            if(glUniform4iv_Impl)
  1.5337 +                glUniform4iv_Impl(location, count, value);
  1.5338 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5339 +        }
  1.5340 +
  1.5341 +        void OVR::GLEContext::glUniformMatrix2fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  1.5342 +        {
  1.5343 +            if(glUniformMatrix2fv_Impl)
  1.5344 +                glUniformMatrix2fv_Impl(location, count, transpose, value);
  1.5345 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5346 +        }
  1.5347 +
  1.5348 +        void OVR::GLEContext::glUniformMatrix3fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  1.5349 +        {
  1.5350 +            if(glUniformMatrix3fv_Impl)
  1.5351 +                glUniformMatrix3fv_Impl(location, count, transpose, value);
  1.5352 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5353 +        }
  1.5354 +
  1.5355 +        void OVR::GLEContext::glUniformMatrix4fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  1.5356 +        {
  1.5357 +            if(glUniformMatrix4fv_Impl)
  1.5358 +                glUniformMatrix4fv_Impl(location, count, transpose, value);
  1.5359 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5360 +        }
  1.5361 +
  1.5362 +        void OVR::GLEContext::glValidateProgram_Hook(GLuint program)
  1.5363 +        {
  1.5364 +            if(glValidateProgram_Impl)
  1.5365 +                glValidateProgram_Impl(program);
  1.5366 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5367 +        }
  1.5368 +
  1.5369 +        void OVR::GLEContext::glVertexAttrib1d_Hook(GLuint index, GLdouble x)
  1.5370 +        {
  1.5371 +            if(glVertexAttrib1d_Impl)
  1.5372 +                glVertexAttrib1d_Impl(index, x);
  1.5373 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5374 +        }
  1.5375 +
  1.5376 +        void OVR::GLEContext::glVertexAttrib1dv_Hook(GLuint index, const GLdouble *v)
  1.5377 +        {
  1.5378 +            if(glVertexAttrib1dv_Impl)
  1.5379 +                glVertexAttrib1dv_Impl(index, v);
  1.5380 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5381 +        }
  1.5382 +
  1.5383 +        void OVR::GLEContext::glVertexAttrib1f_Hook(GLuint index, GLfloat x)
  1.5384 +        {
  1.5385 +            if(glVertexAttrib1f_Impl)
  1.5386 +                glVertexAttrib1f_Impl(index, x);
  1.5387 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5388 +        }
  1.5389 +
  1.5390 +        void OVR::GLEContext::glVertexAttrib1fv_Hook(GLuint index, const GLfloat *v)
  1.5391 +        {
  1.5392 +            if(glVertexAttrib1fv_Impl)
  1.5393 +                glVertexAttrib1fv_Impl(index, v);
  1.5394 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5395 +        }
  1.5396 +
  1.5397 +        void OVR::GLEContext::glVertexAttrib1s_Hook(GLuint index, GLshort x)
  1.5398 +        {
  1.5399 +            if(glVertexAttrib1s_Impl)
  1.5400 +                glVertexAttrib1s_Impl(index, x);
  1.5401 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5402 +        }
  1.5403 +
  1.5404 +        void OVR::GLEContext::glVertexAttrib1sv_Hook(GLuint index, const GLshort *v)
  1.5405 +        {
  1.5406 +            if(glVertexAttrib1sv_Impl)
  1.5407 +                glVertexAttrib1sv_Impl(index, v);
  1.5408 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5409 +        }
  1.5410 +
  1.5411 +        void OVR::GLEContext::glVertexAttrib2d_Hook(GLuint index, GLdouble x, GLdouble y)
  1.5412 +        {
  1.5413 +            if(glVertexAttrib2d_Impl)
  1.5414 +                glVertexAttrib2d_Impl(index, x, y);
  1.5415 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5416 +        }
  1.5417 +
  1.5418 +        void OVR::GLEContext::glVertexAttrib2dv_Hook(GLuint index, const GLdouble *v)
  1.5419 +        {
  1.5420 +            if(glVertexAttrib2dv_Impl)
  1.5421 +                glVertexAttrib2dv_Impl(index, v);
  1.5422 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5423 +        }
  1.5424 +
  1.5425 +        void OVR::GLEContext::glVertexAttrib2f_Hook(GLuint index, GLfloat x, GLfloat y)
  1.5426 +        {
  1.5427 +            if(glVertexAttrib2f_Impl)
  1.5428 +                glVertexAttrib2f_Impl(index, x, y);
  1.5429 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5430 +        }
  1.5431 +
  1.5432 +        void OVR::GLEContext::glVertexAttrib2fv_Hook(GLuint index, const GLfloat *v)
  1.5433 +        {
  1.5434 +            if(glVertexAttrib2fv_Impl)
  1.5435 +                glVertexAttrib2fv_Impl(index, v);
  1.5436 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5437 +        }
  1.5438 +
  1.5439 +        void OVR::GLEContext::glVertexAttrib2s_Hook(GLuint index, GLshort x, GLshort y)
  1.5440 +        {
  1.5441 +            if(glVertexAttrib2s_Impl)
  1.5442 +                glVertexAttrib2s_Impl(index, x, y);
  1.5443 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5444 +        }
  1.5445 +
  1.5446 +        void OVR::GLEContext::glVertexAttrib2sv_Hook(GLuint index, const GLshort *v)
  1.5447 +        {
  1.5448 +            if(glVertexAttrib2sv_Impl)
  1.5449 +                glVertexAttrib2sv_Impl(index, v);
  1.5450 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5451 +        }
  1.5452 +
  1.5453 +        void OVR::GLEContext::glVertexAttrib3d_Hook(GLuint index, GLdouble x, GLdouble y, GLdouble z)
  1.5454 +        {
  1.5455 +            if(glVertexAttrib3d_Impl)
  1.5456 +                glVertexAttrib3d_Impl(index, x, y, z);
  1.5457 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5458 +        }
  1.5459 +
  1.5460 +        void OVR::GLEContext::glVertexAttrib3dv_Hook(GLuint index, const GLdouble *v)
  1.5461 +        {
  1.5462 +            if(glVertexAttrib3dv_Impl)
  1.5463 +                glVertexAttrib3dv_Impl(index, v);
  1.5464 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5465 +        }
  1.5466 +
  1.5467 +        void OVR::GLEContext::glVertexAttrib3f_Hook(GLuint index, GLfloat x, GLfloat y, GLfloat z)
  1.5468 +        {
  1.5469 +            if(glVertexAttrib3f_Impl)
  1.5470 +                glVertexAttrib3f_Impl(index, x, y, z);
  1.5471 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5472 +        }
  1.5473 +
  1.5474 +        void OVR::GLEContext::glVertexAttrib3fv_Hook(GLuint index, const GLfloat *v)
  1.5475 +        {
  1.5476 +            if(glVertexAttrib3fv_Impl)
  1.5477 +                glVertexAttrib3fv_Impl(index, v);
  1.5478 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5479 +        }
  1.5480 +
  1.5481 +        void OVR::GLEContext::glVertexAttrib3s_Hook(GLuint index, GLshort x, GLshort y, GLshort z)
  1.5482 +        {
  1.5483 +            if(glVertexAttrib3s_Impl)
  1.5484 +                glVertexAttrib3s_Impl(index, x, y, z);
  1.5485 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5486 +        }
  1.5487 +
  1.5488 +        void OVR::GLEContext::glVertexAttrib3sv_Hook(GLuint index, const GLshort *v)
  1.5489 +        {
  1.5490 +            if(glVertexAttrib3sv_Impl)
  1.5491 +                glVertexAttrib3sv_Impl(index, v);
  1.5492 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5493 +        }
  1.5494 +
  1.5495 +        void OVR::GLEContext::glVertexAttrib4Nbv_Hook(GLuint index, const GLbyte *v)
  1.5496 +        {
  1.5497 +            if(glVertexAttrib4Nbv_Impl)
  1.5498 +                glVertexAttrib4Nbv_Impl(index, v);
  1.5499 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5500 +        }
  1.5501 +
  1.5502 +        void OVR::GLEContext::glVertexAttrib4Niv_Hook(GLuint index, const GLint *v)
  1.5503 +        {
  1.5504 +            if(glVertexAttrib4Niv_Impl)
  1.5505 +                glVertexAttrib4Niv_Impl(index, v);
  1.5506 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5507 +        }
  1.5508 +
  1.5509 +        void OVR::GLEContext::glVertexAttrib4Nsv_Hook(GLuint index, const GLshort *v)
  1.5510 +        {
  1.5511 +            if(glVertexAttrib4Nsv_Impl)
  1.5512 +                glVertexAttrib4Nsv_Impl(index, v);
  1.5513 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5514 +        }
  1.5515 +
  1.5516 +        void OVR::GLEContext::glVertexAttrib4Nub_Hook(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
  1.5517 +        {
  1.5518 +            if(glVertexAttrib4Nub_Impl)
  1.5519 +                glVertexAttrib4Nub_Impl(index, x, y, z, w);
  1.5520 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5521 +        }
  1.5522 +
  1.5523 +        void OVR::GLEContext::glVertexAttrib4Nubv_Hook(GLuint index, const GLubyte *v)
  1.5524 +        {
  1.5525 +            if(glVertexAttrib4Nubv_Impl)
  1.5526 +                glVertexAttrib4Nubv_Impl(index, v);
  1.5527 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5528 +        }
  1.5529 +
  1.5530 +        void OVR::GLEContext::glVertexAttrib4Nuiv_Hook(GLuint index, const GLuint *v)
  1.5531 +        {
  1.5532 +            if(glVertexAttrib4Nuiv_Impl)
  1.5533 +                glVertexAttrib4Nuiv_Impl(index, v);
  1.5534 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5535 +        }
  1.5536 +
  1.5537 +        void OVR::GLEContext::glVertexAttrib4Nusv_Hook(GLuint index, const GLushort *v)
  1.5538 +        {
  1.5539 +            if(glVertexAttrib4Nusv_Impl)
  1.5540 +                glVertexAttrib4Nusv_Impl(index, v);
  1.5541 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5542 +        }
  1.5543 +
  1.5544 +        void OVR::GLEContext::glVertexAttrib4bv_Hook(GLuint index, const GLbyte *v)
  1.5545 +        {
  1.5546 +            if(glVertexAttrib4bv_Impl)
  1.5547 +                glVertexAttrib4bv_Impl(index, v);
  1.5548 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5549 +        }
  1.5550 +
  1.5551 +        void OVR::GLEContext::glVertexAttrib4d_Hook(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
  1.5552 +        {
  1.5553 +            if(glVertexAttrib4d_Impl)
  1.5554 +                glVertexAttrib4d_Impl(index, x, y, z, w);
  1.5555 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5556 +        }
  1.5557 +
  1.5558 +        void OVR::GLEContext::glVertexAttrib4dv_Hook(GLuint index, const GLdouble *v)
  1.5559 +        {
  1.5560 +            if(glVertexAttrib4dv_Impl)
  1.5561 +                glVertexAttrib4dv_Impl(index, v);
  1.5562 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5563 +        }
  1.5564 +
  1.5565 +        void OVR::GLEContext::glVertexAttrib4f_Hook(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
  1.5566 +        {
  1.5567 +            if(glVertexAttrib4f_Impl)
  1.5568 +                glVertexAttrib4f_Impl(index, x, y, z, w);
  1.5569 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5570 +        }
  1.5571 +
  1.5572 +        void OVR::GLEContext::glVertexAttrib4fv_Hook(GLuint index, const GLfloat *v)
  1.5573 +        {
  1.5574 +            if(glVertexAttrib4fv_Impl)
  1.5575 +                glVertexAttrib4fv_Impl(index, v);
  1.5576 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5577 +        }
  1.5578 +
  1.5579 +        void OVR::GLEContext::glVertexAttrib4iv_Hook(GLuint index, const GLint *v)
  1.5580 +        {
  1.5581 +            if(glVertexAttrib4iv_Impl)
  1.5582 +                glVertexAttrib4iv_Impl(index, v);
  1.5583 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5584 +        }
  1.5585 +
  1.5586 +        void OVR::GLEContext::glVertexAttrib4s_Hook(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
  1.5587 +        {
  1.5588 +            if(glVertexAttrib4s_Impl)
  1.5589 +                glVertexAttrib4s_Impl(index, x, y, z, w);
  1.5590 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5591 +        }
  1.5592 +
  1.5593 +        void OVR::GLEContext::glVertexAttrib4sv_Hook(GLuint index, const GLshort *v)
  1.5594 +        {
  1.5595 +            if(glVertexAttrib4sv_Impl)
  1.5596 +                glVertexAttrib4sv_Impl(index, v);
  1.5597 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5598 +        }
  1.5599 +
  1.5600 +        void OVR::GLEContext::glVertexAttrib4ubv_Hook(GLuint index, const GLubyte *v)
  1.5601 +        {
  1.5602 +            if(glVertexAttrib4ubv_Impl)
  1.5603 +                glVertexAttrib4ubv_Impl(index, v);
  1.5604 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5605 +        }
  1.5606 +
  1.5607 +        void OVR::GLEContext::glVertexAttrib4uiv_Hook(GLuint index, const GLuint *v)
  1.5608 +        {
  1.5609 +            if(glVertexAttrib4uiv_Impl)
  1.5610 +                glVertexAttrib4uiv_Impl(index, v);
  1.5611 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5612 +        }
  1.5613 +
  1.5614 +        void OVR::GLEContext::glVertexAttrib4usv_Hook(GLuint index, const GLushort *v)
  1.5615 +        {
  1.5616 +            if(glVertexAttrib4usv_Impl)
  1.5617 +                glVertexAttrib4usv_Impl(index, v);
  1.5618 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5619 +        }
  1.5620 +
  1.5621 +        void OVR::GLEContext::glVertexAttribPointer_Hook(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)
  1.5622 +        {
  1.5623 +            if(glVertexAttribPointer_Impl)
  1.5624 +                glVertexAttribPointer_Impl(index, size, type, normalized, stride, pointer);
  1.5625 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5626 +        }
  1.5627 +
  1.5628 +
  1.5629 +        // GL_VERSION_2_1
  1.5630 +        void OVR::GLEContext::glUniformMatrix2x3fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  1.5631 +        {
  1.5632 +            if(glUniformMatrix2x3fv_Impl)
  1.5633 +                glUniformMatrix2x3fv_Impl(location, count, transpose, value);
  1.5634 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5635 +        }
  1.5636 +
  1.5637 +        void OVR::GLEContext::glUniformMatrix3x2fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  1.5638 +        {
  1.5639 +            if(glUniformMatrix3x2fv_Impl)
  1.5640 +                glUniformMatrix3x2fv_Impl(location, count, transpose, value);
  1.5641 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5642 +        }
  1.5643 +
  1.5644 +        void OVR::GLEContext::glUniformMatrix2x4fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  1.5645 +        {
  1.5646 +            if(glUniformMatrix2x4fv_Impl)
  1.5647 +                glUniformMatrix2x4fv_Impl(location, count, transpose, value);
  1.5648 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5649 +        }
  1.5650 +
  1.5651 +        void OVR::GLEContext::glUniformMatrix4x2fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  1.5652 +        {
  1.5653 +            if(glUniformMatrix4x2fv_Impl)
  1.5654 +                glUniformMatrix4x2fv_Impl(location, count, transpose, value);
  1.5655 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5656 +        }
  1.5657 +
  1.5658 +        void OVR::GLEContext::glUniformMatrix3x4fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  1.5659 +        {
  1.5660 +            if(glUniformMatrix3x4fv_Impl)
  1.5661 +                glUniformMatrix3x4fv_Impl(location, count, transpose, value);
  1.5662 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5663 +        }
  1.5664 +
  1.5665 +        void OVR::GLEContext::glUniformMatrix4x3fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
  1.5666 +        {
  1.5667 +            if(glUniformMatrix4x3fv_Impl)
  1.5668 +                glUniformMatrix4x3fv_Impl(location, count, transpose, value);
  1.5669 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5670 +        }
  1.5671 +
  1.5672 +
  1.5673 +        // GL_VERSION_3_0
  1.5674 +        void OVR::GLEContext::glColorMaski_Hook(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
  1.5675 +        {
  1.5676 +            if(glColorMaski_Impl)
  1.5677 +                glColorMaski_Impl(index, r, g, b, a);
  1.5678 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5679 +        }
  1.5680 +
  1.5681 +        void OVR::GLEContext::glGetBooleani_v_Hook(GLenum target, GLuint index, GLboolean *data)
  1.5682 +        {
  1.5683 +            if(glGetBooleani_v_Impl)
  1.5684 +                glGetBooleani_v_Impl(target, index, data);
  1.5685 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5686 +        }
  1.5687 +
  1.5688 +        void OVR::GLEContext::glGetIntegeri_v_Hook(GLenum target, GLuint index, GLint *data)
  1.5689 +        {
  1.5690 +            if(glGetIntegeri_v_Impl)
  1.5691 +                glGetIntegeri_v_Impl(target, index, data);
  1.5692 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5693 +        }
  1.5694 +
  1.5695 +        void OVR::GLEContext::glEnablei_Hook(GLenum target, GLuint index)
  1.5696 +        {
  1.5697 +            if(glEnablei_Impl)
  1.5698 +                glEnablei_Impl(target, index);
  1.5699 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5700 +        }
  1.5701 +
  1.5702 +        void OVR::GLEContext::glDisablei_Hook(GLenum target, GLuint index)
  1.5703 +        {
  1.5704 +            if(glDisablei_Impl)
  1.5705 +                glDisablei_Impl(target, index);
  1.5706 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5707 +        }
  1.5708 +
  1.5709 +        GLboolean OVR::GLEContext::glIsEnabledi_Hook(GLenum target, GLuint index)
  1.5710 +        {
  1.5711 +            GLboolean b = GL_FALSE;
  1.5712 +            if(glIsEnabledi_Impl)
  1.5713 +                b = glIsEnabledi_Impl(target, index);
  1.5714 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5715 +            return b;
  1.5716 +        }
  1.5717 +
  1.5718 +        void OVR::GLEContext::glBeginTransformFeedback_Hook(GLenum primitiveMode)
  1.5719 +        {
  1.5720 +            if(glBeginTransformFeedback_Impl)
  1.5721 +                glBeginTransformFeedback_Impl(primitiveMode);
  1.5722 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5723 +        }
  1.5724 +
  1.5725 +        void OVR::GLEContext::glEndTransformFeedback_Hook()
  1.5726 +        {
  1.5727 +            if(glEndTransformFeedback_Impl)
  1.5728 +                glEndTransformFeedback_Impl();
  1.5729 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5730 +        }
  1.5731 +
  1.5732 +        void OVR::GLEContext::glBindBufferRange_Hook(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
  1.5733 +        {
  1.5734 +            if(glBindBufferRange_Impl)
  1.5735 +                glBindBufferRange_Impl(target, index, buffer, offset, size);
  1.5736 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5737 +        }
  1.5738 +
  1.5739 +        void OVR::GLEContext::glBindBufferBase_Hook(GLenum target, GLuint index, GLuint buffer)
  1.5740 +        {
  1.5741 +            if(glBindBufferBase_Impl)
  1.5742 +                glBindBufferBase_Impl(target, index, buffer);
  1.5743 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5744 +        }
  1.5745 +
  1.5746 +        void OVR::GLEContext::glTransformFeedbackVaryings_Hook(GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode)
  1.5747 +        {
  1.5748 +            if(glTransformFeedbackVaryings_Impl)
  1.5749 +                glTransformFeedbackVaryings_Impl(program, count, varyings, bufferMode);
  1.5750 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5751 +        }
  1.5752 +
  1.5753 +        void OVR::GLEContext::glGetTransformFeedbackVarying_Hook(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
  1.5754 +        {
  1.5755 +            if(glGetTransformFeedbackVarying_Impl)
  1.5756 +                glGetTransformFeedbackVarying_Impl(program, index, bufSize, length, size, type, name);
  1.5757 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5758 +        }
  1.5759 +
  1.5760 +        void OVR::GLEContext::glClampColor_Hook(GLenum target, GLenum clamp)
  1.5761 +        {
  1.5762 +            if(glClampColor_Impl)
  1.5763 +                glClampColor_Impl(target, clamp);
  1.5764 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5765 +        }
  1.5766 +
  1.5767 +        void OVR::GLEContext::glBeginConditionalRender_Hook(GLuint id, GLenum mode)
  1.5768 +        {
  1.5769 +            if(glBeginConditionalRender_Impl)
  1.5770 +                glBeginConditionalRender_Impl(id, mode);
  1.5771 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5772 +        }
  1.5773 +
  1.5774 +        void OVR::GLEContext::glEndConditionalRender_Hook()
  1.5775 +        {
  1.5776 +            if(glEndConditionalRender_Impl)
  1.5777 +                glEndConditionalRender_Impl();
  1.5778 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5779 +        }
  1.5780 +
  1.5781 +        void OVR::GLEContext::glVertexAttribIPointer_Hook(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
  1.5782 +        {
  1.5783 +            if(glVertexAttribIPointer_Impl)
  1.5784 +                glVertexAttribIPointer_Impl(index, size, type,  stride, pointer);
  1.5785 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5786 +        }
  1.5787 +
  1.5788 +        void OVR::GLEContext::glGetVertexAttribIiv_Hook(GLuint index, GLenum pname, GLint *params)
  1.5789 +        {
  1.5790 +            if(glGetVertexAttribIiv_Impl)
  1.5791 +                glGetVertexAttribIiv_Impl(index, pname, params);
  1.5792 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5793 +        }
  1.5794 +
  1.5795 +        void OVR::GLEContext::glGetVertexAttribIuiv_Hook(GLuint index, GLenum pname, GLuint *params)
  1.5796 +        {
  1.5797 +            if(glGetVertexAttribIuiv_Impl)
  1.5798 +                glGetVertexAttribIuiv_Impl(index, pname, params);
  1.5799 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5800 +        }
  1.5801 +
  1.5802 +        void OVR::GLEContext::glVertexAttribI1i_Hook(GLuint index, GLint x)
  1.5803 +        {
  1.5804 +            if(glVertexAttribI1i_Impl)
  1.5805 +                glVertexAttribI1i_Impl(index, x);
  1.5806 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5807 +        }
  1.5808 +
  1.5809 +        void OVR::GLEContext::glVertexAttribI2i_Hook(GLuint index, GLint x, GLint y)
  1.5810 +        {
  1.5811 +            if(glVertexAttribI2i_Impl)
  1.5812 +                glVertexAttribI2i_Impl(index, x, y);
  1.5813 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5814 +        }
  1.5815 +
  1.5816 +        void OVR::GLEContext::glVertexAttribI3i_Hook(GLuint index, GLint x, GLint y, GLint z)
  1.5817 +        {
  1.5818 +            if(glVertexAttribI3i_Impl)
  1.5819 +                glVertexAttribI3i_Impl(index, x, y, z);
  1.5820 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5821 +        }
  1.5822 +
  1.5823 +        void OVR::GLEContext::glVertexAttribI4i_Hook(GLuint index, GLint x, GLint y, GLint z, GLint w)
  1.5824 +        {
  1.5825 +            if(glVertexAttribI4i_Impl)
  1.5826 +                glVertexAttribI4i_Impl(index, x, y, z, w);
  1.5827 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5828 +        }
  1.5829 +
  1.5830 +        void OVR::GLEContext::glVertexAttribI1ui_Hook(GLuint index, GLuint x)
  1.5831 +        {
  1.5832 +            if(glVertexAttribI1ui_Impl)
  1.5833 +                glVertexAttribI1ui_Impl(index, x);
  1.5834 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5835 +        }
  1.5836 +
  1.5837 +        void OVR::GLEContext::glVertexAttribI2ui_Hook(GLuint index, GLuint x, GLuint y)
  1.5838 +        {
  1.5839 +            if(glVertexAttribI2ui_Impl)
  1.5840 +                glVertexAttribI2ui_Impl(index, x, y);
  1.5841 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5842 +        }
  1.5843 +
  1.5844 +        void OVR::GLEContext::glVertexAttribI3ui_Hook(GLuint index, GLuint x, GLuint y, GLuint z)
  1.5845 +        {
  1.5846 +            if(glVertexAttribI3ui_Impl)
  1.5847 +                glVertexAttribI3ui_Impl(index, x, y, z);
  1.5848 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5849 +        }
  1.5850 +
  1.5851 +        void OVR::GLEContext::glVertexAttribI4ui_Hook(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
  1.5852 +        {
  1.5853 +            if(glVertexAttribI4ui_Impl)
  1.5854 +                glVertexAttribI4ui_Impl(index, x, y, z, w);
  1.5855 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5856 +        }
  1.5857 +
  1.5858 +        void OVR::GLEContext::glVertexAttribI1iv_Hook(GLuint index, const GLint *v)
  1.5859 +        {
  1.5860 +            if(glVertexAttribI1iv_Impl)
  1.5861 +                glVertexAttribI1iv_Impl(index, v);
  1.5862 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5863 +        }
  1.5864 +
  1.5865 +        void OVR::GLEContext::glVertexAttribI2iv_Hook(GLuint index, const GLint *v)
  1.5866 +        {
  1.5867 +            if(glVertexAttribI2iv_Impl)
  1.5868 +                glVertexAttribI2iv_Impl(index, v);
  1.5869 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5870 +        }
  1.5871 +
  1.5872 +        void OVR::GLEContext::glVertexAttribI3iv_Hook(GLuint index, const GLint *v)
  1.5873 +        {
  1.5874 +            if(glVertexAttribI3iv_Impl)
  1.5875 +                glVertexAttribI3iv_Impl(index, v);
  1.5876 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5877 +        }
  1.5878 +
  1.5879 +        void OVR::GLEContext::glVertexAttribI4iv_Hook(GLuint index, const GLint *v)
  1.5880 +        {
  1.5881 +            if(glVertexAttribI4iv_Impl)
  1.5882 +                glVertexAttribI4iv_Impl(index, v);
  1.5883 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5884 +        }
  1.5885 +
  1.5886 +        void OVR::GLEContext::glVertexAttribI1uiv_Hook(GLuint index, const GLuint *v)
  1.5887 +        {
  1.5888 +            if(glVertexAttribI1uiv_Impl)
  1.5889 +                glVertexAttribI1uiv_Impl(index, v);
  1.5890 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5891 +        }
  1.5892 +
  1.5893 +        void OVR::GLEContext::glVertexAttribI2uiv_Hook(GLuint index, const GLuint *v)
  1.5894 +        {
  1.5895 +            if(glVertexAttribI2uiv_Impl)
  1.5896 +                glVertexAttribI2uiv_Impl(index, v);
  1.5897 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5898 +        }
  1.5899 +
  1.5900 +        void OVR::GLEContext::glVertexAttribI3uiv_Hook(GLuint index, const GLuint *v)
  1.5901 +        {
  1.5902 +            if(glVertexAttribI3uiv_Impl)
  1.5903 +                glVertexAttribI3uiv_Impl(index, v);
  1.5904 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5905 +        }
  1.5906 +
  1.5907 +        void OVR::GLEContext::glVertexAttribI4uiv_Hook(GLuint index, const GLuint *v)
  1.5908 +        {
  1.5909 +            if(glVertexAttribI4uiv_Impl)
  1.5910 +                glVertexAttribI4uiv_Impl(index, v);
  1.5911 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5912 +        }
  1.5913 +
  1.5914 +        void OVR::GLEContext::glVertexAttribI4bv_Hook(GLuint index, const GLbyte *v)
  1.5915 +        {
  1.5916 +            if(glVertexAttribI4bv_Impl)
  1.5917 +                glVertexAttribI4bv_Impl(index, v);
  1.5918 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5919 +        }
  1.5920 +
  1.5921 +        void OVR::GLEContext::glVertexAttribI4sv_Hook(GLuint index, const GLshort *v)
  1.5922 +        {
  1.5923 +            if(glVertexAttribI4sv_Impl)
  1.5924 +                glVertexAttribI4sv_Impl(index, v);
  1.5925 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5926 +        }
  1.5927 +
  1.5928 +        void OVR::GLEContext::glVertexAttribI4ubv_Hook(GLuint index, const GLubyte *v)
  1.5929 +        {
  1.5930 +            if(glVertexAttribI4ubv_Impl)
  1.5931 +                glVertexAttribI4ubv_Impl(index, v);
  1.5932 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5933 +        }
  1.5934 +
  1.5935 +        void OVR::GLEContext::glVertexAttribI4usv_Hook(GLuint index, const GLushort *v)
  1.5936 +        {
  1.5937 +            if(glVertexAttribI4usv_Impl)
  1.5938 +                glVertexAttribI4usv_Impl(index, v);
  1.5939 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5940 +        }
  1.5941 +
  1.5942 +        void OVR::GLEContext::glGetUniformuiv_Hook(GLuint program, GLint location, GLuint *params)
  1.5943 +        {
  1.5944 +            if(glGetUniformuiv_Impl)
  1.5945 +                glGetUniformuiv_Impl(program, location, params);
  1.5946 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5947 +        }
  1.5948 +
  1.5949 +        void OVR::GLEContext::glBindFragDataLocation_Hook(GLuint program, GLuint color, const GLchar *name)
  1.5950 +        {
  1.5951 +            if(glBindFragDataLocation_Impl)
  1.5952 +                glBindFragDataLocation_Impl(program, color, name);
  1.5953 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5954 +        }
  1.5955 +
  1.5956 +        GLint OVR::GLEContext::glGetFragDataLocation_Hook(GLuint program, const GLchar *name)
  1.5957 +        {
  1.5958 +            GLint i = 0;
  1.5959 +            if(glGetFragDataLocation_Impl)
  1.5960 +                i = glGetFragDataLocation_Impl(program, name);
  1.5961 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5962 +            return i;
  1.5963 +        }
  1.5964 +
  1.5965 +        void OVR::GLEContext::glUniform1ui_Hook(GLint location, GLuint v0)
  1.5966 +        {
  1.5967 +            if(glUniform1ui_Impl)
  1.5968 +                glUniform1ui_Impl(location, v0);
  1.5969 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5970 +        }
  1.5971 +
  1.5972 +        void OVR::GLEContext::glUniform2ui_Hook(GLint location, GLuint v0, GLuint v1)
  1.5973 +        {
  1.5974 +            if(glUniform2ui_Impl)
  1.5975 +                glUniform2ui_Impl(location, v0, v1);
  1.5976 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5977 +        }
  1.5978 +
  1.5979 +        void OVR::GLEContext::glUniform3ui_Hook(GLint location, GLuint v0, GLuint v1, GLuint v2)
  1.5980 +        {
  1.5981 +            if(glUniform3ui_Impl)
  1.5982 +                glUniform3ui_Impl(location, v0, v1, v2);
  1.5983 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5984 +        }
  1.5985 +
  1.5986 +        void OVR::GLEContext::glUniform4ui_Hook(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
  1.5987 +        {
  1.5988 +            if(glUniform4ui_Impl)
  1.5989 +                glUniform4ui_Impl(location, v0, v1, v2, v3);
  1.5990 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5991 +        }
  1.5992 +
  1.5993 +        void OVR::GLEContext::glUniform1uiv_Hook(GLint location, GLsizei count, const GLuint *value)
  1.5994 +        {
  1.5995 +            if(glUniform1uiv_Impl)
  1.5996 +                glUniform1uiv_Impl(location, count, value);
  1.5997 +            PostHook(GLE_CURRENT_FUNCTION);
  1.5998 +        }
  1.5999 +
  1.6000 +        void OVR::GLEContext::glUniform2uiv_Hook(GLint location, GLsizei count, const GLuint *value)
  1.6001 +        {
  1.6002 +            if(glUniform2uiv_Impl)
  1.6003 +                glUniform2uiv_Impl(location, count, value);
  1.6004 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6005 +        }
  1.6006 +
  1.6007 +        void OVR::GLEContext::glUniform3uiv_Hook(GLint location, GLsizei count, const GLuint *value)
  1.6008 +        {
  1.6009 +            if(glUniform3uiv_Impl)
  1.6010 +                glUniform3uiv_Impl(location, count, value);
  1.6011 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6012 +        }
  1.6013 +
  1.6014 +        void OVR::GLEContext::glUniform4uiv_Hook(GLint location, GLsizei count, const GLuint *value)
  1.6015 +        {
  1.6016 +            if(glUniform4uiv_Impl)
  1.6017 +                glUniform4uiv_Impl(location, count, value);
  1.6018 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6019 +        }
  1.6020 +
  1.6021 +        void OVR::GLEContext::glTexParameterIiv_Hook(GLenum target, GLenum pname, const GLint *params)
  1.6022 +        {
  1.6023 +            if(glTexParameterIiv_Impl)
  1.6024 +                glTexParameterIiv_Impl(target, pname, params);
  1.6025 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6026 +        }
  1.6027 +
  1.6028 +        void OVR::GLEContext::glTexParameterIuiv_Hook(GLenum target, GLenum pname, const GLuint *params)
  1.6029 +        {
  1.6030 +            if(glTexParameterIuiv_Impl)
  1.6031 +                glTexParameterIuiv_Impl(target, pname, params);
  1.6032 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6033 +        }
  1.6034 +
  1.6035 +        void OVR::GLEContext::glGetTexParameterIiv_Hook(GLenum target, GLenum pname, GLint *params)
  1.6036 +        {
  1.6037 +            if(glGetTexParameterIiv_Impl)
  1.6038 +                glGetTexParameterIiv_Impl(target, pname, params);
  1.6039 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6040 +        }
  1.6041 +
  1.6042 +        void OVR::GLEContext::glGetTexParameterIuiv_Hook(GLenum target, GLenum pname, GLuint *params)
  1.6043 +        {
  1.6044 +            if(glGetTexParameterIuiv_Impl)
  1.6045 +                glGetTexParameterIuiv_Impl(target, pname, params);
  1.6046 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6047 +        }
  1.6048 +
  1.6049 +        void OVR::GLEContext::glClearBufferiv_Hook(GLenum buffer, GLint drawbuffer, const GLint *value)
  1.6050 +        {
  1.6051 +            if(glClearBufferiv_Impl)
  1.6052 +                glClearBufferiv_Impl(buffer, drawbuffer, value);
  1.6053 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6054 +        }
  1.6055 +
  1.6056 +        void OVR::GLEContext::glClearBufferuiv_Hook(GLenum buffer, GLint drawbuffer, const GLuint *value)
  1.6057 +        {
  1.6058 +            if(glClearBufferuiv_Impl)
  1.6059 +                glClearBufferuiv_Impl(buffer, drawbuffer, value);
  1.6060 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6061 +        }
  1.6062 +
  1.6063 +        void OVR::GLEContext::glClearBufferfv_Hook(GLenum buffer, GLint drawbuffer, const GLfloat *value)
  1.6064 +        {
  1.6065 +            if(glClearBufferfv_Impl)
  1.6066 +                glClearBufferfv_Impl(buffer, drawbuffer, value);
  1.6067 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6068 +        }
  1.6069 +
  1.6070 +        void OVR::GLEContext::glClearBufferfi_Hook(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
  1.6071 +        {
  1.6072 +            if(glClearBufferfi_Impl)
  1.6073 +                glClearBufferfi_Impl(buffer, drawbuffer, depth, stencil);
  1.6074 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6075 +        }
  1.6076 +
  1.6077 +        const GLubyte* OVR::GLEContext::glGetStringi_Hook(GLenum name, GLuint index)
  1.6078 +        {
  1.6079 +            const GLubyte* p = NULL;
  1.6080 +            if(glGetStringi_Impl)
  1.6081 +                p = glGetStringi_Impl(name, index);
  1.6082 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6083 +            return p;
  1.6084 +        }
  1.6085 +
  1.6086 +
  1.6087 +        // GL_VERSION_3_1
  1.6088 +        void OVR::GLEContext::glDrawArraysInstanced_Hook(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
  1.6089 +        {
  1.6090 +            if(glDrawArraysInstanced_Impl)
  1.6091 +                glDrawArraysInstanced_Impl(mode, first, count, primcount);
  1.6092 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6093 +        }
  1.6094 +
  1.6095 +        void OVR::GLEContext::glDrawElementsInstanced_Hook(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)
  1.6096 +        {
  1.6097 +            if(glDrawElementsInstanced_Impl)
  1.6098 +                glDrawElementsInstanced_Impl(mode, count, type, indices, primcount);
  1.6099 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6100 +        }
  1.6101 +
  1.6102 +        void OVR::GLEContext::glTexBuffer_Hook(GLenum target, GLenum internalformat, GLuint buffer)
  1.6103 +        {
  1.6104 +            if(glTexBuffer_Impl)
  1.6105 +                glTexBuffer_Impl(target, internalformat, buffer);
  1.6106 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6107 +        }
  1.6108 +
  1.6109 +        void OVR::GLEContext::glPrimitiveRestartIndex_Hook(GLuint index)
  1.6110 +        {
  1.6111 +            if(glPrimitiveRestartIndex_Impl)
  1.6112 +                glPrimitiveRestartIndex_Impl(index);
  1.6113 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6114 +        }
  1.6115 +
  1.6116 +
  1.6117 +        // GL_VERSION_3_2
  1.6118 +        void OVR::GLEContext::glGetInteger64i_v_Hook(GLenum target, GLuint index, GLint64 *data)
  1.6119 +        {
  1.6120 +            if(glGetInteger64i_v_Impl)
  1.6121 +                glGetInteger64i_v_Impl(target, index, data);
  1.6122 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6123 +        }
  1.6124 +
  1.6125 +        void OVR::GLEContext::glGetBufferParameteri64v_Hook(GLenum target, GLenum pname, GLint64 *params)
  1.6126 +        {
  1.6127 +            if(glGetBufferParameteri64v_Impl)
  1.6128 +                glGetBufferParameteri64v_Impl(target, pname, params);
  1.6129 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6130 +        }
  1.6131 +
  1.6132 +        void OVR::GLEContext::glFramebufferTexture_Hook(GLenum target, GLenum attachment, GLuint texture, GLint level)
  1.6133 +        {
  1.6134 +            if(glFramebufferTexture_Impl)
  1.6135 +                glFramebufferTexture_Impl(target, attachment, texture, level);
  1.6136 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6137 +        }
  1.6138 +
  1.6139 +
  1.6140 +        // GL_VERSION_3_3
  1.6141 +        void OVR::GLEContext::glVertexAttribDivisor_Hook(GLuint index, GLuint divisor)
  1.6142 +        {
  1.6143 +            if(glVertexAttribDivisor_Impl)
  1.6144 +                glVertexAttribDivisor_Impl(index, divisor);
  1.6145 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6146 +        }
  1.6147 +
  1.6148 +
  1.6149 +        // GL_VERSION_4_0
  1.6150 +        void OVR::GLEContext::glMinSampleShading_Hook(GLclampf value)
  1.6151 +        {
  1.6152 +            if(glMinSampleShading_Impl)
  1.6153 +                glMinSampleShading_Impl(value);
  1.6154 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6155 +        }
  1.6156 +
  1.6157 +        void OVR::GLEContext::glBlendEquationi_Hook(GLuint buf, GLenum mode)
  1.6158 +        {
  1.6159 +            if(glBlendEquationi_Impl)
  1.6160 +                glBlendEquationi_Impl(buf, mode);
  1.6161 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6162 +        }
  1.6163 +
  1.6164 +        void OVR::GLEContext::glBlendEquationSeparatei_Hook(GLuint buf, GLenum modeRGB, GLenum modeAlpha)
  1.6165 +        {
  1.6166 +            if(glBlendEquationSeparatei_Impl)
  1.6167 +                glBlendEquationSeparatei_Impl(buf, modeRGB, modeAlpha);
  1.6168 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6169 +        }
  1.6170 +
  1.6171 +        void OVR::GLEContext::glBlendFunci_Hook(GLuint buf, GLenum src, GLenum dst)
  1.6172 +        {
  1.6173 +            if(glBlendFunci_Impl)
  1.6174 +                glBlendFunci_Impl(buf, src, dst);
  1.6175 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6176 +        }
  1.6177 +
  1.6178 +        void OVR::GLEContext::glBlendFuncSeparatei_Hook(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
  1.6179 +        {
  1.6180 +            if(glBlendFuncSeparatei_Impl)
  1.6181 +                glBlendFuncSeparatei_Impl(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
  1.6182 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6183 +        }
  1.6184 +
  1.6185 +
  1.6186 +        // GL_AMD_debug_output
  1.6187 +        void OVR::GLEContext::glDebugMessageEnableAMD_Hook(GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled)
  1.6188 +        {
  1.6189 +            if(glDebugMessageEnableAMD_Impl)
  1.6190 +                glDebugMessageEnableAMD_Impl(category, severity, count, ids, enabled);
  1.6191 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6192 +        }
  1.6193 +
  1.6194 +        void OVR::GLEContext::glDebugMessageInsertAMD_Hook(GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf)
  1.6195 +        {
  1.6196 +            if(glDebugMessageInsertAMD_Impl)
  1.6197 +                glDebugMessageInsertAMD_Impl(category, severity, id, length, buf);
  1.6198 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6199 +        }
  1.6200 +
  1.6201 +        void OVR::GLEContext::glDebugMessageCallbackAMD_Hook(GLDEBUGPROCAMD callback, GLvoid *userParam)
  1.6202 +        {
  1.6203 +            if(glDebugMessageCallbackAMD_Impl)
  1.6204 +                glDebugMessageCallbackAMD_Impl(callback, userParam);
  1.6205 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6206 +        }
  1.6207 +
  1.6208 +        GLuint OVR::GLEContext::glGetDebugMessageLogAMD_Hook(GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message)
  1.6209 +        {
  1.6210 +            GLuint u = 0;
  1.6211 +            if(glGetDebugMessageLogAMD_Impl)
  1.6212 +                u = glGetDebugMessageLogAMD_Impl(count, bufsize, categories, severities, ids, lengths, message);
  1.6213 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6214 +            return u;
  1.6215 +        }
  1.6216 +
  1.6217 +
  1.6218 +    #if defined(GLE_CGL_ENABLED)
  1.6219 +        // GL_APPLE_element_array
  1.6220 +        void OVR::GLEContext::glElementPointerAPPLE_Hook(GLenum type, const GLvoid *pointer)
  1.6221 +        {
  1.6222 +            if(glElementPointerAPPLE_Impl)
  1.6223 +                glElementPointerAPPLE_Impl(type, pointer);
  1.6224 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6225 +        }
  1.6226 +
  1.6227 +        void OVR::GLEContext::glDrawElementArrayAPPLE_Hook(GLenum mode, GLint first, GLsizei count)
  1.6228 +        {
  1.6229 +            if(glDrawElementArrayAPPLE_Impl)
  1.6230 +                glDrawElementArrayAPPLE_Impl(mode, first, count);
  1.6231 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6232 +        }
  1.6233 +
  1.6234 +        void OVR::GLEContext::glDrawRangeElementArrayAPPLE_Hook(GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count)
  1.6235 +        {
  1.6236 +            if(glDrawRangeElementArrayAPPLE_Impl)
  1.6237 +                glDrawRangeElementArrayAPPLE_Impl(mode, start, end, first, count);
  1.6238 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6239 +        }
  1.6240 +
  1.6241 +        void OVR::GLEContext::glMultiDrawElementArrayAPPLE_Hook(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)
  1.6242 +        {
  1.6243 +            if(glMultiDrawElementArrayAPPLE_Impl)
  1.6244 +                glMultiDrawElementArrayAPPLE_Impl(mode, first, count, primcount);
  1.6245 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6246 +        }
  1.6247 +
  1.6248 +        void OVR::GLEContext::glMultiDrawRangeElementArrayAPPLE_Hook(GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount)
  1.6249 +        {
  1.6250 +            if(glMultiDrawRangeElementArrayAPPLE_Impl)
  1.6251 +                glMultiDrawRangeElementArrayAPPLE_Impl(mode, start, end, first, count, primcount);
  1.6252 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6253 +        }
  1.6254 +
  1.6255 +
  1.6256 +        // GL_APPLE_fence
  1.6257 +        void OVR::GLEContext::glGenFencesAPPLE_Hook(GLsizei n, GLuint *fences)
  1.6258 +        {
  1.6259 +            if(glGenFencesAPPLE_Impl)
  1.6260 +                glGenFencesAPPLE_Impl(n, fences);
  1.6261 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6262 +        }
  1.6263 +
  1.6264 +        void OVR::GLEContext::glDeleteFencesAPPLE_Hook(GLsizei n, const GLuint *fences)
  1.6265 +        {
  1.6266 +            if(glDeleteFencesAPPLE_Impl)
  1.6267 +                glDeleteFencesAPPLE_Impl(n, fences);
  1.6268 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6269 +        }
  1.6270 +
  1.6271 +        void OVR::GLEContext::glSetFenceAPPLE_Hook(GLuint fence)
  1.6272 +        {
  1.6273 +            if(glSetFenceAPPLE_Impl)
  1.6274 +                glSetFenceAPPLE_Impl(fence);
  1.6275 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6276 +        }
  1.6277 +
  1.6278 +        GLboolean OVR::GLEContext::glIsFenceAPPLE_Hook(GLuint fence)
  1.6279 +        {
  1.6280 +            GLboolean b = GL_FALSE;
  1.6281 +            if(glIsFenceAPPLE_Impl)
  1.6282 +                b = glIsFenceAPPLE_Impl(fence);
  1.6283 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6284 +            return b;
  1.6285 +        }
  1.6286 +
  1.6287 +        GLboolean OVR::GLEContext::glTestFenceAPPLE_Hook(GLuint fence)
  1.6288 +        {
  1.6289 +            GLboolean b = GL_FALSE;
  1.6290 +            if(glTestFenceAPPLE_Impl)
  1.6291 +                b = glTestFenceAPPLE_Impl(fence);
  1.6292 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6293 +            return b;
  1.6294 +        }
  1.6295 +
  1.6296 +        void OVR::GLEContext::glFinishFenceAPPLE_Hook(GLuint fence)
  1.6297 +        {
  1.6298 +            if(glFinishFenceAPPLE_Impl)
  1.6299 +                glFinishFenceAPPLE_Impl(fence);
  1.6300 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6301 +        }
  1.6302 +
  1.6303 +        GLboolean OVR::GLEContext::glTestObjectAPPLE_Hook(GLenum object, GLuint name)
  1.6304 +        {
  1.6305 +            GLboolean b = GL_FALSE;
  1.6306 +            if(glTestObjectAPPLE_Impl)
  1.6307 +                b = glTestObjectAPPLE_Impl(object, name);
  1.6308 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6309 +            return b;
  1.6310 +        }
  1.6311 +
  1.6312 +        void OVR::GLEContext::glFinishObjectAPPLE_Hook(GLenum object, GLint name)
  1.6313 +        {
  1.6314 +            if(glFinishObjectAPPLE_Impl)
  1.6315 +                glFinishObjectAPPLE_Impl(object, name);
  1.6316 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6317 +        }
  1.6318 +
  1.6319 +
  1.6320 +        // GL_APPLE_flush_buffer_range
  1.6321 +        void OVR::GLEContext::glBufferParameteriAPPLE_Hook(GLenum target, GLenum pname, GLint param)
  1.6322 +        {
  1.6323 +            if(glBufferParameteriAPPLE_Impl)
  1.6324 +                glBufferParameteriAPPLE_Impl(target, pname, param);
  1.6325 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6326 +        }
  1.6327 +
  1.6328 +        void OVR::GLEContext::glFlushMappedBufferRangeAPPLE_Hook(GLenum target, GLintptr offset, GLsizeiptr size)
  1.6329 +        {
  1.6330 +            if(glFlushMappedBufferRangeAPPLE_Impl)
  1.6331 +                glFlushMappedBufferRangeAPPLE_Impl(target, offset, size);
  1.6332 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6333 +        }
  1.6334 +
  1.6335 +
  1.6336 +        // GL_APPLE_object_purgeable
  1.6337 +        GLenum OVR::GLEContext::glObjectPurgeableAPPLE_Hook(GLenum objectType, GLuint name, GLenum option)
  1.6338 +        {
  1.6339 +            GLenum e = 0;
  1.6340 +            if(glObjectPurgeableAPPLE_Impl)
  1.6341 +                e = glObjectPurgeableAPPLE_Impl(objectType, name, option);
  1.6342 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6343 +            return e;
  1.6344 +        }
  1.6345 +
  1.6346 +        GLenum OVR::GLEContext::glObjectUnpurgeableAPPLE_Hook(GLenum objectType, GLuint name, GLenum option)
  1.6347 +        {
  1.6348 +            GLenum e = 0;
  1.6349 +            if(glObjectUnpurgeableAPPLE_Impl)
  1.6350 +                e =glObjectUnpurgeableAPPLE_Impl(objectType, name, option);
  1.6351 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6352 +            return e;
  1.6353 +        }
  1.6354 +
  1.6355 +        void OVR::GLEContext::glGetObjectParameterivAPPLE_Hook(GLenum objectType, GLuint name, GLenum pname, GLint *params)
  1.6356 +        {
  1.6357 +            if(glGetObjectParameterivAPPLE_Impl)
  1.6358 +                glGetObjectParameterivAPPLE_Impl(objectType, name, pname, params);
  1.6359 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6360 +        }
  1.6361 +
  1.6362 +
  1.6363 +        // GL_APPLE_texture_range
  1.6364 +        void OVR::GLEContext::glTextureRangeAPPLE_Hook(GLenum target, GLsizei length, const GLvoid *pointer)
  1.6365 +        {
  1.6366 +            if(glTextureRangeAPPLE_Impl)
  1.6367 +                glTextureRangeAPPLE_Impl(target, length, pointer);
  1.6368 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6369 +        }
  1.6370 +
  1.6371 +        void OVR::GLEContext::glGetTexParameterPointervAPPLE_Hook(GLenum target, GLenum pname, GLvoid **params)
  1.6372 +        {
  1.6373 +            if(glGetTexParameterPointervAPPLE_Impl)
  1.6374 +                glGetTexParameterPointervAPPLE_Impl(target, pname, params);
  1.6375 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6376 +        }
  1.6377 +
  1.6378 +
  1.6379 +        // GL_APPLE_vertex_array_object
  1.6380 +        void OVR::GLEContext::glBindVertexArrayAPPLE_Hook(GLuint array)
  1.6381 +        {
  1.6382 +            if(glBindVertexArrayAPPLE_Impl)
  1.6383 +                glBindVertexArrayAPPLE_Impl(array);
  1.6384 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6385 +        }
  1.6386 +
  1.6387 +        void OVR::GLEContext::glDeleteVertexArraysAPPLE_Hook(GLsizei n, const GLuint *arrays)
  1.6388 +        {
  1.6389 +            if(glDeleteVertexArraysAPPLE_Impl)
  1.6390 +                glDeleteVertexArraysAPPLE_Impl(n, arrays);
  1.6391 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6392 +        }
  1.6393 +
  1.6394 +        void OVR::GLEContext::glGenVertexArraysAPPLE_Hook(GLsizei n, GLuint *arrays)
  1.6395 +        {
  1.6396 +            if(glGenVertexArraysAPPLE_Impl)
  1.6397 +                glGenVertexArraysAPPLE_Impl(n, arrays);
  1.6398 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6399 +        }
  1.6400 +
  1.6401 +        GLboolean OVR::GLEContext::glIsVertexArrayAPPLE_Hook(GLuint array)
  1.6402 +        {
  1.6403 +            GLboolean b = GL_FALSE;
  1.6404 +            if(glIsVertexArrayAPPLE_Impl)
  1.6405 +                b = glIsVertexArrayAPPLE_Impl(array);
  1.6406 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6407 +            return b;
  1.6408 +        }
  1.6409 +
  1.6410 +
  1.6411 +        // GL_APPLE_vertex_array_range
  1.6412 +        void OVR::GLEContext::glVertexArrayRangeAPPLE_Hook(GLsizei length, GLvoid *pointer)
  1.6413 +        {
  1.6414 +            if(glVertexArrayRangeAPPLE_Impl)
  1.6415 +                glVertexArrayRangeAPPLE_Impl(length, pointer);
  1.6416 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6417 +        }
  1.6418 +
  1.6419 +        void OVR::GLEContext::glFlushVertexArrayRangeAPPLE_Hook(GLsizei length, GLvoid *pointer)
  1.6420 +        {
  1.6421 +            if(glFlushVertexArrayRangeAPPLE_Impl)
  1.6422 +                glFlushVertexArrayRangeAPPLE_Impl(length, pointer);
  1.6423 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6424 +        }
  1.6425 +
  1.6426 +        void OVR::GLEContext::glVertexArrayParameteriAPPLE_Hook(GLenum pname, GLint param)
  1.6427 +        {
  1.6428 +            if(glVertexArrayParameteriAPPLE_Impl)
  1.6429 +                glVertexArrayParameteriAPPLE_Impl(pname, param);
  1.6430 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6431 +        }
  1.6432 +
  1.6433 +
  1.6434 +        // GL_APPLE_vertex_program_evaluators
  1.6435 +        void OVR::GLEContext::glEnableVertexAttribAPPLE_Hook(GLuint index, GLenum pname)
  1.6436 +        {
  1.6437 +            if(glEnableVertexAttribAPPLE_Impl)
  1.6438 +                glEnableVertexAttribAPPLE_Impl(index, pname);
  1.6439 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6440 +        }
  1.6441 +
  1.6442 +        void OVR::GLEContext::glDisableVertexAttribAPPLE_Hook(GLuint index, GLenum pname)
  1.6443 +        {
  1.6444 +            if(glDisableVertexAttribAPPLE_Impl)
  1.6445 +                glDisableVertexAttribAPPLE_Impl(index, pname);
  1.6446 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6447 +        }
  1.6448 +
  1.6449 +        GLboolean OVR::GLEContext::glIsVertexAttribEnabledAPPLE_Hook(GLuint index, GLenum pname)
  1.6450 +        {
  1.6451 +            GLboolean b = GL_FALSE;
  1.6452 +            if(glIsVertexAttribEnabledAPPLE_Impl)
  1.6453 +                b = glIsVertexAttribEnabledAPPLE_Impl(index, pname);
  1.6454 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6455 +            return b;
  1.6456 +        }
  1.6457 +
  1.6458 +        void OVR::GLEContext::glMapVertexAttrib1dAPPLE_Hook(GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
  1.6459 +        {
  1.6460 +            if(glMapVertexAttrib1dAPPLE_Impl)
  1.6461 +                glMapVertexAttrib1dAPPLE_Impl(index, size, u1, u2, stride, order, points);
  1.6462 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6463 +        }
  1.6464 +
  1.6465 +        void OVR::GLEContext::glMapVertexAttrib1fAPPLE_Hook(GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
  1.6466 +        {
  1.6467 +            if(glMapVertexAttrib1fAPPLE_Impl)
  1.6468 +                glMapVertexAttrib1fAPPLE_Impl(index, size, u1, u2, stride, order, points);
  1.6469 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6470 +        }
  1.6471 +
  1.6472 +        void OVR::GLEContext::glMapVertexAttrib2dAPPLE_Hook(GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)
  1.6473 +        {
  1.6474 +            if(glMapVertexAttrib2dAPPLE_Impl)
  1.6475 +                glMapVertexAttrib2dAPPLE_Impl(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
  1.6476 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6477 +        }
  1.6478 +
  1.6479 +        void OVR::GLEContext::glMapVertexAttrib2fAPPLE_Hook(GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
  1.6480 +        {
  1.6481 +            if(glMapVertexAttrib2fAPPLE_Impl)
  1.6482 +                glMapVertexAttrib2fAPPLE_Impl(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
  1.6483 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6484 +        }
  1.6485 +    #endif // GLE_CGL_ENABLED
  1.6486 +
  1.6487 +
  1.6488 +        // GL_ARB_debug_output
  1.6489 +        void OVR::GLEContext::glDebugMessageControlARB_Hook(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled)
  1.6490 +        {
  1.6491 +            if(glDebugMessageControlARB_Impl)
  1.6492 +                glDebugMessageControlARB_Impl(source, type, severity, count, ids, enabled);
  1.6493 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6494 +        }
  1.6495 +
  1.6496 +        void OVR::GLEContext::glDebugMessageInsertARB_Hook(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf)
  1.6497 +        {
  1.6498 +            if(glDebugMessageInsertARB_Impl)
  1.6499 +                glDebugMessageInsertARB_Impl(source, type, id, severity, length, buf);
  1.6500 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6501 +        }
  1.6502 +
  1.6503 +        void OVR::GLEContext::glDebugMessageCallbackARB_Hook(GLDEBUGPROCARB callback, const GLvoid *userParam)
  1.6504 +        {
  1.6505 +            if(glDebugMessageCallbackARB_Impl)
  1.6506 +                glDebugMessageCallbackARB_Impl(callback, userParam);
  1.6507 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6508 +        }
  1.6509 +
  1.6510 +        GLuint OVR::GLEContext::glGetDebugMessageLogARB_Hook(GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog)
  1.6511 +        {
  1.6512 +            GLuint u = 0;
  1.6513 +            if(glGetDebugMessageLogARB_Impl)
  1.6514 +                u = glGetDebugMessageLogARB_Impl(count, bufsize, sources, types, ids, severities, lengths, messageLog);
  1.6515 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6516 +            return u;
  1.6517 +        }
  1.6518 +
  1.6519 +
  1.6520 +        // GL_ARB_ES2_compatibility
  1.6521 +        void OVR::GLEContext::glReleaseShaderCompiler_Hook()
  1.6522 +        {
  1.6523 +            if(glReleaseShaderCompiler_Impl)
  1.6524 +                glReleaseShaderCompiler_Impl();
  1.6525 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6526 +        }
  1.6527 +
  1.6528 +        void OVR::GLEContext::glShaderBinary_Hook(GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length)
  1.6529 +        {
  1.6530 +            if(glShaderBinary_Impl)
  1.6531 +                glShaderBinary_Impl(count, shaders, binaryformat, binary, length);
  1.6532 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6533 +        }
  1.6534 +
  1.6535 +        void OVR::GLEContext::glGetShaderPrecisionFormat_Hook(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
  1.6536 +        {
  1.6537 +            if(glGetShaderPrecisionFormat_Impl)
  1.6538 +                glGetShaderPrecisionFormat_Impl(shadertype, precisiontype, range, precision);
  1.6539 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6540 +        }
  1.6541 +
  1.6542 +        void OVR::GLEContext::glDepthRangef_Hook(GLclampf n, GLclampf f)
  1.6543 +        {
  1.6544 +            if(glDepthRangef_Impl)
  1.6545 +                glDepthRangef_Impl(n, f);
  1.6546 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6547 +        }
  1.6548 +
  1.6549 +        void OVR::GLEContext::glClearDepthf_Hook(GLclampf d)
  1.6550 +        {
  1.6551 +            if(glClearDepthf_Impl)
  1.6552 +                glClearDepthf_Impl(d);
  1.6553 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6554 +        }
  1.6555 +
  1.6556 +
  1.6557 +        // GL_ARB_framebuffer_object
  1.6558 +        GLboolean OVR::GLEContext::glIsRenderbuffer_Hook(GLuint renderbuffer)
  1.6559 +        {
  1.6560 +            GLboolean b = GL_FALSE;
  1.6561 +            if(glIsRenderbuffer_Impl)
  1.6562 +                b = glIsRenderbuffer_Impl(renderbuffer);
  1.6563 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6564 +            return b;
  1.6565 +        }
  1.6566 +
  1.6567 +        void OVR::GLEContext::glBindRenderbuffer_Hook(GLenum target, GLuint renderbuffer)
  1.6568 +        {
  1.6569 +            if(glBindRenderbuffer_Impl)
  1.6570 +                glBindRenderbuffer_Impl(target, renderbuffer);
  1.6571 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6572 +        }
  1.6573 +
  1.6574 +        void OVR::GLEContext::glDeleteRenderbuffers_Hook(GLsizei n, const GLuint *renderbuffers)
  1.6575 +        {
  1.6576 +            if(glDeleteRenderbuffers_Impl)
  1.6577 +                glDeleteRenderbuffers_Impl(n, renderbuffers);
  1.6578 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6579 +        }
  1.6580 +
  1.6581 +        void OVR::GLEContext::glGenRenderbuffers_Hook(GLsizei n, GLuint *renderbuffers)
  1.6582 +        {
  1.6583 +            if(glGenRenderbuffers_Impl)
  1.6584 +                glGenRenderbuffers_Impl(n, renderbuffers);
  1.6585 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6586 +        }
  1.6587 +
  1.6588 +        void OVR::GLEContext::glRenderbufferStorage_Hook(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
  1.6589 +        {
  1.6590 +            if(glRenderbufferStorage_Impl)
  1.6591 +                glRenderbufferStorage_Impl(target, internalformat, width, height);
  1.6592 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6593 +        }
  1.6594 +
  1.6595 +        void OVR::GLEContext::glGetRenderbufferParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
  1.6596 +        {
  1.6597 +            if(glGetRenderbufferParameteriv_Impl)
  1.6598 +                glGetRenderbufferParameteriv_Impl(target, pname, params);
  1.6599 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6600 +        }
  1.6601 +
  1.6602 +        GLboolean OVR::GLEContext::glIsFramebuffer_Hook(GLuint framebuffer)
  1.6603 +        {
  1.6604 +            GLboolean b = GL_FALSE;
  1.6605 +            if(glIsFramebuffer_Impl)
  1.6606 +                b = glIsFramebuffer_Impl(framebuffer);
  1.6607 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6608 +            return b;
  1.6609 +        }
  1.6610 +
  1.6611 +        void OVR::GLEContext::glBindFramebuffer_Hook(GLenum target, GLuint framebuffer)
  1.6612 +        {
  1.6613 +            if(glBindFramebuffer_Impl)
  1.6614 +                glBindFramebuffer_Impl(target, framebuffer);
  1.6615 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6616 +        }
  1.6617 +
  1.6618 +        void OVR::GLEContext::glDeleteFramebuffers_Hook(GLsizei n, const GLuint *framebuffers)
  1.6619 +        {
  1.6620 +            if(glDeleteFramebuffers_Impl)
  1.6621 +                glDeleteFramebuffers_Impl(n, framebuffers);
  1.6622 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6623 +        }
  1.6624 +
  1.6625 +        void OVR::GLEContext::glGenFramebuffers_Hook(GLsizei n, GLuint *framebuffers)
  1.6626 +        {
  1.6627 +            if(glGenFramebuffers_Impl)
  1.6628 +                glGenFramebuffers_Impl(n, framebuffers);
  1.6629 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6630 +        }
  1.6631 +
  1.6632 +        GLenum OVR::GLEContext::glCheckFramebufferStatus_Hook(GLenum target)
  1.6633 +        {
  1.6634 +            GLenum e = 0;
  1.6635 +            if(glCheckFramebufferStatus_Impl)
  1.6636 +                e = glCheckFramebufferStatus_Impl(target);
  1.6637 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6638 +            return e;
  1.6639 +        }
  1.6640 +
  1.6641 +        void OVR::GLEContext::glFramebufferTexture1D_Hook(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
  1.6642 +        {
  1.6643 +            if(glFramebufferTexture1D_Impl)
  1.6644 +                glFramebufferTexture1D_Impl(target, attachment, textarget, texture, level);
  1.6645 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6646 +        }
  1.6647 +
  1.6648 +        void OVR::GLEContext::glFramebufferTexture2D_Hook(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
  1.6649 +        {
  1.6650 +            if(glFramebufferTexture2D_Impl)
  1.6651 +                glFramebufferTexture2D_Impl(target, attachment, textarget, texture, level);
  1.6652 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6653 +        }
  1.6654 +
  1.6655 +        void OVR::GLEContext::glFramebufferTexture3D_Hook(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
  1.6656 +        {
  1.6657 +            if(glFramebufferTexture3D_Impl)
  1.6658 +                glFramebufferTexture3D_Impl(target, attachment, textarget, texture, level, zoffset);
  1.6659 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6660 +        }
  1.6661 +
  1.6662 +        void OVR::GLEContext::glFramebufferRenderbuffer_Hook(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
  1.6663 +        {
  1.6664 +            if(glFramebufferRenderbuffer_Impl)
  1.6665 +                glFramebufferRenderbuffer_Impl(target, attachment, renderbuffertarget, renderbuffer);
  1.6666 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6667 +        }
  1.6668 +
  1.6669 +        void OVR::GLEContext::glGetFramebufferAttachmentParameteriv_Hook(GLenum target, GLenum attachment, GLenum pname, GLint *params)
  1.6670 +        {
  1.6671 +            if(glGetFramebufferAttachmentParameteriv_Impl)
  1.6672 +                glGetFramebufferAttachmentParameteriv_Impl(target, attachment, pname, params);
  1.6673 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6674 +        }
  1.6675 +
  1.6676 +        void OVR::GLEContext::glGenerateMipmap_Hook(GLenum target)
  1.6677 +        {
  1.6678 +            if(glGenerateMipmap_Impl)
  1.6679 +                glGenerateMipmap_Impl(target);
  1.6680 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6681 +        }
  1.6682 +
  1.6683 +        void OVR::GLEContext::glBlitFramebuffer_Hook(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
  1.6684 +        {
  1.6685 +            if(glBlitFramebuffer_Impl)
  1.6686 +                glBlitFramebuffer_Impl(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
  1.6687 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6688 +        }
  1.6689 +
  1.6690 +        void OVR::GLEContext::glRenderbufferStorageMultisample_Hook(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
  1.6691 +        {
  1.6692 +            if(glRenderbufferStorageMultisample_Impl)
  1.6693 +                glRenderbufferStorageMultisample_Impl(target, samples, internalformat, width, height);
  1.6694 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6695 +        }
  1.6696 +
  1.6697 +        void OVR::GLEContext::glFramebufferTextureLayer_Hook(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
  1.6698 +        {
  1.6699 +            if(glFramebufferTextureLayer_Impl)
  1.6700 +                glFramebufferTextureLayer_Impl(target, attachment, texture, level, layer);
  1.6701 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6702 +        }
  1.6703 +
  1.6704 +
  1.6705 +        // GL_ARB_texture_multisample
  1.6706 +        void OVR::GLEContext::glTexImage2DMultisample_Hook(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
  1.6707 +        {
  1.6708 +            if(glTexImage2DMultisample_Impl)
  1.6709 +                glTexImage2DMultisample_Impl(target, samples, internalformat, width, height, fixedsamplelocations);
  1.6710 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6711 +        }
  1.6712 +
  1.6713 +        void OVR::GLEContext::glTexImage3DMultisample_Hook(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
  1.6714 +        {
  1.6715 +            if(glTexImage3DMultisample_Impl)
  1.6716 +                glTexImage3DMultisample_Impl(target, samples, internalformat, width, height, depth, fixedsamplelocations);
  1.6717 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6718 +        }
  1.6719 +
  1.6720 +        void OVR::GLEContext::glGetMultisamplefv_Hook(GLenum pname, GLuint index, GLfloat *val)
  1.6721 +        {
  1.6722 +            if(glGetMultisamplefv_Impl)
  1.6723 +                glGetMultisamplefv_Impl(pname, index, val);
  1.6724 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6725 +        }
  1.6726 +
  1.6727 +        void OVR::GLEContext::glSampleMaski_Hook(GLuint index, GLbitfield mask)
  1.6728 +        {
  1.6729 +            if(glSampleMaski_Impl)
  1.6730 +                glSampleMaski_Impl(index, mask);
  1.6731 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6732 +        }
  1.6733 +
  1.6734 +
  1.6735 +        // GL_ARB_timer_query
  1.6736 +        void OVR::GLEContext::glQueryCounter_Hook(GLuint id, GLenum target)
  1.6737 +        {
  1.6738 +            if(glQueryCounter_Impl)
  1.6739 +                glQueryCounter_Impl(id, target);
  1.6740 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6741 +        }
  1.6742 +
  1.6743 +        void OVR::GLEContext::glGetQueryObjecti64v_Hook(GLuint id, GLenum pname, GLint64 *params)
  1.6744 +        {
  1.6745 +            if(glGetQueryObjecti64v_Impl)
  1.6746 +                glGetQueryObjecti64v_Impl(id, pname, params);
  1.6747 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6748 +        }
  1.6749 +
  1.6750 +        void OVR::GLEContext::glGetQueryObjectui64v_Hook(GLuint id, GLenum pname, GLuint64 *params)
  1.6751 +        {
  1.6752 +            if(glGetQueryObjectui64v_Impl)
  1.6753 +                glGetQueryObjectui64v_Impl(id, pname, params);
  1.6754 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6755 +        }
  1.6756 +
  1.6757 +
  1.6758 +        // GL_ARB_vertex_array_object
  1.6759 +        void OVR::GLEContext::glBindVertexArray_Hook(GLuint array)
  1.6760 +        {
  1.6761 +            if(glBindVertexArray_Impl)
  1.6762 +                glBindVertexArray_Impl(array);
  1.6763 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6764 +        }
  1.6765 +
  1.6766 +        void OVR::GLEContext::glDeleteVertexArrays_Hook(GLsizei n, const GLuint *arrays)
  1.6767 +        {
  1.6768 +            if(glDeleteVertexArrays_Impl)
  1.6769 +                glDeleteVertexArrays_Impl(n, arrays);
  1.6770 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6771 +        }
  1.6772 +
  1.6773 +        void OVR::GLEContext::glGenVertexArrays_Hook(GLsizei n, GLuint *arrays)
  1.6774 +        {
  1.6775 +            if(glGenVertexArrays_Impl)
  1.6776 +                glGenVertexArrays_Impl(n, arrays);
  1.6777 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6778 +        }
  1.6779 +
  1.6780 +        GLboolean OVR::GLEContext::glIsVertexArray_Hook(GLuint array)
  1.6781 +        {
  1.6782 +            GLboolean b = GL_FALSE;
  1.6783 +            if(glIsVertexArray_Impl)
  1.6784 +                b = glIsVertexArray_Impl(array);
  1.6785 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6786 +            return b;
  1.6787 +        }
  1.6788 +
  1.6789 +
  1.6790 +        // GL_EXT_draw_buffers2
  1.6791 +        void OVR::GLEContext::glColorMaskIndexedEXT_Hook(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
  1.6792 +        {
  1.6793 +            if(glColorMaskIndexedEXT_Impl)
  1.6794 +                glColorMaskIndexedEXT_Impl(index, r, g, b, a);
  1.6795 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6796 +        }
  1.6797 +
  1.6798 +        void OVR::GLEContext::glGetBooleanIndexedvEXT_Hook(GLenum target, GLuint index, GLboolean *data)
  1.6799 +        {
  1.6800 +            if(glGetBooleanIndexedvEXT_Impl)
  1.6801 +                glGetBooleanIndexedvEXT_Impl(target, index, data);
  1.6802 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6803 +        }
  1.6804 +
  1.6805 +        void OVR::GLEContext::glGetIntegerIndexedvEXT_Hook(GLenum target, GLuint index, GLint *data)
  1.6806 +        {
  1.6807 +            if(glGetIntegerIndexedvEXT_Impl)
  1.6808 +                glGetIntegerIndexedvEXT_Impl(target, index, data);
  1.6809 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6810 +        }
  1.6811 +
  1.6812 +        void OVR::GLEContext::glEnableIndexedEXT_Hook(GLenum target, GLuint index)
  1.6813 +        {
  1.6814 +            if(glEnableIndexedEXT_Impl)
  1.6815 +                glEnableIndexedEXT_Impl(target, index);
  1.6816 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6817 +        }
  1.6818 +
  1.6819 +        void OVR::GLEContext::glDisableIndexedEXT_Hook(GLenum target, GLuint index)
  1.6820 +        {
  1.6821 +            if(glDisableIndexedEXT_Impl)
  1.6822 +                glDisableIndexedEXT_Impl(target, index);
  1.6823 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6824 +        }
  1.6825 +
  1.6826 +        GLboolean OVR::GLEContext::glIsEnabledIndexedEXT_Hook(GLenum target, GLuint index)
  1.6827 +        {
  1.6828 +            GLboolean b = GL_FALSE;
  1.6829 +            if(glIsEnabledIndexedEXT_Impl)
  1.6830 +                b = glIsEnabledIndexedEXT_Impl(target, index);
  1.6831 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6832 +            return b;
  1.6833 +        }
  1.6834 +
  1.6835 +
  1.6836 +        // GL_KHR_debug
  1.6837 +        void OVR::GLEContext::glDebugMessageControl_Hook(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled)
  1.6838 +        {
  1.6839 +            if(glDebugMessageControl_Impl)
  1.6840 +                glDebugMessageControl_Impl(source, type, severity, count, ids, enabled);
  1.6841 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6842 +        }
  1.6843 +
  1.6844 +        void OVR::GLEContext::glDebugMessageInsert_Hook(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char* buf)
  1.6845 +        {
  1.6846 +            if(glDebugMessageInsert_Impl)
  1.6847 +                glDebugMessageInsert_Impl(source, type, id, severity, length, buf);
  1.6848 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6849 +        }
  1.6850 +
  1.6851 +        void OVR::GLEContext::glDebugMessageCallback_Hook(GLDEBUGPROC callback, const void* userParam)
  1.6852 +        {
  1.6853 +            if(glDebugMessageCallback_Impl)
  1.6854 +                glDebugMessageCallback_Impl(callback, userParam);
  1.6855 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6856 +        }
  1.6857 +
  1.6858 +        GLuint OVR::GLEContext::glGetDebugMessageLog_Hook(GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths,  char* messageLog)
  1.6859 +        {
  1.6860 +            GLuint u = 0;
  1.6861 +            if(glGetDebugMessageLog_Impl)
  1.6862 +                u = glGetDebugMessageLog_Impl(count, bufSize, sources, types, ids, severities, lengths, messageLog);
  1.6863 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6864 +            return u;
  1.6865 +        }
  1.6866 +
  1.6867 +        void OVR::GLEContext::glPushDebugGroup_Hook(GLenum source, GLuint id, GLsizei length, const char * message)
  1.6868 +        {
  1.6869 +            if(glPushDebugGroup_Impl)
  1.6870 +                glPushDebugGroup_Impl(source, id, length,  message);
  1.6871 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6872 +        }
  1.6873 +
  1.6874 +        void OVR::GLEContext::glPopDebugGroup_Hook()
  1.6875 +        {
  1.6876 +            if(glPopDebugGroup_Impl)
  1.6877 +                glPopDebugGroup_Impl();
  1.6878 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6879 +        }
  1.6880 +
  1.6881 +        void OVR::GLEContext::glObjectLabel_Hook(GLenum identifier, GLuint name, GLsizei length, const char *label)
  1.6882 +        {
  1.6883 +            if(glObjectLabel_Impl)
  1.6884 +                glObjectLabel_Impl(identifier, name, length, label);
  1.6885 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6886 +        }
  1.6887 +
  1.6888 +        void OVR::GLEContext::glGetObjectLabel_Hook(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, char *label)
  1.6889 +        {
  1.6890 +            if(glGetObjectLabel_Impl)
  1.6891 +                glGetObjectLabel_Impl(identifier, name, bufSize, length, label);
  1.6892 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6893 +        }
  1.6894 +
  1.6895 +        void OVR::GLEContext::glObjectPtrLabel_Hook(void* ptr, GLsizei length, const char *label)
  1.6896 +        {
  1.6897 +            if(glObjectPtrLabel_Impl)
  1.6898 +                glObjectPtrLabel_Impl(ptr, length, label);
  1.6899 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6900 +        }
  1.6901 +
  1.6902 +        void OVR::GLEContext::glGetObjectPtrLabel_Hook(void* ptr, GLsizei bufSize, GLsizei *length, char *label)
  1.6903 +        {
  1.6904 +            if(glGetObjectPtrLabel_Impl)
  1.6905 +                glGetObjectPtrLabel_Impl(ptr, bufSize, length, label);
  1.6906 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6907 +        }
  1.6908 +
  1.6909 +
  1.6910 +        // GL_WIN_swap_hint
  1.6911 +        void OVR::GLEContext::glAddSwapHintRectWIN_Hook(GLint x, GLint y, GLsizei width, GLsizei height)
  1.6912 +        {
  1.6913 +            if(glAddSwapHintRectWIN_Impl)
  1.6914 +                glAddSwapHintRectWIN_Impl(x, y, width, height);
  1.6915 +            PostHook(GLE_CURRENT_FUNCTION);
  1.6916 +        }
  1.6917 +
  1.6918 +
  1.6919 +        #if defined(GLE_WGL_ENABLED)
  1.6920 +			// WGL
  1.6921 +			void OVR::GLEContext::PostWGLHook(const char* /*function*/)
  1.6922 +			{
  1.6923 +				// Empty for now. WGL functions don't have a function like glGetError().
  1.6924 +			}
  1.6925 +
  1.6926 +            /* We currently don't hook these
  1.6927 +			#undef wglCopyContext
  1.6928 +			extern "C" { GLAPI BOOL GLAPIENTRY wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask); }
  1.6929 +			BOOL OVR::GLEContext::wglCopyContext_Hook(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask)
  1.6930 +			{
  1.6931 +				BOOL b = wglCopyContext(hglrcSrc, hglrcDst, mask);
  1.6932 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.6933 +				return b;
  1.6934 +			}
  1.6935 +
  1.6936 +			#undef wglCreateContext
  1.6937 +			extern "C" { GLAPI HGLRC GLAPIENTRY wglCreateContext(HDC hdc); }
  1.6938 +			HGLRC OVR::GLEContext::wglCreateContext_Hook(HDC hdc)
  1.6939 +			{
  1.6940 +				HGLRC h = wglCreateContext(hdc);
  1.6941 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.6942 +				return h;
  1.6943 +			}
  1.6944 +
  1.6945 +			#undef wglCreateLayerContext
  1.6946 +			extern "C" { GLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC hdc, int iLayerPlane); }
  1.6947 +			HGLRC OVR::GLEContext::wglCreateLayerContext_Hook(HDC hdc, int iLayerPlane)
  1.6948 +			{
  1.6949 +				HGLRC h = wglCreateLayerContext(hdc, iLayerPlane);
  1.6950 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.6951 +				return h;
  1.6952 +			}
  1.6953 +
  1.6954 +			#undef wglDeleteContext
  1.6955 +			extern "C" { GLAPI BOOL GLAPIENTRY wglDeleteContext(HGLRC hglrc); }
  1.6956 +			BOOL OVR::GLEContext::wglDeleteContext_Hook(HGLRC hglrc)
  1.6957 +			{
  1.6958 +				BOOL b = wglDeleteContext(hglrc);
  1.6959 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.6960 +				return b;
  1.6961 +			}
  1.6962 +
  1.6963 +			#undef wglGetCurrentContext
  1.6964 +			extern "C" { GLAPI HGLRC GLAPIENTRY wglGetCurrentContext(); }
  1.6965 +			HGLRC OVR::GLEContext::wglGetCurrentContext_Hook()
  1.6966 +			{
  1.6967 +				HGLRC h = wglGetCurrentContext();
  1.6968 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.6969 +				return h;
  1.6970 +			}
  1.6971 +
  1.6972 +			#undef wglGetCurrentDC
  1.6973 +			extern "C" { GLAPI HDC GLAPIENTRY wglGetCurrentDC(); }
  1.6974 +			HDC OVR::GLEContext::wglGetCurrentDC_Hook()
  1.6975 +			{
  1.6976 +				HDC h = wglGetCurrentDC();
  1.6977 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.6978 +				return h;
  1.6979 +			}
  1.6980 +
  1.6981 +			//#undef wglGetProcAddress Not needed because we happen to do it above already.
  1.6982 +			//extern "C" { GLAPI PROC GLAPIENTRY wglGetProcAddress(LPCSTR lpszProc); }
  1.6983 +			PROC OVR::GLEContext::wglGetProcAddress_Hook(LPCSTR lpszProc)
  1.6984 +			{
  1.6985 +				PROC p = wglGetProcAddress(lpszProc);
  1.6986 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.6987 +				return p;
  1.6988 +			}
  1.6989 +
  1.6990 +			#undef wglMakeCurrent
  1.6991 +			extern "C" { GLAPI BOOL GLAPIENTRY wglMakeCurrent(HDC hdc, HGLRC hglrc); }
  1.6992 +			BOOL OVR::GLEContext::wglMakeCurrent_Hook(HDC hdc, HGLRC hglrc)
  1.6993 +			{
  1.6994 +				BOOL b = wglMakeCurrent(hdc, hglrc);
  1.6995 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.6996 +				return b;
  1.6997 +			}
  1.6998 +
  1.6999 +			#undef wglShareLists
  1.7000 +			extern "C" { GLAPI BOOL GLAPIENTRY wglShareLists(HGLRC hglrc1, HGLRC hglrc2); }
  1.7001 +			BOOL OVR::GLEContext::wglShareLists_Hook(HGLRC hglrc1, HGLRC hglrc2)
  1.7002 +			{
  1.7003 +				BOOL b = wglShareLists(hglrc1, hglrc2);
  1.7004 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7005 +				return b;
  1.7006 +			}
  1.7007 +
  1.7008 +			#undef wglUseFontBitmapsA
  1.7009 +			extern "C" { GLAPI BOOL GLAPIENTRY wglUseFontBitmapsA(HDC hdc, DWORD first, DWORD count, DWORD listBase); }
  1.7010 +			BOOL OVR::GLEContext::wglUseFontBitmapsA_Hook(HDC hdc, DWORD first, DWORD count, DWORD listBase)
  1.7011 +			{
  1.7012 +				BOOL b = wglUseFontBitmapsA(hdc, first, count, listBase);
  1.7013 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7014 +				return b;
  1.7015 +			}
  1.7016 +
  1.7017 +			#undef wglUseFontBitmapsW
  1.7018 +			extern "C" { GLAPI BOOL GLAPIENTRY wglUseFontBitmapsW(HDC hdc, DWORD first, DWORD count, DWORD listBase); }
  1.7019 +			BOOL OVR::GLEContext::wglUseFontBitmapsW_Hook(HDC hdc, DWORD first, DWORD count, DWORD listBase)
  1.7020 +			{
  1.7021 +				BOOL b = wglUseFontBitmapsW(hdc, first, count, listBase);
  1.7022 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7023 +				return b;
  1.7024 +			}
  1.7025 +
  1.7026 +			#undef wglUseFontOutlinesA
  1.7027 +			extern "C" { GLAPI BOOL GLAPIENTRY wglUseFontOutlinesA(HDC hdc, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf); }
  1.7028 +			BOOL OVR::GLEContext::wglUseFontOutlinesA_Hook(HDC hdc, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf)
  1.7029 +			{
  1.7030 +				BOOL b = wglUseFontOutlinesA(hdc, first, count, listBase, deviation, extrusion, format, lpgmf);
  1.7031 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7032 +				return b;
  1.7033 +			}
  1.7034 +
  1.7035 +			#undef wglUseFontOutlinesW
  1.7036 +			extern "C" { GLAPI BOOL GLAPIENTRY wglUseFontOutlinesW(HDC hdc, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf); }
  1.7037 +			BOOL OVR::GLEContext::wglUseFontOutlinesW_Hook(HDC hdc, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf)
  1.7038 +			{
  1.7039 +				BOOL b = wglUseFontOutlinesW(hdc, first, count, listBase, deviation, extrusion, format, lpgmf);
  1.7040 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7041 +				return b;
  1.7042 +			}
  1.7043 +
  1.7044 +			#undef wglDescribeLayerPlane
  1.7045 +			extern "C" { GLAPI BOOL GLAPIENTRY wglDescribeLayerPlane(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nBytes, LPLAYERPLANEDESCRIPTOR plpd); }
  1.7046 +			BOOL OVR::GLEContext::wglDescribeLayerPlane_Hook(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nBytes, LPLAYERPLANEDESCRIPTOR plpd)
  1.7047 +			{
  1.7048 +				BOOL b = wglDescribeLayerPlane(hdc, iPixelFormat, iLayerPlane, nBytes, plpd);
  1.7049 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7050 +				return b;
  1.7051 +			}
  1.7052 +
  1.7053 +			#undef wglSetLayerPaletteEntries
  1.7054 +			extern "C" { GLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr); }
  1.7055 +			int OVR::GLEContext::wglSetLayerPaletteEntries_Hook(HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr)
  1.7056 +			{
  1.7057 +				int i = wglSetLayerPaletteEntries(hdc, iLayerPlane, iStart, cEntries, pcr);
  1.7058 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7059 +				return i;
  1.7060 +			}
  1.7061 +
  1.7062 +			#undef wglGetLayerPaletteEntries
  1.7063 +			extern "C" { GLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC hdc, int iLayerPlane, int iStart, int cEntries, COLORREF *pcr); }
  1.7064 +			int OVR::GLEContext::wglGetLayerPaletteEntries_Hook(HDC hdc, int iLayerPlane, int iStart, int cEntries, COLORREF *pcr)
  1.7065 +			{
  1.7066 +				int i = wglGetLayerPaletteEntries(hdc, iLayerPlane, iStart, cEntries, pcr);
  1.7067 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7068 +				return i;
  1.7069 +			}
  1.7070 +
  1.7071 +			#undef wglRealizeLayerPalette
  1.7072 +			extern "C" { GLAPI BOOL GLAPIENTRY wglRealizeLayerPalette(HDC hdc, int iLayerPlane, BOOL bRealize); }
  1.7073 +			BOOL OVR::GLEContext::wglRealizeLayerPalette_Hook(HDC hdc, int iLayerPlane, BOOL bRealize)
  1.7074 +			{
  1.7075 +				BOOL b = wglRealizeLayerPalette(hdc, iLayerPlane, bRealize);
  1.7076 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7077 +				return b;
  1.7078 +			}
  1.7079 +
  1.7080 +			#undef wglSwapLayerBuffers
  1.7081 +			extern "C" { GLAPI BOOL GLAPIENTRY wglSwapLayerBuffers(HDC hdc, UINT fuPlanes); }
  1.7082 +			BOOL OVR::GLEContext::wglSwapLayerBuffers_Hook(HDC hdc, UINT fuPlanes)
  1.7083 +			{
  1.7084 +				BOOL b = wglSwapLayerBuffers(hdc, fuPlanes);
  1.7085 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7086 +				return b;
  1.7087 +			}
  1.7088 +
  1.7089 +			#undef wglSwapMultipleBuffers
  1.7090 +			extern "C" { GLAPI DWORD GLAPIENTRY wglSwapMultipleBuffers(UINT i, CONST WGLSWAP* p); }
  1.7091 +			DWORD OVR::GLEContext::wglSwapMultipleBuffers_Hook(UINT i, CONST WGLSWAP* p)
  1.7092 +			{
  1.7093 +				DWORD dw = wglSwapMultipleBuffers(i, p);
  1.7094 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7095 +				return dw;
  1.7096 +			}
  1.7097 +            */
  1.7098 +
  1.7099 +			// The rest of the functions are pointer-based.
  1.7100 +
  1.7101 +			// WGL_ARB_buffer_region
  1.7102 +			HANDLE OVR::GLEContext::wglCreateBufferRegionARB_Hook(HDC hDC, int iLayerPlane, UINT uType)
  1.7103 +			{
  1.7104 +				HANDLE h = NULL;
  1.7105 +				if(wglCreateBufferRegionARB_Impl)
  1.7106 +					h = wglCreateBufferRegionARB_Impl(hDC, iLayerPlane, uType);
  1.7107 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7108 +				return h;
  1.7109 +			}
  1.7110 +
  1.7111 +			VOID OVR::GLEContext::wglDeleteBufferRegionARB_Hook(HANDLE hRegion)
  1.7112 +			{
  1.7113 +				if(wglDeleteBufferRegionARB_Impl)
  1.7114 +					wglDeleteBufferRegionARB_Impl(hRegion);
  1.7115 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7116 +			}
  1.7117 +
  1.7118 +			BOOL OVR::GLEContext::wglSaveBufferRegionARB_Hook(HANDLE hRegion, int x, int y, int width, int height)
  1.7119 +			{
  1.7120 +				BOOL b = FALSE;
  1.7121 +				if(wglSaveBufferRegionARB_Impl)
  1.7122 +					b = wglSaveBufferRegionARB_Impl(hRegion, x, y, width, height);
  1.7123 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7124 +				return b;
  1.7125 +			}
  1.7126 +
  1.7127 +			BOOL OVR::GLEContext::wglRestoreBufferRegionARB_Hook(HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc)
  1.7128 +			{
  1.7129 +				BOOL b = FALSE;
  1.7130 +				if(wglRestoreBufferRegionARB_Impl)
  1.7131 +					b = wglRestoreBufferRegionARB_Impl(hRegion, x, y, width, height, xSrc, ySrc);
  1.7132 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7133 +				return b;
  1.7134 +			}
  1.7135 +
  1.7136 +			// WGL_ARB_extensions_string
  1.7137 +			const char * OVR::GLEContext::wglGetExtensionsStringARB_Hook(HDC hdc)
  1.7138 +			{
  1.7139 +				const char * p = NULL;
  1.7140 +				if(wglGetExtensionsStringARB_Impl)
  1.7141 +					p = wglGetExtensionsStringARB_Impl(hdc);
  1.7142 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7143 +				return p;
  1.7144 +			}
  1.7145 +
  1.7146 +			// WGL_ARB_pixel_format
  1.7147 +			BOOL OVR::GLEContext::wglGetPixelFormatAttribivARB_Hook(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues)
  1.7148 +			{
  1.7149 +				BOOL b = FALSE;
  1.7150 +				if(wglGetPixelFormatAttribivARB_Impl)
  1.7151 +					b = wglGetPixelFormatAttribivARB_Impl(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, piValues);
  1.7152 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7153 +				return b;
  1.7154 +			}
  1.7155 +
  1.7156 +			BOOL OVR::GLEContext::wglGetPixelFormatAttribfvARB_Hook(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues)
  1.7157 +			{
  1.7158 +				BOOL b = FALSE;
  1.7159 +				if(wglGetPixelFormatAttribfvARB_Impl)
  1.7160 +					b = wglGetPixelFormatAttribfvARB_Impl(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues);
  1.7161 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7162 +				return b;
  1.7163 +			}
  1.7164 +
  1.7165 +			BOOL OVR::GLEContext::wglChoosePixelFormatARB_Hook(HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats)
  1.7166 +			{
  1.7167 +				BOOL b = FALSE;
  1.7168 +				if(wglChoosePixelFormatARB_Impl)
  1.7169 +					b = wglChoosePixelFormatARB_Impl(hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats);
  1.7170 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7171 +				return b;
  1.7172 +			}
  1.7173 +
  1.7174 +			// WGL_ARB_make_current_read
  1.7175 +			BOOL OVR::GLEContext::wglMakeContextCurrentARB_Hook(HDC hDrawDC, HDC hReadDC, HGLRC hglrc)
  1.7176 +			{
  1.7177 +				BOOL b = FALSE;
  1.7178 +				if(wglMakeContextCurrentARB_Impl)
  1.7179 +					b = wglMakeContextCurrentARB_Impl(hDrawDC, hReadDC, hglrc);
  1.7180 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7181 +				return b;
  1.7182 +			}
  1.7183 +
  1.7184 +			HDC OVR::GLEContext::wglGetCurrentReadDCARB_Hook()
  1.7185 +			{
  1.7186 +				HDC h = NULL;
  1.7187 +				if(wglGetCurrentReadDCARB_Impl)
  1.7188 +					h = wglGetCurrentReadDCARB_Impl();
  1.7189 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7190 +				return h;
  1.7191 +			}
  1.7192 +
  1.7193 +			// WGL_ARB_pbuffer
  1.7194 +			HPBUFFERARB OVR::GLEContext::wglCreatePbufferARB_Hook(HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList)
  1.7195 +			{
  1.7196 +				HPBUFFERARB h = NULL;
  1.7197 +				if(wglCreatePbufferARB_Impl)
  1.7198 +					h = wglCreatePbufferARB_Impl(hDC, iPixelFormat, iWidth, iHeight, piAttribList);
  1.7199 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7200 +				return h;
  1.7201 +			}
  1.7202 +
  1.7203 +			HDC OVR::GLEContext::wglGetPbufferDCARB_Hook(HPBUFFERARB hPbuffer)
  1.7204 +			{
  1.7205 +				HDC h = NULL;
  1.7206 +				if(wglGetPbufferDCARB_Impl)
  1.7207 +					h = wglGetPbufferDCARB_Impl(hPbuffer);
  1.7208 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7209 +				return h;
  1.7210 +			}
  1.7211 +
  1.7212 +			int OVR::GLEContext::wglReleasePbufferDCARB_Hook(HPBUFFERARB hPbuffer, HDC hDC)
  1.7213 +			{
  1.7214 +				int i = 0;
  1.7215 +				if(wglReleasePbufferDCARB_Impl)
  1.7216 +					i = wglReleasePbufferDCARB_Impl(hPbuffer, hDC);
  1.7217 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7218 +				return i;
  1.7219 +			}
  1.7220 +
  1.7221 +			BOOL OVR::GLEContext::wglDestroyPbufferARB_Hook(HPBUFFERARB hPbuffer)
  1.7222 +			{
  1.7223 +				BOOL b = FALSE;
  1.7224 +				if(wglDestroyPbufferARB_Impl)
  1.7225 +					b = wglDestroyPbufferARB_Impl(hPbuffer);
  1.7226 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7227 +				return b;
  1.7228 +			}
  1.7229 +
  1.7230 +			BOOL OVR::GLEContext::wglQueryPbufferARB_Hook(HPBUFFERARB hPbuffer, int iAttribute, int *piValue)
  1.7231 +			{
  1.7232 +				BOOL b = FALSE;
  1.7233 +				if(wglQueryPbufferARB_Impl)
  1.7234 +					b = wglQueryPbufferARB_Impl(hPbuffer, iAttribute, piValue);
  1.7235 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7236 +				return b;
  1.7237 +			}
  1.7238 +
  1.7239 +			// WGL_ARB_render_texture
  1.7240 +			BOOL OVR::GLEContext::wglBindTexImageARB_Hook(HPBUFFERARB hPbuffer, int iBuffer)
  1.7241 +			{
  1.7242 +				BOOL b = FALSE;
  1.7243 +				if(wglBindTexImageARB_Impl)
  1.7244 +					b = wglBindTexImageARB_Impl(hPbuffer, iBuffer);
  1.7245 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7246 +				return b;
  1.7247 +			}
  1.7248 +
  1.7249 +			BOOL OVR::GLEContext::wglReleaseTexImageARB_Hook(HPBUFFERARB hPbuffer, int iBuffer)
  1.7250 +			{
  1.7251 +				BOOL b = FALSE;
  1.7252 +				if(wglReleaseTexImageARB_Impl)
  1.7253 +					b = wglReleaseTexImageARB_Impl(hPbuffer, iBuffer);
  1.7254 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7255 +				return b;
  1.7256 +			}
  1.7257 +
  1.7258 +			BOOL OVR::GLEContext::wglSetPbufferAttribARB_Hook(HPBUFFERARB hPbuffer, const int *piAttribList)
  1.7259 +			{
  1.7260 +				BOOL b = FALSE;
  1.7261 +				if(wglSetPbufferAttribARB_Impl)
  1.7262 +					b = wglSetPbufferAttribARB_Impl(hPbuffer, piAttribList);
  1.7263 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7264 +				return b;
  1.7265 +			}
  1.7266 +
  1.7267 +			// WGL_NV_present_video
  1.7268 +			int OVR::GLEContext::wglEnumerateVideoDevicesNV_Hook(HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList)
  1.7269 +			{
  1.7270 +				int i = 0;
  1.7271 +				if(wglEnumerateVideoDevicesNV_Impl)
  1.7272 +					i = wglEnumerateVideoDevicesNV_Impl(hDC, phDeviceList);
  1.7273 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7274 +				return i;
  1.7275 +			}
  1.7276 +
  1.7277 +			BOOL OVR::GLEContext::wglBindVideoDeviceNV_Hook(HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList)
  1.7278 +			{
  1.7279 +				BOOL b = FALSE;
  1.7280 +				if(wglBindVideoDeviceNV_Impl)
  1.7281 +					b = wglBindVideoDeviceNV_Impl(hDC, uVideoSlot, hVideoDevice, piAttribList);
  1.7282 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7283 +				return b;
  1.7284 +			}
  1.7285 +
  1.7286 +			BOOL OVR::GLEContext::wglQueryCurrentContextNV_Hook(int iAttribute, int *piValue)
  1.7287 +			{
  1.7288 +				BOOL b = FALSE;
  1.7289 +				if(wglQueryCurrentContextNV_Impl)
  1.7290 +					b = wglQueryCurrentContextNV_Impl(iAttribute, piValue);
  1.7291 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7292 +				return b;
  1.7293 +			}
  1.7294 +
  1.7295 +			// WGL_ARB_create_context
  1.7296 +			HGLRC OVR::GLEContext::wglCreateContextAttribsARB_Hook(HDC hDC, HGLRC hShareContext, const int *attribList)
  1.7297 +			{
  1.7298 +				HGLRC h = NULL;
  1.7299 +				if(wglCreateContextAttribsARB_Impl)
  1.7300 +					h = wglCreateContextAttribsARB_Impl(hDC, hShareContext, attribList);
  1.7301 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7302 +				return h;
  1.7303 +			}
  1.7304 +
  1.7305 +			// WGL_EXT_extensions_string
  1.7306 +			const char * OVR::GLEContext::wglGetExtensionsStringEXT_Hook()
  1.7307 +			{
  1.7308 +				const char * p = NULL;
  1.7309 +				if(wglGetExtensionsStringEXT_Impl)
  1.7310 +					p = wglGetExtensionsStringEXT_Impl();
  1.7311 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7312 +				return p;
  1.7313 +			}
  1.7314 +
  1.7315 +			// WGL_EXT_swap_control
  1.7316 +			BOOL OVR::GLEContext::wglSwapIntervalEXT_Hook(int interval)
  1.7317 +			{
  1.7318 +				BOOL b = FALSE;
  1.7319 +				if(wglSwapIntervalEXT_Impl)
  1.7320 +					b = wglSwapIntervalEXT_Impl(interval);
  1.7321 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7322 +				return b;
  1.7323 +			}
  1.7324 +
  1.7325 +			int OVR::GLEContext::wglGetSwapIntervalEXT_Hook()
  1.7326 +			{
  1.7327 +				int i = 0;
  1.7328 +				if(wglGetSwapIntervalEXT_Impl)
  1.7329 +					i = wglGetSwapIntervalEXT_Impl();
  1.7330 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7331 +				return i;
  1.7332 +			}
  1.7333 +
  1.7334 +			// WGL_OML_sync_control
  1.7335 +			BOOL  OVR::GLEContext::wglGetSyncValuesOML_Hook(HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc)
  1.7336 +			{
  1.7337 +				BOOL b = FALSE;
  1.7338 +				if(wglGetSyncValuesOML_Impl)
  1.7339 +					b = wglGetSyncValuesOML_Impl(hdc, ust, msc, sbc);
  1.7340 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7341 +				return b;
  1.7342 +			}
  1.7343 +
  1.7344 +			BOOL  OVR::GLEContext::wglGetMscRateOML_Hook(HDC hdc, INT32 *numerator, INT32 *denominator)
  1.7345 +			{
  1.7346 +				BOOL b = FALSE;
  1.7347 +				if(wglGetMscRateOML_Impl)
  1.7348 +					b = wglGetMscRateOML_Impl(hdc, numerator, denominator);
  1.7349 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7350 +				return b;
  1.7351 +			}
  1.7352 +
  1.7353 +			INT64 OVR::GLEContext::wglSwapBuffersMscOML_Hook(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder)
  1.7354 +			{
  1.7355 +				INT64 i = 0;
  1.7356 +				if(wglSwapBuffersMscOML_Impl)
  1.7357 +					i = wglSwapBuffersMscOML_Impl(hdc, target_msc, divisor, remainder);
  1.7358 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7359 +				return i;
  1.7360 +			}
  1.7361 +
  1.7362 +			INT64 OVR::GLEContext::wglSwapLayerBuffersMscOML_Hook(HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder)
  1.7363 +			{
  1.7364 +				INT64 i = 0;
  1.7365 +				if(wglSwapLayerBuffersMscOML_Impl)
  1.7366 +					i = wglSwapLayerBuffersMscOML_Impl(hdc, fuPlanes, target_msc, divisor, remainder);
  1.7367 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7368 +				return i;
  1.7369 +			}
  1.7370 +
  1.7371 +			BOOL  OVR::GLEContext::wglWaitForMscOML_Hook(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc)
  1.7372 +			{
  1.7373 +				BOOL b = FALSE;
  1.7374 +				if(wglWaitForMscOML_Impl)
  1.7375 +					b = wglWaitForMscOML_Impl(hdc, target_msc, divisor, remainder, ust, msc, sbc);
  1.7376 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7377 +				return b;
  1.7378 +			}
  1.7379 +
  1.7380 +			BOOL  OVR::GLEContext::wglWaitForSbcOML_Hook(HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc)
  1.7381 +			{
  1.7382 +				BOOL b = FALSE;
  1.7383 +				if(wglWaitForSbcOML_Impl)
  1.7384 +					b = wglWaitForSbcOML_Impl(hdc, target_sbc, ust, msc, sbc);
  1.7385 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7386 +				return b;
  1.7387 +			}
  1.7388 +
  1.7389 +			// WGL_NV_video_output
  1.7390 +			BOOL OVR::GLEContext::wglGetVideoDeviceNV_Hook(HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice)
  1.7391 +			{
  1.7392 +				BOOL b = FALSE;
  1.7393 +				if(wglGetVideoDeviceNV_Impl)
  1.7394 +					b = wglGetVideoDeviceNV_Impl(hDC, numDevices, hVideoDevice);
  1.7395 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7396 +				return b;
  1.7397 +			}
  1.7398 +
  1.7399 +			BOOL OVR::GLEContext::wglReleaseVideoDeviceNV_Hook(HPVIDEODEV hVideoDevice)
  1.7400 +			{
  1.7401 +				BOOL b = FALSE;
  1.7402 +				if(wglReleaseVideoDeviceNV_Impl)
  1.7403 +					b = wglReleaseVideoDeviceNV_Impl(hVideoDevice);
  1.7404 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7405 +				return b;
  1.7406 +			}
  1.7407 +
  1.7408 +			BOOL OVR::GLEContext::wglBindVideoImageNV_Hook(HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer)
  1.7409 +			{
  1.7410 +				BOOL b = FALSE;
  1.7411 +				if(wglBindVideoImageNV_Impl)
  1.7412 +					b = wglBindVideoImageNV_Impl(hVideoDevice, hPbuffer, iVideoBuffer);
  1.7413 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7414 +				return b;
  1.7415 +			}
  1.7416 +
  1.7417 +			BOOL OVR::GLEContext::wglReleaseVideoImageNV_Hook(HPBUFFERARB hPbuffer, int iVideoBuffer)
  1.7418 +			{
  1.7419 +				BOOL b = FALSE;
  1.7420 +				if(wglReleaseVideoImageNV_Impl)
  1.7421 +					b = wglReleaseVideoImageNV_Impl(hPbuffer, iVideoBuffer);
  1.7422 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7423 +				return b;
  1.7424 +			}
  1.7425 +
  1.7426 +			BOOL OVR::GLEContext::wglSendPbufferToVideoNV_Hook(HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock)
  1.7427 +			{
  1.7428 +				BOOL b = FALSE;
  1.7429 +				if(wglSendPbufferToVideoNV_Impl)
  1.7430 +					b = wglSendPbufferToVideoNV_Impl(hPbuffer, iBufferType, pulCounterPbuffer, bBlock);
  1.7431 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7432 +				return b;
  1.7433 +			}
  1.7434 +
  1.7435 +			BOOL OVR::GLEContext::wglGetVideoInfoNV_Hook(HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo)
  1.7436 +			{
  1.7437 +				BOOL b = FALSE;
  1.7438 +				if(wglGetVideoInfoNV_Impl)
  1.7439 +					b = wglGetVideoInfoNV_Impl(hpVideoDevice, pulCounterOutputPbuffer, pulCounterOutputVideo);
  1.7440 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7441 +				return b;
  1.7442 +			}
  1.7443 +
  1.7444 +			// WGL_NV_swap_group
  1.7445 +			BOOL OVR::GLEContext::wglJoinSwapGroupNV_Hook(HDC hDC, GLuint group)
  1.7446 +			{
  1.7447 +				BOOL b = FALSE;
  1.7448 +				if(wglJoinSwapGroupNV_Impl)
  1.7449 +					b = wglJoinSwapGroupNV_Impl(hDC, group);
  1.7450 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7451 +				return b;
  1.7452 +			}
  1.7453 +
  1.7454 +			BOOL OVR::GLEContext::wglBindSwapBarrierNV_Hook(GLuint group, GLuint barrier)
  1.7455 +			{
  1.7456 +				BOOL b = FALSE;
  1.7457 +				if(wglBindSwapBarrierNV_Impl)
  1.7458 +					b = wglBindSwapBarrierNV_Impl(group, barrier);
  1.7459 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7460 +				return b;
  1.7461 +			}
  1.7462 +
  1.7463 +			BOOL OVR::GLEContext::wglQuerySwapGroupNV_Hook(HDC hDC, GLuint *group, GLuint *barrier)
  1.7464 +			{
  1.7465 +				BOOL b = FALSE;
  1.7466 +				if(wglQuerySwapGroupNV_Impl)
  1.7467 +					b = wglQuerySwapGroupNV_Impl(hDC, group, barrier);
  1.7468 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7469 +				return b;
  1.7470 +		   }
  1.7471 +
  1.7472 +			BOOL OVR::GLEContext::wglQueryMaxSwapGroupsNV_Hook(HDC hDC, GLuint *maxGroups, GLuint *maxBarriers)
  1.7473 +			{
  1.7474 +				BOOL b = FALSE;
  1.7475 +				if(wglQueryMaxSwapGroupsNV_Impl)
  1.7476 +					b = wglQueryMaxSwapGroupsNV_Impl(hDC, maxGroups, maxBarriers);
  1.7477 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7478 +				return b;
  1.7479 +			}
  1.7480 +
  1.7481 +			BOOL OVR::GLEContext::wglQueryFrameCountNV_Hook(HDC hDC, GLuint *count)
  1.7482 +			{
  1.7483 +				BOOL b = FALSE;
  1.7484 +				if(wglQueryFrameCountNV_Impl)
  1.7485 +					b = wglQueryFrameCountNV_Impl(hDC, count);
  1.7486 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7487 +				return b;
  1.7488 +			}
  1.7489 +
  1.7490 +			BOOL OVR::GLEContext::wglResetFrameCountNV_Hook(HDC hDC)
  1.7491 +			{
  1.7492 +				BOOL b = FALSE;
  1.7493 +				if(wglResetFrameCountNV_Impl)
  1.7494 +					b = wglResetFrameCountNV_Impl(hDC);
  1.7495 +				PostHook(GLE_CURRENT_FUNCTION);
  1.7496 +				return b;
  1.7497 +		   }
  1.7498 +
  1.7499 +			// WGL_NV_video_capture
  1.7500 +			BOOL OVR::GLEContext::wglBindVideoCaptureDeviceNV_Hook(UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice)
  1.7501 +			{
  1.7502 +				BOOL b = FALSE;
  1.7503 +				if(wglBindVideoCaptureDeviceNV_Impl)
  1.7504 +					b = wglBindVideoCaptureDeviceNV_Impl(uVideoSlot, hDevice);
  1.7505 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7506 +				return b;
  1.7507 +			}
  1.7508 +
  1.7509 +			UINT OVR::GLEContext::wglEnumerateVideoCaptureDevicesNV_Hook(HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList)
  1.7510 +			{
  1.7511 +				UINT u = 0;
  1.7512 +				if(wglEnumerateVideoCaptureDevicesNV_Impl)
  1.7513 +					u = wglEnumerateVideoCaptureDevicesNV_Impl(hDc, phDeviceList);
  1.7514 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7515 +				return u;
  1.7516 +			}
  1.7517 +
  1.7518 +			BOOL OVR::GLEContext::wglLockVideoCaptureDeviceNV_Hook(HDC hDc, HVIDEOINPUTDEVICENV hDevice)
  1.7519 +			{
  1.7520 +				BOOL b = FALSE;
  1.7521 +				if(wglLockVideoCaptureDeviceNV_Impl)
  1.7522 +					b = wglLockVideoCaptureDeviceNV_Impl(hDc, hDevice);
  1.7523 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7524 +				return b;
  1.7525 +			}
  1.7526 +
  1.7527 +			BOOL OVR::GLEContext::wglQueryVideoCaptureDeviceNV_Hook(HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue)
  1.7528 +			{
  1.7529 +				BOOL b = FALSE;
  1.7530 +				if(wglQueryVideoCaptureDeviceNV_Impl)
  1.7531 +					b = wglQueryVideoCaptureDeviceNV_Impl(hDc, hDevice, iAttribute, piValue);
  1.7532 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7533 +				return b;
  1.7534 +			}
  1.7535 +
  1.7536 +			BOOL OVR::GLEContext::wglReleaseVideoCaptureDeviceNV_Hook(HDC hDc, HVIDEOINPUTDEVICENV hDevice)
  1.7537 +			{
  1.7538 +				BOOL b = FALSE;
  1.7539 +				if(wglReleaseVideoCaptureDeviceNV_Impl)
  1.7540 +					b = wglReleaseVideoCaptureDeviceNV_Impl(hDc, hDevice);
  1.7541 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7542 +				return b;
  1.7543 +			}
  1.7544 +
  1.7545 +			// WGL_NV_copy_image
  1.7546 +			BOOL OVR::GLEContext::wglCopyImageSubDataNV_Hook(HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC,
  1.7547 +															 GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth)
  1.7548 +			{
  1.7549 +				BOOL b = FALSE;
  1.7550 +				if(wglCopyImageSubDataNV_Impl)
  1.7551 +					b = wglCopyImageSubDataNV_Impl(hSrcRC, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, hDstRC, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth);
  1.7552 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7553 +				return b;
  1.7554 +			}
  1.7555 +
  1.7556 +			// WGL_NV_DX_interop
  1.7557 +			BOOL OVR::GLEContext::wglDXSetResourceShareHandleNV_Hook(void *dxObject, HANDLE shareHandle)
  1.7558 +			{
  1.7559 +				BOOL b = FALSE;
  1.7560 +				if(wglDXSetResourceShareHandleNV_Impl)
  1.7561 +					b = wglDXSetResourceShareHandleNV_Impl(dxObject, shareHandle);
  1.7562 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7563 +				return b;
  1.7564 +			}
  1.7565 +
  1.7566 +			HANDLE OVR::GLEContext::wglDXOpenDeviceNV_Hook(void *dxDevice)
  1.7567 +			{
  1.7568 +				HANDLE h = NULL;
  1.7569 +				if(wglDXOpenDeviceNV_Impl)
  1.7570 +					h = wglDXOpenDeviceNV_Impl(dxDevice);
  1.7571 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7572 +				return h;
  1.7573 +			}
  1.7574 +
  1.7575 +			BOOL OVR::GLEContext::wglDXCloseDeviceNV_Hook(HANDLE hDevice)
  1.7576 +			{
  1.7577 +				BOOL b = FALSE;
  1.7578 +				if(wglDXCloseDeviceNV_Impl)
  1.7579 +					b = wglDXCloseDeviceNV_Impl(hDevice);
  1.7580 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7581 +				return b;
  1.7582 +			}
  1.7583 +
  1.7584 +			HANDLE OVR::GLEContext::wglDXRegisterObjectNV_Hook(HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access)
  1.7585 +			{
  1.7586 +				HANDLE h = NULL;
  1.7587 +				if(wglDXRegisterObjectNV_Impl)
  1.7588 +					h = wglDXRegisterObjectNV_Impl(hDevice, dxObject, name, type, access);
  1.7589 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7590 +				return h;
  1.7591 +			}
  1.7592 +
  1.7593 +			BOOL OVR::GLEContext::wglDXUnregisterObjectNV_Hook(HANDLE hDevice, HANDLE hObject)
  1.7594 +			{
  1.7595 +				BOOL b = FALSE;
  1.7596 +				if(wglDXUnregisterObjectNV_Impl)
  1.7597 +					b = wglDXUnregisterObjectNV_Impl(hDevice, hObject);
  1.7598 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7599 +				return b;
  1.7600 +			}
  1.7601 +
  1.7602 +			BOOL OVR::GLEContext::wglDXObjectAccessNV_Hook(HANDLE hObject, GLenum access)
  1.7603 +			{
  1.7604 +				BOOL b = FALSE;
  1.7605 +				if(wglDXObjectAccessNV_Impl)
  1.7606 +					b = wglDXObjectAccessNV_Impl(hObject, access);
  1.7607 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7608 +				return b;
  1.7609 +			}
  1.7610 +
  1.7611 +			BOOL OVR::GLEContext::wglDXLockObjectsNV_Hook(HANDLE hDevice, GLint count, HANDLE *hObjects)
  1.7612 +			{
  1.7613 +				BOOL b = FALSE;
  1.7614 +				if(wglDXLockObjectsNV_Impl)
  1.7615 +					b = wglDXLockObjectsNV_Impl(hDevice, count, hObjects);
  1.7616 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7617 +				return b;
  1.7618 +			}
  1.7619 +
  1.7620 +			BOOL OVR::GLEContext::wglDXUnlockObjectsNV_Hook(HANDLE hDevice, GLint count, HANDLE *hObjects)
  1.7621 +			{
  1.7622 +				BOOL b = FALSE;
  1.7623 +				if(wglDXUnlockObjectsNV_Impl)
  1.7624 +					b = wglDXUnlockObjectsNV_Impl(hDevice, count, hObjects);
  1.7625 +				PostWGLHook(GLE_CURRENT_FUNCTION);
  1.7626 +				return b;
  1.7627 +			}
  1.7628 +
  1.7629 +        #endif // defined(GLE_WGL_ENABLED)
  1.7630 +
  1.7631 +        #if defined(GLE_GLX_ENABLED)
  1.7632 +			void OVR::GLEContext::PostGLXHook(const char* /*function*/)
  1.7633 +			{
  1.7634 +				// Empty for now. GLX functions don't have a function like glGetError().
  1.7635 +			}
  1.7636 +
  1.7637 +			// GLX_VERSION_1_0
  1.7638 +			// GLX_VERSION_1_1
  1.7639 +			// We don't currently implement hooking of these.
  1.7640 +
  1.7641 +			// GLX_VERSION_1_2
  1.7642 +			::Display* OVR::GLEContext::glXGetCurrentDisplay_Hook(void)
  1.7643 +			{
  1.7644 +				::Display* p = NULL;
  1.7645 +				if(glXGetCurrentDisplay_Impl)
  1.7646 +	                p = glXGetCurrentDisplay_Impl();
  1.7647 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7648 +	            return p;
  1.7649 +			}
  1.7650 +
  1.7651 +			// GLX_VERSION_1_3
  1.7652 +		    GLXFBConfig* OVR::GLEContext::glXChooseFBConfig_Hook(Display *dpy, int screen, const int *attrib_list, int *nelements)
  1.7653 +			{
  1.7654 +				GLXFBConfig* p = NULL;
  1.7655 +				if(glXChooseFBConfig_Impl)
  1.7656 +	                p = glXChooseFBConfig_Impl(dpy, screen, attrib_list, nelements);
  1.7657 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7658 +	            return p;
  1.7659 +			}
  1.7660 +
  1.7661 +		    GLXContext OVR::GLEContext::glXCreateNewContext_Hook(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct)
  1.7662 +			{
  1.7663 +		    	GLXContext c = 0;
  1.7664 +				if(glXCreateNewContext_Impl)
  1.7665 +	                c = glXCreateNewContext_Impl(dpy, config, render_type, share_list, direct);
  1.7666 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7667 +	            return c;
  1.7668 +			}
  1.7669 +
  1.7670 +		    GLXPbuffer OVR::GLEContext::glXCreatePbuffer_Hook(Display *dpy, GLXFBConfig config, const int *attrib_list)
  1.7671 +			{
  1.7672 +		    	GLXPbuffer b = 0;
  1.7673 +	            if(glXCreatePbuffer_Impl)
  1.7674 +	            	b = glXCreatePbuffer_Impl(dpy, config, attrib_list);
  1.7675 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7676 +	            return b;
  1.7677 +			}
  1.7678 +
  1.7679 +		    GLXPixmap OVR::GLEContext::glXCreatePixmap_Hook(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list)
  1.7680 +			{
  1.7681 +		    	GLXPixmap m = 0;
  1.7682 +	            if(glXCreatePixmap_Impl)
  1.7683 +	            	m = glXCreatePixmap_Impl(dpy, config, pixmap, attrib_list);
  1.7684 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7685 +	            return m;
  1.7686 +			}
  1.7687 +
  1.7688 +		    GLXWindow OVR::GLEContext::glXCreateWindow_Hook(Display *dpy, GLXFBConfig config, Window win, const int *attrib_list)
  1.7689 +			{
  1.7690 +		    	GLXWindow w = 0;
  1.7691 +	            if(glXCreateWindow_Impl)
  1.7692 +	            	w = glXCreateWindow_Impl(dpy, config, win, attrib_list);
  1.7693 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7694 +	            return w;
  1.7695 +			}
  1.7696 +
  1.7697 +		    void OVR::GLEContext::glXDestroyPbuffer_Hook(Display *dpy, GLXPbuffer pbuf)
  1.7698 +		    {
  1.7699 +	            if(glXDestroyPbuffer_Impl)
  1.7700 +	                glXDestroyPbuffer_Impl(dpy, pbuf);
  1.7701 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7702 +		    }
  1.7703 +
  1.7704 +		    void OVR::GLEContext::glXDestroyPixmap_Hook(Display *dpy, GLXPixmap pixmap)
  1.7705 +			{
  1.7706 +	            if(glXDestroyPixmap_Impl)
  1.7707 +	            	glXDestroyPixmap_Impl(dpy, pixmap);
  1.7708 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7709 +			}
  1.7710 +
  1.7711 +		    void OVR::GLEContext::glXDestroyWindow_Hook(Display *dpy, GLXWindow win)
  1.7712 +			{
  1.7713 +	            if(glXDestroyWindow_Impl)
  1.7714 +	            	glXDestroyWindow_Impl(dpy, win);
  1.7715 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7716 +			}
  1.7717 +
  1.7718 +		    GLXDrawable OVR::GLEContext::glXGetCurrentReadDrawable_Hook(void)
  1.7719 +			{
  1.7720 +		    	GLXDrawable d;
  1.7721 +	            if(glXGetCurrentReadDrawable_Impl)
  1.7722 +	            	d = glXGetCurrentReadDrawable_Impl();
  1.7723 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7724 +	            return d;
  1.7725 +			}
  1.7726 +
  1.7727 +		    int OVR::GLEContext::glXGetFBConfigAttrib_Hook(Display *dpy, GLXFBConfig config, int attribute, int *value)
  1.7728 +			{
  1.7729 +	            int i = -1;
  1.7730 +	            if(glXGetFBConfigAttrib_Impl)
  1.7731 +	            	i = glXGetFBConfigAttrib_Impl(dpy, config, attribute, value);
  1.7732 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7733 +	            return i;
  1.7734 +			}
  1.7735 +
  1.7736 +		    GLXFBConfig* OVR::GLEContext::glXGetFBConfigs_Hook(Display *dpy, int screen, int *nelements)
  1.7737 +		    {
  1.7738 +		    	GLXFBConfig* p = NULL;
  1.7739 +	            if(glXGetFBConfigs_Impl)
  1.7740 +	            	p = glXGetFBConfigs_Impl(dpy, screen, nelements);
  1.7741 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7742 +	            return p;
  1.7743 +		    }
  1.7744 +
  1.7745 +		    void OVR::GLEContext::glXGetSelectedEvent_Hook(Display *dpy, GLXDrawable draw, unsigned long *event_mask)
  1.7746 +			{
  1.7747 +	            if(glXGetSelectedEvent_Impl)
  1.7748 +	            	glXGetSelectedEvent_Impl(dpy, draw, event_mask);
  1.7749 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7750 +			}
  1.7751 +
  1.7752 +		    XVisualInfo* OVR::GLEContext::glXGetVisualFromFBConfig_Hook(Display *dpy, GLXFBConfig config)
  1.7753 +			{
  1.7754 +		    	XVisualInfo* p = NULL;
  1.7755 +	            if(glXGetVisualFromFBConfig_Impl)
  1.7756 +	            	p = glXGetVisualFromFBConfig_Impl(dpy, config);
  1.7757 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7758 +	            return p;
  1.7759 +			}
  1.7760 +
  1.7761 +		    Bool OVR::GLEContext::glXMakeContextCurrent_Hook(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
  1.7762 +			{
  1.7763 +	            Bool b = False;
  1.7764 +	            if(glXMakeContextCurrent_Impl)
  1.7765 +	            	b = glXMakeContextCurrent_Impl(dpy, draw, read, ctx);
  1.7766 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7767 +	            return b;
  1.7768 +			}
  1.7769 +
  1.7770 +		    int OVR::GLEContext::glXQueryContext_Hook(Display *dpy, GLXContext ctx, int attribute, int *value)
  1.7771 +		    {
  1.7772 +	            int i = GLX_BAD_ATTRIBUTE;
  1.7773 +	            if(glXQueryContext_Impl)
  1.7774 +	            	i = glXQueryContext_Impl(dpy, ctx, attribute, value);
  1.7775 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7776 +	            return i;
  1.7777 +		    }
  1.7778 +
  1.7779 +		    void OVR::GLEContext::glXQueryDrawable_Hook(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value)
  1.7780 +			{
  1.7781 +	            if(glXQueryDrawable_Impl)
  1.7782 +	            	glXQueryDrawable_Impl(dpy, draw, attribute, value);
  1.7783 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7784 +			}
  1.7785 +
  1.7786 +		    void OVR::GLEContext::glXSelectEvent_Hook(Display *dpy, GLXDrawable draw, unsigned long event_mask)
  1.7787 +			{
  1.7788 +	            if(glXSelectEvent_Impl)
  1.7789 +	            	glXSelectEvent_Impl(dpy, draw, event_mask);
  1.7790 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7791 +			}
  1.7792 +
  1.7793 +		    // GLX_VERSION_1_4
  1.7794 +		    // We don't do hooking of this.
  1.7795 +
  1.7796 +		    // GLX_ARB_create_context
  1.7797 +	        GLXContext OVR::GLEContext::glXCreateContextAttribsARB_Hook(Display* dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list)
  1.7798 +			{
  1.7799 +	        	GLXContext c = 0;
  1.7800 +	            if(glXCreateContextAttribsARB_Impl)
  1.7801 +	            	c = glXCreateContextAttribsARB_Impl(dpy,  config, share_context, direct, attrib_list);
  1.7802 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7803 +	            return c;
  1.7804 +			}
  1.7805 +
  1.7806 +		    // GLX_EXT_swap_control
  1.7807 +		    void OVR::GLEContext::glXSwapIntervalEXT_Hook(Display* dpy, GLXDrawable drawable, int interval)
  1.7808 +		    {
  1.7809 +	            if(glXSwapIntervalEXT_Impl)
  1.7810 +	            	glXSwapIntervalEXT_Impl(dpy, drawable, interval);
  1.7811 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7812 +		    }
  1.7813 +
  1.7814 +            // GLX_OML_sync_control
  1.7815 +   			Bool OVR::GLEContext::glXGetMscRateOML_Hook(Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator)
  1.7816 +			{
  1.7817 +	            Bool b = False;
  1.7818 +	            if(glXGetMscRateOML_Impl)
  1.7819 +	            	b = glXGetMscRateOML_Impl(dpy, drawable, numerator, denominator);
  1.7820 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7821 +	            return b;
  1.7822 +			}
  1.7823 +
  1.7824 +   			Bool OVR::GLEContext::glXGetSyncValuesOML_Hook(Display* dpy, GLXDrawable drawable, int64_t* ust, int64_t* msc, int64_t* sbc)
  1.7825 +			{
  1.7826 +	            Bool b = False;
  1.7827 +	            if(glXGetSyncValuesOML_Impl)
  1.7828 +	            	b = glXGetSyncValuesOML_Impl(dpy, drawable, ust, msc, sbc);
  1.7829 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7830 +	            return b;
  1.7831 +			}
  1.7832 +
  1.7833 +   			int64_t OVR::GLEContext::glXSwapBuffersMscOML_Hook(Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder)
  1.7834 +			{
  1.7835 +   				int64_t i = 0;
  1.7836 +	            if(glXSwapBuffersMscOML_Impl)
  1.7837 +	            	i = glXSwapBuffersMscOML_Impl(dpy, drawable, target_msc, divisor, remainder);
  1.7838 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7839 +	            return i;
  1.7840 +			}
  1.7841 +
  1.7842 +   			Bool OVR::GLEContext::glXWaitForMscOML_Hook(Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t* ust, int64_t* msc, int64_t* sbc)
  1.7843 +			{
  1.7844 +	            Bool b = False;
  1.7845 +	            if(glXWaitForMscOML_Impl)
  1.7846 +	            	b = glXWaitForMscOML_Impl(dpy, drawable, target_msc, divisor, remainder, ust, msc, sbc);
  1.7847 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7848 +	            return b;
  1.7849 +			}
  1.7850 +
  1.7851 +   			Bool OVR::GLEContext::glXWaitForSbcOML_Hook(Display* dpy, GLXDrawable drawable, int64_t target_sbc, int64_t* ust, int64_t* msc, int64_t* sbc)
  1.7852 +			{
  1.7853 +	            Bool b = False;
  1.7854 +	            if(glXWaitForSbcOML_Impl)
  1.7855 +	            	b = glXWaitForSbcOML_Impl(dpy, drawable, target_sbc, ust, msc, sbc);
  1.7856 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7857 +	            return b;
  1.7858 +			}
  1.7859 +
  1.7860 +            // GLX_MESA_swap_control
  1.7861 +            int OVR::GLEContext::glXGetSwapIntervalMESA_Hook()
  1.7862 +		    {
  1.7863 +	            int i = 0;
  1.7864 +                if(glXGetSwapIntervalMESA_Impl)
  1.7865 +	            	i = glXGetSwapIntervalMESA_Impl();
  1.7866 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7867 +                return i;
  1.7868 +		    }
  1.7869 +
  1.7870 +
  1.7871 +            int OVR::GLEContext::glXSwapIntervalMESA_Hook(unsigned int interval)
  1.7872 +		    {
  1.7873 +	            int i = 0;
  1.7874 +                if(glXSwapIntervalMESA_Impl)
  1.7875 +	            	i = glXSwapIntervalMESA_Impl(interval);
  1.7876 +	            PostGLXHook(GLE_CURRENT_FUNCTION);
  1.7877 +                return i;
  1.7878 +		    }
  1.7879 +
  1.7880 +        #endif // defined(GLE_GLX_ENABLED)
  1.7881 +
  1.7882 +    #endif // GLE_HOOKING_ENABLED
  1.7883 +
  1.7884 +//} // namespace OVR
  1.7885 +
  1.7886 +
  1.7887 +