glGetUniformLocationARB

BlitzMax Forums/OpenGL Module/glGetUniformLocationARB

Chris C(Posted 2005) [#1]
glGetUniformLocationARB(Program, Varptr name)
always seems to return -1
name="BrickSize"
in the shader its
uniform vec2 BrickSize;

both frag and vert shaders are compiling and linking okay
any gotchas anyone can think of?


Chris C(Posted 2005) [#2]
AND! this returns the expected uniform name! which I still cant access!

Global length:Int,size:Int,tp:Int,name:Byte[21]
glGetActiveUniformARB(po.program,0,20,Varptr length,Varptr size,Varptr Tp,Varptr name[0])
n$=""
For Local x:Int =0 To length-1
n$=n$+Chr(name[x])
Next
Print n$


Chris C(Posted 2005) [#3]
glGetUniformLocationARB(Program, name.ToCString)

ho humm!