aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLImage3d.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-02-27 00:44:33 +0100
committerMichael Bien <[email protected]>2010-02-27 00:44:33 +0100
commit34bb39283a30919212b682c34bb54d8cd3626cbd (patch)
tree5f70f3473cdfffa8562a558cebcec6aa30af8fc7 /src/com/mbien/opencl/CLImage3d.java
parent75d392f3fff6d47fdccae9a8915fea61cdbef990 (diff)
refactored CLGLBuffer into seperate OpenGL buffer and image types.
Diffstat (limited to 'src/com/mbien/opencl/CLImage3d.java')
-rw-r--r--src/com/mbien/opencl/CLImage3d.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/com/mbien/opencl/CLImage3d.java b/src/com/mbien/opencl/CLImage3d.java
index 2549ff21..681f4fbe 100644
--- a/src/com/mbien/opencl/CLImage3d.java
+++ b/src/com/mbien/opencl/CLImage3d.java
@@ -11,7 +11,7 @@ import static com.mbien.opencl.CLException.*;
*
* @author Michael Bien
*/
-public final class CLImage3d<B extends Buffer> extends CLImage<B> {
+public class CLImage3d<B extends Buffer> extends CLImage<B> {
public final int depth;
@@ -20,6 +20,12 @@ public final class CLImage3d<B extends Buffer> extends CLImage<B> {
this.depth = depth;
}
+ protected CLImage3d(CLContext context, B directBuffer, CLImageFormat format, CLImageInfoAccessor accessor, int width, int height, int depth, long id) {
+ super(context, directBuffer, format, accessor, width, height, id);
+ this.depth = depth;
+ }
+
+
static <B extends Buffer> CLImage3d<B> createImage(CLContext context, B directBuffer,
int width, int height, int depth, int rowPitch, int slicePitch, CLImageFormat format, int flags) {
@@ -50,4 +56,9 @@ public final class CLImage3d<B extends Buffer> extends CLImage<B> {
public int getDepth() {
return depth;
}
+
+ @Override
+ public String toString() {
+ return "CLImage3d [id: " + ID+" width: "+width+" height: "+height+" depth: "+depth+"]";
+ }
}