doublebuffered

DirectX flickering video

Alright, so I wrote a custom VMR9 Allocator/Presenter which seems to work fine. However, when I attempt to copy video frames from the Allocator/Presenter surfaces into my application surfaces, the video appears to flicker. Audio playback is fine so I'm fairly certain it's not an issue of the machine being bogged down or anything. This...

How to use double buffer in this case ?

Let's say i have three control A, B, C. They are all inherited from CDialog, A is a main dialog , A contains B, and B contains C. and each time i use mouse mouse drag C, B and C will move together. This is a image:http://img507.imageshack.us/img507/7039/31709956.jpg We know this will cause B and C to redraw themselves. and it might cau...

How can I stop window rendering and later resume?

I'd like to prevent my window from being updated until I finish receiving data from the server and render it. Can I hook on the WM_PAINT event, or better still call some Win32API method to prevent the window from being updated and unfreeze it later? More info: In the context of an MMC snapin written in C#, our application suffers from a...

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. doubke buffering on and x4 multi sampling. This works just fine. But when I try to turn of the double buffering: WGL_DOUBLE_BUFFER_ARB = GL_FALS...

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? ...

C#, Overriding OnPaint: alpha transparency with double buffer.

Hello. I'm developing a Windows Mobile 5.0 and above application with .Net Compact Framework 2.0 SP2 with C#. I'm overriding OnPaint method on a custom messagebox that draw a bitmap that fills the entire form with alpha transparency, and a gradient box with a button and a message over the semi-transparent background. I'm testing it bu...

Is Double-buffering required with Desktop Composition enabled?

Is double-buffering still required when Desktop Composition is enabled? In Microsoft's Application Compatibility Guide: Graphical Device Interface (GDI) Prior to Windows Vista and Windows Server 2008, a window handle (HWND) was painted directly to the screen, which had certain benefits, but limited how Windows could di...

ControlStyles.DoubleBuffer vs. ControlStyles.OptimizedDoubleBuffer

What is the difference between ControlStyles.DoubleBuffer and ControlStyles.OptimizedDoubleBuffer? ControlStyles.DoubleBuffer does not show up in the Intellisense drop down whereas ControlStyles.OptimizedDoubleBuffer is in fact listed. The MSDN documentation does not make the difference immediately clear (to me at least). ...

Java Panel Double Buffering

Hey everyone, wondered if anyone could point me in the right directon, i have developed a pong game and it needs double buffering due to flickering. Iv tryed some of the post on here to try and make it work, but im still a beginner with the swing awt suff, any help would be amazing thanks. public class PongPanel extends JPanel implemen...

BufferStrategy vs DIY Double Buffering in JFrame

Until now, I've done double buffering by creating and Image, drawing what I wanted to that Image using its associated Graphics object then draw that Image to the screen using the paint method's Graphics object. Recently, I learned about the BufferStrategy class and its uses. I was wondering what are the pros and cons of the two methods. ...

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 ? ...

How to prevent a full screen double buffered app from screen freeze when debugging it?

I'm making a full screen app that uses double buffering. The problem is a following: when I debug it and the debugger pauses the process (breakpoint hit or exception thrown), the secondary buffer may got stuck on the screen. In this case I only see the current frame and the mouse pointer and I can interact with the IDE's UI but I don't s...

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 pointer swap? Do I need to use a critical section? There's no Interlocked function available...

label backgrond flicking on a WinForms user control has background image enabled

I am working on a windows form project and having some problem with UserControl Double Buffering. I created a usercontrol and has a background image, then on top of it I have few radio buttons and labels. Radio buttons and labels are all having transparent background as color. However, when I show and hide the User control, I can see the...

Double buffering with C# has negative effect

I have written the following simple program, which draws lines on the screen every 100 milliseconds (triggered by timer1). I noticed that the drawing flickers a bit (that is, the window is not always completely blue, but some gray shines through). So my idea was to use double-buffering. But when I did that, it made things even worse. Now...

DoubleBuffering in Java

Hello there, I'm having some trouble implementing DoubleBuffer into my program. Before you faint from the wall of text, you should know that a lot of it is there just in case you need to know. The actual place where I think I'm having problems is in one method. I've recently looked up a tutorial on the gpwiki about double buffering, and...

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 buffering is possible with awt, do I have to write the buffer by hand? Unlike swing, awt doesn'...

Double buffering C#

Hey, I'm trying to implement the following method: void Ball::DrawOn(Graphics g); The method should draw all previous locations(stored in a queue) of the ball and finally the current location. I don't know if that matters, but I print the previous locations using g.DrawEllipse(...) and the current location using g.FillEllipse(...). Th...

for heavy graphics apps in c# which will be more efficient double buffering or Buffered Graphics?

hello i have a heavy graphics application where i have to draw the graphics in 2-10 seconds every time this time varies depending upon the source application which is sending data to my application via UDP; i have some static graphics there is no change in them some are semi dynamic that means some time they are updated and normally rem...

A problem with overriding OnPaint when DoubleBuffered set to true

I have created a custom control which derives from Panel. I use it to display an Image using BackgroundImage property. I override the OnClick method and set isSelected to true then call Invalidate method and draw a rectangle in overrided OnPaint. Everything goes just fine until I set DoubleBuffered to true. The rectangle is drawn and the...