diff options
author | Michael Bien <[email protected]> | 2011-09-22 18:06:24 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2011-09-22 18:06:24 +0200 |
commit | 0168c96734d12015cf8176e62f0b1dbfa18dadf4 (patch) | |
tree | 8d221accb6e5f5643d66083a098d8d2207ad3e18 /src/com/jogamp/opencl/gl/CLGLTexture3d.java | |
parent | b87b657642b6bda35bed85e8b43b3b68ac994c25 (diff) |
NV driver doesn't like it if a shared CLGL context is released without releasing the GL context.
context.release() is now commented out in the junit test since what we want is to test jocl and not the driver.
- added missing error check in CLGLTexture and CLGLImage factory methods
- junit test method for CLGLTexture2d
Diffstat (limited to 'src/com/jogamp/opencl/gl/CLGLTexture3d.java')
-rw-r--r-- | src/com/jogamp/opencl/gl/CLGLTexture3d.java | 2 |
1 files changed, 2 insertions, 0 deletions
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); |