tseiler
Topic Author
Posts: 8
Joined: 21 Oct 2013, 20:18

second monitor - no more gui

18 Nov 2013, 17:39

I seem to have an issue when I move the window over to a second monitor.
The gui disappears and stays gone.
In the console it says the device was destroyed.
I'm using Ogre.

Anyone else have this issue? :shock:
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: second monitor - no more gui

19 Nov 2013, 14:48

Hi,

Are you using a different device for each monitor?

Where are you reading that the device is being destroyed? Could you paste it here please.

Thanks!
 
Daki
Posts: 57
Joined: 16 Aug 2013, 00:48

Re: second monitor - no more gui

02 Dec 2013, 02:56

I use Ogre and this happens to me as well. Both my monitors are plugged into a single graphics card. Ogre appears to be unloading and reloading all textures when changing monitors. I was using a different UI solution before Noesis and the issue happened with that as well. I haven't been terribly concerned as it is a pretty low use-case but if there is something that can be done that would be nice.
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: second monitor - no more gui

02 Dec 2013, 17:56

Yes, ogre is recreating a new device. I don't understand why it is doing that, anyway it is a good opportunity to add support for hot device change in our rendersystem.
 
Nir Hasson
Posts: 71
Joined: 10 Nov 2013, 21:20
Contact:

Re: second monitor - no more gui

14 Dec 2013, 21:40

Ogre create one device per render window on D3D9 render system, I had the honor to implement it a while ago.. As new user to Noesis it would be nice to have your system supports multiple devices as well. A bypass solution for now might be rendering all GUI elements of the secondary monitor to dedicated render target a display it's content on the other devices..
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: second monitor - no more gui

16 Dec 2013, 04:18

Yes, it could be implemented, although it is not trivial because having different devices won't allow us to share resources. Now we are internally sharing resources between renderers (meshes cache, texture glyphs, ...).

Any way, there is something I do not understand. When I have a single window and it is moved to a new monitor, the device is also recreated. Is that behavior on purpose?
 
Nir Hasson
Posts: 71
Joined: 10 Nov 2013, 21:20
Contact:

Re: second monitor - no more gui

16 Dec 2013, 09:21

Yes, it could be implemented, although it is not trivial because having different devices won't allow us to share resources. Now we are internally sharing resources between renderers (meshes cache, texture glyphs, ...).
The book solution for handling multiple devices resources is simply to hold a set of resouces per device and use them in the correct context.
The application code should issue a call for IRenderer::SetCurrentDevice before rendering to the selected device and then you'll be able to use the correct resouces set.
You'll also have to add callbacks for Device created and Device destroyed..

On Vista and above you can take advantage of the sharing resouces capability, but device must be created as D3D9Ex devices.
http://msdn.microsoft.com/en-us/library ... s.85).aspx
There is a sample project by Microsoft that shows sharing surfaces capability between multiple rendering APIs
http://archive.msdn.microsoft.com/D3D9E ... aseId=3435

Any way, there is something I do not understand. When I have a single window and it is moved to a new monitor, the device is also recreated. Is that behavior on purpose?
Yes it is.
The reason is that Device is created on a specific physical Adapter, actually the first parameter for IDirect3D9::CreateDevice is the adapter index, and performance is tightly affected from that fact.
If the device won't be changed when moving to different physical window controlled by different physical adapter the driver will perform heavy copy operation before displaying any content and you'll get a noticeable performance hit.
You can see detailed explanations in the D3D9 Sample framework - look for DXUTCheckForWindowChangingMonitors function.
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: second monitor - no more gui

17 Dec 2013, 16:39

Any way, there is something I do not understand. When I have a single window and it is moved to a new monitor, the device is also recreated. Is that behavior on purpose?
Yes it is.
The reason is that Device is created on a specific physical Adapter, actually the first parameter for IDirect3D9::CreateDevice is the adapter index, and performance is tightly affected from that fact.
If the device won't be changed when moving to different physical window controlled by different physical adapter the driver will perform heavy copy operation before displaying any content and you'll get a noticeable performance hit.
You can see detailed explanations in the D3D9 Sample framework - look for DXUTCheckForWindowChangingMonitors function.
Thanks a lot for all the explanation. Then if I understand you correctly there is no support for multihead (http://msdn.microsoft.com/en-us/library ... 85%29.aspx) in Ogre, right?
 
Nir Hasson
Posts: 71
Joined: 10 Nov 2013, 21:20
Contact:

Re: second monitor - no more gui

17 Dec 2013, 23:27

Multi head support was implemented as proof of concept before the full multiple monitors support.
It had many issues with some scenarios (VSync didn't work well) and it was limited to two monitors configuration. The current solution of Ogre support as many monitors as possible - I worked with six monitors that time :)

http://www.ogre3d.org/forums/viewtopic.php?f=11&t=47621

http://www.ogre3d.org/forums/viewtopic.php?f=11&t=48032
 
User avatar
jsantos
Site Admin
Posts: 3906
Joined: 20 Jan 2012, 17:18
Contact:

Re: second monitor - no more gui

19 Dec 2013, 14:54

Hehe nice photos!

We will have to study thoroughly the implications of this in noesisGUI. They are not easy changes, but we should incorporate them soon or later.

Who is online

Users browsing this forum: No registered users and 73 guests