A computer-graphics technique for updating a dynamic image that greatly reduces the visual artifacts, especially flicker, caused by the screen pixels 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 [doublebuffered]
181 questions
4
votes
1 answer
Why is getSize() not working for me here and why the flicker when resizing?
This is my first attempt at using BufferStrategy and I'd really appreciate some hints.
1) Why, in the below code, does getSize() return dimensions of 0 until you have resized the window? How can I detect the size of the window right away?
2) Why…

flea whale
- 1,783
- 3
- 25
- 38
4
votes
3 answers
Qt & double buffering - are there any neat tricks to capture pixels or manipulate the back buffer?
I'm migrating an application to Qt from MFC.
The MFC app would use GDI calls to construct the window (a graph plot, basically). It would draw to a memory bitmap back buffer, and then BitBlt that to the screen. Qt, however, already does double…

darron
- 4,284
- 3
- 36
- 44
4
votes
1 answer
Does LVS_EX_DOUBLEBUFFER correctly not double buffer when running on a remote session?
One is supposed to use double buffering when running locally, but to not use double buffering when the window is on a remote session, if one wants to have the best performance of each mode.
The ListView control has an extended style,…

Billy ONeal
- 104,103
- 58
- 317
- 552
4
votes
4 answers
What is the best way to do a flicker-free animated C# custom control?
I am currently creating a custom control that needs to handle animation in a C# project. It is basically a listbox that contains a fixed number of elements that are subject to move. An element (another user control with a background image and a…

Gad
- 41,526
- 13
- 54
- 78
4
votes
1 answer
GDI+ Double Buffering: backbuffer dual-colored monochrome
I am trying to build a very simple graphical app using C++, windows api and GDI+. When first trying to build the app, heavy flickering was introduced, so this code tries to use double buffering, but fails. hdcBuf is the backbuffer.
When trying to…

user10F64D4
- 6,531
- 1
- 13
- 12
3
votes
1 answer
Doublebuffering form causes black dots at corners of text box
When I have a few text boxes on a form and set the DoubleBuffered property of the form to True, it makes the text boxes on the form have black dots at each of the corners. Here's what the corners of the text boxes look like without DoubleBuffered on…

Seth Carnegie
- 73,875
- 22
- 181
- 249
3
votes
3 answers
C# Double Buffering?
I am using the COSMOS compiler to write an OS in C# (For those who dont know COSMOS converts IL code into x86 assembly) and I am making a GUI.
I have made GUIs before but now i am trying to make a double buffer.
It sounds rather easy but following…

Grunt
- 173
- 2
- 2
- 11
3
votes
1 answer
Understanding the behavior of IDirect3DDevice9::Present when it blocks for vsync
I'm developing a scientific application that has to estimate (as best as possible) the time difference between an object getting drawn in the video back buffer and the point at which that object actually becomes visible on the screen. In other…

VokinLoksar
- 125
- 1
- 10
3
votes
3 answers
Disable OnPaintBackground without subclassing Panel?
Is there any way to disable the erasing of a panel without subclassing Panel and overriding OnPaintBackground?
I am trying to achieve a double buffering effect without subclassing Panel. I understand that this may be a weird thing to try to do, but…

WildCrustacean
- 5,896
- 2
- 31
- 42
3
votes
1 answer
Screen tearing JPanel game and double buffering
I am currently using a JPanel to draw the elements from my game, however, there is occasional stuttering with the graphics, after some research I learnt about screen tearing and double buffering, which I believe is the solution to my problem,…

Ryan Ramsden
- 57
- 6
3
votes
1 answer
Double buffering doesn't work on a panel?
I'm working on a small painting program similar to ms paint. At the moment, I'm trying to implement 'select function'. I'm facing flickering problem so I've did some researches and I found out, that I should create my own Panel class.
public class…

Patryk
- 3,042
- 11
- 41
- 83
3
votes
1 answer
OwnerDraw with WS_EX_COMPOSITED under XP
I have a static control which has SS_OWNERDRAW and SS_NOTIFY flag when it is crated. Its parent window has WS_EX_COMPOSITED flag.
Under Windows XP, it is not drawn correctly, as the picture below showed (The right-top rectangle):
But under Windows…

user565739
- 1,302
- 4
- 23
- 46
3
votes
2 answers
Double Buffering, Assembly x86
Well, I'm making a Space Invaders game on Assembly x86 ( 8086 ), and it runs pretty good so far. I'm using assembly in graphics mode 13h, that means 320x200 pixels and 256 colors.
For drawing I'm using the sub-function 0ch, that means that I'm…

Daniel Rivas
- 246
- 5
- 13
3
votes
2 answers
Java Swing : drawLine very slow
I am writing a java application using swing in which I need to draw a grid above a square. In order to do so, I am using the drawLine(...) method provided by the Graphics class.
Everything works fine except that it takes a lot of time to draw each…

Nicolas
- 53
- 5
3
votes
1 answer
Can't seem to make double-buffered painting with multiple monitors
I'm trying to remake my Windows screensaver written with C++ and WinAPIs to work on multiple monitors. I found this article that gives the basics. But when I implement it in my own code, I get a weird result. Take a look at this code:
case…

c00000fd
- 20,994
- 29
- 177
- 400