Jump to content
  • Advertisement


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


8-bit Grayscale Surface.

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

Hi ! How can I create an Offscreen 8-bit Grayscale Surface. I am trying this: DDPIXELFORMAT g_ddpf; g_ddpf.dwSize = sizeof(DDPIXELFORMAT); g_ddpf.dwFlags = DDPF_RGB; g_ddpf.dwRGBBitCount = 8; g_ddpf.dwRBitMask = 0xFF; g_ddpf.dwGBitMask = 0xFF; g_ddpf.dwBBitMask = 0xFF; But CreateSurface returns DDERR_INVALIDPIXELFORMAT. What DDPIXELFORMAT should I create for Grayscale surface ? Thanks. Edited by - DDzuba on January 11, 2002 5:56:34 AM

Share this post

Link to post
Share on other sites
Enumerate the available formats, the callback from the enumeration gives you the complete pixel format structure ready to pass to CreateSurface.

Your graphics hardware probably doesn''t support that format for surfaces. This is why you *must* enumerate and check the caps. DirectDraw won''t emulate things like surfaces if the hardware doesn''t support them.

Simon O''''Connor
Creative Asylum Ltd

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!