diff options
author | Michael Bien <[email protected]> | 2010-01-21 14:11:39 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-01-21 14:11:39 +0100 |
commit | 96251f7aa2770d2d8278afbd6e4b603c24932049 (patch) | |
tree | 9e650b567654215393dd2622cfa59febe68c928d /src/com/mbien/opencl/CLGLContext.java | |
parent | 7a009264d53a4f9bc02fc01ea3cb12ef6cf432fe (diff) |
more device properties.
Diffstat (limited to 'src/com/mbien/opencl/CLGLContext.java')
-rw-r--r-- | src/com/mbien/opencl/CLGLContext.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/mbien/opencl/CLGLContext.java b/src/com/mbien/opencl/CLGLContext.java index 6336dfc8..48efb6c0 100644 --- a/src/com/mbien/opencl/CLGLContext.java +++ b/src/com/mbien/opencl/CLGLContext.java @@ -94,6 +94,13 @@ public final class CLGLContext extends CLContext { return GLObjectType.valueOf(array[0]); } + public int getGLObjectID(CLBuffer<?> buffer) { + int[] array = new int[1]; + int ret = ((CLGLI)cl).clGetGLObjectInfo(buffer.ID, null, 0, array, 0); + CLException.checkForError(ret, "error while asking for gl object info"); + return array[0]; + } + public enum GLObjectType { GL_OBJECT_BUFFER(CL_GL_OBJECT_BUFFER), |