DescriptionReturn a const ref to the fS member var, as is done for the other getters, instead of a copy. This prevents a crash when calling setUniformPoint3() on the result.
To be honest, I'm not sure why this fix works. Allocating a temporary SkPoint3 on the stack should've been fine for calling setUniformPoint3, since it should live until the next sequence point, but it isn't fine and crashes before setUniformPoint3 even gets called.
Another equally mysterious fix that works is to provide an explicit copy constructor for SkPoint3. The compiler-provided one should've been fine, since it's just 3 floats.
Either there's a compiler bug, or I need remedial C++ lessons.
Also remove a spurious call to glGetUniformLocation for fCosOuterConeAngle.
Patch Set 1 #
Total comments: 2
MessagesTotal messages: 6
|