summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/gl
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/mbien/opencl/gl')
-rw-r--r--src/com/mbien/opencl/gl/CLGLBuffer.java8
-rw-r--r--src/com/mbien/opencl/gl/CLGLImage2d.java10
-rw-r--r--src/com/mbien/opencl/gl/CLGLTexture2d.java6
-rw-r--r--src/com/mbien/opencl/gl/CLGLTexture3d.java6
4 files changed, 15 insertions, 15 deletions
diff --git a/src/com/mbien/opencl/gl/CLGLBuffer.java b/src/com/mbien/opencl/gl/CLGLBuffer.java
index 15256f84..1856e2ff 100644
--- a/src/com/mbien/opencl/gl/CLGLBuffer.java
+++ b/src/com/mbien/opencl/gl/CLGLBuffer.java
@@ -19,8 +19,8 @@ public final class CLGLBuffer<B extends Buffer> extends CLBuffer<B> implements C
*/
public final int GLID;
- private CLGLBuffer(CLContext context, B directBuffer, long id, int glObject) {
- super(context, directBuffer, id);
+ private CLGLBuffer(CLContext context, B directBuffer, long id, int glObject, int flags) {
+ super(context, directBuffer, id, flags);
this.GLID = glObject;
}
@@ -34,7 +34,7 @@ public final class CLGLBuffer<B extends Buffer> extends CLBuffer<B> implements C
long id = clgli.clCreateFromGLBuffer(context.ID, flags, glObject, result, 0);
- return new CLGLBuffer<B>(context, directBuffer, id, glObject);
+ return new CLGLBuffer<B>(context, directBuffer, id, glObject, flags);
}
static <B extends Buffer> void checkBuffer(B directBuffer, int flags) throws IllegalArgumentException {
@@ -56,7 +56,7 @@ public final class CLGLBuffer<B extends Buffer> extends CLBuffer<B> implements C
@Override
public <T extends Buffer> CLGLBuffer<T> cloneWith(T directBuffer) {
- return new CLGLBuffer<T>(context, directBuffer, ID, GLID);
+ return new CLGLBuffer<T>(context, directBuffer, ID, GLID, FLAGS);
}
@Override
diff --git a/src/com/mbien/opencl/gl/CLGLImage2d.java b/src/com/mbien/opencl/gl/CLGLImage2d.java
index 46affc2e..0561e757 100644
--- a/src/com/mbien/opencl/gl/CLGLImage2d.java
+++ b/src/com/mbien/opencl/gl/CLGLImage2d.java
@@ -21,8 +21,8 @@ public class CLGLImage2d<B extends Buffer> extends CLImage2d<B> implements CLGLO
*/
public final int GLID;
- protected CLGLImage2d(CLContext context, B directBuffer, CLImageFormat format, CLImageInfoAccessor accessor, int width, int height, long id, int glid) {
- super(context, directBuffer, format, accessor, width, height, id);
+ protected CLGLImage2d(CLContext context, B directBuffer, CLImageFormat format, CLImageInfoAccessor accessor, int width, int height, long id, int glid, int flags) {
+ super(context, directBuffer, format, accessor, width, height, id, flags);
this.GLID = glid;
}
@@ -36,10 +36,10 @@ public class CLGLImage2d<B extends Buffer> extends CLImage2d<B> implements CLGLO
long id = clgli.clCreateFromGLRenderbuffer(context.ID, flags, glObject, result, 0);
- return createImage(context, id, directBuffer, glObject);
+ return createImage(context, id, directBuffer, glObject, flags);
}
- static <B extends Buffer> CLGLImage2d<B> createImage(CLContext context, long id, B directBuffer, int glObject) {
+ static <B extends Buffer> CLGLImage2d<B> createImage(CLContext context, long id, B directBuffer, int glObject, int flags) {
CLImageInfoAccessor accessor = new CLImageInfoAccessor(getCL(context), id);
CLImageFormat format = createUninitializedImageFormat();
@@ -48,7 +48,7 @@ public class CLGLImage2d<B extends Buffer> extends CLImage2d<B> implements CLGLO
int width = (int)accessor.getLong(CL_IMAGE_WIDTH);
int height = (int)accessor.getLong(CL_IMAGE_HEIGHT);
- return new CLGLImage2d<B>(context, directBuffer, format, accessor, width, height, id, glObject);
+ return new CLGLImage2d<B>(context, directBuffer, format, accessor, width, height, id, glObject, flags);
}
@Override
diff --git a/src/com/mbien/opencl/gl/CLGLTexture2d.java b/src/com/mbien/opencl/gl/CLGLTexture2d.java
index 757022bc..eec6127c 100644
--- a/src/com/mbien/opencl/gl/CLGLTexture2d.java
+++ b/src/com/mbien/opencl/gl/CLGLTexture2d.java
@@ -19,8 +19,8 @@ public class CLGLTexture2d<B extends Buffer> extends CLGLImage2d<B> implements C
public final int mipMapLevel;
- public CLGLTexture2d(CLContext context, B directBuffer, CLImageFormat format, CLImageInfoAccessor accessor, int target, int mipLevel, int width, int height, long id, int glid) {
- super(context, directBuffer, format, accessor, width, height, id, glid);
+ public CLGLTexture2d(CLContext context, B directBuffer, CLImageFormat format, CLImageInfoAccessor accessor, int target, int mipLevel, int width, int height, long id, int glid, int flags) {
+ super(context, directBuffer, format, accessor, width, height, id, glid, flags);
this.target = target;
this.mipMapLevel = mipLevel;
}
@@ -43,7 +43,7 @@ public class CLGLTexture2d<B extends Buffer> extends CLGLImage2d<B> implements C
int width = (int)accessor.getLong(CL_IMAGE_WIDTH);
int height = (int)accessor.getLong(CL_IMAGE_HEIGHT);
- return new CLGLTexture2d<B>(context, directBuffer, format, accessor, target, mipLevel, width, height, id, width);
+ return new CLGLTexture2d<B>(context, directBuffer, format, accessor, target, mipLevel, width, height, id, width, flags);
}
diff --git a/src/com/mbien/opencl/gl/CLGLTexture3d.java b/src/com/mbien/opencl/gl/CLGLTexture3d.java
index 39224853..e1fef3a9 100644
--- a/src/com/mbien/opencl/gl/CLGLTexture3d.java
+++ b/src/com/mbien/opencl/gl/CLGLTexture3d.java
@@ -25,8 +25,8 @@ public class CLGLTexture3d<B extends Buffer> extends CLImage3d<B> implements CLG
public final int mipMapLevel;
- private CLGLTexture3d(CLContext context, B directBuffer, CLImageFormat format, CLImageInfoAccessor accessor, int target, int mipLevel, int width, int height, int depth, long id, int glid) {
- super(context, directBuffer, format, accessor, width, height, depth, id);
+ private CLGLTexture3d(CLContext context, B directBuffer, CLImageFormat format, CLImageInfoAccessor accessor, int target, int mipLevel, int width, int height, int depth, long id, int glid, int flags) {
+ super(context, directBuffer, format, accessor, width, height, depth, id, flags);
this.GLID = glid;
this.target = target;
this.mipMapLevel = mipLevel;
@@ -51,7 +51,7 @@ public class CLGLTexture3d<B extends Buffer> extends CLImage3d<B> implements CLG
int height = (int)accessor.getLong(CL_IMAGE_HEIGHT);
int depth = (int)accessor.getLong(CL_IMAGE_DEPTH);
- return new CLGLTexture3d<B>(context, directBuffer, format, accessor, target, mipLevel, width, height, depth, id, texture);
+ return new CLGLTexture3d<B>(context, directBuffer, format, accessor, target, mipLevel, width, height, depth, id, texture, flags);
}
public int getGLObjectID() {