Re: Oculus Rift Support?

Posted by Sven Gothel on
URL: https://forum.jogamp.org/Oculus-Rift-Support-tp4032840p4032857.html

On 08/20/2014 12:54 PM, BrickFarmer [via jogamp] wrote:
> Looks interesting! I've managed to build the sources
which is ofc optional - but possible

> but I'm stumbling over this dependency:
>
> java -cp
> build/jar/jogl-all.jar:build/jar/jogl-all-natives-macosx-universal.jar:build/jar/atomic/oculusvr.jar:build/jar/atomic/oculusvr-natives-macosx-universal.jar:build/jar/jogl-test.jar

-cp \
../gluegen/build/gluegen-rt.jar:\
build/jar/jogl-all.jar:\
build/jar/atomic/oculusvr.jar:\
build/jar/jogl-test.jar

You missed gluegen-rt.jar

^^ Do not include the native jar files as long they are in the same folder
as their 'pure' java counterpart.

>
>
com.jogamp.opengl.test.junit.jogl.stereo.StereoDemo01
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/jogamp/common/type/WriteCloneable
>
> It looks like a gluegen dependency? is that right and if so which jar am I
> best using?

Yup, see above.

>
> I also read through the siggraph slides (link missing from your front
> page)
Pls update your browser cache, it's there.

> and found the stereo renderer references. My Java is very rusty after
> a few years ion iOS.  But I had a quick browse of the code.  One idea I had
> about this kind of rendering was that not the whole scene needs to be
> rendered twice.  It should be possible to pass in a FBO for the background
> to each eye renderer.  ie. a single distant background.  That might involve
> some low level clone of an FBO, if that is possible, so that each stereo
> renderer is drawing on top of the same background.  Just an idea, and I'm a
> long way from being able to know if that's possible :)  I'm still trying to
> work out wether to use objective-c or Java for my next project.

It is possible to employ such mono-parts strategy sharing an FBO, ofc.
The StereoGLEventListener.reshapeForEye(..) receives the EyeParameter,
which includes knowledge of the target eye (left/right eye).

StereoGLEventListener extends CustomGLEventListener.

CustomGLEventListener.display(..) receives
the bit CustomGLEventListener.DISPLAY_REPEAT for the right eye.

Surely the Stereo*Renderer is designed for correct asymmetric FOV rendering,
see StereoDeviceRenderer API doc.
However - surely a shared FBO blended in the background is a great idea
to reduce costs.

>
> btw running the NEWT unit tests gave me some very tantalising insights
> into what's now possible with JOGL, exciting stuff!

Great that you like it.

Cheers, Sven


signature.asc (828 bytes) Download Attachment