ImageEngine/cortex — pull request #71 by johnhaddon (2013-08-15 23:42:12+00:00)
Title: Points primitive selection fix

Previously selection would fail when in Selector::IDRender mode, as demonstrated by the failure of Selection.testPointsPrimitiveSelect(). When in IDRender mode, the Selector installs a special ID shader in the state, and relies on using the override mode to ensure that the shader isn't replaced by others lower down in the hierarchy of the scene. However, the PointsPrimitive replaces the shader so that it can use its own vertex shader to perform the instancing necessary to render as disks and quads, causing the failure. Shader::Setup::ScopedBinding now registers all bound shaders with the current Selector wherever necessary, fixing the problem.

Please see the comment in Selector::loadIDShader() and let me know if it's too sketchy for your tastes.