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

Function checkBufferState

server/fakerut.cpp:260–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258
259
260void checkBufferState(int oldDrawBuf, int oldReadBuf, Display *dpy,
261 GLXDrawable draw, GLXDrawable read, GLXContext ctx)
262{
263 if(glXGetCurrentDisplay() != dpy)
264 THROWNL("Current display changed");
265 if(glXGetCurrentDrawable() != draw || glXGetCurrentReadDrawable() != read)
266 THROWNL("Current drawable changed");
267 if(glXGetCurrentContext() != ctx)
268 THROWNL("Context changed");
269 int drawBuf = -1;
270 glGetIntegerv(GL_DRAW_BUFFER, &drawBuf);
271 if(drawBuf != oldDrawBuf)
272 THROWNL("Draw buffer changed");
273 int readBuf = -1;
274 glGetIntegerv(GL_READ_BUFFER, &readBuf);
275 if(readBuf != oldReadBuf)
276 THROWNL("Read buffer changed");
277}
278
279
280// Check whether double buffering works properly

Callers 5

readbackTestFunction · 0.85
readbackTestMSFunction · 0.85
flushTestFunction · 0.85
runMethod · 0.85
offScreenTestFunction · 0.85

Calls 5

glXGetCurrentDisplayFunction · 0.85
glXGetCurrentDrawableFunction · 0.85
glXGetCurrentContextFunction · 0.85
glGetIntegervFunction · 0.85

Tested by

no test coverage detected