Forum Discussion
jherico
11 years agoAdventurer
JOVR 0.4.2.0: Java/Maven bindings for 0.4.2 (Updated 09-05)
I've updated my Java bindings for SDK 0.4.2. 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:
Update 2014-09-05: Release of 0.4.2.0
Changes since 0.4.2.0
Update 2014-09-03: Release of 0.4.1.2
Changes since 0.4.1.1
Update 2014-08-15: Release of 0.4.1.1
Changes since 0.4.1.0
Known issues are unchanged.
Update 2014-08-13: Release of 0.4.1.0
Changes since 0.4.0.1
Known issues
Update 2014-08-11: Release of 0.4.0.1
Changes since 0.4.0.0
Known issues
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.2.0</version>
</dependency>
Update 2014-09-05: Release of 0.4.2.0
Changes since 0.4.2.0
- Updated binaries to SDK 0.4.2
- Added new HQ distortion flag (currently non-functional in OpenGL)
Update 2014-09-03: Release of 0.4.1.2
Changes since 0.4.1.1
- Added function to enable/disable HSW rendering by the SDK
Update 2014-08-15: Release of 0.4.1.1
Changes since 0.4.1.0
- The windows binaries were being built in release mode, but had some debug preprocessor macros enabled, so any asserts you hit would crash the application.
Known issues are unchanged.
Update 2014-08-13: Release of 0.4.1.0
Changes since 0.4.0.1
- Added ovr_InitializeRenderingShim method to the OvrLibrary type.
- Updated windows binaries to 0.4.1 SDK
- Added Mac binaries
Known issues
- Health and safety warning doesn't display properly for me on OSX
- Continued issues with OpenGL and Direct HMD mode. I recommend using extended mode for the time being if you're having issues.
- Judder issues are prominent in OpenGL in all my tests. I recommend running your headset @60Hz until Oculus or the video card manufacturers do whatever is required to resolve the problem.
Update 2014-08-11: Release of 0.4.0.1
Changes since 0.4.0.0
- Renamed the HmdDesc type to Hmd to more closely match the SDK naming
- Added some missing functions to Hmd required for client side distortion
- Added some missing function to Hmd for health and safety warning management
- Added some missing override annotations
Known issues
- Unfortunately, like the current SDK release, they are windows only. I've built both the 64 bit and 32 bit DLL versions and they're embedded in the jar file.
- I've been unable to get OpenGL to work properly with Direct HMD mode. I recommend using extended mode for the time being if you're having issues.
52 Replies
- phr00tHonored GuestThanks jherico!
I'll work on getting this integrated with jMonkeyEngine as soon as a Linux release becomes available... - whitehexagonExplorerGreat, I'm looking forward to trying out the OSX build with OpenGL. Do I understand as well that the device can still be treated as 'just another monitor' ie. the new driver based direct mode can be bypassed?
- danielmgukExplorerI see you used JNA. I had a go at JNI and got something working by using SWIG to generate the Java classes and C++ wrapper. 32 bit only so far and only OVR_CAPI.
https://github.com/danielajgrout/vrstuff
I also wrote a little debug UI to capture sensor data - just out of interest. It's under danielmg.vr.jovr.ui.JOVRDebug.
Sorry about calling my thing jovr it was the first thing that came to mind, before I'd seen your build.
http://i.imgur.com/Fuy5h76.png?1
- electHonored GuestThe RiftDemo is using the SDK distortion, isnt it?
- jhericoAdventurer
"elect" wrote:
The RiftDemo is using the SDK distortion, isnt it?
Yes - electHonored Guest
"jherico" wrote:
"elect" wrote:
The RiftDemo is using the SDK distortion, isnt it?
Yes
Do you have any feedback regarding the latency? Do you think that is worth to implement it in Client distortion mode? - electHonored GuestAnyway, I am trying to do a little jogl example using your library, but I am having a lot of problems, I guess the main is that your example is based on lwjgl..
Do I need to rewrite some of your classes, such as FrameBuffer, to port them to Jogl, dont I? - jhericoAdventurer
"elect" wrote:
Anyway, I am trying to do a little jogl example using your library, but I am having a lot of problems, I guess the main is that your example is based on lwjgl..
Do I need to rewrite some of your classes, such as FrameBuffer, to port them to Jogl, dont I?
Yes, my GL classes won't work out of the box with JOGL. You don't have to use the classes though. You can use raw JOGL instead of wrappers. - electHonored Guest
"jherico" wrote:
"elect" wrote:
Anyway, I am trying to do a little jogl example using your library, but I am having a lot of problems, I guess the main is that your example is based on lwjgl..
Do I need to rewrite some of your classes, such as FrameBuffer, to port them to Jogl, dont I?
Yes, my GL classes won't work out of the box with JOGL. You don't have to use the classes though. You can use raw JOGL instead of wrappers.
Im gettingException in thread "main-AWTAnimator" java.lang.Error: Invalid memory access
at com.sun.jna.Native.invokeVoid(Native Method)
at com.sun.jna.Function.invoke(Function.java:367)
at com.sun.jna.Function.invoke(Function.java:315)
at com.sun.jna.Library$Handler.invoke(Library.java:212)
at com.sun.proxy.$Proxy0.ovrHmd_EndFrame(Unknown Source)
at com.oculusvr.capi.HmdDesc.endFrame(HmdDesc.java:159)
at joglus.example.GlViewer.display(GlViewer.java:262)
at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:649)
at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:633)
at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:399)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1103)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:978)
at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:610)
at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:75)
at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:416)
at com.jogamp.opengl.util.Animator$MainLoop.run(Animator.java:188)
at the display() call, line 262
https://github.com/elect86/Joglus/blob/master/Joglolus/src/joglus/example/GlViewer.java
where I call
hmdDesc.endFrame(poses, eyeTextures);
Ps: matrixStack is temporary disable just to test if I can get at least the right clear color in the oculus.. - electHonored GuestEven just something like this returns the same exception
@Override
public void display(GLAutoDrawable glad) {
System.out.println("display");
GL3 gl3 = glad.getGL().getGL3();
Quat quat = new Quat(
hmdDesc.getEyePose(hmdDesc.EyeRenderOrder[0]).Orientation.x,
hmdDesc.getEyePose(hmdDesc.EyeRenderOrder[0]).Orientation.y,
hmdDesc.getEyePose(hmdDesc.EyeRenderOrder[0]).Orientation.z,
hmdDesc.getEyePose(hmdDesc.EyeRenderOrder[0]).Orientation.w);
quat.print("quat");
checkError(gl3);
}
Ps: Quat is one of my classes..
Instead if I move it inside the hdm frame handling it works (I get orient for both eyes), but then it fails the same way at the endFrame@Override
public void display(GLAutoDrawable glad) {
System.out.println("display");
GL3 gl3 = glad.getGL().getGL3();
hmdDesc.beginFrame(++frameCount);
for (int i = 0; i < 2; ++i) {
int eye = hmdDesc.EyeRenderOrder[i];
Quat quat = new Quat(
hmdDesc.getEyePose(hmdDesc.EyeRenderOrder[0]).Orientation.x,
hmdDesc.getEyePose(hmdDesc.EyeRenderOrder[0]).Orientation.y,
hmdDesc.getEyePose(hmdDesc.EyeRenderOrder[0]).Orientation.z,
hmdDesc.getEyePose(hmdDesc.EyeRenderOrder[0]).Orientation.w);
quat.print("quat");
{
frameBuffers[eye].activate(gl3);
{
render(gl3);
}
frameBuffers[eye].deactivate(gl3);
}
}
hmdDesc.endFrame(poses, eyeTextures);
checkError(gl3);
Replacing begin/endFrame with FrameTiming it works like a charm..
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 year ago