diff options
author | Michael Bien <[email protected]> | 2009-08-08 21:43:30 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2009-08-08 21:43:30 +0200 |
commit | 8ef9d7364a942c19ec5e1f306e08193e83f4fea6 (patch) | |
tree | 6dcf95825d2933992199a7062b15e38d3f721c95 /src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java | |
parent | 2a8e9876ca4567de3b08813c280d006f9b2c32e6 (diff) | |
parent | fb3e50b4e7e11df911a83ab7966cf8f293c20da2 (diff) |
Merge branch 'master' of ssh://[email protected]/jogl~jogl-git
Diffstat (limited to 'src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java')
-rw-r--r-- | src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java b/src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java index bab9ef4f3..8712ac7e2 100644 --- a/src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java +++ b/src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java @@ -3,14 +3,17 @@ package com.sun.opengl.util.glsl; import javax.media.opengl.*; import com.sun.opengl.util.*; +import com.sun.opengl.impl.Debug; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.nio.*; import java.io.PrintStream; +import java.security.*; public class ShaderState { + public static final boolean DEBUG = Debug.isPropertyDefined("jogl.debug.GLSLState", true, AccessController.getContext()); public ShaderState() { } @@ -77,8 +80,10 @@ public class ShaderState { int curId = (null!=shaderProgram)?shaderProgram.id():-1; int newId = (null!=prog)?prog.id():-1; System.err.println("Info: attachShaderProgram: "+curId+" -> "+newId+"\n\t"+shaderProgram+"\n\t"+prog); - Throwable tX = new Throwable("Info: attachShaderProgram: Trace"); - tX.printStackTrace(); + if(verbose) { + Throwable tX = new Throwable("Info: attachShaderProgram: Trace"); + tX.printStackTrace(); + } } if(null!=shaderProgram) { if(shaderProgram.equals(prog)) { @@ -313,7 +318,7 @@ public class ShaderState { * Even if the attribute is not found in the current shader, * it is stored in this state. * - * @arg data the GLArrayData's name must match the attributes one, + * @param data the GLArrayData's name must match the attributes one, * it's index will be set with the attribute's location, * if found. * @@ -544,7 +549,7 @@ public class ShaderState { * Even if the uniform is not found in the current shader, * it is stored in this state. * - * @arg data the GLUniforms's name must match the uniform one, + * @param data the GLUniforms's name must match the uniform one, * it's index will be set with the uniforms's location, * if found. * @@ -635,7 +640,6 @@ public class ShaderState { return buf.toString(); } - protected static final boolean DEBUG = false; protected boolean verbose = false; protected ShaderProgram shaderProgram=null; protected HashMap attribMap2Idx = new HashMap(); |