aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-06-27 08:57:09 +0200
committerSven Gothel <[email protected]>2014-06-27 08:57:09 +0200
commit21b84da775fae5806481ecc658a207bf603126d5 (patch)
tree757a59e053d8d1487a507e8d0d14c459c25f1003
parentfd121c63a94c28b3a27a866c5c1316694d67c43a (diff)
GLU: Make ProjectFloat/ProjectDouble final and deprecate GLU.destroy() method.
-rw-r--r--make/config/jogl/glu-CustomJavaCode-base.java9
-rw-r--r--make/config/jogl/glu-CustomJavaCode-gl2.java10
-rw-r--r--make/config/jogl/glu-CustomJavaCode-gl2es1.java2
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java1
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/OlympicES1.java1
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/glu/TestBug694ScaleImageUnpackBufferSizeAWT.java3
6 files changed, 10 insertions, 16 deletions
diff --git a/make/config/jogl/glu-CustomJavaCode-base.java b/make/config/jogl/glu-CustomJavaCode-base.java
index 2401e9c94..606583acf 100644
--- a/make/config/jogl/glu-CustomJavaCode-base.java
+++ b/make/config/jogl/glu-CustomJavaCode-base.java
@@ -128,14 +128,11 @@ public static final GLU createGLU(GL gl) throws GLException {
public GLU()
{
- this.project = new ProjectFloat();
+ project = new ProjectFloat();
}
+/** @deprecated No more used, NOP */
public void destroy() {
- if(null!=this.project) {
- this.project.destroy();
- this.project=null;
- }
}
public static final GL getCurrentGL() throws GLException {
@@ -1315,7 +1312,7 @@ public final void gluSphere(GLUquadric quad, double radius, int slices, int stac
// Projection routines
//
-private ProjectFloat project;
+private final ProjectFloat project;
public void gluOrtho2D(float left, float right, float bottom, float top) {
project.gluOrtho2D(getCurrentGL().getGL2ES1(), left, right, bottom, top);
diff --git a/make/config/jogl/glu-CustomJavaCode-gl2.java b/make/config/jogl/glu-CustomJavaCode-gl2.java
index 3ccf6c1d4..b416d53f9 100644
--- a/make/config/jogl/glu-CustomJavaCode-gl2.java
+++ b/make/config/jogl/glu-CustomJavaCode-gl2.java
@@ -35,14 +35,12 @@ static {
public GLUgl2()
{
- this.project = new ProjectDouble();
+ project = new ProjectDouble();
}
+/** @deprecated No more used, NOP */
+@Override
public void destroy() {
- if(null!=this.project) {
- this.project.destroy();
- this.project=null;
- }
super.destroy();
}
@@ -136,7 +134,7 @@ public final boolean isFunctionAvailable(String gluFunctionName)
// Projection routines
//
-private ProjectDouble project;
+private final ProjectDouble project;
public final void gluOrtho2D(float left, float right, float bottom, float top) {
project.gluOrtho2D(getCurrentGL2(), (double)left, (double)right, (double)bottom, (double)top);
diff --git a/make/config/jogl/glu-CustomJavaCode-gl2es1.java b/make/config/jogl/glu-CustomJavaCode-gl2es1.java
index a1f689f42..ad242be21 100644
--- a/make/config/jogl/glu-CustomJavaCode-gl2es1.java
+++ b/make/config/jogl/glu-CustomJavaCode-gl2es1.java
@@ -40,6 +40,8 @@ public GLUgl2es1()
super();
}
+/** @deprecated No more used, NOP */
+@Override
public void destroy() {
super.destroy();
}
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
index 46dc73003..a5c8f66af 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
@@ -1948,7 +1948,6 @@ public class TextRenderer {
@Override
public void dispose(GLAutoDrawable drawable) {
- glu.destroy();
glu=null;
frame=null;
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/OlympicES1.java b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/OlympicES1.java
index b0803c871..3395ca51f 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/OlympicES1.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/demos/es1/OlympicES1.java
@@ -224,7 +224,6 @@ public class OlympicES1 implements GLEventListener
@Override
public void dispose(GLAutoDrawable glad) {
- glu.destroy();
glu = null;
theTorus.destroy(glad.getGL());
theTorus = null;
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestBug694ScaleImageUnpackBufferSizeAWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestBug694ScaleImageUnpackBufferSizeAWT.java
index c79affef1..4f87bd7cf 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestBug694ScaleImageUnpackBufferSizeAWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/glu/TestBug694ScaleImageUnpackBufferSizeAWT.java
@@ -66,12 +66,11 @@ public class TestBug694ScaleImageUnpackBufferSizeAWT extends UITestCase implemen
testDone = true;
final GL gl = drawable.getGL();
- GLU glu = GLU.createGLU(gl);
+ final GLU glu = GLU.createGLU(gl);
testGLUScaleImage(gl, glu, 0); // default 4
testGLUScaleImage(gl, glu, 1);
testGLUScaleImage(gl, glu, 4);
testGLUScaleImage(gl, glu, 8);
- glu.destroy();
}
}