cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get OpenGL working in Direct HMD mode

jherico
Adventurer
Neither my own applications nor the SDK examples appear to work in OpenGL mode if I enable DirectHMD with a DK1 (no DK2 to test with yet).

In my own example code, if I create a context with glfw and don't specify any special attributes (like the GL version or the profile) then the window is created on my primary monitor at the resolution of the Rift (in the upper left hand corner). If I attempt to specify the GL version and profile type, I get an error that the context could not be created.

In the OculusWorldDemo if I set the OpenGL renderer as the primary renderer, then the example crashes. This is because the wglCreateContextAttribsARB call in Render_GL_Win32_Device.cpp is returning NULL and the application isn't checking for that. The crash occurs a little later when glGetString(GL_VERSION) returns null (because there is no context active) and the SDK attempts to call strstr() with the null pointer.

I'm wondering if this is related to this thread and the behind the scenes voodoo that Oculus is using to render to a non-existent monitor surface.

If I set the Rift mode back to 'Extend Desktop', rendering in OpenGL works properly in both my application code and the Oculus SDK examples.
Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
47 REPLIES 47

Anonymous
Honored Guest
Are you attempting to use OpenGL on AMD hardware? With this release that's presently unsupported though it will be in the next update.

jherico
Adventurer
"deanbeeler" wrote:
Are you attempting to use OpenGL on AMD hardware? With this release that's presently unsupported though it will be in the next update.


Moving right past the :shock: at AMD not being supported, that's not the issue:

nVidia GeForce GTX 650 Ti, Driver version 337.50.
Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action

rupy
Honored Guest
"deanbeeler" wrote:
Are you attempting to use OpenGL on AMD hardware? With this release that's presently unsupported though it will be in the next update.


I render my own distortion at 250 FPS, will I be able to continue with this without the user having to go through hoops to play the game with this new screen driver?

It's really simple to just rotate the rendering by 90 degrees, seems you are pushing extended and moving away from cloned (which you should have done a long time ago) so that's good, but how does this Direct Mode work? And why haven't you asked the community about this? You asked if the box was important, but don't you think this is a little more crucial?
"It's like Homeworld in first person." Disable Aero and vSync for a completely simulator sickness free experience with 2xHz FPS. Keep the config utility open for tracking to work.

Anonymous
Honored Guest
but how does this Direct Mode work?


It hides the display from the OS and drives it independently. It captures the swap buffers created by the application and sends them to the Rift for scan out.

And why haven't you asked the community about this? You asked if the box was important, but don't you think this is a little more crucial?


Not exactly sure what you're asking about here. I don't know what you mean by "box."

rupy
Honored Guest
the plastic case for DK1 was polled if it should be one for DK2. This setup is getting more and more complicated for developers and consumers. I vote for extended only and each developer fixing portrait mode on their own. Of course you can keep all your stuff but don't force people to install stuff. It should all fit in the games drivers. Config if you want but don't force it on developers, I have my own IPD settings. etc. etc.

Bottom line don't force us into your software chain; oculus is not the only platform we need to cater! I for one have to support VR (not only Oculus), normal screen and Android. Make my job easier!
"It's like Homeworld in first person." Disable Aero and vSync for a completely simulator sickness free experience with 2xHz FPS. Keep the config utility open for tracking to work.

renderingpipeli
Honored Guest
"rupy" wrote:

I render my own distortion at 250 FPS, will I be able to continue with this without the user having to go through hoops to play the game with this new screen driver?



According to the documentation you can still perform your own distortion and even timewarp. However, I would go with the SDK provided ones as they are more likely to be optimised and correct. If you render just the distortion at 250FPS, that means the distortion alone eats 4ms from your 13.3ms frame budget on a DK2 - you might consider going with the much faster Oculus provided distortion.

renderingpipeli
Honored Guest
"rupy" wrote:
the plastic case for DK1 was polled if it should be one for DK2. This setup is getting more and more complicated for developers and consumers. I vote for extended only and each developer fixing portrait mode on their own. Of course you can keep all your stuff but don't force people to install stuff. It should all fit in the games drivers. Config if you want but don't force it on developers, I have my own IPD settings. etc. etc.

Bottom line don't force us into your software chain; oculus is not the only platform we need to cater! I for one have to support VR (not only Oculus), normal screen and Android. Make my job easier!


I think Oculus is going in the right direction here, for costumers it's better if the Rift is not visible as a screen (how to configure this? 2D windows end up on that screen, the OS menu bar (OSX) could end up on that screen, etc etc., also: the games start on the correct screen automatically!). Tracking and distortion can get updated without having to touch the applications.
It's less complicated for the users, just a bit more complex for the developers, but this is fine.

2EyeGuy
Adventurer
Did you turn off DK1 Legacy App Support?
Because that setting overrides the DirectHMD setting if you have a DK1 connected.

rupy
Honored Guest
"renderingpipeline" wrote:
"rupy" wrote:

I render my own distortion at 250 FPS, will I be able to continue with this without the user having to go through hoops to play the game with this new screen driver?



According to the documentation you can still perform your own distortion and even timewarp. However, I would go with the SDK provided ones as they are more likely to be optimised and correct. If you render just the distortion at 250FPS, that means the distortion alone eats 4ms from your 13.3ms frame budget on a DK2 - you might consider going with the much faster Oculus provided distortion.


No my games full stereoscopic frames run at 250 fps and I distort it myself. On Nvidia it runs at 1000 fps, on ATI 200 fps!?
"It's like Homeworld in first person." Disable Aero and vSync for a completely simulator sickness free experience with 2xHz FPS. Keep the config utility open for tracking to work.