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

Function glXCreateNewContext

server/faker-glx.cpp:391–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

389
390
391GLXContext glXCreateNewContext(Display *dpy, GLXFBConfig config_,
392 int render_type, GLXContext share_list, Bool direct)
393{
394 GLXContext ctx = 0;
395 VGLFBConfig config = (VGLFBConfig)config_;
396
397 TRY();
398
399 if(IS_EXCLUDED(dpy))
400 return _glXCreateNewContext(dpy, config_, render_type, share_list, direct);
401
402 if(!fconfig.allowindirect) direct = True;
403
404 /////////////////////////////////////////////////////////////////////////////
405 OPENTRACE(glXCreateNewContext); PRARGD(dpy); PRARGC(config);
406 PRARGI(render_type); PRARGX(share_list); PRARGI(direct); STARTTRACE();
407 /////////////////////////////////////////////////////////////////////////////
408
409 ctx = backend::createContext(dpy, config, share_list, direct, NULL);
410 if(ctx)
411 {
412 int newctxIsDirect = backend::isDirect(ctx);
413 if(!fconfig.egl && !newctxIsDirect && direct)
414 {
415 vglout.println("[VGL] WARNING: The OpenGL rendering context obtained on X display");
416 vglout.println("[VGL] %s is indirect, which may cause performance to suffer.",
417 DisplayString(DPY3D));
418 vglout.println("[VGL] If %s is a local X display, then the framebuffer device",
419 DisplayString(DPY3D));
420 vglout.println("[VGL] permissions may be set incorrectly.");
421 }
422 CTXHASH.add(ctx, config, newctxIsDirect);
423 }
424
425 /////////////////////////////////////////////////////////////////////////////
426 STOPTRACE(); PRARGX(ctx); CLOSETRACE();
427 /////////////////////////////////////////////////////////////////////////////
428
429 CATCH();
430 return ctx;
431}
432
433// On Linux, GLXFBConfigSGIX is typedef'd to GLXFBConfig
434

Callers 11

readbackTestFunction · 0.85
readbackTestMSFunction · 0.85
queryContextTestFunction · 0.85
offScreenTestFunction · 0.85
contextMismatchTestFunction · 0.85
CreateContextFunction · 0.85
configureFunction · 0.85
make_rgb_db_windowFunction · 0.85
drawableInitFunction · 0.85

Calls 4

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

Tested by 3

configureFunction · 0.68
make_rgb_db_windowFunction · 0.68
drawableInitFunction · 0.68