summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-08-01 20:15:35 +0200
committerSven Gothel <[email protected]>2011-08-01 20:15:35 +0200
commit4afe6456f631352933bd5dcb7610b516a90f29eb (patch)
tree28e1b4b355e5e044774e8aaa6b416ea3bc6fa936 /src/jogl/classes
parent76f7552c4a219b116e86949f271e613ba0f6f160 (diff)
Fix glDebugMessageInsert: Pass string length to native method instead of -1/0, avoid driver bug.
Diffstat (limited to 'src/jogl/classes')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index aef90dbe6..6be2705e5 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -1147,10 +1147,11 @@ public abstract class GLContextImpl extends GLContext {
}
public final void glDebugMessageInsert(int source, int type, int id, int severity, String buf) {
+ final int len = (null != buf) ? buf.length() : 0;
if(glDebugHandler.isExtensionARB()) {
- gl.getGL2GL3().glDebugMessageInsertARB(source, type, id, severity, -1, buf);
+ gl.getGL2GL3().glDebugMessageInsertARB(source, type, id, severity, len, buf);
} else if(glDebugHandler.isExtensionAMD()) {
- gl.getGL2GL3().glDebugMessageInsertAMD(GLDebugMessage.translateARB2AMDCategory(source, type), severity, id, 0, buf);
+ gl.getGL2GL3().glDebugMessageInsertAMD(GLDebugMessage.translateARB2AMDCategory(source, type), severity, id, len, buf);
}
}
}