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

Function glFlush

server/faker-gl.cpp:78–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76
77
78void glFlush(void)
79{
80 static double lastTime = -1.; double thisTime;
81
82 if(faker::getOGLExcludeCurrent() || faker::getEGLXContextCurrent())
83 {
84 _glFlush(); return;
85 }
86
87 TRY();
88
89 /////////////////////////////////////////////////////////////////////////////
90 if(fconfig.trace) vglout.print("[VGL] glFlush()\n");
91 /////////////////////////////////////////////////////////////////////////////
92
93 DISABLE_FAKER();
94
95 _glFlush();
96 if(lastTime < 0.) lastTime = GetTime();
97 else
98 {
99 thisTime = GetTime() - lastTime;
100 if(thisTime - lastTime < 0.01) fconfig.flushdelay = 0.01;
101 else fconfig.flushdelay = 0.;
102 }
103
104 // See the notes regarding VGL_SPOILLAST and VGL_GLFLUSHTRIGGER in the
105 // VirtualGL User's Guide.
106 if(fconfig.glflushtrigger) doGLReadback(fconfig.spoillast, fconfig.sync);
107
108 CATCH();
109 ENABLE_FAKER();
110}
111
112
113void glXWaitGL(void)

Callers 3

readbackTestFunction · 0.85
flushTestFunction · 0.85
drawBufferFunction · 0.85

Calls 3

GetTimeFunction · 0.85
doGLReadbackFunction · 0.85
printMethod · 0.45

Tested by 1

drawBufferFunction · 0.68