Glsl array length

Hi,

Is there any elegant/correct way to determine the length of a glsl array?

I’m currently using this, which works but isn’t very pretty:

		Local arrlen
		For arrlen=0 Until 10000
			If glGetUniformLocationARB( glprogram,name+"["+arrlen+"]" )=-1 Exit
		Next
		dprint "Array length="+arrlen

Bye!
Mark

You can use values returned by the glGetActiveUniform function to determine size of the array.

Didn’t notice that one - thanks!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.