Archived

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

Arek the Absolute

Reading from a DirectDraw buffer...

Recommended Posts

Greetings! Can anyone point me to the fastest way to read a pixel off of a DirectDraw buffer? That is to say, if I wanted to find out what color the pixel at (50,100) was, what is the fastest way to do it? If I wanted to take all the pixels in a 10x10 area, and mess around with the colors, is there a fast method? The only methods I can find are cripplingly slow. I understand I''m asking a rather broad question, but anything you can offer would be greatly appreciated. Thanks- Arek the Absolute

Share this post


Link to post
Share on other sites
Lock/Unlock method (and remember: if you gonna work with surface with locking of it you''d better to create it in system memory. That''s faster than use surface in video memory + locking operation!)
Or you can keep the same buffer as your DirectDraw buffer in system memory and read information from this buffer. I.å. you have two identical buffers, that keep your surface. One is visible and other is work. If you''re modifying one you must modify and other. But for reading only this way is very ;-) fast.

Share this post


Link to post
Share on other sites