The arb versions for shaders are:
`int shaderId = gl.glCreateShaderObjectARB(shaderType); // GL.GL_VERTEX_SHADER_ARB or GL.GL_FRAGMENT_SHADER_ARB
gl.glShaderSourceARB(shaderId, count, srcArray, lengths, 0);
gl.glCompileShaderARB(shaderId);
int compileStatus[] = new int[1];
gl.glGetObjectParameterivARB(shaderId, GL.GL_OBJECT_COMPILE_STATUS_ARB, compileStatus, 0);
if (compileStatus[0] == GL.GL_FALSE){
IntBuffer len = BufferUtil.newIntBuffer(1);
gl.glGetObjectParameterivARB(shaderId, GL.GL_OBJECT_INFO_LOG_LENGTH_ARB, len);
int infoLen = len.get(); // this value includes the null, where actualWidth does not
if(infoLen > 1){
len.flip();
ByteBuffer infoLogBuf = BufferUtil.newByteBuffer(infoLen);
gl.glGetInfoLogARB(programObject, infoLen, len, infoLogBuf);
int actualWidth = len.get();
StringBuffer sBuf = new StringBuffer(actualWidth);
for (int i = 0; i < actualWidth; i++) {
sBuf.append((char) infoLogBuf.get());
}
System.err.println(sBuf.toString());
}else System.err.println("ERROR: But no info returned from info log");
}
`
For programs and linking:
`prgmId = gl.glCreateProgramObjectARB();
gl.glAttachObjectARB(prgmId, shaderId);
gl.glLinkProgramARB(prgmId);
int linkStatus[] = new int[1];
gl.glGetObjectParameterivARB(prgmId, GL.GL_OBJECT_LINK_STATUS_ARB, linkStatus, 0);
if (linkStatus[0] == GL.GL_FALSE) same error routine as before`
For Cleanup:
gl.glDetachObjectARB(prgmId, shaderId); gl.glDeleteObjectARB(shaderId); gl.glDeleteObjectARB(prgmId);