Forum Discussion
deleted-0912141
12 years agoHonored Guest
Developing without a rift
Hello, I´m working at a University sharing a rift with 2 other people. Actually we´re working as hardware designers and thus not so comfortable in C++ prograimming. How do we have to initialize...
jherico
12 years agoAdventurer
"violarieger" wrote:
Hey Jherico,
thanks for your reply. I had a look on your example code and I managed to initialize the rift´s default values. But what still remainded unclear is how to handle the monitor if I do not have a rift connected.
When I´m goning through your examples I´m always struggling at the point establishing a display with the glfwGedVideoMode-function. Could you give me a hint where I could more information to this?
The Oculus SDK provides most of the information you need to initialize the output window on the Rift in a structure called OVR::HMDInfo. Specifically, this structure will include the 'desktop position' of the Rift display. For instance, on windows, if you've got a Rift connected and set directly above the primary monitor, then OVR::HMDInfo would probably tell you the desktop position is (0, -800), meaning the upper left corner of the Rift display is aligned with the upper left corner of the primary, and but that it's 800 pixels higher.
In the absence of an actual Rift, my code just fills in the default values for the DK1, and also puts (0, 0) in the desktop position, so by default the Rift output would appear on the main monitor. However, in your case, what I suggest you should do (if you're using GLFW) is use glfwGetPrimaryMonitor to discover the primary monitor and then use glfwGetMonitors() to find an 'appropriate' monitor on which to display the output. In the case of a multi-monitor system, simply picking any monitor that isn't the primary and is at least 1280x800 in resolution would probably be sufficient. Make sure you use
glfwWindowHint(GLFW_DECORATED, 0);to indicate that the window shouldn't have decorations such as a title bar, otherwise your drawable region will be slightly less than the window size.
The use of glfwGetVideoMode is only ever done to determine the current resolution of a given monitor.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 4 years ago
- 10 days ago
- 4 years ago