aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-10-15 15:24:20 +0200
committerMichael Bien <[email protected]>2010-10-15 15:24:20 +0200
commit5dbe8762cb190d207438da084b5b0cadd10a370a (patch)
tree8418612ec1e343d84a2bd3714c3b7173eb9793b6 /src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java
parent192614e9166583929e43bfea065a3a6264624e4a (diff)
changes due to modifications in jogl
Diffstat (limited to 'src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java')
-rw-r--r--src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java9
1 files changed, 5 insertions, 4 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);