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

Method run

server/fakerut.cpp:1664–1692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1662 }
1663
1664 void run(void)
1665 {
1666 int clr = myRank % NC, lastFrame = 0;
1667 bool seenResize = false;
1668
1669 if(!(glXMakeContextCurrent(dpy, win, win, ctx)))
1670 THROWNL("Could not make context current");
1671 ready.signal();
1672 int iter = 0;
1673 while(!deadYet || !seenResize || iter < 3)
1674 {
1675 if(doResize)
1676 {
1677 glViewport(0, 0, width, height);
1678 doResize = false;
1679 seenResize = true;
1680 }
1681 glClearColor(colors[clr].r, colors[clr].g, colors[clr].b, 0.);
1682 glClear(GL_COLOR_BUFFER_BIT);
1683 glReadBuffer(GL_FRONT);
1684 glXSwapBuffers(dpy, win);
1685 CHECK_GL_ERROR();
1686 checkBufferState(GL_BACK, GL_FRONT, dpy, win, win, ctx);
1687 checkFrame(dpy, win, 1, lastFrame);
1688 checkWindowColor(dpy, win, colors[clr].bits, false);
1689 clr = (clr + 1) % NC;
1690 iter++;
1691 }
1692 }
1693
1694 void resize(int width_, int height_)
1695 {

Callers

nothing calls this directly

Calls 8

glXMakeContextCurrentFunction · 0.85
glViewportFunction · 0.85
glReadBufferFunction · 0.85
glXSwapBuffersFunction · 0.85
checkBufferStateFunction · 0.85
signalMethod · 0.80
checkFrameFunction · 0.70
checkWindowColorFunction · 0.70

Tested by

no test coverage detected