• Advertisement
Sign in to follow this  

Device caps for resolution, refresh rate, and depth buffer

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

* How can I check to see if the resolution, refresh and depth buffer is supported by the device, before it is inputted into the presentation parameters? * Im rewriting all my device/rendering code and want to cover anything that can go wrong with initialization. I know/already am checking to see if the backbuffer format is ok, as well as AA on the backbuffer and the depth in fullsceen and windowed, but beyond that, do I check depth the same way with CheckDeviceType()?? * What functions can I check for resolution and refresh rate for fullscreen support? * For checking AA, do/should I test the AA settings with D3DFMT_UNKNOWN for windowed mode (I am already checking it with the backbuffer and depth buffer for fullscreen mode)? I know supported resolution/refresh can be found via EnumAdapterModes. does this mean i have to enum and the search the results for the resolution chosen and compare the refresh, or is there a function that I can use? Thanks I know basic questions, but I cannot seem to find answers via google. [Edited by - Valor Knight on October 17, 2006 6:15:27 PM]

Share this post


Link to post
Share on other sites
Advertisement
What I did was enumrating the available devices, their supported resolutions, refresh rates and bpp and stored it so I can check wheter a certain video configuration as you described is supported.

Now, for all the other stuff which is stored at the D3D caps structue , I suggest you do it application specific, meaning check only for the capabilities you will use in the application.

Share this post


Link to post
Share on other sites
I'm at work so I don't have access to my normal dev tools.

Look into the members of IDirect3D9, the basic idea is that you instantiate it and then use it to determine the appropriate parameters to send to CreateDevice(). It contains pretty much every enumeration that you'd need.

It might seem unintuitive at first, but yes - you need to iterate through functions like EnumAdapterModes to build up a list. You can then show this list to the user and/or restrict settings to members of the list. For each combination reported you can then enumerate other things - e.g. if you get a D3DFORMAT you can then check the MSAA settings for it (etc..)

Your best reference is DXUT. It can be a bit overwhelming and awkward to step through, but it does implement all of this stuff correctly. If you do it the way it does it then you've got it correct [smile]

Use the "Install Project" feature for something like SimpleSample and then put lots of OutputDebugString() or breakpoints in the enumeration code (that you can get to from the UI button, so trace the code starting there). Or just run searches on things like EnumAdapterModes() and see how DXUT uses them.

hth
Jack

Share this post


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

  • Advertisement