Mesh: Fix for a situation encountered during the development of SceneShadow.
In cases where a mesh will do "double duty" but not be used the same way in
all cases (in SceneShadow, the shader for the depth pass would ignore the
"normal" attribute), the GL can return a -1 for the attribute location, even
if it is declared in the shader (compilers are free to optimize away unused
attributes, etc.).  So, we check for this and don't try to enable attributes
whose location is -1.
1 file changed