diff options
Diffstat (limited to 'src/com/jogamp')
-rw-r--r-- | src/com/jogamp/opencl/gl/CLGLImage2d.java | 2 | ||||
-rw-r--r-- | src/com/jogamp/opencl/gl/CLGLTexture2d.java | 2 | ||||
-rw-r--r-- | src/com/jogamp/opencl/gl/CLGLTexture3d.java | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/com/jogamp/opencl/gl/CLGLImage2d.java b/src/com/jogamp/opencl/gl/CLGLImage2d.java index dd6b9d5a..05e03f8c 100644 --- a/src/com/jogamp/opencl/gl/CLGLImage2d.java +++ b/src/com/jogamp/opencl/gl/CLGLImage2d.java @@ -37,6 +37,7 @@ import com.jogamp.opencl.llb.impl.CLImageFormatImpl; import java.nio.Buffer; import javax.media.opengl.GLContext; +import static com.jogamp.opencl.CLException.*; import static com.jogamp.opencl.llb.CL.*; /** @@ -64,6 +65,7 @@ public class CLGLImage2d<B extends Buffer> extends CLImage2d<B> implements CLGLO CLGL clgli = (CLGL)cl; long id = clgli.clCreateFromGLRenderbuffer(context.ID, flags, glObject, result, 0); + checkForError(result[0], "can not share memory with gl renderbuffer #"+glObject+"."); return createImage(context, id, directBuffer, glObject, flags); } diff --git a/src/com/jogamp/opencl/gl/CLGLTexture2d.java b/src/com/jogamp/opencl/gl/CLGLTexture2d.java index 7cbd95d5..3d9e1bfd 100644 --- a/src/com/jogamp/opencl/gl/CLGLTexture2d.java +++ b/src/com/jogamp/opencl/gl/CLGLTexture2d.java @@ -63,7 +63,7 @@ public class CLGLTexture2d<B extends Buffer> extends CLGLImage2d<B> implements C CLGL clgli = (CLGL)cl; long id = clgli.clCreateFromGLTexture2D(context.ID, flags, target, mipLevel, texture, result, 0); - checkForError((int)id, "can not share memory with texture #"+texture+"."); + checkForError(result[0], "can not share memory with texture #"+texture+"."); 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 8dd2682c..03731620 100644 --- a/src/com/jogamp/opencl/gl/CLGLTexture3d.java +++ b/src/com/jogamp/opencl/gl/CLGLTexture3d.java @@ -37,6 +37,7 @@ import com.jogamp.opencl.llb.impl.CLImageFormatImpl; import java.nio.Buffer; import javax.media.opengl.GLContext; +import static com.jogamp.opencl.CLException.*; import static com.jogamp.opencl.llb.CL.*; /** @@ -70,6 +71,7 @@ public class CLGLTexture3d<B extends Buffer> extends CLImage3d<B> implements CLG CLGL clgli = (CLGL)cl; long id = clgli.clCreateFromGLTexture3D(context.ID, flags, target, mipLevel, texture, result, 0); + checkForError(result[0], "can not share memory with texture #"+texture+"."); CLImageInfoAccessor accessor = new CLImageInfoAccessor(cl, id); |