aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-24 05:54:41 +0200
committerSven Gothel <[email protected]>2014-09-24 05:54:41 +0200
commitca357af70d46a6c12ff8810565874ecabb564d87 (patch)
treedb623bafb61e63fc8acbe7d03437dc04e7b26175 /src/jogl/classes/com
parent66ecb6c386d5c3d87d8be2600a0c7dd7d71a4329 (diff)
Fix future compatibility issues (analog to b22x commit 546f9b1a03c46b63f8bb18c1b8e2c80a8b66cf7c)
- GLFBODrawable: - Remove FBOMODE_DEFAULT - GLRendererQuirks: - Remove COUNT - Add getCount() method for future compatibility. - Animator - Hide local fields (private or package private)
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java10
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/Animator.java8
2 files changed, 9 insertions, 9 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
index f81d2f2d0..e8039edf1 100644
--- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
+++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
@@ -341,8 +341,8 @@ public class GLRendererQuirks {
*/
public static final int BuggyColorRenderbuffer = 18;
- /** Number of quirks known. */
- public static final int COUNT = 19;
+ /** 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 +509,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 +531,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);
}
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/Animator.java b/src/jogl/classes/com/jogamp/opengl/util/Animator.java
index 03c566d7d..b38a42ee3 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/Animator.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/Animator.java
@@ -58,12 +58,12 @@ import javax.media.opengl.GLException;
* </p>
*/
public class Animator extends AnimatorBase {
- protected ThreadGroup threadGroup;
+ private ThreadGroup threadGroup;
private Runnable runnable;
private boolean runAsFastAsPossible;
- protected boolean isAnimating;
- protected volatile boolean pauseIssued;
- protected volatile boolean stopIssued;
+ boolean isAnimating;
+ volatile boolean pauseIssued;
+ volatile boolean stopIssued;
/**
* Creates a new, empty Animator.
opt">(versionString.startsWith("GL_VERSION_")) { StringTokenizer tok = new StringTokenizer(versionString, "_"); tok.nextToken(); // GL_ tok.nextToken(); // VERSION_ if (!tok.hasMoreTokens()) { major = 0; return; } major = Integer.valueOf(tok.nextToken()).intValue(); if (!tok.hasMoreTokens()) { minor = 0; return; } minor = Integer.valueOf(tok.nextToken()).intValue(); if (!tok.hasMoreTokens()) { sub = 0; return; } sub = Integer.valueOf(tok.nextToken()).intValue(); } else { int radix = 10; if (versionString.length() > 2) { if (Character.isDigit(versionString.charAt(0)) && versionString.charAt(1) == '.' && Character.isDigit(versionString.charAt(2))) { major = Character.digit(versionString.charAt(0), radix); minor = Character.digit(versionString.charAt(2), radix); // See if there's version-specific information which might // imply a more recent OpenGL version StringTokenizer tok = new StringTokenizer(versionString, " "); if (tok.hasMoreTokens()) { tok.nextToken(); if (tok.hasMoreTokens()) { String token = tok.nextToken(); int i = 0; while (i < token.length() && !Character.isDigit(token.charAt(i))) { i++; } if (i < token.length() - 2 && Character.isDigit(token.charAt(i)) && token.charAt(i + 1) == '.' && Character.isDigit(token.charAt(i + 2))) { int altMajor = Character.digit(token.charAt(i), radix); int altMinor = Character.digit(token.charAt(i + 2), radix); // Avoid possibly confusing situations by putting some // constraints on the upgrades we do to the major and // minor versions if ((altMajor == major && altMinor > minor) || altMajor == major + 1) { major = altMajor; minor = altMinor; } } } } } } } valid = true; } catch (Exception e) { e.printStackTrace(); // FIXME: refactor desktop OpenGL dependencies and make this // class work properly for OpenGL ES System.err.println("Info: ExtensionAvailabilityCache: FunctionAvailabilityCache.Version.<init>: " + e); major = 1; minor = 0; /* throw (IllegalArgumentException) new IllegalArgumentException( "Illegally formatted version identifier: \"" + versionString + "\"") .initCause(e); */ } } public final boolean isValid() { return valid; } }