Git Product home page Git Product logo

ofxoculusdk2's Introduction

ofxOculusRift

Oculus Rift addon for openFrameworks lets you attach the rift rendering and headtracking pipeline to any existing ofCamera.

Originally by Andreas Muller Refactored by James George

void testApp::setup(){
	oculusRift.baseCamera = &cam; //attach to your camera
	//opens the device, an Oculus must be plugged in 
	//as it uses the params returned from the head set to configure 
	//the resolution settings
	oculusRift.setup();
	    
	//must run in full screen mode
	ofToggleFullScreen();
}
  
void testApp::draw(){
  
	//move your camera wherever you'd like, this becomes the base
	//position of the view
	   
	//now render using oculus flow
	oculusRift.beginLeftEye();
	drawScene();
	oculusRift.endLeftEye();
	
	oculusRift.beginRightEye();
	drawScene();
	oculusRift.endRightEye();
	
	//pushes the render texture to the viewer
	oculusRift.draw();
}


void testApp::drawScene(){
	//draw anything here in 3d, will be rendered once for each eye
}

ofxoculusdk2's People

Contributors

andreasmuller avatar armadillu avatar jasonwalters-xyz avatar obviousjim avatar prisonerjohn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ofxoculusdk2's Issues

overlays are not fixed

Maybe I'm misunderstanding the idea of an overlay, but shouldn't an overlay appear perfectly fixed?

Yet when you put an overlay up and wiggle the Rift, the overlay wobbles very slightly.

ofEnableDepthTest not working!

I tried to put a model into the scene, and it's really messy as if the depthtest was turned off. Then, I tried to put the model out of the oculus' drawScene function and it works totally fine!
Then I fill the sphere in the example using the ofFill. And I found that the default scene also have the same problem, wichch means that the further ball will be rendered before the nearer ball. Although I can see glEnable(GL_DEPTH_TEST) before the drawScene().
So the conclusion is that depthtest won't work in the drawScene().

Does this addon support CodeBlocks?

*Does this addon support CodeBlocks?
Because when I use this in CodeBlocks, I met lots of "no such file " error. And because I use the ProjectGenerator to create the project so I think that shouldn't be the problem.
Example: I found "#include <d3d11.h>" in the code, however I cannot find d3d11.h in the whole directory!

different eye render size

Im porting an old project that its using ofxoculusrift (DK1) to use the new DK2, everything seems to run fine but we are getting some estrange when rendering.

The left and right eye doesn't measure the same, the left one is larger that the right, and the middle (when one render ends and another begin) does not match the middle point in the screen.

Also note that if i want to compile that in vs express it claims for a missing atls.lib, i have to download Windows Driver Kit v7.1.0 and add a include a search path for the project (https://developer.oculusvr.com/forums/viewtopic.php?t=10917&p=144079#p144669)

Can't Find the Oculus DK2

I'm trying to use this program, but the program can't seem to find the oculus dk2 even though it is plugged in and connected to my computer.

Direct rendering mode

Hi

Im using this addon, thanks!!!

Im using that for a 360 video viewer, that was working with the dk1. I receive my dk2 so im trying to port that to use the dk2.

On mac i get a choppy movement, as i move my head, tried extend desktop, clone mode, make dk2 primary display.... but does not seems to help. I read on the oculus forum about the direct mode rendering working with opengl on windows, and saw some code in the addon about that.

Does the direct mode works on windows or mac? Doing this you get better performance?

On Mac example compiles fine, but in project generated by open frameworks Project Generator, there are errors

When I first install the library and then generate a project using the standard OFX project generator with it, compiler generates the error:

Unknown Type Name ID3D1xDevice

If I then compile the example project-- the example project will compile fine and work great, but then attempt to create a new project with the library and compile I get:

define OVR_D3D_VERSION to 10 or 11

followed by:

Lexical or Preprocessor Issue: 'd3compiler.h' file not found. 

So, the error seems to be in the xcode file config... but I'm not sure where. Any thoughts?

Thanks for the awesome library!

Mac OS X Yosemite, OF 8.4, XCode 6.1

Can't build in visual studio 2012

Hi, I'm using visual studio 2012 and have been trying to set up both and empty project and the example project with no luck. Here's what I've tried so far:

  1. Building the example project: This gives a bunch of errors in intellisense and won't compile.
  2. Creating a new project with the generator and including the addon: The intellisense errors were gone here, but when compiling it complains about not being able to find Unix related files. Obviously the generator is telling it to include the osx specific library.
  3. Creating a new project with the generator but NOT including the addon, then manually including \src, \libs\LibOVR\Src and \libs\LibOVR\Include in additional include directories and adding \libs\LibOVR\Lib\x64\VS2012 and \ofxOculusDK2Lib to the linker's additional library directories (I also tried including \libs). This solves all the "cannot find .h" errors, but creates a bunch of linker errors.

The errors are 'unresolved external symbol' errors for the ofxOculusDK2 class's functions.

Does the addon definitely work with visual studio 2012, and if so what am I missing here?

setUsePredictedOrientation() not used

The value passed to setUsePredictedOrientation() is not used anywhere. There seems to be a line at the beginning of getOrientationQuat() that would account for this, or possibly the ovr_GetTimeInSeconds() call should be replaced with a 0 when prediction is disabled?

Issue: using project generator with DK2

Hey i was trying to add DK2 addon through the project generator but on compiling this is the euro i am getting:

Undefined symbols for architecture i386:
"_ovrHmd_Destroy", referenced from:
ofxOculusDK2::~ofxOculusDK2() in ofxOculusDK2.o
"_ovr_Shutdown", referenced from:
ofxOculusDK2::~ofxOculusDK2() in ofxOculusDK2.o
"OVR::Util::Render::StereoConfig::StereoConfig(OVR::Util::Render::StereoConfig::StereoMode)", referenced from:
ofxOculusDK2::ofxOculusDK2() in ofxOculusDK2.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I know someone else has had the same issue but it doesn't seem to have been resolved.
On further inspection it seems like that the user defined paths are not getting set properly

Please help!

screen shot 2015-04-30 at 1 09 59 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.