summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/com/jogamp/opencl/gl/CLGLTest.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/com/jogamp/opencl/gl/CLGLTest.java b/test/com/jogamp/opencl/gl/CLGLTest.java
index f8cd28d5..a647c19f 100644
--- a/test/com/jogamp/opencl/gl/CLGLTest.java
+++ b/test/com/jogamp/opencl/gl/CLGLTest.java
@@ -35,6 +35,7 @@ public class CLGLTest {
private static GLContext glcontext;
private static GLWindow glWindow;
+ private static Window window;
// @BeforeClass
public static void init() {
@@ -51,13 +52,13 @@ public class CLGLTest {
Screen screen = NewtFactory.createScreen(display, 0); // screen 0
assertNotNull(screen);
- Window window = NewtFactory.createWindow(screen, new GLCapabilities(GLProfile.getDefault()));
+ window = NewtFactory.createWindow(screen, new GLCapabilities(GLProfile.getDefault()));
assertNotNull(window);
window.setSize(640, 480);
glWindow = GLWindow.create(window);
-
+
assertNotNull(glWindow);
glWindow.setVisible(true);
@@ -69,9 +70,12 @@ public class CLGLTest {
// @AfterClass
public static void release() {
- if(glcontext!= null) {
+ if(glcontext != null) {
+ glcontext.destroy();
glcontext = null;
}
+ glWindow.destroy();
+// window.destroy();
}
@Test
@@ -114,9 +118,6 @@ public class CLGLTest {
context.release();
}
- glcontext.destroy();
-
-
release();
}