ofxOculusRift
ofxOculusRift copied to clipboard
ofDrawBackground + ofDrawBackgroundGradient don't work
Did you mean ofBackgroundGradient, maybe that's the problem. Hah! ;-)
OK, I setup an example project and when I use ofBackgroundGradient it works but, it's off to the top right. So what I did was just reposition it and now it's centered. Was this the issue? I might need to check out the actual project to get a better idea.
void ofApp::drawScene() { ofPushMatrix(); ofTranslate(-ofGetWidth()/2, -ofGetHeight()/2); ofBackgroundGradient(ofColor(50.0f, 50.0f, 50.0f), ofColor(0.0f,0.0f,0.0f)); ofPopMatrix(); }
yeah this is what I mean, typing from memory sorry =)
If this works, that's dead easy. Does the same translation work for both left and right eye?
Next we should look into how to draw 2D content as that's definitely a bit trickier =)
Yeah it looks great for both eyes. I've been drawing some 2D stuff, it works -- just floats in space. But, I can do some more of that with the Leap/Oculus demo I'm working on. :-)
On Wed, Oct 23, 2013 at 2:44 PM, James George [email protected]:
yeah this is what I mean, typing from memory sorry =)
If this works, that's dead easy. Does the same translation work for both left and right eye?
Next we should look into how to draw 2D content as that's definitely a bit trickier =)
— Reply to this email directly or view it on GitHubhttps://github.com/obviousjim/ofxOculusRift/issues/3#issuecomment-26933522 .
Are you referring to the 2d warping or rotation issues? I think the only way to solve this is to lock it in place. Might have to apply some inverted translation/rotations on it or maybe there's an easier way.
On Wed, Oct 23, 2013 at 2:53 PM, Jason Walters [email protected] wrote:
Yeah it looks great for both eyes. I've been drawing some 2D stuff, it works -- just floats in space. But, I can do some more of that with the Leap/Oculus demo I'm working on. :-)
On Wed, Oct 23, 2013 at 2:44 PM, James George [email protected]:
yeah this is what I mean, typing from memory sorry =)
If this works, that's dead easy. Does the same translation work for both left and right eye?
Next we should look into how to draw 2D content as that's definitely a bit trickier =)
— Reply to this email directly or view it on GitHubhttps://github.com/obviousjim/ofxOculusRift/issues/3#issuecomment-26933522 .
Not sure I follow but sounds like you are thinking the right way =)
If this is about placing 3d objects independent of head rotation,
ofMultMatrix(oculusRift.getOrientationMat());
should work.