cancel
Showing results for 
Search instead for 
Did you mean: 

DirectHMD mode still broken for OpenGL in 0.4.1

jherico
Adventurer
Both my own examples and the OculusWorldDemo fail if I attempt to use them with OpenGL in Direct HMD mode. This is on a GeForce 650 Ti running driver version 340.52.

In the OculusWorldDemo the failure occurs on line 141 of Render_GL_Win32_Device.cpp:


HGLRC context = wglCreateContextAttribsARB(dc, 0, attribs);


The context returned here is NULL, but the code doesn't actually check the return value, so the crash occurs much later in Render_GL_Device.cpp, where the code attempts to perform a strstr on the value returned from glGetString(GL_VERSION). Again, the return value here is null, but the SDK isn't checking for it, so the strstr is attempting to read from the NULL pointer.
Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
29 REPLIES 29

Smola
Honored Guest
I understand that. Nevertheless I read that people manage to display at least something on the rift display using OpenGL DirectHMD, even if it is shifted, wrong, not properly distorted or whatever. I don't see anything on the display. I'd love to see something, even if it's wrong.

I know, it's in vain to try to achieve that atm, but I want to learn. I haven't done any C++/OpenGL in a long while and I learned.

jherico
Adventurer
"Smola" wrote:
I understand that. Nevertheless I read that people manage to display at least something on the rift display using OpenGL DirectHMD, even if it is shifted, wrong, not properly distorted or whatever. I don't see anything on the display. I'd love to see something, even if it's wrong.

I know, it's in vain to try to achieve that atm, but I want to learn. I haven't done any C++/OpenGL in a long while and I learned.


It's understandable to want to get it to work. But I think it's a waste of resources to fight with the SDK trying to do so now. Extended mode works, and if you're coding your application correctly, once Direct HMD mode does support OpenGL, you shouldn't have to do any additional work to support it.
Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action

trippedout
Honored Guest
"jherico" wrote:
Extended mode works, and if you're coding your application correctly, once Direct HMD mode does support OpenGL, you shouldn't have to do any additional work to support it.


Okay, so I've seen this mentioned plenty of times, and while it is useful for building now, I seem to be getting a lot of tearing/vsync issues. I thought that mirroring like with DK1 would be better, but now DK2 just rotates my screen so when i'm testing my app I can't ever see it on screen the same time as it's on extended displaying in the rift.

i guess my question is what is the preferred workflow? pick up a directX11 book and hope to implement all my texture stuff like that asap?

aiaustin
Expert Protege
I see that SDK 0.4.2 beta is out but the release notes do not make any mention of OpenGL fixes... @deanbeeler did the fixes mentioned earlier make it into that release?

iiicaryp
Honored Guest
I also tried sdk 0.4.2 and OculusWorldDemo app with"GL" on my amd card, but it still fails
when I launch the app. So I guess the new release doesn't fix the problem? Can oculus team confirm with that?

Thanks!

jherico
Adventurer
"trippedout" wrote:
i guess my question is what is the preferred workflow? pick up a directX11 book and hope to implement all my texture stuff like that asap?


I don't really have a good workflow for rendering concurrently to the Rift display and a visible monitor. I suggest you include a compile flag or command line option to allow you to easily toggle rendering to a monitor or to the Rift. I tend to spend most of my time rendering output to a screen, and then only switching to the Rift for final testing and tweaks.
Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action

vrcat
Honored Guest
"iiicaryp" wrote:
I also tried sdk 0.4.2 and OculusWorldDemo app with"GL" on my amd card, but it still fails
when I launch the app. So I guess the new release doesn't fix the problem? Can oculus team confirm with that?

Thanks!


iiicaryp: Thanks for reporting this issue. Confirmed: This has been a known issue with the display driver that we are working on.

trippedout
Honored Guest
"jherico" wrote:

I don't really have a good workflow for rendering concurrently to the Rift display and a visible monitor. I suggest you include a compile flag or command line option to allow you to easily toggle rendering to a monitor or to the Rift. I tend to spend most of my time rendering output to a screen, and then only switching to the Rift for final testing and tweaks.


with DK1 it was so easy to mirror and work on rift and screen, seems impossible with 2 with the rotation issue among other things - i have a flag now that switches between auto-fullscreening my second monitor (rift) or just displaying in window on main monitor but there's gotta be a better way

toi
Honored Guest
"deanbeeler" wrote:
OpenGL is still crystalizing. Further fixes for OpenGL missed the last release train but will make it into the next release. I'm confident most, if not all, of your OpenGL issues will be resolved by then.

Yeah, I don't see any OpenGL fixes in 0.4.2 at all. I am kind of saddened that so major issues still exists.
I would love to code on Linux (or even just OpenGL) with direct to rift, but what it seems like now is that it will take a very long time before that can happen. Sure I can do it with extended mode but it is such a hassle and direct to rift should really be working 😞
Hopefully we will see a fix soon! Any further communications on how the fixes are going would also be appreciated as DK2 have been out for many weeks now.

Constellation
Expert Protege
I think that direct mode is working for me in OpenGL with the OculusWorldDemo. I installed the 0.4.2 Beta SDK, loaded up the VS2010 solution file and commented in OpenGL support on line 228 of OculusWorldDemo.cpp as follows:

//#if defined(OVR_OS_WIN32)
// const char* graphics = "d3d11";
//#else
const char* graphics = "GL";
//#endif


I have my display mode set to Direct HMD and when I debug into the demo I'm hitting line 150 which has a comment which seems to confirm direct mode:

// In Direct App-rendered mode, we can use smaller window size,
// as it can have its own contents and isn't tied to the buffer.
WindowSize = Sizei(1100, 618);//Sizei(960, 540); avoid rotated output bug.


When it runs I get a small window that looks like it's matching the Sizei(1100, 618) hard coded above. On the Rift everything looks fine. My frame rate is jumping around between 65-75 fps, though I'm guessing that may be normal for a 770M GPU. I am running on a laptop which does not have Optimus (Asus G750JX). Am I truly running direct with GL or is this just a misconfiguration?