Skip to main content
Inspiring
December 5, 2014

JOVR 0.4.4.0: Java/Maven bindings for 0.4.4

I've updated my Java bindings for SDK 0.4.4. The source code can be found on Github here. Example code can be found here.

Developers using Maven (or a Maven compatible tool like Gradle) can declare a dependency on the following artifact:


<dependency>
<groupId>org.saintandreas</groupId>
<artifactId>jovr</artifactId>
<version>0.4.4.0</version>
</dependency>


Known issues

  • Only light testing has been done.

    28 replies

    Up and Coming
    December 8, 2014
    Thank you jherico & bluenote, that did it! All fixed! 8-)
    Up and Coming
    December 11, 2014
    "bluenote" wrote:
    I was trying to run your code (under Linux), but I get:

    Sorry I havent had it running under linux, I'm still struggling with Windows.

    "whitehexagon" wrote:
    On windows maven is struggling to pull in the JOVR dependency. Maybe its pulling from another proxy server that hasn't synced up yet.


    Seems to have been an issue with groupId missing an 's' in my local repository. I deleted local entries for JOVR and that is now pulling in the correct dependency :)

    "jherico" wrote:
    "whitehexagon" wrote:
    Anyway thanks for adding support for OSX 10.8.5! And this release seems to have fixed the strange exception I was seeing with the endFrame call under JOGL. I was about to port it over to LWJGL3!

    Well, that must be something internal to the OVR library, cause I didn't change anything.


    Hmm seems I spoke to soon. The problem with the 'Invalid memory access' is now only on windows 7, works fine OSX 10.8.5:

    hmd.endFrame(poses, eyeTextures);


    Also this line fails under windows only:

    hmd.enableHswDisplay(false);

    java.lang.UnsatisfiedLinkError: Error looking up function 'ovrhmd_EnableHSWDisplaySDKRender'


    OSX: 1.8.0_11
    Win7: 1.8.0_40-ea
    DK2, MBP (mid 2010) OSX 10.10.3. Win7 - i5 4670K - GTX770. Java LWJGL 3 OpenGL Experiments: https://github.com/WhiteHexagon
    jhericoAuthor
    Inspiring
    December 11, 2014
    "whitehexagon" wrote:

    Also this line fails under windows only:

    hmd.enableHswDisplay(false);

    java.lang.UnsatisfiedLinkError: Error looking up function 'ovrhmd_EnableHSWDisplaySDKRender'



    Ah, sorry about that. Since Oculus has added the option for developers to disable the HSW in their config, I've ceased efforts to make the undocumented ovrhmd_EnableHSWDisplaySDKRender function available as an export. However, it looks like I didn't think to remove the code in Hmd that references it. Will try to get that done in a release shortly.

    On the other hand I'm considering changing over the entire JOVR package to use JNI rather than JNA. I've started working with SWIG, which creates automated bindings for a variety of languages, and I'm thinking it might be easier to deal with since I want to be able to manage both Python and Java bindings. I'd continue to maintain an overall Hmd class which would encapsulate the JNI bindings in a Java-like way.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Up and Coming
    December 12, 2014
    "jherico" wrote:

    On the other hand I'm considering changing over the entire JOVR package to use JNI rather than JNA. I've started working with SWIG, which creates automated bindings for a variety of languages, and I'm thinking it might be easier to deal with since I want to be able to manage both Python and Java bindings. I'd continue to maintain an overall Hmd class which would encapsulate the JNI bindings in a Java-like way.


    Great, I think JNI has much better performance anyway. I think the Gluegen project is using that for JOGL.

    btw Have you ported any of your demos over to LWJGL3 yet? It looks quite interesting so far and maybe is closing the performance gap to JOGL. It would be nice if we can get demos of JOVR running with both LWJGL3 and JOGL, since they seem to be the two most popular frameworks for Java OpenGL.

    Thanks anyway for your efforts with this library!
    DK2, MBP (mid 2010) OSX 10.10.3. Win7 - i5 4670K - GTX770. Java LWJGL 3 OpenGL Experiments: https://github.com/WhiteHexagon
    Up and Coming
    December 12, 2014
    "whitehexagon" wrote:

    btw Have you ported any of your demos over to LWJGL3 yet?


    I have created a lwjgl3 branch of my example code. However, I have this issue on Linux, i.e., it only works if "libgl1-mesa-dev" is not installed, due to some conflicts of the libGL.so with the Nvidia drivers.
    jhericoAuthor
    Inspiring
    December 13, 2014
    "whitehexagon" wrote:
    btw Have you ported any of your demos over to LWJGL3 yet? It looks quite interesting so far and maybe is closing the performance gap to JOGL.


    My demos only use LWJGL3. I've attempted to do some work with JOGL, but haven't had much luck.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Up and Coming
    December 13, 2014
    "jherico" wrote:

    My demos only use LWJGL3.


    Oh, they do? Maybe I have missed something but the master branch of LwjglApp.java etc still seems to be on version 2. At least there is still usage of "Display" and no GLFW stuff anywhere?
    jhericoAuthor
    Inspiring
    December 13, 2014
    "bluenote" wrote:
    "jherico" wrote:

    My demos only use LWJGL3.


    Oh, they do? Maybe I have missed something but the master branch of LwjglApp.java etc still seems to be on version 2. At least there is still usage of "Display" and no GLFW stuff anywhere?


    Sorry, I was confusing LWJGL vs JOGL with LWJGL3 vs LWJGL2. No I haven't tried porting.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Up and Coming
    December 15, 2014
    I'm in the process of porting my simple JOVR example over to LWJGL 3 and I'm quite pleased with the results so far :) I have it running under OSX and will test windows later. It's up on my repo now.

    Interestingly with the JOGL version I still get the strange tilting of the scene with head movement, but with my LWJGL3 port, I get strange lighting effects with head movement. So I'm definitely doing something wrong. I was wondering could it be a difference in matrix ordering. From reading it sounds like all I'm doing should be row major, but if one of them is wrong, would that possibly explain the differences I'm seeing?
    DK2, MBP (mid 2010) OSX 10.10.3. Win7 - i5 4670K - GTX770. Java LWJGL 3 OpenGL Experiments: https://github.com/WhiteHexagon
    Up and Coming
    December 15, 2014
    @whitehexagon: I don't really know how your MatrixStack works so I cannot tell if the lines 433-435 are okay. However, your modelview matrix simply should be the product of Q*P where Q is the rotation matrix corresponding to the negated pose quaternion, and P is the negated pose position. If you also want to incorporate the eye height, simply add the negated player height in the P translation. Do you have tried to simply multiply the matrices in that order instead of using the MatrixStack here at all?