diff options
14 files changed, 38 insertions, 44 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph01UbuntuLight_o.java b/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph01UbuntuLight_o.java index 4171eeda8..d9db96332 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph01UbuntuLight_o.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph01UbuntuLight_o.java @@ -56,8 +56,8 @@ public class Glyph01UbuntuLight_o extends Shape { @SuppressWarnings("unused") @Override - protected void addShapeToRegion(final GL2ES2 gl, final RegionRenderer renderer) { - final OutlineShape shape = new OutlineShape(renderer.getRenderState().getVertexFactory()); + protected void addShapeToRegion() { + final OutlineShape shape = new OutlineShape(vertexFactory); // Ubuntu-Light, lower case 'o' // Start TTF Shape for Glyph 82 diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph02UbuntuLight_ae.java b/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph02UbuntuLight_ae.java index 28d6f6390..6113756a7 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph02UbuntuLight_ae.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph02UbuntuLight_ae.java @@ -55,8 +55,8 @@ public class Glyph02UbuntuLight_ae extends Shape { @SuppressWarnings("unused") @Override - protected void addShapeToRegion(final GL2ES2 gl, final RegionRenderer renderer) { - final OutlineShape shape = new OutlineShape(renderer.getRenderState().getVertexFactory()); + protected void addShapeToRegion() { + final OutlineShape shape = new OutlineShape(vertexFactory); // Ubuntu-Light, lower case 'æ' diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph03FreeMonoRegular_M.java b/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph03FreeMonoRegular_M.java index 45868762c..a4e342ff5 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph03FreeMonoRegular_M.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph03FreeMonoRegular_M.java @@ -55,8 +55,8 @@ public class Glyph03FreeMonoRegular_M extends Shape { @SuppressWarnings("unused") @Override - protected void addShapeToRegion(final GL2ES2 gl, final RegionRenderer renderer) { - final OutlineShape shape = new OutlineShape(renderer.getRenderState().getVertexFactory()); + protected void addShapeToRegion() { + final OutlineShape shape = new OutlineShape(vertexFactory); if( false ) { // Start TTF Shape for Glyph 48 diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph04FreeSans_0.java b/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph04FreeSans_0.java index 63bc0b5b5..05624e7bd 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph04FreeSans_0.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph04FreeSans_0.java @@ -54,8 +54,8 @@ public class Glyph04FreeSans_0 extends Shape { } @Override - protected void addShapeToRegion(final GL2ES2 gl, final RegionRenderer renderer) { - final OutlineShape shape = new OutlineShape(renderer.getRenderState().getVertexFactory()); + protected void addShapeToRegion() { + final OutlineShape shape = new OutlineShape(vertexFactory); // Start TTF Shape for Glyph 19 // 000: B0a: move-to p0 diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph05FreeSerifBoldItalic_ae.java b/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph05FreeSerifBoldItalic_ae.java index dd92228ff..8a3594d58 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph05FreeSerifBoldItalic_ae.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/testshapes/Glyph05FreeSerifBoldItalic_ae.java @@ -54,8 +54,8 @@ public class Glyph05FreeSerifBoldItalic_ae extends Shape { } @Override - protected void addShapeToRegion(final GL2ES2 gl, final RegionRenderer renderer) { - final OutlineShape shape = new OutlineShape(renderer.getRenderState().getVertexFactory()); + protected void addShapeToRegion() { + final OutlineShape shape = new OutlineShape(vertexFactory); // Start TTF Shape for Glyph 168 // 000: B0a: move-to p0 diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Button.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Button.java index ff406991b..e108be53e 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Button.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Button.java @@ -78,21 +78,17 @@ public class Button extends RoundButton { public String getLaben() { return label.getText(); } @Override - public void drawShape(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount) { - if( false ) { - // Setup poly offset for z-fighting - gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); - gl.glPolygonOffset(0f, 1f); - super.drawShape(gl, renderer, sampleCount); - gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); - } else { - super.drawShape(gl, renderer, sampleCount); - } + public void draw(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount) { + // Setup poly offset for z-fighting + // gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); + // gl.glPolygonOffset(0f, 1f); + super.draw(gl, renderer, sampleCount); + // gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); } @Override - protected void addShapeToRegion(final GL2ES2 gl, final RegionRenderer renderer) { - final OutlineShape shape = new OutlineShape(renderer.getRenderState().getVertexFactory()); + protected void addShapeToRegion() { + final OutlineShape shape = new OutlineShape(vertexFactory); if(corner == 0.0f) { createSharpOutline(shape, twoPassLabelZOffset); } else { @@ -204,6 +200,6 @@ public class Button extends RoundButton { @Override public String getSubString() { - return super.getSubString()+", "+ label + ", " + "spacing: " + spacingX+"/"+spacingY; + return super.getSubString()+", "+ label + ", " + "spacing["+spacingX+", "+spacingY+"]"; } } diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/CrossHair.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/CrossHair.java index b93639e5d..62c76d2b2 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/CrossHair.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/CrossHair.java @@ -70,8 +70,8 @@ public class CrossHair extends Shape { } @Override - protected void addShapeToRegion(final GL2ES2 gl, final RegionRenderer renderer) { - final OutlineShape shape = new OutlineShape(renderer.getRenderState().getVertexFactory()); + protected void addShapeToRegion() { + final OutlineShape shape = new OutlineShape(vertexFactory); final float lwh = lineWidth/2f; @@ -106,6 +106,6 @@ public class CrossHair extends Shape { @Override public String getSubString() { - return super.getSubString()+", dim "+getWidth() + "x" + getHeight(); + return super.getSubString()+", dim "+getWidth() + " x " + getHeight(); } } diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/GLButton.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/GLButton.java index 77ac99861..792027d7d 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/GLButton.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/GLButton.java @@ -92,7 +92,7 @@ public class GLButton extends TexSeqButton { public final GLOffscreenAutoDrawable.FBO getFBOAutoDrawable() { return fboGLAD; } @Override - public void drawShape(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount) { + public void draw(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount) { final int[/*2*/] surfaceSize = new int[2]; final boolean got_sz = getSurfaceSize(renderer.getMatrix(), renderer.getViewport(), surfaceSize) && 0 < surfaceSize[0] && 0 < surfaceSize[1]; @@ -157,7 +157,7 @@ public class GLButton extends TexSeqButton { fboGLAD.display(); } - super.drawShape(gl, renderer, sampleCount); + super.draw(gl, renderer, sampleCount); if( animateGLEL ) { markStateDirty(); // keep on going diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/ImageButton.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/ImageButton.java index 6ebc0d7ba..957d7141f 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/ImageButton.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/ImageButton.java @@ -60,8 +60,8 @@ public class ImageButton extends TexSeqButton { } @Override - public void drawShape(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount) { - super.drawShape(gl, renderer, sampleCount); + public void draw(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount) { + super.draw(gl, renderer, sampleCount); if( !((ImageSequence)texSeq).getManualStepping() ) { markStateDirty(); // keep on going } diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java index ce6cf9163..937e0454c 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Label.java @@ -129,7 +129,7 @@ public class Label extends Shape { }; @Override - protected void addShapeToRegion(final GL2ES2 gl, final RegionRenderer renderer) { + protected void addShapeToRegion() { tempT1.setToScale(pixelScale, pixelScale); final AABBox fbox = font.processString(shapeVisitor, tempT1, text, tempT2, tempT3); final float[] ctr = box.getCenter(); diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java index 8aa26ffa4..f3090069c 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java @@ -122,7 +122,7 @@ public class MediaButton extends TexSeqButton { volatile boolean resetGL = true; @Override - public void drawShape(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount) { + public void draw(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount) { final GLMediaPlayer mPlayer = (GLMediaPlayer)texSeq; if( resetGL ) { resetGL = false; @@ -133,7 +133,7 @@ public class MediaButton extends TexSeqButton { e.printStackTrace(); } } - super.drawShape(gl, renderer, sampleCount); + super.draw(gl, renderer, sampleCount); markStateDirty(); // keep on going }; diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Rectangle.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Rectangle.java index 6a93bc842..2c9ec53a0 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Rectangle.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/Rectangle.java @@ -70,8 +70,8 @@ public class Rectangle extends Shape { } @Override - protected void addShapeToRegion(final GL2ES2 gl, final RegionRenderer renderer) { - final OutlineShape shape = new OutlineShape(renderer.getRenderState().getVertexFactory()); + protected void addShapeToRegion() { + final OutlineShape shape = new OutlineShape(vertexFactory); final float lwh = lineWidth/2f; @@ -111,6 +111,6 @@ public class Rectangle extends Shape { @Override public String getSubString() { - return super.getSubString()+", dim "+getWidth() + "x" + getHeight(); + return super.getSubString()+", dim "+getWidth() + " x " + getHeight(); } } diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/RoundButton.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/RoundButton.java index 56ab4146b..e8636f41e 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/RoundButton.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/RoundButton.java @@ -102,10 +102,10 @@ public abstract class RoundButton extends Shape { final float minY = 0; final float minZ = zOffset; - shape.addVertex(minX, minY + dC, minZ, true); - shape.addVertex(minX, minY, minZ, false); + shape.addVertex(minX, minY + dC, minZ, true); + shape.addVertex(minX, minY, minZ, false); - shape.addVertex(minX + dC, minY, minZ, true); + shape.addVertex(minX + dC, minY, minZ, true); shape.addVertex(minX + tw - dC, minY, minZ, true); shape.addVertex(minX + tw, minY, minZ, false); @@ -136,6 +136,6 @@ public abstract class RoundButton extends Shape { @Override public String getSubString() { - return super.getSubString()+", dim "+getWidth() + "x" + getHeight() + ", corner " + corner; + return super.getSubString()+", dim "+getWidth() + " x " + getHeight() + ", corner " + corner; } } diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/TexSeqButton.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/TexSeqButton.java index 3ebde276f..365fa8e66 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/TexSeqButton.java +++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/TexSeqButton.java @@ -27,12 +27,10 @@ */ package com.jogamp.graph.ui.gl.shapes; -import com.jogamp.opengl.GL2ES2; import com.jogamp.opengl.GLProfile; import com.jogamp.graph.curve.OutlineShape; import com.jogamp.graph.curve.Region; import com.jogamp.graph.curve.opengl.GLRegion; -import com.jogamp.graph.curve.opengl.RegionRenderer; import com.jogamp.graph.geom.Vertex; import com.jogamp.graph.geom.Vertex.Factory; import com.jogamp.graph.ui.gl.Shape; @@ -65,8 +63,8 @@ public abstract class TexSeqButton extends RoundButton { public final TextureSequence getTextureSequence() { return this.texSeq; } @Override - protected void addShapeToRegion(final GL2ES2 gl, final RegionRenderer renderer) { - final OutlineShape shape = new OutlineShape(renderer.getRenderState().getVertexFactory()); + protected void addShapeToRegion() { + final OutlineShape shape = new OutlineShape(vertexFactory); if(corner == 0.0f) { createSharpOutline(shape, 0f); } else { |