summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-04-22 03:38:54 +0200
committerSven Gothel <[email protected]>2010-04-22 03:38:54 +0200
commit79ad31bd9fcf0fbf6e4b9aa40619f8675e18e29c (patch)
treedb58b60d7f68e52abf86480d55dc4db4e7ec0807 /src/com
parentb83e44a53af30d624e0485b92128bd98a45e6a67 (diff)
Quick test/fix for GL/CL shared memory devices
Diffstat (limited to 'src/com')
-rw-r--r--src/com/jogamp/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/jogamp/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java b/src/com/jogamp/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java
index 24af1fe..3abe1de 100644
--- a/src/com/jogamp/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java
+++ b/src/com/jogamp/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java
@@ -124,6 +124,9 @@ public class GLCLInteroperabilityDemo implements GLEventListener {
break;
}
}
+ if(null==device) {
+ throw new RuntimeException("couldn't find any CL/GL memory sharing devices ..");
+ }
// create OpenCL context before creating any OpenGL objects
// you want to share with OpenCL (AMD driver requirement)
clContext = CLGLContext.create(drawable.getContext(), device);
@@ -274,4 +277,4 @@ public class GLCLInteroperabilityDemo implements GLEventListener {
new GLCLInteroperabilityDemo();
}
-} \ No newline at end of file
+}