ands / OculusMeetsAR

A library that allows to use the Oculus Rift DK2, two Logitech C310 Webcams (with fisheye lenses) and the OptiTrack Flex 3 tracking system in AR applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

camera images are flipped on the rift screen

ands opened this issue · comments

commented

For some weird reason the same scene is rendered differently on both screens.
In particular, the camera image 2d rectangles seem to have flipped Y coordinates on the oculus rift screen...

This may help: http://nykl.net/?page_id=175

"DirectX assumes screen space (0,0) is the upper left corner of the screen, OpenGL assumes screen space (0,0) is the lower left corner of the screen. One must update the Oculus Rift’s StereoEyeParams::OrthoProjection matrix’s column major element 5 by scaling it by -1 to flip the Y Axis. This is not a “problem”, per se, especially since the SDK appears to be geared towards Direct X, but simply something for OpenGL Developers to keep in mind."

On second thought I'm not sure if this won't simply flip both screens..

commented

yeah. also, everything else isn't flipped. it's just the video background rect.

ok, misunderstood the problem..

commented

since we're not using ogre 2d rectangles for the video images anymore, this issue vanished.