summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-05-07 02:00:38 +0200
committerSven Gothel <[email protected]>2011-05-07 02:00:38 +0200
commitf88a51cb1c811bba5b5803aee03829b41da308c3 (patch)
tree683dd482cf2e27e37e157b9244725c8b51f426f2
parentf5aaaf5cd65dedba658392cc30edb24b0dc3c026 (diff)
parent21b13e0fccf48a2396cbffb611345f02a9117bdc (diff)
Merge remote-tracking branch 'rsantina/graph'
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java12
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java3
-rwxr-xr-xsrc/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java2
3 files changed, 9 insertions, 8 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
index 2d614d279..c7a01b8b8 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java
@@ -55,19 +55,19 @@ public abstract class RegionRenderer extends Renderer {
/** Create a Hardware accelerated Region Renderer.
* @param rs the used {@link RenderState}
* @param type either {@link com.jogamp.graph.curve.Region#SINGLE_PASS} or {@link com.jogamp.graph.curve.Region#TWO_PASS}
- * @param unifrom flag true unifrom weights for offcurve vertex, else otherwise.
+ * @param uniformWeight flag true uniform weights (equal 1.0f)for off-curve vertex, else otherwise.
* @return an instance of Region Renderer
*/
- public static RegionRenderer create(RenderState rs, int type, boolean unifrom) {
- return new jogamp.graph.curve.opengl.RegionRendererImpl01(rs, type, unifrom);
+ public static RegionRenderer create(RenderState rs, int type, boolean uniformWeight) {
+ return new jogamp.graph.curve.opengl.RegionRendererImpl01(rs, type, uniformWeight);
}
- protected RegionRenderer(RenderState rs, int type, boolean unifrom) {
+ protected RegionRenderer(RenderState rs, int type, boolean uniformWeight) {
super(rs, type);
- this.uniform = unifrom;
+ this.uniform = uniformWeight;
}
- public boolean isUniform(){
+ public boolean isUniformWeight(){
return uniform;
}
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 c96488853..aea2197d8 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/Renderer.java
@@ -195,7 +195,8 @@ public abstract class Renderer {
public void setWeight(GL2ES2 gl, float v) {
if(v > 1.9f || v < 0.0f)
- return;
+ throw new IllegalArgumentException("Weight out of range");
+
rs.getWeight().setData(v);
if(null != gl && rs.getShaderState().inUse()) {
rs.getShaderState().uniform(gl, rs.getWeight());
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java
index 6f79e1407..09e94d618 100755
--- a/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/RegionRendererImpl01.java
@@ -51,7 +51,7 @@ public class RegionRendererImpl01 extends RegionRenderer {
}
private String getFragmentShaderName(){
- if(!isUniform()){
+ if(!isUniformWeight()){
return "curverenderer02";
}
return "curverenderer01";