2D using Directdraw

Started by
1 comment, last by edegiuli 22 years, 5 months ago
I''ve just started using Direct X, and at the moment, all I want to do is port my old Pascal/TC++ programs to windows, and also to have a platform for simple algorithm testing. (All in 2D) I''ve read some tutorials, and I''ve started using a DirectDraw framework that seems like it should work. I''m just having problems reading from DD surfaces. Correct me if I''m wrong, but to read/write from a DD surface, you have to lock it first, and during the lock function, you have to clear the surface. If so, how do you read from DD surfaces? All i want to do is create a bunch of 640x480 buffers that I can use to calculate the next state of the (in this case) cellular automaton. Any help would be appreciated. BTW I''m using Borland C++ 5.5 with the Vide IDE, which seems like a decent combination so far. Eric
Advertisement
Its been awhile since ive used direct draw but you shouldnt need to clear the surface.
Just lock the surface do your reads/writes then unlock.
If you clear the surface, then the only thing you''ll be able to read is the clear color !. Just lock, read/write, unlock.

This topic is closed to new replies.

Advertisement