Uniform Locations implementation dependant?

Hey there,

if i compile & link the same GLSL source with different OpenGL-implementations, can the uniform locations that i get with glGetUniformLocation differ?

In general:
Can i be sure, that everything that i don’t find in the specification (as the assignment of uniform locations) is implementation-specific?

[QUOTE=Kastenfrosch2;1248823]Hey there,

if i compile & link the same GLSL source with different OpenGL-implementations, can the uniform locations that i get with glGetUniformLocation differ?
[/QUOTE]

Yes (unless you use explicit locations in your shader).
IIRC nvidia will assign numbers based on the order of appearance in the code while AMD sorts them alphabetically first. This can change with the next driver release! Same with attribute locations. Always query the locations or set them explicitly (not available in all OpenGL versions).

[QUOTE=Kastenfrosch2;1248823]
In general:
Can i be sure, that everything that i don’t find in the specification (as the assignment of uniform locations) is implementation-specific?[/QUOTE]

Yes. Never assume anything that isn’t stated in the specs explicitly.

Thanks a lot!