Multi monitor issues, DX11, Ogre 1.10.

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1869
Joined: Sun Mar 08, 2009 5:25 am
x 19

Multi monitor issues, DX11, Ogre 1.10.

Post by mkultra333 » Fri Nov 30, 2018 4:44 pm

Ogre Version: :1.10 hybrid:
Operating System: :Windows:
Render System: :DX11:

I've had a couple of people with multiple monitors report an issue where my game seems to run at the wrong resolution, of the monitor that isn't being used. What kind of things might I look at to fix this? There don't seem to be any startup dialog options regarding multiple monitor setups.

The issue seems to occur in multiple monitor setups where the two monitors have different resolutions.

My version of 1.10 is a bit old and has some modifications, but I haven't done anything to it regarding multiple monitors.
0 x
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3997
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 192
Contact:

Re: Multi monitor issues, DX11, Ogre 1.10.

Post by dark_sylinc » Fri Nov 30, 2018 6:26 pm

Ogre + D3D11 reports multiple monitors as "devices" even though this is wrong (this is an artefact from our D3D9 code). So a PC with 2 GPUs, and 3 monitors (2 hooked to an NVIDIA card, 1 hooked to the Intel one) will be listed as three Adapters.

The problem is that they will be listed with the same name. There was a PR a long time to 2.1 ago that fixed this by giving them numbers, but I don't things it's in 1.x. Note that 1.x seems to have dumped mAdapterNumber.

For example in 2.1 in my machine I can select the main monitor by doing:
mRoot->getRenderSystem()->setConfigOption( "Rendering Device", "Radeon RX 560 Series_0" );

While in order to render to the second monitor, I need to do instead:
mRoot->getRenderSystem()->setConfigOption( "Rendering Device", "Radeon RX 560 Series_1" );

Back before all these changes, both devices would be called "Radeon RX 560 Series" so it would always select the first one.

Perhaps Ogre 1.x fixed this in a different way.
0 x

User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1869
Joined: Sun Mar 08, 2009 5:25 am
x 19

Re: Multi monitor issues, DX11, Ogre 1.10.

Post by mkultra333 » Sat Dec 01, 2018 6:26 am

Thanks for the info. Now I have to work out how to get around this.
0 x
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.

User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1869
Joined: Sun Mar 08, 2009 5:25 am
x 19

Re: Multi monitor issues, DX11, Ogre 1.10.

Post by mkultra333 » Sat Dec 01, 2018 9:46 am

I'm thinking probably the only way I can deal with this without diving deep into Ogre code I don't understand is to advise people who get this issue to use WindowsKey + P to disable the unwanted monitor while playing the game. It's a pretty painless process so hopefully that'll do the trick for now.
0 x
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3997
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 192
Contact:

Re: Multi monitor issues, DX11, Ogre 1.10.

Post by dark_sylinc » Sun Dec 09, 2018 3:15 pm

I would recommend you to try the following. It is simple, quick, and it may just work on first try:
  1. Undo https://bitbucket.org/sinbad/ogre/commi ... 7026ce944c (i.e. hg backout), unless your Ogre version is old enough to not need this.
  2. Apply 2.1's patch over 1.x branch https://bitbucket.org/sinbad/ogre/commi ... 00377d113/
  3. Use RenderSystem::getConfigOptions to see available possible values for "Rendering Device"
  4. Use RenderSystem::setConfigOption to set the monitor / GPU
Of course, you need two monitors to test this. Or one monitor with multiple inputs (i.e. many monitors support VGA, HDMI & DVI entries, plug several cables to the same monitor and use your monitor's "Input" option to select between input sources)

Also make you sure you validate every run that the Rendering Device in your config still exists. If the user unplugs the monitor, it will stop existing on the next launch.

Or just use Root::showConfigDialog and Root::restoreConfig
1 x

User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1869
Joined: Sun Mar 08, 2009 5:25 am
x 19

Re: Multi monitor issues, DX11, Ogre 1.10.

Post by mkultra333 » Tue Dec 11, 2018 4:52 pm

Thanks. If I have time I'll give that a shot. My Ogre is new enough that I need to add the adapter back. I wonder why they removed it in the first place.
0 x
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.

Post Reply