Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

edegiuli

2D using Directdraw

This topic is 6072 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
If you clear the surface, then the only thing you''ll be able to read is the clear color !. Just lock, read/write, unlock.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!