1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633
|
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// This file is auto-generated from
// ui/gl/generate_bindings.py
// It's formatted by clang-format using chromium coding style:
// clang-format -i -style=chromium filename
// DO NOT EDIT!
#include <string>
#include "base/trace_event/trace_event.h"
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_enums.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_version_info.h"
#include "ui/gl/gl_wgl_api_implementation.h"
namespace gl {
static bool g_debugBindingsInitialized;
DriverWGL g_driver_wgl;
void DriverWGL::InitializeStaticBindings() {
fn.wglChoosePixelFormatARBFn = 0;
fn.wglCopyContextFn =
reinterpret_cast<wglCopyContextProc>(GetGLProcAddress("wglCopyContext"));
fn.wglCreateContextFn = reinterpret_cast<wglCreateContextProc>(
GetGLProcAddress("wglCreateContext"));
fn.wglCreateContextAttribsARBFn = 0;
fn.wglCreateLayerContextFn = reinterpret_cast<wglCreateLayerContextProc>(
GetGLProcAddress("wglCreateLayerContext"));
fn.wglCreatePbufferARBFn = 0;
fn.wglDeleteContextFn = reinterpret_cast<wglDeleteContextProc>(
GetGLProcAddress("wglDeleteContext"));
fn.wglDestroyPbufferARBFn = 0;
fn.wglGetCurrentContextFn = reinterpret_cast<wglGetCurrentContextProc>(
GetGLProcAddress("wglGetCurrentContext"));
fn.wglGetCurrentDCFn = reinterpret_cast<wglGetCurrentDCProc>(
GetGLProcAddress("wglGetCurrentDC"));
fn.wglGetExtensionsStringARBFn =
reinterpret_cast<wglGetExtensionsStringARBProc>(
GetGLProcAddress("wglGetExtensionsStringARB"));
fn.wglGetExtensionsStringEXTFn =
reinterpret_cast<wglGetExtensionsStringEXTProc>(
GetGLProcAddress("wglGetExtensionsStringEXT"));
fn.wglGetPbufferDCARBFn = 0;
fn.wglMakeCurrentFn =
reinterpret_cast<wglMakeCurrentProc>(GetGLProcAddress("wglMakeCurrent"));
fn.wglQueryPbufferARBFn = 0;
fn.wglReleasePbufferDCARBFn = 0;
fn.wglShareListsFn =
reinterpret_cast<wglShareListsProc>(GetGLProcAddress("wglShareLists"));
fn.wglSwapIntervalEXTFn = 0;
fn.wglSwapLayerBuffersFn = reinterpret_cast<wglSwapLayerBuffersProc>(
GetGLProcAddress("wglSwapLayerBuffers"));
}
void DriverWGL::InitializeExtensionBindings() {
std::string extensions(GetPlatformExtensions());
extensions += " ";
ALLOW_UNUSED_LOCAL(extensions);
ext.b_WGL_ARB_create_context =
extensions.find("WGL_ARB_create_context ") != std::string::npos;
ext.b_WGL_ARB_extensions_string =
extensions.find("WGL_ARB_extensions_string ") != std::string::npos;
ext.b_WGL_ARB_pbuffer =
extensions.find("WGL_ARB_pbuffer ") != std::string::npos;
ext.b_WGL_ARB_pixel_format =
extensions.find("WGL_ARB_pixel_format ") != std::string::npos;
ext.b_WGL_EXT_extensions_string =
extensions.find("WGL_EXT_extensions_string ") != std::string::npos;
ext.b_WGL_EXT_swap_control =
extensions.find("WGL_EXT_swap_control ") != std::string::npos;
debug_fn.wglChoosePixelFormatARBFn = 0;
if (ext.b_WGL_ARB_pixel_format) {
fn.wglChoosePixelFormatARBFn =
reinterpret_cast<wglChoosePixelFormatARBProc>(
GetGLProcAddress("wglChoosePixelFormatARB"));
}
debug_fn.wglCreateContextAttribsARBFn = 0;
if (ext.b_WGL_ARB_create_context) {
fn.wglCreateContextAttribsARBFn =
reinterpret_cast<wglCreateContextAttribsARBProc>(
GetGLProcAddress("wglCreateContextAttribsARB"));
}
debug_fn.wglCreatePbufferARBFn = 0;
if (ext.b_WGL_ARB_pbuffer) {
fn.wglCreatePbufferARBFn = reinterpret_cast<wglCreatePbufferARBProc>(
GetGLProcAddress("wglCreatePbufferARB"));
}
debug_fn.wglDestroyPbufferARBFn = 0;
if (ext.b_WGL_ARB_pbuffer) {
fn.wglDestroyPbufferARBFn = reinterpret_cast<wglDestroyPbufferARBProc>(
GetGLProcAddress("wglDestroyPbufferARB"));
}
debug_fn.wglGetPbufferDCARBFn = 0;
if (ext.b_WGL_ARB_pbuffer) {
fn.wglGetPbufferDCARBFn = reinterpret_cast<wglGetPbufferDCARBProc>(
GetGLProcAddress("wglGetPbufferDCARB"));
}
debug_fn.wglQueryPbufferARBFn = 0;
if (ext.b_WGL_ARB_pbuffer) {
fn.wglQueryPbufferARBFn = reinterpret_cast<wglQueryPbufferARBProc>(
GetGLProcAddress("wglQueryPbufferARB"));
}
debug_fn.wglReleasePbufferDCARBFn = 0;
if (ext.b_WGL_ARB_pbuffer) {
fn.wglReleasePbufferDCARBFn = reinterpret_cast<wglReleasePbufferDCARBProc>(
GetGLProcAddress("wglReleasePbufferDCARB"));
}
debug_fn.wglSwapIntervalEXTFn = 0;
if (ext.b_WGL_EXT_swap_control) {
fn.wglSwapIntervalEXTFn = reinterpret_cast<wglSwapIntervalEXTProc>(
GetGLProcAddress("wglSwapIntervalEXT"));
}
if (g_debugBindingsInitialized)
InitializeDebugBindings();
}
extern "C" {
static BOOL GL_BINDING_CALL
Debug_wglChoosePixelFormatARB(HDC dc,
const int* int_attrib_list,
const float* float_attrib_list,
UINT max_formats,
int* formats,
UINT* num_formats) {
GL_SERVICE_LOG("wglChoosePixelFormatARB"
<< "(" << dc << ", "
<< static_cast<const void*>(int_attrib_list) << ", "
<< static_cast<const void*>(float_attrib_list) << ", "
<< max_formats << ", " << static_cast<const void*>(formats)
<< ", " << static_cast<const void*>(num_formats) << ")");
DCHECK(g_driver_wgl.debug_fn.wglChoosePixelFormatARBFn != nullptr);
BOOL result = g_driver_wgl.debug_fn.wglChoosePixelFormatARBFn(
dc, int_attrib_list, float_attrib_list, max_formats, formats,
num_formats);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static BOOL GL_BINDING_CALL Debug_wglCopyContext(HGLRC hglrcSrc,
HGLRC hglrcDst,
UINT mask) {
GL_SERVICE_LOG("wglCopyContext"
<< "(" << hglrcSrc << ", " << hglrcDst << ", " << mask << ")");
DCHECK(g_driver_wgl.debug_fn.wglCopyContextFn != nullptr);
BOOL result =
g_driver_wgl.debug_fn.wglCopyContextFn(hglrcSrc, hglrcDst, mask);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static HGLRC GL_BINDING_CALL Debug_wglCreateContext(HDC hdc) {
GL_SERVICE_LOG("wglCreateContext"
<< "(" << hdc << ")");
DCHECK(g_driver_wgl.debug_fn.wglCreateContextFn != nullptr);
HGLRC result = g_driver_wgl.debug_fn.wglCreateContextFn(hdc);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static HGLRC GL_BINDING_CALL
Debug_wglCreateContextAttribsARB(HDC hDC,
HGLRC hShareContext,
const int* attribList) {
GL_SERVICE_LOG("wglCreateContextAttribsARB"
<< "(" << hDC << ", " << hShareContext << ", "
<< static_cast<const void*>(attribList) << ")");
DCHECK(g_driver_wgl.debug_fn.wglCreateContextAttribsARBFn != nullptr);
HGLRC result = g_driver_wgl.debug_fn.wglCreateContextAttribsARBFn(
hDC, hShareContext, attribList);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static HGLRC GL_BINDING_CALL Debug_wglCreateLayerContext(HDC hdc,
int iLayerPlane) {
GL_SERVICE_LOG("wglCreateLayerContext"
<< "(" << hdc << ", " << iLayerPlane << ")");
DCHECK(g_driver_wgl.debug_fn.wglCreateLayerContextFn != nullptr);
HGLRC result =
g_driver_wgl.debug_fn.wglCreateLayerContextFn(hdc, iLayerPlane);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static HPBUFFERARB GL_BINDING_CALL
Debug_wglCreatePbufferARB(HDC hDC,
int iPixelFormat,
int iWidth,
int iHeight,
const int* piAttribList) {
GL_SERVICE_LOG("wglCreatePbufferARB"
<< "(" << hDC << ", " << iPixelFormat << ", " << iWidth << ", "
<< iHeight << ", " << static_cast<const void*>(piAttribList)
<< ")");
DCHECK(g_driver_wgl.debug_fn.wglCreatePbufferARBFn != nullptr);
HPBUFFERARB result = g_driver_wgl.debug_fn.wglCreatePbufferARBFn(
hDC, iPixelFormat, iWidth, iHeight, piAttribList);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static BOOL GL_BINDING_CALL Debug_wglDeleteContext(HGLRC hglrc) {
GL_SERVICE_LOG("wglDeleteContext"
<< "(" << hglrc << ")");
DCHECK(g_driver_wgl.debug_fn.wglDeleteContextFn != nullptr);
BOOL result = g_driver_wgl.debug_fn.wglDeleteContextFn(hglrc);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static BOOL GL_BINDING_CALL Debug_wglDestroyPbufferARB(HPBUFFERARB hPbuffer) {
GL_SERVICE_LOG("wglDestroyPbufferARB"
<< "(" << hPbuffer << ")");
DCHECK(g_driver_wgl.debug_fn.wglDestroyPbufferARBFn != nullptr);
BOOL result = g_driver_wgl.debug_fn.wglDestroyPbufferARBFn(hPbuffer);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static HGLRC GL_BINDING_CALL Debug_wglGetCurrentContext() {
GL_SERVICE_LOG("wglGetCurrentContext"
<< "("
<< ")");
DCHECK(g_driver_wgl.debug_fn.wglGetCurrentContextFn != nullptr);
HGLRC result = g_driver_wgl.debug_fn.wglGetCurrentContextFn();
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static HDC GL_BINDING_CALL Debug_wglGetCurrentDC() {
GL_SERVICE_LOG("wglGetCurrentDC"
<< "("
<< ")");
DCHECK(g_driver_wgl.debug_fn.wglGetCurrentDCFn != nullptr);
HDC result = g_driver_wgl.debug_fn.wglGetCurrentDCFn();
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static const char* GL_BINDING_CALL Debug_wglGetExtensionsStringARB(HDC hDC) {
GL_SERVICE_LOG("wglGetExtensionsStringARB"
<< "(" << hDC << ")");
DCHECK(g_driver_wgl.debug_fn.wglGetExtensionsStringARBFn != nullptr);
const char* result = g_driver_wgl.debug_fn.wglGetExtensionsStringARBFn(hDC);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static const char* GL_BINDING_CALL Debug_wglGetExtensionsStringEXT() {
GL_SERVICE_LOG("wglGetExtensionsStringEXT"
<< "("
<< ")");
DCHECK(g_driver_wgl.debug_fn.wglGetExtensionsStringEXTFn != nullptr);
const char* result = g_driver_wgl.debug_fn.wglGetExtensionsStringEXTFn();
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static HDC GL_BINDING_CALL Debug_wglGetPbufferDCARB(HPBUFFERARB hPbuffer) {
GL_SERVICE_LOG("wglGetPbufferDCARB"
<< "(" << hPbuffer << ")");
DCHECK(g_driver_wgl.debug_fn.wglGetPbufferDCARBFn != nullptr);
HDC result = g_driver_wgl.debug_fn.wglGetPbufferDCARBFn(hPbuffer);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static BOOL GL_BINDING_CALL Debug_wglMakeCurrent(HDC hdc, HGLRC hglrc) {
GL_SERVICE_LOG("wglMakeCurrent"
<< "(" << hdc << ", " << hglrc << ")");
DCHECK(g_driver_wgl.debug_fn.wglMakeCurrentFn != nullptr);
BOOL result = g_driver_wgl.debug_fn.wglMakeCurrentFn(hdc, hglrc);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static BOOL GL_BINDING_CALL Debug_wglQueryPbufferARB(HPBUFFERARB hPbuffer,
int iAttribute,
int* piValue) {
GL_SERVICE_LOG("wglQueryPbufferARB"
<< "(" << hPbuffer << ", " << iAttribute << ", "
<< static_cast<const void*>(piValue) << ")");
DCHECK(g_driver_wgl.debug_fn.wglQueryPbufferARBFn != nullptr);
BOOL result =
g_driver_wgl.debug_fn.wglQueryPbufferARBFn(hPbuffer, iAttribute, piValue);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static int GL_BINDING_CALL Debug_wglReleasePbufferDCARB(HPBUFFERARB hPbuffer,
HDC hDC) {
GL_SERVICE_LOG("wglReleasePbufferDCARB"
<< "(" << hPbuffer << ", " << hDC << ")");
DCHECK(g_driver_wgl.debug_fn.wglReleasePbufferDCARBFn != nullptr);
int result = g_driver_wgl.debug_fn.wglReleasePbufferDCARBFn(hPbuffer, hDC);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static BOOL GL_BINDING_CALL Debug_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) {
GL_SERVICE_LOG("wglShareLists"
<< "(" << hglrc1 << ", " << hglrc2 << ")");
DCHECK(g_driver_wgl.debug_fn.wglShareListsFn != nullptr);
BOOL result = g_driver_wgl.debug_fn.wglShareListsFn(hglrc1, hglrc2);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static BOOL GL_BINDING_CALL Debug_wglSwapIntervalEXT(int interval) {
GL_SERVICE_LOG("wglSwapIntervalEXT"
<< "(" << interval << ")");
DCHECK(g_driver_wgl.debug_fn.wglSwapIntervalEXTFn != nullptr);
BOOL result = g_driver_wgl.debug_fn.wglSwapIntervalEXTFn(interval);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
static BOOL GL_BINDING_CALL Debug_wglSwapLayerBuffers(HDC hdc, UINT fuPlanes) {
GL_SERVICE_LOG("wglSwapLayerBuffers"
<< "(" << hdc << ", " << fuPlanes << ")");
DCHECK(g_driver_wgl.debug_fn.wglSwapLayerBuffersFn != nullptr);
BOOL result = g_driver_wgl.debug_fn.wglSwapLayerBuffersFn(hdc, fuPlanes);
GL_SERVICE_LOG("GL_RESULT: " << result);
return result;
}
} // extern "C"
void DriverWGL::InitializeDebugBindings() {
if (!debug_fn.wglChoosePixelFormatARBFn) {
debug_fn.wglChoosePixelFormatARBFn = fn.wglChoosePixelFormatARBFn;
fn.wglChoosePixelFormatARBFn = Debug_wglChoosePixelFormatARB;
}
if (!debug_fn.wglCopyContextFn) {
debug_fn.wglCopyContextFn = fn.wglCopyContextFn;
fn.wglCopyContextFn = Debug_wglCopyContext;
}
if (!debug_fn.wglCreateContextFn) {
debug_fn.wglCreateContextFn = fn.wglCreateContextFn;
fn.wglCreateContextFn = Debug_wglCreateContext;
}
if (!debug_fn.wglCreateContextAttribsARBFn) {
debug_fn.wglCreateContextAttribsARBFn = fn.wglCreateContextAttribsARBFn;
fn.wglCreateContextAttribsARBFn = Debug_wglCreateContextAttribsARB;
}
if (!debug_fn.wglCreateLayerContextFn) {
debug_fn.wglCreateLayerContextFn = fn.wglCreateLayerContextFn;
fn.wglCreateLayerContextFn = Debug_wglCreateLayerContext;
}
if (!debug_fn.wglCreatePbufferARBFn) {
debug_fn.wglCreatePbufferARBFn = fn.wglCreatePbufferARBFn;
fn.wglCreatePbufferARBFn = Debug_wglCreatePbufferARB;
}
if (!debug_fn.wglDeleteContextFn) {
debug_fn.wglDeleteContextFn = fn.wglDeleteContextFn;
fn.wglDeleteContextFn = Debug_wglDeleteContext;
}
if (!debug_fn.wglDestroyPbufferARBFn) {
debug_fn.wglDestroyPbufferARBFn = fn.wglDestroyPbufferARBFn;
fn.wglDestroyPbufferARBFn = Debug_wglDestroyPbufferARB;
}
if (!debug_fn.wglGetCurrentContextFn) {
debug_fn.wglGetCurrentContextFn = fn.wglGetCurrentContextFn;
fn.wglGetCurrentContextFn = Debug_wglGetCurrentContext;
}
if (!debug_fn.wglGetCurrentDCFn) {
debug_fn.wglGetCurrentDCFn = fn.wglGetCurrentDCFn;
fn.wglGetCurrentDCFn = Debug_wglGetCurrentDC;
}
if (!debug_fn.wglGetExtensionsStringARBFn) {
debug_fn.wglGetExtensionsStringARBFn = fn.wglGetExtensionsStringARBFn;
fn.wglGetExtensionsStringARBFn = Debug_wglGetExtensionsStringARB;
}
if (!debug_fn.wglGetExtensionsStringEXTFn) {
debug_fn.wglGetExtensionsStringEXTFn = fn.wglGetExtensionsStringEXTFn;
fn.wglGetExtensionsStringEXTFn = Debug_wglGetExtensionsStringEXT;
}
if (!debug_fn.wglGetPbufferDCARBFn) {
debug_fn.wglGetPbufferDCARBFn = fn.wglGetPbufferDCARBFn;
fn.wglGetPbufferDCARBFn = Debug_wglGetPbufferDCARB;
}
if (!debug_fn.wglMakeCurrentFn) {
debug_fn.wglMakeCurrentFn = fn.wglMakeCurrentFn;
fn.wglMakeCurrentFn = Debug_wglMakeCurrent;
}
if (!debug_fn.wglQueryPbufferARBFn) {
debug_fn.wglQueryPbufferARBFn = fn.wglQueryPbufferARBFn;
fn.wglQueryPbufferARBFn = Debug_wglQueryPbufferARB;
}
if (!debug_fn.wglReleasePbufferDCARBFn) {
debug_fn.wglReleasePbufferDCARBFn = fn.wglReleasePbufferDCARBFn;
fn.wglReleasePbufferDCARBFn = Debug_wglReleasePbufferDCARB;
}
if (!debug_fn.wglShareListsFn) {
debug_fn.wglShareListsFn = fn.wglShareListsFn;
fn.wglShareListsFn = Debug_wglShareLists;
}
if (!debug_fn.wglSwapIntervalEXTFn) {
debug_fn.wglSwapIntervalEXTFn = fn.wglSwapIntervalEXTFn;
fn.wglSwapIntervalEXTFn = Debug_wglSwapIntervalEXT;
}
if (!debug_fn.wglSwapLayerBuffersFn) {
debug_fn.wglSwapLayerBuffersFn = fn.wglSwapLayerBuffersFn;
fn.wglSwapLayerBuffersFn = Debug_wglSwapLayerBuffers;
}
g_debugBindingsInitialized = true;
}
void DriverWGL::ClearBindings() {
memset(this, 0, sizeof(*this));
}
BOOL WGLApiBase::wglChoosePixelFormatARBFn(HDC dc,
const int* int_attrib_list,
const float* float_attrib_list,
UINT max_formats,
int* formats,
UINT* num_formats) {
return driver_->fn.wglChoosePixelFormatARBFn(dc, int_attrib_list,
float_attrib_list, max_formats,
formats, num_formats);
}
BOOL WGLApiBase::wglCopyContextFn(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) {
return driver_->fn.wglCopyContextFn(hglrcSrc, hglrcDst, mask);
}
HGLRC WGLApiBase::wglCreateContextFn(HDC hdc) {
return driver_->fn.wglCreateContextFn(hdc);
}
HGLRC WGLApiBase::wglCreateContextAttribsARBFn(HDC hDC,
HGLRC hShareContext,
const int* attribList) {
return driver_->fn.wglCreateContextAttribsARBFn(hDC, hShareContext,
attribList);
}
HGLRC WGLApiBase::wglCreateLayerContextFn(HDC hdc, int iLayerPlane) {
return driver_->fn.wglCreateLayerContextFn(hdc, iLayerPlane);
}
HPBUFFERARB WGLApiBase::wglCreatePbufferARBFn(HDC hDC,
int iPixelFormat,
int iWidth,
int iHeight,
const int* piAttribList) {
return driver_->fn.wglCreatePbufferARBFn(hDC, iPixelFormat, iWidth, iHeight,
piAttribList);
}
BOOL WGLApiBase::wglDeleteContextFn(HGLRC hglrc) {
return driver_->fn.wglDeleteContextFn(hglrc);
}
BOOL WGLApiBase::wglDestroyPbufferARBFn(HPBUFFERARB hPbuffer) {
return driver_->fn.wglDestroyPbufferARBFn(hPbuffer);
}
HGLRC WGLApiBase::wglGetCurrentContextFn() {
return driver_->fn.wglGetCurrentContextFn();
}
HDC WGLApiBase::wglGetCurrentDCFn() {
return driver_->fn.wglGetCurrentDCFn();
}
const char* WGLApiBase::wglGetExtensionsStringARBFn(HDC hDC) {
return driver_->fn.wglGetExtensionsStringARBFn(hDC);
}
const char* WGLApiBase::wglGetExtensionsStringEXTFn() {
return driver_->fn.wglGetExtensionsStringEXTFn();
}
HDC WGLApiBase::wglGetPbufferDCARBFn(HPBUFFERARB hPbuffer) {
return driver_->fn.wglGetPbufferDCARBFn(hPbuffer);
}
BOOL WGLApiBase::wglMakeCurrentFn(HDC hdc, HGLRC hglrc) {
return driver_->fn.wglMakeCurrentFn(hdc, hglrc);
}
BOOL WGLApiBase::wglQueryPbufferARBFn(HPBUFFERARB hPbuffer,
int iAttribute,
int* piValue) {
return driver_->fn.wglQueryPbufferARBFn(hPbuffer, iAttribute, piValue);
}
int WGLApiBase::wglReleasePbufferDCARBFn(HPBUFFERARB hPbuffer, HDC hDC) {
return driver_->fn.wglReleasePbufferDCARBFn(hPbuffer, hDC);
}
BOOL WGLApiBase::wglShareListsFn(HGLRC hglrc1, HGLRC hglrc2) {
return driver_->fn.wglShareListsFn(hglrc1, hglrc2);
}
BOOL WGLApiBase::wglSwapIntervalEXTFn(int interval) {
return driver_->fn.wglSwapIntervalEXTFn(interval);
}
BOOL WGLApiBase::wglSwapLayerBuffersFn(HDC hdc, UINT fuPlanes) {
return driver_->fn.wglSwapLayerBuffersFn(hdc, fuPlanes);
}
BOOL TraceWGLApi::wglChoosePixelFormatARBFn(HDC dc,
const int* int_attrib_list,
const float* float_attrib_list,
UINT max_formats,
int* formats,
UINT* num_formats) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglChoosePixelFormatARB")
return wgl_api_->wglChoosePixelFormatARBFn(dc, int_attrib_list,
float_attrib_list, max_formats,
formats, num_formats);
}
BOOL TraceWGLApi::wglCopyContextFn(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCopyContext")
return wgl_api_->wglCopyContextFn(hglrcSrc, hglrcDst, mask);
}
HGLRC TraceWGLApi::wglCreateContextFn(HDC hdc) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreateContext")
return wgl_api_->wglCreateContextFn(hdc);
}
HGLRC TraceWGLApi::wglCreateContextAttribsARBFn(HDC hDC,
HGLRC hShareContext,
const int* attribList) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreateContextAttribsARB")
return wgl_api_->wglCreateContextAttribsARBFn(hDC, hShareContext, attribList);
}
HGLRC TraceWGLApi::wglCreateLayerContextFn(HDC hdc, int iLayerPlane) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreateLayerContext")
return wgl_api_->wglCreateLayerContextFn(hdc, iLayerPlane);
}
HPBUFFERARB TraceWGLApi::wglCreatePbufferARBFn(HDC hDC,
int iPixelFormat,
int iWidth,
int iHeight,
const int* piAttribList) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglCreatePbufferARB")
return wgl_api_->wglCreatePbufferARBFn(hDC, iPixelFormat, iWidth, iHeight,
piAttribList);
}
BOOL TraceWGLApi::wglDeleteContextFn(HGLRC hglrc) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglDeleteContext")
return wgl_api_->wglDeleteContextFn(hglrc);
}
BOOL TraceWGLApi::wglDestroyPbufferARBFn(HPBUFFERARB hPbuffer) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglDestroyPbufferARB")
return wgl_api_->wglDestroyPbufferARBFn(hPbuffer);
}
HGLRC TraceWGLApi::wglGetCurrentContextFn() {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetCurrentContext")
return wgl_api_->wglGetCurrentContextFn();
}
HDC TraceWGLApi::wglGetCurrentDCFn() {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetCurrentDC")
return wgl_api_->wglGetCurrentDCFn();
}
const char* TraceWGLApi::wglGetExtensionsStringARBFn(HDC hDC) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetExtensionsStringARB")
return wgl_api_->wglGetExtensionsStringARBFn(hDC);
}
const char* TraceWGLApi::wglGetExtensionsStringEXTFn() {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetExtensionsStringEXT")
return wgl_api_->wglGetExtensionsStringEXTFn();
}
HDC TraceWGLApi::wglGetPbufferDCARBFn(HPBUFFERARB hPbuffer) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglGetPbufferDCARB")
return wgl_api_->wglGetPbufferDCARBFn(hPbuffer);
}
BOOL TraceWGLApi::wglMakeCurrentFn(HDC hdc, HGLRC hglrc) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglMakeCurrent")
return wgl_api_->wglMakeCurrentFn(hdc, hglrc);
}
BOOL TraceWGLApi::wglQueryPbufferARBFn(HPBUFFERARB hPbuffer,
int iAttribute,
int* piValue) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglQueryPbufferARB")
return wgl_api_->wglQueryPbufferARBFn(hPbuffer, iAttribute, piValue);
}
int TraceWGLApi::wglReleasePbufferDCARBFn(HPBUFFERARB hPbuffer, HDC hDC) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglReleasePbufferDCARB")
return wgl_api_->wglReleasePbufferDCARBFn(hPbuffer, hDC);
}
BOOL TraceWGLApi::wglShareListsFn(HGLRC hglrc1, HGLRC hglrc2) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglShareLists")
return wgl_api_->wglShareListsFn(hglrc1, hglrc2);
}
BOOL TraceWGLApi::wglSwapIntervalEXTFn(int interval) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglSwapIntervalEXT")
return wgl_api_->wglSwapIntervalEXTFn(interval);
}
BOOL TraceWGLApi::wglSwapLayerBuffersFn(HDC hdc, UINT fuPlanes) {
TRACE_EVENT_BINARY_EFFICIENT0("gpu", "TraceGLAPI::wglSwapLayerBuffers")
return wgl_api_->wglSwapLayerBuffersFn(hdc, fuPlanes);
}
} // namespace gl
|