Coder Social home page Coder Social logo

clouds-interactive-documentary / ofxoculusrift Goto Github PK

View Code? Open in Web Editor NEW

This project forked from obviousjim/ofxoculusrift

2.0 9.0 0.0 42.95 MB

easy ofxOculusRift rendering and headtracking for openFrameworks

License: Other

Shell 1.03% C++ 72.71% C 26.26%

ofxoculusrift'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
}

ofxoculusrift's People

Contributors

obviousjim avatar prisonerjohn avatar jasonwalters-xyz avatar andreasmuller avatar

Stargazers

 avatar izm avatar

Watchers

 avatar Golan Levin avatar  avatar Lars Berg avatar Reza Ali avatar James Cloos avatar Jonathan Minard avatar Surya Mattu avatar  avatar

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.