Jump to content
  • Advertisement

Archived

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

SMurf7

The invisible blit

This topic is 6192 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, I'm working on converting my old system memory/memcpy-based routines into supposedly better DDraw surfaces, and after creating an offscreen surface for my "land generation" code (just a sine wave that's filled beneath it) using dimensions of 640x32, I have tried to BltFast the surface to my backbuffer. However, when I run the program, it's not visible when a flip occurs. Sometimes I think I can just quickly see it appear before it disappears at the start of the program, but I'm not sure (maybe I'm just tired ) I've got error trapping code (using the FAILED macro) on the BltFast functions, but it appears they do not report an error, so something must be wrong somewhere else. Any ideas? Edited by - SMurf7 on August 4, 2001 9:02:33 AM

Share this post


Link to post
Share on other sites
Advertisement
Try:

- Using Blt() to test, instead of BltFast(), Blt() is more robust and (I think) tends to fail less if you don't have a DDClipper installed on the blitted-to surface.
- Are you Flip()ping surfaces? If you're running windowed mode, make sure that you are blitting to the primary buffer instead of flipping.
- Also try spitting the error code to a text file so you can review it offline... I don't think DX has "ErrorToString()" routines but you can always just review the .h file to see what the return is.
- Keep in mind too that you must Unlock() a surface after using it (e.g. if you edit surface memory directly) otherwise the surface may remain unusable by other functions.



Edited by - MatrixCubed on August 4, 2001 11:31:56 AM

Share this post


Link to post
Share on other sites
Hmm, it works with Blt (and its associated RECTs), but not with BltFast. And not a Clipper in sight...

Share this post


Link to post
Share on other sites
BltFast seems to fail if it overlaps the edge of the surface. If it''s fully within the surface, I don''t know why it''d fail then...

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!