Jump to content
  • Advertisement
Sign in to follow this  
PKLoki

Direct3D Fullscreen Crashes

This topic is 4326 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 All, I've just started learning direct 3D and I'm having terrible trouble with something really basic, but I can't find any explanation of it. My problem is with the D3DPRESENT_PARAMETERS struct. I can set up and run basic Direct3D code, following the tutorials that come with the SDK and various other online sources. Everything works fine, unless I set D3DPP.Windowed = false; trying to make the thing run fullscreen, in which case it always crashes my program no matter what other options I choose. I have followed various tutorials through, some of which even use Windowed = false explicitly, but to no avail (even directly copying their code doesn't work on my system.) Any ideas what can be causing this? It's really getting on my nerves because I am enthused about learning D3D but have stumbled at this very early hurdle. L -

Share this post


Link to post
Share on other sites
Advertisement
Without code posted we can only guess so I'd suggest post up the code where you initialise D3D and set up the present parameters.

However, are you checking the return results from each of the various calls as you initialise for errors? Can you use a debugger to examine exactly where the crash occurs? Or if not, output progress to a text file and flush after each call?

The D3D calls can be wrapped in the FAILED macro like:

if(FAILED(Dev->Whatever()))
{
Error();
}

If you can find out exactly the point at which the program is crashing, that will help diagnose the problem.

Share this post


Link to post
Share on other sites
Heh, no problems I got it. It had to do with the D3DPRESENT_PARAMETERS::SwapEffect setting - it wasn't causing a problem in windowed mode, but was returning D3DERR_INVALIDCALL from CreateDevice when in fullscreen mode.

Cheers for the advice anyway - one thing I definitely need to start doing is checking the returns of D3D stuff, not just assuming it works as expected!

Cheers
L
-

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!