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
153 Debug_wglCopyContext(HGLRC hglrcSrc
, HGLRC hglrcDst
, UINT mask
) {
154 GL_SERVICE_LOG("wglCopyContext"
155 << "(" << hglrcSrc
<< ", " << hglrcDst
<< ", " << mask
<< ")");
157 g_driver_wgl
.debug_fn
.wglCopyContextFn(hglrcSrc
, hglrcDst
, mask
);
158 GL_SERVICE_LOG("GL_RESULT: " << result
);
162 static HGLRC GL_BINDING_CALL
Debug_wglCreateContext(HDC hdc
) {
163 GL_SERVICE_LOG("wglCreateContext"
164 << "(" << hdc
<< ")");
165 HGLRC result
= g_driver_wgl
.debug_fn
.wglCreateContextFn(hdc
);
166 GL_SERVICE_LOG("GL_RESULT: " << result
);
170 static HGLRC GL_BINDING_CALL
171 Debug_wglCreateLayerContext(HDC hdc
, int iLayerPlane
) {
172 GL_SERVICE_LOG("wglCreateLayerContext"
173 << "(" << hdc
<< ", " << iLayerPlane
<< ")");
175 g_driver_wgl
.debug_fn
.wglCreateLayerContextFn(hdc
, iLayerPlane
);
176 GL_SERVICE_LOG("GL_RESULT: " << result
);
180 static HPBUFFERARB GL_BINDING_CALL
181 Debug_wglCreatePbufferARB(HDC hDC
,
185 const int* piAttribList
) {
186 GL_SERVICE_LOG("wglCreatePbufferARB"
187 << "(" << hDC
<< ", " << iPixelFormat
<< ", " << iWidth
<< ", "
188 << iHeight
<< ", " << static_cast<const void*>(piAttribList
)
190 HPBUFFERARB result
= g_driver_wgl
.debug_fn
.wglCreatePbufferARBFn(
191 hDC
, iPixelFormat
, iWidth
, iHeight
, piAttribList
);
192 GL_SERVICE_LOG("GL_RESULT: " << result
);
196 static BOOL GL_BINDING_CALL
Debug_wglDeleteContext(HGLRC hglrc
) {
197 GL_SERVICE_LOG("wglDeleteContext"
198 << "(" << hglrc
<< ")");
199 BOOL result
= g_driver_wgl
.debug_fn
.wglDeleteContextFn(hglrc
);
200 GL_SERVICE_LOG("GL_RESULT: " << result
);
204 static BOOL GL_BINDING_CALL
Debug_wglDestroyPbufferARB(HPBUFFERARB hPbuffer
) {
205 GL_SERVICE_LOG("wglDestroyPbufferARB"
206 << "(" << hPbuffer
<< ")");
207 BOOL result
= g_driver_wgl
.debug_fn
.wglDestroyPbufferARBFn(hPbuffer
);
208 GL_SERVICE_LOG("GL_RESULT: " << result
);
212 static HGLRC GL_BINDING_CALL
Debug_wglGetCurrentContext() {
213 GL_SERVICE_LOG("wglGetCurrentContext"
216 HGLRC result
= g_driver_wgl
.debug_fn
.wglGetCurrentContextFn();
217 GL_SERVICE_LOG("GL_RESULT: " << result
);
221 static HDC GL_BINDING_CALL
Debug_wglGetCurrentDC() {
222 GL_SERVICE_LOG("wglGetCurrentDC"
225 HDC result
= g_driver_wgl
.debug_fn
.wglGetCurrentDCFn();
226 GL_SERVICE_LOG("GL_RESULT: " << result
);
230 static const char* GL_BINDING_CALL
Debug_wglGetExtensionsStringARB(HDC hDC
) {
231 GL_SERVICE_LOG("wglGetExtensionsStringARB"
232 << "(" << hDC
<< ")");
233 const char* result
= g_driver_wgl
.debug_fn
.wglGetExtensionsStringARBFn(hDC
);
234 GL_SERVICE_LOG("GL_RESULT: " << result
);
238 static const char* GL_BINDING_CALL
Debug_wglGetExtensionsStringEXT() {
239 GL_SERVICE_LOG("wglGetExtensionsStringEXT"
242 const char* result
= g_driver_wgl
.debug_fn
.wglGetExtensionsStringEXTFn();
243 GL_SERVICE_LOG("GL_RESULT: " << result
);
247 static HDC GL_BINDING_CALL
Debug_wglGetPbufferDCARB(HPBUFFERARB hPbuffer
) {
248 GL_SERVICE_LOG("wglGetPbufferDCARB"
249 << "(" << hPbuffer
<< ")");
250 HDC result
= g_driver_wgl
.debug_fn
.wglGetPbufferDCARBFn(hPbuffer
);
251 GL_SERVICE_LOG("GL_RESULT: " << result
);
255 static BOOL GL_BINDING_CALL
Debug_wglMakeCurrent(HDC hdc
, HGLRC hglrc
) {
256 GL_SERVICE_LOG("wglMakeCurrent"
257 << "(" << hdc
<< ", " << hglrc
<< ")");
258 BOOL result
= g_driver_wgl
.debug_fn
.wglMakeCurrentFn(hdc
, hglrc
);
259 GL_SERVICE_LOG("GL_RESULT: " << result
);
263 static BOOL GL_BINDING_CALL
264 Debug_wglQueryPbufferARB(HPBUFFERARB hPbuffer
, int iAttribute
, int* piValue
) {
265 GL_SERVICE_LOG("wglQueryPbufferARB"
266 << "(" << hPbuffer
<< ", " << iAttribute
<< ", "
267 << static_cast<const void*>(piValue
) << ")");
269 g_driver_wgl
.debug_fn
.wglQueryPbufferARBFn(hPbuffer
, iAttribute
, piValue
);
270 GL_SERVICE_LOG("GL_RESULT: " << result
);
274 static int GL_BINDING_CALL
275 Debug_wglReleasePbufferDCARB(HPBUFFERARB hPbuffer
, HDC hDC
) {
276 GL_SERVICE_LOG("wglReleasePbufferDCARB"
277 << "(" << hPbuffer
<< ", " << hDC
<< ")");
278 int result
= g_driver_wgl
.debug_fn
.wglReleasePbufferDCARBFn(hPbuffer
, hDC
);
279 GL_SERVICE_LOG("GL_RESULT: " << result
);
283 static BOOL GL_BINDING_CALL
Debug_wglShareLists(HGLRC hglrc1
, HGLRC hglrc2
) {
284 GL_SERVICE_LOG("wglShareLists"
285 << "(" << hglrc1
<< ", " << hglrc2
<< ")");
286 BOOL result
= g_driver_wgl
.debug_fn
.wglShareListsFn(hglrc1
, hglrc2
);
287 GL_SERVICE_LOG("GL_RESULT: " << result
);
291 static BOOL GL_BINDING_CALL
Debug_wglSwapIntervalEXT(int interval
) {
292 GL_SERVICE_LOG("wglSwapIntervalEXT"
293 << "(" << interval
<< ")");
294 BOOL result
= g_driver_wgl
.debug_fn
.wglSwapIntervalEXTFn(interval
);
295 GL_SERVICE_LOG("GL_RESULT: " << result
);
299 static BOOL GL_BINDING_CALL
Debug_wglSwapLayerBuffers(HDC hdc
, UINT fuPlanes
) {
300 GL_SERVICE_LOG("wglSwapLayerBuffers"
301 << "(" << hdc
<< ", " << fuPlanes
<< ")");
302 BOOL result
= g_driver_wgl
.debug_fn
.wglSwapLayerBuffersFn(hdc
, fuPlanes
);
303 GL_SERVICE_LOG("GL_RESULT: " << result
);
308 void DriverWGL::InitializeDebugBindings() {
309 if (!debug_fn
.wglChoosePixelFormatARBFn
) {
310 debug_fn
.wglChoosePixelFormatARBFn
= fn
.wglChoosePixelFormatARBFn
;
311 fn
.wglChoosePixelFormatARBFn
= Debug_wglChoosePixelFormatARB
;
313 if (!debug_fn
.wglCopyContextFn
) {
314 debug_fn
.wglCopyContextFn
= fn
.wglCopyContextFn
;
315 fn
.wglCopyContextFn
= Debug_wglCopyContext
;
317 if (!debug_fn
.wglCreateContextFn
) {
318 debug_fn
.wglCreateContextFn
= fn
.wglCreateContextFn
;
319 fn
.wglCreateContextFn
= Debug_wglCreateContext
;
321 if (!debug_fn
.wglCreateLayerContextFn
) {
322 debug_fn
.wglCreateLayerContextFn
= fn
.wglCreateLayerContextFn
;
323 fn
.wglCreateLayerContextFn
= Debug_wglCreateLayerContext
;
325 if (!debug_fn
.wglCreatePbufferARBFn
) {
326 debug_fn
.wglCreatePbufferARBFn
= fn
.wglCreatePbufferARBFn
;
327 fn
.wglCreatePbufferARBFn
= Debug_wglCreatePbufferARB
;
329 if (!debug_fn
.wglDeleteContextFn
) {
330 debug_fn
.wglDeleteContextFn
= fn
.wglDeleteContextFn
;
331 fn
.wglDeleteContextFn
= Debug_wglDeleteContext
;
333 if (!debug_fn
.wglDestroyPbufferARBFn
) {
334 debug_fn
.wglDestroyPbufferARBFn
= fn
.wglDestroyPbufferARBFn
;
335 fn
.wglDestroyPbufferARBFn
= Debug_wglDestroyPbufferARB
;
337 if (!debug_fn
.wglGetCurrentContextFn
) {
338 debug_fn
.wglGetCurrentContextFn
= fn
.wglGetCurrentContextFn
;
339 fn
.wglGetCurrentContextFn
= Debug_wglGetCurrentContext
;
341 if (!debug_fn
.wglGetCurrentDCFn
) {
342 debug_fn
.wglGetCurrentDCFn
= fn
.wglGetCurrentDCFn
;
343 fn
.wglGetCurrentDCFn
= Debug_wglGetCurrentDC
;
345 if (!debug_fn
.wglGetExtensionsStringARBFn
) {
346 debug_fn
.wglGetExtensionsStringARBFn
= fn
.wglGetExtensionsStringARBFn
;
347 fn
.wglGetExtensionsStringARBFn
= Debug_wglGetExtensionsStringARB
;
349 if (!debug_fn
.wglGetExtensionsStringEXTFn
) {
350 debug_fn
.wglGetExtensionsStringEXTFn
= fn
.wglGetExtensionsStringEXTFn
;
351 fn
.wglGetExtensionsStringEXTFn
= Debug_wglGetExtensionsStringEXT
;
353 if (!debug_fn
.wglGetPbufferDCARBFn
) {
354 debug_fn
.wglGetPbufferDCARBFn
= fn
.wglGetPbufferDCARBFn
;
355 fn
.wglGetPbufferDCARBFn
= Debug_wglGetPbufferDCARB
;
357 if (!debug_fn
.wglMakeCurrentFn
) {
358 debug_fn
.wglMakeCurrentFn
= fn
.wglMakeCurrentFn
;
359 fn
.wglMakeCurrentFn
= Debug_wglMakeCurrent
;
361 if (!debug_fn
.wglQueryPbufferARBFn
) {
362 debug_fn
.wglQueryPbufferARBFn
= fn
.wglQueryPbufferARBFn
;
363 fn
.wglQueryPbufferARBFn
= Debug_wglQueryPbufferARB
;
365 if (!debug_fn
.wglReleasePbufferDCARBFn
) {
366 debug_fn
.wglReleasePbufferDCARBFn
= fn
.wglReleasePbufferDCARBFn
;
367 fn
.wglReleasePbufferDCARBFn
= Debug_wglReleasePbufferDCARB
;
369 if (!debug_fn
.wglShareListsFn
) {
370 debug_fn
.wglShareListsFn
= fn
.wglShareListsFn
;
371 fn
.wglShareListsFn
= Debug_wglShareLists
;
373 if (!debug_fn
.wglSwapIntervalEXTFn
) {
374 debug_fn
.wglSwapIntervalEXTFn
= fn
.wglSwapIntervalEXTFn
;
375 fn
.wglSwapIntervalEXTFn
= Debug_wglSwapIntervalEXT
;
377 if (!debug_fn
.wglSwapLayerBuffersFn
) {
378 debug_fn
.wglSwapLayerBuffersFn
= fn
.wglSwapLayerBuffersFn
;
379 fn
.wglSwapLayerBuffersFn
= Debug_wglSwapLayerBuffers
;
381 g_debugBindingsInitialized
= true;
384 void DriverWGL::ClearBindings() {
385 memset(this, 0, sizeof(*this));
388 BOOL
WGLApiBase::wglChoosePixelFormatARBFn(HDC dc
,
389 const int* int_attrib_list
,
390 const float* float_attrib_list
,
394 return driver_
->fn
.wglChoosePixelFormatARBFn(dc
, int_attrib_list
,
395 float_attrib_list
, max_formats
,
396 formats
, num_formats
);
399 BOOL
WGLApiBase::wglCopyContextFn(HGLRC hglrcSrc
, HGLRC hglrcDst
, UINT mask
) {
400 return driver_
->fn
.wglCopyContextFn(hglrcSrc
, hglrcDst
, mask
);
403 HGLRC
WGLApiBase::wglCreateContextFn(HDC hdc
) {
404 return driver_
->fn
.wglCreateContextFn(hdc
);
407 HGLRC
WGLApiBase::wglCreateLayerContextFn(HDC hdc
, int iLayerPlane
) {
408 return driver_
->fn
.wglCreateLayerContextFn(hdc
, iLayerPlane
);
411 HPBUFFERARB
WGLApiBase::wglCreatePbufferARBFn(HDC hDC
,
415 const int* piAttribList
) {
416 return driver_
->fn
.wglCreatePbufferARBFn(hDC
, iPixelFormat
, iWidth
, iHeight
,
420 BOOL
WGLApiBase::wglDeleteContextFn(HGLRC hglrc
) {
421 return driver_
->fn
.wglDeleteContextFn(hglrc
);
424 BOOL
WGLApiBase::wglDestroyPbufferARBFn(HPBUFFERARB hPbuffer
) {
425 return driver_
->fn
.wglDestroyPbufferARBFn(hPbuffer
);
428 HGLRC
WGLApiBase::wglGetCurrentContextFn() {
429 return driver_
->fn
.wglGetCurrentContextFn();
432 HDC
WGLApiBase::wglGetCurrentDCFn() {
433 return driver_
->fn
.wglGetCurrentDCFn();
436 const char* WGLApiBase::wglGetExtensionsStringARBFn(HDC hDC
) {
437 return driver_
->fn
.wglGetExtensionsStringARBFn(hDC
);
440 const char* WGLApiBase::wglGetExtensionsStringEXTFn() {
441 return driver_
->fn
.wglGetExtensionsStringEXTFn();
444 HDC
WGLApiBase::wglGetPbufferDCARBFn(HPBUFFERARB hPbuffer
) {
445 return driver_
->fn
.wglGetPbufferDCARBFn(hPbuffer
);
448 BOOL
WGLApiBase::wglMakeCurrentFn(HDC hdc
, HGLRC hglrc
) {
449 return driver_
->fn
.wglMakeCurrentFn(hdc
, hglrc
);
452 BOOL
WGLApiBase::wglQueryPbufferARBFn(HPBUFFERARB hPbuffer
,
455 return driver_
->fn
.wglQueryPbufferARBFn(hPbuffer
, iAttribute
, piValue
);
458 int WGLApiBase::wglReleasePbufferDCARBFn(HPBUFFERARB hPbuffer
, HDC hDC
) {
459 return driver_
->fn
.wglReleasePbufferDCARBFn(hPbuffer
, hDC
);
462 BOOL
WGLApiBase::wglShareListsFn(HGLRC hglrc1
, HGLRC hglrc2
) {
463 return driver_
->fn
.wglShareListsFn(hglrc1
, hglrc2
);
466 BOOL
WGLApiBase::wglSwapIntervalEXTFn(int interval
) {
467 return driver_
->fn
.wglSwapIntervalEXTFn(interval
);
470 BOOL
WGLApiBase::wglSwapLayerBuffersFn(HDC hdc
, UINT fuPlanes
) {
471 return driver_
->fn
.wglSwapLayerBuffersFn(hdc
, fuPlanes
);
474 BOOL
TraceWGLApi::wglChoosePixelFormatARBFn(HDC dc
,
475 const int* int_attrib_list
,
476 const float* float_attrib_list
,
480 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglChoosePixelFormatARB")
481 return wgl_api_
->wglChoosePixelFormatARBFn(dc
, int_attrib_list
,
482 float_attrib_list
, max_formats
,
483 formats
, num_formats
);
486 BOOL
TraceWGLApi::wglCopyContextFn(HGLRC hglrcSrc
, HGLRC hglrcDst
, UINT mask
) {
487 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCopyContext")
488 return wgl_api_
->wglCopyContextFn(hglrcSrc
, hglrcDst
, mask
);
491 HGLRC
TraceWGLApi::wglCreateContextFn(HDC hdc
) {
492 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreateContext")
493 return wgl_api_
->wglCreateContextFn(hdc
);
496 HGLRC
TraceWGLApi::wglCreateLayerContextFn(HDC hdc
, int iLayerPlane
) {
497 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreateLayerContext")
498 return wgl_api_
->wglCreateLayerContextFn(hdc
, iLayerPlane
);
501 HPBUFFERARB
TraceWGLApi::wglCreatePbufferARBFn(HDC hDC
,
505 const int* piAttribList
) {
506 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreatePbufferARB")
507 return wgl_api_
->wglCreatePbufferARBFn(hDC
, iPixelFormat
, iWidth
, iHeight
,
511 BOOL
TraceWGLApi::wglDeleteContextFn(HGLRC hglrc
) {
512 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglDeleteContext")
513 return wgl_api_
->wglDeleteContextFn(hglrc
);
516 BOOL
TraceWGLApi::wglDestroyPbufferARBFn(HPBUFFERARB hPbuffer
) {
517 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglDestroyPbufferARB")
518 return wgl_api_
->wglDestroyPbufferARBFn(hPbuffer
);
521 HGLRC
TraceWGLApi::wglGetCurrentContextFn() {
522 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetCurrentContext")
523 return wgl_api_
->wglGetCurrentContextFn();
526 HDC
TraceWGLApi::wglGetCurrentDCFn() {
527 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetCurrentDC")
528 return wgl_api_
->wglGetCurrentDCFn();
531 const char* TraceWGLApi::wglGetExtensionsStringARBFn(HDC hDC
) {
532 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetExtensionsStringARB")
533 return wgl_api_
->wglGetExtensionsStringARBFn(hDC
);
536 const char* TraceWGLApi::wglGetExtensionsStringEXTFn() {
537 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetExtensionsStringEXT")
538 return wgl_api_
->wglGetExtensionsStringEXTFn();
541 HDC
TraceWGLApi::wglGetPbufferDCARBFn(HPBUFFERARB hPbuffer
) {
542 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetPbufferDCARB")
543 return wgl_api_
->wglGetPbufferDCARBFn(hPbuffer
);
546 BOOL
TraceWGLApi::wglMakeCurrentFn(HDC hdc
, HGLRC hglrc
) {
547 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglMakeCurrent")
548 return wgl_api_
->wglMakeCurrentFn(hdc
, hglrc
);
551 BOOL
TraceWGLApi::wglQueryPbufferARBFn(HPBUFFERARB hPbuffer
,
554 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglQueryPbufferARB")
555 return wgl_api_
->wglQueryPbufferARBFn(hPbuffer
, iAttribute
, piValue
);
558 int TraceWGLApi::wglReleasePbufferDCARBFn(HPBUFFERARB hPbuffer
, HDC hDC
) {
559 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglReleasePbufferDCARB")
560 return wgl_api_
->wglReleasePbufferDCARBFn(hPbuffer
, hDC
);
563 BOOL
TraceWGLApi::wglShareListsFn(HGLRC hglrc1
, HGLRC hglrc2
) {
564 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglShareLists")
565 return wgl_api_
->wglShareListsFn(hglrc1
, hglrc2
);
568 BOOL
TraceWGLApi::wglSwapIntervalEXTFn(int interval
) {
569 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglSwapIntervalEXT")
570 return wgl_api_
->wglSwapIntervalEXTFn(interval
);
573 BOOL
TraceWGLApi::wglSwapLayerBuffersFn(HDC hdc
, UINT fuPlanes
) {
574 TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglSwapLayerBuffers")
575 return wgl_api_
->wglSwapLayerBuffersFn(hdc
, fuPlanes
);