Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


window size vs d3d resolution?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 cozzie   Members   -  Reputation: 1653

Like
0Likes
Like

Posted 10 January 2014 - 05:25 PM

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?



Sponsor:

#2 MJP   Moderators   -  Reputation: 11569

Like
2Likes
Like

Posted 10 January 2014 - 07:04 PM

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.



#3 cozzie   Members   -  Reputation: 1653

Like
0Likes
Like

Posted 11 January 2014 - 06:07 AM

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

#4 cozzie   Members   -  Reputation: 1653

Like
0Likes
Like

Posted 11 January 2014 - 02:01 PM

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






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS