I’m trying to use glGetShaderInfoLog() without much success (getting probably ok lengths but garbage as messages)
I guess I’m missing something stupid.
Does any of you have a sample code that works?
Thx.
Olivier
I’m trying to use glGetShaderInfoLog() without much success (getting probably ok lengths but garbage as messages)
I guess I’m missing something stupid.
Does any of you have a sample code that works?
Thx.
Olivier
private void checkLogInfo(GL gl, int programObject) {
IntBuffer intValue = BufferUtils.newIntBuffer(1);
gl.glGetObjectParameterivARB(programObject, GL.GL_OBJECT_INFO_LOG_LENGTH_ARB, intValue);
int lengthWithNull = intValue.get();
if (lengthWithNull <= 1) {
return;
}
ByteBuffer infoLog = BufferUtils.newByteBuffer(lengthWithNull);
intValue.flip();
gl.glGetInfoLogARB(programObject, lengthWithNull, intValue, infoLog);
int actualLength = intValue.get();
byte[] infoBytes = new byte[actualLength];
infoLog.get(infoBytes);
System.out.println("GLSL Validation >> " + new String(infoBytes));
}
intValue.flip();
stupido! stupido! o:)
thx for your help!