diff options
author | Sven Gothel <[email protected]> | 2014-09-24 01:25:49 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-09-24 01:25:49 +0200 |
commit | 546f9b1a03c46b63f8bb18c1b8e2c80a8b66cf7c (patch) | |
tree | 9d4b5f909b1b58addf748bccfb9e1facc770caa6 /src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java | |
parent | 8e9407ab74f672c2a0d1e196a3ba2e7d8743debf (diff) |
Fix all backward compatibility issues w/ 2.2.0 and 2.2.1
- Preserve fields, but make them deprecated and don't use them anymore.
Using a new version with less visibility.
- Revert incompatible method prototype changes
- GLFBODrawable:
- Completly remove FBOMODE_DEFAULT and FBOMODE_USE_DEPTH usage
and deprecate them
- GLRendererQuirks:
- Completly remove COUNT usage and deprecate it.
- Add getCount() method for future compatibility.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java index f81d2f2d0..eafc52ef8 100644 --- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java +++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java @@ -341,8 +341,11 @@ public class GLRendererQuirks { */ public static final int BuggyColorRenderbuffer = 18; - /** Number of quirks known. */ - public static final int COUNT = 19; + /** @deprecated Use {@link #getCount()}, this value is no more valid! */ + public static final int COUNT = 18; + + /** Return the number of known quirks. */ + public static final int getCount() { return 19; } private static final String[] _names = new String[] { "NoDoubleBufferedPBuffer", "NoDoubleBufferedBitmap", "NoSetSwapInterval", "NoOffscreenBitmap", "NoSetSwapIntervalPostRetarget", "GLSLBuggyDiscard", @@ -509,7 +512,7 @@ public class GLRendererQuirks { } sb.append("["); boolean first=true; - for(int i=0; i<COUNT; i++) { + for(int i=0; i<getCount(); i++) { final int testmask = 1 << i; if( 0 != ( _bitmask & testmask ) ) { if(!first) { sb.append(", "); } @@ -531,8 +534,8 @@ public class GLRendererQuirks { * @throws IllegalArgumentException if quirk is out of range */ public static void validateQuirk(final int quirk) throws IllegalArgumentException { - if( !( 0 <= quirk && quirk < COUNT ) ) { - throw new IllegalArgumentException("Quirks must be in range [0.."+COUNT+"[, but quirk: "+quirk); + if( !( 0 <= quirk && quirk < getCount() ) ) { + throw new IllegalArgumentException("Quirks must be in range [0.."+getCount()+"[, but quirk: "+quirk); } } |