summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/gl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-06-28 22:32:22 +0200
committerSven Gothel <[email protected]>2011-06-28 22:32:22 +0200
commit20a94528161909e12fdcbd06cf5affe89a37efb9 (patch)
treed4084b90238b1a318e308039f2492092cad438e6 /src/com/jogamp/opencl/gl
parent3016f4fe04dcabdd82d2475a7c23d3b47e1c8766 (diff)
parent560d4b4958c2838a934fb2008357a7a85e61b546 (diff)
Fix merge w/ latest mbien/edge
Diffstat (limited to 'src/com/jogamp/opencl/gl')
-rw-r--r--src/com/jogamp/opencl/gl/CLGLContext.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/com/jogamp/opencl/gl/CLGLContext.java b/src/com/jogamp/opencl/gl/CLGLContext.java
index f7214b6e..dcddd3df 100644
--- a/src/com/jogamp/opencl/gl/CLGLContext.java
+++ b/src/com/jogamp/opencl/gl/CLGLContext.java
@@ -34,7 +34,7 @@ import com.jogamp.opencl.CLDevice;
import java.nio.Buffer;
import com.jogamp.opencl.CLMemory.Mem;
import com.jogamp.opencl.CLPlatform;
-import com.jogamp.common.nio.NativeSizeBuffer;
+import com.jogamp.common.nio.PointerBuffer;
import jogamp.opengl.GLContextImpl;
import jogamp.opengl.egl.EGLContext;
import jogamp.opengl.macosx.cgl.MacOSXCGLContext;
@@ -97,7 +97,7 @@ public final class CLGLContext extends CLContext {
}
long[] glID = new long[1];
- NativeSizeBuffer properties = setupContextProperties(platform, glContext, glID);
+ PointerBuffer properties = setupContextProperties(platform, glContext, glID);
ErrorDispatcher dispatcher = createErrorHandler();
long clID = createContextFromType(platform, dispatcher, properties, toDeviceBitmap(deviceTypes));
@@ -121,7 +121,7 @@ public final class CLGLContext extends CLContext {
CLPlatform platform = devices[0].getPlatform();
long[] glID = new long[1];
- NativeSizeBuffer properties = setupContextProperties(platform, glContext, glID);
+ PointerBuffer properties = setupContextProperties(platform, glContext, glID);
ErrorDispatcher dispatcher = createErrorHandler();
long clID = createContext(platform, dispatcher, properties, devices);
@@ -135,7 +135,7 @@ public final class CLGLContext extends CLContext {
}
- private static NativeSizeBuffer setupContextProperties(CLPlatform platform, GLContext glContext, long[] glID) {
+ private static PointerBuffer setupContextProperties(CLPlatform platform, GLContext glContext, long[] glID) {
if(platform == null) {
throw new RuntimeException("no OpenCL installation found");
@@ -153,14 +153,14 @@ public final class CLGLContext extends CLContext {
GLContextImpl ctxImpl = (GLContextImpl)glContext;
glID[0] = glContext.getHandle();
- NativeSizeBuffer properties;
+ PointerBuffer properties;
if(glContext instanceof X11GLXContext) {
// spec: "When the GLX binding API is supported, the attribute
// CL_GL_CONTEXT_KHR should be set to a GLXContext handle to an
// OpenGL context, and the attribute CL_GLX_DISPLAY_KHR should be
// set to the Display handle of the X Window System display used to
// create the OpenGL context."
- properties = NativeSizeBuffer.allocateDirect(7);
+ properties = PointerBuffer.allocateDirect(7);
long displayHandle = ctxImpl.getDrawableImpl().getNativeSurface().getDisplayHandle();
properties.put(CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL_GLX_DISPLAY_KHR).put(displayHandle)
@@ -170,7 +170,7 @@ public final class CLGLContext extends CLContext {
// CL_GL_CONTEXT_KHR should be set to an HGLRC handle to an OpenGL
// context, and the attribute CL_WGL_HDC_KHR should be set to the
// HDC handle of the display used to create the OpenGL context."
- properties = NativeSizeBuffer.allocateDirect(7);
+ properties = PointerBuffer.allocateDirect(7);
long surfaceHandle = ctxImpl.getDrawableImpl().getNativeSurface().getSurfaceHandle();
properties.put(CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL_WGL_HDC_KHR).put(surfaceHandle)
@@ -181,7 +181,7 @@ public final class CLGLContext extends CLContext {
// a CGL share group object."
long cgl = CGL.getCGLContext(glID[0]);
long group = CGL.CGLGetShareGroup(cgl);
- properties = NativeSizeBuffer.allocateDirect(5);
+ properties = PointerBuffer.allocateDirect(5);
properties.put(CL_CGL_SHAREGROUP_KHR).put(group)
.put(CL_CONTEXT_PLATFORM).put(platform.ID);
}else if(glContext instanceof EGLContext) {
@@ -191,7 +191,7 @@ public final class CLGLContext extends CLContext {
// OpenGL ES or OpenGL context, and the attribute
// CL_EGL_DISPLAY_KHR should be set to the EGLDisplay handle of the
// display used to create the OpenGL ES or OpenGL context."
- properties = NativeSizeBuffer.allocateDirect(7);
+ properties = PointerBuffer.allocateDirect(7);
long displayHandle = ctxImpl.getDrawableImpl().getNativeSurface().getDisplayHandle();
properties.put(CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL_EGL_DISPLAY_KHR).put(displayHandle)