summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2011-04-08 21:35:34 +0200
committerSven Gothel <sgothel@jausoft.com>2011-04-08 21:35:34 +0200
commit324b85b0cc688f85a91e84b0b6d6a0378a79bea3 (patch)
treea5acbe1630d879e80ec66c6c3a72623431c57632 /src/test
parente104e42ba9ecda8c4094bf4b183105a6ab719da5 (diff)
Fix TAB: Replace all TAB with 4 spaces
Diffstat (limited to 'src/test')
-rw-r--r--src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java6
-rw-r--r--src/test/com/jogamp/opengl/test/bugs/Issue326Test1.java20
-rw-r--r--src/test/com/jogamp/opengl/test/bugs/Issue326Test2.java14
-rw-r--r--src/test/com/jogamp/opengl/test/bugs/Issue344Base.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/TestRegionRendererNEWT01.java176
-rwxr-xr-xsrc/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java184
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java116
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener02.java24
-rwxr-xr-xsrc/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo01.java12
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo02.java14
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPURendererListenerBase01.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextGLListener0A.java32
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo01.java48
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo02.java32
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/MSAATool.java66
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/ui/RIButton.java304
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIControl.java76
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIGLListener01.java64
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIListenerBase01.java74
-rwxr-xr-xsrc/test/com/jogamp/opengl/test/junit/graph/demos/ui/UINewtDemo01.java10
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java36
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererGLEventListener01.java36
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererTraceGL2Mock01.java140
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWTBug450.java30
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java2
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java6
-rw-r--r--src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java6
27 files changed, 768 insertions, 768 deletions
diff --git a/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java b/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java
index ceee2c876..04ce155e6 100644
--- a/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java
+++ b/src/test/com/jogamp/opengl/test/bugs/Bug427GLJPanelTest1.java
@@ -66,7 +66,7 @@ public class Bug427GLJPanelTest1 extends JFrame implements GLEventListener {
public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {
}
-
- public void dispose(GLAutoDrawable drawable) {
- }
+
+ public void dispose(GLAutoDrawable drawable) {
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/bugs/Issue326Test1.java b/src/test/com/jogamp/opengl/test/bugs/Issue326Test1.java
index 4c2b54755..833f34153 100644
--- a/src/test/com/jogamp/opengl/test/bugs/Issue326Test1.java
+++ b/src/test/com/jogamp/opengl/test/bugs/Issue326Test1.java
@@ -32,19 +32,19 @@ public class Issue326Test1 extends Frame implements GLEventListener {
int width, height;
public static void main(String[] args) {
- new Issue326Test1();
+ new Issue326Test1();
}
-
+
GLCanvas canvas;
TextRenderer tr ;
-
+
public Issue326Test1() {
super("TextTest");
this.setSize(800, 800);
canvas = new GLCanvas();
canvas.addGLEventListener(this);
add(canvas);
-
+
setVisible(true);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
@@ -57,20 +57,20 @@ public class Issue326Test1 extends Frame implements GLEventListener {
GL2 gl = drawable.getGL().getGL2();
gl.glClearColor(0, 0, 0, 0);
gl.glClear(GL2.GL_COLOR_BUFFER_BIT|GL2.GL_DEPTH_BUFFER_BIT);
-
-
+
+
gl.glMatrixMode(GL2.GL_PROJECTION);
- gl.glLoadIdentity();
+ gl.glLoadIdentity();
//new GLU().gluPerspective(45f, (float)width/(float)height, 0.1f, 1000f);
gl.glOrtho(0.0, 800, 0.0, 800, -100.0, 100.0);
gl.glMatrixMode(GL2.GL_MODELVIEW);
gl.glLoadIdentity();
-
+
tr.beginRendering(800,800);
tr.draw( "die Marktwirtschaft. Da regelt sich � angeblich", 16, 32);
tr.draw( "Hello World! This text is scrambled", 16, 16);
tr.endRendering();
-
+
}
public void init(GLAutoDrawable arg0) {
@@ -90,5 +90,5 @@ public class Issue326Test1 extends Frame implements GLEventListener {
gl.glLoadIdentity();
}
- public void dispose(GLAutoDrawable drawable) {}
+ public void dispose(GLAutoDrawable drawable) {}
}
diff --git a/src/test/com/jogamp/opengl/test/bugs/Issue326Test2.java b/src/test/com/jogamp/opengl/test/bugs/Issue326Test2.java
index 8960c9658..ac5d819b3 100644
--- a/src/test/com/jogamp/opengl/test/bugs/Issue326Test2.java
+++ b/src/test/com/jogamp/opengl/test/bugs/Issue326Test2.java
@@ -21,19 +21,19 @@ public class Issue326Test2 extends Frame implements GLEventListener {
int width, height;
public static void main(String[] args) {
- new Issue326Test2();
+ new Issue326Test2();
}
-
+
GLCanvas canvas;
TextRenderer tr;
-
+
public Issue326Test2() {
super("");
this.setSize(800, 800);
canvas = new GLCanvas();
canvas.addGLEventListener(this);
add(canvas);
-
+
setVisible(true);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
@@ -46,12 +46,12 @@ public class Issue326Test2 extends Frame implements GLEventListener {
GL2 gl = drawable.getGL().getGL2();
gl.glClearColor(0, 0, 0, 0);
gl.glClear(GL2.GL_COLOR_BUFFER_BIT|GL2.GL_DEPTH_BUFFER_BIT);
-
+
tr.beginRendering(drawable.getWidth(), drawable.getHeight());
tr.draw("LA CLAPI\u00c8RE \nAlt: 1100-1700m \nGlissement de terrain majeur", 16, 80);
tr.draw("dans la haute Tin\u00e9e, sur un flanc du Parc du Mercantour.", 16, 16);
tr.endRendering();
-
+
}
public void init(GLAutoDrawable arg0) {
@@ -68,6 +68,6 @@ public class Issue326Test2 extends Frame implements GLEventListener {
gl.glLoadIdentity();
}
- public void dispose(GLAutoDrawable drawable) {}
+ public void dispose(GLAutoDrawable drawable) {}
}
diff --git a/src/test/com/jogamp/opengl/test/bugs/Issue344Base.java b/src/test/com/jogamp/opengl/test/bugs/Issue344Base.java
index c3401fec3..9b0a4c6a0 100644
--- a/src/test/com/jogamp/opengl/test/bugs/Issue344Base.java
+++ b/src/test/com/jogamp/opengl/test/bugs/Issue344Base.java
@@ -91,7 +91,7 @@ public abstract class Issue344Base implements GLEventListener
h / -2.0f * textScaleFactor,
3f,
textScaleFactor);
-
+
renderer.end3DRendering();
}
@@ -103,5 +103,5 @@ public abstract class Issue344Base implements GLEventListener
glu.gluPerspective(15, (float) width / (float) height, 5, 15);
}
- public void dispose(GLAutoDrawable drawable) {}
+ public void dispose(GLAutoDrawable drawable) {}
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestRegionRendererNEWT01.java b/src/test/com/jogamp/opengl/test/junit/graph/TestRegionRendererNEWT01.java
index bb7af25ae..190ddc9c6 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestRegionRendererNEWT01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestRegionRendererNEWT01.java
@@ -29,41 +29,41 @@ public class TestRegionRendererNEWT01 extends UITestCase {
org.junit.runner.JUnitCore.main(tstname);
}
- @BeforeClass
- public static void initClass() {
- GLProfile.initSingleton(true);
- NativeWindowFactory.initSingleton(true);
- }
-
- static void destroyWindow(GLWindow window) {
- if(null!=window) {
- window.destroy();
- }
- }
-
- static GLWindow createWindow(String title, GLCapabilitiesImmutable caps, int width, int height) {
- Assert.assertNotNull(caps);
-
- GLWindow window = GLWindow.create(caps);
- window.setSize(width, height);
- window.setPosition(10, 10);
- window.setTitle(title);
- Assert.assertNotNull(window);
- window.setVisible(true);
-
- return window;
- }
-
- @Test
- public void testRegionRendererR2T01() throws InterruptedException {
+ @BeforeClass
+ public static void initClass() {
+ GLProfile.initSingleton(true);
+ NativeWindowFactory.initSingleton(true);
+ }
+
+ static void destroyWindow(GLWindow window) {
+ if(null!=window) {
+ window.destroy();
+ }
+ }
+
+ static GLWindow createWindow(String title, GLCapabilitiesImmutable caps, int width, int height) {
+ Assert.assertNotNull(caps);
+
+ GLWindow window = GLWindow.create(caps);
+ window.setSize(width, height);
+ window.setPosition(10, 10);
+ window.setTitle(title);
+ Assert.assertNotNull(window);
+ window.setVisible(true);
+
+ return window;
+ }
+
+ @Test
+ public void testRegionRendererR2T01() throws InterruptedException {
GLProfile glp = GLProfile.getGL2ES2();
-
- GLCapabilities caps = new GLCapabilities(glp);
- //caps.setOnscreen(false);
- caps.setAlphaBits(4);
+
+ GLCapabilities caps = new GLCapabilities(glp);
+ //caps.setOnscreen(false);
+ caps.setAlphaBits(4);
- GLWindow window = createWindow("shape-r2t1-msaa0", caps, 800,400);
-
+ GLWindow window = createWindow("shape-r2t1-msaa0", caps, 800,400);
+
GPURegionGLListener02 demo02Listener = new GPURegionGLListener02 (Region.TWO_PASS, 1140, false, false);
demo02Listener.attachInputListenerTo(window);
window.addGLEventListener(demo02Listener);
@@ -72,35 +72,35 @@ public class TestRegionRendererNEWT01 extends UITestCase {
window.addGLEventListener(listener);
listener.setTech(-20, 00, 0f, -300, 400);
- window.display();
-
+ window.display();
+
listener.setTech(-20, 00, 0f, -150, 800);
window.display();
-
+
listener.setTech(-20, 00, 0f, -50, 1000);
window.display();
- destroyWindow(window);
- }
-
- @Test
- public void testRegionRendererMSAA01() throws InterruptedException {
- GLProfile glp = GLProfile.get(GLProfile.GL2ES2);
- GLCapabilities caps = new GLCapabilities(glp);
- // caps.setOnscreen(false);
- caps.setAlphaBits(4);
- caps.setSampleBuffers(true);
- caps.setNumSamples(4);
-
- GLWindow window = createWindow("shape-r2t0-msaa1", caps, 800, 400);
-
+ destroyWindow(window);
+ }
+
+ @Test
+ public void testRegionRendererMSAA01() throws InterruptedException {
+ GLProfile glp = GLProfile.get(GLProfile.GL2ES2);
+ GLCapabilities caps = new GLCapabilities(glp);
+ // caps.setOnscreen(false);
+ caps.setAlphaBits(4);
+ caps.setSampleBuffers(true);
+ caps.setNumSamples(4);
+
+ GLWindow window = createWindow("shape-r2t0-msaa1", caps, 800, 400);
+
GPURegionGLListener01 demo01Listener = new GPURegionGLListener01 (Region.SINGLE_PASS, 0, false, false);
demo01Listener.attachInputListenerTo(window);
window.addGLEventListener(demo01Listener);
-
- RegionGLListener listener = new RegionGLListener(demo01Listener, window.getTitle(), "GPURegion01");
- window.addGLEventListener(listener);
-
+
+ RegionGLListener listener = new RegionGLListener(demo01Listener, window.getTitle(), "GPURegion01");
+ window.addGLEventListener(listener);
+
listener.setTech(-20, 00, 0f, -300, 400);
window.display();
@@ -110,39 +110,39 @@ public class TestRegionRendererNEWT01 extends UITestCase {
listener.setTech(-20, 00, 0f, -50, 1000);
window.display();
- destroyWindow(window);
- }
-
- private class RegionGLListener implements GLEventListener {
- String winTitle;
- String name;
- GPURegionRendererListenerBase01 impl;
-
- public RegionGLListener(GPURegionRendererListenerBase01 impl, String title, String name) {
- this.impl = impl;
- this.winTitle = title;
- this.name = name;
- }
-
- public void setTech(float xt, float yt, float angle, int zoom, int fboSize){
- impl.setMatrix(xt, yt, angle, zoom, fboSize);
- }
-
- public void init(GLAutoDrawable drawable) {
- impl.init(drawable);
- }
-
- public void display(GLAutoDrawable drawable) {
- impl.display(drawable);
-
- try {
- impl.printScreen(drawable, "./", winTitle, name, false);
- } catch (GLException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
+ destroyWindow(window);
+ }
+
+ private class RegionGLListener implements GLEventListener {
+ String winTitle;
+ String name;
+ GPURegionRendererListenerBase01 impl;
+
+ public RegionGLListener(GPURegionRendererListenerBase01 impl, String title, String name) {
+ this.impl = impl;
+ this.winTitle = title;
+ this.name = name;
+ }
+
+ public void setTech(float xt, float yt, float angle, int zoom, int fboSize){
+ impl.setMatrix(xt, yt, angle, zoom, fboSize);
+ }
+
+ public void init(GLAutoDrawable drawable) {
+ impl.init(drawable);
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ impl.display(drawable);
+
+ try {
+ impl.printScreen(drawable, "./", winTitle, name, false);
+ } catch (GLException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
public void dispose(GLAutoDrawable drawable) {
impl.dispose(drawable);
@@ -153,5 +153,5 @@ public class TestRegionRendererNEWT01 extends UITestCase {
impl.reshape(drawable, x, y, width, height);
}
- }
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
index 92b9323e2..1ef796265 100755
--- a/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/TestTextRendererNEWT01.java
@@ -33,51 +33,51 @@ public class TestTextRendererNEWT01 extends UITestCase {
org.junit.runner.JUnitCore.main(tstname);
}
- @BeforeClass
- public static void initClass() {
- GLProfile.initSingleton(true);
- NativeWindowFactory.initSingleton(true);
- }
-
- static void destroyWindow(GLWindow window) {
- if(null!=window) {
- window.destroy();
- }
- }
-
- static GLWindow createWindow(String title, GLCapabilitiesImmutable caps, int width, int height) {
- Assert.assertNotNull(caps);
-
- GLWindow window = GLWindow.create(caps);
- window.setSize(width, height);
- window.setPosition(10, 10);
- window.setTitle(title);
- Assert.assertNotNull(window);
- window.setVisible(true);
-
- return window;
- }
-
- @Test
- public void testTextRendererR2T01() throws InterruptedException {
+ @BeforeClass
+ public static void initClass() {
+ GLProfile.initSingleton(true);
+ NativeWindowFactory.initSingleton(true);
+ }
+
+ static void destroyWindow(GLWindow window) {
+ if(null!=window) {
+ window.destroy();
+ }
+ }
+
+ static GLWindow createWindow(String title, GLCapabilitiesImmutable caps, int width, int height) {
+ Assert.assertNotNull(caps);
+
+ GLWindow window = GLWindow.create(caps);
+ window.setSize(width, height);
+ window.setPosition(10, 10);
+ window.setTitle(title);
+ Assert.assertNotNull(window);
+ window.setVisible(true);
+
+ return window;
+ }
+
+ @Test
+ public void testTextRendererR2T01() throws InterruptedException {
GLProfile glp = GLProfile.getGL2ES2();
-
- GLCapabilities caps = new GLCapabilities(glp);
- caps.setAlphaBits(4);
+
+ GLCapabilities caps = new GLCapabilities(glp);
+ caps.setAlphaBits(4);
- GLWindow window = createWindow("text-r2t1-msaa0", caps, 800,400);
- TextGLListener textGLListener = new TextGLListener(Region.TWO_PASS, DEBUG, TRACE);
+ GLWindow window = createWindow("text-r2t1-msaa0", caps, 800,400);
+ TextGLListener textGLListener = new TextGLListener(Region.TWO_PASS, DEBUG, TRACE);
textGLListener.attachInputListenerTo(window);
window.addGLEventListener(textGLListener);
textGLListener.setFontSet(FontFactory.UBUNTU, 0, 0);
textGLListener.setTech(-400, -30, 0f, -1000, window.getWidth()*2);
- window.display();
-
- textGLListener.setTech(-400, -30, 0, -380, window.getWidth()*3);
window.display();
-
- textGLListener.setTech(-400, -20, 0, -80, window.getWidth()*4);
+
+ textGLListener.setTech(-400, -30, 0, -380, window.getWidth()*3);
+ window.display();
+
+ textGLListener.setTech(-400, -20, 0, -80, window.getWidth()*4);
window.display();
textGLListener.setFontSet(FontFactory.JAVA, 0, 0);
@@ -90,19 +90,19 @@ public class TestTextRendererNEWT01 extends UITestCase {
textGLListener.setTech(-400, -20, 0, -80, window.getWidth()*4);
window.display();
- destroyWindow(window);
- }
-
- @Test
- public void testTextRendererMSAA01() throws InterruptedException {
- GLProfile glp = GLProfile.get(GLProfile.GL2ES2);
- GLCapabilities caps = new GLCapabilities(glp);
- caps.setAlphaBits(4);
- caps.setSampleBuffers(true);
- caps.setNumSamples(4);
-
- GLWindow window = createWindow("text-r2t0-msaa1", caps, 800, 400);
- TextGLListener textGLListener = new TextGLListener(Region.SINGLE_PASS, DEBUG, TRACE);
+ destroyWindow(window);
+ }
+
+ @Test
+ public void testTextRendererMSAA01() throws InterruptedException {
+ GLProfile glp = GLProfile.get(GLProfile.GL2ES2);
+ GLCapabilities caps = new GLCapabilities(glp);
+ caps.setAlphaBits(4);
+ caps.setSampleBuffers(true);
+ caps.setNumSamples(4);
+
+ GLWindow window = createWindow("text-r2t0-msaa1", caps, 800, 400);
+ TextGLListener textGLListener = new TextGLListener(Region.SINGLE_PASS, DEBUG, TRACE);
textGLListener.attachInputListenerTo(window);
window.addGLEventListener(textGLListener);
@@ -126,48 +126,48 @@ public class TestTextRendererNEWT01 extends UITestCase {
textGLListener.setTech(-400, -20, 0, -80, 0);
window.display();
- destroyWindow(window);
- }
-
- private class TextGLListener extends GPUTextRendererListenerBase01 {
- String winTitle;
-
- public TextGLListener(int type, boolean debug, boolean trace) {
- super(SVertex.factory(), type, debug, trace);
- }
-
- public void attachInputListenerTo(GLWindow window) {
- super.attachInputListenerTo(window);
- winTitle = window.getTitle();
- }
- public void setTech(float xt, float yt, float angle, int zoom, int fboSize){
- setMatrix(xt, yt, angle, zoom, fboSize);
- }
-
- public void init(GLAutoDrawable drawable) {
+ destroyWindow(window);
+ }
+
+ private class TextGLListener extends GPUTextRendererListenerBase01 {
+ String winTitle;
+
+ public TextGLListener(int type, boolean debug, boolean trace) {
+ super(SVertex.factory(), type, debug, trace);
+ }
+
+ public void attachInputListenerTo(GLWindow window) {
+ super.attachInputListenerTo(window);
+ winTitle = window.getTitle();
+ }
+ public void setTech(float xt, float yt, float angle, int zoom, int fboSize){
+ setMatrix(xt, yt, angle, zoom, fboSize);
+ }
+
+ public void init(GLAutoDrawable drawable) {
super.init(drawable);
- GL2ES2 gl = drawable.getGL().getGL2ES2();
- gl.setSwapInterval(1);
- gl.glEnable(GL.GL_DEPTH_TEST);
-
- final TextRenderer textRenderer = (TextRenderer) getRenderer();
-
- textRenderer.init(gl);
- textRenderer.setAlpha(gl, 1.0f);
- textRenderer.setColor(gl, 0.0f, 0.0f, 0.0f);
- }
-
- public void display(GLAutoDrawable drawable) {
- super.display(drawable);
-
- try {
- printScreen(drawable, "./", winTitle, false);
- } catch (GLException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
+ GL2ES2 gl = drawable.getGL().getGL2ES2();
+ gl.setSwapInterval(1);
+ gl.glEnable(GL.GL_DEPTH_TEST);
+
+ final TextRenderer textRenderer = (TextRenderer) getRenderer();
+
+ textRenderer.init(gl);
+ textRenderer.setAlpha(gl, 1.0f);
+ textRenderer.setColor(gl, 0.0f, 0.0f, 0.0f);
+ }
+
+ public void display(GLAutoDrawable drawable) {
+ super.display(drawable);
+
+ try {
+ printScreen(drawable, "./", winTitle, false);
+ } catch (GLException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java
index bf4bfab71..7975f1897 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener01.java
@@ -43,60 +43,60 @@ import com.jogamp.graph.geom.opengl.SVertex;
*
*/
public class GPURegionGLListener01 extends GPURegionRendererListenerBase01 {
- OutlineShape outlineShape = null;
-
- public GPURegionGLListener01 (int numpass, int fbosize, boolean debug, boolean trace) {
+ OutlineShape outlineShape = null;
+
+ public GPURegionGLListener01 (int numpass, int fbosize, boolean debug, boolean trace) {
super(SVertex.factory(), numpass, debug, trace);
setMatrix(-20, 00, 0f, -50, fbosize);
- }
-
- private void createTestOutline(){
- float offset = 0;
- outlineShape = new OutlineShape(getRenderer().getFactory());
- outlineShape.addVertex(0.0f,-10.0f, true);
- outlineShape.addVertex(15.0f,-10.0f, true);
- outlineShape.addVertex(10.0f,5.0f, false);
- outlineShape.addVertex(15.0f,10.0f, true);
- outlineShape.addVertex(6.0f,15.0f, false);
- outlineShape.addVertex(5.0f,8.0f, false);
- outlineShape.addVertex(0.0f,10.0f,true);
- outlineShape.closeLastOutline();
- outlineShape.addEmptyOutline();
- outlineShape.addVertex(5.0f,-5.0f,true);
- outlineShape.addVertex(10.0f,-5.0f, false);
- outlineShape.addVertex(10.0f,0.0f, true);
- outlineShape.addVertex(5.0f,0.0f, false);
- outlineShape.closeLastOutline();
-
- /** Same shape as above but without any off-curve vertices */
- outlineShape.addEmptyOutline();
- offset = 30;
- outlineShape.addVertex(offset+0.0f,-10.0f, true);
- outlineShape.addVertex(offset+17.0f,-10.0f, true);
- outlineShape.addVertex(offset+11.0f,5.0f, true);
- outlineShape.addVertex(offset+16.0f,10.0f, true);
- outlineShape.addVertex(offset+7.0f,15.0f, true);
- outlineShape.addVertex(offset+6.0f,8.0f, true);
- outlineShape.addVertex(offset+0.0f,10.0f, true);
- outlineShape.closeLastOutline();
- outlineShape.addEmptyOutline();
- outlineShape.addVertex(offset+5.0f,0.0f, true);
- outlineShape.addVertex(offset+5.0f,-5.0f, true);
- outlineShape.addVertex(offset+10.0f,-5.0f, true);
- outlineShape.addVertex(offset+10.0f,0.0f, true);
- outlineShape.closeLastOutline();
- }
+ }
+
+ private void createTestOutline(){
+ float offset = 0;
+ outlineShape = new OutlineShape(getRenderer().getFactory());
+ outlineShape.addVertex(0.0f,-10.0f, true);
+ outlineShape.addVertex(15.0f,-10.0f, true);
+ outlineShape.addVertex(10.0f,5.0f, false);
+ outlineShape.addVertex(15.0f,10.0f, true);
+ outlineShape.addVertex(6.0f,15.0f, false);
+ outlineShape.addVertex(5.0f,8.0f, false);
+ outlineShape.addVertex(0.0f,10.0f,true);
+ outlineShape.closeLastOutline();
+ outlineShape.addEmptyOutline();
+ outlineShape.addVertex(5.0f,-5.0f,true);
+ outlineShape.addVertex(10.0f,-5.0f, false);
+ outlineShape.addVertex(10.0f,0.0f, true);
+ outlineShape.addVertex(5.0f,0.0f, false);
+ outlineShape.closeLastOutline();
+
+ /** Same shape as above but without any off-curve vertices */
+ outlineShape.addEmptyOutline();
+ offset = 30;
+ outlineShape.addVertex(offset+0.0f,-10.0f, true);
+ outlineShape.addVertex(offset+17.0f,-10.0f, true);
+ outlineShape.addVertex(offset+11.0f,5.0f, true);
+ outlineShape.addVertex(offset+16.0f,10.0f, true);
+ outlineShape.addVertex(offset+7.0f,15.0f, true);
+ outlineShape.addVertex(offset+6.0f,8.0f, true);
+ outlineShape.addVertex(offset+0.0f,10.0f, true);
+ outlineShape.closeLastOutline();
+ outlineShape.addEmptyOutline();
+ outlineShape.addVertex(offset+5.0f,0.0f, true);
+ outlineShape.addVertex(offset+5.0f,-5.0f, true);
+ outlineShape.addVertex(offset+10.0f,-5.0f, true);
+ outlineShape.addVertex(offset+10.0f,0.0f, true);
+ outlineShape.closeLastOutline();
+ }
- public void init(GLAutoDrawable drawable) {
- super.init(drawable);
-
+ public void init(GLAutoDrawable drawable) {
+ super.init(drawable);
+
GL2ES2 gl = drawable.getGL().getGL2ES2();
final RegionRenderer regionRenderer = (RegionRenderer) getRenderer();
- gl.setSwapInterval(1);
- gl.glEnable(GL2ES2.GL_DEPTH_TEST);
- regionRenderer.init(gl);
+ gl.setSwapInterval(1);
+ gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+ regionRenderer.init(gl);
regionRenderer.setAlpha(gl, 1.0f);
regionRenderer.setColor(gl, 0.0f, 0.0f, 0.0f);
//gl.glSampleCoverage(0.95f, false);
@@ -104,21 +104,21 @@ public class GPURegionGLListener01 extends GPURegionRendererListenerBase01 {
//gl.glEnable(GL2GL3.GL_SAMPLE_ALPHA_TO_ONE);
MSAATool.dump(drawable);
- createTestOutline();
- }
+ createTestOutline();
+ }
- public void display(GLAutoDrawable drawable) {
- GL2ES2 gl = drawable.getGL().getGL2ES2();
+ public void display(GLAutoDrawable drawable) {
+ GL2ES2 gl = drawable.getGL().getGL2ES2();
- gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+ gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+ gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
final RegionRenderer regionRenderer = (RegionRenderer) getRenderer();
- regionRenderer.resetModelview(null);
- regionRenderer.translate(null, getXTran(), getYTran(), getZoom());
- regionRenderer.rotate(gl, getAngle(), 0, 1, 0);
+ regionRenderer.resetModelview(null);
+ regionRenderer.translate(null, getXTran(), getYTran(), getZoom());
+ regionRenderer.rotate(gl, getAngle(), 0, 1, 0);
- regionRenderer.renderOutlineShape(gl, outlineShape, getPosition(), getTexSize());
- }
+ regionRenderer.renderOutlineShape(gl, outlineShape, getPosition(), getTexSize());
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener02.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener02.java
index 56db37ebe..5a54b659d 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener02.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionGLListener02.java
@@ -47,7 +47,7 @@ public class GPURegionGLListener02 extends GPURegionRendererListenerBase01 {
super(SVertex.factory(), numpass, debug, trace);
setMatrix(-20, 00, 0f, -50, fbosize);
}
-
+
private void createTestOutline(){
float offset = 0;
outlineShapes[0] = new OutlineShape(SVertex.factory());
@@ -85,24 +85,24 @@ public class GPURegionGLListener02 extends GPURegionRendererListenerBase01 {
outlineShapes[1].closeLastOutline();
}
- public void init(GLAutoDrawable drawable) {
- super.init(drawable);
-
+ public void init(GLAutoDrawable drawable) {
+ super.init(drawable);
+
GL2ES2 gl = drawable.getGL().getGL2ES2();
final RegionRenderer regionRenderer = (RegionRenderer) getRenderer();
- gl.setSwapInterval(1);
- gl.glEnable(GL2ES2.GL_DEPTH_TEST);
- regionRenderer.init(gl);
+ gl.setSwapInterval(1);
+ gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+ regionRenderer.init(gl);
regionRenderer.setAlpha(gl, 1.0f);
regionRenderer.setColor(gl, 0.0f, 0.0f, 0.0f);
MSAATool.dump(drawable);
- createTestOutline();
- }
+ createTestOutline();
+ }
- public void display(GLAutoDrawable drawable) {
+ public void display(GLAutoDrawable drawable) {
GL2ES2 gl = drawable.getGL().getGL2ES2();
gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
@@ -115,6 +115,6 @@ public class GPURegionGLListener02 extends GPURegionRendererListenerBase01 {
regionRenderer.rotate(gl, getAngle(), 0, 1, 0);
regionRenderer.renderOutlineShapes(gl, outlineShapes, getPosition(), getTexSize());
-
- }
+
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo01.java
index dbd5fe158..e31da1170 100755
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo01.java
@@ -47,7 +47,7 @@ public class GPURegionNewtDemo01 {
static final boolean TRACE = false;
public static void main(String[] args) {
- GLProfile.initSingleton(true);
+ GLProfile.initSingleton(true);
GLProfile glp = GLProfile.getGL2ES2();
GLCapabilities caps = new GLCapabilities(glp);
caps.setAlphaBits(4);
@@ -65,11 +65,11 @@ public class GPURegionNewtDemo01 {
window.addGLEventListener(regionGLListener);
window.enablePerfLog(true);
- window.setVisible(true);
+ window.setVisible(true);
- //FPSAnimator animator = new FPSAnimator(60);
+ //FPSAnimator animator = new FPSAnimator(60);
Animator animator = new Animator();
- animator.add(window);
- animator.start();
- }
+ animator.add(window);
+ animator.start();
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo02.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo02.java
index 7ffab59e3..a7ff0defa 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo02.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURegionNewtDemo02.java
@@ -49,8 +49,8 @@ public class GPURegionNewtDemo02 {
}
public void testMe() {
- GLProfile.initSingleton(true);
- GLProfile glp = GLProfile.getGL2ES2();
+ GLProfile.initSingleton(true);
+ GLProfile glp = GLProfile.getGL2ES2();
GLCapabilities caps = new GLCapabilities(glp);
caps.setAlphaBits(4);
System.out.println("Requested: " + caps);
@@ -65,11 +65,11 @@ public class GPURegionNewtDemo02 {
window.addGLEventListener(regionGLListener);
window.enablePerfLog(true);
- window.setVisible(true);
+ window.setVisible(true);
- //FPSAnimator animator = new FPSAnimator(60);
+ //FPSAnimator animator = new FPSAnimator(60);
Animator animator = new Animator();
- animator.add(window);
- animator.start();
- }
+ animator.add(window);
+ animator.start();
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURendererListenerBase01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURendererListenerBase01.java
index e63985be9..fa3e8515a 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURendererListenerBase01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPURendererListenerBase01.java
@@ -166,8 +166,8 @@ public abstract class GPURendererListenerBase01 implements GLEventListener {
PrintWriter pw = new PrintWriter(sw);
pw.printf("-%03dx%03d-Z%04d-T%04d-%s", drawable.getWidth(), drawable.getHeight(), (int)Math.abs(zoom), texSize, objName);
- String filename = dir + tech + sw +".tga";
- screenshot.surface2File(drawable, filename /*, exportAlpha */);
+ String filename = dir + tech + sw +".tga";
+ screenshot.surface2File(drawable, filename /*, exportAlpha */);
}
int screenshot_num = 0;
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextGLListener0A.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextGLListener0A.java
index 7290246d1..a62219a55 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextGLListener0A.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextGLListener0A.java
@@ -36,26 +36,26 @@ import com.jogamp.graph.geom.opengl.SVertex;
public class GPUTextGLListener0A extends GPUTextRendererListenerBase01 {
public GPUTextGLListener0A(int numpass, int fbosize, boolean debug, boolean trace) {
- super(SVertex.factory(), numpass, debug, trace);
- setMatrix(-400, -30, 0f, -500, fbosize);
- }
-
- public void init(GLAutoDrawable drawable) {
+ super(SVertex.factory(), numpass, debug, trace);
+ setMatrix(-400, -30, 0f, -500, fbosize);
+ }
+
+ public void init(GLAutoDrawable drawable) {
super.init(drawable);
GL2ES2 gl = drawable.getGL().getGL2ES2();
final TextRenderer textRenderer = (TextRenderer) getRenderer();
- gl.setSwapInterval(1);
- gl.glEnable(GL2ES2.GL_DEPTH_TEST);
- textRenderer.init(gl);
- textRenderer.setAlpha(gl, 1.0f);
- textRenderer.setColor(gl, 0.0f, 0.0f, 0.0f);
- //gl.glSampleCoverage(0.95f, false);
- //gl.glEnable(GL2GL3.GL_SAMPLE_COVERAGE); // sample coverage doesn't really make a difference to lines
- //gl.glEnable(GL2GL3.GL_SAMPLE_ALPHA_TO_COVERAGE);
- //gl.glEnable(GL2GL3.GL_SAMPLE_ALPHA_TO_ONE);
- MSAATool.dump(drawable);
- }
+ gl.setSwapInterval(1);
+ gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+ textRenderer.init(gl);
+ textRenderer.setAlpha(gl, 1.0f);
+ textRenderer.setColor(gl, 0.0f, 0.0f, 0.0f);
+ //gl.glSampleCoverage(0.95f, false);
+ //gl.glEnable(GL2GL3.GL_SAMPLE_COVERAGE); // sample coverage doesn't really make a difference to lines
+ //gl.glEnable(GL2GL3.GL_SAMPLE_ALPHA_TO_COVERAGE);
+ //gl.glEnable(GL2GL3.GL_SAMPLE_ALPHA_TO_ONE);
+ MSAATool.dump(drawable);
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo01.java
index 3739f28ea..086007da1 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo01.java
@@ -39,29 +39,29 @@ public class GPUTextNewtDemo01 {
static final boolean DEBUG = false;
static final boolean TRACE = false;
- public static void main(String[] args) {
- GLProfile.initSingleton(true);
- GLProfile glp = GLProfile.getGL2ES2();
- GLCapabilities caps = new GLCapabilities(glp);
- caps.setAlphaBits(4);
- caps.setSampleBuffers(true);
- caps.setNumSamples(4); // 2 samples is not enough ..
- System.out.println("Requested: "+caps);
-
- GLWindow window = GLWindow.create(caps);
- window.setPosition(10, 10);
- window.setSize(800, 400);
- window.setTitle("GPU Text Newt Demo 01 - r2t0 msaa1");
-
- GPUTextGLListener0A textGLListener = new GPUTextGLListener0A(Region.SINGLE_PASS, 0, DEBUG, TRACE);
- textGLListener.attachInputListenerTo(window);
- window.addGLEventListener(textGLListener);
+ public static void main(String[] args) {
+ GLProfile.initSingleton(true);
+ GLProfile glp = GLProfile.getGL2ES2();
+ GLCapabilities caps = new GLCapabilities(glp);
+ caps.setAlphaBits(4);
+ caps.setSampleBuffers(true);
+ caps.setNumSamples(4); // 2 samples is not enough ..
+ System.out.println("Requested: "+caps);
+
+ GLWindow window = GLWindow.create(caps);
+ window.setPosition(10, 10);
+ window.setSize(800, 400);
+ window.setTitle("GPU Text Newt Demo 01 - r2t0 msaa1");
+
+ GPUTextGLListener0A textGLListener = new GPUTextGLListener0A(Region.SINGLE_PASS, 0, DEBUG, TRACE);
+ textGLListener.attachInputListenerTo(window);
+ window.addGLEventListener(textGLListener);
- window.enablePerfLog(true);
- window.setVisible(true);
- // FPSAnimator animator = new FPSAnimator(10);
- Animator animator = new Animator();
- animator.add(window);
- animator.start();
- }
+ window.enablePerfLog(true);
+ window.setVisible(true);
+ // FPSAnimator animator = new FPSAnimator(10);
+ Animator animator = new Animator();
+ animator.add(window);
+ animator.start();
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo02.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo02.java
index 1b4a94522..f44e01c99 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo02.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo02.java
@@ -50,17 +50,17 @@ public class GPUTextNewtDemo02 {
static final boolean TRACE = false;
public static void main(String[] args) {
- GLProfile.initSingleton(true);
+ GLProfile.initSingleton(true);
GLProfile glp = GLProfile.getGL2ES2();
-
- GLCapabilities caps = new GLCapabilities(glp);
- caps.setAlphaBits(4);
- System.out.println("Requested: "+caps);
-
- GLWindow window = GLWindow.create(caps);
-
- window.setPosition(10, 10);
- window.setSize(800, 400);
+
+ GLCapabilities caps = new GLCapabilities(glp);
+ caps.setAlphaBits(4);
+ System.out.println("Requested: "+caps);
+
+ GLWindow window = GLWindow.create(caps);
+
+ window.setPosition(10, 10);
+ window.setSize(800, 400);
window.setTitle("GPU Text Newt Demo 02 - r2t1 msaa0");
GPUTextGLListener0A textGLListener = new GPUTextGLListener0A(Region.TWO_PASS, window.getWidth()*3, DEBUG, TRACE);
@@ -69,10 +69,10 @@ public class GPUTextNewtDemo02 {
window.addGLEventListener(textGLListener);
window.enablePerfLog(true);
- window.setVisible(true);
- // FPSAnimator animator = new FPSAnimator(60);
- Animator animator = new Animator();
- animator.add(window);
- animator.start();
- }
+ window.setVisible(true);
+ // FPSAnimator animator = new FPSAnimator(60);
+ Animator animator = new Animator();
+ animator.add(window);
+ animator.start();
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/MSAATool.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/MSAATool.java
index 5975e096b..1fbedb338 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/MSAATool.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/MSAATool.java
@@ -33,37 +33,37 @@ import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilitiesImmutable;
public class MSAATool {
- public static void dump(GLAutoDrawable drawable) {
- float[] vf = new float[] { 0f };
- byte[] vb = new byte[] { 0 };
- int[] vi = new int[] { 0, 0 };
-
- System.out.println("GL MSAA SETUP:");
- GL2ES2 gl = drawable.getGL().getGL2ES2();
- GLCapabilitiesImmutable caps = drawable.getChosenGLCapabilities();
- System.out.println(" Caps realised "+caps);
- System.out.println(" Caps sample buffers "+caps.getSampleBuffers()+", samples "+caps.getNumSamples());
-
- // default TRUE
- System.out.println(" GL MULTISAMPLE "+gl.glIsEnabled(GL2ES2.GL_MULTISAMPLE));
- // sample buffers min 0, same as GLX_SAMPLE_BUFFERS_ARB or WGL_SAMPLE_BUFFERS_ARB
- gl.glGetIntegerv(GL2GL3.GL_SAMPLE_BUFFERS, vi, 0);
- // samples min 0
- gl.glGetIntegerv(GL2GL3.GL_SAMPLES, vi, 1);
- System.out.println(" GL SAMPLE_BUFFERS "+vi[0]+", SAMPLES "+vi[1]);
-
- System.out.println("GL CSAA SETUP:");
- // default FALSE
- System.out.println(" GL SAMPLE COVERAGE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_COVERAGE));
- // default FALSE
- System.out.println(" GL SAMPLE_ALPHA_TO_COVERAGE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_ALPHA_TO_COVERAGE));
- // default FALSE
- System.out.println(" GL SAMPLE_ALPHA_TO_ONE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_ALPHA_TO_ONE));
- // default FALSE, value 1, invert false
- gl.glGetFloatv(GL2GL3.GL_SAMPLE_COVERAGE_VALUE, vf, 0);
- gl.glGetBooleanv(GL2GL3.GL_SAMPLE_COVERAGE_INVERT, vb, 0);
- System.out.println(" GL SAMPLE_COVERAGE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_COVERAGE) +
- ": SAMPLE_COVERAGE_VALUE "+vf[0]+
- ", SAMPLE_COVERAGE_INVERT "+vb[0]);
- }
+ public static void dump(GLAutoDrawable drawable) {
+ float[] vf = new float[] { 0f };
+ byte[] vb = new byte[] { 0 };
+ int[] vi = new int[] { 0, 0 };
+
+ System.out.println("GL MSAA SETUP:");
+ GL2ES2 gl = drawable.getGL().getGL2ES2();
+ GLCapabilitiesImmutable caps = drawable.getChosenGLCapabilities();
+ System.out.println(" Caps realised "+caps);
+ System.out.println(" Caps sample buffers "+caps.getSampleBuffers()+", samples "+caps.getNumSamples());
+
+ // default TRUE
+ System.out.println(" GL MULTISAMPLE "+gl.glIsEnabled(GL2ES2.GL_MULTISAMPLE));
+ // sample buffers min 0, same as GLX_SAMPLE_BUFFERS_ARB or WGL_SAMPLE_BUFFERS_ARB
+ gl.glGetIntegerv(GL2GL3.GL_SAMPLE_BUFFERS, vi, 0);
+ // samples min 0
+ gl.glGetIntegerv(GL2GL3.GL_SAMPLES, vi, 1);
+ System.out.println(" GL SAMPLE_BUFFERS "+vi[0]+", SAMPLES "+vi[1]);
+
+ System.out.println("GL CSAA SETUP:");
+ // default FALSE
+ System.out.println(" GL SAMPLE COVERAGE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_COVERAGE));
+ // default FALSE
+ System.out.println(" GL SAMPLE_ALPHA_TO_COVERAGE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_ALPHA_TO_COVERAGE));
+ // default FALSE
+ System.out.println(" GL SAMPLE_ALPHA_TO_ONE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_ALPHA_TO_ONE));
+ // default FALSE, value 1, invert false
+ gl.glGetFloatv(GL2GL3.GL_SAMPLE_COVERAGE_VALUE, vf, 0);
+ gl.glGetBooleanv(GL2GL3.GL_SAMPLE_COVERAGE_INVERT, vb, 0);
+ System.out.println(" GL SAMPLE_COVERAGE "+gl.glIsEnabled(GL2GL3.GL_SAMPLE_COVERAGE) +
+ ": SAMPLE_COVERAGE_VALUE "+vf[0]+
+ ", SAMPLE_COVERAGE_INVERT "+vb[0]);
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/RIButton.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/RIButton.java
index 4f59b61ec..cb9154c83 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/RIButton.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/RIButton.java
@@ -37,168 +37,168 @@ import com.jogamp.graph.geom.Vertex.Factory;
/** GPU based resolution independent Button impl
*/
public class RIButton extends UIControl{
- private float width = 4.0f, height= 3.0f;
- private float spacing = 0.3f;
- private float[] scale = new float[]{1.0f,1.0f};
- private float corner = 0.5f;
- private float labelZOffset = -0.05f;
-
- private float[] buttonColor = {0.0f, 0.0f, 0.0f};
- private float[] labelColor = {1.0f, 1.0f, 1.0f};
-
- public RIButton(Factory<? extends Vertex> factory, String label){
- super(factory);
- this.label = label;
- setFont(FontFactory.get(FontFactory.UBUNTU).getDefault());
- }
+ private float width = 4.0f, height= 3.0f;
+ private float spacing = 0.3f;
+ private float[] scale = new float[]{1.0f,1.0f};
+ private float corner = 0.5f;
+ private float labelZOffset = -0.05f;
+
+ private float[] buttonColor = {0.0f, 0.0f, 0.0f};
+ private float[] labelColor = {1.0f, 1.0f, 1.0f};
+
+ public RIButton(Factory<? extends Vertex> factory, String label){
+ super(factory);
+ this.label = label;
+ setFont(FontFactory.get(FontFactory.UBUNTU).getDefault());
+ }
- public RIButton(Factory<? extends Vertex> factory, String label, Font font){
- super(factory);
- setLabel(label);
- setFont(font);
- }
-
- public float getWidth() {
- return width;
- }
+ public RIButton(Factory<? extends Vertex> factory, String label, Font font){
+ super(factory);
+ setLabel(label);
+ setFont(font);
+ }
+
+ public float getWidth() {
+ return width;
+ }
- public void setDimensions(float width, float height) {
- this.width = width;
- this.height = height;
- setDirty(true);
- }
+ public void setDimensions(float width, float height) {
+ this.width = width;
+ this.height = height;
+ setDirty(true);
+ }
- public float getHeight() {
- return height;
- }
+ public float getHeight() {
+ return height;
+ }
- public Font getFont() {
- return font;
- }
-
- public void generate(AABBox lbox) {
-// AABBox lbox = font.getStringBounds(label, 10);
- createOutline(factory, lbox);
- scale[0] = getWidth()/(2*spacing + lbox.getWidth());
- scale[1] = getHeight()/(2*spacing + lbox.getHeight());
-
- //FIXME: generate GlyphString to manipulate before rendering
- setDirty(false);
- }
-
-
- public float[] getScale() {
- return scale;
- }
+ public Font getFont() {
+ return font;
+ }
+
+ public void generate(AABBox lbox) {
+// AABBox lbox = font.getStringBounds(label, 10);
+ createOutline(factory, lbox);
+ scale[0] = getWidth()/(2*spacing + lbox.getWidth());
+ scale[1] = getHeight()/(2*spacing + lbox.getHeight());
+
+ //FIXME: generate GlyphString to manipulate before rendering
+ setDirty(false);
+ }
+
+
+ public float[] getScale() {
+ return scale;
+ }
- private void createOutline(Factory<? extends Vertex> factory, AABBox lbox){
- shape = new OutlineShape(factory);
- if(corner == 0.0f){
- createSharpOutline(lbox);
- }
- else{
- createCurvedOutline(lbox);
- }
- }
- private void createSharpOutline(AABBox lbox){
- float th = (2.0f*spacing) + lbox.getHeight();
- float tw = (2.0f*spacing) + lbox.getWidth();
- float minX = lbox.getMinX()-spacing;
- float minY = lbox.getMinY()-spacing;
-
- shape.addVertex(minX, minY, labelZOffset, true);
- shape.addVertex(minX+tw, minY, labelZOffset, true);
- shape.addVertex(minX+tw, minY + th, labelZOffset, true);
- shape.addVertex(minX, minY + th, labelZOffset, true);
- shape.closeLastOutline();
- }
-
- private void createCurvedOutline(AABBox lbox){
- float th = 2.0f*spacing + lbox.getHeight();
- float tw = 2.0f*spacing + lbox.getWidth();
-
- float cw = 0.5f*corner*Math.min(tw, th);
- float ch = 0.5f*corner*Math.min(tw, th);
-
- float minX = lbox.getMinX()-spacing;
- float minY = lbox.getMinY()-spacing;
-
- shape.addVertex(minX, minY + ch, labelZOffset, true);
- shape.addVertex(minX, minY, labelZOffset, false);
- shape.addVertex(minX + cw, minY, labelZOffset, true);
- shape.addVertex(minX + tw - cw, minY, labelZOffset, true);
- shape.addVertex(minX + tw, minY, labelZOffset, false);
- shape.addVertex(minX + tw, minY + ch, labelZOffset, true);
- shape.addVertex(minX + tw, minY + th- ch, labelZOffset, true);
- shape.addVertex(minX + tw, minY + th, labelZOffset, false);
- shape.addVertex(minX + tw - cw, minY + th, labelZOffset, true);
- shape.addVertex(minX + cw, minY + th, labelZOffset, true);
- shape.addVertex(minX, minY + th, labelZOffset, false);
- shape.addVertex(minX, minY + th - ch, labelZOffset, true);
- shape.closeLastOutline();
- }
+ private void createOutline(Factory<? extends Vertex> factory, AABBox lbox){
+ shape = new OutlineShape(factory);
+ if(corner == 0.0f){
+ createSharpOutline(lbox);
+ }
+ else{
+ createCurvedOutline(lbox);
+ }
+ }
+ private void createSharpOutline(AABBox lbox){
+ float th = (2.0f*spacing) + lbox.getHeight();
+ float tw = (2.0f*spacing) + lbox.getWidth();
+ float minX = lbox.getMinX()-spacing;
+ float minY = lbox.getMinY()-spacing;
+
+ shape.addVertex(minX, minY, labelZOffset, true);
+ shape.addVertex(minX+tw, minY, labelZOffset, true);
+ shape.addVertex(minX+tw, minY + th, labelZOffset, true);
+ shape.addVertex(minX, minY + th, labelZOffset, true);
+ shape.closeLastOutline();
+ }
+
+ private void createCurvedOutline(AABBox lbox){
+ float th = 2.0f*spacing + lbox.getHeight();
+ float tw = 2.0f*spacing + lbox.getWidth();
+
+ float cw = 0.5f*corner*Math.min(tw, th);
+ float ch = 0.5f*corner*Math.min(tw, th);
+
+ float minX = lbox.getMinX()-spacing;
+ float minY = lbox.getMinY()-spacing;
+
+ shape.addVertex(minX, minY + ch, labelZOffset, true);
+ shape.addVertex(minX, minY, labelZOffset, false);
+ shape.addVertex(minX + cw, minY, labelZOffset, true);
+ shape.addVertex(minX + tw - cw, minY, labelZOffset, true);
+ shape.addVertex(minX + tw, minY, labelZOffset, false);
+ shape.addVertex(minX + tw, minY + ch, labelZOffset, true);
+ shape.addVertex(minX + tw, minY + th- ch, labelZOffset, true);
+ shape.addVertex(minX + tw, minY + th, labelZOffset, false);
+ shape.addVertex(minX + tw - cw, minY + th, labelZOffset, true);
+ shape.addVertex(minX + cw, minY + th, labelZOffset, true);
+ shape.addVertex(minX, minY + th, labelZOffset, false);
+ shape.addVertex(minX, minY + th - ch, labelZOffset, true);
+ shape.closeLastOutline();
+ }
- public float getCorner() {
- return corner;
- }
+ public float getCorner() {
+ return corner;
+ }
- public void setCorner(float corner) {
- if(corner > 1.0f){
- this.corner = 1.0f;
- }
- else if(corner < 0.01f){
- this.corner = 0.0f;
- }
- else{
- this.corner = corner;
- }
- setDirty(true);
- }
-
- public float getLabelZOffset() {
- return labelZOffset;
- }
+ public void setCorner(float corner) {
+ if(corner > 1.0f){
+ this.corner = 1.0f;
+ }
+ else if(corner < 0.01f){
+ this.corner = 0.0f;
+ }
+ else{
+ this.corner = corner;
+ }
+ setDirty(true);
+ }
+
+ public float getLabelZOffset() {
+ return labelZOffset;
+ }
- public void setLabelZOffset(float labelZOffset) {
- this.labelZOffset = -labelZOffset;
- setDirty(true);
- }
- public float getSpacing() {
- return spacing;
- }
+ public void setLabelZOffset(float labelZOffset) {
+ this.labelZOffset = -labelZOffset;
+ setDirty(true);
+ }
+ public float getSpacing() {
+ return spacing;
+ }
- public void setSpacing(float spacing) {
- if(spacing < 0.0f){
- this.spacing = 0.0f;
- }
- else{
- this.spacing = spacing;
- }
- setDirty(true);
- }
-
- public float[] getButtonColor() {
- return buttonColor;
- }
+ public void setSpacing(float spacing) {
+ if(spacing < 0.0f){
+ this.spacing = 0.0f;
+ }
+ else{
+ this.spacing = spacing;
+ }
+ setDirty(true);
+ }
+
+ public float[] getButtonColor() {
+ return buttonColor;
+ }
- public void setButtonColor(float r, float g, float b) {
- this.buttonColor[0] = r;
- this.buttonColor[1] = g;
- this.buttonColor[2] = b;
- }
+ public void setButtonColor(float r, float g, float b) {
+ this.buttonColor[0] = r;
+ this.buttonColor[1] = g;
+ this.buttonColor[2] = b;
+ }
- public float[] getLabelColor() {
- return labelColor;
- }
+ public float[] getLabelColor() {
+ return labelColor;
+ }
- public void setLabelColor(float r, float g, float b) {
- this.labelColor[0] = r;
- this.labelColor[1] = g;
- this.labelColor[2] = b;
- }
-
- public String toString(){
- return "RIButton [ label: " + getLabel() + "," + "spacing: " + spacing
- + ", " + "corner: " + corner + ", " + "shapeOffset: " + labelZOffset + " ]";
- }
+ public void setLabelColor(float r, float g, float b) {
+ this.labelColor[0] = r;
+ this.labelColor[1] = g;
+ this.labelColor[2] = b;
+ }
+
+ public String toString(){
+ return "RIButton [ label: " + getLabel() + "," + "spacing: " + spacing
+ + ", " + "corner: " + corner + ", " + "shapeOffset: " + labelZOffset + " ]";
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIControl.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIControl.java
index ae872fe54..a4f1152a3 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIControl.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIControl.java
@@ -34,47 +34,47 @@ import com.jogamp.graph.geom.Vertex;
import com.jogamp.graph.geom.Vertex.Factory;
public abstract class UIControl {
- protected Font font = null;
- protected OutlineShape shape = null;
- protected String label = "Label";
- protected Factory<? extends Vertex> factory;
-
- protected boolean dirty = true;
+ protected Font font = null;
+ protected OutlineShape shape = null;
+ protected String label = "Label";
+ protected Factory<? extends Vertex> factory;
+
+ protected boolean dirty = true;
- public UIControl(Factory<? extends Vertex> factory){
- this.factory = factory;
- }
-
- public abstract void generate(AABBox lbox);
+ public UIControl(Factory<? extends Vertex> factory){
+ this.factory = factory;
+ }
+
+ public abstract void generate(AABBox lbox);
- public Font getFont() {
- return font;
- }
+ public Font getFont() {
+ return font;
+ }
- public void setFont(Font font) {
- this.font = font;
- }
+ public void setFont(Font font) {
+ this.font = font;
+ }
- public OutlineShape getShape(AABBox lbox) {
- if(isDirty()){
- generate(lbox);
- }
- return shape;
- }
-
- public String getLabel(){
- return label;
- }
- public void setLabel(String label) {
- this.label = label;
- setDirty(true);
- }
-
- protected boolean isDirty() {
- return dirty;
- }
+ public OutlineShape getShape(AABBox lbox) {
+ if(isDirty()){
+ generate(lbox);
+ }
+ return shape;
+ }
+
+ public String getLabel(){
+ return label;
+ }
+ public void setLabel(String label) {
+ this.label = label;
+ setDirty(true);
+ }
+
+ protected boolean isDirty() {
+ return dirty;
+ }
- protected void setDirty(boolean dirty) {
- this.dirty = dirty;
- }
+ protected void setDirty(boolean dirty) {
+ this.dirty = dirty;
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIGLListener01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIGLListener01.java
index cb373d014..1d4903e4f 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIGLListener01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIGLListener01.java
@@ -41,10 +41,10 @@ import com.jogamp.graph.geom.opengl.SVertex;
import com.jogamp.opengl.test.junit.graph.demos.MSAATool;
public class UIGLListener01 extends UIListenerBase01 {
-
- public UIGLListener01 (boolean debug, boolean trace) {
+
+ public UIGLListener01 (boolean debug, boolean trace) {
super(RegionRenderer.create(SVertex.factory(), Region.SINGLE_PASS),
- TextRenderer.create(SVertex.factory(), Region.SINGLE_PASS), debug, trace);
+ TextRenderer.create(SVertex.factory(), Region.SINGLE_PASS), debug, trace);
setMatrix(-20, 00, 0f, -50);
button = new RIButton(SVertex.factory(), "Click me!");
button.setLabelColor(1.0f,1.0f,1.0f);
@@ -52,20 +52,20 @@ public class UIGLListener01 extends UIListenerBase01 {
button.setCorner(0.5f);
button.setSpacing(0.3f);
System.err.println(button);
- }
-
- private GlyphString glyphString;
- public void init(GLAutoDrawable drawable) {
- super.init(drawable);
-
+ }
+
+ private GlyphString glyphString;
+ public void init(GLAutoDrawable drawable) {
+ super.init(drawable);
+
GL2ES2 gl = drawable.getGL().getGL2ES2();
final RegionRenderer regionRenderer = getRegionRenderer();
final TextRenderer textRenderer = getTextRenderer();
- gl.setSwapInterval(1);
- gl.glEnable(GL2ES2.GL_DEPTH_TEST);
- gl.glEnable(GL2ES2.GL_POLYGON_OFFSET_FILL);
+ gl.setSwapInterval(1);
+ gl.glEnable(GL2ES2.GL_DEPTH_TEST);
+ gl.glEnable(GL2ES2.GL_POLYGON_OFFSET_FILL);
regionRenderer.init(gl);
regionRenderer.setAlpha(gl, 1.0f);
@@ -75,29 +75,29 @@ public class UIGLListener01 extends UIListenerBase01 {
button.generate(glyphString.getBounds());
MSAATool.dump(drawable);
- }
+ }
- public void display(GLAutoDrawable drawable) {
- GL2ES2 gl = drawable.getGL().getGL2ES2();
+ public void display(GLAutoDrawable drawable) {
+ GL2ES2 gl = drawable.getGL().getGL2ES2();
- gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
- gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+ gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
+ gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
final RegionRenderer regionRenderer = getRegionRenderer();
- regionRenderer.resetModelview(null);
-
- regionRenderer.translate(null, getXTran(), getYTran(), getZoom());
- regionRenderer.rotate(gl, getAngle(), 0, 1, 0);
- float[] bColor = button.getButtonColor();
- regionRenderer.setColor(gl, bColor[0], bColor[1], bColor[2]);
- regionRenderer.renderOutlineShape(gl, button.getShape(glyphString.getBounds()), getPosition(), 0);
- float[] lColor = button.getLabelColor();
- regionRenderer.setColor(gl, lColor[0], lColor[1], lColor[2]);
- glyphString.renderString3D();
- }
- public void dispose(GLAutoDrawable drawable) {
- super.dispose(drawable);
- glyphString.destroy();
- }
+ regionRenderer.resetModelview(null);
+
+ regionRenderer.translate(null, getXTran(), getYTran(), getZoom());
+ regionRenderer.rotate(gl, getAngle(), 0, 1, 0);
+ float[] bColor = button.getButtonColor();
+ regionRenderer.setColor(gl, bColor[0], bColor[1], bColor[2]);
+ regionRenderer.renderOutlineShape(gl, button.getShape(glyphString.getBounds()), getPosition(), 0);
+ float[] lColor = button.getLabelColor();
+ regionRenderer.setColor(gl, lColor[0], lColor[1], lColor[2]);
+ glyphString.renderString3D();
+ }
+ public void dispose(GLAutoDrawable drawable) {
+ super.dispose(drawable);
+ glyphString.destroy();
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIListenerBase01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIListenerBase01.java
index fb4d1015e..67cb5cbdc 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIListenerBase01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UIListenerBase01.java
@@ -66,8 +66,8 @@ public abstract class UIListenerBase01 implements GLEventListener {
private boolean debug;
private boolean trace;
- protected RIButton button;
-
+ protected RIButton button;
+
private KeyAction keyAction;
private MouseAction mouseAction;
@@ -161,7 +161,7 @@ public abstract class UIListenerBase01 implements GLEventListener {
window.addKeyListener(keyAction);
}
if ( null == mouseAction ) {
- mouseAction = new MouseAction();
+ mouseAction = new MouseAction();
window.addMouseListener(mouseAction);
}
}
@@ -183,8 +183,8 @@ public abstract class UIListenerBase01 implements GLEventListener {
PrintWriter pw = new PrintWriter(sw);
pw.printf("-%03dx%03d-Z%04d-T%04d-%s", drawable.getWidth(), drawable.getHeight(), (int)Math.abs(zoom), 0, objName);
- String filename = dir + tech + sw +".tga";
- screenshot.surface2File(drawable, filename /*, exportAlpha */);
+ String filename = dir + tech + sw +".tga";
+ screenshot.surface2File(drawable, filename /*, exportAlpha */);
}
int screenshot_num = 0;
@@ -198,44 +198,44 @@ public abstract class UIListenerBase01 implements GLEventListener {
public class MouseAction implements MouseListener{
- public void mouseClicked(MouseEvent e) {
-
- }
+ public void mouseClicked(MouseEvent e) {
+
+ }
- public void mouseEntered(MouseEvent e) {
- }
+ public void mouseEntered(MouseEvent e) {
+ }
- public void mouseExited(MouseEvent e) {
- }
+ public void mouseExited(MouseEvent e) {
+ }
- public void mousePressed(MouseEvent e) {
- button.setLabelColor(0.8f,0.8f,0.8f);
- button.setButtonColor(0.1f, 0.1f, 0.1f);
- }
+ public void mousePressed(MouseEvent e) {
+ button.setLabelColor(0.8f,0.8f,0.8f);
+ button.setButtonColor(0.1f, 0.1f, 0.1f);
+ }
- public void mouseReleased(MouseEvent e) {
- button.setLabelColor(1.0f,1.0f,1.0f);
- button.setButtonColor(0.6f,0.6f,0.6f);
- }
+ public void mouseReleased(MouseEvent e) {
+ button.setLabelColor(1.0f,1.0f,1.0f);
+ button.setButtonColor(0.6f,0.6f,0.6f);
+ }
- @Override
- public void mouseMoved(MouseEvent e) {
- // TODO Auto-generated method stub
-
- }
+ @Override
+ public void mouseMoved(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
- @Override
- public void mouseDragged(MouseEvent e) {
- // TODO Auto-generated method stub
-
- }
+ @Override
+ public void mouseDragged(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
- @Override
- public void mouseWheelMoved(MouseEvent e) {
- // TODO Auto-generated method stub
-
- }
-
+ @Override
+ public void mouseWheelMoved(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
}
public class KeyAction implements KeyListener {
@@ -267,7 +267,7 @@ public abstract class UIListenerBase01 implements GLEventListener {
System.err.println("Button Spacing: " + button.getSpacing());
}
else if(arg0.getKeyCode() == KeyEvent.VK_5){
- button.setSpacing(button.getSpacing()+0.1f);
+ button.setSpacing(button.getSpacing()+0.1f);
System.err.println("Button Spacing: " + button.getSpacing());
}
else if(arg0.getKeyCode() == KeyEvent.VK_6){
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UINewtDemo01.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UINewtDemo01.java
index 98e74e3a6..167177ebc 100755
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UINewtDemo01.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/UINewtDemo01.java
@@ -46,7 +46,7 @@ public class UINewtDemo01 {
static final boolean TRACE = false;
public static void main(String[] args) {
- GLProfile.initSingleton(true);
+ GLProfile.initSingleton(true);
GLProfile glp = GLProfile.getGL2ES2();
GLCapabilities caps = new GLCapabilities(glp);
caps.setAlphaBits(4);
@@ -64,10 +64,10 @@ public class UINewtDemo01 {
window.addGLEventListener(uiGLListener);
window.enablePerfLog(true);
- window.setVisible(true);
+ window.setVisible(true);
Animator animator = new Animator();
- animator.add(window);
- animator.start();
- }
+ animator.add(window);
+ animator.start();
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java
index fc19a6842..5475d3446 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TestAWTTextRendererUseVertexArrayBug464.java
@@ -90,7 +90,7 @@ public class TestAWTTextRendererUseVertexArrayBug464 extends UITestCase {
@After
public void cleanupTest() {
- frame.setVisible(false);
+ frame.setVisible(false);
frame.remove(glCanvas);
glCanvas=null;
Assert.assertNotNull(frame);
@@ -107,15 +107,15 @@ public class TestAWTTextRendererUseVertexArrayBug464 extends UITestCase {
Animator animator = new Animator(glCanvas);
animator.start();
-
- Thread.sleep(500); // 500 ms
-
- animator.stop();
+
+ Thread.sleep(500); // 500 ms
+
+ animator.stop();
- String disallowedMethods = listener.getDisallowedMethodCalls();
- if (!disallowedMethods.equals("")) {
- Assert.fail("Following VBO-related glMethods have been called: "+ disallowedMethods);
- }
+ String disallowedMethods = listener.getDisallowedMethodCalls();
+ if (!disallowedMethods.equals("")) {
+ Assert.fail("Following VBO-related glMethods have been called: "+ disallowedMethods);
+ }
}
@Test
@@ -127,15 +127,15 @@ public class TestAWTTextRendererUseVertexArrayBug464 extends UITestCase {
Animator animator = new Animator(glCanvas);
animator.start();
-
- Thread.sleep(500); // 500 ms
-
- animator.stop();
+
+ Thread.sleep(500); // 500 ms
+
+ animator.stop();
- String disallowedMethods = listener.getDisallowedMethodCalls();
- if (!disallowedMethods.equals("")) {
- Assert.fail("Following VBO-related glMethods have been called: "+ disallowedMethods);
- }
+ String disallowedMethods = listener.getDisallowedMethodCalls();
+ if (!disallowedMethods.equals("")) {
+ Assert.fail("Following VBO-related glMethods have been called: "+ disallowedMethods);
+ }
}
public static void main(String args[]) throws IOException {
@@ -151,5 +151,5 @@ public class TestAWTTextRendererUseVertexArrayBug464 extends UITestCase {
"logtestlistenerevents=true",
"formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter",
"formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,TEST-"+tstname+".xml" } );
- }
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererGLEventListener01.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererGLEventListener01.java
index b14704142..c96684598 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererGLEventListener01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererGLEventListener01.java
@@ -75,9 +75,9 @@ public class TextRendererGLEventListener01 implements GLEventListener {
Assert.assertFalse(renderer.getUseVertexArrays());
text = "ABC123#+?";
-
- PrintStream nullStream = new PrintStream(new OutputStream(){ public void write(int b){}});
- drawable.setGL(new TextRendererTraceGL2Mock01(drawable.getGL().getGL2(), nullStream, this));
+
+ PrintStream nullStream = new PrintStream(new OutputStream(){ public void write(int b){}});
+ drawable.setGL(new TextRendererTraceGL2Mock01(drawable.getGL().getGL2(), nullStream, this));
}
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
@@ -90,35 +90,35 @@ public class TextRendererGLEventListener01 implements GLEventListener {
}
public void dispose(GLAutoDrawable drawable) {
- renderer.dispose();
+ renderer.dispose();
}
public void display(GLAutoDrawable drawable) {
if (disallowedMethodCalls.equals("")) {
- if (testNumber == 1) {
- renderer.beginRendering(drawable.getWidth(), drawable.getHeight());
+ if (testNumber == 1) {
+ renderer.beginRendering(drawable.getWidth(), drawable.getHeight());
renderer.setColor(1.0f, 1.0f, 1.0f, 1.0f);
renderer.draw(text, 0, 0);
renderer.endRendering();
- }
- if (testNumber == 2) {
- renderer.begin3DRendering();
- renderer.setColor(1.0f, 1.0f, 1.0f, 1.0f);
- renderer.draw3D(text, 0, 0, 0, 0.002f);
- renderer.end3DRendering();
- }
+ }
+ if (testNumber == 2) {
+ renderer.begin3DRendering();
+ renderer.setColor(1.0f, 1.0f, 1.0f, 1.0f);
+ renderer.draw3D(text, 0, 0, 0, 0.002f);
+ renderer.end3DRendering();
+ }
}
}
public void disallowedMethodCalled (String method) {
- if (!disallowedMethodCalls.equals("")) {
- disallowedMethodCalls += ", ";
- }
- disallowedMethodCalls += method;
+ if (!disallowedMethodCalls.equals("")) {
+ disallowedMethodCalls += ", ";
+ }
+ disallowedMethodCalls += method;
}
public String getDisallowedMethodCalls() {
- return this.disallowedMethodCalls;
+ return this.disallowedMethodCalls;
}
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererTraceGL2Mock01.java b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererTraceGL2Mock01.java
index 63258a574..86714fcc5 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererTraceGL2Mock01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/awt/text/TextRendererTraceGL2Mock01.java
@@ -63,75 +63,75 @@ import com.jogamp.common.nio.Buffers;
*/
public class TextRendererTraceGL2Mock01 extends TraceGL2 {
-
- TextRendererGLEventListener01 listener;
-
- public TextRendererTraceGL2Mock01(GL2 downstreamGL2, PrintStream stream, TextRendererGLEventListener01 listener) {
- super(downstreamGL2, stream);
- this.listener = listener;
- }
-
- @Override
- public void glGetBufferSubData(int arg0, long arg1, long arg2, Buffer arg3) {
- listener.disallowedMethodCalled("glGetBufferSubData");
- }
-
- @Override
- public ByteBuffer glMapBuffer(int arg0, int arg1) {
- listener.disallowedMethodCalled("glMapBuffer");
- return Buffers.newDirectByteBuffer(0);
- }
-
- @Override
- public void glGetBufferParameteriv(int arg0, int arg1, IntBuffer arg2) {
- listener.disallowedMethodCalled("glGetBufferParameteriv");
- }
-
- @Override
- public boolean glUnmapBuffer(int arg0) {
- listener.disallowedMethodCalled("glUnmapBuffer");
- return false;
- }
-
- @Override
- public void glGenBuffers(int arg0, IntBuffer arg1) {
- listener.disallowedMethodCalled("glGenBuffers");
- }
-
- @Override
- public void glGenBuffers(int arg0, int[] arg1, int arg2) {
- listener.disallowedMethodCalled("glGenBuffers");
- }
-
- @Override
- public boolean glIsBuffer(int arg0) {
- listener.disallowedMethodCalled("glIsBuffer");
- return false;
- }
-
- @Override
- public void glBindBuffer(int arg0, int arg1) {
- listener.disallowedMethodCalled("glBindBuffer");
- }
-
- @Override
- public void glDeleteBuffers(int arg0, int[] arg1, int arg2) {
- listener.disallowedMethodCalled("glDeleteBuffers");
- }
-
- @Override
- public void glBufferSubData(int arg0, long arg1, long arg2, Buffer arg3) {
- listener.disallowedMethodCalled("glBufferSubData");
- }
-
- @Override
- public void glGetBufferParameteriv(int arg0, int arg1, int[] arg2, int arg3) {
- listener.disallowedMethodCalled("glGetBufferParameteriv");
- }
-
- @Override
- public void glBufferData(int arg0, long arg1, Buffer arg2, int arg3) {
- listener.disallowedMethodCalled("glBufferData");
- }
+
+ TextRendererGLEventListener01 listener;
+
+ public TextRendererTraceGL2Mock01(GL2 downstreamGL2, PrintStream stream, TextRendererGLEventListener01 listener) {
+ super(downstreamGL2, stream);
+ this.listener = listener;
+ }
+
+ @Override
+ public void glGetBufferSubData(int arg0, long arg1, long arg2, Buffer arg3) {
+ listener.disallowedMethodCalled("glGetBufferSubData");
+ }
+
+ @Override
+ public ByteBuffer glMapBuffer(int arg0, int arg1) {
+ listener.disallowedMethodCalled("glMapBuffer");
+ return Buffers.newDirectByteBuffer(0);
+ }
+
+ @Override
+ public void glGetBufferParameteriv(int arg0, int arg1, IntBuffer arg2) {
+ listener.disallowedMethodCalled("glGetBufferParameteriv");
+ }
+
+ @Override
+ public boolean glUnmapBuffer(int arg0) {
+ listener.disallowedMethodCalled("glUnmapBuffer");
+ return false;
+ }
+
+ @Override
+ public void glGenBuffers(int arg0, IntBuffer arg1) {
+ listener.disallowedMethodCalled("glGenBuffers");
+ }
+
+ @Override
+ public void glGenBuffers(int arg0, int[] arg1, int arg2) {
+ listener.disallowedMethodCalled("glGenBuffers");
+ }
+
+ @Override
+ public boolean glIsBuffer(int arg0) {
+ listener.disallowedMethodCalled("glIsBuffer");
+ return false;
+ }
+
+ @Override
+ public void glBindBuffer(int arg0, int arg1) {
+ listener.disallowedMethodCalled("glBindBuffer");
+ }
+
+ @Override
+ public void glDeleteBuffers(int arg0, int[] arg1, int arg2) {
+ listener.disallowedMethodCalled("glDeleteBuffers");
+ }
+
+ @Override
+ public void glBufferSubData(int arg0, long arg1, long arg2, Buffer arg3) {
+ listener.disallowedMethodCalled("glBufferSubData");
+ }
+
+ @Override
+ public void glGetBufferParameteriv(int arg0, int arg1, int[] arg2, int arg3) {
+ listener.disallowedMethodCalled("glGetBufferParameteriv");
+ }
+
+ @Override
+ public void glBufferData(int arg0, long arg1, Buffer arg2, int arg3) {
+ listener.disallowedMethodCalled("glBufferData");
+ }
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWTBug450.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWTBug450.java
index cd2682541..c8e45ec46 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWTBug450.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/gl2/gears/TestGearsGLJPanelAWTBug450.java
@@ -87,20 +87,20 @@ public class TestGearsGLJPanelAWTBug450 extends UITestCase {
GLJPanel glJPanel = new GLJPanel(caps);
Assert.assertNotNull(glJPanel);
glJPanel.addGLEventListener(new Gears() {
- @Override
- public void display(GLAutoDrawable drawable) {
- super.display(drawable);
- // look at one pixel at the bottom of the frame, just right of
- // the center line, and make sure it's not black
- GL2 gl = GLUgl2.getCurrentGL2();
- ByteBuffer bytebuffer = ByteBuffer.allocateDirect( 3 );
- gl.glReadPixels( 260, 10, 1, 1, GL2.GL_BGR, GL2.GL_UNSIGNED_BYTE, bytebuffer );
- byte byte0 = bytebuffer.get( 0 );
- byte byte1 = bytebuffer.get( 1 );
- byte byte2 = bytebuffer.get( 2 );
- if( (byte0 == 0) && (byte1 == 0) && (byte2 == 0) )
- failed = true;
- }
+ @Override
+ public void display(GLAutoDrawable drawable) {
+ super.display(drawable);
+ // look at one pixel at the bottom of the frame, just right of
+ // the center line, and make sure it's not black
+ GL2 gl = GLUgl2.getCurrentGL2();
+ ByteBuffer bytebuffer = ByteBuffer.allocateDirect( 3 );
+ gl.glReadPixels( 260, 10, 1, 1, GL2.GL_BGR, GL2.GL_UNSIGNED_BYTE, bytebuffer );
+ byte byte0 = bytebuffer.get( 0 );
+ byte byte1 = bytebuffer.get( 1 );
+ byte byte2 = bytebuffer.get( 2 );
+ if( (byte0 == 0) && (byte1 == 0) && (byte2 == 0) )
+ failed = true;
+ }
});
FPSAnimator animator = new FPSAnimator(glJPanel, 60);
@@ -129,7 +129,7 @@ public class TestGearsGLJPanelAWTBug450 extends UITestCase {
Assert.assertEquals(false, animator.isAnimating());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
- _frame.setVisible(false);
+ _frame.setVisible(false);
_frame.getContentPane().remove(_glJPanel);
_frame.remove(_glJPanel);
_glJPanel.destroy();
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
index 7de63e6a6..d16330ecc 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode00NEWT.java
@@ -95,7 +95,7 @@ public class TestScreenMode00NEWT extends UITestCase {
@Test
public void testScreenModeInfo01() throws InterruptedException {
- Capabilities caps = new Capabilities();
+ Capabilities caps = new Capabilities();
Window window = NewtFactory.createWindow(caps);
window.setSize(width, height);
window.setVisible(true);
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java
index ffff682dc..032300b9f 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/TestScreenMode01NEWT.java
@@ -88,7 +88,7 @@ public class TestScreenMode01NEWT extends UITestCase {
@Test
public void testFullscreenChange01() throws InterruptedException {
- GLCapabilities caps = new GLCapabilities(glp);
+ GLCapabilities caps = new GLCapabilities(glp);
Assert.assertNotNull(caps);
Display display = NewtFactory.createDisplay(null); // local display
Assert.assertNotNull(display);
@@ -110,7 +110,7 @@ public class TestScreenMode01NEWT extends UITestCase {
Thread.sleep(waitTimeShort);
animator.stop();
- destroyWindow(window);
+ destroyWindow(window);
}
@Test
@@ -217,7 +217,7 @@ public class TestScreenMode01NEWT extends UITestCase {
}
protected void testScreenModeChangeWithFS01Impl(boolean preFS) throws InterruptedException {
- GLCapabilities caps = new GLCapabilities(glp);
+ GLCapabilities caps = new GLCapabilities(glp);
Display display = NewtFactory.createDisplay(null); // local display
Screen screen = NewtFactory.createScreen(display, 0); // screen 0
GLWindow window = createWindow(screen, caps, width, height, true /* onscreen */, false /* undecorated */);
diff --git a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java
index 1c155f75a..dde125330 100644
--- a/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/newt/parenting/TestParenting01cSwingAWT.java
@@ -152,21 +152,21 @@ public class TestParenting01cSwingAWT extends UITestCase {
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
- System.out.println("Demos: 3 - !Visible");
+ System.out.println("Demos: 3 - !Visible");
_jFrame1.setVisible(false);
} });
Assert.assertEquals(true, glWindow1.isValid());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
- System.out.println("Demos: 4 - Visible");
+ System.out.println("Demos: 4 - Visible");
_jFrame1.setVisible(true);
} });
Assert.assertEquals(true, glWindow1.isValid());
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
- System.out.println("Demos: 5 - X Container");
+ System.out.println("Demos: 5 - X Container");
_jPanel1.remove(_container1);
} });
// Assert.assertNull(glWindow1.getParent());