summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-11-21 21:22:39 +0100
committerMichael Bien <[email protected]>2010-11-21 21:22:39 +0100
commitd40f97c1ecb7de88e6093f54aa9d38e23b091be0 (patch)
tree037c2b1046073600c24dde13bb1e8b93233ed66d /src/com/jogamp/opencl
parentf2eb78947c79d09dbe19e56b03da4119013e8e0e (diff)
CLGLContext.create() no longer makes the glcontext current.
Diffstat (limited to 'src/com/jogamp/opencl')
-rw-r--r--src/com/jogamp/opencl/gl/CLGLContext.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/jogamp/opencl/gl/CLGLContext.java b/src/com/jogamp/opencl/gl/CLGLContext.java
index ac1e5da7..1c6069b9 100644
--- a/src/com/jogamp/opencl/gl/CLGLContext.java
+++ b/src/com/jogamp/opencl/gl/CLGLContext.java
@@ -120,7 +120,10 @@ public final class CLGLContext extends CLContext {
}
// context must be current
- glContext.makeCurrent();
+ if(!glContext.isCurrent()) {
+ throw new IllegalArgumentException("OpenGL context is not current,\n"+
+ " creating a OpenCL context for context sharing is not allowed in this situation.");
+ }
GLContextImpl ctxImpl = (GLContextImpl)glContext;
glID[0] = glContext.getHandle();