Sign in to follow this  
littlekid

Which IDXGIAdapter1 to use?

Recommended Posts

Hi, supposedly in an event where there are more than one IDXGIAdapter1 return from EnumAdapter1. How do I know which adapter to actually use for the D3D10CreateDevice1 function?? If both adapter can support the DX10.1 interface, is there anyway to pick the better adapter or just taking any will do?? thanks

Share this post


Link to post
Share on other sites
You should let the user pick the adapter, as rendering should be done on the same adapter as the screen is connected to for best results, so if the user wants to play on a secondary screen he should be able to choose the correct adapter for that screen.
You can use IDXGISwapChain::GetContainingOutput to find which IDXGIOutput your window is currently on, if you want to handle automatically switching adapters, if the user wants to go to fullscreen on a different adapter than the current one. (The automatic Alt+Return won't switch to fullscreen if the window is on an output belonging to a different adapter than the device is created on).

Share this post


Link to post
Share on other sites
Yes, but this is very rare.
The first enumerated adapter is the default, and to support multi-monitor systems you could add a selection to your options-menu or something, where the user can select among all the adapters (most people have 1, some have 2, I guess it's possible to have more).
It will still work on monitors using a different adapter, it's just that it can't go to fullscreen mode on the other monitor, and that performance might suffer if not displaying on the same adapter as the rendering.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this