View Full Version : GLSL binding "constants" suggesstions

04-01-2004, 05:41 AM
In the current GLSL, you have to all glGetUniformLocationARB to get the "constant number/location" of your uniform.... Why not to do as Direct3D HLSL:

void main ( unifrom float4 lightPos : register(C0) )


void main ( uniform sampler2D baseTex : register(S0) )

where C0 is contant 0(loc==0) and S0 is sampler 0 ( loc==0 ) ???

Ok, I can understand that forcing the uniform location can affect optimization, but....

thx in advance.

04-01-2004, 06:16 AM
Because there are no registers.
It's simple.

GLSL method is much more flexible one. You can bind anything to anything. DX doesn't allow you to do this.