Forum Discussion
whitehexagon
10 years agoExplorer
OpenGL mirror window optional?
I'm just wondering if the 'mirror' desktop window is optional? Assuming it is, then is it possible to run a rift app without GLFW?
7 Replies
- ConstellationAdventurerIn my current integration with 0.6.0.0 I'm not mirroring at all and I'm still getting Rift output. Unfortunately I'm having some trouble with my OpenSceneGraph / OpenGL application that's causing some flicker (see https://forums.oculus.com/viewtopic.php?f=39&t=1885&start=20#p275795) but I can tell you for sure you can get textures onto the Rift without calling ovrHmd_CreateMirrorTextureGL.
- whitehexagonExplorerInteresting! thanks for that info. Do you know at what point the Rift activates? I see the camera light turn on, but the Rift stays orange even after submitFrame.
I was thinking to remove the GLFW stuff just to see if it made a difference. Good to know it can work like that, thanks. Peter.
PS I also get error 1286 invalid framebuffer errors, seems to be after my glClear(color | depth) call, but maybe only every other frame. I'm still trying to track that one down :) - ConstellationAdventurerI remember some other threads which seemed to indicate that you need to call ovrHmd_GetEyePoses to get it to render properly but I can't vouch for that because I've always called it. For me the camera lights up first and the the Rift follows less then a second later.
- whitehexagonExplorerHmm, turns out I needed a reboot! Rift lights up now :)
I also found the issue with the FBOs. I was switching FBO based on eye no. rather than the currentIndex. - whitehexagonExplorerWell it seems that I can almost remove GLFW, but not quite. Since the OpenGL context the Rift uses does not seem to be exposed? So I'm having to create a window just so I can have my own context. Does that sound right?
- RajveerExplorerYou're shouldn't be trying to use any context that the SDK creates, everything is supposed to be encapsulated. If you don't want to create a window with GLFW, you can try creating your own context without a window with wglCreateContext() and using GetDC() with NULL (so it gets the device context of the entire screen rather than a specific window) but I've never tried that so am not sure if that would work.
Personally I would advise against it though, as not having a window would mean that the application won't appear on the taskbar. If a user left a game running then came back later, they wouldn't have any sort of indicator showing that it is still running. If I'm not mirroring the Rift's display, I just show a message on that window telling the user to please look in to the Rift. - whitehexagonExplorerThanks for the good advice. I'm going to do just that :)
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
- 5 months agoAnonymous