Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to SDK 0.5.0.1 #16

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open

Update to SDK 0.5.0.1 #16

wants to merge 49 commits into from

Conversation

mattebb
Copy link

@mattebb mattebb commented Jul 19, 2015

Thought I should send this back for some merging - I've done a fair bit of work on this cleaning it up and rounding out functionality. This is up to date with the v0.5.0.1SDK, which is the latest available version that supports Mac OS X. Would like to get some time to get into 0.6 since there are some interesting new features, but lack of Mac support makes things annoying (boot camp dev environment blah blah...)

Best to look at the commits, but a brief summary:

  • Run-time control over HMD capabilities and distortion behaviour
  • Dynamic render target size (can increase/decrease resolution at runtime)
  • A few small nifty things like retrieving user eye height, dismissing safety warning
  • Cleaned up code paths, SDK and Client rendering now more unified

mattebb and others added 30 commits October 13, 2014 23:44
I’ve made a copy of the example scene, which I can merge back in later
when this is all clean. My intention for my own projects is to use the
GL3 programmable renderer pipeline, so will work on making that usable
too.

There were a few confounding factors in getting this working:

* The scene scale in the included example was huge, at non-physical
size (500 m wide). This meant that even when I did get positional
tracking was working, I didn’t notice it, since any head movements
didn’t give a sense of parallax with distant objects. It also had the
side effect of making any stereo effects un-noticeable since the eye
separation offsets coming from the had are also in physical scale.

* Part of the culprit here is the ofEasyCam which by default translates
the camera quite a large distance away from the origin (based on
viewport size).  This is now disabled with cam.setAutoDistance(false);

* The previous example also had drawing errors due to lack of depth
testing in the Fbo. This is now enabled.
Still a big mess, but getting closer
and default fixed function too
Camera worked ok in non-programmable renderer, but needs begin() and
end() around drawing, since programmableRenderer doesn’t seem to set up
the viewport the same way…
Scratch last commit, had things very backwards
May need to re-add some files for windows
Also need to update deprecated functions
Now uses ovrHmd_GetEyePoses
Taken care of by getEyePoses now, apparently
still weird issues with render target vs. window size
All it needed was glUseProgram(0);

sigh…
* New SDK includes both a LibOVR framework, and additional headers.
I’ve included the headers etc like previously but going forward, it
would be nice and simple if we could just use the framework.
* Removed dependencies on LibOVRKernel (eg. internal OVR C++ types),
since they were only used in a pretty minor fashion. Now this is just
using the straight up simple C API. Perhaps can now remove Kernel
dependencies from Xcode project files…
* Commented out static_asserts in OVR_CAPI_GL.h since OF doesn’t build
with C++11 yet. In the forums an oculus dev told me next version will
have a backward compatibility fix for this
Aim is to allow toggling HMD/distortion settings, changing render
target size, at runtime
Just switches the vignette off right now, further work required.
mattebb and others added 19 commits May 14, 2015 16:42
Doesn’t seem to be working 100% yet?
…play

Mac OS X only for now, it’s all I can test. Irrelevant for SDK direct
mode too..
Can’t test yet since I don’t have a Windows build environment
For better matching of peoples’ perceptual experiences
This fixes a problem that’s been lingering for a while, with OF double
buffering interfering with the Oculus SDK’s own buffer swapping and
VSyncing. Makes everything nice and smooth, but could be a bit
dangerous too. From the code comments:

    // We need to disable double buffering when using SDK rendering,
    // Since the oculus SDK takes care of drawing to screen at VSync
time
    // If OF tries to swap buffers too, it conflicts and messes up the
timing,
    // preventing the Oculus SDK from Vsyncing properly and causing all
kinds of judder.

    // OF uses GLFW by default on PC-ish platforms, so we assume it
here.
    // If it's not using GLFW, maybe this might cause a nasty crash :)
Yep, its so out of date, too bad.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants