Original Post
I don't know if this thing is called "flickering" or not but here is what happens: I draw a moving picture to my window using BitBlt more than 60 times a second. Inside this picture there are some straight lines. During the movement they turn into something like stairs, I can't quite describe it because it is an illusion of the brain of course. Here are a couple of things I considered trying: 1) I guess the problem is that the drawing is unsynchronized with the screen flyback, so If anyone knows how to check when the flyback occurs? 2) Using double buffering: I saw in MSDN that when creating a window I should specify WS_EX_COMPOSITED as an extended style. Well, that define doesn't exist in winuser.h (some other possibly usefull definitions & functions don't exist as well), I got VC++ 6.0. 3) I don't exactly know if this is openGL or not, but I tried using SwapBuffers. Now, that was quite weird: First of all, That function takes a lot of time (about 15ms) and also didn't make anything look better. Then I learned that I need the Pixel Format of the Device Context (DC) to support double buffering, So I used GetPixelFormat (myhdc) and guess what it retuend? 0. Then I tried setting the Pixel Format to double buffering but then there were too many posibilities to try and at this point I prefer some professional advice. 4) Me and DirectX are enemies. But, If anyone here knows a way to use directX in the simplest way to draw 2D fast and without that flickering, and it could be as easy as using the normal Win32 Api (Device Contexts, BitBlt and all that collection), And without no Vertices, Matrices, Perspectives, Lightnings and Matirials, Then I would happily use it. 5) The same thing for openGL... On I have another question: When not using a fullscreened window, if the user moves the window, all the message loop gets stuck and I can't refresh the window so all the animation is stuck too, Any Ideas? Oh and another one: Is it correct that almost all of the capabilities of hardware accelaration are somehow related to 3D drawing and using hardware accelaration for 2D drawing would be almost as fast as using software accelaration? Thanks for any help for any question!