1
\$\begingroup\$

I know how to display my game in full-screen on a specific monitor by specifying an adapter number when the D3D device is created.

However, I don't know how to switch from one monitor to another while the game is already running, without re-creating the D3D device from scratch. Is this even possible?

Thanks!

\$\endgroup\$
2
\$\begingroup\$

Your statement in the question is correct. The recommended approach is that you recreate the d3d device object, you should already have an adapter reference and your creation settings from the first time you did this so do it again.

That said:

Switching from full screen to windowed mode then moving the window on the to the other screen and switching back to full screen may work if the driver is smart enough.

\$\endgroup\$
  • \$\begingroup\$ Good to know, thanks! Do you happen to know if later versions of Direct3D make this any easier? \$\endgroup\$ – Walt D Dec 2 '15 at 21:43
  • 1
    \$\begingroup\$ Generally speaking, I have not heard about a major change to this yet, but it could be worth checking up on the dx 12 API, I hear there have been some improvements in this area but I have no idea what they might be. \$\endgroup\$ – War Dec 3 '15 at 12:56
2
\$\begingroup\$

This is not actually possible. When you create the D3D device, it binds to the graphics adapter, which can't be changed on the fly.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.