cancel
Showing results for 
Search instead for 
Did you mean: 

What's the status of avoiding mirroring displays?

nickoneill
Honored Guest
Just got my rift yesterday and I'm still trying to set up my development environment to my satisfaction.

I'm developing on a mac and it's a bit of a pain to switch to low-res for both screens (mirroring) before I can run stuff on the rift. What's the deal with this? As a mac developer I know we can make displays full screen independent of one another (in 10.8+ at least), though I haven't figured out if I can launch an app into a specific screen yet.

Does the same restriction exist on Windows? What's the best way to deal with this?
17 REPLIES 17

jherico
Adventurer
The SDK is constrained by a few things. In needs to be able to query monitor information contained in the EDID in order to determine which output is the Rift. It also needs to be able to create a full screen rendering surface on that screen. I'm not sure about Mac, but I think on Windows there's no way to programatically tell DirectX or OpenGL to create a surface on a monitor that's disabled.

On Linux there may a better way to do it, since there is an X11 extension called RandR which lets you query and change the monitor configuration, including getting information about all monitors, whether they're active or not. My tests have shown that it doesn't seem to return EDID information about disabled monitors, but that shouldn't be insurmountable.

My suggestion would be to look on places like Stack Overflow for information on how to create a GL rendering surface on a disabled monitor, and how to grab EDID information from a disabled monitor. It's not Rift specific, so there's probably better information out there on whether it can be done and how hard it is.
Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action

nickoneill
Honored Guest
I think I found the relevant code for osx: the SDK overview PDF, section A.3.2 has some display code that sits in OSX_OculusRoomTiny.mm in the LibOVR_With_Samples project.

Still interested in how this works on Windows. What happens when you open plug the rift in for the first time and launch the tuscany demo? Mirroring?

nickoneill
Honored Guest
"jherico" wrote:
... but I think on Windows there's no way to programatically tell DirectX or OpenGL to create a surface on a monitor that's disabled.


Why does it have to be disabled? On OSX I'd be perfectly happy having it behave like a tiny second desktop when you're not using it, not disabled. Without mirroring on that is, in fact, how things seem like they're working right now.

jherico
Adventurer
"nickoneill" wrote:
Why does it have to be disabled? On OSX I'd be perfectly happy having it behave like a tiny second desktop when you're not using it, not disabled. Without mirroring on that is, in fact, how things seem like they're working right now.


I'm not happy to have an additional portion of my desktop where my mouse and application windows can get 'lost'. If I alt-tab to something and it doesn't show up on one of my main screens because it's on the Rift display for some reason, that's super annoying. Even worse, it's going to be incredibly confusing to consumers, who have no real way of interacting with such lost windows. In my mind it's one of the biggest impediments to a consumer release of the Rift, because it will generate an enormous volume of support issues that are hard to diagnose given the diverse ways of setting up screens across all platforms.
Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action

nickoneill
Honored Guest
Yes, I can see the issue of the mouse getting lost. I'm not sure how realistic other windows showing on non-primary monitors is but I'll leave it on today and see how OSX deals with a secondary invisible monitor. I suspect most new windows will show up on the primary and ignore the secondary unless specifically dragged there.

I'm not too worried about these things because you can just unplug the rift when not in use. My issue is mostly concerning how users can start up a rift game/app and have it identify and run on the correct monitor without the hassle of mirroring/selecting something.

geekmaster
Protege
"nickoneill" wrote:
"jherico" wrote:
... but I think on Windows there's no way to programatically tell DirectX or OpenGL to create a surface on a monitor that's disabled.

Why does it have to be disabled? On OSX I'd be perfectly happy having it behave like a tiny second desktop when you're not using it, not disabled. Without mirroring on that is, in fact, how things seem like they're working right now.

Although I have not used it yet, you can enable and disable desktop monitors with a couple of WinAPI calls. I save a good reference somewhere, but Google just found this one:

http://support.microsoft.com/default.aspx?scid=kb;en-us;308216

It shows sample code to change monitor status without requiring a reboot (a common "reboot required" misconception abounds on the internet for software display changes). It warns that Win8 apps (as defined in the program manifest) can only do this for 32bpp display modes.

To find this stuff with Google, it helps to know it exists, and have a general idea what keywords to use. It took me a few tries this time because of all the false information out there. Last time I read about it, I recall that the (different) code had a side effect of modifying the registry, preserving your "temporary" changes across reboots until you changed them back. Although not mentioned here, this code may have that same side-effect.

Your app can search for the Rift even when it is disabled, then enable it if disabled, then restore its previous status just before exiting.

MrGeddings
Explorer
so far it looks like most of the demos require duplicating the displays for it to work. yeah there are some issues with vsync for now, but not a huge problem for me.

nickoneill
Honored Guest
Now that I've used a few more demos I realize that it greatly depends on the developers. Some people do it right and select the proper screen (i.e. Valve) and some force you to mirror. I have yet to see a UDK demo that just selects the correct screen, but I hope it's just another case of demo software and not a limitation.

AngelJ
Honored Guest
"nickoneill" wrote:
Some people do it right and select the proper screen (i.e. Valve) and some force you to mirror.

While working on my own application I found out that Valve actually achieves this by running those games in windowed mode. Switching to full screen causes the game to switch to the primary display, and you end up with the same mirroring requirement.