In computer graphics - instead of writing graphics information to a part of memory that is immediately render to the screen, the application writes a complete 3d scene to a part of memory called the back buffer. Once all information is in place in the back buffer it is "presented" to the part of ...
23
votes
3answers
7k views
Double buffering on HTML5 Canvas game?
My simple canvas game seems to work fine on Chrome and FF on Mac/Linux. I haven't had chance to test it on smart phones or Windows environments yet. It doesn't use double buffering but I have seen ...
20
votes
1answer
3k views
What problem does double or triple buffering solve in modern games?
I want to check if my understanding of the causes for using double (or triple) buffering is correct:
A monitor with 60Hz refresh's the monitor-display 60 times per second.
If the monitor refresh the ...
18
votes
1answer
10k views
What is the benefit of triple buffering?
I read everything written in a previous question. From what I understand in double buffering the program must wait until the finished drawing is copied or swapped before starting the next drawing. In ...
7
votes
3answers
1k views
What is the contents of the buffer *after* a call to glSwapBuffers()?
(SDL_GL_SwapBuffers() in particular)
When you have drawn a scene, and you call swap-buffers, it is routine to then glClear() the scene before drawing anything; if you don't clear, what is the ...
7
votes
3answers
2k views
How long does it take for OpenGL to actually update the screen?
I have a simple OpenGL test app in C which draws different things in response to key input. (Mesa 8.0.4, tried with Mesa-EGL and with GLFW, Ubuntu 12.04LTS on a PC with NVIDIA GTX650). The draws are ...
6
votes
3answers
1k views
Framerate is affecting speed of object
I'm experimenting with building a game engine from scratch in Java, and I have a couple questions. My main game loop looks like this:
int FPS = 60;
while(isRunning){
/* ...
5
votes
2answers
503 views
Triple buffering and jittering
John Carmack has a tweet:
"Triple buffering adds latency and jitter; it should be avoided. The Answer is non-isochronous display updates."
Can anyone explain what he meant by adds latency and ...
4
votes
4answers
2k views
how to do partial updates in OpenGL?
It is general wisdom that you redraw the entire viewport on each frame.
I would like to use partial updates; what are the various ways can do that, and what are their pros, cons and relative ...
3
votes
2answers
500 views
Is using a dedicated thread just for sending gpu commands a good idea?
The most basic game loop is like this :
while(1)
{
update();
draw();
swapbuffers();
}
This is very simple but have a problem : some drawing commands can be blocking and cpu will wait ...
3
votes
0answers
76 views
Are there alternatives to multiple buffering? [duplicate]
I'm learning about game programming. So far, my sources lead me to believe that multiple buffering is the best technique for redrawing in OpenGL.
Are there other redrawing techniques? What are their ...
2
votes
1answer
3k views
Triple buffering causes input lag?
Consider some time in between two vsyncs. Suppose the first display buffer is being used to display the current image, and suppose the game was really fast and computed and rendered the next image to ...
1
vote
2answers
321 views
Why swapping buffers takes different amounts of time?
When my program starts, almost nothing is on screen, just couple of lights and spheres. My FPS is at ~50. The Speed measurements looks like this:
UpdateFrame took 0 ms
Clearing lights queue: 0 ms
...
1
vote
1answer
1k views
Multiple buffering in OpenGL on Windows
What is the most common way modern games perform triple buffering ?
What does the SwapBuffers exactly do in terms of OpenGL states ?
Is it possible to perform double and triple buffering ...
0
votes
1answer
98 views
How can I implement triple buffering using Direct3D 9?
I am creating an application using Direct3D 9. I want to implement triple buffering with vsync. I can successfully create a graphics device object with 2 back buffers. How do I know which buffer to ...
0
votes
1answer
682 views
How do I double-buffer renders to a JPanel?
I'm trying to make a little breakout game with Java and Swing. The only issue so far is that drawing on the JPanel causes lots of flickering!
The relevant code:
JFrame frame = new ...
0
votes
2answers
136 views
Double buffer - Managing Collision
I'm thinking about how I should manage collisions in my game. I'm thinking about having a "Collision" class that checks for collision, and in case takes actions to resolve them.
My problem is this:
...
-1
votes
1answer
895 views
Thread safe double buffering
I am trying to implement a draw map method that will draw the tiled image across the surface of the component. I'm having issue with this code. The double buffering does not seem to be working, ...