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

Function destroyContext

server/backend.cpp:316–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314
315
316void destroyContext(Display *dpy, GLXContext ctx)
317{
318 if(fconfig.egl)
319 {
320 try
321 {
322 if(!ctx) return;
323 VGLFBConfig config = CTXHASHEGL.findConfig(ctx);
324 CTXHASHEGL.remove(ctx);
325 RBOCONTEXT.destroyContext(RBOContext::REFCOUNT_CONTEXT);
326 if(!_eglBindAPI(EGL_OPENGL_API))
327 THROW("Could not enable OpenGL API");
328 if(!_eglDestroyContext(EDPY, (EGLContext)ctx))
329 THROW_EGL("eglDestroyContext()");
330 if(!config)
331 faker::sendGLXError(dpy, X_GLXDestroyContext, GLXBadContext, false);
332 }
333 CATCH_EGL(X_GLXDestroyContext)
334 }
335 else _glXDestroyContext(DPY3D, ctx);
336}
337
338
339void destroyPbuffer(Display *dpy, GLXPbuffer pbuf)

Callers 6

initMethod · 0.85
killMethod · 0.85
~VirtualDrawableMethod · 0.85
initMethod · 0.85
setDirectMethod · 0.85
glXDestroyContextFunction · 0.85

Calls 4

sendGLXErrorFunction · 0.85
destroyContextMethod · 0.80
findConfigMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected