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 5 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 = ''
}
def lwjglVersion = '3.2.0'
def lwjglVersion = '3.2.1'
sourceCompatibility = '1.8'

File diff suppressed because it is too large Load Diff

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

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

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