Firstly thank you for you time.
- When I run the following main function with out the headset plugged in:
public static void main(String[] args) {
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();
// Checking if the VR environment is well initialized
// (access to the underlying VR system is effective, VR devices are detected).
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();
}
}
The output is :
run:
May 22, 2019 3:20:44 AM com.jme3.input.vr.openvr.OpenVR initialize
SEVERE: OpenVR Initialize Result: Hmd Not Found (108)
May 22, 2019 3:20:44 AM com.jme3.input.vr.openvr.OpenVR initialize
SEVERE: Initializing OpenVR system [FAILED]
May 22, 2019 3:20:44 AM com.jme3.app.VREnvironment initialize
WARNING: VR native wrapper initialized [FAILED]
May 22, 2019 3:20:44 AM com.jme3.app.VREnvironment initialize
SEVERE: Cannot initialize VR environment [FAILED]
Then I connect ad turn on the head set and run I get the following output:
run:
Exception in thread “main” java.lang.IllegalStateException: Pointer native@0x7ffb02730560 already mapped to Proxy interface to native function@0x7ffb02730560 (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:477)
at mygame.Main.main(Main.java:25)
C:\Users\dbmapit\AppData\Roaming.jmonkeyplatform\v3.2.2-stable-sdk1\var\cache\executor-snippets\run.xml:53: Java returned: 1
BUILD FAILED (total time: 6 seconds)