glProgramParameter vs glProgramLocalParameter/glProgramEnvParameter

Started by
1 comment, last by Prune 14 years, 1 month ago
I understand the difference between glProgramLocalParameter*ARB and glProgramEnvParameter*ARB, but how do glProgramParameter*EXT/glProgramParameter*NV relate to these, and are they interchangeable? I've encountered the second set in the case of geometry shaders before the newer GLSL added setting the maximum output vertices and so on in geometry shaders in the shader source instead of through the API.
"But who prays for Satan? Who, in eighteen centuries, has had the common humanity to pray for the one sinner that needed it most?" --Mark Twain

~~~~~~~~~~~~~~~Looking for a high-performance, easy to use, and lightweight math library? http://www.cmldev.net/ (note: I'm not associated with that project; just a user)
Advertisement
glProgramParameter*NV is part of the old GL_NV_vertex_program and the EXT version is part of GL_EXT_vertex_program.
I don't know if they are interchangeable. They were also used for fragment_program and geometry_program back then, then GLSL came along so you should use glUniform*****
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);
I'm referring to the usage with geometry shaders, such as
glProgramParameteri(prog, GL_GEOMETRY_VERTICES_OUT_EXT, 6);
Not sure what I can use instead if I'm not using the GLSL 1.5+ where the count is specified in the shader source instead, but older version.
"But who prays for Satan? Who, in eighteen centuries, has had the common humanity to pray for the one sinner that needed it most?" --Mark Twain

~~~~~~~~~~~~~~~Looking for a high-performance, easy to use, and lightweight math library? http://www.cmldev.net/ (note: I'm not associated with that project; just a user)

This topic is closed to new replies.

Advertisement