PDA

View Full Version : GetShaderiv & glext.h



1024
10-15-2004, 08:12 AM
Searched, but didn't find any note about it here.
glext.h @ http://oss.sgi.com/projects/ogl-sample/registry/ is missing glGetShaderiv !

Why is that? Did i miss something?

(As i'm using my automated tool to create the extension-checking-attaching-orgy ... i'm not really interested to add it myself :p )

Relic
10-17-2004, 09:53 PM
glGetShaderiv is an OpenGL 2.0 function.
The glext.h on that page supports up to version 1.5 and glGetShader was not in the GL_ARB_shader_objects spec.

1024
10-18-2004, 10:31 PM
I see. But what is used for detecting filures (compiling, linking ..) then?

edit: nevermind. Found ValidateProgramARB(). :)

Relic
10-19-2004, 05:35 AM
That won't get you far. Check these functions:

// Shader compiled?
glGetObjectParameterivARB(object, GL_OBJECT_COMPILE_STATUS_ARB, &compiled);

// Program linked?
glGetObjectParameterivARB(program, GL_OBJECT_LINK_STATUS_ARB, &linked);

// Read info log in either case:
glGetObjectParameterivARB(object, GL_OBJECT_INFO_LOG_LENGTH_ARB, &maxLength);
// malloc infoLog here. This call fill it:
glGetInfoLogARB(object, maxLength, &length, infoLog);