diff options
author | Michael Bien <[email protected]> | 2010-10-15 14:54:39 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-10-15 14:54:39 +0200 |
commit | 404428d115cf5bb36b4576016a6c1363072336d3 (patch) | |
tree | ff0bdde12c78fa9fa0884c48bef49f2b2e2eb7e6 /test | |
parent | 843360926a2ccd5c92619380e8168dacaf0e4d57 (diff) |
JOGL: getNativeWindow -> getNativeSurface; modified CLGLTest to only use JOGL in one thread.
Diffstat (limited to 'test')
-rw-r--r-- | test/com/jogamp/opencl/gl/CLGLTest.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/test/com/jogamp/opencl/gl/CLGLTest.java b/test/com/jogamp/opencl/gl/CLGLTest.java index bcd6342..f8cd28d 100644 --- a/test/com/jogamp/opencl/gl/CLGLTest.java +++ b/test/com/jogamp/opencl/gl/CLGLTest.java @@ -18,8 +18,6 @@ import com.jogamp.opencl.CLContext; import com.jogamp.opencl.CLPlatform; import javax.media.opengl.GLCapabilities; import javax.media.opengl.GLProfile; -import org.junit.AfterClass; -import org.junit.BeforeClass; import javax.media.opengl.GLContext; import org.junit.Test; @@ -38,10 +36,9 @@ public class CLGLTest { private static GLContext glcontext; private static GLWindow glWindow; - @BeforeClass +// @BeforeClass public static void init() { - - GLProfile.initSingleton(); + GLProfile.initSingleton(true); // FIXME remove when JOCL is stabelized on mac if(Platform.getOS().toLowerCase().contains("mac")) { @@ -65,15 +62,14 @@ public class CLGLTest { glWindow.setVisible(true); glcontext = glWindow.getContext(); - glcontext.makeCurrent(); +// glcontext.makeCurrent(); out.println("useing glcontext:"); out.println(glcontext); } - @AfterClass +// @AfterClass public static void release() { if(glcontext!= null) { - glcontext.destroy(); glcontext = null; } } @@ -81,6 +77,8 @@ public class CLGLTest { @Test public void createContextTest() { + init(); + out.println(" - - - glcl; createContextTest - - - "); CLDevice[] devices = CLPlatform.getDefault().listCLDevices(); @@ -116,7 +114,10 @@ public class CLGLTest { context.release(); } + glcontext.destroy(); + + release(); } |