summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/gl/CLGLContext.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-05-18 04:00:45 +0200
committerSven Gothel <[email protected]>2011-05-18 04:00:45 +0200
commitc6f97a2e6ea1d337f371152a2fee65ee1dd4c5d5 (patch)
tree352756b92e3a6f9541848dc4cb8f73a6268e59cf /src/com/jogamp/opencl/gl/CLGLContext.java
parent773060662ef81707f70c447b71e664635ac45e2a (diff)
Synced w/ mbien's JOCL branch - Making it compatible w/ GlueGen again
Diffstat (limited to 'src/com/jogamp/opencl/gl/CLGLContext.java')
-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 ee6c2108..5f12d033 100644
--- a/src/com/jogamp/opencl/gl/CLGLContext.java
+++ b/src/com/jogamp/opencl/gl/CLGLContext.java
@@ -33,7 +33,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;
@@ -96,7 +96,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(dispatcher, properties, toDeviceBitmap(deviceTypes));
@@ -120,7 +120,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(dispatcher, properties, devices);
@@ -134,7 +134,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");
@@ -152,14 +152,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)
@@ -169,7 +169,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)
@@ -180,7 +180,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) {
@@ -190,7 +190,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)