glGetObjectParameterivARB(obj, GL_OBJECT_INFO_LOG_LENGTH_ARB, &infologLength);
if (infologLength > 1)
{
int charsWritten = 0;
char * const infoLog = new char[infologLength];
glGetInfoLogARB(obj, infologLength, &charsWritten, infoLog);
tError(infoLog, false);
delete infoLog;
}
}
intel cards: "no errors" from glsl
hello, i am using this code to check if my glsl shader compiled fine.
the length of the returned string is empty on nvidia and ATI cards, but on intel cards this one returns the string "no errors."
now what is the best way to find out, if there are really no errors? should i just check for this string? or is there a convention what this function glGetInfoLogARB should return?
Use glGetShader with GL_COMPILE_STATUS as the parameter. Check the man page for glGetProgram if you want to check for errors in the program linking also.
That's not the way to see if the shader compilation was successful, the correct way is:
glGetObjectParameterivARB(obj, GL_OBJECT_COMPILE_STATUS_ARB, &status);
glGetObjectParameterivARB(obj, GL_OBJECT_COMPILE_STATUS_ARB, &status);
Quote:Original post by ehmdjii
thanks! is there an opengl function for this for versions < 2.0 ? some ARB extension maybe?
But
glGetObjectParameterivARB(obj, GL_OBJECT_COMPILE_STATUS_ARB, &status);
is an extension from that GL_ARB_shading_language_100. Notice the ARB at the end.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement