diff options
author | Sven Gothel <[email protected]> | 2014-08-07 00:10:41 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-08-07 00:10:41 +0200 |
commit | 609b3f6d28bb13b589cde815acdb0e72e58ebe44 (patch) | |
tree | 355ee64c1cd5f49e17380f23e26854f06376a7e6 /src/jogl/classes/com/jogamp/opengl/util | |
parent | 8be4b87a9740229f09b1dc2b7265e3e73c4397dd (diff) |
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!
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/stereo/StereoDevice.java | 3 | ||||
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/stereo/StereoDeviceFactory.java | 20 |
2 files changed, 22 insertions, 1 deletions
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: + * <ol> + * <li>{@link DeviceType#OculusVR}</li> + * <li>{@link DeviceType#Generic}</li> + * </ol> + */ + Default, + /** + * Generic software implementation. + */ + Generic, + /** + * OculusVR implementation. + */ + OculusVR + }; public static StereoDeviceFactory createDefaultFactory() { final ClassLoader cl = StereoDeviceFactory.class.getClassLoader(); |