If I try to start my VR Application, this error occurs:
On v3.2.2 everything worked fine
Exception in thread “main” java.lang.IllegalStateException: Pointer native@0x7ff9bd67ee20 already mapped to Proxy interface to native function@0x7ff9bd67ee20 (com.jme3.system.jopenvr.VR_IVRSystem_FnTable$ComputeDistortion_callback).
Native code may be re-using a default function pointer, in which case you may need to use a common Callback class wherever the function pointer is reused.
at com.sun.jna.CallbackReference.getCallback(CallbackReference.java:148)
at com.sun.jna.CallbackReference.getCallback(CallbackReference.java:131)
at com.sun.jna.Pointer.getValue(Pointer.java:425)
at com.sun.jna.Structure.readField(Structure.java:720)
at com.sun.jna.Structure.read(Structure.java:580)
at com.jme3.input.vr.openvr.OpenVR.initialize(OpenVR.java:202)
at com.jme3.app.VREnvironment.initialize(VREnvironment.java:482)
My code:
AppSettings settings = new AppSettings(true);
settings.put(VRConstants.SETTING_VRAPI, VRConstants.SETTING_VRAPI_OPENVR_VALUE); settings.put(VRConstants.SETTING_ENABLE_MIRROR_WINDOW, true);
VREnvironment env = new VREnvironment(settings);
env.initialize();
if (env.isInitialized()){
VRAppState vrAppState = new VRAppState(settings, env);
vrAppState.setMirrorWindowSize(1024, 800);
Main app = new Main(vrAppState);
app.setLostFocusBehavior(LostFocusBehavior.Disabled);
app.setSettings(settings);
app.setShowSettings(false);
app.start();
}