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

Method readback

server/VirtualWin.cpp:271–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269
270
271void VirtualWin::readback(GLint drawBuf, bool spoilLast, bool sync)
272{
273 fconfig_reloadenv();
274 bool doStereo = false; int stereoMode = fconfig.stereo;
275
276 if(fconfig.readback == RRREAD_NONE || !checkRenderMode())
277 return;
278
279 CriticalSection::SafeLock l(mutex);
280 if(deletedByWM) THROW("Window has been deleted by window manager");
281
282 dirty = false;
283
284 int compress = fconfig.compress;
285 if(sync && strlen(fconfig.transport) == 0) compress = RRCOMP_PROXY;
286
287 if(isStereo() && stereoMode != RRSTEREO_LEYE && stereoMode != RRSTEREO_REYE)
288 {
289 if(DrawingToRight() || rdirty) doStereo = true;
290 rdirty = false;
291 if(doStereo && compress == RRCOMP_YUV && strlen(fconfig.transport) == 0)
292 {
293 static bool message3 = false;
294 if(!message3)
295 {
296 vglout.println("[VGL] NOTICE: Quad-buffered stereo cannot be used with YUV encoding.");
297 vglout.println("[VGL] Using anaglyphic stereo instead.");
298 message3 = true;
299 }
300 stereoMode = RRSTEREO_REDCYAN;
301 }
302 else if(doStereo && _Trans[compress] != RRTRANS_VGL
303 && stereoMode == RRSTEREO_QUADBUF && strlen(fconfig.transport) == 0)
304 {
305 static bool message = false;
306 if(!message)
307 {
308 vglout.println("[VGL] NOTICE: Quad-buffered stereo requires the VGL Transport.");
309 vglout.println("[VGL] Using anaglyphic stereo instead.");
310 message = true;
311 }
312 stereoMode = RRSTEREO_REDCYAN;
313 }
314 else if(doStereo && !stereoVisual && stereoMode == RRSTEREO_QUADBUF
315 && strlen(fconfig.transport) == 0)
316 {
317 static bool message2 = false;
318 if(!message2)
319 {
320 vglout.println("[VGL] NOTICE: Cannot use quad-buffered stereo because no stereo visuals are");
321 vglout.println("[VGL] available on the 2D X server. Using anaglyphic stereo instead.");
322 message2 = true;
323 }
324 stereoMode = RRSTEREO_REDCYAN;
325 }
326 }
327
328 if(strlen(fconfig.transport) > 0)

Callers 9

doGLReadbackFunction · 0.45
glXDestroyGLXPixmapFunction · 0.45
glXDestroyPixmapFunction · 0.45
glXMakeCurrentFunction · 0.45
glXMakeContextCurrentFunction · 0.45
glXSwapBuffersFunction · 0.45
eglSwapBuffersFunction · 0.45
XCopyAreaFunction · 0.45
XGetImageFunction · 0.45

Calls 4

fconfig_reloadenvFunction · 0.85
DrawingToRightFunction · 0.85
printlnMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected