aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java9
-rw-r--r--src/com/jogamp/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java2
-rw-r--r--src/com/jogamp/opencl/demos/julia3d/Julia3d.java2
3 files changed, 7 insertions, 6 deletions
diff --git a/src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java b/src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java
index f9bb7cd..3de851d 100644
--- a/src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java
+++ b/src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java
@@ -141,11 +141,12 @@ public class MultiDeviceFractal implements GLEventListener {
private void initCL(GLContext glCtx){
try {
+ CLPlatform platform = CLPlatform.getDefault();
// SLI on NV platform wasn't very fast (or did not work at all -> CL_INVALID_OPERATION)
- if(CLPlatform.getDefault().getName().toLowerCase().contains("nvidia")) {
- clContext = CLGLContext.create(glCtx, CLPlatform.getDefault().getMaxFlopsDevice(GPU));
+ if(platform.getICDSuffix().equals("NV")) {
+ clContext = CLGLContext.create(glCtx, platform.getMaxFlopsDevice(GPU));
}else{
- clContext = CLGLContext.create(glCtx, ALL);
+ clContext = CLGLContext.create(glCtx, platform, ALL);
}
CLDevice[] devices = clContext.getDevices();
@@ -527,7 +528,7 @@ public class MultiDeviceFractal implements GLEventListener {
}
public static void main(String args[]) {
- GLProfile.initSingleton();
+ GLProfile.initSingleton(true);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new MultiDeviceFractal(512, 512);
diff --git a/src/com/jogamp/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java b/src/com/jogamp/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java
index 8a0d018..1ba9c6e 100644
--- a/src/com/jogamp/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java
+++ b/src/com/jogamp/opencl/demos/joglinterop/GLCLInteroperabilityDemo.java
@@ -274,7 +274,7 @@ public class GLCLInteroperabilityDemo implements GLEventListener {
public void dispose(GLAutoDrawable drawable) { }
public static void main(String[] args) {
- GLProfile.initSingleton();
+ GLProfile.initSingleton(true);
new GLCLInteroperabilityDemo();
}
diff --git a/src/com/jogamp/opencl/demos/julia3d/Julia3d.java b/src/com/jogamp/opencl/demos/julia3d/Julia3d.java
index 4216af8..9f032cf 100644
--- a/src/com/jogamp/opencl/demos/julia3d/Julia3d.java
+++ b/src/com/jogamp/opencl/demos/julia3d/Julia3d.java
@@ -189,7 +189,7 @@ public class Julia3d {
public static void main(String[] args) {
- GLProfile.initSingleton();
+ GLProfile.initSingleton(true);
RenderingConfig config = RenderingConfig.create()
.setWidth(640).setHeight(480)
.setEnableShadow(1)