Jogamp
Fixing some argument order issues; fixing creation of CLContext on Mac OS X with...
authorLixo Man <lixoman100@gmail.com>
Wed, 4 Sep 2013 16:57:09 +0000 (13:57 -0300)
committerLixo Man <lixoman100@gmail.com>
Wed, 4 Sep 2013 16:57:09 +0000 (13:57 -0300)
src/com/jogamp/opencl/CLCommandQueue.java
src/com/jogamp/opencl/gl/CLGLContext.java

index 2e21ca0..7334f0c 100644 (file)
@@ -1036,7 +1036,7 @@ public class CLCommandQueue extends CLObjectResource {
         copy2NIO(ibA, srcOriginX, srcOriginY, 0);
         copy2NIO(ibB, rangeX, rangeY, 1);
 
-        int ret = cl.clEnqueueCopyImageToBuffer(ID, dstBuffer.ID, srcImage.ID,
+        int ret = cl.clEnqueueCopyImageToBuffer(ID, srcImage.ID, dstBuffer.ID,
                                          ibA, ibB, dstOffset,
                                          conditions, conditionIDs, events==null ? null : events.IDs);
         if(ret != CL_SUCCESS) {
@@ -1101,7 +1101,7 @@ public class CLCommandQueue extends CLObjectResource {
         copy2NIO(ibA, srcOriginX, srcOriginY, srcOriginZ);
         copy2NIO(ibB, rangeX, rangeY, rangeZ);
 
-        int ret = cl.clEnqueueCopyImageToBuffer(ID, dstBuffer.ID, srcImage.ID,
+        int ret = cl.clEnqueueCopyImageToBuffer(ID, srcImage.ID, dstBuffer.ID,
                                          ibA, ibB, dstOffset,
                                          conditions, conditionIDs, events==null ? null : events.IDs);
         if(ret != CL_SUCCESS) {
index 6194d88..005e961 100644 (file)
@@ -182,7 +182,7 @@ public final class CLGLContext extends CLContext {
             long cgl = CGL.getCGLContext(glID[0]);
             long group = CGL.CGLGetShareGroup(cgl);
             properties = PointerBuffer.allocateDirect(5);
-            properties.put(CL_CGL_SHAREGROUP_KHR).put(group)
+            properties.put(268435456).put(group) // CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE
                       .put(CL_CONTEXT_PLATFORM).put(platform.ID);
         }else if(glContext instanceof EGLContext) {
 //            TODO test EGL
@@ -300,7 +300,7 @@ public final class CLGLContext extends CLContext {
     }
 
     public final <B extends Buffer> CLGLTexture3d<B> createFromGLTexture3d(B directBuffer, int target, int texture, int mipmap, int flags) {
-        CLGLTexture3d<B> buffer = CLGLTexture3d.createFromGLTexture3d(this, directBuffer, target, texture, mipmap, flags);
+        CLGLTexture3d<B> buffer = CLGLTexture3d.createFromGLTexture3d(this, directBuffer, flags, target, mipmap, texture);
         memoryObjects.add(buffer);
         return buffer;
     }
http://JogAmp.org git info: FAQ, tutorial and man pages.