summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/demos/fractal
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-05-18 05:58:26 +0200
committerSven Gothel <[email protected]>2011-05-18 05:58:26 +0200
commitbe2915e8eb6c1b230514a93c25a08f05217db8ea (patch)
tree867693b667db614c94bfd5ad2c69aefeef3ac896 /src/com/jogamp/opencl/demos/fractal
parentbb3cc47fefe772fdb9977daf34d7f7289183ad7d (diff)
sync with JOCL c6f97a2e6ea1d337f371152a2fee65ee1dd4c5d5
Diffstat (limited to 'src/com/jogamp/opencl/demos/fractal')
-rw-r--r--src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java b/src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java
index 9fcd172..9c6b648 100644
--- a/src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java
+++ b/src/com/jogamp/opencl/demos/fractal/MultiDeviceFractal.java
@@ -280,12 +280,12 @@ public class MultiDeviceFractal implements GLEventListener {
// setup one empty PBO per slice
for (int i = 0; i < slices; i++) {
+ final int size = width*height * SIZEOF_INT / slices ;
gl.glBindBuffer(GL_PIXEL_UNPACK_BUFFER, pbo[i]);
- gl.glBufferData(GL_PIXEL_UNPACK_BUFFER, width*height * SIZEOF_INT / slices, null, GL_STREAM_DRAW);
+ gl.glBufferData(GL_PIXEL_UNPACK_BUFFER, size, null, GL_STREAM_DRAW);
gl.glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0);
- pboBuffers[i] = clContext.createFromGLBuffer(pbo[i], WRITE_ONLY);
-
+ pboBuffers[i] = clContext.createFromGLBuffer(pbo[i], size, WRITE_ONLY);
}
buffersInitialized = true;
@@ -386,9 +386,9 @@ public class MultiDeviceFractal implements GLEventListener {
.rewind();
// aquire GL objects, and enqueue a kernel with a probe from the list
- queues[i].putAcquireGLObject(pboBuffers[i].ID)
+ queues[i].putAcquireGLObject(pboBuffers[i])
.put2DRangeKernel(kernels[i], 0, 0, sliceWidth, height, 0, 0, probes)
- .putReleaseGLObject(pboBuffers[i].ID);
+ .putReleaseGLObject(pboBuffers[i]);
}