Archived

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

Yanroy

DD problem

Recommended Posts

Yanroy    122
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
VBMaster    122
DirectDraw does not support page flipping in windowed mode. You shouldn''t create a primary surface with a back buffer attached to it...

VBMaster

Share this post


Link to post
Share on other sites
Gladiator    127
You can''t lock the surface when you''re in a windowed mode! (or so I heard)

----------------------------------------------
That's just my 200 bucks' worth!

..-=gLaDiAtOr=-..

Share this post


Link to post
Share on other sites
iwasbiggs    122
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