public void glGetProgramInfoLog(int program, int bufsize, int[] length, int lengthOffset, byte[] infolog, int infologOffset) { final int intLength = length.length - lengthOffset; bufs.resizeIntBuffer(intLength); final int byteLength = bufsize - infologOffset; bufs.resizeByteBuffer(byteLength); glGetProgramInfoLog(program, bufsize, bufs.intBuffer, bufs.byteBuffer); // length is the length of the infoLog string being returned bufs.intBuffer.get(length, lengthOffset, intLength); // infoLog is the char array of the infoLog bufs.byteBuffer.get(infolog, byteLength, infologOffset); }
public void glGetProgramInfoLog(int program, int bufsize, int[] length, int lengthOffset, byte[] infolog, int infologOffset) { final int intLength = length.length - lengthOffset; bufs.resizeIntBuffer(intLength); final int byteLength = bufsize - infologOffset; bufs.resizeByteBuffer(byteLength); glGetProgramInfoLog(program, bufsize, bufs.intBuffer, bufs.byteBuffer); // length is the length of the infoLog string being returned bufs.intBuffer.get(length, lengthOffset, intLength); // infoLog is the char array of the infoLog bufs.byteBuffer.get(infolog, byteLength, infologOffset); }
gl.glGetProgramiv(id, GL20.GL_LINK_STATUS, linkStatus, 0); if (linkStatus[0] == GL20.GL_FALSE) { String log = gl.glGetProgramInfoLog(id); gl.glDeleteProgram(id); throw new RuntimeException("Failed to link program: " + log);
gl.glGetProgramiv(id, GL20.GL_LINK_STATUS, linkStatus, 0); if (linkStatus[0] == GL20.GL_FALSE) { String log = gl.glGetProgramInfoLog(id); gl.glDeleteProgram(id); throw new RuntimeException("Failed to link program: " + log);