| 345 | |
| 346 | |
| 347 | GLXContext glXCreateContextAttribsARB(Display *dpy, GLXFBConfig config_, |
| 348 | GLXContext share_context, Bool direct, const int *attribs) |
| 349 | { |
| 350 | GLXContext ctx = 0; |
| 351 | VGLFBConfig config = (VGLFBConfig)config_; |
| 352 | |
| 353 | TRY(); |
| 354 | |
| 355 | if(IS_EXCLUDED(dpy)) |
| 356 | return _glXCreateContextAttribsARB(dpy, config_, share_context, direct, |
| 357 | attribs); |
| 358 | |
| 359 | if(!fconfig.allowindirect) direct = True; |
| 360 | |
| 361 | ///////////////////////////////////////////////////////////////////////////// |
| 362 | OPENTRACE(glXCreateContextAttribsARB); PRARGD(dpy); PRARGC(config); |
| 363 | PRARGX(share_context); PRARGI(direct); PRARGAL13(attribs); STARTTRACE(); |
| 364 | ///////////////////////////////////////////////////////////////////////////// |
| 365 | |
| 366 | ctx = backend::createContext(dpy, config, share_context, direct, attribs); |
| 367 | if(ctx) |
| 368 | { |
| 369 | int newctxIsDirect = backend::isDirect(ctx); |
| 370 | if(!fconfig.egl && !newctxIsDirect && direct) |
| 371 | { |
| 372 | vglout.println("[VGL] WARNING: The OpenGL rendering context obtained on X display"); |
| 373 | vglout.println("[VGL] %s is indirect, which may cause performance to suffer.", |
| 374 | DisplayString(DPY3D)); |
| 375 | vglout.println("[VGL] If %s is a local X display, then the framebuffer device", |
| 376 | DisplayString(DPY3D)); |
| 377 | vglout.println("[VGL] permissions may be set incorrectly."); |
| 378 | } |
| 379 | CTXHASH.add(ctx, config, newctxIsDirect); |
| 380 | } |
| 381 | |
| 382 | ///////////////////////////////////////////////////////////////////////////// |
| 383 | STOPTRACE(); PRARGX(ctx); CLOSETRACE(); |
| 384 | ///////////////////////////////////////////////////////////////////////////// |
| 385 | |
| 386 | CATCH(); |
| 387 | return ctx; |
| 388 | } |
| 389 | |
| 390 | |
| 391 | GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config_, |
nothing calls this directly
no test coverage detected