Jump to content
  • Advertisement


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


Locking surfaces in DX7

This topic is 6293 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

What should I do, if I want to lock an offscreen surface, write some color values on it and disaply the result on the primary surface (NOT FULLSCREEN) (32bit) I have already done most of this, but I''m having problems with lock. I don''t exactly know how to write some color values on the offscreen surface. I calculated the memory address where the color should go like this: ((LPDWORD)((LPBYTE)lpsurface + (y * lpitch) + x)) = color; But that formula does''nt seem to work, if all colors are 0x00000000 only a small left part of the image is white and the other part is full of strange colors. I need a right formula to pu the colors on the image, and a formula to make a DWORD color value from r, g and b colors.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!