It will work with OpenGL. You just post a new frame and the hardware switches to it during the frame
sync. Since there are only two buffers in doublebuffering, it follows that GLSwapBuffers() must sleep
until the swap is possible. Looking at the wider topic: perhaps it would be better to forget about X
and instead rewrite toolkits on top of OpenGL and then have OpenGL server instead of X server...