MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / glXCreateContextAttribsARB

Function glXCreateContextAttribsARB

server/faker-glx.cpp:347–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345
346
347GLXContext 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
391GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config_,

Callers

nothing calls this directly

Calls 4

createContextFunction · 0.85
isDirectFunction · 0.85
printlnMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected