bjornblissing / osgoculusviewer

An OsgViewer with support for the Oculus Rift
Other
106 stars 67 forks source link

Rendering to DK2 in Linux: Window size and position incorrect #29

Closed Factoid closed 9 years ago

Factoid commented 9 years ago

On Ubuntu 14.10, my DK2 display shows up in portrait orientation, but the viewer creates a window seems to assume landscape. I'm interested in helping to debug the issue, but I wanted to make sure this was actually a bug and not a failure on my part to properly configure the display settings.

As far as I can tell, this results in the left eye being rendered where the right eye should be, with the right eye off the screen, and the image rotated by 90 degrees.

The Oculus world demo functions properly on my display.

bjornblissing commented 9 years ago

The Oculus world demo uses SDK based distortion rendering, while this library at the time uses client side distortion rendering. (There is a branch for trying to get SDK distortion rendering up and running. But at the moment that branch is not working).

SDK distortion rendering uses a special distortion cap to handle the portrait mode in linux, i.e. ovrDistortionCap_LinuxDevFullscreen. But in extended mode we have to handle this our self. Since I do not develop on Linux I cannot really say what the best solution would be to your problem.

Maybe some of the Linux users could give you a hint? @seken @perezsolerj

Factoid commented 9 years ago

Sounds like I'll check out SDK rendering branch and see if I can help get that working. I'm using OSG as the rendering engine for a game, and I'm very interested in having rift support, you guys have already laid the groundwork.

I'll keep you posted.

seken commented 9 years ago

If you rotate the DK2 into landscape the display is correctly detected and the view config positions the window fullscreen on the device