summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-30 04:51:14 +0200
committerSven Gothel <[email protected]>2014-07-30 04:51:14 +0200
commit830feb65f4c3d0c633556fd39787328834ee51d2 (patch)
treed15b97c176430f4ff4e1483dbc248b410de828fd /src/jogl/classes/javax/media/opengl
parent7314b47ae1e42997e9e6974b84709640f0ac2a1b (diff)
Bug 1038 - Fix: Allow skipping detection of certain GLProfiles: Skip 'ARB_create_context'
Commit e5a55ede324ce500f50991d56491758803063a58 was incomplete, i.e. it lacked the required mappings for the non ARB profile, i.e.: GL4bc -> GL3bc, etc. These profile mappings have been added now. +++ Further more, GLContext's profile queries, isGL*() test the ctxOptions for CTX_IS_ARB_CREATED. This has to be removed to properly work w/ Skip 'ARB_create_context'. To remove the risk of inconcistency, i.e. context created via ARB and non-ARB, the 'GLX/WGL profile >= GL3 via non ARB' validation removed in commit e5a55ede324ce500f50991d56491758803063a58 has been brought back and refined. Note: if( glp.isGL3() && createContextARBTried ) { // We shall not allow context creation >= GL3 w/ non ARB methods if ARB is used, // otherwise context of similar profile but different creation method may not be share-able. .. THROW EXCEPTON .. } This limited validation removes the possibility of such having a context of same profile, one created via ARB and one without. Hence also validates the isGL*() change, where the CTX_IS_ARB_CREATED criteria is removed. +++ Note regarding commit 7314b47ae1e42997e9e6974b84709640f0ac2a1b (revert): While analyzing the mapping, it turns out that commit c8b99d197769eaec53c2def562c0ef3fc0e6a9d2 "Don't map compatibility profiles to core profile if the latter are not available (restrict profile aliasing)" is not fully consistent with GLProfile's and GLContext's profile queries, i.e. isGL*(). We may reiterate over this change .. but have it be reverted for now.
Diffstat (limited to 'src/jogl/classes/javax/media/opengl')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLContext.java21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index 09a60d304..863eb1a1e 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -976,8 +976,7 @@ public abstract class GLContext {
* @see GLProfile#isGL4bc()
*/
public final boolean isGL4bc() {
- return 0 != (ctxOptions & CTX_IS_ARB_CREATED) &&
- 0 != (ctxOptions & CTX_PROFILE_COMPAT) &&
+ return 0 != (ctxOptions & CTX_PROFILE_COMPAT) &&
ctxVersion.getMajor() >= 4;
}
@@ -986,8 +985,7 @@ public abstract class GLContext {
* @see GLProfile#isGL4()
*/
public final boolean isGL4() {
- return 0 != (ctxOptions & CTX_IS_ARB_CREATED) &&
- 0 != (ctxOptions & (CTX_PROFILE_COMPAT|CTX_PROFILE_CORE)) &&
+ return 0 != (ctxOptions & (CTX_PROFILE_COMPAT|CTX_PROFILE_CORE)) &&
ctxVersion.getMajor() >= 4;
}
@@ -995,8 +993,7 @@ public abstract class GLContext {
* Indicates whether this GLContext uses a GL4 core profile. <p>Includes [ GL4 ].</p>
*/
public final boolean isGL4core() {
- return 0 != ( ctxOptions & CTX_IS_ARB_CREATED ) &&
- 0 != ( ctxOptions & CTX_PROFILE_CORE ) &&
+ return 0 != ( ctxOptions & CTX_PROFILE_CORE ) &&
ctxVersion.getMajor() >= 4;
}
@@ -1005,8 +1002,7 @@ public abstract class GLContext {
* @see GLProfile#isGL3bc()
*/
public final boolean isGL3bc() {
- return 0 != (ctxOptions & CTX_IS_ARB_CREATED) &&
- 0 != (ctxOptions & CTX_PROFILE_COMPAT) &&
+ return 0 != (ctxOptions & CTX_PROFILE_COMPAT) &&
ctxVersion.compareTo(Version310) >= 0 ;
}
@@ -1015,8 +1011,7 @@ public abstract class GLContext {
* @see GLProfile#isGL3()
*/
public final boolean isGL3() {
- return 0 != (ctxOptions & CTX_IS_ARB_CREATED) &&
- 0 != (ctxOptions & (CTX_PROFILE_COMPAT|CTX_PROFILE_CORE)) &&
+ return 0 != (ctxOptions & (CTX_PROFILE_COMPAT|CTX_PROFILE_CORE)) &&
ctxVersion.compareTo(Version310) >= 0 ;
}
@@ -1024,8 +1019,7 @@ public abstract class GLContext {
* Indicates whether this GLContext uses a GL3 core profile. <p>Includes [ GL4, GL3 ].</p>
*/
public final boolean isGL3core() {
- return 0 != ( ctxOptions & CTX_IS_ARB_CREATED ) &&
- 0 != ( ctxOptions & CTX_PROFILE_CORE ) &&
+ return 0 != ( ctxOptions & CTX_PROFILE_CORE ) &&
ctxVersion.compareTo(Version310) >= 0;
}
@@ -1034,8 +1028,7 @@ public abstract class GLContext {
*/
public final boolean isGLcore() {
return ( 0 != ( ctxOptions & CTX_PROFILE_ES ) && ctxVersion.getMajor() >= 2 ) ||
- ( 0 != ( ctxOptions & CTX_IS_ARB_CREATED ) &&
- 0 != ( ctxOptions & CTX_PROFILE_CORE ) &&
+ ( 0 != ( ctxOptions & CTX_PROFILE_CORE ) &&
ctxVersion.compareTo(Version310) >= 0
) ;
}