I’m trying to get the VRAppStateSample working. I have a Windows 10 desktop on which I’ve been playing games with Oculus Rift, so I have SteamVR and hardware-specific stuff working.
I’ve tried adding jME to my own NetBeans IDL and I’ve tried the jME SDK.
I’ve tried the jME3.2_stable distribution (doesn’t have jme3-vr) and I’ve built the libraries from GitHub (although I don’t understand the different between what’s built in build/libDist/lib and dist/lib).
I’m using Java 8.
The error I get in building is
Compiling 1 source file to C:\Users\sitongial\src\NetBeansProjects\VRSample\build\classes
C:\Users\sitongial\src\NetBeansProjects\VRSample\src\sample\VRAppStateSample.java:221: error: cannot access Callback
((OpenVR)vrAppState.getVRHardware()).getCompositor().CompositorDumpImages.apply();
class file for com.sun.jna.Callback not found
1 error
C:\Users\sitongial\src\NetBeansProjects\VRSample\nbproject\build-impl.xml:930: The following error occurred while executing this line:
C:\Users\sitongial\src\NetBeansProjects\VRSample\nbproject\build-impl.xml:270: Compile failed; see the compiler error output for details.
Thank you.
Now, I can’t find where I got the distribution jME3.2-stable.zip, but the VR jar is not in it.
I cloned the source from GitHub and built it myself. It has jme3-vr.jar. The odd thing is that the “dist” and “libDist” tasks in Gradle build different sets of jars. “dist” doesn’t make the VR jar but libDist does. Still, I get the error given above. Either I’m not making jME from GitHub correctly or something is wrong in my environment, I guess.
I see a bunch of Gradle config files in GitHub, so I used that.
The line in the XML build file that the error points to is
… debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime=“false” includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}"
(building the VR sample, not jME itself - an I’m using my own NetBeans 8.2 IDE.)
I can’t see them but, try to follow the Wiki.
I acquired JNA, added it to the VR Sample classpath, and not it compiles. Does not run:
run:
Exception in thread “main” java.lang.NullPointerException
at com.jme3.app.VREnvironment.processSettings(VREnvironment.java:496)
at com.jme3.app.VREnvironment.(VREnvironment.java:87)
at sample.VRAppStateSample.main(VRAppStateSample.java:473)
C:\Users\sitongial\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1
BUILD FAILED (total time: 0 seconds)
The runtime error is a null pointer at VREnvironment:496. getVRGUIManager is null because it isn’t instantiated until the next line in the VR Sample:
Blockquote
VREnvironment environment = new VREnvironment(settings);
environment.initialize();
p.s. there is a VR category - “virtual-reality”