From 609b3f6d28bb13b589cde815acdb0e72e58ebe44 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 7 Aug 2014 00:10:41 +0200 Subject: Bug 1021: Refine Stereo API; Fix GenericStereoDevice; Fix StereoDemo01 for movie playback and OSX usage (HiDPI surfaceSize) - StereoDevice.DeviceType: Add API doc - StereoDevice: Add getFactory() - GenericStereoDevice - Use common static vars for configurations for simplicity - Fix createRenderer(..)'s eyeViewport in case no post-processing is performed, i.e. needs viewport X offset. - StereoDemo01 - Use 'movie' eyePosition instead of default if: - using a movie player _and_ using lenses! - Fix NEWT window pixel-unit size after window creation! --- .../com/jogamp/opengl/util/stereo/StereoDevice.java | 3 +++ .../opengl/util/stereo/StereoDeviceFactory.java | 20 +++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/com') diff --git a/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoDevice.java b/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoDevice.java index 2091d0843..d32c981a3 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoDevice.java +++ b/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoDevice.java @@ -46,6 +46,9 @@ public interface StereoDevice { // NOP } + /** Return the factory used to create this device. */ + public StereoDeviceFactory getFactory(); + /** Disposes this {@link StereoDevice}. */ public void dispose(); 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 46ce82f03..c4180585c 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoDeviceFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/util/stereo/StereoDeviceFactory.java @@ -45,7 +45,25 @@ public abstract class StereoDeviceFactory { private static final String GenericStereoDeviceClazzName = "jogamp.opengl.util.stereo.GenericStereoDeviceFactory"; private static final String isAvailableMethodName = "isAvailable"; - public static enum DeviceType { Default, Generic, OculusVR }; + /** {@link StereoDevice} type used for {@link StereoDeviceFactory#createFactory(DeviceType) createFactory(type)}. */ + public static enum DeviceType { + /** + * Auto selection of device in the following order: + *
    + *
  1. {@link DeviceType#OculusVR}
  2. + *
  3. {@link DeviceType#Generic}
  4. + *
+ */ + Default, + /** + * Generic software implementation. + */ + Generic, + /** + * OculusVR implementation. + */ + OculusVR + }; public static StereoDeviceFactory createDefaultFactory() { final ClassLoader cl = StereoDeviceFactory.class.getClassLoader(); -- cgit v1.2.3