summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/gl/CLGLBuffer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/mbien/opencl/gl/CLGLBuffer.java')
-rw-r--r--src/com/mbien/opencl/gl/CLGLBuffer.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/com/mbien/opencl/gl/CLGLBuffer.java b/src/com/mbien/opencl/gl/CLGLBuffer.java
index 1856e2ff..97a25626 100644
--- a/src/com/mbien/opencl/gl/CLGLBuffer.java
+++ b/src/com/mbien/opencl/gl/CLGLBuffer.java
@@ -5,6 +5,7 @@ import com.mbien.opencl.CLBuffer;
import com.mbien.opencl.CLContext;
import com.mbien.opencl.CLMemory.GLObjectType;
import java.nio.Buffer;
+import javax.media.opengl.GLContext;
/**
@@ -55,6 +56,15 @@ public final class CLGLBuffer<B extends Buffer> extends CLBuffer<B> implements C
}
@Override
+ public CLGLContext getContext() {
+ return (CLGLContext) super.getContext();
+ }
+
+ public GLContext getGLContext() {
+ return getContext().getGLContext();
+ }
+
+ @Override
public <T extends Buffer> CLGLBuffer<T> cloneWith(T directBuffer) {
return new CLGLBuffer<T>(context, directBuffer, ID, GLID, FLAGS);
}