Jump to content
  • Advertisement
Sign in to follow this  

DirectX Issue

This topic is 3087 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 was putting together a quick DirectX wrapper so my cousin could learn from it when i encountered a strange issue. When i compile and run (Microsoft Visual C++ 2008 Express) in Debug everything works fine and i get a 800x600 window. However, when i select Release the window is fullscreen but the resolution is the same, 800x600. I select everything to be windowed but for some reason this happens. I checked the output after switching the control panel to debug and i got HW device not available GetDeviceCaps failed when compiling under Release. I found this to be an issue with changing the DirectX control panel to debug as it doesn't allow the use of D3DDEVTYPE_HAL and i was forced to use REF. So i switched to Release in the control panel and the problem persists but it compiles fine. If i compile under debug with the control panel switched to release and everything is fine but when i compile under release the window is fullscreen but the resolution is fine. Hope anyone can help and understand my problem! Thanks.

Share this post


Link to post
Share on other sites
Advertisement
One of the more common issues that comes up when switching from Debug->Release is uninitialized variables. In Debug configuration variables will typically be assigned a default value that you can immediately recognize in the debugger, while in Release they will just be random junk. You can also get the same issue if you have pointers that go out of bounds to unallocated memory. I would look around for areas where either of those things might happen.

Also another thing you should do is make sure that your import libraries and other project settings match up between your Debug and Release builds.

Share this post


Link to post
Share on other sites
So the Debug Runtimes say anything? Do you have the latest drivers for your graphics card installed? There's a good chance it's failing to create a HAL device because you've not checked for support for the device features you're trying to use.
If GetDeviceCaps is failing, that usually indicates you don't have drivers installed.

Share this post


Link to post
Share on other sites
Thankyou for the replies. It was an unitialized variable funnily enough lol. Thanks EvilSteve your reply, it prompted me to update my drivers. Problem solved.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!