doublebuffered

Help with double-buffering

I have created an animation which works fine, but it flicks. I need help with double-buffering since I don't know anything about it. This is the code in my onPaint(): VOID onPaint(HDC hdc) { Graphics graphics(hdc); Pen pen(Color(255, 0, 0, 255)); graphics.DrawEllipse(&pen, sf , 0, 10, 10); } It works fine but with ...

Why should I do manual double buffering? (C#)

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 enable double buffering through a style, or create my own buffer and handle it myself. Most...

Winforms Double Buffering

I added this to my form's constructor code: this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true); But it still shows ugly artifacts when it loads the controls, whenever they change (the form is a calendar, it changes often). What do I need to do differently? ...

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 I'd at least like to know if I can or not. The following code sample illustrates this: p...

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 words, how DirectX on Windows XP+ deals with monitor's vertical refresh cycle. I'll start by s...