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


The invisible blit

Recommended Posts

SMurf7    122
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
MatrixCubed    199

- 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