From 5dbe8762cb190d207438da084b5b0cadd10a370a Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Fri, 15 Oct 2010 15:24:20 +0200 Subject: changes due to modifications in jogl --- src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java | 9 +++++---- .../opencl/demos/joglinterop/GLCLInteroperabilityDemo.java | 2 +- src/com/jogamp/opencl/demos/julia3d/Julia3d.java | 2 +- 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) -- cgit v1.2.3