johnmccutchan/spectre — pull request #134 by Fox32 (2013-12-28 20:26:42+00:00)
Title: DebugDrawManager: Don't upload or draw anything if there is nothing to draw

I'm using the DebugDrawManager to visualize things in my application. I don't need this features all the time, but if I don't use it I still call prepare and render the debug draw manager. It has a huge impact on the performance of my application. Especialy the upload of the vertex buffer is problematic. In some frames it is instant, sometime it takes 4ms, but 40ms also happends often (not sure if driver, os or chrome problem?).

This change skips uploading and drawing if no lines are available. That should also be a performance gain for everyone that is only using either depth enabled or depth disabled lines.