diff options
Diffstat (limited to 'src/demos/com/jogamp/opengl')
16 files changed, 73 insertions, 101 deletions
diff --git a/src/demos/com/jogamp/opengl/demos/graph/GPURegionGLListener00.java b/src/demos/com/jogamp/opengl/demos/graph/GPURegionGLListener00.java index 94dd0ff4d..089731e40 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/GPURegionGLListener00.java +++ b/src/demos/com/jogamp/opengl/demos/graph/GPURegionGLListener00.java @@ -51,13 +51,13 @@ public class GPURegionGLListener00 extends GPURendererListenerBase01 { OutlineShape outlineShape = null; public GPURegionGLListener00 (final int renderModes, final int sampleCount, final boolean debug, final boolean trace) { - super(RegionRenderer.create(null, RegionRenderer.defaultBlendEnable, RegionRenderer.defaultBlendDisable), renderModes, debug, trace); + super(RegionRenderer.create(RegionRenderer.defaultBlendEnable, RegionRenderer.defaultBlendDisable), renderModes, debug, trace); this.getRenderer().getRenderState().setHintMask(RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED); setMatrix(-20, 00, -50, 0f, sampleCount); } private void createTestOutline(final GLProfile glp){ - outlineShape = new OutlineShape(getRenderer().getRenderState().getVertexFactory()); + outlineShape = new OutlineShape(); outlineShape.addVertex(0.0f,-10.0f, true); outlineShape.addVertex(15.0f,-10.0f, true); outlineShape.addVertex(10.0f,5.0f, false); diff --git a/src/demos/com/jogamp/opengl/demos/graph/GPURegionGLListener01.java b/src/demos/com/jogamp/opengl/demos/graph/GPURegionGLListener01.java index 23e1e1b64..bc7aebdec 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/GPURegionGLListener01.java +++ b/src/demos/com/jogamp/opengl/demos/graph/GPURegionGLListener01.java @@ -254,7 +254,7 @@ public class GPURegionGLListener01 extends GPURendererListenerBase01 { gl.glEnable(GL.GL_BLEND); rs.setColorStatic(0.0f, 0.0f, 0.0f, 1.0f); - outlineShape = new OutlineShape(getRenderer().getRenderState().getVertexFactory()); + outlineShape = new OutlineShape(); switch( shape_ctor_mode ) { case 0: createTestOutline00(); diff --git a/src/demos/com/jogamp/opengl/demos/graph/GPURegionGLListener10.java b/src/demos/com/jogamp/opengl/demos/graph/GPURegionGLListener10.java index 966f18972..6024b1410 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/GPURegionGLListener10.java +++ b/src/demos/com/jogamp/opengl/demos/graph/GPURegionGLListener10.java @@ -57,7 +57,7 @@ public class GPURegionGLListener10 extends GPURendererListenerBase01 { } private void createTestOutline(final GLProfile glp){ - OutlineShape shape = new OutlineShape(getRenderer().getRenderState().getVertexFactory()); + OutlineShape shape = new OutlineShape(); outlineShapes.add(shape); shape.addVertex(0.0f,-10.0f,true); shape.addVertex(15.0f,-10.0f, true); @@ -75,7 +75,7 @@ public class GPURegionGLListener10 extends GPURendererListenerBase01 { shape.closeLastOutline(true); /** Same shape as above but without any off-curve vertices */ - shape = new OutlineShape(getRenderer().getRenderState().getVertexFactory()); + shape = new OutlineShape(); outlineShapes.add(shape); final float offset = 30; shape.addVertex(offset+0.0f,-10.0f, true); diff --git a/src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java b/src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java index 43840af97..c0093c6c8 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java +++ b/src/demos/com/jogamp/opengl/demos/graph/TextRendererGLELBase.java @@ -131,7 +131,7 @@ public abstract class TextRendererGLELBase implements GLEventListener { @Override public void init(final GLAutoDrawable drawable) { exclusivePMVMatrix = null == sharedPMVMatrix; - this.renderer = RegionRenderer.create(null, sharedPMVMatrix, enableCallback, disableCallback); + this.renderer = RegionRenderer.create(sharedPMVMatrix, enableCallback, disableCallback); this.getRenderer().getRenderState().setHintMask(RenderState.BITHINT_GLOBAL_DEPTH_TEST_ENABLED); this.textRenderUtil = new TextRegionUtil(renderModes); final GL2ES2 gl = drawable.getGL().getGL2ES2(); diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/GPUUISceneGLListener0A.java b/src/demos/com/jogamp/opengl/demos/graph/ui/GPUUISceneGLListener0A.java index 32a6fb2b3..2fcdeb592 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/GPUUISceneGLListener0A.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/GPUUISceneGLListener0A.java @@ -56,7 +56,6 @@ import com.jogamp.graph.curve.opengl.RenderState; import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontFactory; import com.jogamp.graph.font.FontScale; -import com.jogamp.graph.geom.SVertex; import com.jogamp.graph.ui.gl.Scene; import com.jogamp.graph.ui.gl.Shape; import com.jogamp.graph.ui.gl.Scene.PMVMatrixSetup; @@ -281,7 +280,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { final float diffX = 1.2f * buttonXSize; final float diffY = 1.5f * buttonYSize; - Button button = new Button(SVertex.factory(), renderModes, font, "Next Text", buttonXSize, buttonYSize); + Button button = new Button(renderModes, font, "Next Text", buttonXSize, buttonYSize); button.setName(BUTTON_NEXTTEXT); button.move(xStartLeft, yStartTop-diffY*buttons.size(), 0f); button.addMouseListener(new Shape.MouseGestureAdapter() { @@ -298,7 +297,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { button.addMouseListener(dragZoomRotateListener); buttons.add(button); - button = new Button(SVertex.factory(), renderModes, font, "Show FPS", buttonXSize, buttonYSize); + button = new Button(renderModes, font, "Show FPS", buttonXSize, buttonYSize); button.setName(BUTTON_FPS); button.move(xStartLeft,yStartTop - diffY*buttons.size(), 0f); button.setToggleable(true); @@ -315,7 +314,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { button.addMouseListener(dragZoomRotateListener); buttons.add(button); - button = new Button(SVertex.factory(), renderModes, font, "V-Sync", buttonXSize, buttonYSize); + button = new Button(renderModes, font, "V-Sync", buttonXSize, buttonYSize); button.setName(BUTTON_VSYNC); button.move(xStartLeft,yStartTop - diffY*buttons.size(), 0f); button.setToggleable(true); @@ -339,7 +338,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { button.addMouseListener(dragZoomRotateListener); buttons.add(button); - button = new Button(SVertex.factory(), renderModes, font, "< Tilt >", buttonXSize, buttonYSize); + button = new Button(renderModes, font, "< Tilt >", buttonXSize, buttonYSize); button.move(xStartLeft,yStartTop - diffY*buttons.size(), 0f); button.addMouseListener(new Shape.MouseGestureAdapter() { @Override @@ -358,7 +357,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { buttons.add(button); if( pass2Mode ) { // second column to the left - button = new Button(SVertex.factory(), renderModes, font, "< Samples >", buttonXSize, buttonYSize); + button = new Button(renderModes, font, "< Samples >", buttonXSize, buttonYSize); button.move(xStartLeft,yStartTop - diffY*buttons.size(), 0f); button.addMouseListener(new Shape.MouseGestureAdapter() { @Override @@ -377,7 +376,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { button.addMouseListener(dragZoomRotateListener); buttons.add(button); - button = new Button(SVertex.factory(), renderModes, font, "< Quality >", buttonXSize, buttonYSize); + button = new Button(renderModes, font, "< Quality >", buttonXSize, buttonYSize); button.move(xStartLeft,yStartTop - diffY*buttons.size(), 0f); button.addMouseListener(new Shape.MouseGestureAdapter() { @Override @@ -402,7 +401,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { buttons.add(button); } - button = new Button(SVertex.factory(), renderModes, font, "Quit", buttonXSize, buttonYSize); + button = new Button(renderModes, font, "Quit", buttonXSize, buttonYSize); button.setName(BUTTON_QUIT); button.move(xStartLeft,yStartTop - diffY*buttons.size(), 0f); button.setColor(0.7f, 0.0f, 0.0f, 1.0f); @@ -430,7 +429,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { { final int j = 1; // column int k = 0; // row - button = new Button(SVertex.factory(), renderModes, font, "Y Flip", buttonXSize, buttonYSize); + button = new Button(renderModes, font, "Y Flip", buttonXSize, buttonYSize); button.move(xStartLeft - diffX*j,yStartTop - diffY*k, 0f); button.addMouseListener(new Shape.MouseGestureAdapter() { @Override @@ -441,7 +440,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { buttons.add(button); k++; - button = new Button(SVertex.factory(), renderModes, font, "X Flip", buttonXSize, buttonYSize); + button = new Button(renderModes, font, "X Flip", buttonXSize, buttonYSize); button.move(xStartLeft - diffX*j,yStartTop - diffY*k, 0f); button.addMouseListener(new Shape.MouseGestureAdapter() { @Override @@ -452,7 +451,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { buttons.add(button); k++; - button = new Button(SVertex.factory(), renderModes, font, "< Space >", buttonXSize, buttonYSize); + button = new Button(renderModes, font, "< Space >", buttonXSize, buttonYSize); button.move(xStartLeft - diffX*j,yStartTop - diffY*k, 0f); button.addMouseListener(new Shape.MouseGestureAdapter() { @Override @@ -473,7 +472,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { buttons.add(button); k++; - button = new Button(SVertex.factory(), renderModes, font, "< Corner >", buttonXSize, buttonYSize); + button = new Button(renderModes, font, "< Corner >", buttonXSize, buttonYSize); button.move(xStartLeft - diffX*j,yStartTop - diffY*k, 0f); button.addMouseListener(new Shape.MouseGestureAdapter() { @Override @@ -494,7 +493,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { buttons.add(button); k++; - button = new Button(SVertex.factory(), renderModes, font, "Reset", buttonXSize, buttonYSize); + button = new Button(renderModes, font, "Reset", buttonXSize, buttonYSize); button.move(xStartLeft - diffX*j,yStartTop - diffY*k, 0f); button.addMouseListener(new Shape.MouseGestureAdapter() { @Override @@ -505,7 +504,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { buttons.add(button); k++; - button = new Button(SVertex.factory(), renderModes, font, "Snapshot", buttonXSize, buttonYSize); + button = new Button(renderModes, font, "Snapshot", buttonXSize, buttonYSize); button.move(xStartLeft - diffX*j,yStartTop - diffY*k, 0f); button.addMouseListener(new Shape.MouseGestureAdapter() { @Override @@ -536,8 +535,8 @@ public class GPUUISceneGLListener0A implements GLEventListener { if( true ) { final GLMediaPlayer mPlayer = GLMediaPlayerFactory.createDefault(); mPlayer.setTextureUnit(texUnitMediaPlayer); - final MediaButton mPlayerButton = new MediaButton(scene.getVertexFactory(), renderModes, - button2XSize, button2YSize, mPlayer); + final MediaButton mPlayerButton = new MediaButton(renderModes, button2XSize, + button2YSize, mPlayer); mPlayerButton.setName(BUTTON_MOVIE); mPlayerButton.setVerbose(false); mPlayerButton.addDefaultEventListener(); @@ -556,8 +555,8 @@ public class GPUUISceneGLListener0A implements GLEventListener { } if( true ) { final ImageSequence imgSeq = new ImageSequence(texUnitImageButton, true); - final ImageButton imgButton = new ImageButton(scene.getVertexFactory(), renderModes, - button2XSize, button2YSize, imgSeq); + final ImageButton imgButton = new ImageButton(renderModes, button2XSize, + button2YSize, imgSeq); try { imgSeq.addFrame(gl, GPUUISceneGLListener0A.class, "button-released-145x53.png", TextureIO.PNG); imgSeq.addFrame(gl, GPUUISceneGLListener0A.class, "button-pressed-145x53.png", TextureIO.PNG); @@ -606,9 +605,9 @@ public class GPUUISceneGLListener0A implements GLEventListener { System.err.println("Gears Anim: End"); } }).start(); - final GLButton b = new GLButton(scene.getVertexFactory(), renderModes, - button2XSize, button2YSize, - texUnitGLELButton, gears, false /* useAlpha */); + final GLButton b = new GLButton(renderModes, button2XSize, + button2YSize, texUnitGLELButton, + gears, false /* useAlpha */); b.setName(BUTTON_GLEL); b.setToggleable(true); b.setToggle(false); // toggle == true -> animation @@ -667,7 +666,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { scene.surfaceToPlaneSize(new int[] { 0, 0, drawable.getSurfaceWidth(), drawable.getSurfaceHeight()}, sceneSize); final float modelSizeFixed = fontSizeFixedNorm * sceneSize[1]; - jogampLabel = new Label(scene.getVertexFactory(), renderModes, font, modelSizeFixed, jogamp); + jogampLabel = new Label(renderModes, font, modelSizeFixed, jogamp); jogampLabel.addMouseListener(dragZoomRotateListener); scene.addShape(jogampLabel); jogampLabel.setEnabled(enableOthers); @@ -675,7 +674,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { final float pixelSize10Pt = FontScale.toPixels(fontSizePt, dpiV); final float modelSize10Pt = pixelSize10Pt / drawable.getSurfaceHeight() * sceneSize[1]; System.err.println("10Pt PixelSize: Display "+dpiV+" dpi, fontSize "+fontSizePt+" ppi -> "+pixelSize10Pt+" pixe-size, "+modelSize10Pt+" model-size"); - truePtSizeLabel = new Label(scene.getVertexFactory(), renderModes, font, modelSize10Pt, truePtSize); + truePtSizeLabel = new Label(renderModes, font, modelSize10Pt, truePtSize); scene.addShape(truePtSizeLabel); truePtSizeLabel.setEnabled(enableOthers); truePtSizeLabel.move(0, - 1.5f * jogampLabel.getLineHeight(), 0f); @@ -688,7 +687,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { */ final float pixelSizeFPS = fontSizeFpsNorm * drawable.getSurfaceHeight(); final float modelSizeFPS = pixelSizeFPS / drawable.getSurfaceHeight() * sceneSize[1]; - fpsLabel = new Label(scene.getVertexFactory(), renderModes, fontFPS, modelSizeFPS, "Nothing there yet"); + fpsLabel = new Label(renderModes, fontFPS, modelSizeFPS, "Nothing there yet"); fpsLabel.addMouseListener(dragZoomRotateListener); scene.addShape(fpsLabel); fpsLabel.setEnabled(enableOthers); @@ -849,7 +848,7 @@ public class GPUUISceneGLListener0A implements GLEventListener { final float pixelSizeFixed = fontSizeFixedNorm * scene.getBounds().getHeight(); final float dyTop = scene.getBounds().getHeight() - 2f*jogampLabel.getLineHeight(); final float dxMiddle = scene.getBounds().getWidth() * relMiddle; - labels[currentText] = new Label(scene.getVertexFactory(), renderModes, font, pixelSizeFixed, strings[currentText]); + labels[currentText] = new Label(renderModes, font, pixelSizeFixed, strings[currentText]); labels[currentText].setColor(0.1f, 0.1f, 0.1f, 1.0f); labels[currentText].setEnabled(enableOthers); labels[currentText].move(dxMiddle, diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/GPUUISceneTextAnim01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/GPUUISceneTextAnim01.java index b36bb4635..ea88d17bf 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/GPUUISceneTextAnim01.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/GPUUISceneTextAnim01.java @@ -131,7 +131,7 @@ public class GPUUISceneTextAnim01 implements GLEventListener { private void setupUI(final GLAutoDrawable drawable) { final float pixelSizeFixed = fontSizeFixedPVP * drawable.getSurfaceHeight(); - jogampLabel = new Label(scene.getVertexFactory(), renderModes, font, pixelSizeFixed, jogamp); + jogampLabel = new Label(renderModes, font, pixelSizeFixed, jogamp); jogampLabel.addMouseListener(dragZoomRotateListener); scene.addShape(jogampLabel); jogampLabel.setEnabled(true); @@ -145,7 +145,7 @@ public class GPUUISceneTextAnim01 implements GLEventListener { * [FPS] Display 112.88889 dpi, fontSize 12.0 ppi -> pixelSize 15.679012 */ final float pixelSizeFPS = fontSizeFpsPVP * drawable.getSurfaceHeight(); - fpsLabel = new Label(scene.getVertexFactory(), renderModes, fontFPS, pixelSizeFPS, "Nothing there yet"); + fpsLabel = new Label(renderModes, fontFPS, pixelSizeFPS, "Nothing there yet"); fpsLabel.addMouseListener(dragZoomRotateListener); scene.addShape(fpsLabel); fpsLabel.setEnabled(true); diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo00.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo00.java index d7677ecbd..df0f681ad 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo00.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo00.java @@ -34,7 +34,6 @@ import com.jogamp.graph.curve.Region; import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontFactory; import com.jogamp.graph.font.FontSet; -import com.jogamp.graph.geom.SVertex; import com.jogamp.graph.ui.gl.Scene; import com.jogamp.graph.ui.gl.Shape; import com.jogamp.graph.ui.gl.shapes.Button; @@ -81,7 +80,7 @@ public class UISceneDemo00 { final Font font = FontFactory.get(FontFactory.UBUNTU).get(FontSet.FAMILY_LIGHT, FontSet.STYLE_SERIF); System.err.println("Font: "+font.getFullFamilyName()); - final Shape shape = new Button(SVertex.factory(), renderModes, font, "+", 0.10f, 0.10f/2.5f); // normalized: 1 is 100% surface size (width and/or height) + final Shape shape = new Button(renderModes, font, "+", 0.10f, 0.10f/2.5f); // normalized: 1 is 100% surface size (width and/or height) System.err.println("Shape bounds "+shape.getBounds(glp)); final Scene scene = new Scene(); diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo01.java index 6368387bf..436c0d847 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo01.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo01.java @@ -34,7 +34,6 @@ import com.jogamp.graph.curve.Region; import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontFactory; import com.jogamp.graph.font.FontSet; -import com.jogamp.graph.geom.SVertex; import com.jogamp.graph.ui.gl.Scene; import com.jogamp.graph.ui.gl.Scene.PMVMatrixSetup; import com.jogamp.graph.ui.gl.Shape; @@ -241,8 +240,8 @@ public class UISceneDemo01 { } }).start(); final int texUnit = 1; - final GLButton b = new GLButton(SVertex.factory(), renderModes, - sw, sh, texUnit, gears, false /* useAlpha */); + final GLButton b = new GLButton(renderModes, sw, + sh, texUnit, gears, false /* useAlpha */); b.setToggleable(true); b.setToggle(true); // toggle == true -> animation b.setAnimate(true); diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo10.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo10.java index 4ba64a4b5..b2fcf6de0 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo10.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UISceneDemo10.java @@ -37,7 +37,6 @@ import com.jogamp.graph.curve.Region; import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontFactory; import com.jogamp.graph.font.FontSet; -import com.jogamp.graph.geom.SVertex; import com.jogamp.graph.ui.gl.Scene; import com.jogamp.graph.ui.gl.Shape; import com.jogamp.graph.ui.gl.shapes.Button; @@ -245,7 +244,7 @@ public class UISceneDemo10 { } final GLMediaPlayer mPlayer = GLMediaPlayerFactory.createDefault(); // mPlayer.setTextureUnit(texUnitMediaPlayer); - final MediaButton b = new MediaButton(SVertex.factory(), renderModes, sw, sh, mPlayer); + final MediaButton b = new MediaButton(renderModes, sw, sh, mPlayer); b.setVerbose(false); b.addDefaultEventListener(); b.setToggleable(true); @@ -268,8 +267,8 @@ public class UISceneDemo10 { glel = gears; } final int texUnit = 1; - final GLButton b = new GLButton(SVertex.factory(), renderModes, - sw, sh, texUnit, glel, false /* useAlpha */); + final GLButton b = new GLButton(renderModes, sw, + sh, texUnit, glel, false /* useAlpha */); b.setToggleable(true); b.setToggle(true); // toggle == true -> animation b.setAnimate(true); @@ -280,11 +279,11 @@ public class UISceneDemo10 { } } ); return b; } else if( true ){ - final Button b = new Button(SVertex.factory(), renderModes, font, "+", sw, sh); + final Button b = new Button(renderModes, font, "+", sw, sh); b.setCorner(0.0f); return b; } else { - final CrossHair b = new CrossHair(SVertex.factory(), renderModes, sw, sw, 1f/100f); + final CrossHair b = new CrossHair(renderModes, sw, sw, 1f/100f); return b; } } diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java index b1eca9b20..5501bdf7e 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeDemo01.java @@ -52,7 +52,6 @@ import com.jogamp.graph.curve.opengl.TextRegionUtil; import com.jogamp.graph.font.Font; import com.jogamp.graph.font.FontFactory; import com.jogamp.graph.font.FontSet; -import com.jogamp.graph.geom.SVertex; import com.jogamp.graph.geom.plane.AffineTransform; import com.jogamp.graph.ui.gl.Shape; import com.jogamp.graph.ui.gl.shapes.Button; @@ -182,7 +181,7 @@ public class UIShapeDemo01 implements GLEventListener { final float sz1_w = 1/8f; final float sz2 = 1/20f; - button = new Button(SVertex.factory(), renderModes, font, "Click me!", sz1_w, sz1_w/2f); + button = new Button(renderModes, font, "Click me!", sz1_w, sz1_w/2f); button.setLabelColor(0.0f,0.0f,0.0f); /** Button defaults ! button.setLabelColor(1.0f,1.0f,1.0f); @@ -191,7 +190,7 @@ public class UIShapeDemo01 implements GLEventListener { button.setSpacing(2.0f); */ System.err.println(button); - crossHair = new CrossHair(SVertex.factory(), renderModes, sz2, sz2, 1/1000f); + crossHair = new CrossHair(renderModes, sz2, sz2, 1/1000f); crossHair.setColor(0f,0f,1f,1f); crossHair.setEnabled(true); } diff --git a/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java b/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java index 816c9929d..5d380b396 100644 --- a/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java +++ b/src/demos/com/jogamp/opengl/demos/graph/ui/UITypeDemo01.java @@ -30,35 +30,15 @@ package com.jogamp.opengl.demos.graph.ui; import java.io.File; import java.io.IOException; -import com.jogamp.opengl.FPSCounter; -import com.jogamp.opengl.GL; -import com.jogamp.opengl.GL2ES2; -import com.jogamp.opengl.GLAnimatorControl; -import com.jogamp.opengl.GLAutoDrawable; -import com.jogamp.opengl.GLCapabilities; -import com.jogamp.opengl.GLEventListener; -import com.jogamp.opengl.GLException; -import com.jogamp.opengl.GLPipelineFactory; -import com.jogamp.opengl.GLProfile; -import com.jogamp.opengl.GLRunnable; -import com.jogamp.opengl.demos.graph.MSAATool; -import com.jogamp.opengl.demos.graph.ui.testshapes.Glyph03FreeMonoRegular_M; -import com.jogamp.opengl.demos.graph.ui.testshapes.Glyph04FreeSans_0; -import com.jogamp.opengl.demos.graph.ui.testshapes.Glyph05FreeSerifBoldItalic_ae; -import com.jogamp.opengl.demos.util.MiscUtils; -import com.jogamp.opengl.fixedfunc.GLMatrixFunc; -import com.jogamp.opengl.math.FloatUtil; -import com.jogamp.opengl.math.geom.AABBox; import com.jogamp.common.util.InterruptSource; import com.jogamp.graph.curve.Region; import com.jogamp.graph.curve.opengl.GLRegion; import com.jogamp.graph.curve.opengl.RegionRenderer; import com.jogamp.graph.curve.opengl.TextRegionUtil; import com.jogamp.graph.font.Font; +import com.jogamp.graph.font.Font.Glyph; import com.jogamp.graph.font.FontFactory; import com.jogamp.graph.font.FontSet; -import com.jogamp.graph.font.Font.Glyph; -import com.jogamp.graph.geom.SVertex; import com.jogamp.graph.geom.plane.AffineTransform; import com.jogamp.graph.ui.gl.Shape; import com.jogamp.graph.ui.gl.shapes.CrossHair; @@ -72,6 +52,23 @@ import com.jogamp.newt.event.MouseListener; import com.jogamp.newt.event.WindowAdapter; import com.jogamp.newt.event.WindowEvent; import com.jogamp.newt.opengl.GLWindow; +import com.jogamp.opengl.FPSCounter; +import com.jogamp.opengl.GL; +import com.jogamp.opengl.GL2ES2; +import com.jogamp.opengl.GLAnimatorControl; +import com.jogamp.opengl.GLAutoDrawable; +import com.jogamp.opengl.GLCapabilities; +import com.jogamp.opengl.GLEventListener; +import com.jogamp.opengl.GLException; +import com.jogamp.opengl.GLPipelineFactory; +import com.jogamp.opengl.GLProfile; +import com.jogamp.opengl.GLRunnable; +import com.jogamp.opengl.demos.graph.MSAATool; +import com.jogamp.opengl.demos.graph.ui.testshapes.Glyph03FreeMonoRegular_M; +import com.jogamp.opengl.demos.util.MiscUtils; +import com.jogamp.opengl.fixedfunc.GLMatrixFunc; +import com.jogamp.opengl.math.FloatUtil; +import com.jogamp.opengl.math.geom.AABBox; import com.jogamp.opengl.util.Animator; import com.jogamp.opengl.util.GLReadBufferUtil; import com.jogamp.opengl.util.PMVMatrix; @@ -201,18 +198,18 @@ public class UITypeDemo01 implements GLEventListener { this.trace = trace; this.screenshot = new GLReadBufferUtil(false, false); - crossHair = new CrossHair(SVertex.factory(), renderModes, 1/20f, 1/20f, 1/1000f); + crossHair = new CrossHair(renderModes, 1/20f, 1/20f, 1/1000f); crossHair.setColor(0f,0f,1f,1f); crossHair.setEnabled(true); if (false ) { - final Rectangle o = new Rectangle(SVertex.factory(), renderModes, 1/10f, 1/20f, 1/1000f); + final Rectangle o = new Rectangle(renderModes, 1/10f, 1/20f, 1/1000f); o.move(o.getWidth(), -o.getHeight(), 0f); testObj = o; } else { final float scale = 0.15312886f; final float size_xz = 0.541f; - final Shape o = new Glyph03FreeMonoRegular_M(SVertex.factory(), renderModes); + final Shape o = new Glyph03FreeMonoRegular_M(renderModes); o.scale(scale, scale, 1f); // o.translate(size_xz, -size_xz, 0f); testObj = o; 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 2725ab58e..e2fef0286 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 @@ -27,11 +27,7 @@ */ package com.jogamp.opengl.demos.graph.ui.testshapes; -import com.jogamp.opengl.GL2ES2; import com.jogamp.graph.curve.OutlineShape; -import com.jogamp.graph.curve.opengl.RegionRenderer; -import com.jogamp.graph.geom.Vertex; -import com.jogamp.graph.geom.Vertex.Factory; import com.jogamp.graph.geom.plane.Winding; import com.jogamp.graph.ui.gl.Shape; @@ -42,8 +38,8 @@ import com.jogamp.graph.ui.gl.Shape; */ public class Glyph01UbuntuLight_o extends Shape { - public Glyph01UbuntuLight_o(final Factory<? extends Vertex> factory, final int renderModes) { - super(factory, renderModes); + public Glyph01UbuntuLight_o(final int renderModes) { + super(renderModes); } @SuppressWarnings("unused") 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 90bdcdcef..0661f5c91 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 @@ -27,11 +27,7 @@ */ package com.jogamp.opengl.demos.graph.ui.testshapes; -import com.jogamp.opengl.GL2ES2; import com.jogamp.graph.curve.OutlineShape; -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; /** @@ -41,8 +37,8 @@ import com.jogamp.graph.ui.gl.Shape; */ public class Glyph02UbuntuLight_ae extends Shape { - public Glyph02UbuntuLight_ae(final Factory<? extends Vertex> factory, final int renderModes) { - super(factory, renderModes); + public Glyph02UbuntuLight_ae(final int renderModes) { + super(renderModes); } @SuppressWarnings("unused") 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 7c53791a7..f53651536 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 @@ -27,11 +27,7 @@ */ package com.jogamp.opengl.demos.graph.ui.testshapes; -import com.jogamp.opengl.GL2ES2; import com.jogamp.graph.curve.OutlineShape; -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; /** @@ -41,8 +37,8 @@ import com.jogamp.graph.ui.gl.Shape; */ public class Glyph03FreeMonoRegular_M extends Shape { - public Glyph03FreeMonoRegular_M(final Factory<? extends Vertex> factory, final int renderModes) { - super(factory, renderModes); + public Glyph03FreeMonoRegular_M(final int renderModes) { + super(renderModes); } @SuppressWarnings("unused") 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 24474497c..f347c464c 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 @@ -27,11 +27,7 @@ */ package com.jogamp.opengl.demos.graph.ui.testshapes; -import com.jogamp.opengl.GL2ES2; import com.jogamp.graph.curve.OutlineShape; -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; /** @@ -41,8 +37,8 @@ import com.jogamp.graph.ui.gl.Shape; */ public class Glyph04FreeSans_0 extends Shape { - public Glyph04FreeSans_0(final Factory<? extends Vertex> factory, final int renderModes) { - super(factory, renderModes); + public Glyph04FreeSans_0(final int renderModes) { + super(renderModes); } @Override 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 26c519767..d49ae305b 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 @@ -27,11 +27,7 @@ */ package com.jogamp.opengl.demos.graph.ui.testshapes; -import com.jogamp.opengl.GL2ES2; import com.jogamp.graph.curve.OutlineShape; -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; /** @@ -41,8 +37,8 @@ import com.jogamp.graph.ui.gl.Shape; */ public class Glyph05FreeSerifBoldItalic_ae extends Shape { - public Glyph05FreeSerifBoldItalic_ae(final Factory<? extends Vertex> factory, final int renderModes) { - super(factory, renderModes); + public Glyph05FreeSerifBoldItalic_ae(final int renderModes) { + super(renderModes); } @Override |