Login  Register

Oculus Rift SDK-041 with JOVR and GL 2.1

Posted by BrickFarmer on Aug 26, 2014; 12:22pm
URL: https://forum.jogamp.org/Oculus-Rift-SDK-041-with-JOVR-and-GL-2-1-tp4032939.html

So my goal is to create a simple demo for DK2 based on OpenGL 2.1 since that is what my current hardware supports.  I'm trying to do this with SDK based distortion.  I'm doing this from scratch on the JOGL side so that I can learn as I go :)

So I setup the HMD and sensors.  Then create a 1920x1080 NEWT window (dimensions pulled from HMD). That seems to be working.

So since I'm 2.1 bound, I'm thinking the next step is going to be to create 2 offscreen rendering buffers with "createOffscreenAutoDrawable"?.  Then render my scene once per eye.  Next I somehow need to retrieve a textureId from this offscreen target "getDelegatedDrawable"? and pass the textureIds down to the Oculus SDK.  I guess I also need to render the two textures into my NEWT window, left and right eye quads?  So a third 2D Drawable?

Or am I misunderstanding the new API?  Should I be starting with scene rendering directly into my NEWT window (2 drawables side by side?) and then somehow capture part of the buffers as textures?