diff options
author | Michael Bien <[email protected]> | 2010-11-21 21:22:39 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-11-21 21:22:39 +0100 |
commit | d40f97c1ecb7de88e6093f54aa9d38e23b091be0 (patch) | |
tree | 037c2b1046073600c24dde13bb1e8b93233ed66d /test | |
parent | f2eb78947c79d09dbe19e56b03da4119013e8e0e (diff) |
CLGLContext.create() no longer makes the glcontext current.
Diffstat (limited to 'test')
-rw-r--r-- | test/com/jogamp/opencl/gl/CLGLTest.java | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/test/com/jogamp/opencl/gl/CLGLTest.java b/test/com/jogamp/opencl/gl/CLGLTest.java index a647c19..27c2425 100644 --- a/test/com/jogamp/opencl/gl/CLGLTest.java +++ b/test/com/jogamp/opencl/gl/CLGLTest.java @@ -68,16 +68,6 @@ public class CLGLTest { out.println(glcontext); } -// @AfterClass - public static void release() { - if(glcontext != null) { - glcontext.destroy(); - glcontext = null; - } - glWindow.destroy(); -// window.destroy(); - } - @Test public void createContextTest() { @@ -101,11 +91,14 @@ public class CLGLTest { out.println("isGLMemorySharingSupported==true on: \n "+device); } - assertNotNull(glcontext); out.println(device.getPlatform()); + + assertNotNull(glcontext); + glcontext.makeCurrent(); + assertTrue(glcontext.isCurrent()); + CLContext context = CLGLContext.create(glcontext, device); assertNotNull(context); - assertTrue(glcontext.isCurrent()); try{ out.println(context); @@ -115,10 +108,13 @@ public class CLGLTest { out.println(currentDevice); */ }finally{ + // destroy cl context, gl context still current context.release(); + + glcontext.release(); + glWindow.destroy(); } - release(); } |