aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-02-21 13:24:05 +0100
committerSven Gothel <[email protected]>2013-02-21 13:24:05 +0100
commitfe0a2ad6f702aee71ea06f9da19ec9fd696d4095 (patch)
tree1b344a2f9f1522747ab91a06eddf6fba33ed0896 /src/jogl/classes/javax
parentffcf0cb5beaf3c7c363d45cef0b9d18dcf3f50c6 (diff)
GLProfile: Adding convenient query for highest programmable core only GL profile
As suggested @ http://forum.jogamp.org/How-to-force-core-profile-tp4028307.html However, one could always get a dedicated core profile via: - GLProfile.get(GLProfile.GLES2) - GLProfile.get(GLProfile.GL3) - GLProfile.get(GLProfile.GL4) .. etc
Diffstat (limited to 'src/jogl/classes/javax')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLProfile.java37
1 files changed, 36 insertions, 1 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLProfile.java b/src/jogl/classes/javax/media/opengl/GLProfile.java
index f916ab8b1..25bba1725 100644
--- a/src/jogl/classes/javax/media/opengl/GLProfile.java
+++ b/src/jogl/classes/javax/media/opengl/GLProfile.java
@@ -543,8 +543,20 @@ public class GLProfile {
* </ul>
*
*/
- public static final String[] GL_PROFILE_LIST_MAX_PROGSHADER = new String[] { GL4bc, GL4, GL3bc, GL3, GL2, GLES2 };
+ public static final String[] GL_PROFILE_LIST_MAX_PROGSHADER = new String[] { GL4bc, GL4, GL3bc, GL3, GL2, GLES2 };
+ /**
+ * Order of maximum programmable shader <i>core only</i> profiles
+ *
+ * <ul>
+ * <li> GL4
+ * <li> GL3
+ * <li> GLES2
+ * </ul>
+ *
+ */
+ public static final String[] GL_PROFILE_LIST_MAX_PROGSHADER_CORE = new String[] { GL4, GL3, GLES2 };
+
/** Returns a default GLProfile object, reflecting the best for the running platform.
* It selects the first of the set {@link GLProfile#GL_PROFILE_LIST_ALL}
* and favors hardware acceleration.
@@ -659,6 +671,29 @@ public class GLProfile {
return get(GL_PROFILE_LIST_MAX_PROGSHADER, favorHardwareRasterizer);
}
+ /**
+ * Returns the highest profile, implementing the programmable shader <i>core</i> pipeline <i>only</i>.
+ * It selects the first of the set: {@link GLProfile#GL_PROFILE_LIST_MAX_PROGSHADER_CORE}
+ *
+ * @throws GLException if no programmable core profile is available for the device.
+ * @see #GL_PROFILE_LIST_MAX_PROGSHADER_CORE
+ */
+ public static GLProfile getMaxProgrammableCore(AbstractGraphicsDevice device, boolean favorHardwareRasterizer)
+ throws GLException
+ {
+ return get(device, GL_PROFILE_LIST_MAX_PROGSHADER_CORE, favorHardwareRasterizer);
+ }
+
+ /** Uses the default device
+ * @throws GLException if no programmable core profile is available for the default device.
+ * @see #GL_PROFILE_LIST_MAX_PROGSHADER_CORE
+ */
+ public static GLProfile getMaxProgrammableCore(boolean favorHardwareRasterizer)
+ throws GLException
+ {
+ return get(GL_PROFILE_LIST_MAX_PROGSHADER_CORE, favorHardwareRasterizer);
+ }
+
/**
* Returns the GL2ES1 profile implementation, hence compatible w/ GL2ES1.<br/>
* It returns: