Jump to content
  • Advertisement

Archived

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

johnnyBravo

My laptop wont run my d3d app in windowed mode?

This topic is 5343 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, i just got a laptop, and im trying to run my program in windowed mode on it, but it keeps crashing, is there some setting here below that i must change for it to work on a latop(it works fine on normal comp) d3dpp.SwapEffect =D3DSWAPEFFECT_FLIP; d3dpp.BackBufferFormat = D3DFMT_A8R8G8B8; d3dpp.EnableAutoDepthStencil = true; d3dpp.AutoDepthStencilFormat = D3DFMT_D16; d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT; d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT ; d3dpp.BackBufferCount = 1;

Share this post


Link to post
Share on other sites
Advertisement
It is likely the laptop doesn''t support some feature or format that you are using and the result is a crash. Check the return value of every call and maybe you will find out where it is failing.

Share this post


Link to post
Share on other sites
You should not be letting it crash. You should catch the error. Also, the debug runtime should tell you what isn''t working.

d3dpp.BackBufferFormat = D3DFMT_A8R8G8B8;
This will not work with a variety of cards, you should be testing modes to see if they''re supported.


Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
Also be aware that strange video cards (old ones, laptops) sometimes can''t provide hardware acceleration at a specific color depth. Therefore you ought to detect this and either

a) let the app actually change the wanted color format
or
b) let the app change to fullscreen if no hw support is available for windowed mode
or
c) both a) and b)

Look into the d3d sample framework which enumerates displaymodes and takes in account most of the problems (doesn''t autoswitch fullscreen though)

Share this post


Link to post
Share on other sites
ok thanks all, im sure ill be able to resolve it now,

i guess i should put all the error catching stuff back into my dx wrapper

Share this post


Link to post
Share on other sites

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