aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2004-04-13 23:55:04 +0000
committerKenneth Russel <[email protected]>2004-04-13 23:55:04 +0000
commitef6a1983a48dd2c3f52987777862c3583ca24c57 (patch)
treeb49fed675a1b3ee74d39747cce928b5e83bc0229 /src/net/java/games/jogl/impl/FunctionAvailabilityCache.java
parentdc4d980ec184d2372b5bde0384ff17cda845c0b5 (diff)
Initial support for multisample / full-scene antialiasing (FSAA);
currently on Windows, X11 and other ports to follow git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@108 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/impl/FunctionAvailabilityCache.java')
-rw-r--r--src/net/java/games/jogl/impl/FunctionAvailabilityCache.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java b/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java
index 99fb36434..bceb66f9b 100644
--- a/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java
+++ b/src/net/java/games/jogl/impl/FunctionAvailabilityCache.java
@@ -52,6 +52,7 @@ import java.lang.reflect.*;
* and display.
*/
public final class FunctionAvailabilityCache {
+ private static final boolean DEBUG = false;
FunctionAvailabilityCache(GLContext context)
{
@@ -70,7 +71,9 @@ public final class FunctionAvailabilityCache {
public boolean isFunctionAvailable(String glFunctionName)
{
- //System.err.println("!!! CHECKING FOR AVAILABILITY OF: "+glFunctionName);
+ if (DEBUG) {
+ System.err.println("!!! CHECKING FOR AVAILABILITY OF: "+ glFunctionName);
+ }
Boolean available = (Boolean)availabilityCache.get(glFunctionName);
@@ -89,6 +92,10 @@ public final class FunctionAvailabilityCache {
availabilityCache.put(glFunctionName, available);
}
+ if (DEBUG) {
+ System.err.println("!!! AVAILABILITY OF "+ glFunctionName + ": " + available.booleanValue());
+ }
+
return available.booleanValue();
}
@@ -102,7 +109,9 @@ public final class FunctionAvailabilityCache {
// of extensions that are in the GL_EXTENSIONS string
if (availableExtensionCache.isEmpty()) {
GL gl = context.getGL();
- //System.err.println("!!! Pre-caching extension availability");
+ if (DEBUG) {
+ System.err.println("!!! Pre-caching extension availability");
+ }
String allAvailableExtensions =
gl.glGetString(GL.GL_EXTENSIONS) + " " + context.getPlatformExtensionsString();
StringTokenizer tok = new StringTokenizer(allAvailableExtensions);
@@ -110,7 +119,9 @@ public final class FunctionAvailabilityCache {
String availableExt = tok.nextToken().trim();
availableExt = availableExt.intern();
availableExtensionCache.add(availableExt);
- //System.err.println("!!! Available: " + availableExt);
+ if (DEBUG) {
+ System.err.println("!!! Available: " + availableExt);
+ }
}
// put a dummy var in here so that the cache is no longer empty even if