From 3d7e3437e52d1bbc9031e4be0325ea6dea3b33b8 Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Sat, 1 Aug 2009 07:20:33 -0700
Subject: Cleanup GLSL ShaderUtil/Code; Add dumpCode
---
src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
(limited to 'src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java')
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..d8f6eeea2 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)) {
@@ -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();
--
cgit v1.2.3
From 363fe8afc173ec9bf7fda4f863ddd14cd5ceabb5 Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Sun, 2 Aug 2009 04:54:41 -0700
Subject: Fix doc bug @arg -> @param
---
make/config/jogl/gl-common.cfg | 2 +-
make/doc/jogl/spec-overview.html | 2 +-
.../classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java | 2 +-
src/jogl/classes/com/sun/opengl/util/GLArrayDataClient.java | 10 +++++-----
src/jogl/classes/com/sun/opengl/util/GLArrayDataServer.java | 10 +++++-----
src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java | 4 ++--
src/jogl/classes/javax/media/opengl/GLDrawableFactory.java | 2 +-
src/jogl/classes/javax/media/opengl/GLPipelineFactory.java | 10 +++++-----
src/jogl/classes/javax/media/opengl/GLUniformData.java | 12 ++++++------
9 files changed, 27 insertions(+), 27 deletions(-)
(limited to 'src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java')
diff --git a/make/config/jogl/gl-common.cfg b/make/config/jogl/gl-common.cfg
index 7cf51fda5..3df9cc852 100644
--- a/make/config/jogl/gl-common.cfg
+++ b/make/config/jogl/gl-common.cfg
@@ -611,7 +611,7 @@ ClassJavadoc GL3 * inclusive - forward compatible, as well as most of it's exte
ClassJavadoc GL3 * time of this specification.
ClassJavadoc GL3 * Note: OpenGL 3.0 forward compatible, non deprecated functionality is included in the
ClassJavadoc GL3 * 3.1 specification, hence the {@link GL2GL3} implemented interface.
-ClassJavadoc GL3 * Note: OpenGL 3.1 (forward compatible) no more includes fixed point functionality.
+ClassJavadoc GL3 * Note: OpenGL 3.1 forward compatible no more includes fixed point functionality.
ClassJavadoc GL3 *
ClassJavadoc GL3 */
diff --git a/make/doc/jogl/spec-overview.html b/make/doc/jogl/spec-overview.html
index 6557e9f7a..89b4ac7c8 100644
--- a/make/doc/jogl/spec-overview.html
+++ b/make/doc/jogl/spec-overview.html
@@ -67,7 +67,7 @@ inclusive - forward compatible only, as well as most of it's extensions defined
time of this specification.
Note: OpenGL 3.0 forward compatible, non deprecated functionality is included in the
3.1 specification, hence the {@link javax.media.opengl.GL2GL3} implemented interface.
- Note: OpenGL 3.1 (forward compatible) no more includes fixed point functionality.
+ Note: OpenGL 3.1 forward compatible no more includes fixed point functionality.
Future extensions will be added with a maintenance update
{@link javax.media.opengl.GLES1 javax.media.opengl.GLES1} interface
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java b/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
index de911950a..0d540647a 100644
--- a/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
+++ b/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
@@ -69,7 +69,7 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
/**
* Returns the sole GLDrawableFactoryImpl instance.
*
- * @arg glProfile GLProfile to determine the factory type, ie EGLDrawableFactory,
+ * @param glProfile GLProfile to determine the factory type, ie EGLDrawableFactory,
* or one of the native GLDrawableFactory's, ie X11/GLX, Windows/WGL or MacOSX/CGL.
*/
public static GLDrawableFactoryImpl getFactoryImpl(GLProfile glp) {
diff --git a/src/jogl/classes/com/sun/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/sun/opengl/util/GLArrayDataClient.java
index e05a77226..ec4c5e393 100644
--- a/src/jogl/classes/com/sun/opengl/util/GLArrayDataClient.java
+++ b/src/jogl/classes/com/sun/opengl/util/GLArrayDataClient.java
@@ -27,13 +27,13 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
}) != null;
/**
- * @arg index The GL array index
- * @arg name The optional custom name for the GL array index, maybe null.
+ * @param index The GL array index
+ * @param name The optional custom name for the GL array index, maybe null.
* If null, the default name mapping will be used, see 'getPredefinedArrayIndexName(int)'.
* This name might be used as the shader attribute name.
- * @arg comps The array component number
- * @arg dataType The array index GL data type
- * @arg normalized Wheather the data shall be normalized
+ * @param comps The array component number
+ * @param dataType The array index GL data type
+ * @param normalized Wheather the data shall be normalized
*
* @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
*/
diff --git a/src/jogl/classes/com/sun/opengl/util/GLArrayDataServer.java b/src/jogl/classes/com/sun/opengl/util/GLArrayDataServer.java
index e9a5e2754..dc233ce36 100644
--- a/src/jogl/classes/com/sun/opengl/util/GLArrayDataServer.java
+++ b/src/jogl/classes/com/sun/opengl/util/GLArrayDataServer.java
@@ -21,13 +21,13 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* EnableVertexAttribArray and VertexAttribPointer calls,
* and a predefined vertex attribute variable name will be choosen.
*
- * @arg index The GL array index
- * @arg name The optional custom name for the GL array index, maybe null.
+ * @param index The GL array index
+ * @param name The optional custom name for the GL array index, maybe null.
* If null, the default name mapping will be used, see 'getPredefinedArrayIndexName(int)'.
* This name might be used as the shader attribute name.
- * @arg comps The array component number
- * @arg dataType The array index GL data type
- * @arg normalized Wheather the data shall be normalized
+ * @param comps The array component number
+ * @param dataType The array index GL data type
+ * @param normalized Wheather the data shall be normalized
*
* @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
*/
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 d8f6eeea2..8712ac7e2 100644
--- a/src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java
+++ b/src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java
@@ -318,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.
*
@@ -549,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.
*
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index 5a761119f..1a18a60f8 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -148,7 +148,7 @@ public abstract class GLDrawableFactory {
/**
* Returns the sole GLDrawableFactory instance.
*
- * @arg glProfile GLProfile to determine the factory type, ie EGLDrawableFactory,
+ * @param glProfile GLProfile to determine the factory type, ie EGLDrawableFactory,
* or one of the native GLDrawableFactory's, ie X11/GLX, Windows/WGL or MacOSX/CGL.
*/
public static GLDrawableFactory getFactory(GLProfile glProfile) throws GLException {
diff --git a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
index 9aceb2c53..63b50cb3c 100644
--- a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
@@ -54,7 +54,7 @@ public class GLPipelineFactory {
* The upstream GL instance is determined as follows:
*
* - Use
pipelineClazzBaseName
as the class name's full basename, incl. package name
- * - For the
downstream
classe and it's superclasses, do:
+ * - For the
downstream
class and it's superclasses, do:
*
* - For all
downstream
class and superclass interfaces, do:
*
@@ -65,10 +65,10 @@ public class GLPipelineFactory {
*
*
*
- * @arg pipelineClazzBaseName the basename of the pipline class name
- * @arg reqInterface optional requested interface to be used, may be null, in which case the first matching one is used
- * @arg downstream is always the 1st argument for the upstream constructor
- * @arg additionalArgs additional arguments for the upstream constructor
+ * @param pipelineClazzBaseName the basename of the pipline class name
+ * @param reqInterface optional requested interface to be used, may be null, in which case the first matching one is used
+ * @param downstream is always the 1st argument for the upstream constructor
+ * @param additionalArgs additional arguments for the upstream constructor
*/
public static final GL create(String pipelineClazzBaseName, Class reqInterface, GL downstream, Object[] additionalArgs) {
Class downstreamClazz = downstream.getClass();
diff --git a/src/jogl/classes/javax/media/opengl/GLUniformData.java b/src/jogl/classes/javax/media/opengl/GLUniformData.java
index 8b5fb1a03..f628ce35a 100644
--- a/src/jogl/classes/javax/media/opengl/GLUniformData.java
+++ b/src/jogl/classes/javax/media/opengl/GLUniformData.java
@@ -10,7 +10,7 @@ public class GLUniformData {
*
* Number of objects is 1
*
- * @arg components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
+ * @param components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
*/
public GLUniformData(String name, int val) {
init(name, 1, new Integer(val));
@@ -21,7 +21,7 @@ public class GLUniformData {
*
* Number of objects is 1
*
- * @arg components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
+ * @param components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
*/
public GLUniformData(String name, float val) {
init(name, 1, new Float(val));
@@ -32,7 +32,7 @@ public class GLUniformData {
*
* Number of objects is calculated by data.limit()/components
*
- * @arg components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
+ * @param components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
*/
public GLUniformData(String name, int components, IntBuffer data) {
init(name, components, data);
@@ -43,7 +43,7 @@ public class GLUniformData {
*
* Number of objects is calculated by data.limit()/components
*
- * @arg components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
+ * @param components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
*/
public GLUniformData(String name, int components, FloatBuffer data) {
init(name, components, data);
@@ -54,8 +54,8 @@ public class GLUniformData {
*
* Number of objects is calculated by data.limit()/(rows*columns)
*
- * @arg rows the matrix rows
- * @arg column the matrix column
+ * @param rows the matrix rows
+ * @param column the matrix column
*/
public GLUniformData(String name, int rows, int columns, FloatBuffer data) {
init(name, rows, columns, data);
--
cgit v1.2.3