aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java
diff options
context:
space:
mode:
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.java14
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();