Advertisement Jump to content
Sign in to follow this  
cozzie

window size vs d3d resolution?

This topic is 1835 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

Just wondering.

I've noticed that when I create a window with for example 1280x768 pixels and the graphics card doesn't support this mode, and say I create my d3d (9) device with resolution 1024x768. Guess what; the window is still 1280x720 pixels and is completely filled with rendered pixels.

 

How does direct3d handle this?

Share this post


Link to post
Share on other sites
Advertisement

If the swap chain size doesn't match the window's client area size then the windowing system will try to scale the backbuffer image to fit the window. Depending on the OS version and the user's settings this may be a very poor quality scale (nearest neighbor) so it's generally not a good idea. The device only cares about display resolution in fullscreen mode, so there's generally not any restriction on what backbuffer size you can use for windowed mode.

Share this post


Link to post
Share on other sites
Thanks, then I'll have to rethink my initialization code. Now I first create the window and then check if the requested resolution for my d3d app (engine demo) is supported by the graphics card. Another option might be to resize the window after the resoution is confirmed, first try though messed up the resulting image, I'll get into this. Thanks

Share this post


Link to post
Share on other sites

Problem solved. I had troubles when retrieving screenwidth/height for defining HUD item positions.

I know save the window width/height when in windowed mode, and return those in my GetScreenWidth/Height functions when windowed = true

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!