Hot answers tagged double-buffering
OpenGL sometimes defers your commands until later -- when you see a 0 ms runtime for a particular GL operation, it doesn't mean that operation took 0 ms, it just means that function call (which may have simply queued an operation, not did an actual GPU operation) took a small amount of time. See glFlush(). So, it depends on what work is being done where. ...
Any drawing API function called from the CPU will be submitted to the GPU command ring buffer to be executed later by the GPU. This means that OpenGL functions are mostly non-blocking functions. So the CPU and the GPU will be working in parallel. The most important thing to note is that your application can be CPU or GPU bound. once you call glFinish the ...
OpenGL never updates the screen, technically. There is a window system API that is separate from GL (e.g. GLX, WGL, CGL, EGL) that does this. Buffer swaps using these APIs generally implicitly invoke glFlush (...) but in some implementations (e.g. the GDI rasterizer on Windows) it does a full glFinish (...): *On the left ...
I have an idea of where the jittering comes from with vSync and triple buffering. The easiest way to show this is visually. The first example would be 30fps with a 60hz refresh rate vSynced with Double buffering. The pipes are new frames and periods are duplicated frames. |.|.|.|.|.|.|.|.|. This gives an even ~33ms between each new frame, which makes it ...
Take a look at BufferStrategy, it's the preferred way to use multibuffering for java 2d, - and it works like a charm. Searching google for examples on how to use it should be straightforward :)
I assume you're familiar with this experiment? Essentially John Carmack was doing something similar, recording the screen and timing pixels sent to the screen. He found that a good deal of the latency came from the screen. Other factors were the input delay from the keyboard, video drivers and or course the execution of the program itself.
Only top voted, non community-wiki answers of a minimum length are eligible