summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorWade Walker <[email protected]>2015-10-04 14:08:22 -0500
committerWade Walker <[email protected]>2015-11-08 14:05:31 -0600
commit0135df38d6ccdf17283a26c9c56adb08a0e6d30e (patch)
tree5dc9c2b4cee919684cbff454860052fadded2705 /src/com
parent37c656e3290ff855e1752f9b8a4b830da3000b85 (diff)
Remove CLGL interface
This removes the last sub-interface that would have to be separately versioned for future versions of OpenCL. After this, new OpenCL versions will only create one new interface and one new implementation.
Diffstat (limited to 'src/com')
-rw-r--r--src/com/jogamp/opencl/CLCommandQueue.java9
-rw-r--r--src/com/jogamp/opencl/CLEvent.java1
-rw-r--r--src/com/jogamp/opencl/CLException.java17
-rw-r--r--src/com/jogamp/opencl/CLMemory.java2
-rw-r--r--src/com/jogamp/opencl/gl/CLGLBuffer.java7
-rw-r--r--src/com/jogamp/opencl/gl/CLGLContext.java13
-rw-r--r--src/com/jogamp/opencl/gl/CLGLImage2d.java4
-rw-r--r--src/com/jogamp/opencl/gl/CLGLTexture2d.java4
-rw-r--r--src/com/jogamp/opencl/gl/CLGLTexture3d.java4
9 files changed, 23 insertions, 38 deletions
diff --git a/src/com/jogamp/opencl/CLCommandQueue.java b/src/com/jogamp/opencl/CLCommandQueue.java
index 5dda0946..f95576b6 100644
--- a/src/com/jogamp/opencl/CLCommandQueue.java
+++ b/src/com/jogamp/opencl/CLCommandQueue.java
@@ -47,7 +47,6 @@ import com.jogamp.common.nio.CachedBufferFactory;
import com.jogamp.common.nio.PointerBuffer;
import com.jogamp.opencl.gl.CLGLObject;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.gl.CLGL;
/**
* The command queue is used to queue a set of operations for a specific {@link CLDevice}.
@@ -1701,9 +1700,7 @@ public class CLCommandQueue extends CLObjectResource {
conditions = condition.size;
}
- final CLGL xl = (CLGL) cl;
-
- final int ret = xl.clEnqueueAcquireGLObjects(ID, glObjectIDs.remaining(), glObjectIDs,
+ final int ret = cl.clEnqueueAcquireGLObjects(ID, glObjectIDs.remaining(), glObjectIDs,
conditions, conditionIDs,
events==null ? null : events.IDs);
@@ -1770,9 +1767,7 @@ public class CLCommandQueue extends CLObjectResource {
conditions = condition.size;
}
- final CLGL xl = (CLGL) cl;
-
- final int ret = xl.clEnqueueReleaseGLObjects(ID, glObjectIDs.remaining(), glObjectIDs,
+ final int ret = cl.clEnqueueReleaseGLObjects(ID, glObjectIDs.remaining(), glObjectIDs,
conditions, conditionIDs,
events==null ? null : events.IDs);
diff --git a/src/com/jogamp/opencl/CLEvent.java b/src/com/jogamp/opencl/CLEvent.java
index 2406f4ac..af22e24a 100644
--- a/src/com/jogamp/opencl/CLEvent.java
+++ b/src/com/jogamp/opencl/CLEvent.java
@@ -35,7 +35,6 @@ import com.jogamp.common.nio.PointerBuffer;
import java.nio.Buffer;
import static com.jogamp.opencl.llb.CL.*;
-import static com.jogamp.opencl.llb.gl.CLGL.*;
import static com.jogamp.opencl.CLException.*;
/**
diff --git a/src/com/jogamp/opencl/CLException.java b/src/com/jogamp/opencl/CLException.java
index c8ad3fde..890c2036 100644
--- a/src/com/jogamp/opencl/CLException.java
+++ b/src/com/jogamp/opencl/CLException.java
@@ -28,7 +28,6 @@
package com.jogamp.opencl;
-import com.jogamp.opencl.llb.gl.CLGL;
import com.jogamp.opencl.llb.CL;
/**
@@ -146,8 +145,8 @@ public class CLException extends RuntimeException {
case CL.CL_PLATFORM_NOT_FOUND_KHR: return "CL_PLATFORM_NOT_FOUND_KHR";
case CL.CL_MISALIGNED_SUB_BUFFER_OFFSET: return "CL_MISALIGNED_SUB_BUFFER_OFFSET";
case CL.CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST: return "CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST";
- case CLGL.CL_INVALID_GL_OBJECT: return "CL_INVALID_GL_OBJECT";
- case CLGL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR: return "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR";
+ case CL.CL_INVALID_GL_OBJECT: return "CL_INVALID_GL_OBJECT";
+ case CL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR: return "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR";
default: return null;
}
}
@@ -203,8 +202,8 @@ public class CLException extends RuntimeException {
case CL.CL_PLATFORM_NOT_FOUND_KHR: return new CLPlatformNotFoundKhrException(message);
case CL.CL_MISALIGNED_SUB_BUFFER_OFFSET: return new CLMisalignedSubBufferOffsetException(message);
case CL.CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST: return new CLExecStatusErrorForEventsInWaitListException(message);
- case CLGL.CL_INVALID_GL_OBJECT: return new CLInvalidGLObjectException(message);
- case CLGL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR: return new CLInvalidGLSharegroupReferenceKhrException(message);
+ case CL.CL_INVALID_GL_OBJECT: return new CLInvalidGLObjectException(message);
+ case CL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR: return new CLInvalidGLSharegroupReferenceKhrException(message);
default: return null;
}
}
@@ -664,9 +663,9 @@ public class CLException extends RuntimeException {
*
*/
public final static class CLInvalidGLObjectException extends CLException {
- private static final long serialVersionUID = CLException.serialVersionUID+CLGL.CL_INVALID_GL_OBJECT;
+ private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_INVALID_GL_OBJECT;
public CLInvalidGLObjectException(final String message) {
- super(CLGL.CL_INVALID_GL_OBJECT, "CL_INVALID_GL_OBJECT", message);
+ super(CL.CL_INVALID_GL_OBJECT, "CL_INVALID_GL_OBJECT", message);
}
}
@@ -719,9 +718,9 @@ public class CLException extends RuntimeException {
*
*/
public final static class CLInvalidGLSharegroupReferenceKhrException extends CLException {
- private static final long serialVersionUID = CLException.serialVersionUID+CLGL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR;
+ private static final long serialVersionUID = CLException.serialVersionUID+CL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR;
public CLInvalidGLSharegroupReferenceKhrException(final String message) {
- super(CLGL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR, "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR", message);
+ super(CL.CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR, "CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR", message);
}
}
diff --git a/src/com/jogamp/opencl/CLMemory.java b/src/com/jogamp/opencl/CLMemory.java
index cf1d8802..6a28d0a5 100644
--- a/src/com/jogamp/opencl/CLMemory.java
+++ b/src/com/jogamp/opencl/CLMemory.java
@@ -39,7 +39,7 @@ import java.util.EnumSet;
import java.util.List;
import static com.jogamp.opencl.CLException.*;
-import static com.jogamp.opencl.llb.gl.CLGL.*;
+import static com.jogamp.opencl.llb.CL.*;
/**
* Common superclass for all OpenCL memory types.
diff --git a/src/com/jogamp/opencl/gl/CLGLBuffer.java b/src/com/jogamp/opencl/gl/CLGLBuffer.java
index 11d3a553..660f243f 100644
--- a/src/com/jogamp/opencl/gl/CLGLBuffer.java
+++ b/src/com/jogamp/opencl/gl/CLGLBuffer.java
@@ -32,7 +32,7 @@ import com.jogamp.opencl.CLBuffer;
import com.jogamp.opencl.CLCommandQueue;
import com.jogamp.opencl.CLContext;
import com.jogamp.opencl.CLException;
-import com.jogamp.opencl.llb.gl.CLGL;
+import com.jogamp.opencl.llb.CL;
import java.nio.Buffer;
import com.jogamp.opengl.GLContext;
@@ -59,10 +59,9 @@ public final class CLGLBuffer<B extends Buffer> extends CLBuffer<B> implements C
static <B extends Buffer> CLGLBuffer<B> create(final CLContext context, final B directBuffer, final long size, final int flags, final int glBuffer) {
checkBuffer(directBuffer, flags);
- final CLGL clgli = (CLGL)getCL(context);
-
+ final CL cl = getCL(context);
final int[] result = new int[1];
- final long id = clgli.clCreateFromGLBuffer(context.ID, flags, glBuffer, result, 0);
+ final long id = cl.clCreateFromGLBuffer(context.ID, flags, glBuffer, result, 0);
CLException.checkForError(result[0], "can not create CLGLObject from glBuffer #"+glBuffer);
return new CLGLBuffer<B>(context, directBuffer, id, glBuffer, size, flags);
diff --git a/src/com/jogamp/opencl/gl/CLGLContext.java b/src/com/jogamp/opencl/gl/CLGLContext.java
index e1d7d0ce..44f349cd 100644
--- a/src/com/jogamp/opencl/gl/CLGLContext.java
+++ b/src/com/jogamp/opencl/gl/CLGLContext.java
@@ -45,7 +45,6 @@ import com.jogamp.opencl.CLDevice;
import com.jogamp.opencl.CLMemory.Mem;
import com.jogamp.opencl.CLPlatform;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.gl.CLGL;
/**
* OpenCL Context supporting JOGL-JOCL interoperablity.
@@ -164,7 +163,7 @@ public final class CLGLContext extends CLContext {
// create the OpenGL context."
properties = PointerBuffer.allocateDirect(7);
final long displayHandle = ctxImpl.getDrawableImpl().getNativeSurface().getDisplayHandle();
- properties.put(CLGL.CL_GL_CONTEXT_KHR).put(glID[0])
+ properties.put(CL.CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL.CL_GLX_DISPLAY_KHR).put(displayHandle)
.put(CL.CL_CONTEXT_PLATFORM).put(platform.ID);
}else if(glContext instanceof WindowsWGLContext) {
@@ -174,7 +173,7 @@ public final class CLGLContext extends CLContext {
// HDC handle of the display used to create the OpenGL context."
properties = PointerBuffer.allocateDirect(7);
final long surfaceHandle = ctxImpl.getDrawableImpl().getNativeSurface().getSurfaceHandle();
- properties.put(CLGL.CL_GL_CONTEXT_KHR).put(glID[0])
+ properties.put(CL.CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL.CL_WGL_HDC_KHR).put(surfaceHandle)
.put(CL.CL_CONTEXT_PLATFORM).put(platform.ID);
}else if(glContext instanceof MacOSXCGLContext) {
@@ -191,7 +190,7 @@ public final class CLGLContext extends CLContext {
final long cgl = CGL.getCGLContext(glID[0]);
final long group = CGL.CGLGetShareGroup(cgl);
properties = PointerBuffer.allocateDirect(5);
- properties.put(CLGL.CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE).put(group)
+ properties.put(CL.CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE).put(group)
.put(CL.CL_CONTEXT_PLATFORM).put(platform.ID);
}else if(glContext instanceof EGLContext) {
// TODO test EGL
@@ -202,7 +201,7 @@ public final class CLGLContext extends CLContext {
// display used to create the OpenGL ES or OpenGL context."
properties = PointerBuffer.allocateDirect(7);
final long displayHandle = ctxImpl.getDrawableImpl().getNativeSurface().getDisplayHandle();
- properties.put(CLGL.CL_GL_CONTEXT_KHR).put(glID[0])
+ properties.put(CL.CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL.CL_EGL_DISPLAY_KHR).put(displayHandle)
.put(CL.CL_CONTEXT_PLATFORM).put(platform.ID);
}else{
@@ -318,8 +317,8 @@ public final class CLGLContext extends CLContext {
* Return the low level OpenCL interface with OpenGL interoperability.
*/
@Override
- public CLGL getCL() {
- return (CLGL)super.getCL();
+ public CL getCL() {
+ return super.getCL();
}
/**
diff --git a/src/com/jogamp/opencl/gl/CLGLImage2d.java b/src/com/jogamp/opencl/gl/CLGLImage2d.java
index 67616542..2422af93 100644
--- a/src/com/jogamp/opencl/gl/CLGLImage2d.java
+++ b/src/com/jogamp/opencl/gl/CLGLImage2d.java
@@ -29,7 +29,6 @@
package com.jogamp.opencl.gl;
import com.jogamp.opencl.llb.CL;
-import com.jogamp.opencl.llb.gl.CLGL;
import com.jogamp.opencl.CLContext;
import com.jogamp.opencl.CLException;
import com.jogamp.opencl.CLImage2d;
@@ -62,9 +61,8 @@ public class CLGLImage2d<B extends Buffer> extends CLImage2d<B> implements CLGLO
final CL cl = getCL(context);
final int[] result = new int[1];
- final CLGL clgli = (CLGL)cl;
- final long id = clgli.clCreateFromGLRenderbuffer(context.ID, flags, renderbuffer, result, 0);
+ final long id = cl.clCreateFromGLRenderbuffer(context.ID, flags, renderbuffer, result, 0);
CLException.checkForError(result[0], "can not create CLGLImage2d from renderbuffer #"+renderbuffer+".");
return createImage(context, id, directBuffer, renderbuffer, flags);
diff --git a/src/com/jogamp/opencl/gl/CLGLTexture2d.java b/src/com/jogamp/opencl/gl/CLGLTexture2d.java
index 9b68e524..7cc591fa 100644
--- a/src/com/jogamp/opencl/gl/CLGLTexture2d.java
+++ b/src/com/jogamp/opencl/gl/CLGLTexture2d.java
@@ -33,7 +33,6 @@ import com.jogamp.opencl.CLContext;
import com.jogamp.opencl.CLException;
import com.jogamp.opencl.CLImageFormat;
import com.jogamp.opencl.llb.impl.CLImageFormatImpl;
-import com.jogamp.opencl.llb.gl.CLGL;
import java.nio.Buffer;
@@ -59,9 +58,8 @@ public class CLGLTexture2d<B extends Buffer> extends CLGLImage2d<B> implements C
final CL cl = getCL(context);
final int[] result = new int[1];
- final CLGL clgli = (CLGL)cl;
- final long id = clgli.clCreateFromGLTexture2D(context.ID, flags, target, mipLevel, texture, result, 0);
+ final long id = cl.clCreateFromGLTexture2D(context.ID, flags, target, mipLevel, texture, result, 0);
CLException.checkForError(result[0], "can not create CLGLTexture2d from texture #"+texture+".");
final CLImageInfoAccessor accessor = new CLImageInfoAccessor(cl, id);
diff --git a/src/com/jogamp/opencl/gl/CLGLTexture3d.java b/src/com/jogamp/opencl/gl/CLGLTexture3d.java
index 24893dd1..d61c4553 100644
--- a/src/com/jogamp/opencl/gl/CLGLTexture3d.java
+++ b/src/com/jogamp/opencl/gl/CLGLTexture3d.java
@@ -28,7 +28,6 @@
package com.jogamp.opencl.gl;
-import com.jogamp.opencl.llb.gl.CLGL;
import com.jogamp.opencl.llb.CL;
import com.jogamp.opencl.CLContext;
import com.jogamp.opencl.CLException;
@@ -68,9 +67,8 @@ public class CLGLTexture3d<B extends Buffer> extends CLImage3d<B> implements CLG
final CL cl = getCL(context);
final int[] result = new int[1];
- final CLGL clgli = (CLGL)cl;
- final long id = clgli.clCreateFromGLTexture3D(context.ID, flags, target, mipLevel, texture, result, 0);
+ final long id = cl.clCreateFromGLTexture3D(context.ID, flags, target, mipLevel, texture, result, 0);
CLException.checkForError(result[0], "can not create CLGLTexture3d from texture #"+texture+".");
final CLImageInfoAccessor accessor = new CLImageInfoAccessor(cl, id);