summaryrefslogtreecommitdiffstats
path: root/src/com/jogamp/opencl/gl
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-04-15 21:36:21 +0200
committerMichael Bien <[email protected]>2010-04-15 21:36:21 +0200
commitbb14f43134a9332c014e969b600e094edadd2fb0 (patch)
treea63678de5a0b8b5f5c21bd732b159ba151c274f9 /src/com/jogamp/opencl/gl
parent966153e376f9932cea29d8bd891a164115a4049c (diff)
code review: improved exception messages to be more verbose whenever possible.
began with CLKernel testcase.
Diffstat (limited to 'src/com/jogamp/opencl/gl')
-rw-r--r--src/com/jogamp/opencl/gl/CLGLBuffer.java2
-rw-r--r--src/com/jogamp/opencl/gl/CLGLContext.java7
2 files changed, 3 insertions, 6 deletions
diff --git a/src/com/jogamp/opencl/gl/CLGLBuffer.java b/src/com/jogamp/opencl/gl/CLGLBuffer.java
index c7f14c4c..6a658ea5 100644
--- a/src/com/jogamp/opencl/gl/CLGLBuffer.java
+++ b/src/com/jogamp/opencl/gl/CLGLBuffer.java
@@ -71,7 +71,7 @@ public final class CLGLBuffer<B extends Buffer> extends CLBuffer<B> implements C
@Override
public String toString() {
- return "CLGLBuffer [id: " + ID+" glID: "+GLID+"]";
+ return getClass().getSimpleName()+" [id: " + ID+" glID: "+GLID+"]";
}
}
diff --git a/src/com/jogamp/opencl/gl/CLGLContext.java b/src/com/jogamp/opencl/gl/CLGLContext.java
index 92618729..5fd669b8 100644
--- a/src/com/jogamp/opencl/gl/CLGLContext.java
+++ b/src/com/jogamp/opencl/gl/CLGLContext.java
@@ -110,13 +110,10 @@ public final class CLGLContext extends CLContext {
GLContextImpl ctxImpl = (GLContextImpl)glContext;
- DefaultGraphicsConfiguration config = (DefaultGraphicsConfiguration)ctxImpl.getDrawableImpl()
- .getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration();
-
PointerBuffer properties;
if(glContext instanceof X11GLXContext) {
properties = PointerBuffer.allocateDirect(7);
- long handle = config.getScreen().getDevice().getHandle();
+ long handle = ctxImpl.getDrawableImpl().getNativeWindow().getSurfaceHandle();
glID[0] = ((X11GLXContext)glContext).getContext();
properties.put(CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL_GLX_DISPLAY_KHR).put(handle)
@@ -129,7 +126,7 @@ public final class CLGLContext extends CLContext {
// CL_WGL_HDC_KHR, (cl_context_properties)0,
// CL_CONTEXT_PLATFORM, (cl_context_properties)cpPlatform, 0};
properties = PointerBuffer.allocateDirect(7);
- long handle = config.getScreen().getDevice().getHandle();
+ long handle = ctxImpl.getDrawableImpl().getNativeWindow().getSurfaceHandle();
glID[0] = ((WindowsWGLContext)glContext).getHGLRC();
properties.put(CL_GL_CONTEXT_KHR).put(glID[0])
.put(CL_WGL_HDC_KHR).put(handle)