aboutsummaryrefslogtreecommitdiffstats
path: root/src/oculusvr
diff options
context:
space:
mode:
Diffstat (limited to 'src/oculusvr')
-rw-r--r--src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java12
-rw-r--r--src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceFactory.java3
2 files changed, 12 insertions, 3 deletions
diff --git a/src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java b/src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java
index 50e0efd30..1b85e8450 100644
--- a/src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java
+++ b/src/oculusvr/classes/com/jogamp/oculusvr/OVRVersion.java
@@ -41,6 +41,16 @@ import java.util.jar.Manifest;
public class OVRVersion extends JogampVersion {
+ /**
+ * Default init-params for {@link OVR#ovr_Initialize(ovrInitParams)},
+ * w/ flags {@link OVR#ovrInit_ServerOptional}.
+ */
+ public static final ovrInitParams defaultInitParams;
+ static {
+ defaultInitParams = ovrInitParams.create();
+ defaultInitParams.setFlags(OVR.ovrInit_ServerOptional);
+ }
+
protected static volatile OVRVersion jogampCommonVersionInfo;
protected OVRVersion(final String packageName, final Manifest mf) {
@@ -64,7 +74,7 @@ public class OVRVersion extends JogampVersion {
if(null==sb) {
sb = new StringBuilder();
}
- if( !OVR.ovr_Initialize() ) { // recursive ..
+ if( !OVR.ovr_Initialize(defaultInitParams) ) { // recursive ..
sb.append("\tOVR not available").append(Platform.getNewline());
} else {
final ovrHmdDesc hmdDesc = OVR.ovrHmd_Create(ovrHmdIndex);
diff --git a/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceFactory.java b/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceFactory.java
index 772891115..f9969a9ad 100644
--- a/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceFactory.java
+++ b/src/oculusvr/classes/jogamp/opengl/oculusvr/OVRStereoDeviceFactory.java
@@ -36,9 +36,8 @@ import com.jogamp.opengl.util.stereo.StereoDevice;
import com.jogamp.opengl.util.stereo.StereoDeviceFactory;
public class OVRStereoDeviceFactory extends StereoDeviceFactory {
-
public static boolean isAvailable() {
- if( OVR.ovr_Initialize() ) { // recursive ..
+ if( OVR.ovr_Initialize(OVRVersion.defaultInitParams) ) { // recursive ..
boolean res = false;
final int count = OVR.ovrHmd_Detect();
System.err.println("Detect.0: ovrHmd_Detect() -> "+count);