I have a function that checks whether or not the vertex/fragment shared was compiled successfully and is valid to use within LWJGL
public static boolean isShaderValid(int shaderToCheck) {
IntBuffer iVal = BufferUtils.createIntBuffer(1);
glGetObjectParameterARB(shaderToCheck, GL_OBJECT_INFO_LOG_LENGTH_ARB, iVal);
int length = iVal.get();
boolean isValid = length>1;
if (isValid && verboseValidityCheck) {
printShaderLogInfo(shaderToCheck, iVal, length);
}
return isValid;
}
This however, ALWAYS returns false, even though when I skip this check and just use the shader, it works fine. So, what is wrong with this shader validity check?