how can i make the gdi draw faster or will i have to do the hard thing and learn that mother of an api Direct Draw?
how can i make the gdi draw faster or will i have to do the hard thing and learn that mother of an api Direct Draw?
Well, GDI is GDI and that's that. I guess you could move onto DX, but that'll be a lot of learning. It's huge. The only way to make your code (GDI) faster is to program that way. You should probably pick up a book on optimized coding or something.
1978 Silver Anniversary Corvette
Garf has a good point....Code and system optimisation will often lead to faster execution....
It depends what you are trying to do....but eventually you will reach the point where the GDI cannot easily be made to work faster...then DX or OpenGL become the better options as they can operate much faster
well i am making a program that scans the centre of your screen while playing a shootem up and magnifies it by drawing over the open screen. The only problem is that the GDI is so slow at drawing that teh magnification appears to flash a lot and slows down the game. I have attached my source.
Which API should i use instead of the GDI to get faster drawing onto the screen?
Any comments on how i can make my code faster are welcome.
I have attached my source code in VC++ form.
Last edited by cppdude; 03-17-2002 at 04:24 PM.
Direct Draw really isn't that hard to learn. Especially if you create
a wrapper. The biggest part of the code is the initialization and
that's almost always going to be the same. So once you learn it
that's it. The actual "blitting" code is less than that of
the GDI because you don't need to blit masks for your sprites.
If you can check out Ernest Pazera's "Isometric Game Programming with DirectX 7.0". I learned Direct Draw from his book in a day. He's got a really great writing style that makes it easy to learn.