commit | c46d126bc97e839f135419d6ea4aaade3732ab97 | [log] [tgz] |
---|---|---|
author | Jesse Barker <jesse.barker@linaro.org> | Mon Oct 22 10:01:50 2012 -0700 |
committer | Jesse Barker <jesse.barker@linaro.org> | Mon Oct 22 10:01:50 2012 -0700 |
tree | 67fdd12296606508f31e5bba303a8a1a10b92457 | |
parent | 4abe76b5de3f8346bf4d03e2c842aa0c181e5408 [diff] |
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.