Archived

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

Yanroy

DD problem

Recommended Posts

I have an app that starts up DirectDraw... everything goes fine until I set the cooperative level. The first time I build the program, everything worked as it should. I said I wanted fullscreen exclusive and it worked. Then I added a piece of code to blt an image to the backbuffer, and now all I can get is windowed mode and the blitter doesn''t work. My program hangs at the blt. I removed that new code and I still have windowed mode. I have restarted my computer, same problem. I have also tried locking the backbuffer and drawing manually, and that seems to make the flip function hang. (yes, I unlocked it when I was done) Please help! I can''t make much of a game out of a window full of black. One other funny thing... the GetAsynchKeyState() function still lets me exit... even though when I put in messages that are written to a file it seems to hang the program at the blt or the flip. I have been working at this for 3 days and I think it is making me a little insane. --------------------

You are not a real programmer until you end all your sentences with semicolons;

Yanroy@usa.com

Visit the ROAD Programming Website for more programming help.

Share this post


Link to post
Share on other sites
First off, the initiallization code for windowed mode is significantly different from exclusive mode, you should double check all of your code to a working sample.

I heard you couldn''t lock the primary surface in windowed mode... but other surfaces are OK. So I think that your locking backbuffer would be fine, but it hangs on the flip because you can''t flip in windowed mode. Why your blt hangs... I''m not sure... but you can so maybe your coords are incorrect.

Windowed mode:
Blt back buffer to front

fullscreen:
flip

Share this post


Link to post
Share on other sites