Some fixes in jme-vr (#1163)
* Added Valve Index to the recognized HMD list * Fix lwjgl version mismatch * Removing linux from the blacklist
This commit is contained in:
parent
3d7a5ee01b
commit
484d192467
@ -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'
|
||||||
|
|
||||||
|
@ -433,8 +433,13 @@ public class VREnvironment {
|
|||||||
// we are going to use OpenVR now, not the Oculus Rift
|
// we are going to use OpenVR now, not the Oculus Rift
|
||||||
// OpenVR does support the Rift
|
// OpenVR does support the Rift
|
||||||
String OS = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH);
|
String OS = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH);
|
||||||
vrSupportedOS = !OS.contains("nux") && System.getProperty("sun.arch.data.model").equalsIgnoreCase("64"); //for the moment, linux/unix causes crashes, 64-bit only
|
vrSupportedOS = System.getProperty("sun.arch.data.model").equalsIgnoreCase("64"); //64-bit only
|
||||||
compositorOS = OS.contains("indows");
|
compositorOS = OS.contains("indows") || OS.contains("nux");
|
||||||
|
|
||||||
|
if (OS.contains("nux") && vrBinding != VRConstants.SETTING_VRAPI_OPENVR_LWJGL_VALUE){
|
||||||
|
logger.severe("Only LWJGL VR backend is currently (partially) supported on Linux.");
|
||||||
|
vrSupportedOS = false;
|
||||||
|
}
|
||||||
|
|
||||||
if( vrSupportedOS) {
|
if( vrSupportedOS) {
|
||||||
if( vrBinding == VRConstants.SETTING_VRAPI_OSVR_VALUE ) {
|
if( vrBinding == VRConstants.SETTING_VRAPI_OSVR_VALUE ) {
|
||||||
|
@ -12,6 +12,11 @@ public enum HmdType {
|
|||||||
*/
|
*/
|
||||||
HTC_VIVE,
|
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).
|
* <a href="https://www3.oculus.com/en-us/rift/">Occulus Rift</a> Head Mounted Device (HMD).
|
||||||
*/
|
*/
|
||||||
|
@ -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") ||
|
||||||
|
@ -556,6 +556,8 @@ public class OpenVR 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") ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user