intel cards: "no errors" from glsl

Started by
4 comments, last by ehmdjii 14 years ago
hello, i am using this code to check if my glsl shader compiled fine.

    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;
    }
}

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?
Advertisement
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);


thanks! is there an opengl function for this for versions < 2.0 ? some ARB extension maybe?
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.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
Quote:Original post by V-man
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.

thanks, i was actually refering to the first reply by Huntsman.

This topic is closed to new replies.

Advertisement