Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
90 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 ...
0
votes
1answer
290 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 ...
2
votes
1answer
69 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 ...
0
votes
1answer
1k 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; ...
4
votes
1answer
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 ...
1
vote
1answer
226 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 ...
8
votes
3answers
4k 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: ...
0
votes
1answer
325 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
2answers
236 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: ...
3
votes
0answers
88 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 ...
30
votes
1answer
10k 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 ...
0
votes
1answer
2k 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: <...
9
votes
3answers
6k 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 ...
1
vote
2answers
2k 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: ...
4
votes
2answers
786 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 ...
5
votes
2answers
678 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 jitter?...
2
votes
1answer
4k 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
votes
1answer
1k 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, ...
20
votes
1answer
14k 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 ...
1
vote
1answer
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 ...
4
votes
4answers
4k 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 ...
8
votes
3answers
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() ...
23
votes
3answers
8k 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 ...