Glad we cleared that up :)

Anyway, I tried it out, but I couldn't get it to work either. glGetUniformfv seemed to be defined as glGetUniformfv(programloc, varloc, returnvalues) in PyOpenGL, same as the default C spec. Normal PyOpenGL functions aren't defined this way. As you said, the return values are normally returned instead of passed along with the function call.

When I tried to call it with three parameters, it did not even touch the returnvariable. So I assume there is a bug somewhere. Also, the function requires an array to be passed as a returnvariable, but the return value is always one value, never an array. You simply cannot ask for the values of an entire shader-array. You'd need to call glGetUniformfv for each element of the array.

It might work if you pass a ctypes float along with it, however I have no experience with ctypes stuff, so I'll leave that to the experts.

Gijs

On 6/6/10 16:06 , Ian Mallett wrote:
On Sun, Jun 6, 2010 at 1:31 AM, Gijs <info@bsnw.nl> wrote:
I don't think I've ever had to use it before, but you usually give the program location and the variable location. So it would be something like this:
value = glGetUniformfv(programloc, varloc)
Oops!  I actually tried that.  Typo. 
value=glGetUniformfv(programlocation)
Should have been:
value=glGetUniformfv(program,location)
Ian