From 826dacffbae941a35a7cc74515751ddb1d5711a2 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Sun, 19 Jun 2011 22:31:05 +0200 Subject: - added isReleased() to CLResource, made CLObject public. - a CLResource will throw an Exception if released twice. --- src/com/jogamp/opencl/CLSampler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/com/jogamp/opencl/CLSampler.java') diff --git a/src/com/jogamp/opencl/CLSampler.java b/src/com/jogamp/opencl/CLSampler.java index 141deb5a..3f145b3b 100644 --- a/src/com/jogamp/opencl/CLSampler.java +++ b/src/com/jogamp/opencl/CLSampler.java @@ -43,7 +43,7 @@ import static com.jogamp.opencl.util.CLUtil.*; * @see CLContext#createSampler(com.jogamp.opencl.CLSampler.AddressingMode, com.jogamp.opencl.CLSampler.FilteringMode, boolean) * @author Michael Bien */ -public class CLSampler extends CLObject implements CLResource { +public class CLSampler extends CLObjectResource { private final CLSamplerInfoAccessor samplerInfo; private final CLSamplerBinding binding; @@ -80,6 +80,7 @@ public class CLSampler extends CLObject implements CLResource { @Override public void release() { + super.release(); int ret = binding.clReleaseSampler(ID); context.onSamplerReleased(this); if(ret != CL_SUCCESS) { -- cgit v1.2.3