To fix the problem with the camera sending the info to the shader we must use layout and not uniform with names .
In our case uniform with names need program linkage before sending the info to the shader program, thus using layout solve the problem because if we say :
in GLSL
layout (location = 10) uniform float pi
in C/C++
glUniform1f(10, 3.14f)
at the adress 10 it will always be the variable for pi and no linkage need!
To fix the problem with the camera sending the info to the shader we must use
layout
and notuniform
with names .In our case
uniform
with names need program linkage before sending the info to the shader program, thus usinglayout
solve the problem because if we say :in GLSL
in C/C++
at the adress 10 it will always be the variable for pi and no linkage need!