mayakraft / SimpleOculus

Oculus Rift for native Mac OS X

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Native Mac OS X Oculus Rift

A simple Mac OS X OpenGL VR environment with the barrel warp shader, including Oculus SDK (DK1 generation) integration. For DK2, OculusVR formally supports a sample SDK+Xcode project.

Also useful as a skeleton VR environment for other (non-Oculus) VR HMDs

ScreenShot

controls

  • keyboard: F full screen + - change virtual interpupillary distance walk around
  • mouse: click to activate mouse look

Xcode + LibOVR integration instructions

NOTE THIS IS ALREADY DONE. you don’t have to do any of this, these are notes for how I built this project from scratch- in case you want to do it yourself.


from a blank OSX Cocoa project

Drag LibOVR into Xcode Project, uncheck all “Add to Target”

Link libovr.a (drag it from LibOVR/Lib/MacOS/Debug), and IOKit

Libraries

Set architecture to 64-bit Intel (x86_64)

Architectures

C++ settings- set the standard library to libstdc++ (GNU C++ standard library), disable exceptions, disable runtime types

LLVM

Coordinate your Search Paths to wherever the LibOVR folder resides: Header Search Paths (same for debug and release): LibOVR/Src, LibOVR/Include Library Search Paths:

  • Debug : LibOVR/Lib/MacOS/Debug
  • Release : LibOVR/Lib/MacOS/Release

SearchPath

SearchPath

Any classes which include OVR.h, and the classes which include THOSE classes, must be named *.mm, or must be marked as Objective-C++ source. Leave the .h files alone.

sample


For reference: this is the example’s directory structure

Finder


Test it

edit main.mm:

#import <Cocoa/Cocoa.h>
#include "OVR.h”

using namespace OVR;

int main(int argc, const char * argv[])
{
    System::Init();
    return NSApplicationMain(argc, argv);
}

If this builds, success!

About

Oculus Rift for native Mac OS X


Languages

Language:C++ 83.4%Language:C 12.1%Language:Objective-C++ 2.7%Language:Mercury 1.0%Language:Objective-C 0.9%