Questions tagged [doublebuffered]

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.

181 questions
7
votes
2 answers

Why should I do manual double buffering?

I am working on a game in C# (either 2.0 or 3.5 havn't decided yet). The game will be played on a map with a hexagonal grid. I appreciate that the UI for this map should use double buffering (lots of layers, so slow drawing). I know that I can…
Pat O
  • 1,344
  • 3
  • 12
  • 27
7
votes
1 answer

Double Buffering with awt

Is double buffering (in java) possible with awt? Currently, I'm aware that swing should not be used with awt, so I can't use BufferStrategy and whatnot (I already have some code written in awt that I don't want to rewrite in swing). If double…
exodrifter
  • 658
  • 1
  • 12
  • 23
7
votes
2 answers

TToolbar incompatible with TForm.DoubleBuffered?

I am using Delphi XE3. When I create a new VCL project and drop a TToolbar on it, everything works fine - except when I activate Form1.DoubleBuffered. From that moment on, drawing of the toolbar is broken - in designtime, it's either black,…
Imanuel
  • 3,596
  • 4
  • 24
  • 46
7
votes
2 answers

What is the correct way to suppress WM_ERASEBKGND?

If I need to use double buffering, I need to suppress WM_ERASEBKGND message. I can handle WM_ERASEBKGND and return immediately. But can I set the WNDCLASS/WNDCLASSEX's hbrBackground to NULL and not handle the WM_ERASEBKGND message? Is this a correct…
EFanZh
  • 2,357
  • 3
  • 30
  • 63
6
votes
6 answers

Despite double buffering, the ticker still flickers

Does anyone have an idea about how to get rid of flickering? I researched on SO, the web, and tried out many different things like putting TickerControl into a double buffered Panel a la Double Buffering when not drawing in OnPaint(): why doesn't it…
Evgeniy Berezovsky
  • 18,571
  • 13
  • 82
  • 156
6
votes
2 answers

Swing/JFrame vs AWT/Frame for rendering outside the EDT

What are the principle differences between using an AWT Frame and a Swing JFrame when implementing your own rendering and not using standard Java GUI components? This is a follow on from a previous question: AWT custom rendering - capture smooth…
Charles Goodwin
  • 6,402
  • 3
  • 34
  • 63
6
votes
6 answers

Performing a pointer swap in a double-buffer multithread system

When double-buffering data that's due to be shared between threads, I've used a system where one thread reads from one buffer, one thread reads from the other buffer and reads from the first buffer. The trouble is, how am I going to implement the…
DeadMG
  • 111
  • 1
  • 5
6
votes
2 answers

non-blocking SwapBuffers() with VSync=on

I am looking for a portable way to make a non-blocking SwapBuffers() even if VSync is activated. In other words, is it possible to to be notified by an event or to know the delay until the next VSync ?
Franck Freiburger
  • 26,310
  • 20
  • 70
  • 95
6
votes
1 answer

Implementing Double Buffering in Java

I have a simple Java JFrame canvas. I am updating what is on the screen every half second or so, and have flickering. I want to implement double buffering to eliminate the flickering, but I am fairly new to Java and am unfamiliar with how to do so.…
kaptaincooke
  • 161
  • 5
  • 14
5
votes
1 answer

WinForms - Does the Form.DoubleBuffered property influence controls placed on that form?

Form has the DoubleBuffered property (bool, inherited from Control). If this is set to true, are all controls placed on the form drawn to screen in a double buffered fashion by virtue of being on the Form? Or do you need to worry about their own…
xyz
  • 27,223
  • 29
  • 105
  • 125
5
votes
2 answers

Java Double Buffering

I'm working on a project and I've read up as much as I can on double buffering in java. What I want to do is add a component or panel or something to my JFrame that contains the double buffered surface to draw to. I want to use hardware acceleration…
Caleb Jares
  • 6,163
  • 6
  • 56
  • 83
5
votes
1 answer

Double buffer child controls in custom control (C#)

I want to double buffer a custom control which contains buttons. I have tried various ways to double buffer the control; SetStyle, BufferedGraphicsContext, and drawing to a bitmap. These all work fine for the custom drawing of the control, but…
Matt Borum
  • 83
  • 3
  • 7
5
votes
1 answer

How do I do double buffering in Java2D?

I'm drawing a bunch of primitives using Java2D on the screen and I'm getting a lot of tearing/flicker. How can I enable/use double-buffering so it draws it off screen then shows the whole thing?
Scorcher84
  • 423
  • 1
  • 6
  • 9
5
votes
1 answer

WGL: No double buffering + multi sampling = FAIL?

I usually create a pixel format using wglChoosePixelFormatARB() with these arguments (among others): WGL_DOUBLE_BUFFER_ARB = GL_TRUE WGL_SAMPLE_BUFFERS_ARB = GL_TRUE WGL_SAMPLES_ARB = 4 i.e. double buffering on and x4 multisampling. This works just…
shoosh
  • 76,898
  • 55
  • 205
  • 325
5
votes
2 answers

invalid argument error when setting yres_virtual in fb_var_screeninfo

I'm trying to make an application for linux that writes directly to the framebuffer /dev/fb0. In order to make it double buffered I try to make the virtual screen be double the size of the screen. This is the program I wrote: struct…
STS
  • 51
  • 1
  • 2
1
2
3
12 13