From d09a50bdc7aca2d441fe7c595711a44fe9dc4a23 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 27 Mar 2015 14:25:07 +0100 Subject: Bug 1116: Oculus SDK 0.4.4: Add extra DK1 detection; Add call to ovr_Shutdown() and ovrHmd_Destroy(hmdDesc). Add extra DK1 detection - SDK 0.4.4 w/ DK1 (Linux): ovrHmd_Detect() returns zero! - In such case: Try creating one device, which works for DK1 on Linux Add call to ovr_Shutdown() and ovrHmd_Destroy(hmdDesc). - Add StereoDeviceFactory.shutdown() and call ovr_Shutdown() for in OVRStereoDeviceFactory.shutdown(). - Call ovrHmd_Destroy(hmdDesc) in OVRStereoDevice.dispose(). --- .../classes/com/jogamp/opengl/util/stereo/StereoDeviceFactory.java | 5 +++++ .../opengl/util/stereo/generic/GenericStereoDeviceFactory.java | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'src/jogl/classes/com/jogamp/opengl/util') diff --git a/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoDeviceFactory.java b/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoDeviceFactory.java index 13aa2e891..3847b7d3e 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoDeviceFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoDeviceFactory.java @@ -107,4 +107,9 @@ public abstract class StereoDeviceFactory { * @return */ public abstract StereoDevice createDevice(final int deviceIndex, final StereoDeviceConfig config, final boolean verbose); + + /** + * Shutdown factory + */ + public abstract void shutdown(); } diff --git a/src/jogl/classes/com/jogamp/opengl/util/stereo/generic/GenericStereoDeviceFactory.java b/src/jogl/classes/com/jogamp/opengl/util/stereo/generic/GenericStereoDeviceFactory.java index 1d5000c97..9c28c0767 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/stereo/generic/GenericStereoDeviceFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/util/stereo/generic/GenericStereoDeviceFactory.java @@ -190,4 +190,9 @@ public class GenericStereoDeviceFactory extends StereoDeviceFactory { public final StereoDevice createDevice(final int deviceIndex, final StereoDeviceConfig config, final boolean verbose) { return new GenericStereoDevice(this, deviceIndex, config); } + + @Override + public void shutdown() { + // NOP + } } -- cgit v1.2.3