summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph/curve
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-04-08 14:56:18 +0200
committerSven Gothel <[email protected]>2011-04-08 14:56:18 +0200
commite48537024014104e517d988907eb102154679f88 (patch)
treec205942ccd4082c5c872183a6420416963e3acca /src/jogl/classes/com/jogamp/graph/curve
parent349a22d3a87f6e3dd87c3b4151447588969de8b6 (diff)
Use common constants for shader attributes (needs to be completed)
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/curve')
-rwxr-xr-xsrc/jogl/classes/com/jogamp/graph/curve/Region.java12
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java3
2 files changed, 14 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/Region.java b/src/jogl/classes/com/jogamp/graph/curve/Region.java
index 051cb1c38..e238889e0 100755
--- a/src/jogl/classes/com/jogamp/graph/curve/Region.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/Region.java
@@ -29,6 +29,9 @@ package com.jogamp.graph.curve;
import java.util.ArrayList;
+import jogamp.opengl.Debug;
+
+import com.jogamp.graph.curve.opengl.Renderer;
import com.jogamp.graph.geom.Triangle;
import com.jogamp.graph.geom.Vertex;
import com.jogamp.opengl.util.PMVMatrix;
@@ -44,14 +47,23 @@ import com.jogamp.opengl.util.PMVMatrix;
* @see RegionFactory, OutlineShape
*/
public interface Region {
+ public static final boolean DEBUG = Debug.debug("graph.curve");
+
/** The vertices index in an OGL object
*/
public static int VERTEX_ATTR_IDX = 0;
+ public static String VERTEX_ATTR_NAME = "v_position";
/** The Texture Coord index in an OGL object
*/
public static int TEXCOORD_ATTR_IDX = 1;
+ public static String TEXCOORD_ATTR_NAME = "texCoord";
+ /** The color index in an OGL object
+ */
+ public static int COLOR_ATTR_IDX = 2;
+ public static String COLOR_ATTR_NAME = "v_color";
+
/** single pass rendering, fast, but AA might not be perfect */
public static int SINGLE_PASS = 1;
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
index 57eeb016f..aa14bcbd8 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
@@ -6,13 +6,14 @@ import javax.media.opengl.fixedfunc.GLMatrixFunc;
import jogamp.opengl.Debug;
+import com.jogamp.graph.curve.Region;
import com.jogamp.graph.geom.Vertex;
import com.jogamp.graph.geom.opengl.SVertex;
import com.jogamp.opengl.util.PMVMatrix;
import com.jogamp.opengl.util.glsl.ShaderState;
public abstract class Renderer {
- protected static final boolean DEBUG = Debug.debug("CurveRenderer");
+ protected static final boolean DEBUG = Region.DEBUG;
protected abstract boolean initImpl(GL2ES2 gl);