A computer-graphics technique for updating a dynamic image that greatly reduces the visual artifacts, especially flicker, caused by the screen pixel being changed. The new image is drawn in a "hidden" buffer while the user still sees the old image, stored in a "visible" buffer (hence "double-buffering"). When the new image is fully drawn, the visible and the hidden buffers are switched very quickly and the hidden buffer content becomes visible.
Questions tagged [double-buffering]
163 questions
2
votes
3 answers
Is Double-buffering required with Desktop Composition enabled?
Is double-buffering still required when Desktop Composition is enabled?
In Microsoft's Application Compatibility Guide:
Graphical Device Interface (GDI)
Prior to Windows Vista and Windows
Server 2008, a window handle (HWND)
was painted…

Ian Boyd
- 246,734
- 253
- 869
- 1,219
2
votes
0 answers
Using 2 different colors on the same paint, for the same canvas cause flickering
This is the code i'm using, it is running the heavy part on the Background, and it draws a growing circle, and while it is growing, the text that is inside the circle fades out, the problem is that the text flickers between blue (the same color as…

desgraci
- 1,191
- 1
- 11
- 25
2
votes
1 answer
Double Buffering with vsync (in sync with refresh rate of screen) - C# windows forms
I've been trying to update the BMP of a PictureBox 60 times per second with a line pattern that changes for every update. What's happening is the image is being partially updated in between screen refreshes. So, what you see is part of one pattern…

user750905
- 21
- 3
2
votes
2 answers
Why does OpenGL double-buffering seem to be inconsistent performance-wise?
I'm making a simple graphical app on OSX. I just started monitoring the frame rate by checking the difference in system time between frames. It seems to be hanging a bit every few frames.
The app runs on an NSTimer object, currently set to 200 fps…

Parker Kemp
- 719
- 1
- 10
- 23
2
votes
1 answer
WPF ElementHost fails to paint with doublebuffering enabled
Hi I am experiencing a similiar problem to this Question.
Whats different for me is that I am using in my WinForms-MainForm the "CreateParams-Method" to force doublebuffering. Code for this is (following e.g. DataGridView draws wrong):
protected…

basti
- 2,649
- 3
- 31
- 46
2
votes
0 answers
Java: double buffering graphics and menubar not working together
i still have to learn a lot about programming (java), i have mostly used Graphics till now. I tried making a menubar, and it worked. But i have problems using Graphics and JMenubar together. First i coulde draw Graphics at all, but after looking on…
user1663369
2
votes
3 answers
How to avoid this NullPointerException
I'm working on a small arcade video game, and I am looking to double buffer to improve animation. I have one class that's supposed to draw the blank image, and another class that's supposed to draw a simple line. However, I keep getting a…

kullalok
- 813
- 2
- 13
- 19
2
votes
1 answer
How to make double buffering for a panel?
I'm trying to do double buffering to get rid of the flicker, but redrawing the image flickers. I need to redraw the image with a periodicity in the bar at a new location, it works for me. But when redrawing very noticeable flicker. Help…

Creative
- 297
- 1
- 5
- 9
2
votes
1 answer
Java: How to use double-buffering in the Snake game for smooth animation?
I am writing the Snake game. I am stuck with the animations, because I want to get smooth animation. I don't how to double buffer images so that to get double-buffering. What has to be done so that this becomes double-buffered?
I use main frame that…

mattis
- 211
- 3
- 10
2
votes
1 answer
Java Image Flickering
I can see from Google searches that this question gets asked a lot, but none of the solutions I find are doing it for me. I'm making a game in Java with images, you know, since games generally have that stuff. But the entire form is constantly…

Doug
- 387
- 2
- 10
- 20
1
vote
2 answers
Double Buffer a JFrame
I have been reading a lot about Double Buffering as I am working on a 2D game. I have come across many different strategies for implementation, but am unsure how Double Buffering would fit into the way I have created my game window. For example, one…

Jack H
- 2,440
- 4
- 40
- 63
1
vote
1 answer
Java SWT GC, how to flush the doublebuffering image forcefully?
Have the following code:
image = new Image(display, imageData);
offScreenImageGC.drawImage(image, 0, 0, imageData.width, imageData.height, imageData.x, imageData.y, imageData.width, imageData.height);
/* Draw the off-screen image to the shell.…

PatlaDJ
- 1,226
- 2
- 17
- 31
1
vote
0 answers
Fast double buffered data display with simultaneous iteration for HTML5 canvas
I'm in the process of trying to optimize a game consisting of a HTML5 canvas. The basic game idea is to take an ImageData object (presumably with getImageData) and modify it, replacing the original (presumably with putImageData).
Problem is I'm…

s1gtrap
- 162
- 2
- 10
1
vote
1 answer
Custom widget is flickering and clipping while moving
I'll give you a minimal reproduceable example that was a part of the more complex widget.
Here we just have a custom widget(called MovableItem) with a simple paintEvent. Widget is created, placed onto the central widget and moved to mouse position…

sup
- 323
- 1
- 12
1
vote
0 answers
Powershell Form GUI with draggable objects
I want to create a PowerShell based GUI with windows forms to display items in different containers and enable the user to drag items (control objects) from one container to another. Because of some bad flickering I copied the answer from this…

GuidoT
- 280
- 1
- 12