Good morning. Sorry to make my first post a bug report(?)
Edit: I downgraded by SteamVR beta to regular release. Then my testcase passed, but any call to VRSystem gets a NPE instead. So I'm guessing it has something to do with the underlying API..
I'm working on migrating jMonkeyEngine's OpenVR implementation to lwjgl's backend, using lwjgl 3.2.0.
Most of it is working, but I can't get the camera to work. Any call I make to VRTrackedCamera results in a NullPointerException
Exception in thread "main" java.lang.NullPointerException
at org.lwjgl.openvr.VRTrackedCamera.nVRTrackedCamera_GetCameraErrorNameFromEnum(VRTrackedCamera.java:30)
at org.lwjgl.openvr.VRTrackedCamera.VRTrackedCamera_GetCameraErrorNameFromEnum(VRTrackedCamera.java:45)
at test.TestError.main(TestError.java:28)
Minimal test case:
public class TestError {
public static void main(String... args){
IntBuffer peError = BufferUtils.createIntBuffer(1);
int token = VR.VR_InitInternal(peError, VR.EVRApplicationType_VRApplication_Scene);
if (peError.get(0) == 0) {
OpenVR.create(token);
// long result = VR.VR_GetGenericInterface(VR.IVRTrackedCamera_Version, peError);
int error = 0;
String s = VRTrackedCamera.VRTrackedCamera_GetCameraErrorNameFromEnum(error);
System.out.println("error " + s);
}
}
}
Any help is appreciated, thanks.