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
1
vote
2 answers

Redrawing windows application

I have a software in C# I'm writing and every time its doing a hard task and I switch windows to let it complete the window screws up. Not sure how to word it but all of the buttons disappear or become "holes" . I know the application is running…
ebolton
  • 1,126
  • 3
  • 14
  • 20
1
vote
2 answers

Why does the clock flicker?

The following code is an animation of a clock. What changes would have to be made in the program to make it not flicker? Why does the field initiation have to take place in the addNotify() function for the hands to be displayed? You can copy all of…
1
vote
1 answer

Double buffering seems choppy

I am trying to implement double buffering for a game, but I am not sure if I am doing it correctly. I am calling this.repaint() in my main game loop, which then should do this: @Override public void paint(Graphics g){ // this.getWidth() /…
Get Off My Lawn
  • 34,175
  • 38
  • 176
  • 338
1
vote
1 answer

backbuffer VolatileImage resize

I have a small issue regarding my backbuffer in my java applet. Currently i haven't considered the resize of my applet on runtime. Therefore the panels get resized, while my backbuffer keeps its initial size. Therefore only the part of my applet…
user2148322
  • 65
  • 2
  • 9
1
vote
1 answer

GDI+ flickers even with double-buffering

I'm trying to move a small image from the left side to the screen to the right side. I set the styles for the usercontrol to: this.SetStyle(ControlStyles.Opaque, true); this.SetStyle(ControlStyles.UserPaint, true); …
Maestro
  • 9,046
  • 15
  • 83
  • 116
1
vote
2 answers

Simple custom painting mistake

I just started coding again and I guess I forgot how to double buffer. This is the code I have now and I'm not sure what I am missing. When I start it there is just a white screen, no oval. What is the mistake in rendering? import…
1
vote
2 answers

Double buffering on lpc1788

I'm facing a great concern. I am currently involved in a sandwich course and I am learning on my own on how to develop software on embedded system - as it happens, on the open1788 board. I planned on implementing a double buffering feature because…
Geoffrey R.
  • 1,907
  • 1
  • 19
  • 32
1
vote
1 answer

getGraphics() prevents my game from starting

I'm learning about double buffering and the book I got from my teacher tells me to write what I have written. But when java tries to get the graphics object from the image it crashes. frame = Image engine = Graphics Error Exception in thread "main"…
Daniel Hammer
  • 39
  • 1
  • 5
1
vote
1 answer

flicker on tab control - WIN32

I have a WIN32 application. Its main window is hwndMain, one of its child is hwndView. There is one tab control hwndTab on hwndView. When I resize hwndMain, hwndView is resized and so is hwndTab. It flicker a little, but not much. I have tried to…
user565739
  • 1,302
  • 4
  • 23
  • 46
1
vote
1 answer

QGraphicsView flickers

I wanted to write an change blindness programm for my girl friends bachelor thesis. It shows for X milli seconds a picture, shows a short "flicker image" (in this case just grey) and then shows a slightly different image then the first one. Then…
user1439712
  • 129
  • 2
  • 5
1
vote
1 answer

Efficiency when setting control styles using reflection

Background I am currently trying to fix some behavior where Double Buffering causes a crash if a control is too large to allocate a buffer. After much discussion and trial-and-error, we decided that the best course of action would be to enable…
Tim
  • 1,814
  • 8
  • 29
  • 41
1
vote
2 answers

WS_EX_COMPOSITED - high CPU

I am using WS_EX_COMPOSITED style in my application but its running the CPU to 100%, is there way to stop my application drawing for a while and to resume only when i need ? Some people are suggesting to use Sleep's but where exactly in WndProc do i…
VisaToHell
  • 508
  • 1
  • 12
  • 29
1
vote
1 answer

Optimize drawing for paint application c#

I am making a paint project like photoshop using c#. I have used GDI+ for the drawing. Sadly I cannot post the screen shot cuz of the reputation points required. EDIT : Ok i got enough rep to upload a pic. My drawing using the mouse lags when the…
Jeffrey Chen
  • 237
  • 1
  • 4
  • 17
0
votes
1 answer

What is the precise timing and effect of SDL_UpdateRect on a double-buffered screen?

Using a double-buffered screen with the Simple DirectMedia Layer, is it more efficient to call SDL_UpdateRect once after blitting multiple images or to call it once after blitting each individual image before calling SDL_Flip? In other words, will…
Chris Frederick
  • 5,482
  • 3
  • 36
  • 44
0
votes
1 answer

WM_TIMER animation flickering

Alright I'm using a timer with a 50 ms elapse time to animate some moving text (technically its scrolling between text). Problem is, if you look closely, you can see the text flickering, and id like it not to flicker.. So i'm not that good with…
Josh
  • 6,046
  • 11
  • 52
  • 83