Jump to content
  • Advertisement


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


Manually bltting Bitmaps to DD Surfaces

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

First forgive me if this question has been answered before but i could not find one. I''m having difficulty in copying a DIB to DirectDraw surface by locking and manually copying the bits( for a DirectShow rendering filter). This works well on almost all bitmaps except when the bitmap is oddly size (say 720 x 480) and the dib is bottom up. It only happens on a few video cards, and only when the bitmap is bottom-up. When its bottom-up (almost always) I.... BytePointerToSurface += Width * Height * BytesPerPixel - Pitch; Getting me to the beginning of the last scan line. And Pitch = -Pitch; This should work, should it not? I''ve been given suggestions about the bitmap being a multiple of 4 but its always a multiple of 4. What happens when the problem arises is the bitmap is off set( half on the left side, half on the right side with a break in the middle of the screen). I''m quite lost as to what would cause this. Dysprosium Software Bobby Ward - COM Guru in training

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!