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

Function queryExtension

server/backend.cpp:981–1011  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

979
980
981Bool queryExtension(Display *dpy, int *majorOpcode, int *eventBase,
982 int *errorBase)
983{
984 if(fconfig.egl)
985 {
986 // If the 2D X server has a GLX extension, then we hijack its major opcode
987 // and error base.
988 Bool retval = _XQueryExtension(dpy, "GLX", majorOpcode, eventBase,
989 errorBase);
990 // Otherwise, there is no sane way for the EGL back end to operate, mostly
991 // because of XCB. However, we don't throw a fatal error here, because the
992 // 3D application is well within its rights to ask whether the GLX
993 // extension is present and then not use it. (It could, for instance, use
994 // EGL/X11 instead.)
995 if(!retval)
996 {
997 static bool alreadyWarned = false;
998 if(!alreadyWarned)
999 {
1000 if(fconfig.verbose)
1001 vglout.print("[VGL] WARNING: The EGL back end requires a 2D X server with a GLX extension.\n");
1002 alreadyWarned = true;
1003 }
1004 }
1005 return retval;
1006 }
1007 // When using the GLX back end, all GLX errors will come from the 3D X
1008 // server.
1009 else
1010 return _XQueryExtension(DPY3D, "GLX", majorOpcode, eventBase, errorBase);
1011}
1012
1013
1014void readBuffer(GLenum mode)

Callers 3

sendGLXErrorFunction · 0.85
glXQueryExtensionFunction · 0.85
XQueryExtensionFunction · 0.85

Calls 1

printMethod · 0.45

Tested by

no test coverage detected