<div dir="ltr">Hi Robert,<div><br></div><div>I've run into the situation multiple times where having a global draw callback would have been very convenient. It's mostly been for debugging scenarios, but I can also see other situations where being able to globally augment draw calls would also be useful.</div><div><br></div><div>What are your thoughts on having a global draw callback part of the osg::State object? It doesn't seem like much code would need to be changed, and the performance impact should be minimal. </div><div><br></div><div>Essentially, osgUtil::RenderLeaf would be modified to call:</div><div><br></div><div>state.draw(_drawable, renderInfo);</div><div><br></div><div>And osg::State::draw would look like:</div><div><br></div><div>if(_drawCallback.valid()) _drawCallback->draw(_drawable, renderInfo);</div><div>else _drawable->draw(renderInfo);</div><div><br></div><div>Does this seem like a reasonable feature to add? I can work on a patch if you feel it's appropriate.</div><div><br></div><div>Cheers,</div><div>Farshid</div></div>