ovr_sdk
view LibOVR/Src/CAPI/GL/CAPI_GLE.cpp @ 3:f12a8f74fe1f
added the Xcode project
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 21 Jan 2015 11:37:50 +0200 |
parents | |
children |
line source
1 /************************************************************************************
3 Filename : Render_GLE.cpp
4 Content : OpenGL Extensions support. Implements a stripped down glew-like
5 interface with some additional functionality.
6 Copyright : Copyright 2014 Oculus VR, LLC All Rights reserved.
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
12 http://www.apache.org/licenses/LICENSE-2.0
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
20 ************************************************************************************/
22 #include "CAPI_GLE.h"
23 #include "../../Kernel/OVR_Log.h"
24 #include <string.h>
27 #if defined(_WIN32)
28 #if !defined(WINAPI)
29 #ifndef WIN32_LEAN_AND_MEAN
30 #define WIN32_LEAN_AND_MEAN 1
31 #endif
32 #include <windows.h>
33 #endif
35 #pragma comment(lib, "opengl32.lib")
36 #elif defined(__APPLE__)
37 #include <stdlib.h>
38 #include <string.h>
39 #include <AvailabilityMacros.h>
40 #include <dlfcn.h>
41 #endif
45 //namespace OVR
46 //{
47 // OVRTypeof
48 // Acts the same as the C++11 decltype expression, though with reduced requirements.
49 #if !defined(OVRTypeof)
50 #if defined(_MSC_VER)
51 #define OVRTypeof(x) decltype(x) // VS2010+ unilaterally supports decltype
52 #else
53 #define OVRTypeof(x) __typeof__(x) // Other compilers support decltype, but usually not unless C++11 support is present and explicitly enabled.
54 #endif
55 #endif
58 // GLELoadProc
59 // Macro which implements dynamically looking up and assigning an OpenGL function.
60 //
61 // Example usage:
62 // GLELoadProc(glCopyTexSubImage3D, glCopyTexSubImage3D);
63 // Expands to:
64 // gleCopyTexSubImage3D = (OVRTypeof(gleCopyTexSubImage3D)) GLEGetProcAddress("glCopyTexSubImage3D");
66 #define GLELoadProc(var, name) var = (OVRTypeof(var))GLEGetProcAddress(#name)
69 // Disable some #defines, as we need to call these functions directly.
70 #if defined(GLE_HOOKING_ENABLED)
71 #if defined(_WIN32)
72 #undef wglGetProcAddress
73 extern "C" { GLAPI PROC GLAPIENTRY wglGetProcAddress(LPCSTR lpszProc); }
74 #endif
76 #undef glGetString
77 extern "C" { GLAPI const GLubyte * GLAPIENTRY glGetString(GLenum name); }
78 #endif
81 // Generic OpenGL GetProcAddress function interface. Maps to platform-specific functionality
82 // internally. On Windows this is equivalent to wglGetProcAddress as opposed to global GetProcAddress.
83 void* OVR::GLEGetProcAddress(const char* name)
84 {
85 #if defined(_WIN32)
86 return wglGetProcAddress(name);
88 #elif defined(__APPLE__)
89 // Requires the OS 10.3 SDK or later.
90 static void* dlImage = NULL;
91 void* addr = nullptr;
93 if(!dlImage)
94 dlImage = dlopen("/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", RTLD_LAZY);
96 if(dlImage)
97 addr = dlsym(dlImage, name);
99 return addr;
101 #elif defined(__ANDROID__)
102 return eglGetProcAddress(name);
104 #else
105 // This was glXGetProcAddressARB in GLX versions prior to v1.4, but that was ten years ago.
106 return (void*)glXGetProcAddress((const GLubyte*)name);
107 #endif
108 }
112 // Current context functionality
113 static OVR::GLEContext* GLECurrentContext = NULL;
115 OVR::GLEContext* OVR::GLEContext::GetCurrentContext()
116 {
117 return GLECurrentContext;
118 }
120 void OVR::GLEContext::SetCurrentContext(OVR::GLEContext* p)
121 {
122 GLECurrentContext = p;
123 }
127 OVR::GLEContext::GLEContext()
128 : MajorVersion(0)
129 , MinorVersion(0)
130 , WholeVersion(0)
131 , IsGLES(false)
132 , IsCoreProfile(false)
133 , EnableHookGetError(true)
134 , PlatformMajorVersion(0)
135 , PlatformMinorVersion(0)
136 , PlatformWholeVersion(0)
137 {
138 // The following sequence is not thread-safe. Two threads could set the context to this at the same time.
139 if(GetCurrentContext() == NULL)
140 SetCurrentContext(this);
141 }
144 OVR::GLEContext::~GLEContext()
145 {
146 // Currently empty
147 }
150 void OVR::GLEContext::Init()
151 {
152 PlatformInit();
154 if(!IsInitialized())
155 {
156 InitVersion();
157 InitExtensionLoad();
158 InitExtensionSupport();
159 }
160 }
163 bool OVR::GLEContext::IsInitialized() const
164 {
165 return (MajorVersion != 0);
166 }
169 void OVR::GLEContext::Shutdown()
170 {
171 // This memset is valid only if this class has no virtual functions (similar to concept of POD).
172 // We cannot assert this because restrictions prevent us from using C++11 type traits here.
173 memset(this, 0, sizeof(GLEContext));
174 }
177 void OVR::GLEContext::PlatformInit()
178 {
179 if(!IsPlatformInitialized())
180 {
181 InitPlatformExtensionLoad();
182 InitPlatformExtensionSupport();
183 InitPlatformVersion();
184 }
185 }
188 bool OVR::GLEContext::IsPlatformInitialized() const
189 {
190 return (PlatformMajorVersion != 0);
191 }
194 void OVR::GLEContext::InitVersion()
195 {
196 const char* version = (const char*)glGetString(GL_VERSION);
197 int fields = 0, major = 0, minor = 0;
198 bool isGLES = false;
200 OVR_ASSERT(version);
201 if (version)
202 {
203 OVR_DEBUG_LOG(("GL_VERSION: %s", (const char*)version));
205 // Skip all leading non-digits before reading %d.
206 // Example GL_VERSION strings:
207 // "1.5 ATI-1.4.18"
208 // "OpenGL ES-CM 3.2"
209 OVR_DISABLE_MSVC_WARNING(4996) // "scanf may be unsafe"
210 fields = sscanf(version, isdigit(*version) ? "%d.%d" : "%*[^0-9]%d.%d", &major, &minor);
211 isGLES = (strstr(version, "OpenGL ES") != NULL);
212 OVR_RESTORE_MSVC_WARNING()
213 }
214 else
215 {
216 LogText("Warning: GL_VERSION was NULL\n");
217 }
219 // If two fields were not found,
220 if (fields != 2)
221 {
222 static_assert(sizeof(major) == sizeof(GLint), "type mis-match");
224 glGetIntegerv(GL_MAJOR_VERSION, &major);
225 glGetIntegerv(GL_MINOR_VERSION, &minor);
226 }
228 // Write version data
229 MajorVersion = major;
230 MinorVersion = minor;
231 WholeVersion = (major * 100) + minor;
233 GLint profileMask = 0;
234 if(WholeVersion >= 302)
235 {
236 // Older NVidia drivers have a bug with this on at least Windows.
237 // https://www.opengl.org/discussion_boards/showthread.php/171380-NVIDIA-drivers-not-returning-the-right-profile-mas
238 // A workaround could be to check for the GL_ARB_compatibility extension, which indicates if OpenGL is in compatibility mode,
239 // and if not then we are in core profile mode. On Apple another solution would be to use NSOpeNGLPixelFormat
240 // NSOpenGLView::pixelFormat to get the core profile attribute.
241 glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &profileMask);
242 }
243 IsCoreProfile = (profileMask == GL_CONTEXT_CORE_PROFILE_BIT); // There's also GL_CONTEXT_COMPATIBILITY_PROFILE_BIT
244 IsGLES = isGLES;
245 }
248 void OVR::GLEContext::InitExtensionLoad()
249 {
250 // GL_VERSION_1_1
251 // We don't load these but rather link to them directly.
253 // GL_VERSION_1_2
254 GLELoadProc(glCopyTexSubImage3D_Impl, glCopyTexSubImage3D); // This expands to a get proc address call (e.g. wglGetProcAddress on Windows).
255 GLELoadProc(glDrawRangeElements_Impl, glDrawRangeElements);
256 GLELoadProc(glTexImage3D_Impl, glTexImage3D);
257 GLELoadProc(glTexSubImage3D_Impl, glTexSubImage3D);
259 // GL_VERSION_1_3
260 GLELoadProc(glActiveTexture_Impl, glActiveTexture);
261 GLELoadProc(glClientActiveTexture_Impl, glClientActiveTexture);
262 GLELoadProc(glCompressedTexImage1D_Impl, glCompressedTexImage1D);
263 GLELoadProc(glCompressedTexImage2D_Impl, glCompressedTexImage2D);
264 GLELoadProc(glCompressedTexImage3D_Impl, glCompressedTexImage3D);
265 GLELoadProc(glCompressedTexSubImage1D_Impl, glCompressedTexSubImage1D);
266 GLELoadProc(glCompressedTexSubImage2D_Impl, glCompressedTexSubImage2D);
267 GLELoadProc(glCompressedTexSubImage3D_Impl, glCompressedTexSubImage3D);
268 GLELoadProc(glGetCompressedTexImage_Impl, glGetCompressedTexImage);
269 GLELoadProc(glLoadTransposeMatrixd_Impl, glLoadTransposeMatrixd);
270 GLELoadProc(glLoadTransposeMatrixf_Impl, glLoadTransposeMatrixf);
271 GLELoadProc(glMultTransposeMatrixd_Impl, glMultTransposeMatrixd);
272 GLELoadProc(glMultTransposeMatrixf_Impl, glMultTransposeMatrixf);
273 GLELoadProc(glMultiTexCoord1d_Impl, glMultiTexCoord1d);
274 GLELoadProc(glMultiTexCoord1dv_Impl, glMultiTexCoord1dv);
275 GLELoadProc(glMultiTexCoord1f_Impl, glMultiTexCoord1f);
276 GLELoadProc(glMultiTexCoord1fv_Impl, glMultiTexCoord1fv);
277 GLELoadProc(glMultiTexCoord1i_Impl, glMultiTexCoord1i);
278 GLELoadProc(glMultiTexCoord1iv_Impl, glMultiTexCoord1iv);
279 GLELoadProc(glMultiTexCoord1s_Impl, glMultiTexCoord1s);
280 GLELoadProc(glMultiTexCoord1sv_Impl, glMultiTexCoord1sv);
281 GLELoadProc(glMultiTexCoord2d_Impl, glMultiTexCoord2d);
282 GLELoadProc(glMultiTexCoord2dv_Impl, glMultiTexCoord2dv);
283 GLELoadProc(glMultiTexCoord2f_Impl, glMultiTexCoord2f);
284 GLELoadProc(glMultiTexCoord2fv_Impl, glMultiTexCoord2fv);
285 GLELoadProc(glMultiTexCoord2i_Impl, glMultiTexCoord2i);
286 GLELoadProc(glMultiTexCoord2iv_Impl, glMultiTexCoord2iv);
287 GLELoadProc(glMultiTexCoord2s_Impl, glMultiTexCoord2s);
288 GLELoadProc(glMultiTexCoord2sv_Impl, glMultiTexCoord2sv);
289 GLELoadProc(glMultiTexCoord3d_Impl, glMultiTexCoord3d);
290 GLELoadProc(glMultiTexCoord3dv_Impl, glMultiTexCoord3dv);
291 GLELoadProc(glMultiTexCoord3f_Impl, glMultiTexCoord3f);
292 GLELoadProc(glMultiTexCoord3fv_Impl, glMultiTexCoord3fv);
293 GLELoadProc(glMultiTexCoord3i_Impl, glMultiTexCoord3i);
294 GLELoadProc(glMultiTexCoord3iv_Impl, glMultiTexCoord3iv);
295 GLELoadProc(glMultiTexCoord3s_Impl, glMultiTexCoord3s);
296 GLELoadProc(glMultiTexCoord3sv_Impl, glMultiTexCoord3sv);
297 GLELoadProc(glMultiTexCoord4d_Impl, glMultiTexCoord4d);
298 GLELoadProc(glMultiTexCoord4dv_Impl, glMultiTexCoord4dv);
299 GLELoadProc(glMultiTexCoord4f_Impl, glMultiTexCoord4f);
300 GLELoadProc(glMultiTexCoord4fv_Impl, glMultiTexCoord4fv);
301 GLELoadProc(glMultiTexCoord4i_Impl, glMultiTexCoord4i);
302 GLELoadProc(glMultiTexCoord4iv_Impl, glMultiTexCoord4iv);
303 GLELoadProc(glMultiTexCoord4s_Impl, glMultiTexCoord4s);
304 GLELoadProc(glMultiTexCoord4sv_Impl, glMultiTexCoord4sv);
305 GLELoadProc(glSampleCoverage_Impl, glSampleCoverage);
307 // GL_VERSION_1_4
308 GLELoadProc(glBlendColor_Impl, glBlendColor);
309 GLELoadProc(glBlendEquation_Impl, glBlendEquation);
310 GLELoadProc(glBlendFuncSeparate_Impl, glBlendFuncSeparate);
311 GLELoadProc(glFogCoordPointer_Impl, glFogCoordPointer);
312 GLELoadProc(glFogCoordd_Impl, glFogCoordd);
313 GLELoadProc(glFogCoorddv_Impl, glFogCoorddv);
314 GLELoadProc(glFogCoordf_Impl, glFogCoordf);
315 GLELoadProc(glFogCoordfv_Impl, glFogCoordfv);
316 GLELoadProc(glMultiDrawArrays_Impl, glMultiDrawArrays);
317 GLELoadProc(glMultiDrawElements_Impl, glMultiDrawElements);
318 GLELoadProc(glPointParameterf_Impl, glPointParameterf);
319 GLELoadProc(glPointParameterfv_Impl, glPointParameterfv);
320 GLELoadProc(glPointParameteri_Impl, glPointParameteri);
321 GLELoadProc(glPointParameteriv_Impl, glPointParameteriv);
322 GLELoadProc(glSecondaryColor3b_Impl, glSecondaryColor3b);
323 GLELoadProc(glSecondaryColor3bv_Impl, glSecondaryColor3bv);
324 GLELoadProc(glSecondaryColor3d_Impl, glSecondaryColor3d);
325 GLELoadProc(glSecondaryColor3dv_Impl, glSecondaryColor3dv);
326 GLELoadProc(glSecondaryColor3f_Impl, glSecondaryColor3f);
327 GLELoadProc(glSecondaryColor3fv_Impl, glSecondaryColor3fv);
328 GLELoadProc(glSecondaryColor3i_Impl, glSecondaryColor3i);
329 GLELoadProc(glSecondaryColor3iv_Impl, glSecondaryColor3iv);
330 GLELoadProc(glSecondaryColor3s_Impl, glSecondaryColor3s);
331 GLELoadProc(glSecondaryColor3sv_Impl, glSecondaryColor3sv);
332 GLELoadProc(glSecondaryColor3ub_Impl, glSecondaryColor3ub);
333 GLELoadProc(glSecondaryColor3ubv_Impl, glSecondaryColor3ubv);
334 GLELoadProc(glSecondaryColor3ui_Impl, glSecondaryColor3ui);
335 GLELoadProc(glSecondaryColor3uiv_Impl, glSecondaryColor3uiv);
336 GLELoadProc(glSecondaryColor3us_Impl, glSecondaryColor3us);
337 GLELoadProc(glSecondaryColor3usv_Impl, glSecondaryColor3usv);
338 GLELoadProc(glSecondaryColorPointer_Impl, glSecondaryColorPointer);
339 GLELoadProc(glWindowPos2d_Impl, glWindowPos2d);
340 GLELoadProc(glWindowPos2dv_Impl, glWindowPos2dv);
341 GLELoadProc(glWindowPos2f_Impl, glWindowPos2f);
342 GLELoadProc(glWindowPos2fv_Impl, glWindowPos2fv);
343 GLELoadProc(glWindowPos2i_Impl, glWindowPos2i);
344 GLELoadProc(glWindowPos2iv_Impl, glWindowPos2iv);
345 GLELoadProc(glWindowPos2s_Impl, glWindowPos2s);
346 GLELoadProc(glWindowPos2sv_Impl, glWindowPos2sv);
347 GLELoadProc(glWindowPos3d_Impl, glWindowPos3d);
348 GLELoadProc(glWindowPos3dv_Impl, glWindowPos3dv);
349 GLELoadProc(glWindowPos3f_Impl, glWindowPos3f);
350 GLELoadProc(glWindowPos3fv_Impl, glWindowPos3fv);
351 GLELoadProc(glWindowPos3i_Impl, glWindowPos3i);
352 GLELoadProc(glWindowPos3iv_Impl, glWindowPos3iv);
353 GLELoadProc(glWindowPos3s_Impl, glWindowPos3s);
354 GLELoadProc(glWindowPos3sv_Impl, glWindowPos3sv);
356 // GL_VERSION_1_5
357 GLELoadProc(glBeginQuery_Impl, glBeginQuery);
358 GLELoadProc(glBindBuffer_Impl, glBindBuffer);
359 GLELoadProc(glBufferData_Impl, glBufferData);
360 GLELoadProc(glBufferSubData_Impl, glBufferSubData);
361 GLELoadProc(glDeleteBuffers_Impl, glDeleteBuffers);
362 GLELoadProc(glDeleteQueries_Impl, glDeleteQueries);
363 GLELoadProc(glEndQuery_Impl, glEndQuery);
364 GLELoadProc(glGenBuffers_Impl, glGenBuffers);
365 GLELoadProc(glGenQueries_Impl, glGenQueries);
366 GLELoadProc(glGetBufferParameteriv_Impl, glGetBufferParameteriv);
367 GLELoadProc(glGetBufferPointerv_Impl, glGetBufferPointerv);
368 GLELoadProc(glGetBufferSubData_Impl, glGetBufferSubData);
369 GLELoadProc(glGetQueryObjectiv_Impl, glGetQueryObjectiv);
370 GLELoadProc(glGetQueryObjectuiv_Impl, glGetQueryObjectuiv);
371 GLELoadProc(glGetQueryiv_Impl, glGetQueryiv);
372 GLELoadProc(glIsBuffer_Impl, glIsBuffer);
373 GLELoadProc(glIsQuery_Impl, glIsQuery);
374 GLELoadProc(glMapBuffer_Impl, glMapBuffer);
375 GLELoadProc(glUnmapBuffer_Impl, glUnmapBuffer);
377 // GL_VERSION_2_0
378 GLELoadProc(glAttachShader_Impl, glAttachShader);
379 GLELoadProc(glBindAttribLocation_Impl, glBindAttribLocation);
380 GLELoadProc(glBlendEquationSeparate_Impl, glBlendEquationSeparate);
381 GLELoadProc(glCompileShader_Impl, glCompileShader);
382 GLELoadProc(glCreateProgram_Impl, glCreateProgram);
383 GLELoadProc(glCreateShader_Impl, glCreateShader);
384 GLELoadProc(glDeleteProgram_Impl, glDeleteProgram);
385 GLELoadProc(glDeleteShader_Impl, glDeleteShader);
386 GLELoadProc(glDetachShader_Impl, glDetachShader);
387 GLELoadProc(glDisableVertexAttribArray_Impl, glDisableVertexAttribArray);
388 GLELoadProc(glDrawBuffers_Impl, glDrawBuffers);
389 GLELoadProc(glEnableVertexAttribArray_Impl, glEnableVertexAttribArray);
390 GLELoadProc(glGetActiveAttrib_Impl, glGetActiveAttrib);
391 GLELoadProc(glGetActiveUniform_Impl, glGetActiveUniform);
392 GLELoadProc(glGetAttachedShaders_Impl, glGetAttachedShaders);
393 GLELoadProc(glGetAttribLocation_Impl, glGetAttribLocation);
394 GLELoadProc(glGetProgramInfoLog_Impl, glGetProgramInfoLog);
395 GLELoadProc(glGetProgramiv_Impl, glGetProgramiv);
396 GLELoadProc(glGetShaderInfoLog_Impl, glGetShaderInfoLog);
397 GLELoadProc(glGetShaderSource_Impl, glGetShaderSource);
398 GLELoadProc(glGetShaderiv_Impl, glGetShaderiv);
399 GLELoadProc(glGetUniformLocation_Impl, glGetUniformLocation);
400 GLELoadProc(glGetUniformfv_Impl, glGetUniformfv);
401 GLELoadProc(glGetUniformiv_Impl, glGetUniformiv);
402 GLELoadProc(glGetVertexAttribPointerv_Impl, glGetVertexAttribPointerv);
403 GLELoadProc(glGetVertexAttribdv_Impl, glGetVertexAttribdv);
404 GLELoadProc(glGetVertexAttribfv_Impl, glGetVertexAttribfv);
405 GLELoadProc(glGetVertexAttribiv_Impl, glGetVertexAttribiv);
406 GLELoadProc(glIsProgram_Impl, glIsProgram);
407 GLELoadProc(glIsShader_Impl, glIsShader);
408 GLELoadProc(glLinkProgram_Impl, glLinkProgram);
409 GLELoadProc(glShaderSource_Impl, glShaderSource);
410 GLELoadProc(glStencilFuncSeparate_Impl, glStencilFuncSeparate);
411 GLELoadProc(glStencilMaskSeparate_Impl, glStencilMaskSeparate);
412 GLELoadProc(glStencilOpSeparate_Impl, glStencilOpSeparate);
413 GLELoadProc(glUniform1f_Impl, glUniform1f);
414 GLELoadProc(glUniform1fv_Impl, glUniform1fv);
415 GLELoadProc(glUniform1i_Impl, glUniform1i);
416 GLELoadProc(glUniform1iv_Impl, glUniform1iv);
417 GLELoadProc(glUniform2f_Impl, glUniform2f);
418 GLELoadProc(glUniform2fv_Impl, glUniform2fv);
419 GLELoadProc(glUniform2i_Impl, glUniform2i);
420 GLELoadProc(glUniform2iv_Impl, glUniform2iv);
421 GLELoadProc(glUniform3f_Impl, glUniform3f);
422 GLELoadProc(glUniform3fv_Impl, glUniform3fv);
423 GLELoadProc(glUniform3i_Impl, glUniform3i);
424 GLELoadProc(glUniform3iv_Impl, glUniform3iv);
425 GLELoadProc(glUniform4f_Impl, glUniform4f);
426 GLELoadProc(glUniform4fv_Impl, glUniform4fv);
427 GLELoadProc(glUniform4i_Impl, glUniform4i);
428 GLELoadProc(glUniform4iv_Impl, glUniform4iv);
429 GLELoadProc(glUniformMatrix2fv_Impl, glUniformMatrix2fv);
430 GLELoadProc(glUniformMatrix3fv_Impl, glUniformMatrix3fv);
431 GLELoadProc(glUniformMatrix4fv_Impl, glUniformMatrix4fv);
432 GLELoadProc(glUseProgram_Impl, glUseProgram);
433 GLELoadProc(glValidateProgram_Impl, glValidateProgram);
434 GLELoadProc(glVertexAttrib1d_Impl, glVertexAttrib1d);
435 GLELoadProc(glVertexAttrib1dv_Impl, glVertexAttrib1dv);
436 GLELoadProc(glVertexAttrib1f_Impl, glVertexAttrib1f);
437 GLELoadProc(glVertexAttrib1fv_Impl, glVertexAttrib1fv);
438 GLELoadProc(glVertexAttrib1s_Impl, glVertexAttrib1s);
439 GLELoadProc(glVertexAttrib1sv_Impl, glVertexAttrib1sv);
440 GLELoadProc(glVertexAttrib2d_Impl, glVertexAttrib2d);
441 GLELoadProc(glVertexAttrib2dv_Impl, glVertexAttrib2dv);
442 GLELoadProc(glVertexAttrib2f_Impl, glVertexAttrib2f);
443 GLELoadProc(glVertexAttrib2fv_Impl, glVertexAttrib2fv);
444 GLELoadProc(glVertexAttrib2s_Impl, glVertexAttrib2s);
445 GLELoadProc(glVertexAttrib2sv_Impl, glVertexAttrib2sv);
446 GLELoadProc(glVertexAttrib3d_Impl, glVertexAttrib3d);
447 GLELoadProc(glVertexAttrib3dv_Impl, glVertexAttrib3dv);
448 GLELoadProc(glVertexAttrib3f_Impl, glVertexAttrib3f);
449 GLELoadProc(glVertexAttrib3fv_Impl, glVertexAttrib3fv);
450 GLELoadProc(glVertexAttrib3s_Impl, glVertexAttrib3s);
451 GLELoadProc(glVertexAttrib3sv_Impl, glVertexAttrib3sv);
452 GLELoadProc(glVertexAttrib4Nbv_Impl, glVertexAttrib4Nbv);
453 GLELoadProc(glVertexAttrib4Niv_Impl, glVertexAttrib4Niv);
454 GLELoadProc(glVertexAttrib4Nsv_Impl, glVertexAttrib4Nsv);
455 GLELoadProc(glVertexAttrib4Nub_Impl, glVertexAttrib4Nub);
456 GLELoadProc(glVertexAttrib4Nubv_Impl, glVertexAttrib4Nubv);
457 GLELoadProc(glVertexAttrib4Nuiv_Impl, glVertexAttrib4Nuiv);
458 GLELoadProc(glVertexAttrib4Nusv_Impl, glVertexAttrib4Nusv);
459 GLELoadProc(glVertexAttrib4bv_Impl, glVertexAttrib4bv);
460 GLELoadProc(glVertexAttrib4d_Impl, glVertexAttrib4d);
461 GLELoadProc(glVertexAttrib4dv_Impl, glVertexAttrib4dv);
462 GLELoadProc(glVertexAttrib4f_Impl, glVertexAttrib4f);
463 GLELoadProc(glVertexAttrib4fv_Impl, glVertexAttrib4fv);
464 GLELoadProc(glVertexAttrib4iv_Impl, glVertexAttrib4iv);
465 GLELoadProc(glVertexAttrib4s_Impl, glVertexAttrib4s);
466 GLELoadProc(glVertexAttrib4sv_Impl, glVertexAttrib4sv);
467 GLELoadProc(glVertexAttrib4ubv_Impl, glVertexAttrib4ubv);
468 GLELoadProc(glVertexAttrib4uiv_Impl, glVertexAttrib4uiv);
469 GLELoadProc(glVertexAttrib4usv_Impl, glVertexAttrib4usv);
470 GLELoadProc(glVertexAttribPointer_Impl, glVertexAttribPointer);
472 // GL_VERSION_2_1
473 GLELoadProc(glUniformMatrix2x3fv_Impl, glUniformMatrix2x3fv);
474 GLELoadProc(glUniformMatrix2x4fv_Impl, glUniformMatrix2x4fv);
475 GLELoadProc(glUniformMatrix3x2fv_Impl, glUniformMatrix3x2fv);
476 GLELoadProc(glUniformMatrix3x4fv_Impl, glUniformMatrix3x4fv);
477 GLELoadProc(glUniformMatrix4x2fv_Impl, glUniformMatrix4x2fv);
478 GLELoadProc(glUniformMatrix4x3fv_Impl, glUniformMatrix4x3fv);
480 // GL_VERSION_3_0
481 GLELoadProc(glBeginConditionalRender_Impl, glBeginConditionalRender);
482 GLELoadProc(glBeginTransformFeedback_Impl, glBeginTransformFeedback);
483 GLELoadProc(glBindFragDataLocation_Impl, glBindFragDataLocation);
484 GLELoadProc(glClampColor_Impl, glClampColor);
485 GLELoadProc(glClearBufferfi_Impl, glClearBufferfi);
486 GLELoadProc(glClearBufferfv_Impl, glClearBufferfv);
487 GLELoadProc(glClearBufferiv_Impl, glClearBufferiv);
488 GLELoadProc(glClearBufferuiv_Impl, glClearBufferuiv);
489 GLELoadProc(glColorMaski_Impl, glColorMaski);
490 GLELoadProc(glDisablei_Impl, glDisablei);
491 GLELoadProc(glEnablei_Impl, glEnablei);
492 GLELoadProc(glEndConditionalRender_Impl, glEndConditionalRender);
493 GLELoadProc(glEndTransformFeedback_Impl, glEndTransformFeedback);
494 GLELoadProc(glBindBufferRange_Impl, glBindBufferRange);
495 GLELoadProc(glBindBufferBase_Impl, glBindBufferBase);
496 GLELoadProc(glGetBooleani_v_Impl, glGetBooleani_v);
497 GLELoadProc(glGetIntegeri_v_Impl, glGetIntegeri_v);
498 GLELoadProc(glGetFragDataLocation_Impl, glGetFragDataLocation);
499 GLELoadProc(glGetStringi_Impl, glGetStringi);
500 GLELoadProc(glGetTexParameterIiv_Impl, glGetTexParameterIiv);
501 GLELoadProc(glGetTexParameterIuiv_Impl, glGetTexParameterIuiv);
502 GLELoadProc(glGetTransformFeedbackVarying_Impl, glGetTransformFeedbackVarying);
503 GLELoadProc(glGetUniformuiv_Impl, glGetUniformuiv);
504 GLELoadProc(glGetVertexAttribIiv_Impl, glGetVertexAttribIiv);
505 GLELoadProc(glGetVertexAttribIuiv_Impl, glGetVertexAttribIuiv);
506 GLELoadProc(glIsEnabledi_Impl, glIsEnabledi);
507 GLELoadProc(glTexParameterIiv_Impl, glTexParameterIiv);
508 GLELoadProc(glTexParameterIuiv_Impl, glTexParameterIuiv);
509 GLELoadProc(glTransformFeedbackVaryings_Impl, glTransformFeedbackVaryings);
510 GLELoadProc(glUniform1ui_Impl, glUniform1ui);
511 GLELoadProc(glUniform1uiv_Impl, glUniform1uiv);
512 GLELoadProc(glUniform2ui_Impl, glUniform2ui);
513 GLELoadProc(glUniform2uiv_Impl, glUniform2uiv);
514 GLELoadProc(glUniform3ui_Impl, glUniform3ui);
515 GLELoadProc(glUniform3uiv_Impl, glUniform3uiv);
516 GLELoadProc(glUniform4ui_Impl, glUniform4ui);
517 GLELoadProc(glUniform4uiv_Impl, glUniform4uiv);
518 GLELoadProc(glVertexAttribI1i_Impl, glVertexAttribI1i);
519 GLELoadProc(glVertexAttribI1iv_Impl, glVertexAttribI1iv);
520 GLELoadProc(glVertexAttribI1ui_Impl, glVertexAttribI1ui);
521 GLELoadProc(glVertexAttribI1uiv_Impl, glVertexAttribI1uiv);
522 GLELoadProc(glVertexAttribI2i_Impl, glVertexAttribI2i);
523 GLELoadProc(glVertexAttribI2iv_Impl, glVertexAttribI2iv);
524 GLELoadProc(glVertexAttribI2ui_Impl, glVertexAttribI2ui);
525 GLELoadProc(glVertexAttribI2uiv_Impl, glVertexAttribI2uiv);
526 GLELoadProc(glVertexAttribI3i_Impl, glVertexAttribI3i);
527 GLELoadProc(glVertexAttribI3iv_Impl, glVertexAttribI3iv);
528 GLELoadProc(glVertexAttribI3ui_Impl, glVertexAttribI3ui);
529 GLELoadProc(glVertexAttribI3uiv_Impl, glVertexAttribI3uiv);
530 GLELoadProc(glVertexAttribI4bv_Impl, glVertexAttribI4bv);
531 GLELoadProc(glVertexAttribI4i_Impl, glVertexAttribI4i);
532 GLELoadProc(glVertexAttribI4iv_Impl, glVertexAttribI4iv);
533 GLELoadProc(glVertexAttribI4sv_Impl, glVertexAttribI4sv);
534 GLELoadProc(glVertexAttribI4ubv_Impl, glVertexAttribI4ubv);
535 GLELoadProc(glVertexAttribI4ui_Impl, glVertexAttribI4ui);
536 GLELoadProc(glVertexAttribI4uiv_Impl, glVertexAttribI4uiv);
537 GLELoadProc(glVertexAttribI4usv_Impl, glVertexAttribI4usv);
538 GLELoadProc(glVertexAttribIPointer_Impl, glVertexAttribIPointer);
540 // GL_VERSION_3_1
541 GLELoadProc(glDrawArraysInstanced_Impl, glDrawArraysInstanced);
542 GLELoadProc(glDrawElementsInstanced_Impl, glDrawElementsInstanced);
543 GLELoadProc(glPrimitiveRestartIndex_Impl, glPrimitiveRestartIndex);
544 GLELoadProc(glTexBuffer_Impl, glTexBuffer);
546 // GL_VERSION_3_2
547 GLELoadProc(glFramebufferTexture_Impl, glFramebufferTexture);
548 GLELoadProc(glGetBufferParameteri64v_Impl, glGetBufferParameteri64v);
549 GLELoadProc(glGetInteger64i_v_Impl, glGetInteger64i_v);
551 // GL_VERSION_3_3
552 GLELoadProc(glVertexAttribDivisor_Impl, glVertexAttribDivisor);
554 // GL_VERSION_4_0
555 GLELoadProc(glBlendEquationSeparatei_Impl, glBlendEquationSeparatei);
556 GLELoadProc(glBlendEquationi_Impl, glBlendEquationi);
557 GLELoadProc(glBlendFuncSeparatei_Impl, glBlendFuncSeparatei);
558 GLELoadProc(glBlendFunci_Impl, glBlendFunci);
559 GLELoadProc(glMinSampleShading_Impl, glMinSampleShading);
561 // GL_AMD_debug_output
562 GLELoadProc(glDebugMessageCallbackAMD_Impl, glDebugMessageCallbackAMD);
563 GLELoadProc(glDebugMessageEnableAMD_Impl, glDebugMessageEnableAMD);
564 GLELoadProc(glDebugMessageInsertAMD_Impl, glDebugMessageInsertAMD);
565 GLELoadProc(glGetDebugMessageLogAMD_Impl, glGetDebugMessageLogAMD);
567 #if defined(GLE_CGL_ENABLED)
568 // GL_APPLE_element_array
569 GLELoadProc(glDrawElementArrayAPPLE_Impl, glDrawElementArrayAPPLE);
570 GLELoadProc(glDrawRangeElementArrayAPPLE_Impl, glDrawRangeElementArrayAPPLE);
571 GLELoadProc(glElementPointerAPPLE_Impl, glElementPointerAPPLE);
572 GLELoadProc(glMultiDrawElementArrayAPPLE_Impl, glMultiDrawElementArrayAPPLE);
573 GLELoadProc(glMultiDrawRangeElementArrayAPPLE_Impl, glMultiDrawRangeElementArrayAPPLE);
575 // GL_APPLE_fence
576 GLELoadProc(glDeleteFencesAPPLE_Impl, glDeleteFencesAPPLE);
577 GLELoadProc(glFinishFenceAPPLE_Impl, glFinishFenceAPPLE);
578 GLELoadProc(glFinishObjectAPPLE_Impl, glFinishObjectAPPLE);
579 GLELoadProc(glGenFencesAPPLE_Impl, glGenFencesAPPLE);
580 GLELoadProc(glIsFenceAPPLE_Impl, glIsFenceAPPLE);
581 GLELoadProc(glSetFenceAPPLE_Impl, glSetFenceAPPLE);
582 GLELoadProc(glTestFenceAPPLE_Impl, glTestFenceAPPLE);
583 GLELoadProc(glTestObjectAPPLE_Impl, glTestObjectAPPLE);
585 // GL_APPLE_flush_buffer_range
586 GLELoadProc(glBufferParameteriAPPLE_Impl, glMultiDrawRangeElementArrayAPPLE);
587 GLELoadProc(glFlushMappedBufferRangeAPPLE_Impl, glFlushMappedBufferRangeAPPLE);
589 // GL_APPLE_object_purgeable
590 GLELoadProc(glGetObjectParameterivAPPLE_Impl, glGetObjectParameterivAPPLE);
591 GLELoadProc(glObjectPurgeableAPPLE_Impl, glObjectPurgeableAPPLE);
592 GLELoadProc(glObjectUnpurgeableAPPLE_Impl, glObjectUnpurgeableAPPLE);
594 // GL_APPLE_texture_range
595 GLELoadProc(glGetTexParameterPointervAPPLE_Impl, glGetTexParameterPointervAPPLE);
596 GLELoadProc(glTextureRangeAPPLE_Impl, glTextureRangeAPPLE);
598 // GL_APPLE_vertex_array_object
599 GLELoadProc(glBindVertexArrayAPPLE_Impl, glBindVertexArrayAPPLE);
600 GLELoadProc(glDeleteVertexArraysAPPLE_Impl, glDeleteVertexArraysAPPLE);
601 GLELoadProc(glGenVertexArraysAPPLE_Impl, glGenVertexArraysAPPLE);
602 GLELoadProc(glIsVertexArrayAPPLE_Impl, glIsVertexArrayAPPLE);
604 // GL_APPLE_vertex_array_range
605 GLELoadProc(glFlushVertexArrayRangeAPPLE_Impl, glFlushVertexArrayRangeAPPLE);
606 GLELoadProc(glVertexArrayParameteriAPPLE_Impl, glVertexArrayParameteriAPPLE);
607 GLELoadProc(glVertexArrayRangeAPPLE_Impl, glVertexArrayRangeAPPLE);
609 // GL_APPLE_vertex_program_evaluators
610 GLELoadProc(glDisableVertexAttribAPPLE_Impl, glDisableVertexAttribAPPLE);
611 GLELoadProc(glEnableVertexAttribAPPLE_Impl, glEnableVertexAttribAPPLE);
612 GLELoadProc(glIsVertexAttribEnabledAPPLE_Impl, glIsVertexAttribEnabledAPPLE);
613 GLELoadProc(glMapVertexAttrib1dAPPLE_Impl, glMapVertexAttrib1dAPPLE);
614 GLELoadProc(glMapVertexAttrib1fAPPLE_Impl, glMapVertexAttrib1fAPPLE);
615 GLELoadProc(glMapVertexAttrib2dAPPLE_Impl, glMapVertexAttrib2dAPPLE);
616 GLELoadProc(glMapVertexAttrib2fAPPLE_Impl, glMapVertexAttrib2fAPPLE);
618 #endif // GLE_CGL_ENABLED
620 // GL_ARB_debug_output
621 GLELoadProc(glDebugMessageCallbackARB_Impl, glDebugMessageCallbackARB);
622 GLELoadProc(glDebugMessageControlARB_Impl, glDebugMessageControlARB);
623 GLELoadProc(glDebugMessageInsertARB_Impl, glDebugMessageInsertARB);
624 GLELoadProc(glGetDebugMessageLogARB_Impl, glGetDebugMessageLogARB);
626 // GL_ARB_ES2_compatibility
627 GLELoadProc(glClearDepthf_Impl, glClearDepthf);
628 GLELoadProc(glDepthRangef_Impl, glDepthRangef);
629 GLELoadProc(glGetShaderPrecisionFormat_Impl, glGetShaderPrecisionFormat);
630 GLELoadProc(glReleaseShaderCompiler_Impl, glReleaseShaderCompiler);
631 GLELoadProc(glShaderBinary_Impl, glShaderBinary);
633 // GL_ARB_framebuffer_object
634 GLELoadProc(glBindFramebuffer_Impl, glBindFramebuffer);
635 GLELoadProc(glBindRenderbuffer_Impl, glBindRenderbuffer);
636 GLELoadProc(glBlitFramebuffer_Impl, glBlitFramebuffer);
637 GLELoadProc(glCheckFramebufferStatus_Impl, glCheckFramebufferStatus);
638 GLELoadProc(glDeleteFramebuffers_Impl, glDeleteFramebuffers);
639 GLELoadProc(glDeleteRenderbuffers_Impl, glDeleteRenderbuffers);
640 GLELoadProc(glFramebufferRenderbuffer_Impl, glFramebufferRenderbuffer);
641 GLELoadProc(glFramebufferTexture1D_Impl, glFramebufferTexture1D);
642 GLELoadProc(glFramebufferTexture2D_Impl, glFramebufferTexture2D);
643 GLELoadProc(glFramebufferTexture3D_Impl, glFramebufferTexture3D);
644 GLELoadProc(glFramebufferTextureLayer_Impl, glFramebufferTextureLayer);
645 GLELoadProc(glGenFramebuffers_Impl, glGenFramebuffers);
646 GLELoadProc(glGenRenderbuffers_Impl, glGenRenderbuffers);
647 GLELoadProc(glGenerateMipmap_Impl, glGenerateMipmap);
648 GLELoadProc(glGetFramebufferAttachmentParameteriv_Impl, glGetFramebufferAttachmentParameteriv);
649 GLELoadProc(glGetRenderbufferParameteriv_Impl, glGetRenderbufferParameteriv);
650 GLELoadProc(glIsFramebuffer_Impl, glIsFramebuffer);
651 GLELoadProc(glIsRenderbuffer_Impl, glIsRenderbuffer);
652 GLELoadProc(glRenderbufferStorage_Impl, glRenderbufferStorage);
653 GLELoadProc(glRenderbufferStorageMultisample_Impl, glRenderbufferStorageMultisample);
655 if(!glBindFramebuffer_Impl) // This will rarely if ever be the case in practice with modern computers and drivers.
656 {
657 // 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.
658 GLELoadProc(glBindFramebuffer_Impl, glBindFramebufferEXT);
659 GLELoadProc(glBindRenderbuffer_Impl, glBindRenderbufferEXT);
660 //GLELoadProc(glBlitFramebuffer_Impl, glBlitFramebufferEXT (nonexistent));
661 GLELoadProc(glCheckFramebufferStatus_Impl, glCheckFramebufferStatusEXT);
662 GLELoadProc(glDeleteFramebuffers_Impl, glDeleteFramebuffersEXT);
663 GLELoadProc(glDeleteRenderbuffers_Impl, glDeleteRenderbuffersEXT);
664 GLELoadProc(glFramebufferRenderbuffer_Impl, glFramebufferRenderbufferEXT);
665 GLELoadProc(glFramebufferTexture1D_Impl, glFramebufferTexture1DEXT);
666 GLELoadProc(glFramebufferTexture2D_Impl, glFramebufferTexture2DEXT);
667 GLELoadProc(glFramebufferTexture3D_Impl, glFramebufferTexture3DEXT);
668 //GLELoadProc(glFramebufferTextureLayer_Impl, glFramebufferTextureLayerEXT (nonexistent));
669 GLELoadProc(glGenFramebuffers_Impl, glGenFramebuffersEXT);
670 GLELoadProc(glGenRenderbuffers_Impl, glGenRenderbuffersEXT);
671 GLELoadProc(glGenerateMipmap_Impl, glGenerateMipmapEXT);
672 GLELoadProc(glGetFramebufferAttachmentParameteriv_Impl, glGetFramebufferAttachmentParameterivEXT);
673 GLELoadProc(glGetRenderbufferParameteriv_Impl, glGetRenderbufferParameterivEXT);
674 GLELoadProc(glIsFramebuffer_Impl, glIsFramebufferEXT);
675 GLELoadProc(glIsRenderbuffer_Impl, glIsRenderbufferEXT);
676 GLELoadProc(glRenderbufferStorage_Impl, glRenderbufferStorageEXT);
677 //GLELoadProc(glRenderbufferStorageMultisample_Impl, glRenderbufferStorageMultisampleEXT (nonexistent));
678 }
680 // GL_ARB_texture_multisample
681 GLELoadProc(glGetMultisamplefv_Impl, glGetMultisamplefv);
682 GLELoadProc(glSampleMaski_Impl, glSampleMaski);
683 GLELoadProc(glTexImage2DMultisample_Impl, glTexImage2DMultisample);
684 GLELoadProc(glTexImage3DMultisample_Impl, glTexImage3DMultisample);
686 // GL_ARB_timer_query
687 GLELoadProc(glGetQueryObjecti64v_Impl, glGetQueryObjecti64v);
688 GLELoadProc(glGetQueryObjectui64v_Impl, glGetQueryObjectui64v);
689 GLELoadProc(glQueryCounter_Impl, glQueryCounter);
691 // GL_ARB_vertex_array_object
692 GLELoadProc(glBindVertexArray_Impl, glBindVertexArray);
693 GLELoadProc(glDeleteVertexArrays_Impl, glDeleteVertexArrays);
694 GLELoadProc(glGenVertexArrays_Impl, glGenVertexArrays);
695 GLELoadProc(glIsVertexArray_Impl, glIsVertexArray);
697 #if defined(GLE_CGL_ENABLED) // Apple OpenGL...
698 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.
699 {
700 glBindVertexArray_Impl = glBindVertexArrayAPPLE_Impl;
701 glDeleteVertexArrays_Impl = glDeleteVertexArraysAPPLE_Impl;
702 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.
703 glIsVertexArray_Impl = glIsVertexArrayAPPLE_Impl;
705 if(glBindVertexArray_Impl)
706 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.
707 }
708 #endif
710 // GL_EXT_draw_buffers2
711 GLELoadProc(glColorMaskIndexedEXT_Impl, glColorMaskIndexedEXT);
712 GLELoadProc(glDisableIndexedEXT_Impl, glDisableIndexedEXT);
713 GLELoadProc(glEnableIndexedEXT_Impl, glEnableIndexedEXT);
714 GLELoadProc(glGetBooleanIndexedvEXT_Impl, glGetBooleanIndexedvEXT);
715 GLELoadProc(glGetIntegerIndexedvEXT_Impl, glGetIntegerIndexedvEXT);
716 GLELoadProc(glIsEnabledIndexedEXT_Impl, glIsEnabledIndexedEXT);
718 // GL_KHR_debug
719 GLELoadProc(glDebugMessageCallback_Impl, glDebugMessageCallback);
720 GLELoadProc(glDebugMessageControl_Impl, glDebugMessageControl);
721 GLELoadProc(glDebugMessageInsert_Impl, glDebugMessageInsert);
722 GLELoadProc(glGetDebugMessageLog_Impl, glGetDebugMessageLog);
723 GLELoadProc(glGetObjectLabel_Impl, glGetObjectLabel);
724 GLELoadProc(glGetObjectPtrLabel_Impl, glGetObjectPtrLabel);
725 GLELoadProc(glObjectLabel_Impl, glObjectLabel);
726 GLELoadProc(glObjectPtrLabel_Impl, glObjectPtrLabel);
727 GLELoadProc(glPopDebugGroup_Impl, glPopDebugGroup);
728 GLELoadProc(glPushDebugGroup_Impl, glPushDebugGroup);
730 // GL_WIN_swap_hint
731 GLELoadProc(glAddSwapHintRectWIN_Impl, glAddSwapHintRectWIN);
732 }
736 OVR_DISABLE_MSVC_WARNING(4510 4512 4610) // default constructor could not be generated,
737 struct ValueStringPair
738 {
739 bool& IsPresent;
740 const char* ExtensionName;
741 };
744 // Helper function for InitExtensionSupport.
745 static void CheckExtensions(ValueStringPair* pValueStringPairArray, size_t arrayCount, const char* extensions)
746 {
747 // We search the extesion list string for each of the individual extensions we are interested in.
748 // We do this by walking over the string and comparing each entry in turn to our array of entries of interest.
749 // Example string (with patholigical extra spaces): " ext1 ext2 ext3 "
751 char extension[64];
752 const char* p = extensions; // p points to the beginning of the current word
753 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.
755 while(*p)
756 {
757 while(*p == ' ') // Find the next word begin.
758 ++p;
760 pEnd = p;
762 while((*pEnd != '\0') && (*pEnd != ' ')) // Find the next word end.
763 ++pEnd;
765 if(((pEnd - p) > 0) && ((size_t)(pEnd - p) < OVR_ARRAY_COUNT(extension)))
766 {
767 memcpy(extension, p, pEnd - p); // To consider: Revise this code to directly read from p/pEnd instead of doing a memcpy.
768 extension[pEnd - p] = '\0';
770 for(size_t i = 0; i < arrayCount; i++) // For each extension we are interested in...
771 {
772 ValueStringPair& vsp = pValueStringPairArray[i];
774 if(strcmp(extension, vsp.ExtensionName) == 0) // case-sensitive compare
775 pValueStringPairArray[i].IsPresent = true;
776 }
777 }
779 p = pEnd;
780 }
781 }
784 void OVR::GLEContext::InitExtensionSupport()
785 {
786 // It may be better in the long run to use a member STL map<const char*, bool>.
787 // It would make this loading code cleaner, though it would make lookups slower.
789 ValueStringPair vspArray[] =
790 {
791 { gle_AMD_debug_output, "GL_AMD_debug_output" },
792 #if defined(GLE_CGL_ENABLED)
793 { gle_APPLE_aux_depth_stencil, "GL_APPLE_aux_depth_stencil" },
794 { gle_APPLE_client_storage, "GL_APPLE_client_storage" },
795 { gle_APPLE_element_array, "GL_APPLE_element_array" },
796 { gle_APPLE_fence, "GL_APPLE_fence" },
797 { gle_APPLE_float_pixels, "GL_APPLE_float_pixels" },
798 { gle_APPLE_flush_buffer_range, "GL_APPLE_flush_buffer_range" },
799 { gle_APPLE_object_purgeable, "GL_APPLE_object_purgeable" },
800 { gle_APPLE_pixel_buffer, "GL_APPLE_pixel_buffer" },
801 { gle_APPLE_rgb_422, "GL_APPLE_rgb_422" },
802 { gle_APPLE_row_bytes, "GL_APPLE_row_bytes" },
803 { gle_APPLE_specular_vector, "GL_APPLE_specular_vector" },
804 { gle_APPLE_texture_range, "GL_APPLE_texture_range" },
805 { gle_APPLE_transform_hint, "GL_APPLE_transform_hint" },
806 { gle_APPLE_vertex_array_object, "GL_APPLE_vertex_array_object" },
807 { gle_APPLE_vertex_array_range, "GL_APPLE_vertex_array_range" },
808 { gle_APPLE_vertex_program_evaluators, "GL_APPLE_vertex_program_evaluators" },
809 { gle_APPLE_ycbcr_422, "GL_APPLE_ycbcr_422" },
810 #endif
811 { gle_ARB_debug_output, "GL_ARB_debug_output" },
812 { gle_ARB_depth_buffer_float, "GL_ARB_depth_buffer_float" },
813 { gle_ARB_ES2_compatibility, "GL_ARB_ES2_compatibility" },
814 { gle_ARB_framebuffer_object, "GL_ARB_framebuffer_object" },
815 { gle_ARB_framebuffer_object, "GL_EXT_framebuffer_object" }, // We map glBindFramebuffer, etc. to glBindFramebufferEXT, etc. if necessary
816 { gle_ARB_framebuffer_sRGB, "GL_ARB_framebuffer_sRGB" },
817 { gle_ARB_texture_multisample, "GL_ARB_texture_multisample" },
818 { gle_ARB_texture_non_power_of_two, "GL_ARB_texture_non_power_of_two" },
819 { gle_ARB_texture_rectangle, "GL_ARB_texture_rectangle" },
820 { gle_ARB_texture_rectangle, "GL_EXT_texture_rectangle" }, // We also check for GL_EXT_texture_rectangle and GL_NV_texture_rectangle.
821 { gle_ARB_texture_rectangle, "GL_NV_texture_rectangle" },
822 { gle_ARB_timer_query, "GL_ARB_timer_query" },
823 { gle_ARB_vertex_array_object, "GL_ARB_vertex_array_object" },
824 { gle_EXT_draw_buffers2, "GL_EXT_draw_buffers2" },
825 { gle_EXT_texture_compression_s3tc, "GL_EXT_texture_compression_s3tc" },
826 { gle_EXT_texture_filter_anisotropic, "GL_EXT_texture_filter_anisotropic" },
827 { gle_KHR_debug, "GL_KHR_debug" },
828 { gle_WIN_swap_hint, "GL_WIN_swap_hint" }
829 // Windows WGL, Unix GLX, and Apple CGL extensions are handled below, as they require different calls from glGetString(GL_EXTENSIONS).
830 };
832 // We cannot use glGetString(GL_EXTENSIONS) when an OpenGL core profile is active,
833 // as it's deprecated in favor of using OpenGL 3+ glGetStringi.
834 const char* extensions = (MajorVersion < 3) ? (const char*)glGetString(GL_EXTENSIONS) : "";
836 if (extensions && *extensions) // If we have a space-delimited extension string to search for individual extensions...
837 {
838 OVR_DEBUG_LOG(("GL_EXTENSIONS: %s", (const char*)extensions));
839 CheckExtensions(vspArray, OVR_ARRAY_COUNT(vspArray), extensions); // Call our shared helper function for this.
840 }
841 else
842 {
843 if(MajorVersion >= 3) // If glGetIntegerv(GL_NUM_EXTENSIONS, ...) is supported...
844 {
845 // In this case we need to match an array of individual extensions against an array of
846 // externsions provided by glGetStringi. This is an O(n^2) operation, but at least we
847 // are doing this only once on startup. There are a few tricks we can employ to speed
848 // up the logic below, but they may not be worth much.
850 GLint extensionCount = 0;
851 glGetIntegerv(GL_NUM_EXTENSIONS, &extensionCount);
852 GLenum err = glGetError();
854 if(err == 0)
855 {
856 #ifdef OVR_BUILD_DEBUG
857 OVR::StringBuffer extensionsStr;
858 #endif
860 for(GLint e = 0; e != extensionCount; ++e) // For each extension supported...
861 {
862 const char* extension = (const char*)glGetStringi(GL_EXTENSIONS, (GLuint)e);
864 if(extension) // glGetStringi returns NULL upon error.
865 {
866 #ifdef OVR_BUILD_DEBUG
867 extensionsStr.AppendFormat(" %s", extension);
868 #endif
870 for(size_t i = 0; i < OVR_ARRAY_COUNT(vspArray); i++) // For each extension we are interested in...
871 {
872 ValueStringPair& vsp = vspArray[i];
874 if(strcmp(extension, vsp.ExtensionName) == 0) // case-sensitive compare
875 vspArray[i].IsPresent = true;
876 }
877 }
878 else
879 break;
880 }
882 OVR_DEBUG_LOG(("GL_EXTENSIONS: %s", extensionsStr.ToCStr()));
883 }
884 }
885 // Else we have a problem: no means to read the extensions was successful.
886 }
888 #if defined(GLE_CGL_ENABLED)
889 // The following are built into Apple OpenGL 3.2+ (declared in <OpenGL/gl3.h>) and not identified as extensions.
890 // On other platforms (e.g. Windows) these are identified as extensions and are detected above.
891 if(WholeVersion >= 302)
892 {
893 gle_ARB_depth_buffer_float = true;
894 gle_ARB_framebuffer_object = true;
895 gle_ARB_framebuffer_sRGB = true;
896 gle_ARB_texture_multisample = true;
897 gle_ARB_texture_non_power_of_two = true;
898 gle_ARB_texture_rectangle = true;
899 gle_ARB_vertex_array_object = true;
900 }
901 #endif
903 } // GLEContext::InitExtensionSupport()
906 void OVR::GLEContext::InitPlatformVersion()
907 {
908 #if defined(GLE_GLX_ENABLED)
909 const char* pGLXVersion = glXGetClientString(glXGetCurrentDisplay(), GLX_VERSION); // To do: Use a better mechanism to get the desired display.
910 sscanf(pGLXVersion, "%d.%d", &PlatformMajorVersion, &PlatformMinorVersion);
912 #elif defined(GLE_EGL_ENABLED)
913 const char* pEGLVersion = eglQueryString(eglGetDisplay(EGL_DEFAULT_DISPLAY), EGL_VERSION);
914 sscanf(pEGLVersion, "%d.%d", &PlatformMajorVersion, &PlatformMinorVersion);
916 #else
917 PlatformMajorVersion = 1;
918 PlatformMinorVersion = 0;
919 PlatformWholeVersion = 100;
920 #endif
921 }
924 void OVR::GLEContext::InitPlatformExtensionLoad()
925 {
926 #if defined(GLE_WGL_ENABLED)
927 // WGL
928 // We don't load these as function pointers but rather statically link to them.
929 // These need to be loaded via LoadLibrary instead of wglLoadLibrary.
931 #if 0
932 HINSTANCE hOpenGL = LoadLibraryW(L"Opengl32.dll");
933 if(hOpenGL)
934 {
935 wglCopyContext_Impl = (OVRTypeof(wglCopyContext_Impl)) GetProcAddress(hOpenGL, "wglCopyContext");
936 wglCreateContext_Impl = (OVRTypeof(wglCreateContext_Impl)) GetProcAddress(hOpenGL, "wglCreateContext");
937 wglCreateLayerContext_Impl = (OVRTypeof(wglCreateLayerContext_Impl)) GetProcAddress(hOpenGL, "wglCreateLayerContext");
938 wglDeleteContext_Impl = (OVRTypeof(wglDeleteContext_Impl)) GetProcAddress(hOpenGL, "wglDeleteContext");
939 wglGetCurrentContext_Impl = (OVRTypeof(wglGetCurrentContext_Impl)) GetProcAddress(hOpenGL, "wglGetCurrentContext");
940 wglGetCurrentDC_Impl = (OVRTypeof(wglGetCurrentDC_Impl)) GetProcAddress(hOpenGL, "wglGetCurrentDC");
941 wglGetProcAddress_Impl = (OVRTypeof(wglGetProcAddress_Impl)) GetProcAddress(hOpenGL, "wglGetProcAddress");
942 wglMakeCurrent_Impl = (OVRTypeof(wglMakeCurrent_Impl)) GetProcAddress(hOpenGL, "wglMakeCurrent");
943 wglShareLists_Impl = (OVRTypeof(wglShareLists_Impl)) GetProcAddress(hOpenGL, "wglShareLists");
944 wglUseFontBitmapsA_Impl = (OVRTypeof(wglUseFontBitmapsA_Impl)) GetProcAddress(hOpenGL, "wglUseFontBitmapsA");
945 wglUseFontBitmapsW_Impl = (OVRTypeof(wglUseFontBitmapsW_Impl)) GetProcAddress(hOpenGL, "wglUseFontBitmapsW");
946 wglUseFontOutlinesA_Impl = (OVRTypeof(wglUseFontOutlinesA_Impl)) GetProcAddress(hOpenGL, "wglUseFontOutlinesA");
947 wglUseFontOutlinesW_Impl = (OVRTypeof(wglUseFontOutlinesW_Impl)) GetProcAddress(hOpenGL, "wglUseFontOutlinesW");
948 wglDescribeLayerPlane_Impl = (OVRTypeof(wglDescribeLayerPlane_Impl)) GetProcAddress(hOpenGL, "wglDescribeLayerPlane");
949 wglSetLayerPaletteEntries_Impl = (OVRTypeof(wglSetLayerPaletteEntries_Impl)) GetProcAddress(hOpenGL, "wglSetLayerPaletteEntries");
950 wglGetLayerPaletteEntries_Impl = (OVRTypeof(wglGetLayerPaletteEntries_Impl)) GetProcAddress(hOpenGL, "wglGetLayerPaletteEntries");
951 wglRealizeLayerPalette_Impl = (OVRTypeof(wglRealizeLayerPalette_Impl)) GetProcAddress(hOpenGL, "wglRealizeLayerPalette");
952 wglSwapLayerBuffers_Impl = (OVRTypeof(wglSwapLayerBuffers_Impl)) GetProcAddress(hOpenGL, "wglSwapLayerBuffers");
953 wglSwapMultipleBuffers_Impl = (OVRTypeof(wglSwapMultipleBuffers_Impl)) GetProcAddress(hOpenGL, "wglSwapMultipleBuffers");
954 FreeLibrary(hOpenGL);
955 }
956 #endif
958 // WGL_ARB_buffer_region
959 GLELoadProc(wglCreateBufferRegionARB_Impl, wglCreateBufferRegionARB);
960 GLELoadProc(wglDeleteBufferRegionARB_Impl, wglDeleteBufferRegionARB);
961 GLELoadProc(wglSaveBufferRegionARB_Impl, wglSaveBufferRegionARB);
962 GLELoadProc(wglRestoreBufferRegionARB_Impl, wglRestoreBufferRegionARB);
964 // WGL_ARB_extensions_string
965 GLELoadProc(wglGetExtensionsStringARB_Impl, wglGetExtensionsStringARB);
967 // WGL_ARB_pixel_format
968 GLELoadProc(wglGetPixelFormatAttribivARB_Impl, wglGetPixelFormatAttribivARB);
969 GLELoadProc(wglGetPixelFormatAttribfvARB_Impl, wglGetPixelFormatAttribfvARB);
970 GLELoadProc(wglChoosePixelFormatARB_Impl, wglChoosePixelFormatARB);
972 // WGL_ARB_make_current_read
973 GLELoadProc(wglMakeContextCurrentARB_Impl, wglMakeContextCurrentARB);
974 GLELoadProc(wglGetCurrentReadDCARB_Impl, wglGetCurrentReadDCARB);
976 // WGL_ARB_pbuffer
977 GLELoadProc(wglCreatePbufferARB_Impl, wglCreatePbufferARB);
978 GLELoadProc(wglGetPbufferDCARB_Impl, wglGetPbufferDCARB);
979 GLELoadProc(wglReleasePbufferDCARB_Impl, wglReleasePbufferDCARB);
980 GLELoadProc(wglDestroyPbufferARB_Impl, wglDestroyPbufferARB);
981 GLELoadProc(wglQueryPbufferARB_Impl, wglQueryPbufferARB);
983 // WGL_ARB_render_texture
984 GLELoadProc(wglBindTexImageARB_Impl, wglBindTexImageARB);
985 GLELoadProc(wglReleaseTexImageARB_Impl, wglReleaseTexImageARB);
986 GLELoadProc(wglSetPbufferAttribARB_Impl, wglSetPbufferAttribARB);
988 // WGL_NV_present_video
989 GLELoadProc(wglEnumerateVideoDevicesNV_Impl, wglEnumerateVideoDevicesNV);
990 GLELoadProc(wglBindVideoDeviceNV_Impl, wglBindVideoDeviceNV);
991 GLELoadProc(wglQueryCurrentContextNV_Impl, wglQueryCurrentContextNV);
993 // WGL_ARB_create_context
994 GLELoadProc(wglCreateContextAttribsARB_Impl, wglCreateContextAttribsARB);
996 // WGL_EXT_extensions_string
997 GLELoadProc(wglGetExtensionsStringEXT_Impl, wglGetExtensionsStringEXT);
999 // WGL_EXT_swap_control
1000 GLELoadProc(wglGetSwapIntervalEXT_Impl, wglGetSwapIntervalEXT);
1001 GLELoadProc(wglSwapIntervalEXT_Impl, wglSwapIntervalEXT);
1003 // WGL_OML_sync_control
1004 GLELoadProc(wglGetSyncValuesOML_Impl, wglGetSyncValuesOML);
1005 GLELoadProc(wglGetMscRateOML_Impl, wglGetMscRateOML);
1006 GLELoadProc(wglSwapBuffersMscOML_Impl, wglSwapBuffersMscOML);
1007 GLELoadProc(wglSwapLayerBuffersMscOML_Impl, wglSwapLayerBuffersMscOML);
1008 GLELoadProc(wglWaitForMscOML_Impl, wglWaitForMscOML);
1009 GLELoadProc(wglWaitForSbcOML_Impl, wglWaitForSbcOML);
1011 // WGL_NV_video_output
1012 GLELoadProc(wglGetVideoDeviceNV_Impl, wglGetVideoDeviceNV);
1013 GLELoadProc(wglReleaseVideoDeviceNV_Impl, wglReleaseVideoDeviceNV);
1014 GLELoadProc(wglBindVideoImageNV_Impl, wglBindVideoImageNV);
1015 GLELoadProc(wglReleaseVideoImageNV_Impl, wglReleaseVideoImageNV);
1016 GLELoadProc(wglSendPbufferToVideoNV_Impl, wglSendPbufferToVideoNV);
1017 GLELoadProc(wglGetVideoInfoNV_Impl, wglGetVideoInfoNV);
1019 // WGL_NV_swap_group
1020 GLELoadProc(wglJoinSwapGroupNV_Impl, wglJoinSwapGroupNV);
1021 GLELoadProc(wglBindSwapBarrierNV_Impl, wglBindSwapBarrierNV);
1022 GLELoadProc(wglQuerySwapGroupNV_Impl, wglQuerySwapGroupNV);
1023 GLELoadProc(wglQueryMaxSwapGroupsNV_Impl, wglQueryMaxSwapGroupsNV);
1024 GLELoadProc(wglQueryFrameCountNV_Impl, wglQueryFrameCountNV);
1025 GLELoadProc(wglResetFrameCountNV_Impl, wglResetFrameCountNV);
1027 // WGL_NV_video_capture
1028 GLELoadProc(wglBindVideoCaptureDeviceNV_Impl, wglBindVideoCaptureDeviceNV);
1029 GLELoadProc(wglEnumerateVideoCaptureDevicesNV_Impl, wglEnumerateVideoCaptureDevicesNV);
1030 GLELoadProc(wglLockVideoCaptureDeviceNV_Impl, wglLockVideoCaptureDeviceNV);
1031 GLELoadProc(wglQueryVideoCaptureDeviceNV_Impl, wglQueryVideoCaptureDeviceNV);
1032 GLELoadProc(wglReleaseVideoCaptureDeviceNV_Impl, wglReleaseVideoCaptureDeviceNV);
1034 // WGL_NV_copy_image
1035 GLELoadProc(wglCopyImageSubDataNV_Impl, wglCopyImageSubDataNV);
1037 // WGL_NV_DX_interop
1038 GLELoadProc(wglDXCloseDeviceNV_Impl, wglDXCloseDeviceNV);
1039 GLELoadProc(wglDXLockObjectsNV_Impl, wglDXLockObjectsNV);
1040 GLELoadProc(wglDXObjectAccessNV_Impl, wglDXObjectAccessNV);
1041 GLELoadProc(wglDXOpenDeviceNV_Impl, wglDXOpenDeviceNV);
1042 GLELoadProc(wglDXRegisterObjectNV_Impl, wglDXRegisterObjectNV);
1043 GLELoadProc(wglDXSetResourceShareHandleNV_Impl, wglDXSetResourceShareHandleNV);
1044 GLELoadProc(wglDXUnlockObjectsNV_Impl, wglDXUnlockObjectsNV);
1045 GLELoadProc(wglDXUnregisterObjectNV_Impl, wglDXUnregisterObjectNV);
1047 #elif defined(GLE_GLX_ENABLED)
1048 // GLX_VERSION_1_1
1049 // We don't create any pointers_Impl, because we assume these functions are always present.
1051 // GLX_VERSION_1_2
1052 GLELoadProc(glXGetCurrentDisplay_Impl, glXGetCurrentDisplay);
1054 // GLX_VERSION_1_3
1055 GLELoadProc(glXChooseFBConfig_Impl, glXChooseFBConfig);
1056 GLELoadProc(glXCreateNewContext_Impl, glXCreateNewContext);
1057 GLELoadProc(glXCreatePbuffer_Impl, glXCreatePbuffer);
1058 GLELoadProc(glXCreatePixmap_Impl, glXCreatePixmap);
1059 GLELoadProc(glXCreateWindow_Impl, glXCreateWindow);
1060 GLELoadProc(glXDestroyPbuffer_Impl, glXDestroyPbuffer);
1061 GLELoadProc(glXDestroyPixmap_Impl, glXDestroyPixmap);
1062 GLELoadProc(glXDestroyWindow_Impl, glXDestroyWindow);
1063 GLELoadProc(glXGetCurrentReadDrawable_Impl, glXGetCurrentReadDrawable);
1064 GLELoadProc(glXGetFBConfigAttrib_Impl, glXGetFBConfigAttrib);
1065 GLELoadProc(glXGetFBConfigs_Impl, glXGetFBConfigs);
1066 GLELoadProc(glXGetSelectedEvent_Impl, glXGetSelectedEvent);
1067 GLELoadProc(glXGetVisualFromFBConfig_Impl, glXGetVisualFromFBConfig);
1068 GLELoadProc(glXMakeContextCurrent_Impl, glXMakeContextCurrent);
1069 GLELoadProc(glXQueryContext_Impl, glXQueryContext);
1070 GLELoadProc(glXQueryDrawable_Impl, glXQueryDrawable);
1071 GLELoadProc(glXSelectEvent_Impl, glXSelectEvent);
1073 // GLX_VERSION_1_4
1074 // Nothing to declare
1076 // GLX_ARB_create_context
1077 GLELoadProc(glXCreateContextAttribsARB_Impl, glXCreateContextAttribsARB);
1079 // GLX_EXT_swap_control
1080 GLELoadProc(glXSwapIntervalEXT_Impl, glXSwapIntervalEXT);
1082 // GLX_OML_sync_control
1083 GLELoadProc(glXGetMscRateOML_Impl, glXGetMscRateOML);
1084 GLELoadProc(glXGetSyncValuesOML_Impl, glXGetSyncValuesOML);
1085 GLELoadProc(glXGetSyncValuesOML_Impl, glXSwapBuffersMscOML);
1086 GLELoadProc(glXSwapBuffersMscOML_Impl, glXSwapBuffersMscOML);
1087 GLELoadProc(glXWaitForSbcOML_Impl, glXWaitForSbcOML);
1089 // GLX_MESA_swap_control
1090 GLELoadProc(glXGetSwapIntervalMESA_Impl, glXGetSwapIntervalMESA);
1091 GLELoadProc(glXSwapIntervalMESA_Impl, glXSwapIntervalMESA);
1092 #endif
1093 }
1096 void OVR::GLEContext::InitPlatformExtensionSupport()
1097 {
1098 #if defined(GLE_WGL_ENABLED)
1099 // We need to use wglGetExtensionsStringARB or wglGetExtensionsStringEXT as opposed to above with glGetString(GL_EXTENSIONS).
1100 ValueStringPair vspWGLArray[] =
1101 {
1102 { gle_WGL_ARB_buffer_region, "WGL_ARB_buffer_region" }
1103 ,{ gle_WGL_ARB_create_context, "WGL_ARB_create_context" }
1104 ,{ gle_WGL_ARB_create_context_profile, "WGL_ARB_create_context_profile" }
1105 ,{ gle_WGL_ARB_create_context_robustness, "WGL_ARB_create_context_robustness" }
1106 ,{ gle_WGL_ARB_extensions_string, "WGL_ARB_extensions_string" }
1107 ,{ gle_WGL_ARB_framebuffer_sRGB, "WGL_ARB_framebuffer_sRGB" }
1108 ,{ gle_WGL_ARB_framebuffer_sRGB, "WGL_EXT_framebuffer_sRGB" } // We map the EXT to the ARB.
1109 ,{ gle_WGL_ARB_make_current_read, "WGL_ARB_make_current_read" }
1110 ,{ gle_WGL_ARB_pbuffer, "WGL_ARB_pbuffer" }
1111 ,{ gle_WGL_ARB_pixel_format, "WGL_ARB_pixel_format" }
1112 ,{ gle_WGL_ARB_pixel_format_float, "WGL_ARB_pixel_format_float" }
1113 ,{ gle_WGL_ARB_render_texture, "WGL_ARB_render_texture" }
1114 ,{ gle_WGL_ATI_render_texture_rectangle, "WGL_ATI_render_texture_rectangle" }
1115 ,{ gle_WGL_EXT_extensions_string, "WGL_EXT_extensions_string" }
1116 ,{ gle_WGL_EXT_swap_control, "WGL_EXT_swap_control" }
1117 ,{ gle_WGL_NV_copy_image, "WGL_NV_copy_image" }
1118 ,{ gle_WGL_NV_DX_interop, "WGL_NV_DX_interop" }
1119 ,{ gle_WGL_NV_DX_interop2, "WGL_NV_DX_interop2" }
1120 ,{ gle_WGL_NV_present_video, "WGL_NV_present_video" }
1121 ,{ gle_WGL_NV_render_texture_rectangle, "WGL_NV_render_texture_rectangle" }
1122 ,{ gle_WGL_NV_swap_group, "WGL_NV_swap_group" }
1123 ,{ gle_WGL_NV_video_capture, "WGL_NV_video_capture" }
1124 ,{ gle_WGL_NV_video_output, "WGL_NV_video_output" }
1125 ,{ gle_WGL_OML_sync_control, "WGL_OML_sync_control" }
1126 };
1128 const char* extensions = NULL;
1130 if(wglGetExtensionsStringARB_Impl)
1131 extensions = wglGetExtensionsStringARB_Impl(wglGetCurrentDC()); // To do: Use a better mechanism to get the desired HDC.
1132 else if(wglGetExtensionsStringEXT_Impl)
1133 extensions = wglGetExtensionsStringEXT_Impl();
1135 if (extensions && *extensions)
1136 {
1137 OVR_DEBUG_LOG(("WGL_EXTENSIONS: %s", (const char*)extensions));
1138 CheckExtensions(vspWGLArray, OVR_ARRAY_COUNT(vspWGLArray), extensions);
1139 }
1141 #elif defined(GLE_GLX_ENABLED)
1142 ValueStringPair vspGLXArray[] =
1143 {
1144 { gle_GLX_ARB_create_context, "GLX_ARB_create_context" }
1145 ,{ gle_GLX_ARB_create_context_profile, "GLX_ARB_create_context_profile" }
1146 ,{ gle_GLX_ARB_create_context_robustness, "GLX_ARB_create_context_robustness" }
1147 ,{ gle_GLX_EXT_swap_control, "GLX_EXT_swap_control" }
1148 ,{ gle_GLX_OML_sync_control, "GLX_OML_sync_control" }
1149 ,{ gle_MESA_swap_control, "GLX_MESA_swap_control" }
1150 };
1152 const char* extensions = glXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS); // To do: Use a better mechanism to get the desired display.
1154 if (extensions && *extensions)
1155 {
1156 OVR_DEBUG_LOG(("GLX_EXTENSIONS: %s", (const char*)extensions));
1157 CheckExtensions(vspGLXArray, OVR_ARRAY_COUNT(vspGLXArray), extensions);
1158 }
1159 #endif
1160 }
1163 #if defined(GLE_HOOKING_ENABLED)
1165 #undef glGetError
1166 extern "C" { GLAPI GLenum GLAPIENTRY glGetError(); }
1168 // Disabled until such time as it might be useful to enable for debug purposes.
1169 //void OVR::GLEContext::PreHook(const char* functionName)
1170 //{
1171 // if(EnableHookGetError)
1172 // {
1173 // int err = glGetError();
1174 //
1175 // 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.
1176 // {
1177 // OVR_DEBUG_LOG(("GL Error prior to hook: %d (%#x) from %s", err, err, functionName ? functionName : "OpenGL")); OVR_UNUSED(functionName);
1178 // err = glGetError();
1179 // }
1180 // }
1181 //}
1183 void OVR::GLEContext::PostHook(const char* functionName)
1184 {
1185 if(EnableHookGetError)
1186 {
1187 // 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
1188 // 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
1189 // 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.
1190 int err = glGetError();
1192 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.
1193 {
1194 OVR_DEBUG_LOG(("GL Error: %d (%#x) from %s", err, err, functionName ? functionName : "OpenGL")); OVR_UNUSED(functionName);
1195 err = glGetError();
1196 }
1197 }
1198 }
1201 // OpenGL 1.1 link-based functions
1202 #undef glAccum // Undefine the macro from our header so that we can directly call the real version of this function.
1203 extern "C" { GLAPI void GLAPIENTRY glAccum(GLenum op, GLfloat value); }
1204 void OVR::GLEContext::glAccum_Hook(GLenum op, GLfloat value)
1205 {
1206 glAccum(op, value);
1207 PostHook(GLE_CURRENT_FUNCTION);
1208 }
1210 #undef glAlphaFunc
1211 extern "C" { GLAPI void GLAPIENTRY glAlphaFunc(GLenum func, GLclampf ref); }
1212 void OVR::GLEContext::glAlphaFunc_Hook(GLenum func, GLclampf ref)
1213 {
1214 glAlphaFunc(func, ref);
1215 PostHook(GLE_CURRENT_FUNCTION);
1216 }
1218 #undef glAreTexturesResident
1219 extern "C" { GLAPI GLboolean GLAPIENTRY glAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences); }
1220 GLboolean OVR::GLEContext::glAreTexturesResident_Hook(GLsizei n, const GLuint *textures, GLboolean *residences)
1221 {
1222 GLboolean b = glAreTexturesResident(n, textures, residences);
1223 PostHook(GLE_CURRENT_FUNCTION);
1224 return b;
1225 }
1227 #undef glArrayElement
1228 extern "C" { GLAPI void GLAPIENTRY glArrayElement(GLint i); }
1229 void OVR::GLEContext::glArrayElement_Hook(GLint i)
1230 {
1231 glArrayElement(i);
1232 PostHook(GLE_CURRENT_FUNCTION);
1233 }
1235 #undef glBegin
1236 extern "C" { GLAPI void GLAPIENTRY glBegin(GLenum mode); }
1237 void OVR::GLEContext::glBegin_Hook(GLenum mode)
1238 {
1239 glBegin(mode);
1240 PostHook(GLE_CURRENT_FUNCTION);
1241 }
1243 #undef glBindTexture
1244 extern "C" { GLAPI void GLAPIENTRY glBindTexture(GLenum target, GLuint texture); }
1245 void OVR::GLEContext::glBindTexture_Hook(GLenum target, GLuint texture)
1246 {
1247 glBindTexture(target, texture);
1248 PostHook(GLE_CURRENT_FUNCTION);
1249 }
1251 #undef glBitmap
1252 extern "C" { GLAPI void GLAPIENTRY glBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap); }
1253 void OVR::GLEContext::glBitmap_Hook(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
1254 {
1255 glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap);
1256 PostHook(GLE_CURRENT_FUNCTION);
1257 }
1259 #undef glBlendFunc
1260 extern "C" { GLAPI void GLAPIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor); }
1261 void OVR::GLEContext::glBlendFunc_Hook(GLenum sfactor, GLenum dfactor)
1262 {
1263 glBlendFunc(sfactor, dfactor);
1264 PostHook(GLE_CURRENT_FUNCTION);
1265 }
1267 #undef glCallList
1268 extern "C" { GLAPI void GLAPIENTRY glCallList(GLuint list); }
1269 void OVR::GLEContext::glCallList_Hook(GLuint list)
1270 {
1271 glCallList(list);
1272 PostHook(GLE_CURRENT_FUNCTION);
1273 }
1275 #undef glCallLists
1276 extern "C" { GLAPI void GLAPIENTRY glCallLists(GLsizei n, GLenum type, const void *lists); }
1277 void OVR::GLEContext::glCallLists_Hook(GLsizei n, GLenum type, const void *lists)
1278 {
1279 glCallLists(n, type, lists);
1280 PostHook(GLE_CURRENT_FUNCTION);
1281 }
1283 #undef glClear
1284 extern "C" { GLAPI void GLAPIENTRY glClear(GLbitfield mask); }
1285 void OVR::GLEContext::glClear_Hook(GLbitfield mask)
1286 {
1287 glClear(mask);
1288 PostHook(GLE_CURRENT_FUNCTION);
1289 }
1291 #undef glClearAccum
1292 extern "C" { GLAPI void GLAPIENTRY glClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); }
1293 void OVR::GLEContext::glClearAccum_Hook(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
1294 {
1295 glClearAccum(red, green, blue, alpha);
1296 PostHook(GLE_CURRENT_FUNCTION);
1297 }
1299 #undef glClearColor
1300 extern "C" { GLAPI void GLAPIENTRY glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); }
1301 void OVR::GLEContext::glClearColor_Hook(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
1302 {
1303 glClearColor(red, green, blue, alpha);
1304 PostHook(GLE_CURRENT_FUNCTION);
1305 }
1307 #undef glClearDepth
1308 extern "C" { GLAPI void GLAPIENTRY glClearDepth(GLclampd depth); }
1309 void OVR::GLEContext::glClearDepth_Hook(GLclampd depth)
1310 {
1311 glClearDepth(depth);
1312 PostHook(GLE_CURRENT_FUNCTION);
1313 }
1315 #undef glClearIndex
1316 extern "C" { GLAPI void GLAPIENTRY glClearIndex(GLfloat c); }
1317 void OVR::GLEContext::glClearIndex_Hook(GLfloat c)
1318 {
1319 glClearIndex(c);
1320 PostHook(GLE_CURRENT_FUNCTION);
1321 }
1323 #undef glClearStencil
1324 extern "C" { GLAPI void GLAPIENTRY glClearStencil(GLint s); }
1325 void OVR::GLEContext::glClearStencil_Hook(GLint s)
1326 {
1327 glClearStencil(s);
1328 PostHook(GLE_CURRENT_FUNCTION);
1329 }
1331 #undef glClipPlane
1332 extern "C" { GLAPI void GLAPIENTRY glClipPlane(GLenum plane, const GLdouble *equation); }
1333 void OVR::GLEContext::glClipPlane_Hook(GLenum plane, const GLdouble *equation)
1334 {
1335 glClipPlane(plane, equation);
1336 PostHook(GLE_CURRENT_FUNCTION);
1337 }
1339 #undef glColor3b
1340 extern "C" { GLAPI void GLAPIENTRY glColor3b(GLbyte red, GLbyte green, GLbyte blue); }
1341 void OVR::GLEContext::glColor3b_Hook(GLbyte red, GLbyte green, GLbyte blue)
1342 {
1343 glColor3b(red, green, blue);
1344 PostHook(GLE_CURRENT_FUNCTION);
1345 }
1347 #undef glColor3bv
1348 extern "C" { GLAPI void GLAPIENTRY glColor3bv(const GLbyte *v); }
1349 void OVR::GLEContext::glColor3bv_Hook(const GLbyte *v)
1350 {
1351 glColor3bv(v);
1352 PostHook(GLE_CURRENT_FUNCTION);
1353 }
1355 #undef glColor3d
1356 extern "C" { GLAPI void GLAPIENTRY glColor3d(GLdouble red, GLdouble green, GLdouble blue); }
1357 void OVR::GLEContext::glColor3d_Hook(GLdouble red, GLdouble green, GLdouble blue)
1358 {
1359 glColor3d(red, green, blue);
1360 PostHook(GLE_CURRENT_FUNCTION);
1361 }
1363 #undef glColor3dv
1364 extern "C" { GLAPI void GLAPIENTRY glColor3dv(const GLdouble *v); }
1365 void OVR::GLEContext::glColor3dv_Hook(const GLdouble *v)
1366 {
1367 glColor3dv(v);
1368 PostHook(GLE_CURRENT_FUNCTION);
1369 }
1371 #undef glColor3f
1372 extern "C" { GLAPI void GLAPIENTRY glColor3f(GLfloat red, GLfloat green, GLfloat blue); }
1373 void OVR::GLEContext::glColor3f_Hook(GLfloat red, GLfloat green, GLfloat blue)
1374 {
1375 glColor3f(red, green, blue);
1376 PostHook(GLE_CURRENT_FUNCTION);
1377 }
1379 #undef glColor3fv
1380 extern "C" { GLAPI void GLAPIENTRY glColor3fv(const GLfloat *v); }
1381 void OVR::GLEContext::glColor3fv_Hook(const GLfloat *v)
1382 {
1383 glColor3fv(v);
1384 PostHook(GLE_CURRENT_FUNCTION);
1385 }
1387 #undef glColor3i
1388 extern "C" { GLAPI void GLAPIENTRY glColor3i(GLint red, GLint green, GLint blue); }
1389 void OVR::GLEContext::glColor3i_Hook(GLint red, GLint green, GLint blue)
1390 {
1391 glColor3i(red, green, blue);
1392 PostHook(GLE_CURRENT_FUNCTION);
1393 }
1395 #undef glColor3iv
1396 extern "C" { GLAPI void GLAPIENTRY glColor3iv(const GLint *v); }
1397 void OVR::GLEContext::glColor3iv_Hook(const GLint *v)
1398 {
1399 glColor3iv(v);
1400 PostHook(GLE_CURRENT_FUNCTION);
1401 }
1403 #undef glColor3s
1404 extern "C" { GLAPI void GLAPIENTRY glColor3s(GLshort red, GLshort green, GLshort blue); }
1405 void OVR::GLEContext::glColor3s_Hook(GLshort red, GLshort green, GLshort blue)
1406 {
1407 glColor3s(red, green, blue);
1408 PostHook(GLE_CURRENT_FUNCTION);
1409 }
1411 #undef glColor3sv
1412 extern "C" { GLAPI void GLAPIENTRY glColor3sv(const GLshort *v); }
1413 void OVR::GLEContext::glColor3sv_Hook(const GLshort *v)
1414 {
1415 glColor3sv(v);
1416 PostHook(GLE_CURRENT_FUNCTION);
1417 }
1419 #undef glColor3ub
1420 extern "C" { GLAPI void GLAPIENTRY glColor3ub(GLubyte red, GLubyte green, GLubyte blue); }
1421 void OVR::GLEContext::glColor3ub_Hook(GLubyte red, GLubyte green, GLubyte blue)
1422 {
1423 glColor3ub(red, green, blue);
1424 PostHook(GLE_CURRENT_FUNCTION);
1425 }
1427 #undef glColor3ubv
1428 extern "C" { GLAPI void GLAPIENTRY glColor3ubv(const GLubyte *v); }
1429 void OVR::GLEContext::glColor3ubv_Hook(const GLubyte *v)
1430 {
1431 glColor3ubv(v);
1432 PostHook(GLE_CURRENT_FUNCTION);
1433 }
1435 #undef glColor3ui
1436 extern "C" { GLAPI void GLAPIENTRY glColor3ui(GLuint red, GLuint green, GLuint blue); }
1437 void OVR::GLEContext::glColor3ui_Hook(GLuint red, GLuint green, GLuint blue)
1438 {
1439 glColor3ui(red, green, blue);
1440 PostHook(GLE_CURRENT_FUNCTION);
1441 }
1443 #undef glColor3uiv
1444 extern "C" { GLAPI void GLAPIENTRY glColor3uiv(const GLuint *v); }
1445 void OVR::GLEContext::glColor3uiv_Hook(const GLuint *v)
1446 {
1447 glColor3uiv(v);
1448 PostHook(GLE_CURRENT_FUNCTION);
1449 }
1451 #undef glColor3us
1452 extern "C" { GLAPI void GLAPIENTRY glColor3us(GLushort red, GLushort green, GLushort blue); }
1453 void OVR::GLEContext::glColor3us_Hook(GLushort red, GLushort green, GLushort blue)
1454 {
1455 glColor3us(red, green, blue);
1456 PostHook(GLE_CURRENT_FUNCTION);
1457 }
1459 #undef glColor3usv
1460 extern "C" { GLAPI void GLAPIENTRY glColor3usv(const GLushort *v); }
1461 void OVR::GLEContext::glColor3usv_Hook(const GLushort *v)
1462 {
1463 glColor3usv(v);
1464 PostHook(GLE_CURRENT_FUNCTION);
1465 }
1467 #undef glColor4b
1468 extern "C" { GLAPI void GLAPIENTRY glColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); }
1469 void OVR::GLEContext::glColor4b_Hook(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
1470 {
1471 glColor4b(red, green, blue, alpha);
1472 PostHook(GLE_CURRENT_FUNCTION);
1473 }
1475 #undef glColor4bv
1476 extern "C" { GLAPI void GLAPIENTRY glColor4bv(const GLbyte *v); }
1477 void OVR::GLEContext::glColor4bv_Hook(const GLbyte *v)
1478 {
1479 glColor4bv(v);
1480 PostHook(GLE_CURRENT_FUNCTION);
1481 }
1483 #undef glColor4d
1484 extern "C" { GLAPI void GLAPIENTRY glColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); }
1485 void OVR::GLEContext::glColor4d_Hook(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
1486 {
1487 glColor4d(red, green, blue, alpha);
1488 PostHook(GLE_CURRENT_FUNCTION);
1489 }
1491 #undef glColor4dv
1492 extern "C" { GLAPI void GLAPIENTRY glColor4dv(const GLdouble *v); }
1493 void OVR::GLEContext::glColor4dv_Hook(const GLdouble *v)
1494 {
1495 glColor4dv(v);
1496 PostHook(GLE_CURRENT_FUNCTION);
1497 }
1499 #undef glColor4f
1500 extern "C" { GLAPI void GLAPIENTRY glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); }
1501 void OVR::GLEContext::glColor4f_Hook(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
1502 {
1503 glColor4f(red, green, blue, alpha);
1504 PostHook(GLE_CURRENT_FUNCTION);
1505 }
1507 #undef glColor4fv
1508 extern "C" { GLAPI void GLAPIENTRY glColor4fv(const GLfloat *v); }
1509 void OVR::GLEContext::glColor4fv_Hook(const GLfloat *v)
1510 {
1511 glColor4fv(v);
1512 PostHook(GLE_CURRENT_FUNCTION);
1513 }
1515 #undef glColor4i
1516 extern "C" { GLAPI void GLAPIENTRY glColor4i(GLint red, GLint green, GLint blue, GLint alpha); }
1517 void OVR::GLEContext::glColor4i_Hook(GLint red, GLint green, GLint blue, GLint alpha)
1518 {
1519 glColor4i(red, green, blue, alpha);
1520 PostHook(GLE_CURRENT_FUNCTION);
1521 }
1523 #undef glColor4iv
1524 extern "C" { GLAPI void GLAPIENTRY glColor4iv(const GLint *v); }
1525 void OVR::GLEContext::glColor4iv_Hook(const GLint *v)
1526 {
1527 glColor4iv(v);
1528 PostHook(GLE_CURRENT_FUNCTION);
1529 }
1531 #undef glColor4s
1532 extern "C" { GLAPI void GLAPIENTRY glColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha); }
1533 void OVR::GLEContext::glColor4s_Hook(GLshort red, GLshort green, GLshort blue, GLshort alpha)
1534 {
1535 glColor4s(red, green, blue, alpha);
1536 PostHook(GLE_CURRENT_FUNCTION);
1537 }
1539 #undef glColor4sv
1540 extern "C" { GLAPI void GLAPIENTRY glColor4sv(const GLshort *v); }
1541 void OVR::GLEContext::glColor4sv_Hook(const GLshort *v)
1542 {
1543 glColor4sv(v);
1544 PostHook(GLE_CURRENT_FUNCTION);
1545 }
1547 #undef glColor4ub
1548 extern "C" { GLAPI void GLAPIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); }
1549 void OVR::GLEContext::glColor4ub_Hook(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
1550 {
1551 glColor4ub(red, green, blue, alpha);
1552 PostHook(GLE_CURRENT_FUNCTION);
1553 }
1555 #undef glColor4ubv
1556 extern "C" { GLAPI void GLAPIENTRY glColor4ubv(const GLubyte *v); }
1557 void OVR::GLEContext::glColor4ubv_Hook(const GLubyte *v)
1558 {
1559 glColor4ubv(v);
1560 PostHook(GLE_CURRENT_FUNCTION);
1561 }
1563 #undef glColor4ui
1564 extern "C" { GLAPI void GLAPIENTRY glColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha); }
1565 void OVR::GLEContext::glColor4ui_Hook(GLuint red, GLuint green, GLuint blue, GLuint alpha)
1566 {
1567 glColor4ui(red, green, blue, alpha);
1568 PostHook(GLE_CURRENT_FUNCTION);
1569 }
1571 #undef glColor4uiv
1572 extern "C" { GLAPI void GLAPIENTRY glColor4uiv(const GLuint *v); }
1573 void OVR::GLEContext::glColor4uiv_Hook(const GLuint *v)
1574 {
1575 glColor4uiv(v);
1576 PostHook(GLE_CURRENT_FUNCTION);
1577 }
1579 #undef glColor4us
1580 extern "C" { GLAPI void GLAPIENTRY glColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha); }
1581 void OVR::GLEContext::glColor4us_Hook(GLushort red, GLushort green, GLushort blue, GLushort alpha)
1582 {
1583 glColor4us(red, green, blue, alpha);
1584 PostHook(GLE_CURRENT_FUNCTION);
1585 }
1587 #undef glColor4usv
1588 extern "C" { GLAPI void GLAPIENTRY glColor4usv(const GLushort *v); }
1589 void OVR::GLEContext::glColor4usv_Hook(const GLushort *v)
1590 {
1591 glColor4usv(v);
1592 PostHook(GLE_CURRENT_FUNCTION);
1593 }
1595 #undef glColorMask
1596 extern "C" { GLAPI void GLAPIENTRY glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); }
1597 void OVR::GLEContext::glColorMask_Hook(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
1598 {
1599 glColorMask(red, green, blue, alpha);
1600 PostHook(GLE_CURRENT_FUNCTION);
1601 }
1603 #undef glColorMaterial
1604 extern "C" { GLAPI void GLAPIENTRY glColorMaterial(GLenum face, GLenum mode); }
1605 void OVR::GLEContext::glColorMaterial_Hook(GLenum face, GLenum mode)
1606 {
1607 glColorMaterial(face, mode);
1608 PostHook(GLE_CURRENT_FUNCTION);
1609 }
1611 #undef glColorPointer
1612 extern "C" { GLAPI void GLAPIENTRY glColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer); }
1613 void OVR::GLEContext::glColorPointer_Hook(GLint size, GLenum type, GLsizei stride, const void *pointer)
1614 {
1615 glColorPointer(size, type, stride, pointer);
1616 PostHook(GLE_CURRENT_FUNCTION);
1617 }
1619 #undef glCopyPixels
1620 extern "C" { GLAPI void GLAPIENTRY glCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type); }
1621 void OVR::GLEContext::glCopyPixels_Hook(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
1622 {
1623 glCopyPixels(x, y, width, height, type);
1624 PostHook(GLE_CURRENT_FUNCTION);
1625 }
1627 #undef glCopyTexImage1D
1628 extern "C" { GLAPI void GLAPIENTRY glCopyTexImage1D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border); }
1629 void OVR::GLEContext::glCopyTexImage1D_Hook(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border)
1630 {
1631 glCopyTexImage1D(target, level, internalFormat, x, y, width, border);
1632 PostHook(GLE_CURRENT_FUNCTION);
1633 }
1635 #undef glCopyTexImage2D
1636 extern "C" { GLAPI void GLAPIENTRY glCopyTexImage2D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); }
1637 void OVR::GLEContext::glCopyTexImage2D_Hook(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
1638 {
1639 glCopyTexImage2D(target, level, internalFormat, x, y, width, height, border);
1640 PostHook(GLE_CURRENT_FUNCTION);
1641 }
1643 #undef glCopyTexSubImage1D
1644 extern "C" { GLAPI void GLAPIENTRY glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); }
1645 void OVR::GLEContext::glCopyTexSubImage1D_Hook(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
1646 {
1647 glCopyTexSubImage1D(target, level, xoffset, x, y, width);
1648 PostHook(GLE_CURRENT_FUNCTION);
1649 }
1651 #undef glCopyTexSubImage2D
1652 extern "C" { GLAPI void GLAPIENTRY glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); }
1653 void OVR::GLEContext::glCopyTexSubImage2D_Hook(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
1654 {
1655 glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
1656 PostHook(GLE_CURRENT_FUNCTION);
1657 }
1659 #undef glCullFace
1660 extern "C" { GLAPI void GLAPIENTRY glCullFace(GLenum mode); }
1661 void OVR::GLEContext::glCullFace_Hook(GLenum mode)
1662 {
1663 glCullFace(mode);
1664 PostHook(GLE_CURRENT_FUNCTION);
1665 }
1667 #undef glDeleteLists
1668 extern "C" { GLAPI void GLAPIENTRY glDeleteLists(GLuint list, GLsizei range); }
1669 void OVR::GLEContext::glDeleteLists_Hook(GLuint list, GLsizei range)
1670 {
1671 glDeleteLists(list, range);
1672 PostHook(GLE_CURRENT_FUNCTION);
1673 }
1675 #undef glDeleteTextures
1676 extern "C" { GLAPI void GLAPIENTRY glDeleteTextures(GLsizei n, const GLuint *textures); }
1677 void OVR::GLEContext::glDeleteTextures_Hook(GLsizei n, const GLuint *textures)
1678 {
1679 glDeleteTextures(n, textures);
1680 PostHook(GLE_CURRENT_FUNCTION);
1681 }
1683 #undef glDepthFunc
1684 extern "C" { GLAPI void GLAPIENTRY glDepthFunc(GLenum func); }
1685 void OVR::GLEContext::glDepthFunc_Hook(GLenum func)
1686 {
1687 glDepthFunc(func);
1688 PostHook(GLE_CURRENT_FUNCTION);
1689 }
1691 #undef glDepthMask
1692 extern "C" { GLAPI void GLAPIENTRY glDepthMask(GLboolean flag); }
1693 void OVR::GLEContext::glDepthMask_Hook(GLboolean flag)
1694 {
1695 glDepthMask(flag);
1696 PostHook(GLE_CURRENT_FUNCTION);
1697 }
1699 #undef glDepthRange
1700 extern "C" { GLAPI void GLAPIENTRY glDepthRange(GLclampd zNear, GLclampd zFar); }
1701 void OVR::GLEContext::glDepthRange_Hook(GLclampd zNear, GLclampd zFar)
1702 {
1703 glDepthRange(zNear, zFar);
1704 PostHook(GLE_CURRENT_FUNCTION);
1705 }
1707 #undef glDisable
1708 extern "C" { GLAPI void GLAPIENTRY glDisable(GLenum cap); }
1709 void OVR::GLEContext::glDisable_Hook(GLenum cap)
1710 {
1711 glDisable(cap);
1712 PostHook(GLE_CURRENT_FUNCTION);
1713 }
1715 #undef glDisableClientState
1716 extern "C" { GLAPI void GLAPIENTRY glDisableClientState(GLenum array); }
1717 void OVR::GLEContext::glDisableClientState_Hook(GLenum array)
1718 {
1719 glDisableClientState(array);
1720 PostHook(GLE_CURRENT_FUNCTION);
1721 }
1723 #undef glDrawArrays
1724 extern "C" { GLAPI void GLAPIENTRY glDrawArrays(GLenum mode, GLint first, GLsizei count); }
1725 void OVR::GLEContext::glDrawArrays_Hook(GLenum mode, GLint first, GLsizei count)
1726 {
1727 glDrawArrays(mode, first, count);
1728 PostHook(GLE_CURRENT_FUNCTION);
1729 }
1731 #undef glDrawBuffer
1732 extern "C" { GLAPI void GLAPIENTRY glDrawBuffer(GLenum mode); }
1733 void OVR::GLEContext::glDrawBuffer_Hook(GLenum mode)
1734 {
1735 glDrawBuffer(mode);
1736 PostHook(GLE_CURRENT_FUNCTION);
1737 }
1739 #undef glDrawElements
1740 extern "C" { GLAPI void GLAPIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices); }
1741 void OVR::GLEContext::glDrawElements_Hook(GLenum mode, GLsizei count, GLenum type, const void *indices)
1742 {
1743 glDrawElements(mode, count, type, indices);
1744 PostHook(GLE_CURRENT_FUNCTION);
1745 }
1747 #undef glDrawPixels
1748 extern "C" { GLAPI void GLAPIENTRY glDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); }
1749 void OVR::GLEContext::glDrawPixels_Hook(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
1750 {
1751 glDrawPixels(width, height, format, type, pixels);
1752 PostHook(GLE_CURRENT_FUNCTION);
1753 }
1755 #undef glEdgeFlag
1756 extern "C" { GLAPI void GLAPIENTRY glEdgeFlag(GLboolean flag); }
1757 void OVR::GLEContext::glEdgeFlag_Hook(GLboolean flag)
1758 {
1759 glEdgeFlag(flag);
1760 PostHook(GLE_CURRENT_FUNCTION);
1761 }
1763 #undef glEdgeFlagPointer
1764 extern "C" { GLAPI void GLAPIENTRY glEdgeFlagPointer(GLsizei stride, const void *pointer); }
1765 void OVR::GLEContext::glEdgeFlagPointer_Hook(GLsizei stride, const void *pointer)
1766 {
1767 glEdgeFlagPointer(stride, pointer);
1768 PostHook(GLE_CURRENT_FUNCTION);
1769 }
1771 #undef glEdgeFlagv
1772 extern "C" { GLAPI void GLAPIENTRY glEdgeFlagv(const GLboolean *flag); }
1773 void OVR::GLEContext::glEdgeFlagv_Hook(const GLboolean *flag)
1774 {
1775 glEdgeFlagv(flag);
1776 PostHook(GLE_CURRENT_FUNCTION);
1777 }
1779 #undef glEnable
1780 extern "C" { GLAPI void GLAPIENTRY glEnable(GLenum cap); }
1781 namespace OVR {
1782 void GLEContext::glEnable_Hook(GLenum cap)
1783 {
1784 glEnable(cap);
1785 PostHook(GLE_CURRENT_FUNCTION);
1786 }
1787 }
1789 #undef glEnableClientState
1790 extern "C" { GLAPI void GLAPIENTRY glEnableClientState(GLenum array); }
1791 void OVR::GLEContext::glEnableClientState_Hook(GLenum array)
1792 {
1793 glEnableClientState(array);
1794 PostHook(GLE_CURRENT_FUNCTION);
1795 }
1797 #undef glEnd
1798 extern "C" { GLAPI void GLAPIENTRY glEnd(); }
1799 void OVR::GLEContext::glEnd_Hook()
1800 {
1801 glEnd();
1802 PostHook(GLE_CURRENT_FUNCTION);
1803 }
1805 #undef glEndList
1806 extern "C" { GLAPI void GLAPIENTRY glEndList(); }
1807 void OVR::GLEContext::glEndList_Hook()
1808 {
1809 glEndList();
1810 PostHook(GLE_CURRENT_FUNCTION);
1811 }
1813 #undef glEvalCoord1d
1814 extern "C" { GLAPI void GLAPIENTRY glEvalCoord1d(GLdouble u); }
1815 void OVR::GLEContext::glEvalCoord1d_Hook(GLdouble u)
1816 {
1817 glEvalCoord1d(u);
1818 PostHook(GLE_CURRENT_FUNCTION);
1819 }
1821 #undef glEvalCoord1dv
1822 extern "C" { GLAPI void GLAPIENTRY glEvalCoord1dv(const GLdouble *u); }
1823 void OVR::GLEContext::glEvalCoord1dv_Hook(const GLdouble *u)
1824 {
1825 glEvalCoord1dv(u);
1826 PostHook(GLE_CURRENT_FUNCTION);
1827 }
1829 #undef glEvalCoord1f
1830 extern "C" { GLAPI void GLAPIENTRY glEvalCoord1f(GLfloat u); }
1831 void OVR::GLEContext::glEvalCoord1f_Hook(GLfloat u)
1832 {
1833 glEvalCoord1f(u);
1834 PostHook(GLE_CURRENT_FUNCTION);
1835 }
1837 #undef glEvalCoord1fv
1838 extern "C" { GLAPI void GLAPIENTRY glEvalCoord1fv(const GLfloat *u); }
1839 void OVR::GLEContext::glEvalCoord1fv_Hook(const GLfloat *u)
1840 {
1841 glEvalCoord1fv(u);
1842 PostHook(GLE_CURRENT_FUNCTION);
1843 }
1845 #undef glEvalCoord2d
1846 extern "C" { GLAPI void GLAPIENTRY glEvalCoord2d(GLdouble u, GLdouble v); }
1847 void OVR::GLEContext::glEvalCoord2d_Hook(GLdouble u, GLdouble v)
1848 {
1849 glEvalCoord2d(u, v);
1850 PostHook(GLE_CURRENT_FUNCTION);
1851 }
1853 #undef glEvalCoord2dv
1854 extern "C" { GLAPI void GLAPIENTRY glEvalCoord2dv(const GLdouble *u); }
1855 void OVR::GLEContext::glEvalCoord2dv_Hook(const GLdouble *u)
1856 {
1857 glEvalCoord2dv(u);
1858 PostHook(GLE_CURRENT_FUNCTION);
1859 }
1861 #undef glEvalCoord2f
1862 extern "C" { GLAPI void GLAPIENTRY glEvalCoord2f(GLfloat u, GLfloat v); }
1863 void OVR::GLEContext::glEvalCoord2f_Hook(GLfloat u, GLfloat v)
1864 {
1865 glEvalCoord2f(u, v);
1866 PostHook(GLE_CURRENT_FUNCTION);
1867 }
1869 #undef glEvalCoord2fv
1870 extern "C" { GLAPI void GLAPIENTRY glEvalCoord2fv(const GLfloat *u); }
1871 void OVR::GLEContext::glEvalCoord2fv_Hook(const GLfloat *u)
1872 {
1873 glEvalCoord2fv(u);
1874 PostHook(GLE_CURRENT_FUNCTION);
1875 }
1877 #undef glEvalMesh1
1878 extern "C" { GLAPI void GLAPIENTRY glEvalMesh1(GLenum mode, GLint i1, GLint i2); }
1879 void OVR::GLEContext::glEvalMesh1_Hook(GLenum mode, GLint i1, GLint i2)
1880 {
1881 glEvalMesh1(mode, i1, i2);
1882 PostHook(GLE_CURRENT_FUNCTION);
1883 }
1885 #undef glEvalMesh2
1886 extern "C" { GLAPI void GLAPIENTRY glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); }
1887 void OVR::GLEContext::glEvalMesh2_Hook(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
1888 {
1889 glEvalMesh2(mode, i1, i2, j1, j2);
1890 PostHook(GLE_CURRENT_FUNCTION);
1891 }
1893 #undef glEvalPoint1
1894 extern "C" { GLAPI void GLAPIENTRY glEvalPoint1(GLint i); }
1895 void OVR::GLEContext::glEvalPoint1_Hook(GLint i)
1896 {
1897 glEvalPoint1(i);
1898 PostHook(GLE_CURRENT_FUNCTION);
1899 }
1901 #undef glEvalPoint2
1902 extern "C" { GLAPI void GLAPIENTRY glEvalPoint2(GLint i, GLint j); }
1903 void OVR::GLEContext::glEvalPoint2_Hook(GLint i, GLint j)
1904 {
1905 glEvalPoint2(i, j);
1906 PostHook(GLE_CURRENT_FUNCTION);
1907 }
1909 #undef glFeedbackBuffer
1910 extern "C" { GLAPI void GLAPIENTRY glFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer); }
1911 void OVR::GLEContext::glFeedbackBuffer_Hook(GLsizei size, GLenum type, GLfloat *buffer)
1912 {
1913 glFeedbackBuffer(size, type, buffer);
1914 PostHook(GLE_CURRENT_FUNCTION);
1915 }
1917 #undef glFinish
1918 extern "C" { GLAPI void GLAPIENTRY glFinish(); }
1919 void OVR::GLEContext::glFinish_Hook()
1920 {
1921 glFinish();
1922 PostHook(GLE_CURRENT_FUNCTION);
1923 }
1925 #undef glFlush
1926 extern "C" { GLAPI void GLAPIENTRY glFlush(); }
1927 void OVR::GLEContext::glFlush_Hook()
1928 {
1929 glFlush();
1930 PostHook(GLE_CURRENT_FUNCTION);
1931 }
1933 #undef glFogf
1934 extern "C" { GLAPI void GLAPIENTRY glFogf(GLenum pname, GLfloat param); }
1935 void OVR::GLEContext::glFogf_Hook(GLenum pname, GLfloat param)
1936 {
1937 glFogf(pname, param);
1938 PostHook(GLE_CURRENT_FUNCTION);
1939 }
1941 #undef glFogfv
1942 extern "C" { GLAPI void GLAPIENTRY glFogfv(GLenum pname, const GLfloat *params); }
1943 void OVR::GLEContext::glFogfv_Hook(GLenum pname, const GLfloat *params)
1944 {
1945 glFogfv(pname, params);
1946 PostHook(GLE_CURRENT_FUNCTION);
1947 }
1949 #undef glFogi
1950 extern "C" { GLAPI void GLAPIENTRY glFogi(GLenum pname, GLint param); }
1951 void OVR::GLEContext::glFogi_Hook(GLenum pname, GLint param)
1952 {
1953 glFogi(pname, param);
1954 PostHook(GLE_CURRENT_FUNCTION);
1955 }
1957 #undef glFogiv
1958 extern "C" { GLAPI void GLAPIENTRY glFogiv(GLenum pname, const GLint *params); }
1959 void OVR::GLEContext::glFogiv_Hook(GLenum pname, const GLint *params)
1960 {
1961 glFogiv(pname, params);
1962 PostHook(GLE_CURRENT_FUNCTION);
1963 }
1965 #undef glFrontFace
1966 extern "C" { GLAPI void GLAPIENTRY glFrontFace(GLenum mode); }
1967 void OVR::GLEContext::glFrontFace_Hook(GLenum mode)
1968 {
1969 glFrontFace(mode);
1970 PostHook(GLE_CURRENT_FUNCTION);
1971 }
1973 #undef glFrustum
1974 extern "C" { GLAPI void GLAPIENTRY glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); }
1975 void OVR::GLEContext::glFrustum_Hook(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
1976 {
1977 glFrustum(left, right, bottom, top, zNear, zFar);
1978 PostHook(GLE_CURRENT_FUNCTION);
1979 }
1981 #undef glGenLists
1982 extern "C" { GLAPI GLuint GLAPIENTRY glGenLists(GLsizei range); }
1983 GLuint OVR::GLEContext::glGenLists_Hook(GLsizei range)
1984 {
1985 GLuint u = glGenLists(range);
1986 PostHook(GLE_CURRENT_FUNCTION);
1987 return u;
1988 }
1990 #undef glGenTextures
1991 extern "C" { GLAPI void GLAPIENTRY glGenTextures(GLsizei n, GLuint *textures); }
1992 void OVR::GLEContext::glGenTextures_Hook(GLsizei n, GLuint *textures)
1993 {
1994 glGenTextures(n, textures);
1995 PostHook(GLE_CURRENT_FUNCTION);
1996 }
1998 #undef glGetBooleanv
1999 extern "C" { GLAPI void GLAPIENTRY glGetBooleanv(GLenum pname, GLboolean *params); }
2000 void OVR::GLEContext::glGetBooleanv_Hook(GLenum pname, GLboolean *params)
2001 {
2002 glGetBooleanv(pname, params);
2003 PostHook(GLE_CURRENT_FUNCTION);
2004 }
2006 #undef glGetClipPlane
2007 extern "C" { GLAPI void GLAPIENTRY glGetClipPlane(GLenum plane, GLdouble *equation); }
2008 void OVR::GLEContext::glGetClipPlane_Hook(GLenum plane, GLdouble *equation)
2009 {
2010 glGetClipPlane(plane, equation);
2011 PostHook(GLE_CURRENT_FUNCTION);
2012 }
2014 #undef glGetDoublev
2015 extern "C" { GLAPI void GLAPIENTRY glGetDoublev(GLenum pname, GLdouble *params); }
2016 void OVR::GLEContext::glGetDoublev_Hook(GLenum pname, GLdouble *params)
2017 {
2018 glGetDoublev(pname, params);
2019 PostHook(GLE_CURRENT_FUNCTION);
2020 }
2022 //#undef glGetError Not needed because we happen to do this above already.
2023 //extern "C" { GLAPI GLenum GLAPIENTRY glGetError(); }
2024 GLenum OVR::GLEContext::glGetError_Hook()
2025 {
2026 GLenum e = glGetError();
2027 PostHook(GLE_CURRENT_FUNCTION);
2028 return e;
2029 }
2031 #undef glGetFloatv
2032 extern "C" { GLAPI void GLAPIENTRY glGetFloatv(GLenum pname, GLfloat *params); }
2033 void OVR::GLEContext::glGetFloatv_Hook(GLenum pname, GLfloat *params)
2034 {
2035 glGetFloatv(pname, params);
2036 PostHook(GLE_CURRENT_FUNCTION);
2037 }
2039 #undef glGetIntegerv
2040 extern "C" { GLAPI void GLAPIENTRY glGetIntegerv(GLenum pname, GLint *params); }
2041 void OVR::GLEContext::glGetIntegerv_Hook(GLenum pname, GLint *params)
2042 {
2043 glGetIntegerv(pname, params);
2044 PostHook(GLE_CURRENT_FUNCTION);
2045 }
2047 #undef glGetLightfv
2048 extern "C" { GLAPI void GLAPIENTRY glGetLightfv(GLenum light, GLenum pname, GLfloat *params); }
2049 void OVR::GLEContext::glGetLightfv_Hook(GLenum light, GLenum pname, GLfloat *params)
2050 {
2051 glGetLightfv(light, pname, params);
2052 PostHook(GLE_CURRENT_FUNCTION);
2053 }
2055 #undef glGetLightiv
2056 extern "C" { GLAPI void GLAPIENTRY glGetLightiv(GLenum light, GLenum pname, GLint *params); }
2057 void OVR::GLEContext::glGetLightiv_Hook(GLenum light, GLenum pname, GLint *params)
2058 {
2059 glGetLightiv(light, pname, params);
2060 PostHook(GLE_CURRENT_FUNCTION);
2061 }
2063 #undef glGetMapdv
2064 extern "C" { GLAPI void GLAPIENTRY glGetMapdv(GLenum target, GLenum query, GLdouble *v); }
2065 void OVR::GLEContext::glGetMapdv_Hook(GLenum target, GLenum query, GLdouble *v)
2066 {
2067 glGetMapdv(target, query, v);
2068 PostHook(GLE_CURRENT_FUNCTION);
2069 }
2071 #undef glGetMapfv
2072 extern "C" { GLAPI void GLAPIENTRY glGetMapfv(GLenum target, GLenum query, GLfloat *v); }
2073 void OVR::GLEContext::glGetMapfv_Hook(GLenum target, GLenum query, GLfloat *v)
2074 {
2075 glGetMapfv(target, query, v);
2076 PostHook(GLE_CURRENT_FUNCTION);
2077 }
2079 #undef glGetMapiv
2080 extern "C" { GLAPI void GLAPIENTRY glGetMapiv(GLenum target, GLenum query, GLint *v); }
2081 void OVR::GLEContext::glGetMapiv_Hook(GLenum target, GLenum query, GLint *v)
2082 {
2083 glGetMapiv(target, query, v);
2084 PostHook(GLE_CURRENT_FUNCTION);
2085 }
2087 #undef glGetMaterialfv
2088 extern "C" { GLAPI void GLAPIENTRY glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params); }
2089 void OVR::GLEContext::glGetMaterialfv_Hook(GLenum face, GLenum pname, GLfloat *params)
2090 {
2091 glGetMaterialfv(face, pname, params);
2092 PostHook(GLE_CURRENT_FUNCTION);
2093 }
2095 #undef glGetMaterialiv
2096 extern "C" { GLAPI void GLAPIENTRY glGetMaterialiv(GLenum face, GLenum pname, GLint *params); }
2097 void OVR::GLEContext::glGetMaterialiv_Hook(GLenum face, GLenum pname, GLint *params)
2098 {
2099 glGetMaterialiv(face, pname, params);
2100 PostHook(GLE_CURRENT_FUNCTION);
2101 }
2103 #undef glGetPixelMapfv
2104 extern "C" { GLAPI void GLAPIENTRY glGetPixelMapfv(GLenum map, GLfloat *values); }
2105 void OVR::GLEContext::glGetPixelMapfv_Hook(GLenum map, GLfloat *values)
2106 {
2107 glGetPixelMapfv(map, values);
2108 PostHook(GLE_CURRENT_FUNCTION);
2109 }
2111 #undef glGetPixelMapuiv
2112 extern "C" { GLAPI void GLAPIENTRY glGetPixelMapuiv(GLenum map, GLuint *values); }
2113 void OVR::GLEContext::glGetPixelMapuiv_Hook(GLenum map, GLuint *values)
2114 {
2115 glGetPixelMapuiv(map, values);
2116 PostHook(GLE_CURRENT_FUNCTION);
2117 }
2119 #undef glGetPixelMapusv
2120 extern "C" { GLAPI void GLAPIENTRY glGetPixelMapusv(GLenum map, GLushort *values); }
2121 void OVR::GLEContext::glGetPixelMapusv_Hook(GLenum map, GLushort *values)
2122 {
2123 glGetPixelMapusv(map, values);
2124 PostHook(GLE_CURRENT_FUNCTION);
2125 }
2127 #undef glGetPointerv
2128 extern "C" { GLAPI void GLAPIENTRY glGetPointerv(GLenum pname, void* *params); }
2129 void OVR::GLEContext::glGetPointerv_Hook(GLenum pname, void* *params)
2130 {
2131 glGetPointerv(pname, params);
2132 PostHook(GLE_CURRENT_FUNCTION);
2133 }
2135 #undef glGetPolygonStipple
2136 extern "C" { GLAPI void GLAPIENTRY glGetPolygonStipple(GLubyte *mask); }
2137 void OVR::GLEContext::glGetPolygonStipple_Hook(GLubyte *mask)
2138 {
2139 glGetPolygonStipple(mask);
2140 PostHook(GLE_CURRENT_FUNCTION);
2141 }
2143 // #undef glGetString // This was already disabled above.
2144 // extern "C" { GLAPI const GLubyte * GLAPIENTRY glGetString(GLenum name); }
2145 const GLubyte * OVR::GLEContext::glGetString_Hook(GLenum name)
2146 {
2147 const GLubyte * p = glGetString(name);
2148 PostHook(GLE_CURRENT_FUNCTION);
2149 return p;
2150 }
2152 #undef glGetTexEnvfv
2153 extern "C" { GLAPI void GLAPIENTRY glGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params); }
2154 void OVR::GLEContext::glGetTexEnvfv_Hook(GLenum target, GLenum pname, GLfloat *params)
2155 {
2156 glGetTexEnvfv(target, pname, params);
2157 PostHook(GLE_CURRENT_FUNCTION);
2158 }
2160 #undef glGetTexEnviv
2161 extern "C" { GLAPI void GLAPIENTRY glGetTexEnviv(GLenum target, GLenum pname, GLint *params); }
2162 void OVR::GLEContext::glGetTexEnviv_Hook(GLenum target, GLenum pname, GLint *params)
2163 {
2164 glGetTexEnviv(target, pname, params);
2165 PostHook(GLE_CURRENT_FUNCTION);
2166 }
2168 #undef glGetTexGendv
2169 extern "C" { GLAPI void GLAPIENTRY glGetTexGendv(GLenum coord, GLenum pname, GLdouble *params); }
2170 void OVR::GLEContext::glGetTexGendv_Hook(GLenum coord, GLenum pname, GLdouble *params)
2171 {
2172 glGetTexGendv(coord, pname, params);
2173 PostHook(GLE_CURRENT_FUNCTION);
2174 }
2176 #undef glGetTexGenfv
2177 extern "C" { GLAPI void GLAPIENTRY glGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params); }
2178 void OVR::GLEContext::glGetTexGenfv_Hook(GLenum coord, GLenum pname, GLfloat *params)
2179 {
2180 glGetTexGenfv(coord, pname, params);
2181 PostHook(GLE_CURRENT_FUNCTION);
2182 }
2184 #undef glGetTexGeniv
2185 extern "C" { GLAPI void GLAPIENTRY glGetTexGeniv(GLenum coord, GLenum pname, GLint *params); }
2186 void OVR::GLEContext::glGetTexGeniv_Hook(GLenum coord, GLenum pname, GLint *params)
2187 {
2188 glGetTexGeniv(coord, pname, params);
2189 PostHook(GLE_CURRENT_FUNCTION);
2190 }
2192 #undef glGetTexImage
2193 extern "C" { GLAPI void GLAPIENTRY glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels); }
2194 void OVR::GLEContext::glGetTexImage_Hook(GLenum target, GLint level, GLenum format, GLenum type, void *pixels)
2195 {
2196 glGetTexImage(target, level, format, type, pixels);
2197 PostHook(GLE_CURRENT_FUNCTION);
2198 }
2200 #undef glGetTexLevelParameterfv
2201 extern "C" { GLAPI void GLAPIENTRY glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params); }
2202 void OVR::GLEContext::glGetTexLevelParameterfv_Hook(GLenum target, GLint level, GLenum pname, GLfloat *params)
2203 {
2204 glGetTexLevelParameterfv(target, level, pname, params);
2205 PostHook(GLE_CURRENT_FUNCTION);
2206 }
2208 #undef glGetTexLevelParameteriv
2209 extern "C" { GLAPI void GLAPIENTRY glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params); }
2210 void OVR::GLEContext::glGetTexLevelParameteriv_Hook(GLenum target, GLint level, GLenum pname, GLint *params)
2211 {
2212 glGetTexLevelParameteriv(target, level, pname, params);
2213 PostHook(GLE_CURRENT_FUNCTION);
2214 }
2216 #undef glGetTexParameterfv
2217 extern "C" { GLAPI void GLAPIENTRY glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params); }
2218 void OVR::GLEContext::glGetTexParameterfv_Hook(GLenum target, GLenum pname, GLfloat *params)
2219 {
2220 glGetTexParameterfv(target, pname, params);
2221 PostHook(GLE_CURRENT_FUNCTION);
2222 }
2224 #undef glGetTexParameteriv
2225 extern "C" { GLAPI void GLAPIENTRY glGetTexParameteriv(GLenum target, GLenum pname, GLint *params); }
2226 void OVR::GLEContext::glGetTexParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
2227 {
2228 glGetTexParameteriv(target, pname, params);
2229 PostHook(GLE_CURRENT_FUNCTION);
2230 }
2232 #undef glHint
2233 extern "C" { GLAPI void GLAPIENTRY glHint(GLenum target, GLenum mode); }
2234 void OVR::GLEContext::glHint_Hook(GLenum target, GLenum mode)
2235 {
2236 glHint(target, mode);
2237 PostHook(GLE_CURRENT_FUNCTION);
2238 }
2240 #undef glIndexMask
2241 extern "C" { GLAPI void GLAPIENTRY glIndexMask(GLuint mask); }
2242 void OVR::GLEContext::glIndexMask_Hook(GLuint mask)
2243 {
2244 glIndexMask(mask);
2245 PostHook(GLE_CURRENT_FUNCTION);
2246 }
2248 #undef glIndexPointer
2249 extern "C" { GLAPI void GLAPIENTRY glIndexPointer(GLenum type, GLsizei stride, const void *pointer); }
2250 void OVR::GLEContext::glIndexPointer_Hook(GLenum type, GLsizei stride, const void *pointer)
2251 {
2252 glIndexPointer(type, stride, pointer);
2253 PostHook(GLE_CURRENT_FUNCTION);
2254 }
2256 #undef glIndexd
2257 extern "C" { GLAPI void GLAPIENTRY glIndexd(GLdouble c); }
2258 void OVR::GLEContext::glIndexd_Hook(GLdouble c)
2259 {
2260 glIndexd(c);
2261 PostHook(GLE_CURRENT_FUNCTION);
2262 }
2264 #undef glIndexdv
2265 extern "C" { GLAPI void GLAPIENTRY glIndexdv(const GLdouble *c); }
2266 void OVR::GLEContext::glIndexdv_Hook(const GLdouble *c)
2267 {
2268 glIndexdv(c);
2269 PostHook(GLE_CURRENT_FUNCTION);
2270 }
2272 #undef glIndexf
2273 extern "C" { GLAPI void GLAPIENTRY glIndexf(GLfloat c); }
2274 void OVR::GLEContext::glIndexf_Hook(GLfloat c)
2275 {
2276 glIndexf(c);
2277 PostHook(GLE_CURRENT_FUNCTION);
2278 }
2280 #undef glIndexfv
2281 extern "C" { GLAPI void GLAPIENTRY glIndexfv(const GLfloat *c); }
2282 void OVR::GLEContext::glIndexfv_Hook(const GLfloat *c)
2283 {
2284 glIndexfv(c);
2285 PostHook(GLE_CURRENT_FUNCTION);
2286 }
2288 #undef glIndexi
2289 extern "C" { GLAPI void GLAPIENTRY glIndexi(GLint c); }
2290 void OVR::GLEContext::glIndexi_Hook(GLint c)
2291 {
2292 glIndexi(c);
2293 PostHook(GLE_CURRENT_FUNCTION);
2294 }
2296 #undef glIndexiv
2297 extern "C" { GLAPI void GLAPIENTRY glIndexiv(const GLint *c); }
2298 void OVR::GLEContext::glIndexiv_Hook(const GLint *c)
2299 {
2300 glIndexiv(c);
2301 PostHook(GLE_CURRENT_FUNCTION);
2302 }
2304 #undef glIndexs
2305 extern "C" { GLAPI void GLAPIENTRY glIndexs(GLshort c); }
2306 void OVR::GLEContext::glIndexs_Hook(GLshort c)
2307 {
2308 glIndexs(c);
2309 PostHook(GLE_CURRENT_FUNCTION);
2310 }
2312 #undef glIndexsv
2313 extern "C" { GLAPI void GLAPIENTRY glIndexsv(const GLshort *c); }
2314 void OVR::GLEContext::glIndexsv_Hook(const GLshort *c)
2315 {
2316 glIndexsv(c);
2317 PostHook(GLE_CURRENT_FUNCTION);
2318 }
2320 #undef glIndexub
2321 extern "C" { GLAPI void GLAPIENTRY glIndexub(GLubyte c); }
2322 void OVR::GLEContext::glIndexub_Hook(GLubyte c)
2323 {
2324 glIndexub(c);
2325 PostHook(GLE_CURRENT_FUNCTION);
2326 }
2328 #undef glIndexubv
2329 extern "C" { GLAPI void GLAPIENTRY glIndexubv(const GLubyte *c); }
2330 void OVR::GLEContext::glIndexubv_Hook(const GLubyte *c)
2331 {
2332 glIndexubv(c);
2333 PostHook(GLE_CURRENT_FUNCTION);
2334 }
2336 #undef glInitNames
2337 extern "C" { GLAPI void GLAPIENTRY glInitNames(); }
2338 void OVR::GLEContext::glInitNames_Hook()
2339 {
2340 glInitNames();
2341 PostHook(GLE_CURRENT_FUNCTION);
2342 }
2344 #undef glInterleavedArrays
2345 extern "C" { GLAPI void GLAPIENTRY glInterleavedArrays(GLenum format, GLsizei stride, const void *pointer); }
2346 void OVR::GLEContext::glInterleavedArrays_Hook(GLenum format, GLsizei stride, const void *pointer)
2347 {
2348 glInterleavedArrays(format, stride, pointer);
2349 PostHook(GLE_CURRENT_FUNCTION);
2350 }
2352 #undef glIsEnabled
2353 extern "C" { GLAPI GLboolean GLAPIENTRY glIsEnabled(GLenum cap); }
2354 GLboolean OVR::GLEContext::glIsEnabled_Hook(GLenum cap)
2355 {
2356 GLboolean b = glIsEnabled(cap);
2357 PostHook(GLE_CURRENT_FUNCTION);
2358 return b;
2359 }
2361 #undef glIsList
2362 extern "C" { GLAPI GLboolean GLAPIENTRY glIsList(GLuint list); }
2363 GLboolean OVR::GLEContext::glIsList_Hook(GLuint list)
2364 {
2365 GLboolean b = glIsList(list);
2366 PostHook(GLE_CURRENT_FUNCTION);
2367 return b;
2368 }
2370 #undef glIsTexture
2371 extern "C" { GLAPI GLboolean GLAPIENTRY glIsTexture(GLuint texture); }
2372 GLboolean OVR::GLEContext::glIsTexture_Hook(GLuint texture)
2373 {
2374 GLboolean b = glIsTexture(texture);
2375 PostHook(GLE_CURRENT_FUNCTION);
2376 return b;
2377 }
2379 #undef glLightModelf
2380 extern "C" { GLAPI void GLAPIENTRY glLightModelf(GLenum pname, GLfloat param); }
2381 void OVR::GLEContext::glLightModelf_Hook(GLenum pname, GLfloat param)
2382 {
2383 glLightModelf(pname, param);
2384 PostHook(GLE_CURRENT_FUNCTION);
2385 }
2387 #undef glLightModelfv
2388 extern "C" { GLAPI void GLAPIENTRY glLightModelfv(GLenum pname, const GLfloat *params); }
2389 void OVR::GLEContext::glLightModelfv_Hook(GLenum pname, const GLfloat *params)
2390 {
2391 glLightModelfv(pname, params);
2392 PostHook(GLE_CURRENT_FUNCTION);
2393 }
2395 #undef glLightModeli
2396 extern "C" { GLAPI void GLAPIENTRY glLightModeli(GLenum pname, GLint param); }
2397 void OVR::GLEContext::glLightModeli_Hook(GLenum pname, GLint param)
2398 {
2399 glLightModeli(pname, param);
2400 PostHook(GLE_CURRENT_FUNCTION);
2401 }
2403 #undef glLightModeliv
2404 extern "C" { GLAPI void GLAPIENTRY glLightModeliv(GLenum pname, const GLint *params); }
2405 void OVR::GLEContext::glLightModeliv_Hook(GLenum pname, const GLint *params)
2406 {
2407 glLightModeliv(pname, params);
2408 PostHook(GLE_CURRENT_FUNCTION);
2409 }
2411 #undef glLightf
2412 extern "C" { GLAPI void GLAPIENTRY glLightf(GLenum light, GLenum pname, GLfloat param); }
2413 void OVR::GLEContext::glLightf_Hook(GLenum light, GLenum pname, GLfloat param)
2414 {
2415 glLightf(light, pname, param);
2416 PostHook(GLE_CURRENT_FUNCTION);
2417 }
2419 #undef glLightfv
2420 extern "C" { GLAPI void GLAPIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params); }
2421 void OVR::GLEContext::glLightfv_Hook(GLenum light, GLenum pname, const GLfloat *params)
2422 {
2423 glLightfv(light, pname, params);
2424 PostHook(GLE_CURRENT_FUNCTION);
2425 }
2427 #undef glLighti
2428 extern "C" { GLAPI void GLAPIENTRY glLighti(GLenum light, GLenum pname, GLint param); }
2429 void OVR::GLEContext::glLighti_Hook(GLenum light, GLenum pname, GLint param)
2430 {
2431 glLighti(light, pname, param);
2432 PostHook(GLE_CURRENT_FUNCTION);
2433 }
2435 #undef glLightiv
2436 extern "C" { GLAPI void GLAPIENTRY glLightiv(GLenum light, GLenum pname, const GLint *params); }
2437 void OVR::GLEContext::glLightiv_Hook(GLenum light, GLenum pname, const GLint *params)
2438 {
2439 glLightiv(light, pname, params);
2440 PostHook(GLE_CURRENT_FUNCTION);
2441 }
2443 #undef glLineStipple
2444 extern "C" { GLAPI void GLAPIENTRY glLineStipple(GLint factor, GLushort pattern); }
2445 void OVR::GLEContext::glLineStipple_Hook(GLint factor, GLushort pattern)
2446 {
2447 glLineStipple(factor, pattern);
2448 PostHook(GLE_CURRENT_FUNCTION);
2449 }
2451 #undef glLineWidth
2452 extern "C" { GLAPI void GLAPIENTRY glLineWidth(GLfloat width); }
2453 void OVR::GLEContext::glLineWidth_Hook(GLfloat width)
2454 {
2455 glLineWidth(width);
2456 PostHook(GLE_CURRENT_FUNCTION);
2457 }
2459 #undef glListBase
2460 extern "C" { GLAPI void GLAPIENTRY glListBase(GLuint base); }
2461 void OVR::GLEContext::glListBase_Hook(GLuint base)
2462 {
2463 glListBase(base);
2464 PostHook(GLE_CURRENT_FUNCTION);
2465 }
2467 #undef glLoadIdentity
2468 extern "C" { GLAPI void GLAPIENTRY glLoadIdentity(); }
2469 void OVR::GLEContext::glLoadIdentity_Hook()
2470 {
2471 glLoadIdentity();
2472 PostHook(GLE_CURRENT_FUNCTION);
2473 }
2475 #undef glLoadMatrixd
2476 extern "C" { GLAPI void GLAPIENTRY glLoadMatrixd(const GLdouble *m); }
2477 void OVR::GLEContext::glLoadMatrixd_Hook(const GLdouble *m)
2478 {
2479 glLoadMatrixd(m);
2480 PostHook(GLE_CURRENT_FUNCTION);
2481 }
2483 #undef glLoadMatrixf
2484 extern "C" { GLAPI void GLAPIENTRY glLoadMatrixf(const GLfloat *m); }
2485 void OVR::GLEContext::glLoadMatrixf_Hook(const GLfloat *m)
2486 {
2487 glLoadMatrixf(m);
2488 PostHook(GLE_CURRENT_FUNCTION);
2489 }
2491 #undef glLoadName
2492 extern "C" { GLAPI void GLAPIENTRY glLoadName(GLuint name); }
2493 void OVR::GLEContext::glLoadName_Hook(GLuint name)
2494 {
2495 glLoadName(name);
2496 PostHook(GLE_CURRENT_FUNCTION);
2497 }
2499 #undef glLogicOp
2500 extern "C" { GLAPI void GLAPIENTRY glLogicOp(GLenum opcode); }
2501 void OVR::GLEContext::glLogicOp_Hook(GLenum opcode)
2502 {
2503 glLogicOp(opcode);
2504 PostHook(GLE_CURRENT_FUNCTION);
2505 }
2507 #undef glMap1d
2508 extern "C" { GLAPI void GLAPIENTRY glMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points); }
2509 void OVR::GLEContext::glMap1d_Hook(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
2510 {
2511 glMap1d(target, u1, u2, stride, order, points);
2512 PostHook(GLE_CURRENT_FUNCTION);
2513 }
2515 #undef glMap1f
2516 extern "C" { GLAPI void GLAPIENTRY glMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points); }
2517 void OVR::GLEContext::glMap1f_Hook(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
2518 {
2519 glMap1f(target, u1, u2, stride, order, points);
2520 PostHook(GLE_CURRENT_FUNCTION);
2521 }
2523 #undef glMap2d
2524 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); }
2525 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)
2526 {
2527 glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
2528 PostHook(GLE_CURRENT_FUNCTION);
2529 }
2531 #undef glMap2f
2532 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); }
2533 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)
2534 {
2535 glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
2536 PostHook(GLE_CURRENT_FUNCTION);
2537 }
2539 #undef glMapGrid1d
2540 extern "C" { GLAPI void GLAPIENTRY glMapGrid1d(GLint un, GLdouble u1, GLdouble u2); }
2541 void OVR::GLEContext::glMapGrid1d_Hook(GLint un, GLdouble u1, GLdouble u2)
2542 {
2543 glMapGrid1d(un, u1, u2);
2544 PostHook(GLE_CURRENT_FUNCTION);
2545 }
2547 #undef glMapGrid1f
2548 extern "C" { GLAPI void GLAPIENTRY glMapGrid1f(GLint un, GLfloat u1, GLfloat u2); }
2549 void OVR::GLEContext::glMapGrid1f_Hook(GLint un, GLfloat u1, GLfloat u2)
2550 {
2551 glMapGrid1f(un, u1, u2);
2552 PostHook(GLE_CURRENT_FUNCTION);
2553 }
2555 #undef glMapGrid2d
2556 extern "C" { GLAPI void GLAPIENTRY glMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); }
2557 void OVR::GLEContext::glMapGrid2d_Hook(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
2558 {
2559 glMapGrid2d(un, u1, u2, vn, v1, v2);
2560 PostHook(GLE_CURRENT_FUNCTION);
2561 }
2563 #undef glMapGrid2f
2564 extern "C" { GLAPI void GLAPIENTRY glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); }
2565 void OVR::GLEContext::glMapGrid2f_Hook(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
2566 {
2567 glMapGrid2f(un, u1, u2, vn, v1, v2);
2568 PostHook(GLE_CURRENT_FUNCTION);
2569 }
2571 #undef glMaterialf
2572 extern "C" { GLAPI void GLAPIENTRY glMaterialf(GLenum face, GLenum pname, GLfloat param); }
2573 void OVR::GLEContext::glMaterialf_Hook(GLenum face, GLenum pname, GLfloat param)
2574 {
2575 glMaterialf(face, pname, param);
2576 PostHook(GLE_CURRENT_FUNCTION);
2577 }
2579 #undef glMaterialfv
2580 extern "C" { GLAPI void GLAPIENTRY glMaterialfv(GLenum face, GLenum pname, const GLfloat *params); }
2581 void OVR::GLEContext::glMaterialfv_Hook(GLenum face, GLenum pname, const GLfloat *params)
2582 {
2583 glMaterialfv(face, pname, params);
2584 PostHook(GLE_CURRENT_FUNCTION);
2585 }
2587 #undef glMateriali
2588 extern "C" { GLAPI void GLAPIENTRY glMateriali(GLenum face, GLenum pname, GLint param); }
2589 void OVR::GLEContext::glMateriali_Hook(GLenum face, GLenum pname, GLint param)
2590 {
2591 glMateriali(face, pname, param);
2592 PostHook(GLE_CURRENT_FUNCTION);
2593 }
2595 #undef glMaterialiv
2596 extern "C" { GLAPI void GLAPIENTRY glMaterialiv(GLenum face, GLenum pname, const GLint *params); }
2597 void OVR::GLEContext::glMaterialiv_Hook(GLenum face, GLenum pname, const GLint *params)
2598 {
2599 glMaterialiv(face, pname, params);
2600 PostHook(GLE_CURRENT_FUNCTION);
2601 }
2603 #undef glMatrixMode
2604 extern "C" { GLAPI void GLAPIENTRY glMatrixMode(GLenum mode); }
2605 void OVR::GLEContext::glMatrixMode_Hook(GLenum mode)
2606 {
2607 glMatrixMode(mode);
2608 PostHook(GLE_CURRENT_FUNCTION);
2609 }
2611 #undef glMultMatrixd
2612 extern "C" { GLAPI void GLAPIENTRY glMultMatrixd(const GLdouble *m); }
2613 void OVR::GLEContext::glMultMatrixd_Hook(const GLdouble *m)
2614 {
2615 glMultMatrixd(m);
2616 PostHook(GLE_CURRENT_FUNCTION);
2617 }
2619 #undef glMultMatrixf
2620 extern "C" { GLAPI void GLAPIENTRY glMultMatrixf(const GLfloat *m); }
2621 void OVR::GLEContext::glMultMatrixf_Hook(const GLfloat *m)
2622 {
2623 glMultMatrixf(m);
2624 PostHook(GLE_CURRENT_FUNCTION);
2625 }
2627 #undef glNewList
2628 extern "C" { GLAPI void GLAPIENTRY glNewList(GLuint list, GLenum mode); }
2629 void OVR::GLEContext::glNewList_Hook(GLuint list, GLenum mode)
2630 {
2631 glNewList(list, mode);
2632 PostHook(GLE_CURRENT_FUNCTION);
2633 }
2635 #undef glNormal3b
2636 extern "C" { GLAPI void GLAPIENTRY glNormal3b(GLbyte nx, GLbyte ny, GLbyte nz); }
2637 void OVR::GLEContext::glNormal3b_Hook(GLbyte nx, GLbyte ny, GLbyte nz)
2638 {
2639 glNormal3b(nx, ny, nz);
2640 PostHook(GLE_CURRENT_FUNCTION);
2641 }
2643 #undef glNormal3bv
2644 extern "C" { GLAPI void GLAPIENTRY glNormal3bv(const GLbyte *v); }
2645 void OVR::GLEContext::glNormal3bv_Hook(const GLbyte *v)
2646 {
2647 glNormal3bv(v);
2648 PostHook(GLE_CURRENT_FUNCTION);
2649 }
2651 #undef glNormal3d
2652 extern "C" { GLAPI void GLAPIENTRY glNormal3d(GLdouble nx, GLdouble ny, GLdouble nz); }
2653 void OVR::GLEContext::glNormal3d_Hook(GLdouble nx, GLdouble ny, GLdouble nz)
2654 {
2655 glNormal3d(nx, ny, nz);
2656 PostHook(GLE_CURRENT_FUNCTION);
2657 }
2659 #undef glNormal3dv
2660 extern "C" { GLAPI void GLAPIENTRY glNormal3dv(const GLdouble *v); }
2661 void OVR::GLEContext::glNormal3dv_Hook(const GLdouble *v)
2662 {
2663 glNormal3dv(v);
2664 PostHook(GLE_CURRENT_FUNCTION);
2665 }
2667 #undef glNormal3f
2668 extern "C" { GLAPI void GLAPIENTRY glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz); }
2669 void OVR::GLEContext::glNormal3f_Hook(GLfloat nx, GLfloat ny, GLfloat nz)
2670 {
2671 glNormal3f(nx, ny, nz);
2672 PostHook(GLE_CURRENT_FUNCTION);
2673 }
2675 #undef glNormal3fv
2676 extern "C" { GLAPI void GLAPIENTRY glNormal3fv(const GLfloat *v); }
2677 void OVR::GLEContext::glNormal3fv_Hook(const GLfloat *v)
2678 {
2679 glNormal3fv(v);
2680 PostHook(GLE_CURRENT_FUNCTION);
2681 }
2683 #undef glNormal3i
2684 extern "C" { GLAPI void GLAPIENTRY glNormal3i(GLint nx, GLint ny, GLint nz); }
2685 void OVR::GLEContext::glNormal3i_Hook(GLint nx, GLint ny, GLint nz)
2686 {
2687 glNormal3i(nx, ny, nz);
2688 PostHook(GLE_CURRENT_FUNCTION);
2689 }
2691 #undef glNormal3iv
2692 extern "C" { GLAPI void GLAPIENTRY glNormal3iv(const GLint *v); }
2693 void OVR::GLEContext::glNormal3iv_Hook(const GLint *v)
2694 {
2695 glNormal3iv(v);
2696 PostHook(GLE_CURRENT_FUNCTION);
2697 }
2699 #undef glNormal3s
2700 extern "C" { GLAPI void GLAPIENTRY glNormal3s(GLshort nx, GLshort ny, GLshort nz); }
2701 void OVR::GLEContext::glNormal3s_Hook(GLshort nx, GLshort ny, GLshort nz)
2702 {
2703 glNormal3s(nx, ny, nz);
2704 PostHook(GLE_CURRENT_FUNCTION);
2705 }
2707 #undef glNormal3sv
2708 extern "C" { GLAPI void GLAPIENTRY glNormal3sv(const GLshort *v); }
2709 void OVR::GLEContext::glNormal3sv_Hook(const GLshort *v)
2710 {
2711 glNormal3sv(v);
2712 PostHook(GLE_CURRENT_FUNCTION);
2713 }
2715 #undef glNormalPointer
2716 extern "C" { GLAPI void GLAPIENTRY glNormalPointer(GLenum type, GLsizei stride, const void *pointer); }
2717 void OVR::GLEContext::glNormalPointer_Hook(GLenum type, GLsizei stride, const void *pointer)
2718 {
2719 glNormalPointer(type, stride, pointer);
2720 PostHook(GLE_CURRENT_FUNCTION);
2721 }
2723 #undef glOrtho
2724 extern "C" { GLAPI void GLAPIENTRY glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); }
2725 void OVR::GLEContext::glOrtho_Hook(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
2726 {
2727 glOrtho(left, right, bottom, top, zNear, zFar);
2728 PostHook(GLE_CURRENT_FUNCTION);
2729 }
2731 #undef glPassThrough
2732 extern "C" { GLAPI void GLAPIENTRY glPassThrough(GLfloat token); }
2733 void OVR::GLEContext::glPassThrough_Hook(GLfloat token)
2734 {
2735 glPassThrough(token);
2736 PostHook(GLE_CURRENT_FUNCTION);
2737 }
2739 #undef glPixelMapfv
2740 extern "C" { GLAPI void GLAPIENTRY glPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values); }
2741 void OVR::GLEContext::glPixelMapfv_Hook(GLenum map, GLsizei mapsize, const GLfloat *values)
2742 {
2743 glPixelMapfv(map, mapsize, values);
2744 PostHook(GLE_CURRENT_FUNCTION);
2745 }
2747 #undef glPixelMapuiv
2748 extern "C" { GLAPI void GLAPIENTRY glPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values); }
2749 void OVR::GLEContext::glPixelMapuiv_Hook(GLenum map, GLsizei mapsize, const GLuint *values)
2750 {
2751 glPixelMapuiv(map, mapsize, values);
2752 PostHook(GLE_CURRENT_FUNCTION);
2753 }
2755 #undef glPixelMapusv
2756 extern "C" { GLAPI void GLAPIENTRY glPixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values); }
2757 void OVR::GLEContext::glPixelMapusv_Hook(GLenum map, GLsizei mapsize, const GLushort *values)
2758 {
2759 glPixelMapusv(map, mapsize, values);
2760 PostHook(GLE_CURRENT_FUNCTION);
2761 }
2763 #undef glPixelStoref
2764 extern "C" { GLAPI void GLAPIENTRY glPixelStoref(GLenum pname, GLfloat param); }
2765 void OVR::GLEContext::glPixelStoref_Hook(GLenum pname, GLfloat param)
2766 {
2767 glPixelStoref(pname, param);
2768 PostHook(GLE_CURRENT_FUNCTION);
2769 }
2771 #undef glPixelStorei
2772 extern "C" { GLAPI void GLAPIENTRY glPixelStorei(GLenum pname, GLint param); }
2773 void OVR::GLEContext::glPixelStorei_Hook(GLenum pname, GLint param)
2774 {
2775 glPixelStorei(pname, param);
2776 PostHook(GLE_CURRENT_FUNCTION);
2777 }
2779 #undef glPixelTransferf
2780 extern "C" { GLAPI void GLAPIENTRY glPixelTransferf(GLenum pname, GLfloat param); }
2781 void OVR::GLEContext::glPixelTransferf_Hook(GLenum pname, GLfloat param)
2782 {
2783 glPixelTransferf(pname, param);
2784 PostHook(GLE_CURRENT_FUNCTION);
2785 }
2787 #undef glPixelTransferi
2788 extern "C" { GLAPI void GLAPIENTRY glPixelTransferi(GLenum pname, GLint param); }
2789 void OVR::GLEContext::glPixelTransferi_Hook(GLenum pname, GLint param)
2790 {
2791 glPixelTransferi(pname, param);
2792 PostHook(GLE_CURRENT_FUNCTION);
2793 }
2795 #undef glPixelZoom
2796 extern "C" { GLAPI void GLAPIENTRY glPixelZoom(GLfloat xfactor, GLfloat yfactor); }
2797 void OVR::GLEContext::glPixelZoom_Hook(GLfloat xfactor, GLfloat yfactor)
2798 {
2799 glPixelZoom(xfactor, yfactor);
2800 PostHook(GLE_CURRENT_FUNCTION);
2801 }
2803 #undef glPointSize
2804 extern "C" { GLAPI void GLAPIENTRY glPointSize(GLfloat size); }
2805 void OVR::GLEContext::glPointSize_Hook(GLfloat size)
2806 {
2807 glPointSize(size);
2808 PostHook(GLE_CURRENT_FUNCTION);
2809 }
2811 #undef glPolygonMode
2812 extern "C" { GLAPI void GLAPIENTRY glPolygonMode(GLenum face, GLenum mode); }
2813 void OVR::GLEContext::glPolygonMode_Hook(GLenum face, GLenum mode)
2814 {
2815 glPolygonMode(face, mode);
2816 PostHook(GLE_CURRENT_FUNCTION);
2817 }
2819 #undef glPolygonOffset
2820 extern "C" { GLAPI void GLAPIENTRY glPolygonOffset(GLfloat factor, GLfloat units); }
2821 void OVR::GLEContext::glPolygonOffset_Hook(GLfloat factor, GLfloat units)
2822 {
2823 glPolygonOffset(factor, units);
2824 PostHook(GLE_CURRENT_FUNCTION);
2825 }
2827 #undef glPolygonStipple
2828 extern "C" { GLAPI void GLAPIENTRY glPolygonStipple(const GLubyte *mask); }
2829 void OVR::GLEContext::glPolygonStipple_Hook(const GLubyte *mask)
2830 {
2831 glPolygonStipple(mask);
2832 PostHook(GLE_CURRENT_FUNCTION);
2833 }
2835 #undef glPopAttrib
2836 extern "C" { GLAPI void GLAPIENTRY glPopAttrib(); }
2837 void OVR::GLEContext::glPopAttrib_Hook()
2838 {
2839 glPopAttrib();
2840 PostHook(GLE_CURRENT_FUNCTION);
2841 }
2843 #undef glPopClientAttrib
2844 extern "C" { GLAPI void GLAPIENTRY glPopClientAttrib(); }
2845 void OVR::GLEContext::glPopClientAttrib_Hook()
2846 {
2847 glPopClientAttrib();
2848 PostHook(GLE_CURRENT_FUNCTION);
2849 }
2851 #undef glPopMatrix
2852 extern "C" { GLAPI void GLAPIENTRY glPopMatrix(); }
2853 void OVR::GLEContext::glPopMatrix_Hook()
2854 {
2855 glPopMatrix();
2856 PostHook(GLE_CURRENT_FUNCTION);
2857 }
2859 #undef glPopName
2860 extern "C" { GLAPI void GLAPIENTRY glPopName(); }
2861 void OVR::GLEContext::glPopName_Hook()
2862 {
2863 glPopName();
2864 PostHook(GLE_CURRENT_FUNCTION);
2865 }
2867 #undef glPrioritizeTextures
2868 extern "C" { GLAPI void GLAPIENTRY glPrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities); }
2869 void OVR::GLEContext::glPrioritizeTextures_Hook(GLsizei n, const GLuint *textures, const GLclampf *priorities)
2870 {
2871 glPrioritizeTextures(n, textures, priorities);
2872 PostHook(GLE_CURRENT_FUNCTION);
2873 }
2875 #undef glPushAttrib
2876 extern "C" { GLAPI void GLAPIENTRY glPushAttrib(GLbitfield mask); }
2877 void OVR::GLEContext::glPushAttrib_Hook(GLbitfield mask)
2878 {
2879 glPushAttrib(mask);
2880 PostHook(GLE_CURRENT_FUNCTION);
2881 }
2883 #undef glPushClientAttrib
2884 extern "C" { GLAPI void GLAPIENTRY glPushClientAttrib(GLbitfield mask); }
2885 void OVR::GLEContext::glPushClientAttrib_Hook(GLbitfield mask)
2886 {
2887 glPushClientAttrib(mask);
2888 PostHook(GLE_CURRENT_FUNCTION);
2889 }
2891 #undef glPushMatrix
2892 extern "C" { GLAPI void GLAPIENTRY glPushMatrix(); }
2893 void OVR::GLEContext::glPushMatrix_Hook()
2894 {
2895 glPushMatrix();
2896 PostHook(GLE_CURRENT_FUNCTION);
2897 }
2899 #undef glPushName
2900 extern "C" { GLAPI void GLAPIENTRY glPushName(GLuint name); }
2901 void OVR::GLEContext::glPushName_Hook(GLuint name)
2902 {
2903 glPushName(name);
2904 PostHook(GLE_CURRENT_FUNCTION);
2905 }
2907 #undef glRasterPos2d
2908 extern "C" { GLAPI void GLAPIENTRY glRasterPos2d(GLdouble x, GLdouble y); }
2909 void OVR::GLEContext::glRasterPos2d_Hook(GLdouble x, GLdouble y)
2910 {
2911 glRasterPos2d(x, y);
2912 PostHook(GLE_CURRENT_FUNCTION);
2913 }
2915 #undef glRasterPos2dv
2916 extern "C" { GLAPI void GLAPIENTRY glRasterPos2dv(const GLdouble *v); }
2917 void OVR::GLEContext::glRasterPos2dv_Hook(const GLdouble *v)
2918 {
2919 glRasterPos2dv(v);
2920 PostHook(GLE_CURRENT_FUNCTION);
2921 }
2923 #undef glRasterPos2f
2924 extern "C" { GLAPI void GLAPIENTRY glRasterPos2f(GLfloat x, GLfloat y); }
2925 void OVR::GLEContext::glRasterPos2f_Hook(GLfloat x, GLfloat y)
2926 {
2927 glRasterPos2f(x, y);
2928 PostHook(GLE_CURRENT_FUNCTION);
2929 }
2931 #undef glRasterPos2fv
2932 extern "C" { GLAPI void GLAPIENTRY glRasterPos2fv(const GLfloat *v); }
2933 void OVR::GLEContext::glRasterPos2fv_Hook(const GLfloat *v)
2934 {
2935 glRasterPos2fv(v);
2936 PostHook(GLE_CURRENT_FUNCTION);
2937 }
2939 #undef glRasterPos2i
2940 extern "C" { GLAPI void GLAPIENTRY glRasterPos2i(GLint x, GLint y); }
2941 void OVR::GLEContext::glRasterPos2i_Hook(GLint x, GLint y)
2942 {
2943 glRasterPos2i(x, y);
2944 PostHook(GLE_CURRENT_FUNCTION);
2945 }
2947 #undef glRasterPos2iv
2948 extern "C" { GLAPI void GLAPIENTRY glRasterPos2iv(const GLint *v); }
2949 void OVR::GLEContext::glRasterPos2iv_Hook(const GLint *v)
2950 {
2951 glRasterPos2iv(v);
2952 PostHook(GLE_CURRENT_FUNCTION);
2953 }
2955 #undef glRasterPos2s
2956 extern "C" { GLAPI void GLAPIENTRY glRasterPos2s(GLshort x, GLshort y); }
2957 void OVR::GLEContext::glRasterPos2s_Hook(GLshort x, GLshort y)
2958 {
2959 glRasterPos2s(x, y);
2960 PostHook(GLE_CURRENT_FUNCTION);
2961 }
2963 #undef glRasterPos2sv
2964 extern "C" { GLAPI void GLAPIENTRY glRasterPos2sv(const GLshort *v); }
2965 void OVR::GLEContext::glRasterPos2sv_Hook(const GLshort *v)
2966 {
2967 glRasterPos2sv(v);
2968 PostHook(GLE_CURRENT_FUNCTION);
2969 }
2971 #undef glRasterPos3d
2972 extern "C" { GLAPI void GLAPIENTRY glRasterPos3d(GLdouble x, GLdouble y, GLdouble z); }
2973 void OVR::GLEContext::glRasterPos3d_Hook(GLdouble x, GLdouble y, GLdouble z)
2974 {
2975 glRasterPos3d(x, y, z);
2976 PostHook(GLE_CURRENT_FUNCTION);
2977 }
2979 #undef glRasterPos3dv
2980 extern "C" { GLAPI void GLAPIENTRY glRasterPos3dv(const GLdouble *v); }
2981 void OVR::GLEContext::glRasterPos3dv_Hook(const GLdouble *v)
2982 {
2983 glRasterPos3dv(v);
2984 PostHook(GLE_CURRENT_FUNCTION);
2985 }
2987 #undef glRasterPos3f
2988 extern "C" { GLAPI void GLAPIENTRY glRasterPos3f(GLfloat x, GLfloat y, GLfloat z); }
2989 void OVR::GLEContext::glRasterPos3f_Hook(GLfloat x, GLfloat y, GLfloat z)
2990 {
2991 glRasterPos3f(x, y, z);
2992 PostHook(GLE_CURRENT_FUNCTION);
2993 }
2995 #undef glRasterPos3fv
2996 extern "C" { GLAPI void GLAPIENTRY glRasterPos3fv(const GLfloat *v); }
2997 void OVR::GLEContext::glRasterPos3fv_Hook(const GLfloat *v)
2998 {
2999 glRasterPos3fv(v);
3000 PostHook(GLE_CURRENT_FUNCTION);
3001 }
3003 #undef glRasterPos3i
3004 extern "C" { GLAPI void GLAPIENTRY glRasterPos3i(GLint x, GLint y, GLint z); }
3005 void OVR::GLEContext::glRasterPos3i_Hook(GLint x, GLint y, GLint z)
3006 {
3007 glRasterPos3i(x, y, z);
3008 PostHook(GLE_CURRENT_FUNCTION);
3009 }
3011 #undef glRasterPos3iv
3012 extern "C" { GLAPI void GLAPIENTRY glRasterPos3iv(const GLint *v); }
3013 void OVR::GLEContext::glRasterPos3iv_Hook(const GLint *v)
3014 {
3015 glRasterPos3iv(v);
3016 PostHook(GLE_CURRENT_FUNCTION);
3017 }
3019 #undef glRasterPos3s
3020 extern "C" { GLAPI void GLAPIENTRY glRasterPos3s(GLshort x, GLshort y, GLshort z); }
3021 void OVR::GLEContext::glRasterPos3s_Hook(GLshort x, GLshort y, GLshort z)
3022 {
3023 glRasterPos3s(x, y, z);
3024 PostHook(GLE_CURRENT_FUNCTION);
3025 }
3027 #undef glRasterPos3sv
3028 extern "C" { GLAPI void GLAPIENTRY glRasterPos3sv(const GLshort *v); }
3029 void OVR::GLEContext::glRasterPos3sv_Hook(const GLshort *v)
3030 {
3031 glRasterPos3sv(v);
3032 PostHook(GLE_CURRENT_FUNCTION);
3033 }
3035 #undef glRasterPos4d
3036 extern "C" { GLAPI void GLAPIENTRY glRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w); }
3037 void OVR::GLEContext::glRasterPos4d_Hook(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
3038 {
3039 glRasterPos4d(x, y, z, w);
3040 PostHook(GLE_CURRENT_FUNCTION);
3041 }
3043 #undef glRasterPos4dv
3044 extern "C" { GLAPI void GLAPIENTRY glRasterPos4dv(const GLdouble *v); }
3045 void OVR::GLEContext::glRasterPos4dv_Hook(const GLdouble *v)
3046 {
3047 glRasterPos4dv(v);
3048 PostHook(GLE_CURRENT_FUNCTION);
3049 }
3051 #undef glRasterPos4f
3052 extern "C" { GLAPI void GLAPIENTRY glRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); }
3053 void OVR::GLEContext::glRasterPos4f_Hook(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
3054 {
3055 glRasterPos4f(x, y, z, w);
3056 PostHook(GLE_CURRENT_FUNCTION);
3057 }
3059 #undef glRasterPos4fv
3060 extern "C" { GLAPI void GLAPIENTRY glRasterPos4fv(const GLfloat *v); }
3061 void OVR::GLEContext::glRasterPos4fv_Hook(const GLfloat *v)
3062 {
3063 glRasterPos4fv(v);
3064 PostHook(GLE_CURRENT_FUNCTION);
3065 }
3067 #undef glRasterPos4i
3068 extern "C" { GLAPI void GLAPIENTRY glRasterPos4i(GLint x, GLint y, GLint z, GLint w); }
3069 void OVR::GLEContext::glRasterPos4i_Hook(GLint x, GLint y, GLint z, GLint w)
3070 {
3071 glRasterPos4i(x, y, z, w);
3072 PostHook(GLE_CURRENT_FUNCTION);
3073 }
3075 #undef glRasterPos4iv
3076 extern "C" { GLAPI void GLAPIENTRY glRasterPos4iv(const GLint *v); }
3077 void OVR::GLEContext::glRasterPos4iv_Hook(const GLint *v)
3078 {
3079 glRasterPos4iv(v);
3080 PostHook(GLE_CURRENT_FUNCTION);
3081 }
3083 #undef glRasterPos4s
3084 extern "C" { GLAPI void GLAPIENTRY glRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w); }
3085 void OVR::GLEContext::glRasterPos4s_Hook(GLshort x, GLshort y, GLshort z, GLshort w)
3086 {
3087 glRasterPos4s(x, y, z, w);
3088 PostHook(GLE_CURRENT_FUNCTION);
3089 }
3091 #undef glRasterPos4sv
3092 extern "C" { GLAPI void GLAPIENTRY glRasterPos4sv(const GLshort *v); }
3093 void OVR::GLEContext::glRasterPos4sv_Hook(const GLshort *v)
3094 {
3095 glRasterPos4sv(v);
3096 PostHook(GLE_CURRENT_FUNCTION);
3097 }
3099 #undef glReadBuffer
3100 extern "C" { GLAPI void GLAPIENTRY glReadBuffer(GLenum mode); }
3101 void OVR::GLEContext::glReadBuffer_Hook(GLenum mode)
3102 {
3103 glReadBuffer(mode);
3104 PostHook(GLE_CURRENT_FUNCTION);
3105 }
3107 #undef glReadPixels
3108 extern "C" { GLAPI void GLAPIENTRY glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); }
3109 void OVR::GLEContext::glReadPixels_Hook(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels)
3110 {
3111 glReadPixels(x, y, width, height, format, type, pixels);
3112 PostHook(GLE_CURRENT_FUNCTION);
3113 }
3115 #undef glRectd
3116 extern "C" { GLAPI void GLAPIENTRY glRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); }
3117 void OVR::GLEContext::glRectd_Hook(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
3118 {
3119 glRectd(x1, y1, x2, y2);
3120 PostHook(GLE_CURRENT_FUNCTION);
3121 }
3123 #undef glRectdv
3124 extern "C" { GLAPI void GLAPIENTRY glRectdv(const GLdouble *v1, const GLdouble *v2); }
3125 void OVR::GLEContext::glRectdv_Hook(const GLdouble *v1, const GLdouble *v2)
3126 {
3127 glRectdv(v1, v2);
3128 PostHook(GLE_CURRENT_FUNCTION);
3129 }
3131 #undef glRectf
3132 extern "C" { GLAPI void GLAPIENTRY glRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); }
3133 void OVR::GLEContext::glRectf_Hook(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
3134 {
3135 glRectf(x1, y1, x2, y2);
3136 PostHook(GLE_CURRENT_FUNCTION);
3137 }
3139 #undef glRectfv
3140 extern "C" { GLAPI void GLAPIENTRY glRectfv(const GLfloat *v1, const GLfloat *v2); }
3141 void OVR::GLEContext::glRectfv_Hook(const GLfloat *v1, const GLfloat *v2)
3142 {
3143 glRectfv(v1, v2);
3144 PostHook(GLE_CURRENT_FUNCTION);
3145 }
3147 #undef glRecti
3148 extern "C" { GLAPI void GLAPIENTRY glRecti(GLint x1, GLint y1, GLint x2, GLint y2); }
3149 void OVR::GLEContext::glRecti_Hook(GLint x1, GLint y1, GLint x2, GLint y2)
3150 {
3151 glRecti(x1, y1, x2, y2);
3152 PostHook(GLE_CURRENT_FUNCTION);
3153 }
3155 #undef glRectiv
3156 extern "C" { GLAPI void GLAPIENTRY glRectiv(const GLint *v1, const GLint *v2); }
3157 void OVR::GLEContext::glRectiv_Hook(const GLint *v1, const GLint *v2)
3158 {
3159 glRectiv(v1, v2);
3160 PostHook(GLE_CURRENT_FUNCTION);
3161 }
3163 #undef glRects
3164 extern "C" { GLAPI void GLAPIENTRY glRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2); }
3165 void OVR::GLEContext::glRects_Hook(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
3166 {
3167 glRects(x1, y1, x2, y2);
3168 PostHook(GLE_CURRENT_FUNCTION);
3169 }
3171 #undef glRectsv
3172 extern "C" { GLAPI void GLAPIENTRY glRectsv(const GLshort *v1, const GLshort *v2); }
3173 void OVR::GLEContext::glRectsv_Hook(const GLshort *v1, const GLshort *v2)
3174 {
3175 glRectsv(v1, v2);
3176 PostHook(GLE_CURRENT_FUNCTION);
3177 }
3179 #undef glRenderMode
3180 extern "C" { GLAPI GLint GLAPIENTRY glRenderMode(GLenum mode); }
3181 GLint OVR::GLEContext::glRenderMode_Hook(GLenum mode)
3182 {
3183 GLint i = glRenderMode(mode);
3184 PostHook(GLE_CURRENT_FUNCTION);
3185 return i;
3186 }
3188 #undef glRotated
3189 extern "C" { GLAPI void GLAPIENTRY glRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z); }
3190 void OVR::GLEContext::glRotated_Hook(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
3191 {
3192 glRotated(angle, x, y, z);
3193 PostHook(GLE_CURRENT_FUNCTION);
3194 }
3196 #undef glRotatef
3197 extern "C" { GLAPI void GLAPIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); }
3198 void OVR::GLEContext::glRotatef_Hook(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
3199 {
3200 glRotatef(angle, x, y, z);
3201 PostHook(GLE_CURRENT_FUNCTION);
3202 }
3204 #undef glScaled
3205 extern "C" { GLAPI void GLAPIENTRY glScaled(GLdouble x, GLdouble y, GLdouble z); }
3206 void OVR::GLEContext::glScaled_Hook(GLdouble x, GLdouble y, GLdouble z)
3207 {
3208 glScaled(x, y, z);
3209 PostHook(GLE_CURRENT_FUNCTION);
3210 }
3212 #undef glScalef
3213 extern "C" { GLAPI void GLAPIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z); }
3214 void OVR::GLEContext::glScalef_Hook(GLfloat x, GLfloat y, GLfloat z)
3215 {
3216 glScalef(x, y, z);
3217 PostHook(GLE_CURRENT_FUNCTION);
3218 }
3220 #undef glScissor
3221 extern "C" { GLAPI void GLAPIENTRY glScissor(GLint x, GLint y, GLsizei width, GLsizei height); }
3222 void OVR::GLEContext::glScissor_Hook(GLint x, GLint y, GLsizei width, GLsizei height)
3223 {
3224 glScissor(x, y, width, height);
3225 PostHook(GLE_CURRENT_FUNCTION);
3226 }
3228 #undef glSelectBuffer
3229 extern "C" { GLAPI void GLAPIENTRY glSelectBuffer(GLsizei size, GLuint *buffer); }
3230 void OVR::GLEContext::glSelectBuffer_Hook(GLsizei size, GLuint *buffer)
3231 {
3232 glSelectBuffer(size, buffer);
3233 PostHook(GLE_CURRENT_FUNCTION);
3234 }
3236 #undef glShadeModel
3237 extern "C" { GLAPI void GLAPIENTRY glShadeModel(GLenum mode); }
3238 void OVR::GLEContext::glShadeModel_Hook(GLenum mode)
3239 {
3240 glShadeModel(mode);
3241 PostHook(GLE_CURRENT_FUNCTION);
3242 }
3244 #undef glStencilFunc
3245 extern "C" { GLAPI void GLAPIENTRY glStencilFunc(GLenum func, GLint ref, GLuint mask); }
3246 void OVR::GLEContext::glStencilFunc_Hook(GLenum func, GLint ref, GLuint mask)
3247 {
3248 glStencilFunc(func, ref, mask);
3249 PostHook(GLE_CURRENT_FUNCTION);
3250 }
3252 #undef glStencilMask
3253 extern "C" { GLAPI void GLAPIENTRY glStencilMask(GLuint mask); }
3254 void OVR::GLEContext::glStencilMask_Hook(GLuint mask)
3255 {
3256 glStencilMask(mask);
3257 PostHook(GLE_CURRENT_FUNCTION);
3258 }
3260 #undef glStencilOp
3261 extern "C" { GLAPI void GLAPIENTRY glStencilOp(GLenum fail, GLenum zfail, GLenum zpass); }
3262 void OVR::GLEContext::glStencilOp_Hook(GLenum fail, GLenum zfail, GLenum zpass)
3263 {
3264 glStencilOp(fail, zfail, zpass);
3265 PostHook(GLE_CURRENT_FUNCTION);
3266 }
3268 #undef glTexCoord1d
3269 extern "C" { GLAPI void GLAPIENTRY glTexCoord1d(GLdouble s); }
3270 void OVR::GLEContext::glTexCoord1d_Hook(GLdouble s)
3271 {
3272 glTexCoord1d(s);
3273 PostHook(GLE_CURRENT_FUNCTION);
3274 }
3276 #undef glTexCoord1dv
3277 extern "C" { GLAPI void GLAPIENTRY glTexCoord1dv(const GLdouble *v); }
3278 void OVR::GLEContext::glTexCoord1dv_Hook(const GLdouble *v)
3279 {
3280 glTexCoord1dv(v);
3281 PostHook(GLE_CURRENT_FUNCTION);
3282 }
3284 #undef glTexCoord1f
3285 extern "C" { GLAPI void GLAPIENTRY glTexCoord1f(GLfloat s); }
3286 void OVR::GLEContext::glTexCoord1f_Hook(GLfloat s)
3287 {
3288 glTexCoord1f(s);
3289 PostHook(GLE_CURRENT_FUNCTION);
3290 }
3292 #undef glTexCoord1fv
3293 extern "C" { GLAPI void GLAPIENTRY glTexCoord1fv(const GLfloat *v); }
3294 void OVR::GLEContext::glTexCoord1fv_Hook(const GLfloat *v)
3295 {
3296 glTexCoord1fv(v);
3297 PostHook(GLE_CURRENT_FUNCTION);
3298 }
3300 #undef glTexCoord1i
3301 extern "C" { GLAPI void GLAPIENTRY glTexCoord1i(GLint s); }
3302 void OVR::GLEContext::glTexCoord1i_Hook(GLint s)
3303 {
3304 glTexCoord1i(s);
3305 PostHook(GLE_CURRENT_FUNCTION);
3306 }
3308 #undef glTexCoord1iv
3309 extern "C" { GLAPI void GLAPIENTRY glTexCoord1iv(const GLint *v); }
3310 void OVR::GLEContext::glTexCoord1iv_Hook(const GLint *v)
3311 {
3312 glTexCoord1iv(v);
3313 PostHook(GLE_CURRENT_FUNCTION);
3314 }
3316 #undef glTexCoord1s
3317 extern "C" { GLAPI void GLAPIENTRY glTexCoord1s(GLshort s); }
3318 void OVR::GLEContext::glTexCoord1s_Hook(GLshort s)
3319 {
3320 glTexCoord1s(s);
3321 PostHook(GLE_CURRENT_FUNCTION);
3322 }
3324 #undef glTexCoord1sv
3325 extern "C" { GLAPI void GLAPIENTRY glTexCoord1sv(const GLshort *v); }
3326 void OVR::GLEContext::glTexCoord1sv_Hook(const GLshort *v)
3327 {
3328 glTexCoord1sv(v);
3329 PostHook(GLE_CURRENT_FUNCTION);
3330 }
3332 #undef glTexCoord2d
3333 extern "C" { GLAPI void GLAPIENTRY glTexCoord2d(GLdouble s, GLdouble t); }
3334 void OVR::GLEContext::glTexCoord2d_Hook(GLdouble s, GLdouble t)
3335 {
3336 glTexCoord2d(s, t);
3337 PostHook(GLE_CURRENT_FUNCTION);
3338 }
3340 #undef glTexCoord2dv
3341 extern "C" { GLAPI void GLAPIENTRY glTexCoord2dv(const GLdouble *v); }
3342 void OVR::GLEContext::glTexCoord2dv_Hook(const GLdouble *v)
3343 {
3344 glTexCoord2dv(v);
3345 PostHook(GLE_CURRENT_FUNCTION);
3346 }
3348 #undef glTexCoord2f
3349 extern "C" { GLAPI void GLAPIENTRY glTexCoord2f(GLfloat s, GLfloat t); }
3350 void OVR::GLEContext::glTexCoord2f_Hook(GLfloat s, GLfloat t)
3351 {
3352 glTexCoord2f(s, t);
3353 PostHook(GLE_CURRENT_FUNCTION);
3354 }
3356 #undef glTexCoord2fv
3357 extern "C" { GLAPI void GLAPIENTRY glTexCoord2fv(const GLfloat *v); }
3358 void OVR::GLEContext::glTexCoord2fv_Hook(const GLfloat *v)
3359 {
3360 glTexCoord2fv(v);
3361 PostHook(GLE_CURRENT_FUNCTION);
3362 }
3364 #undef glTexCoord2i
3365 extern "C" { GLAPI void GLAPIENTRY glTexCoord2i(GLint s, GLint t); }
3366 void OVR::GLEContext::glTexCoord2i_Hook(GLint s, GLint t)
3367 {
3368 glTexCoord2i(s, t);
3369 PostHook(GLE_CURRENT_FUNCTION);
3370 }
3372 #undef glTexCoord2iv
3373 extern "C" { GLAPI void GLAPIENTRY glTexCoord2iv(const GLint *v); }
3374 void OVR::GLEContext::glTexCoord2iv_Hook(const GLint *v)
3375 {
3376 glTexCoord2iv(v);
3377 PostHook(GLE_CURRENT_FUNCTION);
3378 }
3380 #undef glTexCoord2s
3381 extern "C" { GLAPI void GLAPIENTRY glTexCoord2s(GLshort s, GLshort t); }
3382 void OVR::GLEContext::glTexCoord2s_Hook(GLshort s, GLshort t)
3383 {
3384 glTexCoord2s(s, t);
3385 PostHook(GLE_CURRENT_FUNCTION);
3386 }
3388 #undef glTexCoord2sv
3389 extern "C" { GLAPI void GLAPIENTRY glTexCoord2sv(const GLshort *v); }
3390 void OVR::GLEContext::glTexCoord2sv_Hook(const GLshort *v)
3391 {
3392 glTexCoord2sv(v);
3393 PostHook(GLE_CURRENT_FUNCTION);
3394 }
3396 #undef glTexCoord3d
3397 extern "C" { GLAPI void GLAPIENTRY glTexCoord3d(GLdouble s, GLdouble t, GLdouble r); }
3398 void OVR::GLEContext::glTexCoord3d_Hook(GLdouble s, GLdouble t, GLdouble r)
3399 {
3400 glTexCoord3d(s, t, r);
3401 PostHook(GLE_CURRENT_FUNCTION);
3402 }
3404 #undef glTexCoord3dv
3405 extern "C" { GLAPI void GLAPIENTRY glTexCoord3dv(const GLdouble *v); }
3406 void OVR::GLEContext::glTexCoord3dv_Hook(const GLdouble *v)
3407 {
3408 glTexCoord3dv(v);
3409 PostHook(GLE_CURRENT_FUNCTION);
3410 }
3412 #undef glTexCoord3f
3413 extern "C" { GLAPI void GLAPIENTRY glTexCoord3f(GLfloat s, GLfloat t, GLfloat r); }
3414 void OVR::GLEContext::glTexCoord3f_Hook(GLfloat s, GLfloat t, GLfloat r)
3415 {
3416 glTexCoord3f(s, t, r);
3417 PostHook(GLE_CURRENT_FUNCTION);
3418 }
3420 #undef glTexCoord3fv
3421 extern "C" { GLAPI void GLAPIENTRY glTexCoord3fv(const GLfloat *v); }
3422 void OVR::GLEContext::glTexCoord3fv_Hook(const GLfloat *v)
3423 {
3424 glTexCoord3fv(v);
3425 PostHook(GLE_CURRENT_FUNCTION);
3426 }
3428 #undef glTexCoord3i
3429 extern "C" { GLAPI void GLAPIENTRY glTexCoord3i(GLint s, GLint t, GLint r); }
3430 void OVR::GLEContext::glTexCoord3i_Hook(GLint s, GLint t, GLint r)
3431 {
3432 glTexCoord3i(s, t, r);
3433 PostHook(GLE_CURRENT_FUNCTION);
3434 }
3436 #undef glTexCoord3iv
3437 extern "C" { GLAPI void GLAPIENTRY glTexCoord3iv(const GLint *v); }
3438 void OVR::GLEContext::glTexCoord3iv_Hook(const GLint *v)
3439 {
3440 glTexCoord3iv(v);
3441 PostHook(GLE_CURRENT_FUNCTION);
3442 }
3444 #undef glTexCoord3s
3445 extern "C" { GLAPI void GLAPIENTRY glTexCoord3s(GLshort s, GLshort t, GLshort r); }
3446 void OVR::GLEContext::glTexCoord3s_Hook(GLshort s, GLshort t, GLshort r)
3447 {
3448 glTexCoord3s(s, t, r);
3449 PostHook(GLE_CURRENT_FUNCTION);
3450 }
3452 #undef glTexCoord3sv
3453 extern "C" { GLAPI void GLAPIENTRY glTexCoord3sv(const GLshort *v); }
3454 void OVR::GLEContext::glTexCoord3sv_Hook(const GLshort *v)
3455 {
3456 glTexCoord3sv(v);
3457 PostHook(GLE_CURRENT_FUNCTION);
3458 }
3460 #undef glTexCoord4d
3461 extern "C" { GLAPI void GLAPIENTRY glTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q); }
3462 void OVR::GLEContext::glTexCoord4d_Hook(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
3463 {
3464 glTexCoord4d(s, t, r, q);
3465 PostHook(GLE_CURRENT_FUNCTION);
3466 }
3468 #undef glTexCoord4dv
3469 extern "C" { GLAPI void GLAPIENTRY glTexCoord4dv(const GLdouble *v); }
3470 void OVR::GLEContext::glTexCoord4dv_Hook(const GLdouble *v)
3471 {
3472 glTexCoord4dv(v);
3473 PostHook(GLE_CURRENT_FUNCTION);
3474 }
3476 #undef glTexCoord4f
3477 extern "C" { GLAPI void GLAPIENTRY glTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q); }
3478 void OVR::GLEContext::glTexCoord4f_Hook(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
3479 {
3480 glTexCoord4f(s, t, r, q);
3481 PostHook(GLE_CURRENT_FUNCTION);
3482 }
3484 #undef glTexCoord4fv
3485 extern "C" { GLAPI void GLAPIENTRY glTexCoord4fv(const GLfloat *v); }
3486 void OVR::GLEContext::glTexCoord4fv_Hook(const GLfloat *v)
3487 {
3488 glTexCoord4fv(v);
3489 PostHook(GLE_CURRENT_FUNCTION);
3490 }
3492 #undef glTexCoord4i
3493 extern "C" { GLAPI void GLAPIENTRY glTexCoord4i(GLint s, GLint t, GLint r, GLint q); }
3494 void OVR::GLEContext::glTexCoord4i_Hook(GLint s, GLint t, GLint r, GLint q)
3495 {
3496 glTexCoord4i(s, t, r, q);
3497 PostHook(GLE_CURRENT_FUNCTION);
3498 }
3500 #undef glTexCoord4iv
3501 extern "C" { GLAPI void GLAPIENTRY glTexCoord4iv(const GLint *v); }
3502 void OVR::GLEContext::glTexCoord4iv_Hook(const GLint *v)
3503 {
3504 glTexCoord4iv(v);
3505 PostHook(GLE_CURRENT_FUNCTION);
3506 }
3508 #undef glTexCoord4s
3509 extern "C" { GLAPI void GLAPIENTRY glTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q); }
3510 void OVR::GLEContext::glTexCoord4s_Hook(GLshort s, GLshort t, GLshort r, GLshort q)
3511 {
3512 glTexCoord4s(s, t, r, q);
3513 PostHook(GLE_CURRENT_FUNCTION);
3514 }
3516 #undef glTexCoord4sv
3517 extern "C" { GLAPI void GLAPIENTRY glTexCoord4sv(const GLshort *v); }
3518 void OVR::GLEContext::glTexCoord4sv_Hook(const GLshort *v)
3519 {
3520 glTexCoord4sv(v);
3521 PostHook(GLE_CURRENT_FUNCTION);
3522 }
3524 #undef glTexCoordPointer
3525 extern "C" { GLAPI void GLAPIENTRY glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer); }
3526 void OVR::GLEContext::glTexCoordPointer_Hook(GLint size, GLenum type, GLsizei stride, const void *pointer)
3527 {
3528 glTexCoordPointer(size, type, stride, pointer);
3529 PostHook(GLE_CURRENT_FUNCTION);
3530 }
3532 #undef glTexEnvf
3533 extern "C" { GLAPI void GLAPIENTRY glTexEnvf(GLenum target, GLenum pname, GLfloat param); }
3534 void OVR::GLEContext::glTexEnvf_Hook(GLenum target, GLenum pname, GLfloat param)
3535 {
3536 glTexEnvf(target, pname, param);
3537 PostHook(GLE_CURRENT_FUNCTION);
3538 }
3540 #undef glTexEnvfv
3541 extern "C" { GLAPI void GLAPIENTRY glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params); }
3542 void OVR::GLEContext::glTexEnvfv_Hook(GLenum target, GLenum pname, const GLfloat *params)
3543 {
3544 glTexEnvfv(target, pname, params);
3545 PostHook(GLE_CURRENT_FUNCTION);
3546 }
3548 #undef glTexEnvi
3549 extern "C" { GLAPI void GLAPIENTRY glTexEnvi(GLenum target, GLenum pname, GLint param); }
3550 void OVR::GLEContext::glTexEnvi_Hook(GLenum target, GLenum pname, GLint param)
3551 {
3552 glTexEnvi(target, pname, param);
3553 PostHook(GLE_CURRENT_FUNCTION);
3554 }
3556 #undef glTexEnviv
3557 extern "C" { GLAPI void GLAPIENTRY glTexEnviv(GLenum target, GLenum pname, const GLint *params); }
3558 void OVR::GLEContext::glTexEnviv_Hook(GLenum target, GLenum pname, const GLint *params)
3559 {
3560 glTexEnviv(target, pname, params);
3561 PostHook(GLE_CURRENT_FUNCTION);
3562 }
3564 #undef glTexGend
3565 extern "C" { GLAPI void GLAPIENTRY glTexGend(GLenum coord, GLenum pname, GLdouble param); }
3566 void OVR::GLEContext::glTexGend_Hook(GLenum coord, GLenum pname, GLdouble param)
3567 {
3568 glTexGend(coord, pname, param);
3569 PostHook(GLE_CURRENT_FUNCTION);
3570 }
3572 #undef glTexGendv
3573 extern "C" { GLAPI void GLAPIENTRY glTexGendv(GLenum coord, GLenum pname, const GLdouble *params); }
3574 void OVR::GLEContext::glTexGendv_Hook(GLenum coord, GLenum pname, const GLdouble *params)
3575 {
3576 glTexGendv(coord, pname, params);
3577 PostHook(GLE_CURRENT_FUNCTION);
3578 }
3580 #undef glTexGenf
3581 extern "C" { GLAPI void GLAPIENTRY glTexGenf(GLenum coord, GLenum pname, GLfloat param); }
3582 void OVR::GLEContext::glTexGenf_Hook(GLenum coord, GLenum pname, GLfloat param)
3583 {
3584 glTexGenf(coord, pname, param);
3585 PostHook(GLE_CURRENT_FUNCTION);
3586 }
3588 #undef glTexGenfv
3589 extern "C" { GLAPI void GLAPIENTRY glTexGenfv(GLenum coord, GLenum pname, const GLfloat *params); }
3590 void OVR::GLEContext::glTexGenfv_Hook(GLenum coord, GLenum pname, const GLfloat *params)
3591 {
3592 glTexGenfv(coord, pname, params);
3593 PostHook(GLE_CURRENT_FUNCTION);
3594 }
3596 #undef glTexGeni
3597 extern "C" { GLAPI void GLAPIENTRY glTexGeni(GLenum coord, GLenum pname, GLint param); }
3598 void OVR::GLEContext::glTexGeni_Hook(GLenum coord, GLenum pname, GLint param)
3599 {
3600 glTexGeni(coord, pname, param);
3601 PostHook(GLE_CURRENT_FUNCTION);
3602 }
3604 #undef glTexGeniv
3605 extern "C" { GLAPI void GLAPIENTRY glTexGeniv(GLenum coord, GLenum pname, const GLint *params); }
3606 void OVR::GLEContext::glTexGeniv_Hook(GLenum coord, GLenum pname, const GLint *params)
3607 {
3608 glTexGeniv(coord, pname, params);
3609 PostHook(GLE_CURRENT_FUNCTION);
3610 }
3612 #undef glTexImage1D
3613 extern "C" { GLAPI void GLAPIENTRY glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels); }
3614 void OVR::GLEContext::glTexImage1D_Hook(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels)
3615 {
3616 glTexImage1D(target, level, internalformat, width, border, format, type, pixels);
3617 PostHook(GLE_CURRENT_FUNCTION);
3618 }
3620 #undef glTexImage2D
3621 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); }
3622 void OVR::GLEContext::glTexImage2D_Hook(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
3623 {
3624 glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
3625 PostHook(GLE_CURRENT_FUNCTION);
3626 }
3628 #undef glTexParameterf
3629 extern "C" { GLAPI void GLAPIENTRY glTexParameterf(GLenum target, GLenum pname, GLfloat param); }
3630 void OVR::GLEContext::glTexParameterf_Hook(GLenum target, GLenum pname, GLfloat param)
3631 {
3632 glTexParameterf(target, pname, param);
3633 PostHook(GLE_CURRENT_FUNCTION);
3634 }
3636 #undef glTexParameterfv
3637 extern "C" { GLAPI void GLAPIENTRY glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params); }
3638 void OVR::GLEContext::glTexParameterfv_Hook(GLenum target, GLenum pname, const GLfloat *params)
3639 {
3640 glTexParameterfv(target, pname, params);
3641 PostHook(GLE_CURRENT_FUNCTION);
3642 }
3644 #undef glTexParameteri
3645 extern "C" { GLAPI void GLAPIENTRY glTexParameteri(GLenum target, GLenum pname, GLint param); }
3646 void OVR::GLEContext::glTexParameteri_Hook(GLenum target, GLenum pname, GLint param)
3647 {
3648 glTexParameteri(target, pname, param);
3649 PostHook(GLE_CURRENT_FUNCTION);
3650 }
3652 #undef glTexParameteriv
3653 extern "C" { GLAPI void GLAPIENTRY glTexParameteriv(GLenum target, GLenum pname, const GLint *params); }
3654 void OVR::GLEContext::glTexParameteriv_Hook(GLenum target, GLenum pname, const GLint *params)
3655 {
3656 glTexParameteriv(target, pname, params);
3657 PostHook(GLE_CURRENT_FUNCTION);
3658 }
3660 #undef glTexSubImage1D
3661 extern "C" { GLAPI void GLAPIENTRY glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels); }
3662 void OVR::GLEContext::glTexSubImage1D_Hook(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels)
3663 {
3664 glTexSubImage1D(target, level, xoffset, width, format, type, pixels);
3665 PostHook(GLE_CURRENT_FUNCTION);
3666 }
3668 #undef glTexSubImage2D
3669 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); }
3670 void OVR::GLEContext::glTexSubImage2D_Hook(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
3671 {
3672 glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
3673 PostHook(GLE_CURRENT_FUNCTION);
3674 }
3676 #undef glTranslated
3677 extern "C" { GLAPI void GLAPIENTRY glTranslated(GLdouble x, GLdouble y, GLdouble z); }
3678 void OVR::GLEContext::glTranslated_Hook(GLdouble x, GLdouble y, GLdouble z)
3679 {
3680 glTranslated(x, y, z);
3681 PostHook(GLE_CURRENT_FUNCTION);
3682 }
3684 #undef glTranslatef
3685 extern "C" { GLAPI void GLAPIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z); }
3686 void OVR::GLEContext::glTranslatef_Hook(GLfloat x, GLfloat y, GLfloat z)
3687 {
3688 glTranslatef(x, y, z);
3689 PostHook(GLE_CURRENT_FUNCTION);
3690 }
3692 #undef glVertex2d
3693 extern "C" { GLAPI void GLAPIENTRY glVertex2d(GLdouble x, GLdouble y); }
3694 void OVR::GLEContext::glVertex2d_Hook(GLdouble x, GLdouble y)
3695 {
3696 glVertex2d(x, y);
3697 PostHook(GLE_CURRENT_FUNCTION);
3698 }
3700 #undef glVertex2dv
3701 extern "C" { GLAPI void GLAPIENTRY glVertex2dv(const GLdouble *v); }
3702 void OVR::GLEContext::glVertex2dv_Hook(const GLdouble *v)
3703 {
3704 glVertex2dv(v);
3705 PostHook(GLE_CURRENT_FUNCTION);
3706 }
3708 #undef glVertex2f
3709 extern "C" { GLAPI void GLAPIENTRY glVertex2f(GLfloat x, GLfloat y); }
3710 void OVR::GLEContext::glVertex2f_Hook(GLfloat x, GLfloat y)
3711 {
3712 glVertex2f(x, y);
3713 PostHook(GLE_CURRENT_FUNCTION);
3714 }
3716 #undef glVertex2fv
3717 extern "C" { GLAPI void GLAPIENTRY glVertex2fv(const GLfloat *v); }
3718 void OVR::GLEContext::glVertex2fv_Hook(const GLfloat *v)
3719 {
3720 glVertex2fv(v);
3721 PostHook(GLE_CURRENT_FUNCTION);
3722 }
3724 #undef glVertex2i
3725 extern "C" { GLAPI void GLAPIENTRY glVertex2i(GLint x, GLint y); }
3726 void OVR::GLEContext::glVertex2i_Hook(GLint x, GLint y)
3727 {
3728 glVertex2i(x, y);
3729 PostHook(GLE_CURRENT_FUNCTION);
3730 }
3732 #undef glVertex2iv
3733 extern "C" { GLAPI void GLAPIENTRY glVertex2iv(const GLint *v); }
3734 void OVR::GLEContext::glVertex2iv_Hook(const GLint *v)
3735 {
3736 glVertex2iv(v);
3737 PostHook(GLE_CURRENT_FUNCTION);
3738 }
3740 #undef glVertex2s
3741 extern "C" { GLAPI void GLAPIENTRY glVertex2s(GLshort x, GLshort y); }
3742 void OVR::GLEContext::glVertex2s_Hook(GLshort x, GLshort y)
3743 {
3744 glVertex2s(x, y);
3745 PostHook(GLE_CURRENT_FUNCTION);
3746 }
3748 #undef glVertex2sv
3749 extern "C" { GLAPI void GLAPIENTRY glVertex2sv(const GLshort *v); }
3750 void OVR::GLEContext::glVertex2sv_Hook(const GLshort *v)
3751 {
3752 glVertex2sv(v);
3753 PostHook(GLE_CURRENT_FUNCTION);
3754 }
3756 #undef glVertex3d
3757 extern "C" { GLAPI void GLAPIENTRY glVertex3d(GLdouble x, GLdouble y, GLdouble z); }
3758 void OVR::GLEContext::glVertex3d_Hook(GLdouble x, GLdouble y, GLdouble z)
3759 {
3760 glVertex3d(x, y, z);
3761 PostHook(GLE_CURRENT_FUNCTION);
3762 }
3764 #undef glVertex3dv
3765 extern "C" { GLAPI void GLAPIENTRY glVertex3dv(const GLdouble *v); }
3766 void OVR::GLEContext::glVertex3dv_Hook(const GLdouble *v)
3767 {
3768 glVertex3dv(v);
3769 PostHook(GLE_CURRENT_FUNCTION);
3770 }
3772 #undef glVertex3f
3773 extern "C" { GLAPI void GLAPIENTRY glVertex3f(GLfloat x, GLfloat y, GLfloat z); }
3774 void OVR::GLEContext::glVertex3f_Hook(GLfloat x, GLfloat y, GLfloat z)
3775 {
3776 glVertex3f(x, y, z);
3777 PostHook(GLE_CURRENT_FUNCTION);
3778 }
3780 #undef glVertex3fv
3781 extern "C" { GLAPI void GLAPIENTRY glVertex3fv(const GLfloat *v); }
3782 void OVR::GLEContext::glVertex3fv_Hook(const GLfloat *v)
3783 {
3784 glVertex3fv(v);
3785 PostHook(GLE_CURRENT_FUNCTION);
3786 }
3788 #undef glVertex3i
3789 extern "C" { GLAPI void GLAPIENTRY glVertex3i(GLint x, GLint y, GLint z); }
3790 void OVR::GLEContext::glVertex3i_Hook(GLint x, GLint y, GLint z)
3791 {
3792 glVertex3i(x, y, z);
3793 PostHook(GLE_CURRENT_FUNCTION);
3794 }
3796 #undef glVertex3iv
3797 extern "C" { GLAPI void GLAPIENTRY glVertex3iv(const GLint *v); }
3798 void OVR::GLEContext::glVertex3iv_Hook(const GLint *v)
3799 {
3800 glVertex3iv(v);
3801 PostHook(GLE_CURRENT_FUNCTION);
3802 }
3804 #undef glVertex3s
3805 extern "C" { GLAPI void GLAPIENTRY glVertex3s(GLshort x, GLshort y, GLshort z); }
3806 void OVR::GLEContext::glVertex3s_Hook(GLshort x, GLshort y, GLshort z)
3807 {
3808 glVertex3s(x, y, z);
3809 PostHook(GLE_CURRENT_FUNCTION);
3810 }
3812 #undef glVertex3sv
3813 extern "C" { GLAPI void GLAPIENTRY glVertex3sv(const GLshort *v); }
3814 void OVR::GLEContext::glVertex3sv_Hook(const GLshort *v)
3815 {
3816 glVertex3sv(v);
3817 PostHook(GLE_CURRENT_FUNCTION);
3818 }
3820 #undef glVertex4d
3821 extern "C" { GLAPI void GLAPIENTRY glVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w); }
3822 void OVR::GLEContext::glVertex4d_Hook(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
3823 {
3824 glVertex4d(x, y, z, w);
3825 PostHook(GLE_CURRENT_FUNCTION);
3826 }
3828 #undef glVertex4dv
3829 extern "C" { GLAPI void GLAPIENTRY glVertex4dv(const GLdouble *v); }
3830 void OVR::GLEContext::glVertex4dv_Hook(const GLdouble *v)
3831 {
3832 glVertex4dv(v);
3833 PostHook(GLE_CURRENT_FUNCTION);
3834 }
3836 #undef glVertex4f
3837 extern "C" { GLAPI void GLAPIENTRY glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w); }
3838 void OVR::GLEContext::glVertex4f_Hook(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
3839 {
3840 glVertex4f(x, y, z, w);
3841 PostHook(GLE_CURRENT_FUNCTION);
3842 }
3844 #undef glVertex4fv
3845 extern "C" { GLAPI void GLAPIENTRY glVertex4fv(const GLfloat *v); }
3846 void OVR::GLEContext::glVertex4fv_Hook(const GLfloat *v)
3847 {
3848 glVertex4fv(v);
3849 PostHook(GLE_CURRENT_FUNCTION);
3850 }
3852 #undef glVertex4i
3853 extern "C" { GLAPI void GLAPIENTRY glVertex4i(GLint x, GLint y, GLint z, GLint w); }
3854 void OVR::GLEContext::glVertex4i_Hook(GLint x, GLint y, GLint z, GLint w)
3855 {
3856 glVertex4i(x, y, z, w);
3857 PostHook(GLE_CURRENT_FUNCTION);
3858 }
3860 #undef glVertex4iv
3861 extern "C" { GLAPI void GLAPIENTRY glVertex4iv(const GLint *v); }
3862 void OVR::GLEContext::glVertex4iv_Hook(const GLint *v)
3863 {
3864 glVertex4iv(v);
3865 PostHook(GLE_CURRENT_FUNCTION);
3866 }
3868 #undef glVertex4s
3869 extern "C" { GLAPI void GLAPIENTRY glVertex4s(GLshort x, GLshort y, GLshort z, GLshort w); }
3870 void OVR::GLEContext::glVertex4s_Hook(GLshort x, GLshort y, GLshort z, GLshort w)
3871 {
3872 glVertex4s(x, y, z, w);
3873 PostHook(GLE_CURRENT_FUNCTION);
3874 }
3876 #undef glVertex4sv
3877 extern "C" { GLAPI void GLAPIENTRY glVertex4sv(const GLshort *v); }
3878 void OVR::GLEContext::glVertex4sv_Hook(const GLshort *v)
3879 {
3880 glVertex4sv(v);
3881 PostHook(GLE_CURRENT_FUNCTION);
3882 }
3884 #undef glVertexPointer
3885 extern "C" { GLAPI void GLAPIENTRY glVertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer); }
3886 void OVR::GLEContext::glVertexPointer_Hook(GLint size, GLenum type, GLsizei stride, const void *pointer)
3887 {
3888 glVertexPointer(size, type, stride, pointer);
3889 PostHook(GLE_CURRENT_FUNCTION);
3890 }
3892 #undef glViewport
3893 extern "C" { GLAPI void GLAPIENTRY glViewport(GLint x, GLint y, GLsizei width, GLsizei height); }
3894 void OVR::GLEContext::glViewport_Hook(GLint x, GLint y, GLsizei width, GLsizei height)
3895 {
3896 glViewport(x, y, width, height);
3897 PostHook(GLE_CURRENT_FUNCTION);
3898 }
3902 // Pointer-based functions
3903 void OVR::GLEContext::glBlendColor_Hook(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
3904 {
3905 if(glBlendColor_Impl)
3906 glBlendColor_Impl(red, green, blue, alpha);
3907 PostHook(GLE_CURRENT_FUNCTION);
3908 }
3910 void OVR::GLEContext::glBlendEquation_Hook(GLenum mode)
3911 {
3912 if(glBlendEquation_Impl)
3913 glBlendEquation_Impl(mode);
3914 PostHook(GLE_CURRENT_FUNCTION);
3915 }
3917 void OVR::GLEContext::glDrawRangeElements_Hook(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)
3918 {
3919 if(glDrawRangeElements_Impl)
3920 glDrawRangeElements_Impl(mode, start, end, count, type, indices);
3921 PostHook(GLE_CURRENT_FUNCTION);
3922 }
3924 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)
3925 {
3926 if(glTexImage3D_Impl)
3927 glTexImage3D_Impl(target, level, internalformat, width, height, depth, border, format, type, pixels);
3928 PostHook(GLE_CURRENT_FUNCTION);
3929 }
3931 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)
3932 {
3933 if(glTexSubImage3D_Impl)
3934 glTexSubImage3D_Impl(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
3935 PostHook(GLE_CURRENT_FUNCTION);
3936 }
3939 void OVR::GLEContext::glCopyTexSubImage3D_Hook(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
3940 {
3941 if(glCopyTexSubImage3D_Impl)
3942 glCopyTexSubImage3D_Impl(target, level, xoffset, yoffset, zoffset, x, y, width, height);
3943 PostHook(GLE_CURRENT_FUNCTION);
3944 }
3946 // GL_VERSION_1_2 deprecated functions
3947 /* Not currently supported
3948 void OVR::GLEContext::glColorTable_Hook(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)
3949 {
3950 if(glColorTable_Impl)
3951 glColorTable_Impl(target, internalformat, width, format, type, table);
3952 PostHook(GLE_CURRENT_FUNCTION);
3953 }
3955 void OVR::GLEContext::glColorTableParameterfv_Hook(GLenum target, GLenum pname, const GLfloat *params)
3956 {
3957 if(glColorTableParameterfv_Impl)
3958 glColorTableParameterfv_Impl(target, pname, params);
3959 PostHook(GLE_CURRENT_FUNCTION);
3960 }
3962 void OVR::GLEContext::glColorTableParameteriv_Hook(GLenum target, GLenum pname, const GLint *params)
3963 {
3964 if(glColorTableParameteriv_Impl)
3965 glColorTableParameteriv_Impl(target, pname, params);
3966 PostHook(GLE_CURRENT_FUNCTION);
3967 }
3969 void OVR::GLEContext::glCopyColorTable_Hook(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
3970 {
3971 if(glCopyColorTable_Impl)
3972 glCopyColorTable_Impl(target, internalformat, x, y, width);
3973 PostHook(GLE_CURRENT_FUNCTION);
3974 }
3976 void OVR::GLEContext::glGetColorTable_Hook(GLenum target, GLenum format, GLenum type, GLvoid *table)
3977 {
3978 if(glGetColorTable_Impl)
3979 glGetColorTable_Impl(target, format, type, table);
3980 PostHook(GLE_CURRENT_FUNCTION);
3981 }
3983 void OVR::GLEContext::glGetColorTableParameterfv_Hook(GLenum target, GLenum pname, GLfloat *params)
3984 {
3985 if(glGetColorTableParameterfv_Impl)
3986 glGetColorTableParameterfv_Impl(target, pname, params);
3987 PostHook(GLE_CURRENT_FUNCTION);
3988 }
3990 void OVR::GLEContext::glGetColorTableParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
3991 {
3992 if(glGetColorTableParameteriv_Impl)
3993 glGetColorTableParameteriv_Impl(target, pname, params);
3994 PostHook(GLE_CURRENT_FUNCTION);
3995 }
3997 void OVR::GLEContext::glColorSubTable_Hook(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data)
3998 {
3999 if(glColorSubTable_Impl)
4000 glColorSubTable_Impl(target, start, count, format, type, data);
4001 PostHook(GLE_CURRENT_FUNCTION);
4002 }
4004 void OVR::GLEContext::glCopyColorSubTable_Hook(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)
4005 {
4006 if(glCopyColorSubTable_Impl)
4007 glCopyColorSubTable_Impl(target, start, x, y, width);
4008 PostHook(GLE_CURRENT_FUNCTION);
4009 }
4011 void OVR::GLEContext::glConvolutionFilter1D_Hook(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)
4012 {
4013 if(glConvolutionFilter1D_Impl)
4014 glConvolutionFilter1D_Impl(target, internalformat, width, format, type, image);
4015 PostHook(GLE_CURRENT_FUNCTION);
4016 }
4018 void OVR::GLEContext::glConvolutionFilter2D_Hook(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
4019 {
4020 if(glConvolutionFilter2D_Impl)
4021 glConvolutionFilter2D_Impl(target, internalformat, width, height, format, type, image);
4022 PostHook(GLE_CURRENT_FUNCTION);
4023 }
4025 void OVR::GLEContext::glConvolutionParameterf_Hook(GLenum target, GLenum pname, GLfloat params)
4026 {
4027 if(glConvolutionParameterf_Impl)
4028 glConvolutionParameterf_Impl(target, pname, params);
4029 PostHook(GLE_CURRENT_FUNCTION);
4030 }
4032 void OVR::GLEContext::glConvolutionParameterfv_Hook(GLenum target, GLenum pname, const GLfloat *params)
4033 {
4034 if(glConvolutionParameterfv_Impl)
4035 glConvolutionParameterfv_Impl(target, pname, params);
4036 PostHook(GLE_CURRENT_FUNCTION);
4037 }
4039 void OVR::GLEContext::glConvolutionParameteri_Hook(GLenum target, GLenum pname, GLint params)
4040 {
4041 if(glConvolutionParameteri_Impl)
4042 glConvolutionParameteri_Impl(target, pname, params);
4043 PostHook(GLE_CURRENT_FUNCTION);
4044 }
4046 void OVR::GLEContext::glConvolutionParameteriv_Hook(GLenum target, GLenum pname, const GLint *params)
4047 {
4048 if(glConvolutionParameteriv_Impl)
4049 glConvolutionParameteriv_Impl(target, pname, params);
4050 PostHook(GLE_CURRENT_FUNCTION);
4051 }
4053 void OVR::GLEContext::glCopyConvolutionFilter1D_Hook(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
4054 {
4055 if(glCopyConvolutionFilter1D_Impl)
4056 glCopyConvolutionFilter1D_Impl(target, internalformat, x, y, width);
4057 PostHook(GLE_CURRENT_FUNCTION);
4058 }
4060 void OVR::GLEContext::glCopyConvolutionFilter2D_Hook(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
4061 {
4062 if(glCopyConvolutionFilter2D_Impl)
4063 glCopyConvolutionFilter2D_Impl(target, internalformat, x, y, width, height);
4064 PostHook(GLE_CURRENT_FUNCTION);
4065 }
4067 void OVR::GLEContext::glGetConvolutionFilter_Hook(GLenum target, GLenum format, GLenum type, GLvoid *image)
4068 {
4069 if(glGetConvolutionFilter_Impl)
4070 glGetConvolutionFilter_Impl(target, format, type, image);
4071 PostHook(GLE_CURRENT_FUNCTION);
4072 }
4074 void OVR::GLEContext::glGetConvolutionParameterfv_Hook(GLenum target, GLenum pname, GLfloat *params)
4075 {
4076 if(glGetConvolutionParameterfv_Impl)
4077 glGetConvolutionParameterfv_Impl(target, pname, params);
4078 PostHook(GLE_CURRENT_FUNCTION);
4079 }
4081 void OVR::GLEContext::glGetConvolutionParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
4082 {
4083 if(glGetConvolutionParameteriv_Impl)
4084 glGetConvolutionParameteriv_Impl(target, pname, params);
4085 PostHook(GLE_CURRENT_FUNCTION);
4086 }
4088 void OVR::GLEContext::glGetSeparableFilter_Hook(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)
4089 {
4090 if(glGetSeparableFilter_Impl)
4091 glGetSeparableFilter_Impl(target, format, type, row, column, span);
4092 PostHook(GLE_CURRENT_FUNCTION);
4093 }
4095 void OVR::GLEContext::glSeparableFilter2D_Hook(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)
4096 {
4097 if(glSeparableFilter2D_Impl)
4098 glSeparableFilter2D_Impl(target, internalformat, width, height, format, type, row, column);
4099 PostHook(GLE_CURRENT_FUNCTION);
4100 }
4102 void OVR::GLEContext::glGetHistogram_Hook(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
4103 {
4104 if(glGetHistogram_Impl)
4105 glGetHistogram_Impl(target, reset, format, type, values);
4106 PostHook(GLE_CURRENT_FUNCTION);
4107 }
4109 void OVR::GLEContext::glGetHistogramParameterfv_Hook(GLenum target, GLenum pname, GLfloat *params)
4110 {
4111 if(glGetHistogramParameterfv_Impl)
4112 glGetHistogramParameterfv_Impl(target, pname, params);
4113 PostHook(GLE_CURRENT_FUNCTION);
4114 }
4116 void OVR::GLEContext::glGetHistogramParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
4117 {
4118 if(glGetHistogramParameteriv_Impl)
4119 glGetHistogramParameteriv_Impl(target, pname, params);
4120 PostHook(GLE_CURRENT_FUNCTION);
4121 }
4123 void OVR::GLEContext::glGetMinmax_Hook(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
4124 {
4125 if(glGetMinmax_Impl)
4126 glGetMinmax_Impl(target, reset, format, type, values);
4127 PostHook(GLE_CURRENT_FUNCTION);
4128 }
4130 void OVR::GLEContext::glGetMinmaxParameterfv_Hook(GLenum target, GLenum pname, GLfloat *params)
4131 {
4132 if(glGetMinmaxParameterfv_Impl)
4133 glGetMinmaxParameterfv_Impl(target, pname, params);
4134 PostHook(GLE_CURRENT_FUNCTION);
4135 }
4137 void OVR::GLEContext::glGetMinmaxParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
4138 {
4139 if(glGetMinmaxParameteriv_Impl)
4140 glGetMinmaxParameteriv_Impl(target, pname, params);
4141 PostHook(GLE_CURRENT_FUNCTION);
4142 }
4144 void OVR::GLEContext::glHistogram_Hook(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)
4145 {
4146 if(glHistogram_Impl)
4147 glHistogram_Impl(target, width, internalformat, sink);
4148 PostHook(GLE_CURRENT_FUNCTION);
4149 }
4151 void OVR::GLEContext::glMinmax_Hook(GLenum target, GLenum internalformat, GLboolean sink)
4152 {
4153 if(glMinmax_Impl)
4154 glMinmax_Impl(target, internalformat, sink);
4155 PostHook(GLE_CURRENT_FUNCTION);
4156 }
4158 void OVR::GLEContext::glResetHistogram_Hook(GLenum target)
4159 {
4160 if(glResetHistogram_Impl)
4161 glResetHistogram_Impl(target);
4162 PostHook(GLE_CURRENT_FUNCTION);
4163 }
4165 void OVR::GLEContext::glResetMinmax_Hook(GLenum target)
4166 {
4167 if(glResetMinmax_Impl)
4168 glResetMinmax_Impl(target);
4169 PostHook(GLE_CURRENT_FUNCTION);
4170 }
4171 */
4173 // GL_VERSION_1_3
4174 void OVR::GLEContext::glActiveTexture_Hook(GLenum texture)
4175 {
4176 if(glActiveTexture_Impl)
4177 glActiveTexture_Impl(texture);
4178 PostHook(GLE_CURRENT_FUNCTION);
4179 }
4181 void OVR::GLEContext::glSampleCoverage_Hook(GLclampf value, GLboolean invert)
4182 {
4183 if(glSampleCoverage_Impl)
4184 glSampleCoverage_Impl(value, invert);
4185 PostHook(GLE_CURRENT_FUNCTION);
4186 }
4188 void OVR::GLEContext::glCompressedTexImage3D_Hook(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)
4189 {
4190 if(glCompressedTexImage3D_Impl)
4191 glCompressedTexImage3D_Impl(target, level, internalformat, width, height, depth, border, imageSize, data);
4192 PostHook(GLE_CURRENT_FUNCTION);
4193 }
4195 void OVR::GLEContext::glCompressedTexImage2D_Hook(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
4196 {
4197 if(glCompressedTexImage2D_Impl)
4198 glCompressedTexImage2D_Impl(target, level, internalformat, width, height, border, imageSize, data);
4199 PostHook(GLE_CURRENT_FUNCTION);
4200 }
4202 void OVR::GLEContext::glCompressedTexImage1D_Hook(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)
4203 {
4204 if(glCompressedTexImage1D_Impl)
4205 glCompressedTexImage1D_Impl(target, level, internalformat, width, border, imageSize, data);
4206 PostHook(GLE_CURRENT_FUNCTION);
4207 }
4209 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)
4210 {
4211 if(glCompressedTexSubImage3D_Impl)
4212 glCompressedTexSubImage3D_Impl(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
4213 PostHook(GLE_CURRENT_FUNCTION);
4214 }
4216 void OVR::GLEContext::glCompressedTexSubImage2D_Hook(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
4217 {
4218 if(glCompressedTexSubImage2D_Impl)
4219 glCompressedTexSubImage2D_Impl(target, level, xoffset, yoffset, width, height, format, imageSize, data);
4220 PostHook(GLE_CURRENT_FUNCTION);
4221 }
4223 void OVR::GLEContext::glCompressedTexSubImage1D_Hook(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)
4224 {
4225 if(glCompressedTexSubImage1D_Impl)
4226 glCompressedTexSubImage1D_Impl(target, level, xoffset, width, format, imageSize, data);
4227 PostHook(GLE_CURRENT_FUNCTION);
4228 }
4230 void OVR::GLEContext::glGetCompressedTexImage_Hook(GLenum target, GLint level, GLvoid *img)
4231 {
4232 if(glGetCompressedTexImage_Impl)
4233 glGetCompressedTexImage_Impl(target, level, img);
4234 PostHook(GLE_CURRENT_FUNCTION);
4235 }
4238 // GL_VERSION_1_3 deprecated functions
4239 void OVR::GLEContext::glClientActiveTexture_Hook(GLenum texture)
4240 {
4241 if(glClientActiveTexture_Impl)
4242 glClientActiveTexture_Impl(texture);
4243 PostHook(GLE_CURRENT_FUNCTION);
4244 }
4246 void OVR::GLEContext::glMultiTexCoord1d_Hook(GLenum target, GLdouble s)
4247 {
4248 if(glMultiTexCoord1d_Impl)
4249 glMultiTexCoord1d_Impl(target, s);
4250 PostHook(GLE_CURRENT_FUNCTION);
4251 }
4253 void OVR::GLEContext::glMultiTexCoord1dv_Hook(GLenum target, const GLdouble *v)
4254 {
4255 if(glMultiTexCoord1dv_Impl)
4256 glMultiTexCoord1dv_Impl(target, v);
4257 PostHook(GLE_CURRENT_FUNCTION);
4258 }
4260 void OVR::GLEContext::glMultiTexCoord1f_Hook(GLenum target, GLfloat s)
4261 {
4262 if(glMultiTexCoord1f_Impl)
4263 glMultiTexCoord1f_Impl(target, s);
4264 PostHook(GLE_CURRENT_FUNCTION);
4265 }
4267 void OVR::GLEContext::glMultiTexCoord1fv_Hook(GLenum target, const GLfloat *v)
4268 {
4269 if(glMultiTexCoord1fv_Impl)
4270 glMultiTexCoord1fv_Impl(target, v);
4271 PostHook(GLE_CURRENT_FUNCTION);
4272 }
4274 void OVR::GLEContext::glMultiTexCoord1i_Hook(GLenum target, GLint s)
4275 {
4276 if(glMultiTexCoord1i_Impl)
4277 glMultiTexCoord1i_Impl(target, s);
4278 PostHook(GLE_CURRENT_FUNCTION);
4279 }
4281 void OVR::GLEContext::glMultiTexCoord1iv_Hook(GLenum target, const GLint *v)
4282 {
4283 if(glMultiTexCoord1iv_Impl)
4284 glMultiTexCoord1iv_Impl(target, v);
4285 PostHook(GLE_CURRENT_FUNCTION);
4286 }
4288 void OVR::GLEContext::glMultiTexCoord1s_Hook(GLenum target, GLshort s)
4289 {
4290 if(glMultiTexCoord1s_Impl)
4291 glMultiTexCoord1s_Impl(target, s);
4292 PostHook(GLE_CURRENT_FUNCTION);
4293 }
4295 void OVR::GLEContext::glMultiTexCoord1sv_Hook(GLenum target, const GLshort *v)
4296 {
4297 if(glMultiTexCoord1sv_Impl)
4298 glMultiTexCoord1sv_Impl(target, v);
4299 PostHook(GLE_CURRENT_FUNCTION);
4300 }
4302 void OVR::GLEContext::glMultiTexCoord2d_Hook(GLenum target, GLdouble s, GLdouble t)
4303 {
4304 if(glMultiTexCoord2d_Impl)
4305 glMultiTexCoord2d_Impl(target, s, t);
4306 PostHook(GLE_CURRENT_FUNCTION);
4307 }
4309 void OVR::GLEContext::glMultiTexCoord2dv_Hook(GLenum target, const GLdouble *v)
4310 {
4311 if(glMultiTexCoord2dv_Impl)
4312 glMultiTexCoord2dv_Impl(target, v);
4313 PostHook(GLE_CURRENT_FUNCTION);
4314 }
4316 void OVR::GLEContext::glMultiTexCoord2f_Hook(GLenum target, GLfloat s, GLfloat t)
4317 {
4318 if(glMultiTexCoord2f_Impl)
4319 glMultiTexCoord2f_Impl(target, s, t);
4320 PostHook(GLE_CURRENT_FUNCTION);
4321 }
4323 void OVR::GLEContext::glMultiTexCoord2fv_Hook(GLenum target, const GLfloat *v)
4324 {
4325 if(glMultiTexCoord2fv_Impl)
4326 glMultiTexCoord2fv_Impl(target, v);
4327 PostHook(GLE_CURRENT_FUNCTION);
4328 }
4330 void OVR::GLEContext::glMultiTexCoord2i_Hook(GLenum target, GLint s, GLint t)
4331 {
4332 if(glMultiTexCoord2i_Impl)
4333 glMultiTexCoord2i_Impl(target, s, t);
4334 PostHook(GLE_CURRENT_FUNCTION);
4335 }
4337 void OVR::GLEContext::glMultiTexCoord2iv_Hook(GLenum target, const GLint *v)
4338 {
4339 if(glMultiTexCoord2iv_Impl)
4340 glMultiTexCoord2iv_Impl(target, v);
4341 PostHook(GLE_CURRENT_FUNCTION);
4342 }
4344 void OVR::GLEContext::glMultiTexCoord2s_Hook(GLenum target, GLshort s, GLshort t)
4345 {
4346 if(glMultiTexCoord2s_Impl)
4347 glMultiTexCoord2s_Impl(target, s, t);
4348 PostHook(GLE_CURRENT_FUNCTION);
4349 }
4351 void OVR::GLEContext::glMultiTexCoord2sv_Hook(GLenum target, const GLshort *v)
4352 {
4353 if(glMultiTexCoord2sv_Impl)
4354 glMultiTexCoord2sv_Impl(target, v);
4355 PostHook(GLE_CURRENT_FUNCTION);
4356 }
4358 void OVR::GLEContext::glMultiTexCoord3d_Hook(GLenum target, GLdouble s, GLdouble t, GLdouble r)
4359 {
4360 if(glMultiTexCoord3d_Impl)
4361 glMultiTexCoord3d_Impl(target, s, t, r);
4362 PostHook(GLE_CURRENT_FUNCTION);
4363 }
4365 void OVR::GLEContext::glMultiTexCoord3dv_Hook(GLenum target, const GLdouble *v)
4366 {
4367 if(glMultiTexCoord3dv_Impl)
4368 glMultiTexCoord3dv_Impl(target, v);
4369 PostHook(GLE_CURRENT_FUNCTION);
4370 }
4372 void OVR::GLEContext::glMultiTexCoord3f_Hook(GLenum target, GLfloat s, GLfloat t, GLfloat r)
4373 {
4374 if(glMultiTexCoord3f_Impl)
4375 glMultiTexCoord3f_Impl(target, s, t, r);
4376 PostHook(GLE_CURRENT_FUNCTION);
4377 }
4379 void OVR::GLEContext::glMultiTexCoord3fv_Hook(GLenum target, const GLfloat *v)
4380 {
4381 if(glMultiTexCoord3fv_Impl)
4382 glMultiTexCoord3fv_Impl(target, v);
4383 PostHook(GLE_CURRENT_FUNCTION);
4384 }
4386 void OVR::GLEContext::glMultiTexCoord3i_Hook(GLenum target, GLint s, GLint t, GLint r)
4387 {
4388 if(glMultiTexCoord3i_Impl)
4389 glMultiTexCoord3i_Impl(target, s, t, r);
4390 PostHook(GLE_CURRENT_FUNCTION);
4391 }
4393 void OVR::GLEContext::glMultiTexCoord3iv_Hook(GLenum target, const GLint *v)
4394 {
4395 if(glMultiTexCoord3iv_Impl)
4396 glMultiTexCoord3iv_Impl(target, v);
4397 PostHook(GLE_CURRENT_FUNCTION);
4398 }
4400 void OVR::GLEContext::glMultiTexCoord3s_Hook(GLenum target, GLshort s, GLshort t, GLshort r)
4401 {
4402 if(glMultiTexCoord3s_Impl)
4403 glMultiTexCoord3s_Impl(target, s, t, r);
4404 PostHook(GLE_CURRENT_FUNCTION);
4405 }
4407 void OVR::GLEContext::glMultiTexCoord3sv_Hook(GLenum target, const GLshort *v)
4408 {
4409 if(glMultiTexCoord3sv_Impl)
4410 glMultiTexCoord3sv_Impl(target, v);
4411 PostHook(GLE_CURRENT_FUNCTION);
4412 }
4414 void OVR::GLEContext::glMultiTexCoord4d_Hook(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
4415 {
4416 if(glMultiTexCoord4d_Impl)
4417 glMultiTexCoord4d_Impl(target, s, t, r, q);
4418 PostHook(GLE_CURRENT_FUNCTION);
4419 }
4421 void OVR::GLEContext::glMultiTexCoord4dv_Hook(GLenum target, const GLdouble *v)
4422 {
4423 if(glMultiTexCoord4dv_Impl)
4424 glMultiTexCoord4dv_Impl(target, v);
4425 PostHook(GLE_CURRENT_FUNCTION);
4426 }
4428 void OVR::GLEContext::glMultiTexCoord4f_Hook(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
4429 {
4430 if(glMultiTexCoord4f_Impl)
4431 glMultiTexCoord4f_Impl(target, s, t, r, q);
4432 PostHook(GLE_CURRENT_FUNCTION);
4433 }
4435 void OVR::GLEContext::glMultiTexCoord4fv_Hook(GLenum target, const GLfloat *v)
4436 {
4437 if(glMultiTexCoord4fv_Impl)
4438 glMultiTexCoord4fv_Impl(target, v);
4439 PostHook(GLE_CURRENT_FUNCTION);
4440 }
4442 void OVR::GLEContext::glMultiTexCoord4i_Hook(GLenum target, GLint s, GLint t, GLint r, GLint q)
4443 {
4444 if(glMultiTexCoord4i_Impl)
4445 glMultiTexCoord4i_Impl(target, s, t, r, q);
4446 PostHook(GLE_CURRENT_FUNCTION);
4447 }
4449 void OVR::GLEContext::glMultiTexCoord4iv_Hook(GLenum target, const GLint *v)
4450 {
4451 if(glMultiTexCoord4iv_Impl)
4452 glMultiTexCoord4iv_Impl(target, v);
4453 PostHook(GLE_CURRENT_FUNCTION);
4454 }
4456 void OVR::GLEContext::glMultiTexCoord4s_Hook(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
4457 {
4458 if(glMultiTexCoord4s_Impl)
4459 glMultiTexCoord4s_Impl(target, s, t, r, q);
4460 PostHook(GLE_CURRENT_FUNCTION);
4461 }
4463 void OVR::GLEContext::glMultiTexCoord4sv_Hook(GLenum target, const GLshort *v)
4464 {
4465 if(glMultiTexCoord4sv_Impl)
4466 glMultiTexCoord4sv_Impl(target, v);
4467 PostHook(GLE_CURRENT_FUNCTION);
4468 }
4470 void OVR::GLEContext::glLoadTransposeMatrixf_Hook(const GLfloat *m)
4471 {
4472 if(glLoadTransposeMatrixf_Impl)
4473 glLoadTransposeMatrixf_Impl(m);
4474 PostHook(GLE_CURRENT_FUNCTION);
4475 }
4477 void OVR::GLEContext::glLoadTransposeMatrixd_Hook(const GLdouble *m)
4478 {
4479 if(glLoadTransposeMatrixd_Impl)
4480 glLoadTransposeMatrixd_Impl(m);
4481 PostHook(GLE_CURRENT_FUNCTION);
4482 }
4484 void OVR::GLEContext::glMultTransposeMatrixf_Hook(const GLfloat *m)
4485 {
4486 if(glMultTransposeMatrixf_Impl)
4487 glMultTransposeMatrixf_Impl(m);
4488 PostHook(GLE_CURRENT_FUNCTION);
4489 }
4491 void OVR::GLEContext::glMultTransposeMatrixd_Hook(const GLdouble *m)
4492 {
4493 if(glMultTransposeMatrixd_Impl)
4494 glMultTransposeMatrixd_Impl(m);
4495 PostHook(GLE_CURRENT_FUNCTION);
4496 }
4499 // GL_VERSION_1_4
4500 void OVR::GLEContext::glBlendFuncSeparate_Hook(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)
4501 {
4502 if(glBlendFuncSeparate_Impl)
4503 glBlendFuncSeparate_Impl(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
4504 PostHook(GLE_CURRENT_FUNCTION);
4505 }
4507 void OVR::GLEContext::glMultiDrawArrays_Hook(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)
4508 {
4509 if(glMultiDrawArrays_Impl)
4510 glMultiDrawArrays_Impl(mode, first, count, primcount);
4511 PostHook(GLE_CURRENT_FUNCTION);
4512 }
4514 void OVR::GLEContext::glMultiDrawElements_Hook(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount)
4515 {
4516 if(glMultiDrawElements_Impl)
4517 glMultiDrawElements_Impl(mode, count, type, indices, primcount);
4518 PostHook(GLE_CURRENT_FUNCTION);
4519 }
4521 void OVR::GLEContext::glPointParameterf_Hook(GLenum pname, GLfloat param)
4522 {
4523 if(glPointParameterf_Impl)
4524 glPointParameterf_Impl(pname, param);
4525 PostHook(GLE_CURRENT_FUNCTION);
4526 }
4528 void OVR::GLEContext::glPointParameterfv_Hook(GLenum pname, const GLfloat *params)
4529 {
4530 if(glPointParameterfv_Impl)
4531 glPointParameterfv_Impl(pname, params);
4532 PostHook(GLE_CURRENT_FUNCTION);
4533 }
4535 void OVR::GLEContext::glPointParameteri_Hook(GLenum pname, GLint param)
4536 {
4537 if(glPointParameteri_Impl)
4538 glPointParameteri_Impl(pname, param);
4539 PostHook(GLE_CURRENT_FUNCTION);
4540 }
4542 void OVR::GLEContext::glPointParameteriv_Hook(GLenum pname, const GLint *params)
4543 {
4544 if(glPointParameteriv_Impl)
4545 glPointParameteriv_Impl(pname, params);
4546 PostHook(GLE_CURRENT_FUNCTION);
4547 }
4550 // GL_VERSION_1_4 deprecated functions
4551 void OVR::GLEContext::glFogCoordf_Hook(GLfloat coord)
4552 {
4553 if(glFogCoordf_Impl)
4554 glFogCoordf_Impl(coord);
4555 PostHook(GLE_CURRENT_FUNCTION);
4556 }
4558 void OVR::GLEContext::glFogCoordfv_Hook(const GLfloat *coord)
4559 {
4560 if(glFogCoordfv_Impl)
4561 glFogCoordfv_Impl(coord);
4562 PostHook(GLE_CURRENT_FUNCTION);
4563 }
4565 void OVR::GLEContext::glFogCoordd_Hook(GLdouble coord)
4566 {
4567 if(glFogCoordd_Impl)
4568 glFogCoordd_Impl(coord);
4569 PostHook(GLE_CURRENT_FUNCTION);
4570 }
4572 void OVR::GLEContext::glFogCoorddv_Hook(const GLdouble *coord)
4573 {
4574 if(glFogCoorddv_Impl)
4575 glFogCoorddv_Impl(coord);
4576 PostHook(GLE_CURRENT_FUNCTION);
4577 }
4579 void OVR::GLEContext::glFogCoordPointer_Hook(GLenum type, GLsizei stride, const GLvoid *pointer)
4580 {
4581 if(glFogCoordPointer_Impl)
4582 glFogCoordPointer_Impl(type, stride, pointer);
4583 PostHook(GLE_CURRENT_FUNCTION);
4584 }
4586 void OVR::GLEContext::glSecondaryColor3b_Hook(GLbyte red, GLbyte green, GLbyte blue)
4587 {
4588 if(glSecondaryColor3b_Impl)
4589 glSecondaryColor3b_Impl(red, green, blue);
4590 PostHook(GLE_CURRENT_FUNCTION);
4591 }
4593 void OVR::GLEContext::glSecondaryColor3bv_Hook(const GLbyte *v)
4594 {
4595 if(glSecondaryColor3bv_Impl)
4596 glSecondaryColor3bv_Impl(v);
4597 PostHook(GLE_CURRENT_FUNCTION);
4598 }
4600 void OVR::GLEContext::glSecondaryColor3d_Hook(GLdouble red, GLdouble green, GLdouble blue)
4601 {
4602 if(glSecondaryColor3d_Impl)
4603 glSecondaryColor3d_Impl(red, green, blue);
4604 PostHook(GLE_CURRENT_FUNCTION);
4605 }
4607 void OVR::GLEContext::glSecondaryColor3dv_Hook(const GLdouble *v)
4608 {
4609 if(glSecondaryColor3dv_Impl)
4610 glSecondaryColor3dv_Impl(v);
4611 PostHook(GLE_CURRENT_FUNCTION);
4612 }
4614 void OVR::GLEContext::glSecondaryColor3f_Hook(GLfloat red, GLfloat green, GLfloat blue)
4615 {
4616 if(glSecondaryColor3f_Impl)
4617 glSecondaryColor3f_Impl(red, green, blue);
4618 PostHook(GLE_CURRENT_FUNCTION);
4619 }
4621 void OVR::GLEContext::glSecondaryColor3fv_Hook(const GLfloat *v)
4622 {
4623 if(glSecondaryColor3fv_Impl)
4624 glSecondaryColor3fv_Impl(v);
4625 PostHook(GLE_CURRENT_FUNCTION);
4626 }
4628 void OVR::GLEContext::glSecondaryColor3i_Hook(GLint red, GLint green, GLint blue)
4629 {
4630 if(glSecondaryColor3i_Impl)
4631 glSecondaryColor3i_Impl(red, green, blue);
4632 PostHook(GLE_CURRENT_FUNCTION);
4633 }
4635 void OVR::GLEContext::glSecondaryColor3iv_Hook(const GLint *v)
4636 {
4637 if(glSecondaryColor3iv_Impl)
4638 glSecondaryColor3iv_Impl(v);
4639 PostHook(GLE_CURRENT_FUNCTION);
4640 }
4642 void OVR::GLEContext::glSecondaryColor3s_Hook(GLshort red, GLshort green, GLshort blue)
4643 {
4644 if(glSecondaryColor3s_Impl)
4645 glSecondaryColor3s_Impl(red, green, blue);
4646 PostHook(GLE_CURRENT_FUNCTION);
4647 }
4649 void OVR::GLEContext::glSecondaryColor3sv_Hook(const GLshort *v)
4650 {
4651 if(glSecondaryColor3sv_Impl)
4652 glSecondaryColor3sv_Impl(v);
4653 PostHook(GLE_CURRENT_FUNCTION);
4654 }
4656 void OVR::GLEContext::glSecondaryColor3ub_Hook(GLubyte red, GLubyte green, GLubyte blue)
4657 {
4658 if(glSecondaryColor3ub_Impl)
4659 glSecondaryColor3ub_Impl(red, green, blue);
4660 PostHook(GLE_CURRENT_FUNCTION);
4661 }
4663 void OVR::GLEContext::glSecondaryColor3ubv_Hook(const GLubyte *v)
4664 {
4665 if(glSecondaryColor3ubv_Impl)
4666 glSecondaryColor3ubv_Impl(v);
4667 PostHook(GLE_CURRENT_FUNCTION);
4668 }
4670 void OVR::GLEContext::glSecondaryColor3ui_Hook(GLuint red, GLuint green, GLuint blue)
4671 {
4672 if(glSecondaryColor3ui_Impl)
4673 glSecondaryColor3ui_Impl(red, green, blue);
4674 PostHook(GLE_CURRENT_FUNCTION);
4675 }
4677 void OVR::GLEContext::glSecondaryColor3uiv_Hook(const GLuint *v)
4678 {
4679 if(glSecondaryColor3uiv_Impl)
4680 glSecondaryColor3uiv_Impl(v);
4681 PostHook(GLE_CURRENT_FUNCTION);
4682 }
4684 void OVR::GLEContext::glSecondaryColor3us_Hook(GLushort red, GLushort green, GLushort blue)
4685 {
4686 if(glSecondaryColor3us_Impl)
4687 glSecondaryColor3us_Impl(red, green, blue);
4688 PostHook(GLE_CURRENT_FUNCTION);
4689 }
4691 void OVR::GLEContext::glSecondaryColor3usv_Hook(const GLushort *v)
4692 {
4693 if(glSecondaryColor3usv_Impl)
4694 glSecondaryColor3usv_Impl(v);
4695 PostHook(GLE_CURRENT_FUNCTION);
4696 }
4698 void OVR::GLEContext::glSecondaryColorPointer_Hook(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
4699 {
4700 if(glSecondaryColorPointer_Impl)
4701 glSecondaryColorPointer_Impl(size, type, stride, pointer);
4702 PostHook(GLE_CURRENT_FUNCTION);
4703 }
4705 void OVR::GLEContext::glWindowPos2d_Hook(GLdouble x, GLdouble y)
4706 {
4707 if(glWindowPos2d_Impl)
4708 glWindowPos2d_Impl(x, y);
4709 PostHook(GLE_CURRENT_FUNCTION);
4710 }
4712 void OVR::GLEContext::glWindowPos2dv_Hook(const GLdouble *v)
4713 {
4714 if(glWindowPos2dv_Impl)
4715 glWindowPos2dv_Impl(v);
4716 PostHook(GLE_CURRENT_FUNCTION);
4717 }
4719 void OVR::GLEContext::glWindowPos2f_Hook(GLfloat x, GLfloat y)
4720 {
4721 if(glWindowPos2f_Impl)
4722 glWindowPos2f_Impl(x, y);
4723 PostHook(GLE_CURRENT_FUNCTION);
4724 }
4726 void OVR::GLEContext::glWindowPos2fv_Hook(const GLfloat *v)
4727 {
4728 if(glWindowPos2fv_Impl)
4729 glWindowPos2fv_Impl(v);
4730 PostHook(GLE_CURRENT_FUNCTION);
4731 }
4733 void OVR::GLEContext::glWindowPos2i_Hook(GLint x, GLint y)
4734 {
4735 if(glWindowPos2i_Impl)
4736 glWindowPos2i_Impl(x, y);
4737 PostHook(GLE_CURRENT_FUNCTION);
4738 }
4740 void OVR::GLEContext::glWindowPos2iv_Hook(const GLint *v)
4741 {
4742 if(glWindowPos2iv_Impl)
4743 glWindowPos2iv_Impl(v);
4744 PostHook(GLE_CURRENT_FUNCTION);
4745 }
4747 void OVR::GLEContext::glWindowPos2s_Hook(GLshort x, GLshort y)
4748 {
4749 if(glWindowPos2s_Impl)
4750 glWindowPos2s_Impl(x, y);
4751 PostHook(GLE_CURRENT_FUNCTION);
4752 }
4754 void OVR::GLEContext::glWindowPos2sv_Hook(const GLshort *v)
4755 {
4756 if(glWindowPos2sv_Impl)
4757 glWindowPos2sv_Impl(v);
4758 PostHook(GLE_CURRENT_FUNCTION);
4759 }
4761 void OVR::GLEContext::glWindowPos3d_Hook(GLdouble x, GLdouble y, GLdouble z)
4762 {
4763 if(glWindowPos3d_Impl)
4764 glWindowPos3d_Impl(x, y, z);
4765 PostHook(GLE_CURRENT_FUNCTION);
4766 }
4768 void OVR::GLEContext::glWindowPos3dv_Hook(const GLdouble *v)
4769 {
4770 if(glWindowPos3dv_Impl)
4771 glWindowPos3dv_Impl(v);
4772 PostHook(GLE_CURRENT_FUNCTION);
4773 }
4775 void OVR::GLEContext::glWindowPos3f_Hook(GLfloat x, GLfloat y, GLfloat z)
4776 {
4777 if(glWindowPos3f_Impl)
4778 glWindowPos3f_Impl(x, y, z);
4779 PostHook(GLE_CURRENT_FUNCTION);
4780 }
4782 void OVR::GLEContext::glWindowPos3fv_Hook(const GLfloat *v)
4783 {
4784 if(glWindowPos3fv_Impl)
4785 glWindowPos3fv_Impl(v);
4786 PostHook(GLE_CURRENT_FUNCTION);
4787 }
4789 void OVR::GLEContext::glWindowPos3i_Hook(GLint x, GLint y, GLint z)
4790 {
4791 if(glWindowPos3i_Impl)
4792 glWindowPos3i_Impl(x, y, z);
4793 PostHook(GLE_CURRENT_FUNCTION);
4794 }
4796 void OVR::GLEContext::glWindowPos3iv_Hook(const GLint *v)
4797 {
4798 if(glWindowPos3iv_Impl)
4799 glWindowPos3iv_Impl(v);
4800 PostHook(GLE_CURRENT_FUNCTION);
4801 }
4803 void OVR::GLEContext::glWindowPos3s_Hook(GLshort x, GLshort y, GLshort z)
4804 {
4805 if(glWindowPos3s_Impl)
4806 glWindowPos3s_Impl(x, y, z);
4807 PostHook(GLE_CURRENT_FUNCTION);
4808 }
4810 void OVR::GLEContext::glWindowPos3sv_Hook(const GLshort *v)
4811 {
4812 if(glWindowPos3sv_Impl)
4813 glWindowPos3sv_Impl(v);
4814 PostHook(GLE_CURRENT_FUNCTION);
4815 }
4818 // GL_VERSION_1_5
4819 void OVR::GLEContext::glGenQueries_Hook(GLsizei n, GLuint *ids)
4820 {
4821 if(glGenQueries_Impl)
4822 glGenQueries_Impl(n, ids);
4823 PostHook(GLE_CURRENT_FUNCTION);
4824 }
4826 void OVR::GLEContext::glDeleteQueries_Hook(GLsizei n, const GLuint *ids)
4827 {
4828 if(glDeleteQueries_Impl)
4829 glDeleteQueries_Impl(n, ids);
4830 PostHook(GLE_CURRENT_FUNCTION);
4831 }
4833 GLboolean OVR::GLEContext::glIsQuery_Hook(GLuint id)
4834 {
4835 GLboolean b = GL_FALSE;
4836 if(glIsQuery_Impl)
4837 b = glIsQuery_Impl(id);
4838 PostHook(GLE_CURRENT_FUNCTION);
4839 return b;
4840 }
4842 void OVR::GLEContext::glBeginQuery_Hook(GLenum target, GLuint id)
4843 {
4844 if(glBeginQuery_Impl)
4845 glBeginQuery_Impl(target, id);
4846 PostHook(GLE_CURRENT_FUNCTION);
4847 }
4849 void OVR::GLEContext::glEndQuery_Hook(GLenum target)
4850 {
4851 if(glEndQuery_Impl)
4852 glEndQuery_Impl(target);
4853 PostHook(GLE_CURRENT_FUNCTION);
4854 }
4856 void OVR::GLEContext::glGetQueryiv_Hook(GLenum target, GLenum pname, GLint *params)
4857 {
4858 if(glGetQueryiv_Impl)
4859 glGetQueryiv_Impl(target, pname, params);
4860 PostHook(GLE_CURRENT_FUNCTION);
4861 }
4863 void OVR::GLEContext::glGetQueryObjectiv_Hook(GLuint id, GLenum pname, GLint *params)
4864 {
4865 if(glGetQueryObjectiv_Impl)
4866 glGetQueryObjectiv_Impl(id, pname, params);
4867 PostHook(GLE_CURRENT_FUNCTION);
4868 }
4870 void OVR::GLEContext::glGetQueryObjectuiv_Hook(GLuint id, GLenum pname, GLuint *params)
4871 {
4872 if(glGetQueryObjectuiv_Impl)
4873 glGetQueryObjectuiv_Impl(id, pname, params);
4874 PostHook(GLE_CURRENT_FUNCTION);
4875 }
4877 void OVR::GLEContext::glBindBuffer_Hook(GLenum target, GLuint buffer)
4878 {
4879 if(glBindBuffer_Impl)
4880 glBindBuffer_Impl(target, buffer);
4881 PostHook(GLE_CURRENT_FUNCTION);
4882 }
4884 void OVR::GLEContext::glDeleteBuffers_Hook(GLsizei n, const GLuint *buffers)
4885 {
4886 if(glDeleteBuffers_Impl)
4887 glDeleteBuffers_Impl(n, buffers);
4888 PostHook(GLE_CURRENT_FUNCTION);
4889 }
4891 void OVR::GLEContext::glGenBuffers_Hook(GLsizei n, GLuint *buffers)
4892 {
4893 if(glGenBuffers_Impl)
4894 glGenBuffers_Impl(n, buffers);
4895 PostHook(GLE_CURRENT_FUNCTION);
4896 }
4898 GLboolean OVR::GLEContext::glIsBuffer_Hook(GLuint buffer)
4899 {
4900 GLboolean b = GL_FALSE;
4901 if(glIsBuffer_Impl)
4902 b = glIsBuffer_Impl(buffer);
4903 PostHook(GLE_CURRENT_FUNCTION);
4904 return b;
4905 }
4907 void OVR::GLEContext::glBufferData_Hook(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
4908 {
4909 if(glBufferData_Impl)
4910 glBufferData_Impl(target, size, data, usage);
4911 PostHook(GLE_CURRENT_FUNCTION);
4912 }
4914 void OVR::GLEContext::glBufferSubData_Hook(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)
4915 {
4916 if(glBufferSubData_Impl)
4917 glBufferSubData_Impl(target, offset, size, data);
4918 PostHook(GLE_CURRENT_FUNCTION);
4919 }
4921 void OVR::GLEContext::glGetBufferSubData_Hook(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data)
4922 {
4923 if(glGetBufferSubData_Impl)
4924 glGetBufferSubData_Impl(target, offset, size, data);
4925 PostHook(GLE_CURRENT_FUNCTION);
4926 }
4928 GLvoid* OVR::GLEContext::glMapBuffer_Hook(GLenum target, GLenum access)
4929 {
4930 GLvoid* p = NULL;
4931 if(glMapBuffer_Impl)
4932 p = glMapBuffer_Impl(target, access);
4933 PostHook(GLE_CURRENT_FUNCTION);
4934 return p;
4935 }
4937 GLboolean OVR::GLEContext::glUnmapBuffer_Hook(GLenum target)
4938 {
4939 GLboolean b = GL_FALSE;
4940 if(glUnmapBuffer_Impl)
4941 b = glUnmapBuffer_Impl(target);
4942 PostHook(GLE_CURRENT_FUNCTION);
4943 return b;
4944 }
4946 void OVR::GLEContext::glGetBufferParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
4947 {
4948 if(glGetBufferParameteriv_Impl)
4949 glGetBufferParameteriv_Impl(target, pname, params);
4950 PostHook(GLE_CURRENT_FUNCTION);
4951 }
4953 void OVR::GLEContext::glGetBufferPointerv_Hook(GLenum target, GLenum pname, GLvoid* *params)
4954 {
4955 if(glGetBufferPointerv_Impl)
4956 glGetBufferPointerv_Impl(target, pname, params);
4957 PostHook(GLE_CURRENT_FUNCTION);
4958 }
4961 // GL_VERSION_2_0
4962 void OVR::GLEContext::glBlendEquationSeparate_Hook(GLenum modeRGB, GLenum modeAlpha)
4963 {
4964 if(glBlendEquationSeparate_Impl)
4965 glBlendEquationSeparate_Impl(modeRGB, modeAlpha);
4966 PostHook(GLE_CURRENT_FUNCTION);
4967 }
4969 void OVR::GLEContext::glDrawBuffers_Hook(GLsizei n, const GLenum *bufs)
4970 {
4971 if(glDrawBuffers_Impl)
4972 glDrawBuffers_Impl(n, bufs);
4973 PostHook(GLE_CURRENT_FUNCTION);
4974 }
4976 void OVR::GLEContext::glStencilOpSeparate_Hook(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
4977 {
4978 if(glStencilOpSeparate_Impl)
4979 glStencilOpSeparate_Impl(face, sfail, dpfail, dppass);
4980 PostHook(GLE_CURRENT_FUNCTION);
4981 }
4983 void OVR::GLEContext::glStencilFuncSeparate_Hook(GLenum face, GLenum func, GLint ref, GLuint mask)
4984 {
4985 if(glStencilFuncSeparate_Impl)
4986 glStencilFuncSeparate_Impl(face, func, ref, mask);
4987 PostHook(GLE_CURRENT_FUNCTION);
4988 }
4990 void OVR::GLEContext::glStencilMaskSeparate_Hook(GLenum face, GLuint mask)
4991 {
4992 if(glStencilMaskSeparate_Impl)
4993 glStencilMaskSeparate_Impl(face, mask);
4994 PostHook(GLE_CURRENT_FUNCTION);
4995 }
4997 void OVR::GLEContext::glAttachShader_Hook(GLuint program, GLuint shader)
4998 {
4999 if(glAttachShader_Impl)
5000 glAttachShader_Impl(program, shader);
5001 PostHook(GLE_CURRENT_FUNCTION);
5002 }
5004 void OVR::GLEContext::glBindAttribLocation_Hook(GLuint program, GLuint index, const GLchar *name)
5005 {
5006 if(glBindAttribLocation_Impl)
5007 glBindAttribLocation_Impl(program, index, name);
5008 PostHook(GLE_CURRENT_FUNCTION);
5009 }
5011 void OVR::GLEContext::glCompileShader_Hook(GLuint shader)
5012 {
5013 if(glCompileShader_Impl)
5014 glCompileShader_Impl(shader);
5015 PostHook(GLE_CURRENT_FUNCTION);
5016 }
5018 GLuint OVR::GLEContext::glCreateProgram_Hook()
5019 {
5020 GLuint u = 0;
5021 if(glCreateProgram_Impl)
5022 u = glCreateProgram_Impl();
5023 PostHook(GLE_CURRENT_FUNCTION);
5024 return u;
5025 }
5027 GLuint OVR::GLEContext::glCreateShader_Hook(GLenum type)
5028 {
5029 GLuint u = 0;
5030 if(glCreateShader_Impl)
5031 u = glCreateShader_Impl(type);
5032 PostHook(GLE_CURRENT_FUNCTION);
5033 return u;
5034 }
5036 void OVR::GLEContext::glDeleteProgram_Hook(GLuint program)
5037 {
5038 if(glDeleteProgram_Impl)
5039 glDeleteProgram_Impl(program);
5040 PostHook(GLE_CURRENT_FUNCTION);
5041 }
5043 void OVR::GLEContext::glDeleteShader_Hook(GLuint shader)
5044 {
5045 if(glDeleteShader_Impl)
5046 glDeleteShader_Impl(shader);
5047 PostHook(GLE_CURRENT_FUNCTION);
5048 }
5050 void OVR::GLEContext::glDetachShader_Hook(GLuint program, GLuint shader)
5051 {
5052 if(glDetachShader_Impl)
5053 glDetachShader_Impl(program, shader);
5054 PostHook(GLE_CURRENT_FUNCTION);
5055 }
5057 void OVR::GLEContext::glDisableVertexAttribArray_Hook(GLuint index)
5058 {
5059 if(glDisableVertexAttribArray_Impl)
5060 glDisableVertexAttribArray_Impl(index);
5061 PostHook(GLE_CURRENT_FUNCTION);
5062 }
5064 void OVR::GLEContext::glEnableVertexAttribArray_Hook(GLuint index)
5065 {
5066 if(glEnableVertexAttribArray_Impl)
5067 glEnableVertexAttribArray_Impl(index);
5068 PostHook(GLE_CURRENT_FUNCTION);
5069 }
5071 void OVR::GLEContext::glGetActiveAttrib_Hook(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
5072 {
5073 if(glGetActiveAttrib_Impl)
5074 glGetActiveAttrib_Impl(program, index, bufSize, length, size, type, name);
5075 PostHook(GLE_CURRENT_FUNCTION);
5076 }
5078 void OVR::GLEContext::glGetActiveUniform_Hook(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)
5079 {
5080 if(glGetActiveUniform_Impl)
5081 glGetActiveUniform_Impl(program, index, bufSize, length, size, type, name);
5082 PostHook(GLE_CURRENT_FUNCTION);
5083 }
5085 void OVR::GLEContext::glGetAttachedShaders_Hook(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj)
5086 {
5087 if(glGetAttachedShaders_Impl)
5088 glGetAttachedShaders_Impl(program, maxCount, count, obj);
5089 PostHook(GLE_CURRENT_FUNCTION);
5090 }
5092 GLint OVR::GLEContext::glGetAttribLocation_Hook(GLuint program, const GLchar *name)
5093 {
5094 GLint i = 0;
5095 if(glGetAttribLocation_Impl)
5096 i = glGetAttribLocation_Impl(program, name);
5097 PostHook(GLE_CURRENT_FUNCTION);
5098 return i;
5099 }
5101 void OVR::GLEContext::glGetProgramiv_Hook(GLuint program, GLenum pname, GLint *params)
5102 {
5103 if(glGetProgramiv_Impl)
5104 glGetProgramiv_Impl(program, pname, params);
5105 PostHook(GLE_CURRENT_FUNCTION);
5106 }
5108 void OVR::GLEContext::glGetProgramInfoLog_Hook(GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
5109 {
5110 if(glGetProgramInfoLog_Impl)
5111 glGetProgramInfoLog_Impl(program, bufSize, length, infoLog);
5112 PostHook(GLE_CURRENT_FUNCTION);
5113 }
5115 void OVR::GLEContext::glGetShaderiv_Hook(GLuint shader, GLenum pname, GLint *params)
5116 {
5117 if(glGetShaderiv_Impl)
5118 glGetShaderiv_Impl(shader, pname, params);
5119 PostHook(GLE_CURRENT_FUNCTION);
5120 }
5122 void OVR::GLEContext::glGetShaderInfoLog_Hook(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
5123 {
5124 if(glGetShaderInfoLog_Impl)
5125 glGetShaderInfoLog_Impl(shader, bufSize, length, infoLog);
5126 PostHook(GLE_CURRENT_FUNCTION);
5127 }
5129 void OVR::GLEContext::glGetShaderSource_Hook(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)
5130 {
5131 if(glGetShaderSource_Impl)
5132 glGetShaderSource_Impl(shader, bufSize, length, source);
5133 PostHook(GLE_CURRENT_FUNCTION);
5134 }
5136 GLint OVR::GLEContext::glGetUniformLocation_Hook(GLuint program, const GLchar *name)
5137 {
5138 GLint i = 0;
5139 if(glGetUniformLocation_Impl)
5140 i = glGetUniformLocation_Impl(program, name);
5141 PostHook(GLE_CURRENT_FUNCTION);
5142 return i;
5143 }
5145 void OVR::GLEContext::glGetUniformfv_Hook(GLuint program, GLint location, GLfloat *params)
5146 {
5147 if(glGetUniformfv_Impl)
5148 glGetUniformfv_Impl(program, location, params);
5149 PostHook(GLE_CURRENT_FUNCTION);
5150 }
5152 void OVR::GLEContext::glGetUniformiv_Hook(GLuint program, GLint location, GLint *params)
5153 {
5154 if(glGetUniformiv_Impl)
5155 glGetUniformiv_Impl(program, location, params);
5156 PostHook(GLE_CURRENT_FUNCTION);
5157 }
5159 void OVR::GLEContext::glGetVertexAttribdv_Hook(GLuint index, GLenum pname, GLdouble *params)
5160 {
5161 if(glGetVertexAttribdv_Impl)
5162 glGetVertexAttribdv_Impl(index, pname, params);
5163 PostHook(GLE_CURRENT_FUNCTION);
5164 }
5166 void OVR::GLEContext::glGetVertexAttribfv_Hook(GLuint index, GLenum pname, GLfloat *params)
5167 {
5168 if(glGetVertexAttribfv_Impl)
5169 glGetVertexAttribfv_Impl(index, pname, params);
5170 PostHook(GLE_CURRENT_FUNCTION);
5171 }
5173 void OVR::GLEContext::glGetVertexAttribiv_Hook(GLuint index, GLenum pname, GLint *params)
5174 {
5175 if(glGetVertexAttribiv_Impl)
5176 glGetVertexAttribiv_Impl(index, pname, params);
5177 PostHook(GLE_CURRENT_FUNCTION);
5178 }
5180 void OVR::GLEContext::glGetVertexAttribPointerv_Hook(GLuint index, GLenum pname, GLvoid* *pointer)
5181 {
5182 if(glGetVertexAttribPointerv_Impl)
5183 glGetVertexAttribPointerv_Impl(index, pname, pointer);
5184 PostHook(GLE_CURRENT_FUNCTION);
5185 }
5187 GLboolean OVR::GLEContext::glIsProgram_Hook(GLuint program)
5188 {
5189 GLboolean b = GL_FALSE;
5190 if(glIsProgram_Impl)
5191 b = glIsProgram_Impl(program);
5192 PostHook(GLE_CURRENT_FUNCTION);
5193 return b;
5194 }
5196 GLboolean OVR::GLEContext::glIsShader_Hook(GLuint shader)
5197 {
5198 GLboolean b = GL_FALSE;
5199 if(glIsShader_Impl)
5200 b = glIsShader_Impl(shader);
5201 PostHook(GLE_CURRENT_FUNCTION);
5202 return b;
5203 }
5205 void OVR::GLEContext::glLinkProgram_Hook(GLuint program)
5206 {
5207 if(glLinkProgram_Impl)
5208 glLinkProgram_Impl(program);
5209 PostHook(GLE_CURRENT_FUNCTION);
5210 }
5212 void OVR::GLEContext::glShaderSource_Hook(GLuint shader, GLsizei count, const GLchar* *string, const GLint *length)
5213 {
5214 if(glShaderSource_Impl)
5215 glShaderSource_Impl(shader, count, string, length);
5216 PostHook(GLE_CURRENT_FUNCTION);
5217 }
5219 void OVR::GLEContext::glUseProgram_Hook(GLuint program)
5220 {
5221 if(glUseProgram_Impl)
5222 glUseProgram_Impl(program);
5223 PostHook(GLE_CURRENT_FUNCTION);
5224 }
5226 void OVR::GLEContext::glUniform1f_Hook(GLint location, GLfloat v0)
5227 {
5228 if(glUniform1f_Impl)
5229 glUniform1f_Impl(location, v0);
5230 PostHook(GLE_CURRENT_FUNCTION);
5231 }
5233 void OVR::GLEContext::glUniform2f_Hook(GLint location, GLfloat v0, GLfloat v1)
5234 {
5235 if(glUniform2f_Impl)
5236 glUniform2f_Impl(location, v0, v1);
5237 PostHook(GLE_CURRENT_FUNCTION);
5238 }
5240 void OVR::GLEContext::glUniform3f_Hook(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
5241 {
5242 if(glUniform3f_Impl)
5243 glUniform3f_Impl(location, v0, v1, v2);
5244 PostHook(GLE_CURRENT_FUNCTION);
5245 }
5247 void OVR::GLEContext::glUniform4f_Hook(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
5248 {
5249 if(glUniform4f_Impl)
5250 glUniform4f_Impl(location, v0, v1, v2, v3);
5251 PostHook(GLE_CURRENT_FUNCTION);
5252 }
5254 void OVR::GLEContext::glUniform1i_Hook(GLint location, GLint v0)
5255 {
5256 if(glUniform1i_Impl)
5257 glUniform1i_Impl(location, v0);
5258 PostHook(GLE_CURRENT_FUNCTION);
5259 }
5261 void OVR::GLEContext::glUniform2i_Hook(GLint location, GLint v0, GLint v1)
5262 {
5263 if(glUniform2i_Impl)
5264 glUniform2i_Impl(location, v0, v1);
5265 PostHook(GLE_CURRENT_FUNCTION);
5266 }
5268 void OVR::GLEContext::glUniform3i_Hook(GLint location, GLint v0, GLint v1, GLint v2)
5269 {
5270 if(glUniform3i_Impl)
5271 glUniform3i_Impl(location, v0, v1, v2);
5272 PostHook(GLE_CURRENT_FUNCTION);
5273 }
5275 void OVR::GLEContext::glUniform4i_Hook(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
5276 {
5277 if(glUniform4i_Impl)
5278 glUniform4i_Impl(location, v0, v1, v2, v3);
5279 PostHook(GLE_CURRENT_FUNCTION);
5280 }
5282 void OVR::GLEContext::glUniform1fv_Hook(GLint location, GLsizei count, const GLfloat *value)
5283 {
5284 if(glUniform1fv_Impl)
5285 glUniform1fv_Impl(location, count, value);
5286 PostHook(GLE_CURRENT_FUNCTION);
5287 }
5289 void OVR::GLEContext::glUniform2fv_Hook(GLint location, GLsizei count, const GLfloat *value)
5290 {
5291 if(glUniform2fv_Impl)
5292 glUniform2fv_Impl(location, count, value);
5293 PostHook(GLE_CURRENT_FUNCTION);
5294 }
5296 void OVR::GLEContext::glUniform3fv_Hook(GLint location, GLsizei count, const GLfloat *value)
5297 {
5298 if(glUniform3fv_Impl)
5299 glUniform3fv_Impl(location, count, value);
5300 PostHook(GLE_CURRENT_FUNCTION);
5301 }
5303 void OVR::GLEContext::glUniform4fv_Hook(GLint location, GLsizei count, const GLfloat *value)
5304 {
5305 if(glUniform4fv_Impl)
5306 glUniform4fv_Impl(location, count, value);
5307 PostHook(GLE_CURRENT_FUNCTION);
5308 }
5310 void OVR::GLEContext::glUniform1iv_Hook(GLint location, GLsizei count, const GLint *value)
5311 {
5312 if(glUniform1iv_Impl)
5313 glUniform1iv_Impl(location, count, value);
5314 PostHook(GLE_CURRENT_FUNCTION);
5315 }
5317 void OVR::GLEContext::glUniform2iv_Hook(GLint location, GLsizei count, const GLint *value)
5318 {
5319 if(glUniform2iv_Impl)
5320 glUniform2iv_Impl(location, count, value);
5321 PostHook(GLE_CURRENT_FUNCTION);
5322 }
5324 void OVR::GLEContext::glUniform3iv_Hook(GLint location, GLsizei count, const GLint *value)
5325 {
5326 if(glUniform3iv_Impl)
5327 glUniform3iv_Impl(location, count, value);
5328 PostHook(GLE_CURRENT_FUNCTION);
5329 }
5331 void OVR::GLEContext::glUniform4iv_Hook(GLint location, GLsizei count, const GLint *value)
5332 {
5333 if(glUniform4iv_Impl)
5334 glUniform4iv_Impl(location, count, value);
5335 PostHook(GLE_CURRENT_FUNCTION);
5336 }
5338 void OVR::GLEContext::glUniformMatrix2fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
5339 {
5340 if(glUniformMatrix2fv_Impl)
5341 glUniformMatrix2fv_Impl(location, count, transpose, value);
5342 PostHook(GLE_CURRENT_FUNCTION);
5343 }
5345 void OVR::GLEContext::glUniformMatrix3fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
5346 {
5347 if(glUniformMatrix3fv_Impl)
5348 glUniformMatrix3fv_Impl(location, count, transpose, value);
5349 PostHook(GLE_CURRENT_FUNCTION);
5350 }
5352 void OVR::GLEContext::glUniformMatrix4fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
5353 {
5354 if(glUniformMatrix4fv_Impl)
5355 glUniformMatrix4fv_Impl(location, count, transpose, value);
5356 PostHook(GLE_CURRENT_FUNCTION);
5357 }
5359 void OVR::GLEContext::glValidateProgram_Hook(GLuint program)
5360 {
5361 if(glValidateProgram_Impl)
5362 glValidateProgram_Impl(program);
5363 PostHook(GLE_CURRENT_FUNCTION);
5364 }
5366 void OVR::GLEContext::glVertexAttrib1d_Hook(GLuint index, GLdouble x)
5367 {
5368 if(glVertexAttrib1d_Impl)
5369 glVertexAttrib1d_Impl(index, x);
5370 PostHook(GLE_CURRENT_FUNCTION);
5371 }
5373 void OVR::GLEContext::glVertexAttrib1dv_Hook(GLuint index, const GLdouble *v)
5374 {
5375 if(glVertexAttrib1dv_Impl)
5376 glVertexAttrib1dv_Impl(index, v);
5377 PostHook(GLE_CURRENT_FUNCTION);
5378 }
5380 void OVR::GLEContext::glVertexAttrib1f_Hook(GLuint index, GLfloat x)
5381 {
5382 if(glVertexAttrib1f_Impl)
5383 glVertexAttrib1f_Impl(index, x);
5384 PostHook(GLE_CURRENT_FUNCTION);
5385 }
5387 void OVR::GLEContext::glVertexAttrib1fv_Hook(GLuint index, const GLfloat *v)
5388 {
5389 if(glVertexAttrib1fv_Impl)
5390 glVertexAttrib1fv_Impl(index, v);
5391 PostHook(GLE_CURRENT_FUNCTION);
5392 }
5394 void OVR::GLEContext::glVertexAttrib1s_Hook(GLuint index, GLshort x)
5395 {
5396 if(glVertexAttrib1s_Impl)
5397 glVertexAttrib1s_Impl(index, x);
5398 PostHook(GLE_CURRENT_FUNCTION);
5399 }
5401 void OVR::GLEContext::glVertexAttrib1sv_Hook(GLuint index, const GLshort *v)
5402 {
5403 if(glVertexAttrib1sv_Impl)
5404 glVertexAttrib1sv_Impl(index, v);
5405 PostHook(GLE_CURRENT_FUNCTION);
5406 }
5408 void OVR::GLEContext::glVertexAttrib2d_Hook(GLuint index, GLdouble x, GLdouble y)
5409 {
5410 if(glVertexAttrib2d_Impl)
5411 glVertexAttrib2d_Impl(index, x, y);
5412 PostHook(GLE_CURRENT_FUNCTION);
5413 }
5415 void OVR::GLEContext::glVertexAttrib2dv_Hook(GLuint index, const GLdouble *v)
5416 {
5417 if(glVertexAttrib2dv_Impl)
5418 glVertexAttrib2dv_Impl(index, v);
5419 PostHook(GLE_CURRENT_FUNCTION);
5420 }
5422 void OVR::GLEContext::glVertexAttrib2f_Hook(GLuint index, GLfloat x, GLfloat y)
5423 {
5424 if(glVertexAttrib2f_Impl)
5425 glVertexAttrib2f_Impl(index, x, y);
5426 PostHook(GLE_CURRENT_FUNCTION);
5427 }
5429 void OVR::GLEContext::glVertexAttrib2fv_Hook(GLuint index, const GLfloat *v)
5430 {
5431 if(glVertexAttrib2fv_Impl)
5432 glVertexAttrib2fv_Impl(index, v);
5433 PostHook(GLE_CURRENT_FUNCTION);
5434 }
5436 void OVR::GLEContext::glVertexAttrib2s_Hook(GLuint index, GLshort x, GLshort y)
5437 {
5438 if(glVertexAttrib2s_Impl)
5439 glVertexAttrib2s_Impl(index, x, y);
5440 PostHook(GLE_CURRENT_FUNCTION);
5441 }
5443 void OVR::GLEContext::glVertexAttrib2sv_Hook(GLuint index, const GLshort *v)
5444 {
5445 if(glVertexAttrib2sv_Impl)
5446 glVertexAttrib2sv_Impl(index, v);
5447 PostHook(GLE_CURRENT_FUNCTION);
5448 }
5450 void OVR::GLEContext::glVertexAttrib3d_Hook(GLuint index, GLdouble x, GLdouble y, GLdouble z)
5451 {
5452 if(glVertexAttrib3d_Impl)
5453 glVertexAttrib3d_Impl(index, x, y, z);
5454 PostHook(GLE_CURRENT_FUNCTION);
5455 }
5457 void OVR::GLEContext::glVertexAttrib3dv_Hook(GLuint index, const GLdouble *v)
5458 {
5459 if(glVertexAttrib3dv_Impl)
5460 glVertexAttrib3dv_Impl(index, v);
5461 PostHook(GLE_CURRENT_FUNCTION);
5462 }
5464 void OVR::GLEContext::glVertexAttrib3f_Hook(GLuint index, GLfloat x, GLfloat y, GLfloat z)
5465 {
5466 if(glVertexAttrib3f_Impl)
5467 glVertexAttrib3f_Impl(index, x, y, z);
5468 PostHook(GLE_CURRENT_FUNCTION);
5469 }
5471 void OVR::GLEContext::glVertexAttrib3fv_Hook(GLuint index, const GLfloat *v)
5472 {
5473 if(glVertexAttrib3fv_Impl)
5474 glVertexAttrib3fv_Impl(index, v);
5475 PostHook(GLE_CURRENT_FUNCTION);
5476 }
5478 void OVR::GLEContext::glVertexAttrib3s_Hook(GLuint index, GLshort x, GLshort y, GLshort z)
5479 {
5480 if(glVertexAttrib3s_Impl)
5481 glVertexAttrib3s_Impl(index, x, y, z);
5482 PostHook(GLE_CURRENT_FUNCTION);
5483 }
5485 void OVR::GLEContext::glVertexAttrib3sv_Hook(GLuint index, const GLshort *v)
5486 {
5487 if(glVertexAttrib3sv_Impl)
5488 glVertexAttrib3sv_Impl(index, v);
5489 PostHook(GLE_CURRENT_FUNCTION);
5490 }
5492 void OVR::GLEContext::glVertexAttrib4Nbv_Hook(GLuint index, const GLbyte *v)
5493 {
5494 if(glVertexAttrib4Nbv_Impl)
5495 glVertexAttrib4Nbv_Impl(index, v);
5496 PostHook(GLE_CURRENT_FUNCTION);
5497 }
5499 void OVR::GLEContext::glVertexAttrib4Niv_Hook(GLuint index, const GLint *v)
5500 {
5501 if(glVertexAttrib4Niv_Impl)
5502 glVertexAttrib4Niv_Impl(index, v);
5503 PostHook(GLE_CURRENT_FUNCTION);
5504 }
5506 void OVR::GLEContext::glVertexAttrib4Nsv_Hook(GLuint index, const GLshort *v)
5507 {
5508 if(glVertexAttrib4Nsv_Impl)
5509 glVertexAttrib4Nsv_Impl(index, v);
5510 PostHook(GLE_CURRENT_FUNCTION);
5511 }
5513 void OVR::GLEContext::glVertexAttrib4Nub_Hook(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
5514 {
5515 if(glVertexAttrib4Nub_Impl)
5516 glVertexAttrib4Nub_Impl(index, x, y, z, w);
5517 PostHook(GLE_CURRENT_FUNCTION);
5518 }
5520 void OVR::GLEContext::glVertexAttrib4Nubv_Hook(GLuint index, const GLubyte *v)
5521 {
5522 if(glVertexAttrib4Nubv_Impl)
5523 glVertexAttrib4Nubv_Impl(index, v);
5524 PostHook(GLE_CURRENT_FUNCTION);
5525 }
5527 void OVR::GLEContext::glVertexAttrib4Nuiv_Hook(GLuint index, const GLuint *v)
5528 {
5529 if(glVertexAttrib4Nuiv_Impl)
5530 glVertexAttrib4Nuiv_Impl(index, v);
5531 PostHook(GLE_CURRENT_FUNCTION);
5532 }
5534 void OVR::GLEContext::glVertexAttrib4Nusv_Hook(GLuint index, const GLushort *v)
5535 {
5536 if(glVertexAttrib4Nusv_Impl)
5537 glVertexAttrib4Nusv_Impl(index, v);
5538 PostHook(GLE_CURRENT_FUNCTION);
5539 }
5541 void OVR::GLEContext::glVertexAttrib4bv_Hook(GLuint index, const GLbyte *v)
5542 {
5543 if(glVertexAttrib4bv_Impl)
5544 glVertexAttrib4bv_Impl(index, v);
5545 PostHook(GLE_CURRENT_FUNCTION);
5546 }
5548 void OVR::GLEContext::glVertexAttrib4d_Hook(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
5549 {
5550 if(glVertexAttrib4d_Impl)
5551 glVertexAttrib4d_Impl(index, x, y, z, w);
5552 PostHook(GLE_CURRENT_FUNCTION);
5553 }
5555 void OVR::GLEContext::glVertexAttrib4dv_Hook(GLuint index, const GLdouble *v)
5556 {
5557 if(glVertexAttrib4dv_Impl)
5558 glVertexAttrib4dv_Impl(index, v);
5559 PostHook(GLE_CURRENT_FUNCTION);
5560 }
5562 void OVR::GLEContext::glVertexAttrib4f_Hook(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
5563 {
5564 if(glVertexAttrib4f_Impl)
5565 glVertexAttrib4f_Impl(index, x, y, z, w);
5566 PostHook(GLE_CURRENT_FUNCTION);
5567 }
5569 void OVR::GLEContext::glVertexAttrib4fv_Hook(GLuint index, const GLfloat *v)
5570 {
5571 if(glVertexAttrib4fv_Impl)
5572 glVertexAttrib4fv_Impl(index, v);
5573 PostHook(GLE_CURRENT_FUNCTION);
5574 }
5576 void OVR::GLEContext::glVertexAttrib4iv_Hook(GLuint index, const GLint *v)
5577 {
5578 if(glVertexAttrib4iv_Impl)
5579 glVertexAttrib4iv_Impl(index, v);
5580 PostHook(GLE_CURRENT_FUNCTION);
5581 }
5583 void OVR::GLEContext::glVertexAttrib4s_Hook(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
5584 {
5585 if(glVertexAttrib4s_Impl)
5586 glVertexAttrib4s_Impl(index, x, y, z, w);
5587 PostHook(GLE_CURRENT_FUNCTION);
5588 }
5590 void OVR::GLEContext::glVertexAttrib4sv_Hook(GLuint index, const GLshort *v)
5591 {
5592 if(glVertexAttrib4sv_Impl)
5593 glVertexAttrib4sv_Impl(index, v);
5594 PostHook(GLE_CURRENT_FUNCTION);
5595 }
5597 void OVR::GLEContext::glVertexAttrib4ubv_Hook(GLuint index, const GLubyte *v)
5598 {
5599 if(glVertexAttrib4ubv_Impl)
5600 glVertexAttrib4ubv_Impl(index, v);
5601 PostHook(GLE_CURRENT_FUNCTION);
5602 }
5604 void OVR::GLEContext::glVertexAttrib4uiv_Hook(GLuint index, const GLuint *v)
5605 {
5606 if(glVertexAttrib4uiv_Impl)
5607 glVertexAttrib4uiv_Impl(index, v);
5608 PostHook(GLE_CURRENT_FUNCTION);
5609 }
5611 void OVR::GLEContext::glVertexAttrib4usv_Hook(GLuint index, const GLushort *v)
5612 {
5613 if(glVertexAttrib4usv_Impl)
5614 glVertexAttrib4usv_Impl(index, v);
5615 PostHook(GLE_CURRENT_FUNCTION);
5616 }
5618 void OVR::GLEContext::glVertexAttribPointer_Hook(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)
5619 {
5620 if(glVertexAttribPointer_Impl)
5621 glVertexAttribPointer_Impl(index, size, type, normalized, stride, pointer);
5622 PostHook(GLE_CURRENT_FUNCTION);
5623 }
5626 // GL_VERSION_2_1
5627 void OVR::GLEContext::glUniformMatrix2x3fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
5628 {
5629 if(glUniformMatrix2x3fv_Impl)
5630 glUniformMatrix2x3fv_Impl(location, count, transpose, value);
5631 PostHook(GLE_CURRENT_FUNCTION);
5632 }
5634 void OVR::GLEContext::glUniformMatrix3x2fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
5635 {
5636 if(glUniformMatrix3x2fv_Impl)
5637 glUniformMatrix3x2fv_Impl(location, count, transpose, value);
5638 PostHook(GLE_CURRENT_FUNCTION);
5639 }
5641 void OVR::GLEContext::glUniformMatrix2x4fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
5642 {
5643 if(glUniformMatrix2x4fv_Impl)
5644 glUniformMatrix2x4fv_Impl(location, count, transpose, value);
5645 PostHook(GLE_CURRENT_FUNCTION);
5646 }
5648 void OVR::GLEContext::glUniformMatrix4x2fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
5649 {
5650 if(glUniformMatrix4x2fv_Impl)
5651 glUniformMatrix4x2fv_Impl(location, count, transpose, value);
5652 PostHook(GLE_CURRENT_FUNCTION);
5653 }
5655 void OVR::GLEContext::glUniformMatrix3x4fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
5656 {
5657 if(glUniformMatrix3x4fv_Impl)
5658 glUniformMatrix3x4fv_Impl(location, count, transpose, value);
5659 PostHook(GLE_CURRENT_FUNCTION);
5660 }
5662 void OVR::GLEContext::glUniformMatrix4x3fv_Hook(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
5663 {
5664 if(glUniformMatrix4x3fv_Impl)
5665 glUniformMatrix4x3fv_Impl(location, count, transpose, value);
5666 PostHook(GLE_CURRENT_FUNCTION);
5667 }
5670 // GL_VERSION_3_0
5671 void OVR::GLEContext::glColorMaski_Hook(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
5672 {
5673 if(glColorMaski_Impl)
5674 glColorMaski_Impl(index, r, g, b, a);
5675 PostHook(GLE_CURRENT_FUNCTION);
5676 }
5678 void OVR::GLEContext::glGetBooleani_v_Hook(GLenum target, GLuint index, GLboolean *data)
5679 {
5680 if(glGetBooleani_v_Impl)
5681 glGetBooleani_v_Impl(target, index, data);
5682 PostHook(GLE_CURRENT_FUNCTION);
5683 }
5685 void OVR::GLEContext::glGetIntegeri_v_Hook(GLenum target, GLuint index, GLint *data)
5686 {
5687 if(glGetIntegeri_v_Impl)
5688 glGetIntegeri_v_Impl(target, index, data);
5689 PostHook(GLE_CURRENT_FUNCTION);
5690 }
5692 void OVR::GLEContext::glEnablei_Hook(GLenum target, GLuint index)
5693 {
5694 if(glEnablei_Impl)
5695 glEnablei_Impl(target, index);
5696 PostHook(GLE_CURRENT_FUNCTION);
5697 }
5699 void OVR::GLEContext::glDisablei_Hook(GLenum target, GLuint index)
5700 {
5701 if(glDisablei_Impl)
5702 glDisablei_Impl(target, index);
5703 PostHook(GLE_CURRENT_FUNCTION);
5704 }
5706 GLboolean OVR::GLEContext::glIsEnabledi_Hook(GLenum target, GLuint index)
5707 {
5708 GLboolean b = GL_FALSE;
5709 if(glIsEnabledi_Impl)
5710 b = glIsEnabledi_Impl(target, index);
5711 PostHook(GLE_CURRENT_FUNCTION);
5712 return b;
5713 }
5715 void OVR::GLEContext::glBeginTransformFeedback_Hook(GLenum primitiveMode)
5716 {
5717 if(glBeginTransformFeedback_Impl)
5718 glBeginTransformFeedback_Impl(primitiveMode);
5719 PostHook(GLE_CURRENT_FUNCTION);
5720 }
5722 void OVR::GLEContext::glEndTransformFeedback_Hook()
5723 {
5724 if(glEndTransformFeedback_Impl)
5725 glEndTransformFeedback_Impl();
5726 PostHook(GLE_CURRENT_FUNCTION);
5727 }
5729 void OVR::GLEContext::glBindBufferRange_Hook(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
5730 {
5731 if(glBindBufferRange_Impl)
5732 glBindBufferRange_Impl(target, index, buffer, offset, size);
5733 PostHook(GLE_CURRENT_FUNCTION);
5734 }
5736 void OVR::GLEContext::glBindBufferBase_Hook(GLenum target, GLuint index, GLuint buffer)
5737 {
5738 if(glBindBufferBase_Impl)
5739 glBindBufferBase_Impl(target, index, buffer);
5740 PostHook(GLE_CURRENT_FUNCTION);
5741 }
5743 void OVR::GLEContext::glTransformFeedbackVaryings_Hook(GLuint program, GLsizei count, const GLchar* *varyings, GLenum bufferMode)
5744 {
5745 if(glTransformFeedbackVaryings_Impl)
5746 glTransformFeedbackVaryings_Impl(program, count, varyings, bufferMode);
5747 PostHook(GLE_CURRENT_FUNCTION);
5748 }
5750 void OVR::GLEContext::glGetTransformFeedbackVarying_Hook(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)
5751 {
5752 if(glGetTransformFeedbackVarying_Impl)
5753 glGetTransformFeedbackVarying_Impl(program, index, bufSize, length, size, type, name);
5754 PostHook(GLE_CURRENT_FUNCTION);
5755 }
5757 void OVR::GLEContext::glClampColor_Hook(GLenum target, GLenum clamp)
5758 {
5759 if(glClampColor_Impl)
5760 glClampColor_Impl(target, clamp);
5761 PostHook(GLE_CURRENT_FUNCTION);
5762 }
5764 void OVR::GLEContext::glBeginConditionalRender_Hook(GLuint id, GLenum mode)
5765 {
5766 if(glBeginConditionalRender_Impl)
5767 glBeginConditionalRender_Impl(id, mode);
5768 PostHook(GLE_CURRENT_FUNCTION);
5769 }
5771 void OVR::GLEContext::glEndConditionalRender_Hook()
5772 {
5773 if(glEndConditionalRender_Impl)
5774 glEndConditionalRender_Impl();
5775 PostHook(GLE_CURRENT_FUNCTION);
5776 }
5778 void OVR::GLEContext::glVertexAttribIPointer_Hook(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)
5779 {
5780 if(glVertexAttribIPointer_Impl)
5781 glVertexAttribIPointer_Impl(index, size, type, stride, pointer);
5782 PostHook(GLE_CURRENT_FUNCTION);
5783 }
5785 void OVR::GLEContext::glGetVertexAttribIiv_Hook(GLuint index, GLenum pname, GLint *params)
5786 {
5787 if(glGetVertexAttribIiv_Impl)
5788 glGetVertexAttribIiv_Impl(index, pname, params);
5789 PostHook(GLE_CURRENT_FUNCTION);
5790 }
5792 void OVR::GLEContext::glGetVertexAttribIuiv_Hook(GLuint index, GLenum pname, GLuint *params)
5793 {
5794 if(glGetVertexAttribIuiv_Impl)
5795 glGetVertexAttribIuiv_Impl(index, pname, params);
5796 PostHook(GLE_CURRENT_FUNCTION);
5797 }
5799 void OVR::GLEContext::glVertexAttribI1i_Hook(GLuint index, GLint x)
5800 {
5801 if(glVertexAttribI1i_Impl)
5802 glVertexAttribI1i_Impl(index, x);
5803 PostHook(GLE_CURRENT_FUNCTION);
5804 }
5806 void OVR::GLEContext::glVertexAttribI2i_Hook(GLuint index, GLint x, GLint y)
5807 {
5808 if(glVertexAttribI2i_Impl)
5809 glVertexAttribI2i_Impl(index, x, y);
5810 PostHook(GLE_CURRENT_FUNCTION);
5811 }
5813 void OVR::GLEContext::glVertexAttribI3i_Hook(GLuint index, GLint x, GLint y, GLint z)
5814 {
5815 if(glVertexAttribI3i_Impl)
5816 glVertexAttribI3i_Impl(index, x, y, z);
5817 PostHook(GLE_CURRENT_FUNCTION);
5818 }
5820 void OVR::GLEContext::glVertexAttribI4i_Hook(GLuint index, GLint x, GLint y, GLint z, GLint w)
5821 {
5822 if(glVertexAttribI4i_Impl)
5823 glVertexAttribI4i_Impl(index, x, y, z, w);
5824 PostHook(GLE_CURRENT_FUNCTION);
5825 }
5827 void OVR::GLEContext::glVertexAttribI1ui_Hook(GLuint index, GLuint x)
5828 {
5829 if(glVertexAttribI1ui_Impl)
5830 glVertexAttribI1ui_Impl(index, x);
5831 PostHook(GLE_CURRENT_FUNCTION);
5832 }
5834 void OVR::GLEContext::glVertexAttribI2ui_Hook(GLuint index, GLuint x, GLuint y)
5835 {
5836 if(glVertexAttribI2ui_Impl)
5837 glVertexAttribI2ui_Impl(index, x, y);
5838 PostHook(GLE_CURRENT_FUNCTION);
5839 }
5841 void OVR::GLEContext::glVertexAttribI3ui_Hook(GLuint index, GLuint x, GLuint y, GLuint z)
5842 {
5843 if(glVertexAttribI3ui_Impl)
5844 glVertexAttribI3ui_Impl(index, x, y, z);
5845 PostHook(GLE_CURRENT_FUNCTION);
5846 }
5848 void OVR::GLEContext::glVertexAttribI4ui_Hook(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)
5849 {
5850 if(glVertexAttribI4ui_Impl)
5851 glVertexAttribI4ui_Impl(index, x, y, z, w);
5852 PostHook(GLE_CURRENT_FUNCTION);
5853 }
5855 void OVR::GLEContext::glVertexAttribI1iv_Hook(GLuint index, const GLint *v)
5856 {
5857 if(glVertexAttribI1iv_Impl)
5858 glVertexAttribI1iv_Impl(index, v);
5859 PostHook(GLE_CURRENT_FUNCTION);
5860 }
5862 void OVR::GLEContext::glVertexAttribI2iv_Hook(GLuint index, const GLint *v)
5863 {
5864 if(glVertexAttribI2iv_Impl)
5865 glVertexAttribI2iv_Impl(index, v);
5866 PostHook(GLE_CURRENT_FUNCTION);
5867 }
5869 void OVR::GLEContext::glVertexAttribI3iv_Hook(GLuint index, const GLint *v)
5870 {
5871 if(glVertexAttribI3iv_Impl)
5872 glVertexAttribI3iv_Impl(index, v);
5873 PostHook(GLE_CURRENT_FUNCTION);
5874 }
5876 void OVR::GLEContext::glVertexAttribI4iv_Hook(GLuint index, const GLint *v)
5877 {
5878 if(glVertexAttribI4iv_Impl)
5879 glVertexAttribI4iv_Impl(index, v);
5880 PostHook(GLE_CURRENT_FUNCTION);
5881 }
5883 void OVR::GLEContext::glVertexAttribI1uiv_Hook(GLuint index, const GLuint *v)
5884 {
5885 if(glVertexAttribI1uiv_Impl)
5886 glVertexAttribI1uiv_Impl(index, v);
5887 PostHook(GLE_CURRENT_FUNCTION);
5888 }
5890 void OVR::GLEContext::glVertexAttribI2uiv_Hook(GLuint index, const GLuint *v)
5891 {
5892 if(glVertexAttribI2uiv_Impl)
5893 glVertexAttribI2uiv_Impl(index, v);
5894 PostHook(GLE_CURRENT_FUNCTION);
5895 }
5897 void OVR::GLEContext::glVertexAttribI3uiv_Hook(GLuint index, const GLuint *v)
5898 {
5899 if(glVertexAttribI3uiv_Impl)
5900 glVertexAttribI3uiv_Impl(index, v);
5901 PostHook(GLE_CURRENT_FUNCTION);
5902 }
5904 void OVR::GLEContext::glVertexAttribI4uiv_Hook(GLuint index, const GLuint *v)
5905 {
5906 if(glVertexAttribI4uiv_Impl)
5907 glVertexAttribI4uiv_Impl(index, v);
5908 PostHook(GLE_CURRENT_FUNCTION);
5909 }
5911 void OVR::GLEContext::glVertexAttribI4bv_Hook(GLuint index, const GLbyte *v)
5912 {
5913 if(glVertexAttribI4bv_Impl)
5914 glVertexAttribI4bv_Impl(index, v);
5915 PostHook(GLE_CURRENT_FUNCTION);
5916 }
5918 void OVR::GLEContext::glVertexAttribI4sv_Hook(GLuint index, const GLshort *v)
5919 {
5920 if(glVertexAttribI4sv_Impl)
5921 glVertexAttribI4sv_Impl(index, v);
5922 PostHook(GLE_CURRENT_FUNCTION);
5923 }
5925 void OVR::GLEContext::glVertexAttribI4ubv_Hook(GLuint index, const GLubyte *v)
5926 {
5927 if(glVertexAttribI4ubv_Impl)
5928 glVertexAttribI4ubv_Impl(index, v);
5929 PostHook(GLE_CURRENT_FUNCTION);
5930 }
5932 void OVR::GLEContext::glVertexAttribI4usv_Hook(GLuint index, const GLushort *v)
5933 {
5934 if(glVertexAttribI4usv_Impl)
5935 glVertexAttribI4usv_Impl(index, v);
5936 PostHook(GLE_CURRENT_FUNCTION);
5937 }
5939 void OVR::GLEContext::glGetUniformuiv_Hook(GLuint program, GLint location, GLuint *params)
5940 {
5941 if(glGetUniformuiv_Impl)
5942 glGetUniformuiv_Impl(program, location, params);
5943 PostHook(GLE_CURRENT_FUNCTION);
5944 }
5946 void OVR::GLEContext::glBindFragDataLocation_Hook(GLuint program, GLuint color, const GLchar *name)
5947 {
5948 if(glBindFragDataLocation_Impl)
5949 glBindFragDataLocation_Impl(program, color, name);
5950 PostHook(GLE_CURRENT_FUNCTION);
5951 }
5953 GLint OVR::GLEContext::glGetFragDataLocation_Hook(GLuint program, const GLchar *name)
5954 {
5955 GLint i = 0;
5956 if(glGetFragDataLocation_Impl)
5957 i = glGetFragDataLocation_Impl(program, name);
5958 PostHook(GLE_CURRENT_FUNCTION);
5959 return i;
5960 }
5962 void OVR::GLEContext::glUniform1ui_Hook(GLint location, GLuint v0)
5963 {
5964 if(glUniform1ui_Impl)
5965 glUniform1ui_Impl(location, v0);
5966 PostHook(GLE_CURRENT_FUNCTION);
5967 }
5969 void OVR::GLEContext::glUniform2ui_Hook(GLint location, GLuint v0, GLuint v1)
5970 {
5971 if(glUniform2ui_Impl)
5972 glUniform2ui_Impl(location, v0, v1);
5973 PostHook(GLE_CURRENT_FUNCTION);
5974 }
5976 void OVR::GLEContext::glUniform3ui_Hook(GLint location, GLuint v0, GLuint v1, GLuint v2)
5977 {
5978 if(glUniform3ui_Impl)
5979 glUniform3ui_Impl(location, v0, v1, v2);
5980 PostHook(GLE_CURRENT_FUNCTION);
5981 }
5983 void OVR::GLEContext::glUniform4ui_Hook(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
5984 {
5985 if(glUniform4ui_Impl)
5986 glUniform4ui_Impl(location, v0, v1, v2, v3);
5987 PostHook(GLE_CURRENT_FUNCTION);
5988 }
5990 void OVR::GLEContext::glUniform1uiv_Hook(GLint location, GLsizei count, const GLuint *value)
5991 {
5992 if(glUniform1uiv_Impl)
5993 glUniform1uiv_Impl(location, count, value);
5994 PostHook(GLE_CURRENT_FUNCTION);
5995 }
5997 void OVR::GLEContext::glUniform2uiv_Hook(GLint location, GLsizei count, const GLuint *value)
5998 {
5999 if(glUniform2uiv_Impl)
6000 glUniform2uiv_Impl(location, count, value);
6001 PostHook(GLE_CURRENT_FUNCTION);
6002 }
6004 void OVR::GLEContext::glUniform3uiv_Hook(GLint location, GLsizei count, const GLuint *value)
6005 {
6006 if(glUniform3uiv_Impl)
6007 glUniform3uiv_Impl(location, count, value);
6008 PostHook(GLE_CURRENT_FUNCTION);
6009 }
6011 void OVR::GLEContext::glUniform4uiv_Hook(GLint location, GLsizei count, const GLuint *value)
6012 {
6013 if(glUniform4uiv_Impl)
6014 glUniform4uiv_Impl(location, count, value);
6015 PostHook(GLE_CURRENT_FUNCTION);
6016 }
6018 void OVR::GLEContext::glTexParameterIiv_Hook(GLenum target, GLenum pname, const GLint *params)
6019 {
6020 if(glTexParameterIiv_Impl)
6021 glTexParameterIiv_Impl(target, pname, params);
6022 PostHook(GLE_CURRENT_FUNCTION);
6023 }
6025 void OVR::GLEContext::glTexParameterIuiv_Hook(GLenum target, GLenum pname, const GLuint *params)
6026 {
6027 if(glTexParameterIuiv_Impl)
6028 glTexParameterIuiv_Impl(target, pname, params);
6029 PostHook(GLE_CURRENT_FUNCTION);
6030 }
6032 void OVR::GLEContext::glGetTexParameterIiv_Hook(GLenum target, GLenum pname, GLint *params)
6033 {
6034 if(glGetTexParameterIiv_Impl)
6035 glGetTexParameterIiv_Impl(target, pname, params);
6036 PostHook(GLE_CURRENT_FUNCTION);
6037 }
6039 void OVR::GLEContext::glGetTexParameterIuiv_Hook(GLenum target, GLenum pname, GLuint *params)
6040 {
6041 if(glGetTexParameterIuiv_Impl)
6042 glGetTexParameterIuiv_Impl(target, pname, params);
6043 PostHook(GLE_CURRENT_FUNCTION);
6044 }
6046 void OVR::GLEContext::glClearBufferiv_Hook(GLenum buffer, GLint drawbuffer, const GLint *value)
6047 {
6048 if(glClearBufferiv_Impl)
6049 glClearBufferiv_Impl(buffer, drawbuffer, value);
6050 PostHook(GLE_CURRENT_FUNCTION);
6051 }
6053 void OVR::GLEContext::glClearBufferuiv_Hook(GLenum buffer, GLint drawbuffer, const GLuint *value)
6054 {
6055 if(glClearBufferuiv_Impl)
6056 glClearBufferuiv_Impl(buffer, drawbuffer, value);
6057 PostHook(GLE_CURRENT_FUNCTION);
6058 }
6060 void OVR::GLEContext::glClearBufferfv_Hook(GLenum buffer, GLint drawbuffer, const GLfloat *value)
6061 {
6062 if(glClearBufferfv_Impl)
6063 glClearBufferfv_Impl(buffer, drawbuffer, value);
6064 PostHook(GLE_CURRENT_FUNCTION);
6065 }
6067 void OVR::GLEContext::glClearBufferfi_Hook(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
6068 {
6069 if(glClearBufferfi_Impl)
6070 glClearBufferfi_Impl(buffer, drawbuffer, depth, stencil);
6071 PostHook(GLE_CURRENT_FUNCTION);
6072 }
6074 const GLubyte* OVR::GLEContext::glGetStringi_Hook(GLenum name, GLuint index)
6075 {
6076 const GLubyte* p = NULL;
6077 if(glGetStringi_Impl)
6078 p = glGetStringi_Impl(name, index);
6079 PostHook(GLE_CURRENT_FUNCTION);
6080 return p;
6081 }
6084 // GL_VERSION_3_1
6085 void OVR::GLEContext::glDrawArraysInstanced_Hook(GLenum mode, GLint first, GLsizei count, GLsizei primcount)
6086 {
6087 if(glDrawArraysInstanced_Impl)
6088 glDrawArraysInstanced_Impl(mode, first, count, primcount);
6089 PostHook(GLE_CURRENT_FUNCTION);
6090 }
6092 void OVR::GLEContext::glDrawElementsInstanced_Hook(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount)
6093 {
6094 if(glDrawElementsInstanced_Impl)
6095 glDrawElementsInstanced_Impl(mode, count, type, indices, primcount);
6096 PostHook(GLE_CURRENT_FUNCTION);
6097 }
6099 void OVR::GLEContext::glTexBuffer_Hook(GLenum target, GLenum internalformat, GLuint buffer)
6100 {
6101 if(glTexBuffer_Impl)
6102 glTexBuffer_Impl(target, internalformat, buffer);
6103 PostHook(GLE_CURRENT_FUNCTION);
6104 }
6106 void OVR::GLEContext::glPrimitiveRestartIndex_Hook(GLuint index)
6107 {
6108 if(glPrimitiveRestartIndex_Impl)
6109 glPrimitiveRestartIndex_Impl(index);
6110 PostHook(GLE_CURRENT_FUNCTION);
6111 }
6114 // GL_VERSION_3_2
6115 void OVR::GLEContext::glGetInteger64i_v_Hook(GLenum target, GLuint index, GLint64 *data)
6116 {
6117 if(glGetInteger64i_v_Impl)
6118 glGetInteger64i_v_Impl(target, index, data);
6119 PostHook(GLE_CURRENT_FUNCTION);
6120 }
6122 void OVR::GLEContext::glGetBufferParameteri64v_Hook(GLenum target, GLenum pname, GLint64 *params)
6123 {
6124 if(glGetBufferParameteri64v_Impl)
6125 glGetBufferParameteri64v_Impl(target, pname, params);
6126 PostHook(GLE_CURRENT_FUNCTION);
6127 }
6129 void OVR::GLEContext::glFramebufferTexture_Hook(GLenum target, GLenum attachment, GLuint texture, GLint level)
6130 {
6131 if(glFramebufferTexture_Impl)
6132 glFramebufferTexture_Impl(target, attachment, texture, level);
6133 PostHook(GLE_CURRENT_FUNCTION);
6134 }
6137 // GL_VERSION_3_3
6138 void OVR::GLEContext::glVertexAttribDivisor_Hook(GLuint index, GLuint divisor)
6139 {
6140 if(glVertexAttribDivisor_Impl)
6141 glVertexAttribDivisor_Impl(index, divisor);
6142 PostHook(GLE_CURRENT_FUNCTION);
6143 }
6146 // GL_VERSION_4_0
6147 void OVR::GLEContext::glMinSampleShading_Hook(GLclampf value)
6148 {
6149 if(glMinSampleShading_Impl)
6150 glMinSampleShading_Impl(value);
6151 PostHook(GLE_CURRENT_FUNCTION);
6152 }
6154 void OVR::GLEContext::glBlendEquationi_Hook(GLuint buf, GLenum mode)
6155 {
6156 if(glBlendEquationi_Impl)
6157 glBlendEquationi_Impl(buf, mode);
6158 PostHook(GLE_CURRENT_FUNCTION);
6159 }
6161 void OVR::GLEContext::glBlendEquationSeparatei_Hook(GLuint buf, GLenum modeRGB, GLenum modeAlpha)
6162 {
6163 if(glBlendEquationSeparatei_Impl)
6164 glBlendEquationSeparatei_Impl(buf, modeRGB, modeAlpha);
6165 PostHook(GLE_CURRENT_FUNCTION);
6166 }
6168 void OVR::GLEContext::glBlendFunci_Hook(GLuint buf, GLenum src, GLenum dst)
6169 {
6170 if(glBlendFunci_Impl)
6171 glBlendFunci_Impl(buf, src, dst);
6172 PostHook(GLE_CURRENT_FUNCTION);
6173 }
6175 void OVR::GLEContext::glBlendFuncSeparatei_Hook(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
6176 {
6177 if(glBlendFuncSeparatei_Impl)
6178 glBlendFuncSeparatei_Impl(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
6179 PostHook(GLE_CURRENT_FUNCTION);
6180 }
6183 // GL_AMD_debug_output
6184 void OVR::GLEContext::glDebugMessageEnableAMD_Hook(GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled)
6185 {
6186 if(glDebugMessageEnableAMD_Impl)
6187 glDebugMessageEnableAMD_Impl(category, severity, count, ids, enabled);
6188 PostHook(GLE_CURRENT_FUNCTION);
6189 }
6191 void OVR::GLEContext::glDebugMessageInsertAMD_Hook(GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf)
6192 {
6193 if(glDebugMessageInsertAMD_Impl)
6194 glDebugMessageInsertAMD_Impl(category, severity, id, length, buf);
6195 PostHook(GLE_CURRENT_FUNCTION);
6196 }
6198 void OVR::GLEContext::glDebugMessageCallbackAMD_Hook(GLDEBUGPROCAMD callback, GLvoid *userParam)
6199 {
6200 if(glDebugMessageCallbackAMD_Impl)
6201 glDebugMessageCallbackAMD_Impl(callback, userParam);
6202 PostHook(GLE_CURRENT_FUNCTION);
6203 }
6205 GLuint OVR::GLEContext::glGetDebugMessageLogAMD_Hook(GLuint count, GLsizei bufsize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message)
6206 {
6207 GLuint u = 0;
6208 if(glGetDebugMessageLogAMD_Impl)
6209 u = glGetDebugMessageLogAMD_Impl(count, bufsize, categories, severities, ids, lengths, message);
6210 PostHook(GLE_CURRENT_FUNCTION);
6211 return u;
6212 }
6215 #if defined(GLE_CGL_ENABLED)
6216 // GL_APPLE_element_array
6217 void OVR::GLEContext::glElementPointerAPPLE_Hook(GLenum type, const GLvoid *pointer)
6218 {
6219 if(glElementPointerAPPLE_Impl)
6220 glElementPointerAPPLE_Impl(type, pointer);
6221 PostHook(GLE_CURRENT_FUNCTION);
6222 }
6224 void OVR::GLEContext::glDrawElementArrayAPPLE_Hook(GLenum mode, GLint first, GLsizei count)
6225 {
6226 if(glDrawElementArrayAPPLE_Impl)
6227 glDrawElementArrayAPPLE_Impl(mode, first, count);
6228 PostHook(GLE_CURRENT_FUNCTION);
6229 }
6231 void OVR::GLEContext::glDrawRangeElementArrayAPPLE_Hook(GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count)
6232 {
6233 if(glDrawRangeElementArrayAPPLE_Impl)
6234 glDrawRangeElementArrayAPPLE_Impl(mode, start, end, first, count);
6235 PostHook(GLE_CURRENT_FUNCTION);
6236 }
6238 void OVR::GLEContext::glMultiDrawElementArrayAPPLE_Hook(GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount)
6239 {
6240 if(glMultiDrawElementArrayAPPLE_Impl)
6241 glMultiDrawElementArrayAPPLE_Impl(mode, first, count, primcount);
6242 PostHook(GLE_CURRENT_FUNCTION);
6243 }
6245 void OVR::GLEContext::glMultiDrawRangeElementArrayAPPLE_Hook(GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount)
6246 {
6247 if(glMultiDrawRangeElementArrayAPPLE_Impl)
6248 glMultiDrawRangeElementArrayAPPLE_Impl(mode, start, end, first, count, primcount);
6249 PostHook(GLE_CURRENT_FUNCTION);
6250 }
6253 // GL_APPLE_fence
6254 void OVR::GLEContext::glGenFencesAPPLE_Hook(GLsizei n, GLuint *fences)
6255 {
6256 if(glGenFencesAPPLE_Impl)
6257 glGenFencesAPPLE_Impl(n, fences);
6258 PostHook(GLE_CURRENT_FUNCTION);
6259 }
6261 void OVR::GLEContext::glDeleteFencesAPPLE_Hook(GLsizei n, const GLuint *fences)
6262 {
6263 if(glDeleteFencesAPPLE_Impl)
6264 glDeleteFencesAPPLE_Impl(n, fences);
6265 PostHook(GLE_CURRENT_FUNCTION);
6266 }
6268 void OVR::GLEContext::glSetFenceAPPLE_Hook(GLuint fence)
6269 {
6270 if(glSetFenceAPPLE_Impl)
6271 glSetFenceAPPLE_Impl(fence);
6272 PostHook(GLE_CURRENT_FUNCTION);
6273 }
6275 GLboolean OVR::GLEContext::glIsFenceAPPLE_Hook(GLuint fence)
6276 {
6277 GLboolean b = GL_FALSE;
6278 if(glIsFenceAPPLE_Impl)
6279 b = glIsFenceAPPLE_Impl(fence);
6280 PostHook(GLE_CURRENT_FUNCTION);
6281 return b;
6282 }
6284 GLboolean OVR::GLEContext::glTestFenceAPPLE_Hook(GLuint fence)
6285 {
6286 GLboolean b = GL_FALSE;
6287 if(glTestFenceAPPLE_Impl)
6288 b = glTestFenceAPPLE_Impl(fence);
6289 PostHook(GLE_CURRENT_FUNCTION);
6290 return b;
6291 }
6293 void OVR::GLEContext::glFinishFenceAPPLE_Hook(GLuint fence)
6294 {
6295 if(glFinishFenceAPPLE_Impl)
6296 glFinishFenceAPPLE_Impl(fence);
6297 PostHook(GLE_CURRENT_FUNCTION);
6298 }
6300 GLboolean OVR::GLEContext::glTestObjectAPPLE_Hook(GLenum object, GLuint name)
6301 {
6302 GLboolean b = GL_FALSE;
6303 if(glTestObjectAPPLE_Impl)
6304 b = glTestObjectAPPLE_Impl(object, name);
6305 PostHook(GLE_CURRENT_FUNCTION);
6306 return b;
6307 }
6309 void OVR::GLEContext::glFinishObjectAPPLE_Hook(GLenum object, GLint name)
6310 {
6311 if(glFinishObjectAPPLE_Impl)
6312 glFinishObjectAPPLE_Impl(object, name);
6313 PostHook(GLE_CURRENT_FUNCTION);
6314 }
6317 // GL_APPLE_flush_buffer_range
6318 void OVR::GLEContext::glBufferParameteriAPPLE_Hook(GLenum target, GLenum pname, GLint param)
6319 {
6320 if(glBufferParameteriAPPLE_Impl)
6321 glBufferParameteriAPPLE_Impl(target, pname, param);
6322 PostHook(GLE_CURRENT_FUNCTION);
6323 }
6325 void OVR::GLEContext::glFlushMappedBufferRangeAPPLE_Hook(GLenum target, GLintptr offset, GLsizeiptr size)
6326 {
6327 if(glFlushMappedBufferRangeAPPLE_Impl)
6328 glFlushMappedBufferRangeAPPLE_Impl(target, offset, size);
6329 PostHook(GLE_CURRENT_FUNCTION);
6330 }
6333 // GL_APPLE_object_purgeable
6334 GLenum OVR::GLEContext::glObjectPurgeableAPPLE_Hook(GLenum objectType, GLuint name, GLenum option)
6335 {
6336 GLenum e = 0;
6337 if(glObjectPurgeableAPPLE_Impl)
6338 e = glObjectPurgeableAPPLE_Impl(objectType, name, option);
6339 PostHook(GLE_CURRENT_FUNCTION);
6340 return e;
6341 }
6343 GLenum OVR::GLEContext::glObjectUnpurgeableAPPLE_Hook(GLenum objectType, GLuint name, GLenum option)
6344 {
6345 GLenum e = 0;
6346 if(glObjectUnpurgeableAPPLE_Impl)
6347 e =glObjectUnpurgeableAPPLE_Impl(objectType, name, option);
6348 PostHook(GLE_CURRENT_FUNCTION);
6349 return e;
6350 }
6352 void OVR::GLEContext::glGetObjectParameterivAPPLE_Hook(GLenum objectType, GLuint name, GLenum pname, GLint *params)
6353 {
6354 if(glGetObjectParameterivAPPLE_Impl)
6355 glGetObjectParameterivAPPLE_Impl(objectType, name, pname, params);
6356 PostHook(GLE_CURRENT_FUNCTION);
6357 }
6360 // GL_APPLE_texture_range
6361 void OVR::GLEContext::glTextureRangeAPPLE_Hook(GLenum target, GLsizei length, const GLvoid *pointer)
6362 {
6363 if(glTextureRangeAPPLE_Impl)
6364 glTextureRangeAPPLE_Impl(target, length, pointer);
6365 PostHook(GLE_CURRENT_FUNCTION);
6366 }
6368 void OVR::GLEContext::glGetTexParameterPointervAPPLE_Hook(GLenum target, GLenum pname, GLvoid **params)
6369 {
6370 if(glGetTexParameterPointervAPPLE_Impl)
6371 glGetTexParameterPointervAPPLE_Impl(target, pname, params);
6372 PostHook(GLE_CURRENT_FUNCTION);
6373 }
6376 // GL_APPLE_vertex_array_object
6377 void OVR::GLEContext::glBindVertexArrayAPPLE_Hook(GLuint array)
6378 {
6379 if(glBindVertexArrayAPPLE_Impl)
6380 glBindVertexArrayAPPLE_Impl(array);
6381 PostHook(GLE_CURRENT_FUNCTION);
6382 }
6384 void OVR::GLEContext::glDeleteVertexArraysAPPLE_Hook(GLsizei n, const GLuint *arrays)
6385 {
6386 if(glDeleteVertexArraysAPPLE_Impl)
6387 glDeleteVertexArraysAPPLE_Impl(n, arrays);
6388 PostHook(GLE_CURRENT_FUNCTION);
6389 }
6391 void OVR::GLEContext::glGenVertexArraysAPPLE_Hook(GLsizei n, GLuint *arrays)
6392 {
6393 if(glGenVertexArraysAPPLE_Impl)
6394 glGenVertexArraysAPPLE_Impl(n, arrays);
6395 PostHook(GLE_CURRENT_FUNCTION);
6396 }
6398 GLboolean OVR::GLEContext::glIsVertexArrayAPPLE_Hook(GLuint array)
6399 {
6400 GLboolean b = GL_FALSE;
6401 if(glIsVertexArrayAPPLE_Impl)
6402 b = glIsVertexArrayAPPLE_Impl(array);
6403 PostHook(GLE_CURRENT_FUNCTION);
6404 return b;
6405 }
6408 // GL_APPLE_vertex_array_range
6409 void OVR::GLEContext::glVertexArrayRangeAPPLE_Hook(GLsizei length, GLvoid *pointer)
6410 {
6411 if(glVertexArrayRangeAPPLE_Impl)
6412 glVertexArrayRangeAPPLE_Impl(length, pointer);
6413 PostHook(GLE_CURRENT_FUNCTION);
6414 }
6416 void OVR::GLEContext::glFlushVertexArrayRangeAPPLE_Hook(GLsizei length, GLvoid *pointer)
6417 {
6418 if(glFlushVertexArrayRangeAPPLE_Impl)
6419 glFlushVertexArrayRangeAPPLE_Impl(length, pointer);
6420 PostHook(GLE_CURRENT_FUNCTION);
6421 }
6423 void OVR::GLEContext::glVertexArrayParameteriAPPLE_Hook(GLenum pname, GLint param)
6424 {
6425 if(glVertexArrayParameteriAPPLE_Impl)
6426 glVertexArrayParameteriAPPLE_Impl(pname, param);
6427 PostHook(GLE_CURRENT_FUNCTION);
6428 }
6431 // GL_APPLE_vertex_program_evaluators
6432 void OVR::GLEContext::glEnableVertexAttribAPPLE_Hook(GLuint index, GLenum pname)
6433 {
6434 if(glEnableVertexAttribAPPLE_Impl)
6435 glEnableVertexAttribAPPLE_Impl(index, pname);
6436 PostHook(GLE_CURRENT_FUNCTION);
6437 }
6439 void OVR::GLEContext::glDisableVertexAttribAPPLE_Hook(GLuint index, GLenum pname)
6440 {
6441 if(glDisableVertexAttribAPPLE_Impl)
6442 glDisableVertexAttribAPPLE_Impl(index, pname);
6443 PostHook(GLE_CURRENT_FUNCTION);
6444 }
6446 GLboolean OVR::GLEContext::glIsVertexAttribEnabledAPPLE_Hook(GLuint index, GLenum pname)
6447 {
6448 GLboolean b = GL_FALSE;
6449 if(glIsVertexAttribEnabledAPPLE_Impl)
6450 b = glIsVertexAttribEnabledAPPLE_Impl(index, pname);
6451 PostHook(GLE_CURRENT_FUNCTION);
6452 return b;
6453 }
6455 void OVR::GLEContext::glMapVertexAttrib1dAPPLE_Hook(GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
6456 {
6457 if(glMapVertexAttrib1dAPPLE_Impl)
6458 glMapVertexAttrib1dAPPLE_Impl(index, size, u1, u2, stride, order, points);
6459 PostHook(GLE_CURRENT_FUNCTION);
6460 }
6462 void OVR::GLEContext::glMapVertexAttrib1fAPPLE_Hook(GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
6463 {
6464 if(glMapVertexAttrib1fAPPLE_Impl)
6465 glMapVertexAttrib1fAPPLE_Impl(index, size, u1, u2, stride, order, points);
6466 PostHook(GLE_CURRENT_FUNCTION);
6467 }
6469 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)
6470 {
6471 if(glMapVertexAttrib2dAPPLE_Impl)
6472 glMapVertexAttrib2dAPPLE_Impl(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
6473 PostHook(GLE_CURRENT_FUNCTION);
6474 }
6476 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)
6477 {
6478 if(glMapVertexAttrib2fAPPLE_Impl)
6479 glMapVertexAttrib2fAPPLE_Impl(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
6480 PostHook(GLE_CURRENT_FUNCTION);
6481 }
6482 #endif // GLE_CGL_ENABLED
6485 // GL_ARB_debug_output
6486 void OVR::GLEContext::glDebugMessageControlARB_Hook(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled)
6487 {
6488 if(glDebugMessageControlARB_Impl)
6489 glDebugMessageControlARB_Impl(source, type, severity, count, ids, enabled);
6490 PostHook(GLE_CURRENT_FUNCTION);
6491 }
6493 void OVR::GLEContext::glDebugMessageInsertARB_Hook(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf)
6494 {
6495 if(glDebugMessageInsertARB_Impl)
6496 glDebugMessageInsertARB_Impl(source, type, id, severity, length, buf);
6497 PostHook(GLE_CURRENT_FUNCTION);
6498 }
6500 void OVR::GLEContext::glDebugMessageCallbackARB_Hook(GLDEBUGPROCARB callback, const GLvoid *userParam)
6501 {
6502 if(glDebugMessageCallbackARB_Impl)
6503 glDebugMessageCallbackARB_Impl(callback, userParam);
6504 PostHook(GLE_CURRENT_FUNCTION);
6505 }
6507 GLuint OVR::GLEContext::glGetDebugMessageLogARB_Hook(GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog)
6508 {
6509 GLuint u = 0;
6510 if(glGetDebugMessageLogARB_Impl)
6511 u = glGetDebugMessageLogARB_Impl(count, bufsize, sources, types, ids, severities, lengths, messageLog);
6512 PostHook(GLE_CURRENT_FUNCTION);
6513 return u;
6514 }
6517 // GL_ARB_ES2_compatibility
6518 void OVR::GLEContext::glReleaseShaderCompiler_Hook()
6519 {
6520 if(glReleaseShaderCompiler_Impl)
6521 glReleaseShaderCompiler_Impl();
6522 PostHook(GLE_CURRENT_FUNCTION);
6523 }
6525 void OVR::GLEContext::glShaderBinary_Hook(GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length)
6526 {
6527 if(glShaderBinary_Impl)
6528 glShaderBinary_Impl(count, shaders, binaryformat, binary, length);
6529 PostHook(GLE_CURRENT_FUNCTION);
6530 }
6532 void OVR::GLEContext::glGetShaderPrecisionFormat_Hook(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
6533 {
6534 if(glGetShaderPrecisionFormat_Impl)
6535 glGetShaderPrecisionFormat_Impl(shadertype, precisiontype, range, precision);
6536 PostHook(GLE_CURRENT_FUNCTION);
6537 }
6539 void OVR::GLEContext::glDepthRangef_Hook(GLclampf n, GLclampf f)
6540 {
6541 if(glDepthRangef_Impl)
6542 glDepthRangef_Impl(n, f);
6543 PostHook(GLE_CURRENT_FUNCTION);
6544 }
6546 void OVR::GLEContext::glClearDepthf_Hook(GLclampf d)
6547 {
6548 if(glClearDepthf_Impl)
6549 glClearDepthf_Impl(d);
6550 PostHook(GLE_CURRENT_FUNCTION);
6551 }
6554 // GL_ARB_framebuffer_object
6555 GLboolean OVR::GLEContext::glIsRenderbuffer_Hook(GLuint renderbuffer)
6556 {
6557 GLboolean b = GL_FALSE;
6558 if(glIsRenderbuffer_Impl)
6559 b = glIsRenderbuffer_Impl(renderbuffer);
6560 PostHook(GLE_CURRENT_FUNCTION);
6561 return b;
6562 }
6564 void OVR::GLEContext::glBindRenderbuffer_Hook(GLenum target, GLuint renderbuffer)
6565 {
6566 if(glBindRenderbuffer_Impl)
6567 glBindRenderbuffer_Impl(target, renderbuffer);
6568 PostHook(GLE_CURRENT_FUNCTION);
6569 }
6571 void OVR::GLEContext::glDeleteRenderbuffers_Hook(GLsizei n, const GLuint *renderbuffers)
6572 {
6573 if(glDeleteRenderbuffers_Impl)
6574 glDeleteRenderbuffers_Impl(n, renderbuffers);
6575 PostHook(GLE_CURRENT_FUNCTION);
6576 }
6578 void OVR::GLEContext::glGenRenderbuffers_Hook(GLsizei n, GLuint *renderbuffers)
6579 {
6580 if(glGenRenderbuffers_Impl)
6581 glGenRenderbuffers_Impl(n, renderbuffers);
6582 PostHook(GLE_CURRENT_FUNCTION);
6583 }
6585 void OVR::GLEContext::glRenderbufferStorage_Hook(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
6586 {
6587 if(glRenderbufferStorage_Impl)
6588 glRenderbufferStorage_Impl(target, internalformat, width, height);
6589 PostHook(GLE_CURRENT_FUNCTION);
6590 }
6592 void OVR::GLEContext::glGetRenderbufferParameteriv_Hook(GLenum target, GLenum pname, GLint *params)
6593 {
6594 if(glGetRenderbufferParameteriv_Impl)
6595 glGetRenderbufferParameteriv_Impl(target, pname, params);
6596 PostHook(GLE_CURRENT_FUNCTION);
6597 }
6599 GLboolean OVR::GLEContext::glIsFramebuffer_Hook(GLuint framebuffer)
6600 {
6601 GLboolean b = GL_FALSE;
6602 if(glIsFramebuffer_Impl)
6603 b = glIsFramebuffer_Impl(framebuffer);
6604 PostHook(GLE_CURRENT_FUNCTION);
6605 return b;
6606 }
6608 void OVR::GLEContext::glBindFramebuffer_Hook(GLenum target, GLuint framebuffer)
6609 {
6610 if(glBindFramebuffer_Impl)
6611 glBindFramebuffer_Impl(target, framebuffer);
6612 PostHook(GLE_CURRENT_FUNCTION);
6613 }
6615 void OVR::GLEContext::glDeleteFramebuffers_Hook(GLsizei n, const GLuint *framebuffers)
6616 {
6617 if(glDeleteFramebuffers_Impl)
6618 glDeleteFramebuffers_Impl(n, framebuffers);
6619 PostHook(GLE_CURRENT_FUNCTION);
6620 }
6622 void OVR::GLEContext::glGenFramebuffers_Hook(GLsizei n, GLuint *framebuffers)
6623 {
6624 if(glGenFramebuffers_Impl)
6625 glGenFramebuffers_Impl(n, framebuffers);
6626 PostHook(GLE_CURRENT_FUNCTION);
6627 }
6629 GLenum OVR::GLEContext::glCheckFramebufferStatus_Hook(GLenum target)
6630 {
6631 GLenum e = 0;
6632 if(glCheckFramebufferStatus_Impl)
6633 e = glCheckFramebufferStatus_Impl(target);
6634 PostHook(GLE_CURRENT_FUNCTION);
6635 return e;
6636 }
6638 void OVR::GLEContext::glFramebufferTexture1D_Hook(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
6639 {
6640 if(glFramebufferTexture1D_Impl)
6641 glFramebufferTexture1D_Impl(target, attachment, textarget, texture, level);
6642 PostHook(GLE_CURRENT_FUNCTION);
6643 }
6645 void OVR::GLEContext::glFramebufferTexture2D_Hook(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
6646 {
6647 if(glFramebufferTexture2D_Impl)
6648 glFramebufferTexture2D_Impl(target, attachment, textarget, texture, level);
6649 PostHook(GLE_CURRENT_FUNCTION);
6650 }
6652 void OVR::GLEContext::glFramebufferTexture3D_Hook(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
6653 {
6654 if(glFramebufferTexture3D_Impl)
6655 glFramebufferTexture3D_Impl(target, attachment, textarget, texture, level, zoffset);
6656 PostHook(GLE_CURRENT_FUNCTION);
6657 }
6659 void OVR::GLEContext::glFramebufferRenderbuffer_Hook(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
6660 {
6661 if(glFramebufferRenderbuffer_Impl)
6662 glFramebufferRenderbuffer_Impl(target, attachment, renderbuffertarget, renderbuffer);
6663 PostHook(GLE_CURRENT_FUNCTION);
6664 }
6666 void OVR::GLEContext::glGetFramebufferAttachmentParameteriv_Hook(GLenum target, GLenum attachment, GLenum pname, GLint *params)
6667 {
6668 if(glGetFramebufferAttachmentParameteriv_Impl)
6669 glGetFramebufferAttachmentParameteriv_Impl(target, attachment, pname, params);
6670 PostHook(GLE_CURRENT_FUNCTION);
6671 }
6673 void OVR::GLEContext::glGenerateMipmap_Hook(GLenum target)
6674 {
6675 if(glGenerateMipmap_Impl)
6676 glGenerateMipmap_Impl(target);
6677 PostHook(GLE_CURRENT_FUNCTION);
6678 }
6680 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)
6681 {
6682 if(glBlitFramebuffer_Impl)
6683 glBlitFramebuffer_Impl(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
6684 PostHook(GLE_CURRENT_FUNCTION);
6685 }
6687 void OVR::GLEContext::glRenderbufferStorageMultisample_Hook(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
6688 {
6689 if(glRenderbufferStorageMultisample_Impl)
6690 glRenderbufferStorageMultisample_Impl(target, samples, internalformat, width, height);
6691 PostHook(GLE_CURRENT_FUNCTION);
6692 }
6694 void OVR::GLEContext::glFramebufferTextureLayer_Hook(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
6695 {
6696 if(glFramebufferTextureLayer_Impl)
6697 glFramebufferTextureLayer_Impl(target, attachment, texture, level, layer);
6698 PostHook(GLE_CURRENT_FUNCTION);
6699 }
6702 // GL_ARB_texture_multisample
6703 void OVR::GLEContext::glTexImage2DMultisample_Hook(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)
6704 {
6705 if(glTexImage2DMultisample_Impl)
6706 glTexImage2DMultisample_Impl(target, samples, internalformat, width, height, fixedsamplelocations);
6707 PostHook(GLE_CURRENT_FUNCTION);
6708 }
6710 void OVR::GLEContext::glTexImage3DMultisample_Hook(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)
6711 {
6712 if(glTexImage3DMultisample_Impl)
6713 glTexImage3DMultisample_Impl(target, samples, internalformat, width, height, depth, fixedsamplelocations);
6714 PostHook(GLE_CURRENT_FUNCTION);
6715 }
6717 void OVR::GLEContext::glGetMultisamplefv_Hook(GLenum pname, GLuint index, GLfloat *val)
6718 {
6719 if(glGetMultisamplefv_Impl)
6720 glGetMultisamplefv_Impl(pname, index, val);
6721 PostHook(GLE_CURRENT_FUNCTION);
6722 }
6724 void OVR::GLEContext::glSampleMaski_Hook(GLuint index, GLbitfield mask)
6725 {
6726 if(glSampleMaski_Impl)
6727 glSampleMaski_Impl(index, mask);
6728 PostHook(GLE_CURRENT_FUNCTION);
6729 }
6732 // GL_ARB_timer_query
6733 void OVR::GLEContext::glQueryCounter_Hook(GLuint id, GLenum target)
6734 {
6735 if(glQueryCounter_Impl)
6736 glQueryCounter_Impl(id, target);
6737 PostHook(GLE_CURRENT_FUNCTION);
6738 }
6740 void OVR::GLEContext::glGetQueryObjecti64v_Hook(GLuint id, GLenum pname, GLint64 *params)
6741 {
6742 if(glGetQueryObjecti64v_Impl)
6743 glGetQueryObjecti64v_Impl(id, pname, params);
6744 PostHook(GLE_CURRENT_FUNCTION);
6745 }
6747 void OVR::GLEContext::glGetQueryObjectui64v_Hook(GLuint id, GLenum pname, GLuint64 *params)
6748 {
6749 if(glGetQueryObjectui64v_Impl)
6750 glGetQueryObjectui64v_Impl(id, pname, params);
6751 PostHook(GLE_CURRENT_FUNCTION);
6752 }
6755 // GL_ARB_vertex_array_object
6756 void OVR::GLEContext::glBindVertexArray_Hook(GLuint array)
6757 {
6758 if(glBindVertexArray_Impl)
6759 glBindVertexArray_Impl(array);
6760 PostHook(GLE_CURRENT_FUNCTION);
6761 }
6763 void OVR::GLEContext::glDeleteVertexArrays_Hook(GLsizei n, const GLuint *arrays)
6764 {
6765 if(glDeleteVertexArrays_Impl)
6766 glDeleteVertexArrays_Impl(n, arrays);
6767 PostHook(GLE_CURRENT_FUNCTION);
6768 }
6770 void OVR::GLEContext::glGenVertexArrays_Hook(GLsizei n, GLuint *arrays)
6771 {
6772 if(glGenVertexArrays_Impl)
6773 glGenVertexArrays_Impl(n, arrays);
6774 PostHook(GLE_CURRENT_FUNCTION);
6775 }
6777 GLboolean OVR::GLEContext::glIsVertexArray_Hook(GLuint array)
6778 {
6779 GLboolean b = GL_FALSE;
6780 if(glIsVertexArray_Impl)
6781 b = glIsVertexArray_Impl(array);
6782 PostHook(GLE_CURRENT_FUNCTION);
6783 return b;
6784 }
6787 // GL_EXT_draw_buffers2
6788 void OVR::GLEContext::glColorMaskIndexedEXT_Hook(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)
6789 {
6790 if(glColorMaskIndexedEXT_Impl)
6791 glColorMaskIndexedEXT_Impl(index, r, g, b, a);
6792 PostHook(GLE_CURRENT_FUNCTION);
6793 }
6795 void OVR::GLEContext::glGetBooleanIndexedvEXT_Hook(GLenum target, GLuint index, GLboolean *data)
6796 {
6797 if(glGetBooleanIndexedvEXT_Impl)
6798 glGetBooleanIndexedvEXT_Impl(target, index, data);
6799 PostHook(GLE_CURRENT_FUNCTION);
6800 }
6802 void OVR::GLEContext::glGetIntegerIndexedvEXT_Hook(GLenum target, GLuint index, GLint *data)
6803 {
6804 if(glGetIntegerIndexedvEXT_Impl)
6805 glGetIntegerIndexedvEXT_Impl(target, index, data);
6806 PostHook(GLE_CURRENT_FUNCTION);
6807 }
6809 void OVR::GLEContext::glEnableIndexedEXT_Hook(GLenum target, GLuint index)
6810 {
6811 if(glEnableIndexedEXT_Impl)
6812 glEnableIndexedEXT_Impl(target, index);
6813 PostHook(GLE_CURRENT_FUNCTION);
6814 }
6816 void OVR::GLEContext::glDisableIndexedEXT_Hook(GLenum target, GLuint index)
6817 {
6818 if(glDisableIndexedEXT_Impl)
6819 glDisableIndexedEXT_Impl(target, index);
6820 PostHook(GLE_CURRENT_FUNCTION);
6821 }
6823 GLboolean OVR::GLEContext::glIsEnabledIndexedEXT_Hook(GLenum target, GLuint index)
6824 {
6825 GLboolean b = GL_FALSE;
6826 if(glIsEnabledIndexedEXT_Impl)
6827 b = glIsEnabledIndexedEXT_Impl(target, index);
6828 PostHook(GLE_CURRENT_FUNCTION);
6829 return b;
6830 }
6833 // GL_KHR_debug
6834 void OVR::GLEContext::glDebugMessageControl_Hook(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled)
6835 {
6836 if(glDebugMessageControl_Impl)
6837 glDebugMessageControl_Impl(source, type, severity, count, ids, enabled);
6838 PostHook(GLE_CURRENT_FUNCTION);
6839 }
6841 void OVR::GLEContext::glDebugMessageInsert_Hook(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char* buf)
6842 {
6843 if(glDebugMessageInsert_Impl)
6844 glDebugMessageInsert_Impl(source, type, id, severity, length, buf);
6845 PostHook(GLE_CURRENT_FUNCTION);
6846 }
6848 void OVR::GLEContext::glDebugMessageCallback_Hook(GLDEBUGPROC callback, const void* userParam)
6849 {
6850 if(glDebugMessageCallback_Impl)
6851 glDebugMessageCallback_Impl(callback, userParam);
6852 PostHook(GLE_CURRENT_FUNCTION);
6853 }
6855 GLuint OVR::GLEContext::glGetDebugMessageLog_Hook(GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, char* messageLog)
6856 {
6857 GLuint u = 0;
6858 if(glGetDebugMessageLog_Impl)
6859 u = glGetDebugMessageLog_Impl(count, bufSize, sources, types, ids, severities, lengths, messageLog);
6860 PostHook(GLE_CURRENT_FUNCTION);
6861 return u;
6862 }
6864 void OVR::GLEContext::glPushDebugGroup_Hook(GLenum source, GLuint id, GLsizei length, const char * message)
6865 {
6866 if(glPushDebugGroup_Impl)
6867 glPushDebugGroup_Impl(source, id, length, message);
6868 PostHook(GLE_CURRENT_FUNCTION);
6869 }
6871 void OVR::GLEContext::glPopDebugGroup_Hook()
6872 {
6873 if(glPopDebugGroup_Impl)
6874 glPopDebugGroup_Impl();
6875 PostHook(GLE_CURRENT_FUNCTION);
6876 }
6878 void OVR::GLEContext::glObjectLabel_Hook(GLenum identifier, GLuint name, GLsizei length, const char *label)
6879 {
6880 if(glObjectLabel_Impl)
6881 glObjectLabel_Impl(identifier, name, length, label);
6882 PostHook(GLE_CURRENT_FUNCTION);
6883 }
6885 void OVR::GLEContext::glGetObjectLabel_Hook(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, char *label)
6886 {
6887 if(glGetObjectLabel_Impl)
6888 glGetObjectLabel_Impl(identifier, name, bufSize, length, label);
6889 PostHook(GLE_CURRENT_FUNCTION);
6890 }
6892 void OVR::GLEContext::glObjectPtrLabel_Hook(void* ptr, GLsizei length, const char *label)
6893 {
6894 if(glObjectPtrLabel_Impl)
6895 glObjectPtrLabel_Impl(ptr, length, label);
6896 PostHook(GLE_CURRENT_FUNCTION);
6897 }
6899 void OVR::GLEContext::glGetObjectPtrLabel_Hook(void* ptr, GLsizei bufSize, GLsizei *length, char *label)
6900 {
6901 if(glGetObjectPtrLabel_Impl)
6902 glGetObjectPtrLabel_Impl(ptr, bufSize, length, label);
6903 PostHook(GLE_CURRENT_FUNCTION);
6904 }
6907 // GL_WIN_swap_hint
6908 void OVR::GLEContext::glAddSwapHintRectWIN_Hook(GLint x, GLint y, GLsizei width, GLsizei height)
6909 {
6910 if(glAddSwapHintRectWIN_Impl)
6911 glAddSwapHintRectWIN_Impl(x, y, width, height);
6912 PostHook(GLE_CURRENT_FUNCTION);
6913 }
6916 #if defined(GLE_WGL_ENABLED)
6917 // WGL
6918 void OVR::GLEContext::PostWGLHook(const char* /*function*/)
6919 {
6920 // Empty for now. WGL functions don't have a function like glGetError().
6921 }
6923 /* We currently don't hook these
6924 #undef wglCopyContext
6925 extern "C" { GLAPI BOOL GLAPIENTRY wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask); }
6926 BOOL OVR::GLEContext::wglCopyContext_Hook(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask)
6927 {
6928 BOOL b = wglCopyContext(hglrcSrc, hglrcDst, mask);
6929 PostWGLHook(GLE_CURRENT_FUNCTION);
6930 return b;
6931 }
6933 #undef wglCreateContext
6934 extern "C" { GLAPI HGLRC GLAPIENTRY wglCreateContext(HDC hdc); }
6935 HGLRC OVR::GLEContext::wglCreateContext_Hook(HDC hdc)
6936 {
6937 HGLRC h = wglCreateContext(hdc);
6938 PostWGLHook(GLE_CURRENT_FUNCTION);
6939 return h;
6940 }
6942 #undef wglCreateLayerContext
6943 extern "C" { GLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC hdc, int iLayerPlane); }
6944 HGLRC OVR::GLEContext::wglCreateLayerContext_Hook(HDC hdc, int iLayerPlane)
6945 {
6946 HGLRC h = wglCreateLayerContext(hdc, iLayerPlane);
6947 PostWGLHook(GLE_CURRENT_FUNCTION);
6948 return h;
6949 }
6951 #undef wglDeleteContext
6952 extern "C" { GLAPI BOOL GLAPIENTRY wglDeleteContext(HGLRC hglrc); }
6953 BOOL OVR::GLEContext::wglDeleteContext_Hook(HGLRC hglrc)
6954 {
6955 BOOL b = wglDeleteContext(hglrc);
6956 PostWGLHook(GLE_CURRENT_FUNCTION);
6957 return b;
6958 }
6960 #undef wglGetCurrentContext
6961 extern "C" { GLAPI HGLRC GLAPIENTRY wglGetCurrentContext(); }
6962 HGLRC OVR::GLEContext::wglGetCurrentContext_Hook()
6963 {
6964 HGLRC h = wglGetCurrentContext();
6965 PostWGLHook(GLE_CURRENT_FUNCTION);
6966 return h;
6967 }
6969 #undef wglGetCurrentDC
6970 extern "C" { GLAPI HDC GLAPIENTRY wglGetCurrentDC(); }
6971 HDC OVR::GLEContext::wglGetCurrentDC_Hook()
6972 {
6973 HDC h = wglGetCurrentDC();
6974 PostWGLHook(GLE_CURRENT_FUNCTION);
6975 return h;
6976 }
6978 //#undef wglGetProcAddress Not needed because we happen to do it above already.
6979 //extern "C" { GLAPI PROC GLAPIENTRY wglGetProcAddress(LPCSTR lpszProc); }
6980 PROC OVR::GLEContext::wglGetProcAddress_Hook(LPCSTR lpszProc)
6981 {
6982 PROC p = wglGetProcAddress(lpszProc);
6983 PostWGLHook(GLE_CURRENT_FUNCTION);
6984 return p;
6985 }
6987 #undef wglMakeCurrent
6988 extern "C" { GLAPI BOOL GLAPIENTRY wglMakeCurrent(HDC hdc, HGLRC hglrc); }
6989 BOOL OVR::GLEContext::wglMakeCurrent_Hook(HDC hdc, HGLRC hglrc)
6990 {
6991 BOOL b = wglMakeCurrent(hdc, hglrc);
6992 PostWGLHook(GLE_CURRENT_FUNCTION);
6993 return b;
6994 }
6996 #undef wglShareLists
6997 extern "C" { GLAPI BOOL GLAPIENTRY wglShareLists(HGLRC hglrc1, HGLRC hglrc2); }
6998 BOOL OVR::GLEContext::wglShareLists_Hook(HGLRC hglrc1, HGLRC hglrc2)
6999 {
7000 BOOL b = wglShareLists(hglrc1, hglrc2);
7001 PostWGLHook(GLE_CURRENT_FUNCTION);
7002 return b;
7003 }
7005 #undef wglUseFontBitmapsA
7006 extern "C" { GLAPI BOOL GLAPIENTRY wglUseFontBitmapsA(HDC hdc, DWORD first, DWORD count, DWORD listBase); }
7007 BOOL OVR::GLEContext::wglUseFontBitmapsA_Hook(HDC hdc, DWORD first, DWORD count, DWORD listBase)
7008 {
7009 BOOL b = wglUseFontBitmapsA(hdc, first, count, listBase);
7010 PostWGLHook(GLE_CURRENT_FUNCTION);
7011 return b;
7012 }
7014 #undef wglUseFontBitmapsW
7015 extern "C" { GLAPI BOOL GLAPIENTRY wglUseFontBitmapsW(HDC hdc, DWORD first, DWORD count, DWORD listBase); }
7016 BOOL OVR::GLEContext::wglUseFontBitmapsW_Hook(HDC hdc, DWORD first, DWORD count, DWORD listBase)
7017 {
7018 BOOL b = wglUseFontBitmapsW(hdc, first, count, listBase);
7019 PostWGLHook(GLE_CURRENT_FUNCTION);
7020 return b;
7021 }
7023 #undef wglUseFontOutlinesA
7024 extern "C" { GLAPI BOOL GLAPIENTRY wglUseFontOutlinesA(HDC hdc, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf); }
7025 BOOL OVR::GLEContext::wglUseFontOutlinesA_Hook(HDC hdc, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf)
7026 {
7027 BOOL b = wglUseFontOutlinesA(hdc, first, count, listBase, deviation, extrusion, format, lpgmf);
7028 PostWGLHook(GLE_CURRENT_FUNCTION);
7029 return b;
7030 }
7032 #undef wglUseFontOutlinesW
7033 extern "C" { GLAPI BOOL GLAPIENTRY wglUseFontOutlinesW(HDC hdc, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf); }
7034 BOOL OVR::GLEContext::wglUseFontOutlinesW_Hook(HDC hdc, DWORD first, DWORD count, DWORD listBase, FLOAT deviation, FLOAT extrusion, int format, LPGLYPHMETRICSFLOAT lpgmf)
7035 {
7036 BOOL b = wglUseFontOutlinesW(hdc, first, count, listBase, deviation, extrusion, format, lpgmf);
7037 PostWGLHook(GLE_CURRENT_FUNCTION);
7038 return b;
7039 }
7041 #undef wglDescribeLayerPlane
7042 extern "C" { GLAPI BOOL GLAPIENTRY wglDescribeLayerPlane(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nBytes, LPLAYERPLANEDESCRIPTOR plpd); }
7043 BOOL OVR::GLEContext::wglDescribeLayerPlane_Hook(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nBytes, LPLAYERPLANEDESCRIPTOR plpd)
7044 {
7045 BOOL b = wglDescribeLayerPlane(hdc, iPixelFormat, iLayerPlane, nBytes, plpd);
7046 PostWGLHook(GLE_CURRENT_FUNCTION);
7047 return b;
7048 }
7050 #undef wglSetLayerPaletteEntries
7051 extern "C" { GLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr); }
7052 int OVR::GLEContext::wglSetLayerPaletteEntries_Hook(HDC hdc, int iLayerPlane, int iStart, int cEntries, const COLORREF *pcr)
7053 {
7054 int i = wglSetLayerPaletteEntries(hdc, iLayerPlane, iStart, cEntries, pcr);
7055 PostWGLHook(GLE_CURRENT_FUNCTION);
7056 return i;
7057 }
7059 #undef wglGetLayerPaletteEntries
7060 extern "C" { GLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC hdc, int iLayerPlane, int iStart, int cEntries, COLORREF *pcr); }
7061 int OVR::GLEContext::wglGetLayerPaletteEntries_Hook(HDC hdc, int iLayerPlane, int iStart, int cEntries, COLORREF *pcr)
7062 {
7063 int i = wglGetLayerPaletteEntries(hdc, iLayerPlane, iStart, cEntries, pcr);
7064 PostWGLHook(GLE_CURRENT_FUNCTION);
7065 return i;
7066 }
7068 #undef wglRealizeLayerPalette
7069 extern "C" { GLAPI BOOL GLAPIENTRY wglRealizeLayerPalette(HDC hdc, int iLayerPlane, BOOL bRealize); }
7070 BOOL OVR::GLEContext::wglRealizeLayerPalette_Hook(HDC hdc, int iLayerPlane, BOOL bRealize)
7071 {
7072 BOOL b = wglRealizeLayerPalette(hdc, iLayerPlane, bRealize);
7073 PostWGLHook(GLE_CURRENT_FUNCTION);
7074 return b;
7075 }
7077 #undef wglSwapLayerBuffers
7078 extern "C" { GLAPI BOOL GLAPIENTRY wglSwapLayerBuffers(HDC hdc, UINT fuPlanes); }
7079 BOOL OVR::GLEContext::wglSwapLayerBuffers_Hook(HDC hdc, UINT fuPlanes)
7080 {
7081 BOOL b = wglSwapLayerBuffers(hdc, fuPlanes);
7082 PostWGLHook(GLE_CURRENT_FUNCTION);
7083 return b;
7084 }
7086 #undef wglSwapMultipleBuffers
7087 extern "C" { GLAPI DWORD GLAPIENTRY wglSwapMultipleBuffers(UINT i, CONST WGLSWAP* p); }
7088 DWORD OVR::GLEContext::wglSwapMultipleBuffers_Hook(UINT i, CONST WGLSWAP* p)
7089 {
7090 DWORD dw = wglSwapMultipleBuffers(i, p);
7091 PostWGLHook(GLE_CURRENT_FUNCTION);
7092 return dw;
7093 }
7094 */
7096 // The rest of the functions are pointer-based.
7098 // WGL_ARB_buffer_region
7099 HANDLE OVR::GLEContext::wglCreateBufferRegionARB_Hook(HDC hDC, int iLayerPlane, UINT uType)
7100 {
7101 HANDLE h = NULL;
7102 if(wglCreateBufferRegionARB_Impl)
7103 h = wglCreateBufferRegionARB_Impl(hDC, iLayerPlane, uType);
7104 PostWGLHook(GLE_CURRENT_FUNCTION);
7105 return h;
7106 }
7108 VOID OVR::GLEContext::wglDeleteBufferRegionARB_Hook(HANDLE hRegion)
7109 {
7110 if(wglDeleteBufferRegionARB_Impl)
7111 wglDeleteBufferRegionARB_Impl(hRegion);
7112 PostWGLHook(GLE_CURRENT_FUNCTION);
7113 }
7115 BOOL OVR::GLEContext::wglSaveBufferRegionARB_Hook(HANDLE hRegion, int x, int y, int width, int height)
7116 {
7117 BOOL b = FALSE;
7118 if(wglSaveBufferRegionARB_Impl)
7119 b = wglSaveBufferRegionARB_Impl(hRegion, x, y, width, height);
7120 PostWGLHook(GLE_CURRENT_FUNCTION);
7121 return b;
7122 }
7124 BOOL OVR::GLEContext::wglRestoreBufferRegionARB_Hook(HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc)
7125 {
7126 BOOL b = FALSE;
7127 if(wglRestoreBufferRegionARB_Impl)
7128 b = wglRestoreBufferRegionARB_Impl(hRegion, x, y, width, height, xSrc, ySrc);
7129 PostWGLHook(GLE_CURRENT_FUNCTION);
7130 return b;
7131 }
7133 // WGL_ARB_extensions_string
7134 const char * OVR::GLEContext::wglGetExtensionsStringARB_Hook(HDC hdc)
7135 {
7136 const char * p = NULL;
7137 if(wglGetExtensionsStringARB_Impl)
7138 p = wglGetExtensionsStringARB_Impl(hdc);
7139 PostWGLHook(GLE_CURRENT_FUNCTION);
7140 return p;
7141 }
7143 // WGL_ARB_pixel_format
7144 BOOL OVR::GLEContext::wglGetPixelFormatAttribivARB_Hook(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues)
7145 {
7146 BOOL b = FALSE;
7147 if(wglGetPixelFormatAttribivARB_Impl)
7148 b = wglGetPixelFormatAttribivARB_Impl(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, piValues);
7149 PostWGLHook(GLE_CURRENT_FUNCTION);
7150 return b;
7151 }
7153 BOOL OVR::GLEContext::wglGetPixelFormatAttribfvARB_Hook(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues)
7154 {
7155 BOOL b = FALSE;
7156 if(wglGetPixelFormatAttribfvARB_Impl)
7157 b = wglGetPixelFormatAttribfvARB_Impl(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues);
7158 PostWGLHook(GLE_CURRENT_FUNCTION);
7159 return b;
7160 }
7162 BOOL OVR::GLEContext::wglChoosePixelFormatARB_Hook(HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats)
7163 {
7164 BOOL b = FALSE;
7165 if(wglChoosePixelFormatARB_Impl)
7166 b = wglChoosePixelFormatARB_Impl(hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats);
7167 PostWGLHook(GLE_CURRENT_FUNCTION);
7168 return b;
7169 }
7171 // WGL_ARB_make_current_read
7172 BOOL OVR::GLEContext::wglMakeContextCurrentARB_Hook(HDC hDrawDC, HDC hReadDC, HGLRC hglrc)
7173 {
7174 BOOL b = FALSE;
7175 if(wglMakeContextCurrentARB_Impl)
7176 b = wglMakeContextCurrentARB_Impl(hDrawDC, hReadDC, hglrc);
7177 PostWGLHook(GLE_CURRENT_FUNCTION);
7178 return b;
7179 }
7181 HDC OVR::GLEContext::wglGetCurrentReadDCARB_Hook()
7182 {
7183 HDC h = NULL;
7184 if(wglGetCurrentReadDCARB_Impl)
7185 h = wglGetCurrentReadDCARB_Impl();
7186 PostWGLHook(GLE_CURRENT_FUNCTION);
7187 return h;
7188 }
7190 // WGL_ARB_pbuffer
7191 HPBUFFERARB OVR::GLEContext::wglCreatePbufferARB_Hook(HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList)
7192 {
7193 HPBUFFERARB h = NULL;
7194 if(wglCreatePbufferARB_Impl)
7195 h = wglCreatePbufferARB_Impl(hDC, iPixelFormat, iWidth, iHeight, piAttribList);
7196 PostWGLHook(GLE_CURRENT_FUNCTION);
7197 return h;
7198 }
7200 HDC OVR::GLEContext::wglGetPbufferDCARB_Hook(HPBUFFERARB hPbuffer)
7201 {
7202 HDC h = NULL;
7203 if(wglGetPbufferDCARB_Impl)
7204 h = wglGetPbufferDCARB_Impl(hPbuffer);
7205 PostWGLHook(GLE_CURRENT_FUNCTION);
7206 return h;
7207 }
7209 int OVR::GLEContext::wglReleasePbufferDCARB_Hook(HPBUFFERARB hPbuffer, HDC hDC)
7210 {
7211 int i = 0;
7212 if(wglReleasePbufferDCARB_Impl)
7213 i = wglReleasePbufferDCARB_Impl(hPbuffer, hDC);
7214 PostWGLHook(GLE_CURRENT_FUNCTION);
7215 return i;
7216 }
7218 BOOL OVR::GLEContext::wglDestroyPbufferARB_Hook(HPBUFFERARB hPbuffer)
7219 {
7220 BOOL b = FALSE;
7221 if(wglDestroyPbufferARB_Impl)
7222 b = wglDestroyPbufferARB_Impl(hPbuffer);
7223 PostWGLHook(GLE_CURRENT_FUNCTION);
7224 return b;
7225 }
7227 BOOL OVR::GLEContext::wglQueryPbufferARB_Hook(HPBUFFERARB hPbuffer, int iAttribute, int *piValue)
7228 {
7229 BOOL b = FALSE;
7230 if(wglQueryPbufferARB_Impl)
7231 b = wglQueryPbufferARB_Impl(hPbuffer, iAttribute, piValue);
7232 PostWGLHook(GLE_CURRENT_FUNCTION);
7233 return b;
7234 }
7236 // WGL_ARB_render_texture
7237 BOOL OVR::GLEContext::wglBindTexImageARB_Hook(HPBUFFERARB hPbuffer, int iBuffer)
7238 {
7239 BOOL b = FALSE;
7240 if(wglBindTexImageARB_Impl)
7241 b = wglBindTexImageARB_Impl(hPbuffer, iBuffer);
7242 PostWGLHook(GLE_CURRENT_FUNCTION);
7243 return b;
7244 }
7246 BOOL OVR::GLEContext::wglReleaseTexImageARB_Hook(HPBUFFERARB hPbuffer, int iBuffer)
7247 {
7248 BOOL b = FALSE;
7249 if(wglReleaseTexImageARB_Impl)
7250 b = wglReleaseTexImageARB_Impl(hPbuffer, iBuffer);
7251 PostWGLHook(GLE_CURRENT_FUNCTION);
7252 return b;
7253 }
7255 BOOL OVR::GLEContext::wglSetPbufferAttribARB_Hook(HPBUFFERARB hPbuffer, const int *piAttribList)
7256 {
7257 BOOL b = FALSE;
7258 if(wglSetPbufferAttribARB_Impl)
7259 b = wglSetPbufferAttribARB_Impl(hPbuffer, piAttribList);
7260 PostWGLHook(GLE_CURRENT_FUNCTION);
7261 return b;
7262 }
7264 // WGL_NV_present_video
7265 int OVR::GLEContext::wglEnumerateVideoDevicesNV_Hook(HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList)
7266 {
7267 int i = 0;
7268 if(wglEnumerateVideoDevicesNV_Impl)
7269 i = wglEnumerateVideoDevicesNV_Impl(hDC, phDeviceList);
7270 PostWGLHook(GLE_CURRENT_FUNCTION);
7271 return i;
7272 }
7274 BOOL OVR::GLEContext::wglBindVideoDeviceNV_Hook(HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList)
7275 {
7276 BOOL b = FALSE;
7277 if(wglBindVideoDeviceNV_Impl)
7278 b = wglBindVideoDeviceNV_Impl(hDC, uVideoSlot, hVideoDevice, piAttribList);
7279 PostWGLHook(GLE_CURRENT_FUNCTION);
7280 return b;
7281 }
7283 BOOL OVR::GLEContext::wglQueryCurrentContextNV_Hook(int iAttribute, int *piValue)
7284 {
7285 BOOL b = FALSE;
7286 if(wglQueryCurrentContextNV_Impl)
7287 b = wglQueryCurrentContextNV_Impl(iAttribute, piValue);
7288 PostWGLHook(GLE_CURRENT_FUNCTION);
7289 return b;
7290 }
7292 // WGL_ARB_create_context
7293 HGLRC OVR::GLEContext::wglCreateContextAttribsARB_Hook(HDC hDC, HGLRC hShareContext, const int *attribList)
7294 {
7295 HGLRC h = NULL;
7296 if(wglCreateContextAttribsARB_Impl)
7297 h = wglCreateContextAttribsARB_Impl(hDC, hShareContext, attribList);
7298 PostWGLHook(GLE_CURRENT_FUNCTION);
7299 return h;
7300 }
7302 // WGL_EXT_extensions_string
7303 const char * OVR::GLEContext::wglGetExtensionsStringEXT_Hook()
7304 {
7305 const char * p = NULL;
7306 if(wglGetExtensionsStringEXT_Impl)
7307 p = wglGetExtensionsStringEXT_Impl();
7308 PostWGLHook(GLE_CURRENT_FUNCTION);
7309 return p;
7310 }
7312 // WGL_EXT_swap_control
7313 BOOL OVR::GLEContext::wglSwapIntervalEXT_Hook(int interval)
7314 {
7315 BOOL b = FALSE;
7316 if(wglSwapIntervalEXT_Impl)
7317 b = wglSwapIntervalEXT_Impl(interval);
7318 PostWGLHook(GLE_CURRENT_FUNCTION);
7319 return b;
7320 }
7322 int OVR::GLEContext::wglGetSwapIntervalEXT_Hook()
7323 {
7324 int i = 0;
7325 if(wglGetSwapIntervalEXT_Impl)
7326 i = wglGetSwapIntervalEXT_Impl();
7327 PostWGLHook(GLE_CURRENT_FUNCTION);
7328 return i;
7329 }
7331 // WGL_OML_sync_control
7332 BOOL OVR::GLEContext::wglGetSyncValuesOML_Hook(HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc)
7333 {
7334 BOOL b = FALSE;
7335 if(wglGetSyncValuesOML_Impl)
7336 b = wglGetSyncValuesOML_Impl(hdc, ust, msc, sbc);
7337 PostWGLHook(GLE_CURRENT_FUNCTION);
7338 return b;
7339 }
7341 BOOL OVR::GLEContext::wglGetMscRateOML_Hook(HDC hdc, INT32 *numerator, INT32 *denominator)
7342 {
7343 BOOL b = FALSE;
7344 if(wglGetMscRateOML_Impl)
7345 b = wglGetMscRateOML_Impl(hdc, numerator, denominator);
7346 PostWGLHook(GLE_CURRENT_FUNCTION);
7347 return b;
7348 }
7350 INT64 OVR::GLEContext::wglSwapBuffersMscOML_Hook(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder)
7351 {
7352 INT64 i = 0;
7353 if(wglSwapBuffersMscOML_Impl)
7354 i = wglSwapBuffersMscOML_Impl(hdc, target_msc, divisor, remainder);
7355 PostWGLHook(GLE_CURRENT_FUNCTION);
7356 return i;
7357 }
7359 INT64 OVR::GLEContext::wglSwapLayerBuffersMscOML_Hook(HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder)
7360 {
7361 INT64 i = 0;
7362 if(wglSwapLayerBuffersMscOML_Impl)
7363 i = wglSwapLayerBuffersMscOML_Impl(hdc, fuPlanes, target_msc, divisor, remainder);
7364 PostWGLHook(GLE_CURRENT_FUNCTION);
7365 return i;
7366 }
7368 BOOL OVR::GLEContext::wglWaitForMscOML_Hook(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc)
7369 {
7370 BOOL b = FALSE;
7371 if(wglWaitForMscOML_Impl)
7372 b = wglWaitForMscOML_Impl(hdc, target_msc, divisor, remainder, ust, msc, sbc);
7373 PostWGLHook(GLE_CURRENT_FUNCTION);
7374 return b;
7375 }
7377 BOOL OVR::GLEContext::wglWaitForSbcOML_Hook(HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc)
7378 {
7379 BOOL b = FALSE;
7380 if(wglWaitForSbcOML_Impl)
7381 b = wglWaitForSbcOML_Impl(hdc, target_sbc, ust, msc, sbc);
7382 PostWGLHook(GLE_CURRENT_FUNCTION);
7383 return b;
7384 }
7386 // WGL_NV_video_output
7387 BOOL OVR::GLEContext::wglGetVideoDeviceNV_Hook(HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice)
7388 {
7389 BOOL b = FALSE;
7390 if(wglGetVideoDeviceNV_Impl)
7391 b = wglGetVideoDeviceNV_Impl(hDC, numDevices, hVideoDevice);
7392 PostWGLHook(GLE_CURRENT_FUNCTION);
7393 return b;
7394 }
7396 BOOL OVR::GLEContext::wglReleaseVideoDeviceNV_Hook(HPVIDEODEV hVideoDevice)
7397 {
7398 BOOL b = FALSE;
7399 if(wglReleaseVideoDeviceNV_Impl)
7400 b = wglReleaseVideoDeviceNV_Impl(hVideoDevice);
7401 PostWGLHook(GLE_CURRENT_FUNCTION);
7402 return b;
7403 }
7405 BOOL OVR::GLEContext::wglBindVideoImageNV_Hook(HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer)
7406 {
7407 BOOL b = FALSE;
7408 if(wglBindVideoImageNV_Impl)
7409 b = wglBindVideoImageNV_Impl(hVideoDevice, hPbuffer, iVideoBuffer);
7410 PostWGLHook(GLE_CURRENT_FUNCTION);
7411 return b;
7412 }
7414 BOOL OVR::GLEContext::wglReleaseVideoImageNV_Hook(HPBUFFERARB hPbuffer, int iVideoBuffer)
7415 {
7416 BOOL b = FALSE;
7417 if(wglReleaseVideoImageNV_Impl)
7418 b = wglReleaseVideoImageNV_Impl(hPbuffer, iVideoBuffer);
7419 PostWGLHook(GLE_CURRENT_FUNCTION);
7420 return b;
7421 }
7423 BOOL OVR::GLEContext::wglSendPbufferToVideoNV_Hook(HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock)
7424 {
7425 BOOL b = FALSE;
7426 if(wglSendPbufferToVideoNV_Impl)
7427 b = wglSendPbufferToVideoNV_Impl(hPbuffer, iBufferType, pulCounterPbuffer, bBlock);
7428 PostWGLHook(GLE_CURRENT_FUNCTION);
7429 return b;
7430 }
7432 BOOL OVR::GLEContext::wglGetVideoInfoNV_Hook(HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo)
7433 {
7434 BOOL b = FALSE;
7435 if(wglGetVideoInfoNV_Impl)
7436 b = wglGetVideoInfoNV_Impl(hpVideoDevice, pulCounterOutputPbuffer, pulCounterOutputVideo);
7437 PostWGLHook(GLE_CURRENT_FUNCTION);
7438 return b;
7439 }
7441 // WGL_NV_swap_group
7442 BOOL OVR::GLEContext::wglJoinSwapGroupNV_Hook(HDC hDC, GLuint group)
7443 {
7444 BOOL b = FALSE;
7445 if(wglJoinSwapGroupNV_Impl)
7446 b = wglJoinSwapGroupNV_Impl(hDC, group);
7447 PostWGLHook(GLE_CURRENT_FUNCTION);
7448 return b;
7449 }
7451 BOOL OVR::GLEContext::wglBindSwapBarrierNV_Hook(GLuint group, GLuint barrier)
7452 {
7453 BOOL b = FALSE;
7454 if(wglBindSwapBarrierNV_Impl)
7455 b = wglBindSwapBarrierNV_Impl(group, barrier);
7456 PostWGLHook(GLE_CURRENT_FUNCTION);
7457 return b;
7458 }
7460 BOOL OVR::GLEContext::wglQuerySwapGroupNV_Hook(HDC hDC, GLuint *group, GLuint *barrier)
7461 {
7462 BOOL b = FALSE;
7463 if(wglQuerySwapGroupNV_Impl)
7464 b = wglQuerySwapGroupNV_Impl(hDC, group, barrier);
7465 PostWGLHook(GLE_CURRENT_FUNCTION);
7466 return b;
7467 }
7469 BOOL OVR::GLEContext::wglQueryMaxSwapGroupsNV_Hook(HDC hDC, GLuint *maxGroups, GLuint *maxBarriers)
7470 {
7471 BOOL b = FALSE;
7472 if(wglQueryMaxSwapGroupsNV_Impl)
7473 b = wglQueryMaxSwapGroupsNV_Impl(hDC, maxGroups, maxBarriers);
7474 PostWGLHook(GLE_CURRENT_FUNCTION);
7475 return b;
7476 }
7478 BOOL OVR::GLEContext::wglQueryFrameCountNV_Hook(HDC hDC, GLuint *count)
7479 {
7480 BOOL b = FALSE;
7481 if(wglQueryFrameCountNV_Impl)
7482 b = wglQueryFrameCountNV_Impl(hDC, count);
7483 PostWGLHook(GLE_CURRENT_FUNCTION);
7484 return b;
7485 }
7487 BOOL OVR::GLEContext::wglResetFrameCountNV_Hook(HDC hDC)
7488 {
7489 BOOL b = FALSE;
7490 if(wglResetFrameCountNV_Impl)
7491 b = wglResetFrameCountNV_Impl(hDC);
7492 PostHook(GLE_CURRENT_FUNCTION);
7493 return b;
7494 }
7496 // WGL_NV_video_capture
7497 BOOL OVR::GLEContext::wglBindVideoCaptureDeviceNV_Hook(UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice)
7498 {
7499 BOOL b = FALSE;
7500 if(wglBindVideoCaptureDeviceNV_Impl)
7501 b = wglBindVideoCaptureDeviceNV_Impl(uVideoSlot, hDevice);
7502 PostWGLHook(GLE_CURRENT_FUNCTION);
7503 return b;
7504 }
7506 UINT OVR::GLEContext::wglEnumerateVideoCaptureDevicesNV_Hook(HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList)
7507 {
7508 UINT u = 0;
7509 if(wglEnumerateVideoCaptureDevicesNV_Impl)
7510 u = wglEnumerateVideoCaptureDevicesNV_Impl(hDc, phDeviceList);
7511 PostWGLHook(GLE_CURRENT_FUNCTION);
7512 return u;
7513 }
7515 BOOL OVR::GLEContext::wglLockVideoCaptureDeviceNV_Hook(HDC hDc, HVIDEOINPUTDEVICENV hDevice)
7516 {
7517 BOOL b = FALSE;
7518 if(wglLockVideoCaptureDeviceNV_Impl)
7519 b = wglLockVideoCaptureDeviceNV_Impl(hDc, hDevice);
7520 PostWGLHook(GLE_CURRENT_FUNCTION);
7521 return b;
7522 }
7524 BOOL OVR::GLEContext::wglQueryVideoCaptureDeviceNV_Hook(HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue)
7525 {
7526 BOOL b = FALSE;
7527 if(wglQueryVideoCaptureDeviceNV_Impl)
7528 b = wglQueryVideoCaptureDeviceNV_Impl(hDc, hDevice, iAttribute, piValue);
7529 PostWGLHook(GLE_CURRENT_FUNCTION);
7530 return b;
7531 }
7533 BOOL OVR::GLEContext::wglReleaseVideoCaptureDeviceNV_Hook(HDC hDc, HVIDEOINPUTDEVICENV hDevice)
7534 {
7535 BOOL b = FALSE;
7536 if(wglReleaseVideoCaptureDeviceNV_Impl)
7537 b = wglReleaseVideoCaptureDeviceNV_Impl(hDc, hDevice);
7538 PostWGLHook(GLE_CURRENT_FUNCTION);
7539 return b;
7540 }
7542 // WGL_NV_copy_image
7543 BOOL OVR::GLEContext::wglCopyImageSubDataNV_Hook(HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC,
7544 GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth)
7545 {
7546 BOOL b = FALSE;
7547 if(wglCopyImageSubDataNV_Impl)
7548 b = wglCopyImageSubDataNV_Impl(hSrcRC, srcName, srcTarget, srcLevel, srcX, srcY, srcZ, hDstRC, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth);
7549 PostWGLHook(GLE_CURRENT_FUNCTION);
7550 return b;
7551 }
7553 // WGL_NV_DX_interop
7554 BOOL OVR::GLEContext::wglDXSetResourceShareHandleNV_Hook(void *dxObject, HANDLE shareHandle)
7555 {
7556 BOOL b = FALSE;
7557 if(wglDXSetResourceShareHandleNV_Impl)
7558 b = wglDXSetResourceShareHandleNV_Impl(dxObject, shareHandle);
7559 PostWGLHook(GLE_CURRENT_FUNCTION);
7560 return b;
7561 }
7563 HANDLE OVR::GLEContext::wglDXOpenDeviceNV_Hook(void *dxDevice)
7564 {
7565 HANDLE h = NULL;
7566 if(wglDXOpenDeviceNV_Impl)
7567 h = wglDXOpenDeviceNV_Impl(dxDevice);
7568 PostWGLHook(GLE_CURRENT_FUNCTION);
7569 return h;
7570 }
7572 BOOL OVR::GLEContext::wglDXCloseDeviceNV_Hook(HANDLE hDevice)
7573 {
7574 BOOL b = FALSE;
7575 if(wglDXCloseDeviceNV_Impl)
7576 b = wglDXCloseDeviceNV_Impl(hDevice);
7577 PostWGLHook(GLE_CURRENT_FUNCTION);
7578 return b;
7579 }
7581 HANDLE OVR::GLEContext::wglDXRegisterObjectNV_Hook(HANDLE hDevice, void *dxObject, GLuint name, GLenum type, GLenum access)
7582 {
7583 HANDLE h = NULL;
7584 if(wglDXRegisterObjectNV_Impl)
7585 h = wglDXRegisterObjectNV_Impl(hDevice, dxObject, name, type, access);
7586 PostWGLHook(GLE_CURRENT_FUNCTION);
7587 return h;
7588 }
7590 BOOL OVR::GLEContext::wglDXUnregisterObjectNV_Hook(HANDLE hDevice, HANDLE hObject)
7591 {
7592 BOOL b = FALSE;
7593 if(wglDXUnregisterObjectNV_Impl)
7594 b = wglDXUnregisterObjectNV_Impl(hDevice, hObject);
7595 PostWGLHook(GLE_CURRENT_FUNCTION);
7596 return b;
7597 }
7599 BOOL OVR::GLEContext::wglDXObjectAccessNV_Hook(HANDLE hObject, GLenum access)
7600 {
7601 BOOL b = FALSE;
7602 if(wglDXObjectAccessNV_Impl)
7603 b = wglDXObjectAccessNV_Impl(hObject, access);
7604 PostWGLHook(GLE_CURRENT_FUNCTION);
7605 return b;
7606 }
7608 BOOL OVR::GLEContext::wglDXLockObjectsNV_Hook(HANDLE hDevice, GLint count, HANDLE *hObjects)
7609 {
7610 BOOL b = FALSE;
7611 if(wglDXLockObjectsNV_Impl)
7612 b = wglDXLockObjectsNV_Impl(hDevice, count, hObjects);
7613 PostWGLHook(GLE_CURRENT_FUNCTION);
7614 return b;
7615 }
7617 BOOL OVR::GLEContext::wglDXUnlockObjectsNV_Hook(HANDLE hDevice, GLint count, HANDLE *hObjects)
7618 {
7619 BOOL b = FALSE;
7620 if(wglDXUnlockObjectsNV_Impl)
7621 b = wglDXUnlockObjectsNV_Impl(hDevice, count, hObjects);
7622 PostWGLHook(GLE_CURRENT_FUNCTION);
7623 return b;
7624 }
7626 #endif // defined(GLE_WGL_ENABLED)
7628 #if defined(GLE_GLX_ENABLED)
7629 void OVR::GLEContext::PostGLXHook(const char* /*function*/)
7630 {
7631 // Empty for now. GLX functions don't have a function like glGetError().
7632 }
7634 // GLX_VERSION_1_0
7635 // GLX_VERSION_1_1
7636 // We don't currently implement hooking of these.
7638 // GLX_VERSION_1_2
7639 ::Display* OVR::GLEContext::glXGetCurrentDisplay_Hook(void)
7640 {
7641 ::Display* p = NULL;
7642 if(glXGetCurrentDisplay_Impl)
7643 p = glXGetCurrentDisplay_Impl();
7644 PostGLXHook(GLE_CURRENT_FUNCTION);
7645 return p;
7646 }
7648 // GLX_VERSION_1_3
7649 GLXFBConfig* OVR::GLEContext::glXChooseFBConfig_Hook(Display *dpy, int screen, const int *attrib_list, int *nelements)
7650 {
7651 GLXFBConfig* p = NULL;
7652 if(glXChooseFBConfig_Impl)
7653 p = glXChooseFBConfig_Impl(dpy, screen, attrib_list, nelements);
7654 PostGLXHook(GLE_CURRENT_FUNCTION);
7655 return p;
7656 }
7658 GLXContext OVR::GLEContext::glXCreateNewContext_Hook(Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct)
7659 {
7660 GLXContext c = 0;
7661 if(glXCreateNewContext_Impl)
7662 c = glXCreateNewContext_Impl(dpy, config, render_type, share_list, direct);
7663 PostGLXHook(GLE_CURRENT_FUNCTION);
7664 return c;
7665 }
7667 GLXPbuffer OVR::GLEContext::glXCreatePbuffer_Hook(Display *dpy, GLXFBConfig config, const int *attrib_list)
7668 {
7669 GLXPbuffer b = 0;
7670 if(glXCreatePbuffer_Impl)
7671 b = glXCreatePbuffer_Impl(dpy, config, attrib_list);
7672 PostGLXHook(GLE_CURRENT_FUNCTION);
7673 return b;
7674 }
7676 GLXPixmap OVR::GLEContext::glXCreatePixmap_Hook(Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list)
7677 {
7678 GLXPixmap m = 0;
7679 if(glXCreatePixmap_Impl)
7680 m = glXCreatePixmap_Impl(dpy, config, pixmap, attrib_list);
7681 PostGLXHook(GLE_CURRENT_FUNCTION);
7682 return m;
7683 }
7685 GLXWindow OVR::GLEContext::glXCreateWindow_Hook(Display *dpy, GLXFBConfig config, Window win, const int *attrib_list)
7686 {
7687 GLXWindow w = 0;
7688 if(glXCreateWindow_Impl)
7689 w = glXCreateWindow_Impl(dpy, config, win, attrib_list);
7690 PostGLXHook(GLE_CURRENT_FUNCTION);
7691 return w;
7692 }
7694 void OVR::GLEContext::glXDestroyPbuffer_Hook(Display *dpy, GLXPbuffer pbuf)
7695 {
7696 if(glXDestroyPbuffer_Impl)
7697 glXDestroyPbuffer_Impl(dpy, pbuf);
7698 PostGLXHook(GLE_CURRENT_FUNCTION);
7699 }
7701 void OVR::GLEContext::glXDestroyPixmap_Hook(Display *dpy, GLXPixmap pixmap)
7702 {
7703 if(glXDestroyPixmap_Impl)
7704 glXDestroyPixmap_Impl(dpy, pixmap);
7705 PostGLXHook(GLE_CURRENT_FUNCTION);
7706 }
7708 void OVR::GLEContext::glXDestroyWindow_Hook(Display *dpy, GLXWindow win)
7709 {
7710 if(glXDestroyWindow_Impl)
7711 glXDestroyWindow_Impl(dpy, win);
7712 PostGLXHook(GLE_CURRENT_FUNCTION);
7713 }
7715 GLXDrawable OVR::GLEContext::glXGetCurrentReadDrawable_Hook(void)
7716 {
7717 GLXDrawable d;
7718 if(glXGetCurrentReadDrawable_Impl)
7719 d = glXGetCurrentReadDrawable_Impl();
7720 PostGLXHook(GLE_CURRENT_FUNCTION);
7721 return d;
7722 }
7724 int OVR::GLEContext::glXGetFBConfigAttrib_Hook(Display *dpy, GLXFBConfig config, int attribute, int *value)
7725 {
7726 int i = -1;
7727 if(glXGetFBConfigAttrib_Impl)
7728 i = glXGetFBConfigAttrib_Impl(dpy, config, attribute, value);
7729 PostGLXHook(GLE_CURRENT_FUNCTION);
7730 return i;
7731 }
7733 GLXFBConfig* OVR::GLEContext::glXGetFBConfigs_Hook(Display *dpy, int screen, int *nelements)
7734 {
7735 GLXFBConfig* p = NULL;
7736 if(glXGetFBConfigs_Impl)
7737 p = glXGetFBConfigs_Impl(dpy, screen, nelements);
7738 PostGLXHook(GLE_CURRENT_FUNCTION);
7739 return p;
7740 }
7742 void OVR::GLEContext::glXGetSelectedEvent_Hook(Display *dpy, GLXDrawable draw, unsigned long *event_mask)
7743 {
7744 if(glXGetSelectedEvent_Impl)
7745 glXGetSelectedEvent_Impl(dpy, draw, event_mask);
7746 PostGLXHook(GLE_CURRENT_FUNCTION);
7747 }
7749 XVisualInfo* OVR::GLEContext::glXGetVisualFromFBConfig_Hook(Display *dpy, GLXFBConfig config)
7750 {
7751 XVisualInfo* p = NULL;
7752 if(glXGetVisualFromFBConfig_Impl)
7753 p = glXGetVisualFromFBConfig_Impl(dpy, config);
7754 PostGLXHook(GLE_CURRENT_FUNCTION);
7755 return p;
7756 }
7758 Bool OVR::GLEContext::glXMakeContextCurrent_Hook(Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx)
7759 {
7760 Bool b = False;
7761 if(glXMakeContextCurrent_Impl)
7762 b = glXMakeContextCurrent_Impl(dpy, draw, read, ctx);
7763 PostGLXHook(GLE_CURRENT_FUNCTION);
7764 return b;
7765 }
7767 int OVR::GLEContext::glXQueryContext_Hook(Display *dpy, GLXContext ctx, int attribute, int *value)
7768 {
7769 int i = GLX_BAD_ATTRIBUTE;
7770 if(glXQueryContext_Impl)
7771 i = glXQueryContext_Impl(dpy, ctx, attribute, value);
7772 PostGLXHook(GLE_CURRENT_FUNCTION);
7773 return i;
7774 }
7776 void OVR::GLEContext::glXQueryDrawable_Hook(Display *dpy, GLXDrawable draw, int attribute, unsigned int *value)
7777 {
7778 if(glXQueryDrawable_Impl)
7779 glXQueryDrawable_Impl(dpy, draw, attribute, value);
7780 PostGLXHook(GLE_CURRENT_FUNCTION);
7781 }
7783 void OVR::GLEContext::glXSelectEvent_Hook(Display *dpy, GLXDrawable draw, unsigned long event_mask)
7784 {
7785 if(glXSelectEvent_Impl)
7786 glXSelectEvent_Impl(dpy, draw, event_mask);
7787 PostGLXHook(GLE_CURRENT_FUNCTION);
7788 }
7790 // GLX_VERSION_1_4
7791 // We don't do hooking of this.
7793 // GLX_ARB_create_context
7794 GLXContext OVR::GLEContext::glXCreateContextAttribsARB_Hook(Display* dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list)
7795 {
7796 GLXContext c = 0;
7797 if(glXCreateContextAttribsARB_Impl)
7798 c = glXCreateContextAttribsARB_Impl(dpy, config, share_context, direct, attrib_list);
7799 PostGLXHook(GLE_CURRENT_FUNCTION);
7800 return c;
7801 }
7803 // GLX_EXT_swap_control
7804 void OVR::GLEContext::glXSwapIntervalEXT_Hook(Display* dpy, GLXDrawable drawable, int interval)
7805 {
7806 if(glXSwapIntervalEXT_Impl)
7807 glXSwapIntervalEXT_Impl(dpy, drawable, interval);
7808 PostGLXHook(GLE_CURRENT_FUNCTION);
7809 }
7811 // GLX_OML_sync_control
7812 Bool OVR::GLEContext::glXGetMscRateOML_Hook(Display* dpy, GLXDrawable drawable, int32_t* numerator, int32_t* denominator)
7813 {
7814 Bool b = False;
7815 if(glXGetMscRateOML_Impl)
7816 b = glXGetMscRateOML_Impl(dpy, drawable, numerator, denominator);
7817 PostGLXHook(GLE_CURRENT_FUNCTION);
7818 return b;
7819 }
7821 Bool OVR::GLEContext::glXGetSyncValuesOML_Hook(Display* dpy, GLXDrawable drawable, int64_t* ust, int64_t* msc, int64_t* sbc)
7822 {
7823 Bool b = False;
7824 if(glXGetSyncValuesOML_Impl)
7825 b = glXGetSyncValuesOML_Impl(dpy, drawable, ust, msc, sbc);
7826 PostGLXHook(GLE_CURRENT_FUNCTION);
7827 return b;
7828 }
7830 int64_t OVR::GLEContext::glXSwapBuffersMscOML_Hook(Display* dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder)
7831 {
7832 int64_t i = 0;
7833 if(glXSwapBuffersMscOML_Impl)
7834 i = glXSwapBuffersMscOML_Impl(dpy, drawable, target_msc, divisor, remainder);
7835 PostGLXHook(GLE_CURRENT_FUNCTION);
7836 return i;
7837 }
7839 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)
7840 {
7841 Bool b = False;
7842 if(glXWaitForMscOML_Impl)
7843 b = glXWaitForMscOML_Impl(dpy, drawable, target_msc, divisor, remainder, ust, msc, sbc);
7844 PostGLXHook(GLE_CURRENT_FUNCTION);
7845 return b;
7846 }
7848 Bool OVR::GLEContext::glXWaitForSbcOML_Hook(Display* dpy, GLXDrawable drawable, int64_t target_sbc, int64_t* ust, int64_t* msc, int64_t* sbc)
7849 {
7850 Bool b = False;
7851 if(glXWaitForSbcOML_Impl)
7852 b = glXWaitForSbcOML_Impl(dpy, drawable, target_sbc, ust, msc, sbc);
7853 PostGLXHook(GLE_CURRENT_FUNCTION);
7854 return b;
7855 }
7857 // GLX_MESA_swap_control
7858 int OVR::GLEContext::glXGetSwapIntervalMESA_Hook()
7859 {
7860 int i = 0;
7861 if(glXGetSwapIntervalMESA_Impl)
7862 i = glXGetSwapIntervalMESA_Impl();
7863 PostGLXHook(GLE_CURRENT_FUNCTION);
7864 return i;
7865 }
7868 int OVR::GLEContext::glXSwapIntervalMESA_Hook(unsigned int interval)
7869 {
7870 int i = 0;
7871 if(glXSwapIntervalMESA_Impl)
7872 i = glXSwapIntervalMESA_Impl(interval);
7873 PostGLXHook(GLE_CURRENT_FUNCTION);
7874 return i;
7875 }
7877 #endif // defined(GLE_GLX_ENABLED)
7879 #endif // GLE_HOOKING_ENABLED
7881 //} // namespace OVR