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

Method updateGLXDrawable

server/VirtualWin.cpp:214–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212// its FB config) first if necessary
213
214GLXDrawable VirtualWin::updateGLXDrawable(void)
215{
216 if(edpy != EGL_NO_DISPLAY)
217 THROW("VirtualWin::updateGLXDrawable() method not supported with EGL/X11");
218
219 GLXDrawable retval = 0;
220 CriticalSection::SafeLock l(mutex);
221 if(deletedByWM) THROW("Window has been deleted by window manager");
222 if(newConfig)
223 {
224 if(newWidth <= 0 && oglDraw) newWidth = oglDraw->getWidth();
225 if(newHeight <= 0 && oglDraw) newHeight = oglDraw->getHeight();
226 newConfig = false;
227 }
228 if(newWidth > 0 && newHeight > 0)
229 {
230 OGLDrawable *draw = oglDraw;
231 if(init(newWidth, newHeight, config)) oldDraw = draw;
232 newWidth = newHeight = -1;
233 }
234 retval = oglDraw->getGLXDrawable();
235 return retval;
236}
237
238
239void VirtualWin::swapBuffers(void)

Callers 4

glViewportFunction · 0.45
glXMakeCurrentFunction · 0.45
glXMakeContextCurrentFunction · 0.45
eglMakeCurrentFunction · 0.45

Calls 4

initFunction · 0.70
getWidthMethod · 0.45
getHeightMethod · 0.45
getGLXDrawableMethod · 0.45

Tested by

no test coverage detected