Questions tagged [double-buffering]

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 memory that gets rendered to the screen. This memory is called the front buffer. By doing this problems like tearing and flickering is more or less avoided.

Filter by
Sorted by
Tagged with
0 votes
0 answers
83 views

How is it possible that double buffering is enabled yet the back buffer doesn't exist?

I am working on an existing OpenGL application and am currently trying to figure out why I am getting a black screen. So I am wondering how its possible that double buffering is enabled and the back ...
Doug Ray's user avatar
  • 143
0 votes
1 answer
30 views

What will happen if I intend to display the hidden surface after clearing the window, draw the game objects, and then display the window again?

What will happen if I intend to display the hidden surface after clearing the window, draw the game objects, and then display the window again? Am I watching the drawing process of the objects? Is ...
Đạt Phạm's user avatar
0 votes
0 answers
666 views

Flickering / tearing with glfwSwapBuffers

I recently separated my logic and rendering threads to fix this problem: GLFW window freezes on title bar hold/drag This means the logic and rendering are no longer running in lock-step as they were ...
Dan's user avatar
  • 255
0 votes
1 answer
866 views

How does the double-buffered canvas know when to swap the buffer?

How does the HTML5 canvas know that all the drawing operations are complete and it's time to swap the buffer ? Program can have multiple draw calls at different places so how will it know when is the ...
anonymous's user avatar
  • 514
2 votes
1 answer
157 views

Can GPU draw from one VB and upload to another VB at the same time? (OpenGL)

We have a working implementation of vertex double buffering, rendering from one buffer and uploading vertex data to next frame buffer at the same time. However I am concerned that CPU spends quite a ...
Anton Duzenko's user avatar
0 votes
1 answer
3k views

SDL2 and OpenGL: flickering with double buffering, what am I doing wrong?

I'm currently fiddling with SDL2 and OpenGL to get an understanding on how they work and, moreover, how shaders are done and work. Right now, I'm following this tutorial, using SDL instead of glfw; ...
fedexist's user avatar
4 votes
1 answer
2k views

SDL2, OpenGL, Nvidia laptop screen tearing

EDIT 2017-05-14 dvb. Issue still active to this very day, see geforce forum link in main question. Note 3: "Stoltverd" has posted a "fix guide" on geforce forum. It has workarounds for non-OpenGL ...
david van brink's user avatar
1 vote
1 answer
352 views

Using a smaller off-screen buffer for rendering

I am seeing this in most of the game codes I read and tutorial videos I watch. When using double buffering in rendering, they use a smaller sized off-screen buffer, then just scale it up when drawing ...
userx01's user avatar
  • 346
9 votes
3 answers
6k 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: ...
Carpetfizz's user avatar
0 votes
1 answer
496 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 ...
P. Avery's user avatar
  • 575
0 votes
2 answers
352 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: ...
Luca's user avatar
  • 101
3 votes
0 answers
93 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 ...
Noob Saibot's user avatar
39 votes
1 answer
14k 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 ...
krokvskrok's user avatar
0 votes
1 answer
3k 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: <...
hbsrud's user avatar
  • 117
12 votes
3 answers
7k 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 ...
Alex I's user avatar
  • 173
1 vote
2 answers
3k 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: ...
Lasse's user avatar
  • 3,241
4 votes
2 answers
1k 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 ...
tigrou's user avatar
  • 3,214
5 votes
2 answers
861 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 ...
user782220's user avatar
  • 1,007
3 votes
1 answer
5k 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 ...
user782220's user avatar
  • 1,007
-1 votes
1 answer
2k 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, ...
kdavis8's user avatar
  • 395
19 votes
1 answer
16k 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 ...
user782220's user avatar
  • 1,007
1 vote
1 answer
2k 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 independently ...
Pythagoras of Samos's user avatar
5 votes
4 answers
6k 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 ...
Will's user avatar
  • 6,977
8 votes
3 answers
2k 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() ...
Will's user avatar
  • 6,977
23 votes
3 answers
9k 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 ...
Petteri H's user avatar
  • 1,743