Questions tagged [double-buffering]

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.

163 questions
0
votes
1 answer

How to eliminate artifacting with fast update WriteableBitmap

I'm trying to implement a video renderer with a WriteableBitmap. My current implementation works fine for full screen 60fps content, but if I scrub the video (drag the playback back/forth to a new time) the renderer starts updating the…
Nicke Manarin
  • 3,026
  • 4
  • 37
  • 79
0
votes
0 answers

How to draw from Buffered Graphics into Graphics provided by PaintEventArgs .NET

I need to draw a PORTION of the graphics contents in a buffer to the screen during OnPaint override for a custom control, but only familiar with using .Render which draws the whole thing. I use code like this to create the buffer. private…
0
votes
1 answer

Single buffering in OpenGL without clearing

I'd like to draw points (a lot of them) and let them appear progressively on the screen. So my idea is to draw them on the screen without clearing it. However this would work only using single buffering : with double buffering, half of the dots…
141592653
  • 107
  • 1
  • 7
0
votes
2 answers

Java 2D page-flipping on Linux

Our Java 2D application exhibits screen tearing when run on Linux. It does not exhibit any tearing when running on Windows. We've spent significant time analyzing our code, and haven't yet found a cause there. While I'm never one to decide that…
Matt
  • 2,187
  • 1
  • 16
  • 23
0
votes
1 answer

Producer/consumer of type , how to avoid segmentation fault?

I found a great producer/consumer double buffer example in this question. However, instead of setting T to "int", I want to use "int *". Unfortunately, it doesn't work, and I keep getting segmentation faults when writing to the buffer. The code…
Mary
  • 5
  • 2
0
votes
1 answer

How do I fix my double-buffer not drawing to screen?

I'm working on a small operating system, and I ran into some screen-tearing, so I'm working on double-buffering to solve that. I'm just now running into the issue that now nothing prints to screen after revamping my rendering methods. A list of a…
user17400329
0
votes
0 answers

Why does double buffering cause more lag and flickering when resizing the window, using OpenGL and SDL?

I'm using OpenGL and SDL to scale a software-rendered framebuffer of a fixed size (320x240) to the client window size while maintaining the ratio by putting black bars on each side if necessary. When I use single buffering, the rendering is smooth…
xiver77
  • 2,162
  • 1
  • 2
  • 12
0
votes
0 answers

DataGridView problem (probably doubleBuffering ?)

I have this problem: in a windows forms C# app I have a normal form with a DataGridView with CellFormatting event (I need to format 5-6 columns; with 1 everything is ok). The problem is that the form is not completely loaded/rendered (some elements…
Adrian T
  • 93
  • 1
  • 11
0
votes
0 answers

How is double buffering implemented in SDL2?

While trying to learn SDL2, I read about double buffering. I know that SDL uses double buffering on its own. However, I am confused about how double buffering could be implemented in software rendering. First, you have to create a window: SDL_Window…
Ruperrrt
  • 489
  • 2
  • 13
0
votes
0 answers

Screen Flickering in AutoSized textbox

I Have an AutoSized textbox which adjust its size according to the MeasureString of the text inside it by using this code: private void txt_TextChanged(object sender, EventArgs e) { int xold = txt.Width; SizeF MessageSize =…
SY7K ْ
  • 11
  • 2
0
votes
0 answers

Confused by drawing with wxpython cairo; wx.BufferedPaintDC makes stroke disappear

I'm relatively new to wxpython and cairo, please forgive any beginners errors. On drawing a rectangle with wxpython & cairo, the border (stroke) sometimes displays, and sometimes doesn't depending on the value of ctx.set_line_width(). When it does…
alex
  • 3
  • 2
0
votes
1 answer

Am I using double buffering?

I am building a Windows MFC application. During some animations where objects collide at high speeds, my physics engine behaves unpredictably. I believe it has something to do with me dropping frames somehow. I was told that I'm not using double…
Justin
  • 107
  • 1
  • 10
0
votes
0 answers

Swapping 2 Vec properties from mutably referenced object in Rust

In my implementation of Conway's Game of Life in Rust, I've walked into a problem. I want to remember the previous state of the world. For this I've created an extra property on my Universe struct, which now looks like this: pub struct Universe { …
Jesse Maas
  • 51
  • 6
0
votes
0 answers

Double/Multiple Buffer Swap simulation

I wrote the following class which is supposed to handle swapping of two buffers used for drawing on another thread. IE: This class will render to the back-buffer while some other thread renders the front-buffer to the screen and queue the next…
Brandon
  • 22,723
  • 11
  • 93
  • 186
0
votes
0 answers

Java JPanel default double buffering doesn't seem to get rid of Choppy movement

I've been working on a simple 2D Java game to improve my coding skills. I've read that by default JPanel will be double buffered and so I thought I shouldn't have any problems with choppy movement if i just used a JPanel as my "Canvas".…