diff options
author | Sven Gothel <[email protected]> | 2012-02-24 01:49:22 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-02-24 01:49:22 +0100 |
commit | 29ee4fa97a7e17fe2eb07797350200300d8126d7 (patch) | |
tree | 26d320ec3d4da77bfaab0c7a80b3b7237d2cae26 /src/jogl | |
parent | d85abd787c73da9ef8be580504d83ddba71d8287 (diff) |
Add GLProfile.getGL2GL3() meta profile getter completing getGL2ES[12]()
Diffstat (limited to 'src/jogl')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLProfile.java | 32 |
1 files changed, 32 insertions, 0 deletions
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 { * <p>Selection favors hardware rasterizer.</p> * * @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 { * <p>Selection favors hardware rasterizer.</p> * * @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.<br/> + * It returns: + * <pre> + * GLProfile.get(device, GLProfile.GL2GL3).getImpl()); + * </pre> + * <p>Selection favors hardware rasterizer.</p> + * + * @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. + * <p>Selection favors hardware rasterizer.</p> + * @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 <code>null</code> or <code>GL</code> will result in |