Some fixes in jme-vr (#1163)

* Added Valve Index to the recognized HMD list

* Fix lwjgl version mismatch

* Removing linux from the blacklist
accellbaker
grizeldi 6 years ago committed by Stephen Gold
parent 3d7a5ee01b
commit 484d192467
  1. 2
      jme3-vr/build.gradle
  2. 1105
      jme3-vr/src/main/java/com/jme3/app/VREnvironment.java
  3. 131
      jme3-vr/src/main/java/com/jme3/input/vr/HmdType.java
  4. 2
      jme3-vr/src/main/java/com/jme3/input/vr/lwjgl_openvr/LWJGLOpenVR.java
  5. 1192
      jme3-vr/src/main/java/com/jme3/input/vr/openvr/OpenVR.java

@ -2,7 +2,7 @@ if (!hasProperty('mainClass')) {
ext.mainClass = '' ext.mainClass = ''
} }
def lwjglVersion = '3.2.0' def lwjglVersion = '3.2.1'
sourceCompatibility = '1.8' sourceCompatibility = '1.8'

File diff suppressed because it is too large Load Diff

@ -1,64 +1,69 @@
package com.jme3.input.vr; package com.jme3.input.vr;
/** /**
* The type of VR Head Mounted Device (HMD) * The type of VR Head Mounted Device (HMD)
* @author reden - phr00t - https://github.com/phr00t * @author reden - phr00t - https://github.com/phr00t
* @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a> * @author Julien Seinturier - COMEX SA - <a href="http://www.seinturier.fr">http://www.seinturier.fr</a>
*/ */
public enum HmdType { public enum HmdType {
/** /**
* <a href="https://www.vive.com/fr/">HTC vive</a> Head Mounted Device (HMD). * <a href="https://www.vive.com/fr/">HTC vive</a> Head Mounted Device (HMD).
*/ */
HTC_VIVE, HTC_VIVE,
/** /**
* <a href="https://www3.oculus.com/en-us/rift/">Occulus Rift</a> Head Mounted Device (HMD). * <a href="https://www.valvesoftware.com/en/index">Valve Index</a> Head Mounted Device (HMD).
*/ */
OCULUS_RIFT, VALVE_INDEX,
/** /**
* <a href="http://www.osvr.org/">OSVR</a> generic Head Mounted Device (HMD). * <a href="https://www3.oculus.com/en-us/rift/">Occulus Rift</a> Head Mounted Device (HMD).
*/ */
OSVR, OCULUS_RIFT,
/** /**
* <a href="https://www.getfove.com/">FOVE</a> Head Mounted Device (HMD). * <a href="http://www.osvr.org/">OSVR</a> generic Head Mounted Device (HMD).
*/ */
FOVE, OSVR,
/** /**
* <a href="http://www.starvr.com/">STARVR</a> Head Mounted Device (HMD). * <a href="https://www.getfove.com/">FOVE</a> Head Mounted Device (HMD).
*/ */
STARVR, FOVE,
/** /**
* <a href="http://gamefacelabs.com/">GameFace</a> Head Mounted Device (HMD). * <a href="http://www.starvr.com/">STARVR</a> Head Mounted Device (HMD).
*/ */
GAMEFACE, STARVR,
/** /**
* <a href="https://www.playstation.com/en-us/explore/playstation-vr/">PlayStation VR</a> (formely Morpheus) Head Mounted Device (HMD). * <a href="http://gamefacelabs.com/">GameFace</a> Head Mounted Device (HMD).
*/ */
MORPHEUS, GAMEFACE,
/** /**
* <a href="http://www.samsung.com/fr/galaxynote4/gear-vr/">Samsung GearVR</a> Head Mounted Device (HMD). * <a href="https://www.playstation.com/en-us/explore/playstation-vr/">PlayStation VR</a> (formely Morpheus) Head Mounted Device (HMD).
*/ */
GEARVR, MORPHEUS,
/** /**
* a null Head Mounted Device (HMD). * <a href="http://www.samsung.com/fr/galaxynote4/gear-vr/">Samsung GearVR</a> Head Mounted Device (HMD).
*/ */
NULL, GEARVR,
/** /**
* a none Head Mounted Device (HMD). * a null Head Mounted Device (HMD).
*/ */
NONE, NULL,
/** /**
* a not referenced Head Mounted Device (HMD). * a none Head Mounted Device (HMD).
*/ */
OTHER NONE,
/**
* a not referenced Head Mounted Device (HMD).
*/
OTHER
} }

@ -421,6 +421,8 @@ public class LWJGLOpenVR implements VRAPI {
completeName = completeName.toLowerCase(Locale.ENGLISH).trim(); completeName = completeName.toLowerCase(Locale.ENGLISH).trim();
if( completeName.contains("htc") || completeName.contains("vive") ) { if( completeName.contains("htc") || completeName.contains("vive") ) {
return HmdType.HTC_VIVE; return HmdType.HTC_VIVE;
} else if ( completeName.contains("index") ) {
return HmdType.VALVE_INDEX;
} else if( completeName.contains("osvr") ) { } else if( completeName.contains("osvr") ) {
return HmdType.OSVR; return HmdType.OSVR;
} else if( completeName.contains("oculus") || completeName.contains("rift") || } else if( completeName.contains("oculus") || completeName.contains("rift") ||

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save