1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This file is auto-generated from
6 // ui/gl/generate_bindings.py
7 // It's formatted by clang-format using chromium coding style:
8 // clang-format -i -style=chromium filename
13 #include "base/trace_event/trace_event.h"
14 #include "ui/gl/gl_bindings.h"
15 #include "ui/gl/gl_context.h"
16 #include "ui/gl/gl_enums.h"
17 #include "ui/gl/gl_implementation.h"
18 #include "ui/gl/gl_version_info.h"
19 #include "ui/gl/gl_wgl_api_implementation.h"
23 static bool g_debugBindingsInitialized
;
24 DriverWGL g_driver_wgl
;
26 void DriverWGL::InitializeStaticBindings() {
27 fn
.wglChoosePixelFormatARBFn
= 0;
29 reinterpret_cast<wglCopyContextProc
>(GetGLProcAddress("wglCopyContext"));
30 fn
.wglCreateContextFn
= reinterpret_cast<wglCreateContextProc
>(
31 GetGLProcAddress("wglCreateContext"));
32 fn
.wglCreateLayerContextFn
= reinterpret_cast<wglCreateLayerContextProc
>(
33 GetGLProcAddress("wglCreateLayerContext"));
34 fn
.wglCreatePbufferARBFn
= 0;
35 fn
.wglDeleteContextFn
= reinterpret_cast<wglDeleteContextProc
>(
36 GetGLProcAddress("wglDeleteContext"));
37 fn
.wglDestroyPbufferARBFn
= 0;
38 fn
.wglGetCurrentContextFn
= reinterpret_cast<wglGetCurrentContextProc
>(
39 GetGLProcAddress("wglGetCurrentContext"));
40 fn
.wglGetCurrentDCFn
= reinterpret_cast<wglGetCurrentDCProc
>(
41 GetGLProcAddress("wglGetCurrentDC"));
42 fn
.wglGetExtensionsStringARBFn
=
43 reinterpret_cast<wglGetExtensionsStringARBProc
>(
44 GetGLProcAddress("wglGetExtensionsStringARB"));
45 fn
.wglGetExtensionsStringEXTFn
=
46 reinterpret_cast<wglGetExtensionsStringEXTProc
>(
47 GetGLProcAddress("wglGetExtensionsStringEXT"));
48 fn
.wglGetPbufferDCARBFn
= 0;
50 reinterpret_cast<wglMakeCurrentProc
>(GetGLProcAddress("wglMakeCurrent"));
51 fn
.wglQueryPbufferARBFn
= 0;
52 fn
.wglReleasePbufferDCARBFn
= 0;
54 reinterpret_cast<wglShareListsProc
>(GetGLProcAddress("wglShareLists"));
55 fn
.wglSwapIntervalEXTFn
= 0;
56 fn
.wglSwapLayerBuffersFn
= reinterpret_cast<wglSwapLayerBuffersProc
>(
57 GetGLProcAddress("wglSwapLayerBuffers"));
60 void DriverWGL::InitializeExtensionBindings() {
61 std::string
extensions(GetPlatformExtensions());
63 ALLOW_UNUSED_LOCAL(extensions
);
65 ext
.b_WGL_ARB_extensions_string
=
66 extensions
.find("WGL_ARB_extensions_string ") != std::string::npos
;
67 ext
.b_WGL_ARB_pbuffer
=
68 extensions
.find("WGL_ARB_pbuffer ") != std::string::npos
;
69 ext
.b_WGL_ARB_pixel_format
=
70 extensions
.find("WGL_ARB_pixel_format ") != std::string::npos
;
71 ext
.b_WGL_EXT_extensions_string
=
72 extensions
.find("WGL_EXT_extensions_string ") != std::string::npos
;
73 ext
.b_WGL_EXT_swap_control
=
74 extensions
.find("WGL_EXT_swap_control ") != std::string::npos
;
76 debug_fn
.wglChoosePixelFormatARBFn
= 0;
77 if (ext
.b_WGL_ARB_pixel_format
) {
78 fn
.wglChoosePixelFormatARBFn
=
79 reinterpret_cast<wglChoosePixelFormatARBProc
>(
80 GetGLProcAddress("wglChoosePixelFormatARB"));
81 DCHECK(fn
.wglChoosePixelFormatARBFn
);
84 debug_fn
.wglCreatePbufferARBFn
= 0;
85 if (ext
.b_WGL_ARB_pbuffer
) {
86 fn
.wglCreatePbufferARBFn
= reinterpret_cast<wglCreatePbufferARBProc
>(
87 GetGLProcAddress("wglCreatePbufferARB"));
88 DCHECK(fn
.wglCreatePbufferARBFn
);
91 debug_fn
.wglDestroyPbufferARBFn
= 0;
92 if (ext
.b_WGL_ARB_pbuffer
) {
93 fn
.wglDestroyPbufferARBFn
= reinterpret_cast<wglDestroyPbufferARBProc
>(
94 GetGLProcAddress("wglDestroyPbufferARB"));
95 DCHECK(fn
.wglDestroyPbufferARBFn
);
98 debug_fn
.wglGetPbufferDCARBFn
= 0;
99 if (ext
.b_WGL_ARB_pbuffer
) {
100 fn
.wglGetPbufferDCARBFn
= reinterpret_cast<wglGetPbufferDCARBProc
>(
101 GetGLProcAddress("wglGetPbufferDCARB"));
102 DCHECK(fn
.wglGetPbufferDCARBFn
);
105 debug_fn
.wglQueryPbufferARBFn
= 0;
106 if (ext
.b_WGL_ARB_pbuffer
) {
107 fn
.wglQueryPbufferARBFn
= reinterpret_cast<wglQueryPbufferARBProc
>(
108 GetGLProcAddress("wglQueryPbufferARB"));
109 DCHECK(fn
.wglQueryPbufferARBFn
);
112 debug_fn
.wglReleasePbufferDCARBFn
= 0;
113 if (ext
.b_WGL_ARB_pbuffer
) {
114 fn
.wglReleasePbufferDCARBFn
= reinterpret_cast<wglReleasePbufferDCARBProc
>(
115 GetGLProcAddress("wglReleasePbufferDCARB"));
116 DCHECK(fn
.wglReleasePbufferDCARBFn
);
119 debug_fn
.wglSwapIntervalEXTFn
= 0;
120 if (ext
.b_WGL_EXT_swap_control
) {
121 fn
.wglSwapIntervalEXTFn
= reinterpret_cast<wglSwapIntervalEXTProc
>(
122 GetGLProcAddress("wglSwapIntervalEXT"));
123 DCHECK(fn
.wglSwapIntervalEXTFn
);
126 if (g_debugBindingsInitialized
)
127 InitializeDebugBindings();
132 static BOOL GL_BINDING_CALL
133 Debug_wglChoosePixelFormatARB(HDC dc
,
134 const int* int_attrib_list
,
135 const float* float_attrib_list
,
139 GL_SERVICE_LOG("wglChoosePixelFormatARB"
141 << static_cast<const void*>(int_attrib_list
) << ", "
142 << static_cast<const void*>(float_attrib_list
) << ", "
143 << max_formats
<< ", " << static_cast<const void*>(formats
)
144 << ", " << static_cast<const void*>(num_formats
) << ")");
145 BOOL result
= g_driver_wgl
.debug_fn
.wglChoosePixelFormatARBFn(
146 dc
, int_attrib_list
, float_attrib_list
, max_formats
, formats
,
148 GL_SERVICE_LOG("GL_RESULT: " << result
);
152 static BOOL GL_BINDING_CALL
Debug_wglCopyContext(HGLRC hglrcSrc
,
155 GL_SERVICE_LOG("wglCopyContext"
156 << "(" << hglrcSrc
<< ", " << hglrcDst
<< ", " << mask
<< ")");
158 g_driver_wgl
.debug_fn
.wglCopyContextFn(hglrcSrc
, hglrcDst
, mask
);
159 GL_SERVICE_LOG("GL_RESULT: " << result
);
163 static HGLRC GL_BINDING_CALL
Debug_wglCreateContext(HDC hdc
) {
164 GL_SERVICE_LOG("wglCreateContext"
165 << "(" << hdc
<< ")");
166 HGLRC result
= g_driver_wgl
.debug_fn
.wglCreateContextFn(hdc
);
167 GL_SERVICE_LOG("GL_RESULT: " << result
);
171 static HGLRC GL_BINDING_CALL
Debug_wglCreateLayerContext(HDC hdc
,
173 GL_SERVICE_LOG("wglCreateLayerContext"
174 << "(" << hdc
<< ", " << iLayerPlane
<< ")");
176 g_driver_wgl
.debug_fn
.wglCreateLayerContextFn(hdc
, iLayerPlane
);
177 GL_SERVICE_LOG("GL_RESULT: " << result
);
181 static HPBUFFERARB GL_BINDING_CALL
182 Debug_wglCreatePbufferARB(HDC hDC
,
186 const int* piAttribList
) {
187 GL_SERVICE_LOG("wglCreatePbufferARB"
188 << "(" << hDC
<< ", " << iPixelFormat
<< ", " << iWidth
<< ", "
189 << iHeight
<< ", " << static_cast<const void*>(piAttribList
)
191 HPBUFFERARB result
= g_driver_wgl
.debug_fn
.wglCreatePbufferARBFn(
192 hDC
, iPixelFormat
, iWidth
, iHeight
, piAttribList
);
193 GL_SERVICE_LOG("GL_RESULT: " << result
);
197 static BOOL GL_BINDING_CALL
Debug_wglDeleteContext(HGLRC hglrc
) {
198 GL_SERVICE_LOG("wglDeleteContext"
199 << "(" << hglrc
<< ")");
200 BOOL result
= g_driver_wgl
.debug_fn
.wglDeleteContextFn(hglrc
);
201 GL_SERVICE_LOG("GL_RESULT: " << result
);
205 static BOOL GL_BINDING_CALL
Debug_wglDestroyPbufferARB(HPBUFFERARB hPbuffer
) {
206 GL_SERVICE_LOG("wglDestroyPbufferARB"
207 << "(" << hPbuffer
<< ")");
208 BOOL result
= g_driver_wgl
.debug_fn
.wglDestroyPbufferARBFn(hPbuffer
);
209 GL_SERVICE_LOG("GL_RESULT: " << result
);
213 static HGLRC GL_BINDING_CALL
Debug_wglGetCurrentContext() {
214 GL_SERVICE_LOG("wglGetCurrentContext"
217 HGLRC result
= g_driver_wgl
.debug_fn
.wglGetCurrentContextFn();
218 GL_SERVICE_LOG("GL_RESULT: " << result
);
222 static HDC GL_BINDING_CALL
Debug_wglGetCurrentDC() {
223 GL_SERVICE_LOG("wglGetCurrentDC"
226 HDC result
= g_driver_wgl
.debug_fn
.wglGetCurrentDCFn();
227 GL_SERVICE_LOG("GL_RESULT: " << result
);
231 static const char* GL_BINDING_CALL
Debug_wglGetExtensionsStringARB(HDC hDC
) {
232 GL_SERVICE_LOG("wglGetExtensionsStringARB"
233 << "(" << hDC
<< ")");
234 const char* result
= g_driver_wgl
.debug_fn
.wglGetExtensionsStringARBFn(hDC
);
235 GL_SERVICE_LOG("GL_RESULT: " << result
);
239 static const char* GL_BINDING_CALL
Debug_wglGetExtensionsStringEXT() {
240 GL_SERVICE_LOG("wglGetExtensionsStringEXT"
243 const char* result
= g_driver_wgl
.debug_fn
.wglGetExtensionsStringEXTFn();
244 GL_SERVICE_LOG("GL_RESULT: " << result
);
248 static HDC GL_BINDING_CALL
Debug_wglGetPbufferDCARB(HPBUFFERARB hPbuffer
) {
249 GL_SERVICE_LOG("wglGetPbufferDCARB"
250 << "(" << hPbuffer
<< ")");
251 HDC result
= g_driver_wgl
.debug_fn
.wglGetPbufferDCARBFn(hPbuffer
);
252 GL_SERVICE_LOG("GL_RESULT: " << result
);
256 static BOOL GL_BINDING_CALL
Debug_wglMakeCurrent(HDC hdc
, HGLRC hglrc
) {
257 GL_SERVICE_LOG("wglMakeCurrent"
258 << "(" << hdc
<< ", " << hglrc
<< ")");
259 BOOL result
= g_driver_wgl
.debug_fn
.wglMakeCurrentFn(hdc
, hglrc
);
260 GL_SERVICE_LOG("GL_RESULT: " << result
);
264 static BOOL GL_BINDING_CALL
Debug_wglQueryPbufferARB(HPBUFFERARB hPbuffer
,
267 GL_SERVICE_LOG("wglQueryPbufferARB"
268 << "(" << hPbuffer
<< ", " << iAttribute
<< ", "
269 << static_cast<const void*>(piValue
) << ")");
271 g_driver_wgl
.debug_fn
.wglQueryPbufferARBFn(hPbuffer
, iAttribute
, piValue
);
272 GL_SERVICE_LOG("GL_RESULT: " << result
);
276 static int GL_BINDING_CALL
Debug_wglReleasePbufferDCARB(HPBUFFERARB hPbuffer
,
278 GL_SERVICE_LOG("wglReleasePbufferDCARB"
279 << "(" << hPbuffer
<< ", " << hDC
<< ")");
280 int result
= g_driver_wgl
.debug_fn
.wglReleasePbufferDCARBFn(hPbuffer
, hDC
);
281 GL_SERVICE_LOG("GL_RESULT: " << result
);
285 static BOOL GL_BINDING_CALL
Debug_wglShareLists(HGLRC hglrc1
, HGLRC hglrc2
) {
286 GL_SERVICE_LOG("wglShareLists"
287 << "(" << hglrc1
<< ", " << hglrc2
<< ")");
288 BOOL result
= g_driver_wgl
.debug_fn
.wglShareListsFn(hglrc1
, hglrc2
);
289 GL_SERVICE_LOG("GL_RESULT: " << result
);
293 static BOOL GL_BINDING_CALL
Debug_wglSwapIntervalEXT(int interval
) {
294 GL_SERVICE_LOG("wglSwapIntervalEXT"
295 << "(" << interval
<< ")");
296 BOOL result
= g_driver_wgl
.debug_fn
.wglSwapIntervalEXTFn(interval
);
297 GL_SERVICE_LOG("GL_RESULT: " << result
);
301 static BOOL GL_BINDING_CALL
Debug_wglSwapLayerBuffers(HDC hdc
, UINT fuPlanes
) {
302 GL_SERVICE_LOG("wglSwapLayerBuffers"
303 << "(" << hdc
<< ", " << fuPlanes
<< ")");
304 BOOL result
= g_driver_wgl
.debug_fn
.wglSwapLayerBuffersFn(hdc
, fuPlanes
);
305 GL_SERVICE_LOG("GL_RESULT: " << result
);
310 void DriverWGL::InitializeDebugBindings() {
311 if (!debug_fn
.wglChoosePixelFormatARBFn
) {
312 debug_fn
.wglChoosePixelFormatARBFn
= fn
.wglChoosePixelFormatARBFn
;
313 fn
.wglChoosePixelFormatARBFn
= Debug_wglChoosePixelFormatARB
;
315 if (!debug_fn
.wglCopyContextFn
) {
316 debug_fn
.wglCopyContextFn
= fn
.wglCopyContextFn
;
317 fn
.wglCopyContextFn
= Debug_wglCopyContext
;
319 if (!debug_fn
.wglCreateContextFn
) {
320 debug_fn
.wglCreateContextFn
= fn
.wglCreateContextFn
;
321 fn
.wglCreateContextFn
= Debug_wglCreateContext
;
323 if (!debug_fn
.wglCreateLayerContextFn
) {
324 debug_fn
.wglCreateLayerContextFn
= fn
.wglCreateLayerContextFn
;
325 fn
.wglCreateLayerContextFn
= Debug_wglCreateLayerContext
;
327 if (!debug_fn
.wglCreatePbufferARBFn
) {
328 debug_fn
.wglCreatePbufferARBFn
= fn
.wglCreatePbufferARBFn
;
329 fn
.wglCreatePbufferARBFn
= Debug_wglCreatePbufferARB
;
331 if (!debug_fn
.wglDeleteContextFn
) {
332 debug_fn
.wglDeleteContextFn
= fn
.wglDeleteContextFn
;
333 fn
.wglDeleteContextFn
= Debug_wglDeleteContext
;
335 if (!debug_fn
.wglDestroyPbufferARBFn
) {
336 debug_fn
.wglDestroyPbufferARBFn
= fn
.wglDestroyPbufferARBFn
;
337 fn
.wglDestroyPbufferARBFn
= Debug_wglDestroyPbufferARB
;
339 if (!debug_fn
.wglGetCurrentContextFn
) {
340 debug_fn
.wglGetCurrentContextFn
= fn
.wglGetCurrentContextFn
;
341 fn
.wglGetCurrentContextFn
= Debug_wglGetCurrentContext
;
343 if (!debug_fn
.wglGetCurrentDCFn
) {
344 debug_fn
.wglGetCurrentDCFn
= fn
.wglGetCurrentDCFn
;
345 fn
.wglGetCurrentDCFn
= Debug_wglGetCurrentDC
;
347 if (!debug_fn
.wglGetExtensionsStringARBFn
) {
348 debug_fn
.wglGetExtensionsStringARBFn
= fn
.wglGetExtensionsStringARBFn
;
349 fn
.wglGetExtensionsStringARBFn
= Debug_wglGetExtensionsStringARB
;
351 if (!debug_fn
.wglGetExtensionsStringEXTFn
) {
352 debug_fn
.wglGetExtensionsStringEXTFn
= fn
.wglGetExtensionsStringEXTFn
;
353 fn
.wglGetExtensionsStringEXTFn
= Debug_wglGetExtensionsStringEXT
;
355 if (!debug_fn
.wglGetPbufferDCARBFn
) {
356 debug_fn
.wglGetPbufferDCARBFn
= fn
.wglGetPbufferDCARBFn
;
357 fn
.wglGetPbufferDCARBFn
= Debug_wglGetPbufferDCARB
;
359 if (!debug_fn
.wglMakeCurrentFn
) {
360 debug_fn
.wglMakeCurrentFn
= fn
.wglMakeCurrentFn
;
361 fn
.wglMakeCurrentFn
= Debug_wglMakeCurrent
;
363 if (!debug_fn
.wglQueryPbufferARBFn
) {
364 debug_fn
.wglQueryPbufferARBFn
= fn
.wglQueryPbufferARBFn
;
365 fn
.wglQueryPbufferARBFn
= Debug_wglQueryPbufferARB
;
367 if (!debug_fn
.wglReleasePbufferDCARBFn
) {
368 debug_fn
.wglReleasePbufferDCARBFn
= fn
.wglReleasePbufferDCARBFn
;
369 fn
.wglReleasePbufferDCARBFn
= Debug_wglReleasePbufferDCARB
;
371 if (!debug_fn
.wglShareListsFn
) {
372 debug_fn
.wglShareListsFn
= fn
.wglShareListsFn
;
373 fn
.wglShareListsFn
= Debug_wglShareLists
;
375 if (!debug_fn
.wglSwapIntervalEXTFn
) {
376 debug_fn
.wglSwapIntervalEXTFn
= fn
.wglSwapIntervalEXTFn
;
377 fn
.wglSwapIntervalEXTFn
= Debug_wglSwapIntervalEXT
;
379 if (!debug_fn
.wglSwapLayerBuffersFn
) {
380 debug_fn
.wglSwapLayerBuffersFn
= fn
.wglSwapLayerBuffersFn
;
381 fn
.wglSwapLayerBuffersFn
= Debug_wglSwapLayerBuffers
;
383 g_debugBindingsInitialized
= true;
386 void DriverWGL::ClearBindings() {
387 memset(this, 0, sizeof(*this));
390 BOOL
WGLApiBase::wglChoosePixelFormatARBFn(HDC dc
,
391 const int* int_attrib_list
,
392 const float* float_attrib_list
,
396 return driver_
->fn
.wglChoosePixelFormatARBFn(dc
, int_attrib_list
,
397 float_attrib_list
, max_formats
,
398 formats
, num_formats
);
401 BOOL
WGLApiBase::wglCopyContextFn(HGLRC hglrcSrc
, HGLRC hglrcDst
, UINT mask
) {
402 return driver_
->fn
.wglCopyContextFn(hglrcSrc
, hglrcDst
, mask
);
405 HGLRC
WGLApiBase::wglCreateContextFn(HDC hdc
) {
406 return driver_
->fn
.wglCreateContextFn(hdc
);
409 HGLRC
WGLApiBase::wglCreateLayerContextFn(HDC hdc
, int iLayerPlane
) {
410 return driver_
->fn
.wglCreateLayerContextFn(hdc
, iLayerPlane
);
413 HPBUFFERARB
WGLApiBase::wglCreatePbufferARBFn(HDC hDC
,
417 const int* piAttribList
) {
418 return driver_
->fn
.wglCreatePbufferARBFn(hDC
, iPixelFormat
, iWidth
, iHeight
,
422 BOOL
WGLApiBase::wglDeleteContextFn(HGLRC hglrc
) {
423 return driver_
->fn
.wglDeleteContextFn(hglrc
);
426 BOOL
WGLApiBase::wglDestroyPbufferARBFn(HPBUFFERARB hPbuffer
) {
427 return driver_
->fn
.wglDestroyPbufferARBFn(hPbuffer
);
430 HGLRC
WGLApiBase::wglGetCurrentContextFn() {
431 return driver_
->fn
.wglGetCurrentContextFn();
434 HDC
WGLApiBase::wglGetCurrentDCFn() {
435 return driver_
->fn
.wglGetCurrentDCFn();
438 const char* WGLApiBase::wglGetExtensionsStringARBFn(HDC hDC
) {
439 return driver_
->fn
.wglGetExtensionsStringARBFn(hDC
);
442 const char* WGLApiBase::wglGetExtensionsStringEXTFn() {
443 return driver_
->fn
.wglGetExtensionsStringEXTFn();
446 HDC
WGLApiBase::wglGetPbufferDCARBFn(HPBUFFERARB hPbuffer
) {
447 return driver_
->fn
.wglGetPbufferDCARBFn(hPbuffer
);
450 BOOL
WGLApiBase::wglMakeCurrentFn(HDC hdc
, HGLRC hglrc
) {
451 return driver_
->fn
.wglMakeCurrentFn(hdc
, hglrc
);
454 BOOL
WGLApiBase::wglQueryPbufferARBFn(HPBUFFERARB hPbuffer
,
457 return driver_
->fn
.wglQueryPbufferARBFn(hPbuffer
, iAttribute
, piValue
);
460 int WGLApiBase::wglReleasePbufferDCARBFn(HPBUFFERARB hPbuffer
, HDC hDC
) {
461 return driver_
->fn
.wglReleasePbufferDCARBFn(hPbuffer
, hDC
);
464 BOOL
WGLApiBase::wglShareListsFn(HGLRC hglrc1
, HGLRC hglrc2
) {
465 return driver_
->fn
.wglShareListsFn(hglrc1
, hglrc2
);
468 BOOL
WGLApiBase::wglSwapIntervalEXTFn(int interval
) {
469 return driver_
->fn
.wglSwapIntervalEXTFn(interval
);
472 BOOL
WGLApiBase::wglSwapLayerBuffersFn(HDC hdc
, UINT fuPlanes
) {
473 return driver_
->fn
.wglSwapLayerBuffersFn(hdc
, fuPlanes
);
476 BOOL
TraceWGLApi::wglChoosePixelFormatARBFn(HDC dc
,
477 const int* int_attrib_list
,
478 const float* float_attrib_list
,
482 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglChoosePixelFormatARB")
483 return wgl_api_
->wglChoosePixelFormatARBFn(dc
, int_attrib_list
,
484 float_attrib_list
, max_formats
,
485 formats
, num_formats
);
488 BOOL
TraceWGLApi::wglCopyContextFn(HGLRC hglrcSrc
, HGLRC hglrcDst
, UINT mask
) {
489 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCopyContext")
490 return wgl_api_
->wglCopyContextFn(hglrcSrc
, hglrcDst
, mask
);
493 HGLRC
TraceWGLApi::wglCreateContextFn(HDC hdc
) {
494 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreateContext")
495 return wgl_api_
->wglCreateContextFn(hdc
);
498 HGLRC
TraceWGLApi::wglCreateLayerContextFn(HDC hdc
, int iLayerPlane
) {
499 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreateLayerContext")
500 return wgl_api_
->wglCreateLayerContextFn(hdc
, iLayerPlane
);
503 HPBUFFERARB
TraceWGLApi::wglCreatePbufferARBFn(HDC hDC
,
507 const int* piAttribList
) {
508 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreatePbufferARB")
509 return wgl_api_
->wglCreatePbufferARBFn(hDC
, iPixelFormat
, iWidth
, iHeight
,
513 BOOL
TraceWGLApi::wglDeleteContextFn(HGLRC hglrc
) {
514 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglDeleteContext")
515 return wgl_api_
->wglDeleteContextFn(hglrc
);
518 BOOL
TraceWGLApi::wglDestroyPbufferARBFn(HPBUFFERARB hPbuffer
) {
519 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglDestroyPbufferARB")
520 return wgl_api_
->wglDestroyPbufferARBFn(hPbuffer
);
523 HGLRC
TraceWGLApi::wglGetCurrentContextFn() {
524 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetCurrentContext")
525 return wgl_api_
->wglGetCurrentContextFn();
528 HDC
TraceWGLApi::wglGetCurrentDCFn() {
529 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetCurrentDC")
530 return wgl_api_
->wglGetCurrentDCFn();
533 const char* TraceWGLApi::wglGetExtensionsStringARBFn(HDC hDC
) {
534 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetExtensionsStringARB")
535 return wgl_api_
->wglGetExtensionsStringARBFn(hDC
);
538 const char* TraceWGLApi::wglGetExtensionsStringEXTFn() {
539 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetExtensionsStringEXT")
540 return wgl_api_
->wglGetExtensionsStringEXTFn();
543 HDC
TraceWGLApi::wglGetPbufferDCARBFn(HPBUFFERARB hPbuffer
) {
544 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetPbufferDCARB")
545 return wgl_api_
->wglGetPbufferDCARBFn(hPbuffer
);
548 BOOL
TraceWGLApi::wglMakeCurrentFn(HDC hdc
, HGLRC hglrc
) {
549 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglMakeCurrent")
550 return wgl_api_
->wglMakeCurrentFn(hdc
, hglrc
);
553 BOOL
TraceWGLApi::wglQueryPbufferARBFn(HPBUFFERARB hPbuffer
,
556 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglQueryPbufferARB")
557 return wgl_api_
->wglQueryPbufferARBFn(hPbuffer
, iAttribute
, piValue
);
560 int TraceWGLApi::wglReleasePbufferDCARBFn(HPBUFFERARB hPbuffer
, HDC hDC
) {
561 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglReleasePbufferDCARB")
562 return wgl_api_
->wglReleasePbufferDCARBFn(hPbuffer
, hDC
);
565 BOOL
TraceWGLApi::wglShareListsFn(HGLRC hglrc1
, HGLRC hglrc2
) {
566 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglShareLists")
567 return wgl_api_
->wglShareListsFn(hglrc1
, hglrc2
);
570 BOOL
TraceWGLApi::wglSwapIntervalEXTFn(int interval
) {
571 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglSwapIntervalEXT")
572 return wgl_api_
->wglSwapIntervalEXTFn(interval
);
575 BOOL
TraceWGLApi::wglSwapLayerBuffersFn(HDC hdc
, UINT fuPlanes
) {
576 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglSwapLayerBuffers")
577 return wgl_api_
->wglSwapLayerBuffersFn(hdc
, fuPlanes
);