From 29ee4fa97a7e17fe2eb07797350200300d8126d7 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 24 Feb 2012 01:49:22 +0100 Subject: Add GLProfile.getGL2GL3() meta profile getter completing getGL2ES[12]() --- src/jogl/classes/javax/media/opengl/GLProfile.java | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/jogl/classes') diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java index d573fd3b1..1e7346116 100644 --- a/src/jogl/classes/javax/media/opengl/GLProfile.java +++ b/src/jogl/classes/javax/media/opengl/GLProfile.java @@ -666,6 +666,7 @@ public class GLProfile { *

Selection favors hardware rasterizer.

* * @throws GLException if no GL2ES1 compatible profile is available for the default device. + * @see #isGL2ES1() * @see #get(AbstractGraphicsDevice, String) * @see #getImpl() */ @@ -695,6 +696,7 @@ public class GLProfile { *

Selection favors hardware rasterizer.

* * @throws GLException if no GL2ES2 compatible profile is available for the default device. + * @see #isGL2ES2() * @see #get(AbstractGraphicsDevice, String) * @see #getImpl() */ @@ -715,6 +717,36 @@ public class GLProfile { return get(defaultDevice, GL2ES2).getImpl(); } + /** + * Returns the GL2GL3 profile implementation, hence compatible w/ GL2GL3.
+ * It returns: + *
+     *   GLProfile.get(device, GLProfile.GL2GL3).getImpl());
+     * 
+ *

Selection favors hardware rasterizer.

+ * + * @throws GLException if no GL2GL3 compatible profile is available for the default device. + * @see #isGL2GL3() + * @see #get(AbstractGraphicsDevice, String) + * @see #getImpl() + */ + public static GLProfile getGL2GL3(AbstractGraphicsDevice device) + throws GLException + { + return get(device, GL2GL3).getImpl(); + } + + /** + * Calls {@link #getGL2GL3(AbstractGraphicsDevice)} using the default device. + *

Selection favors hardware rasterizer.

+ * @see #getGL2GL3(AbstractGraphicsDevice) + */ + public static GLProfile getGL2GL3() + throws GLException + { + return get(defaultDevice, GL2GL3).getImpl(); + } + /** Returns a GLProfile object. * verifies the given profile and chooses an appropriate implementation. * A generic value of null or GL will result in -- cgit v1.2.3