highfidelity/hifi — pull request #3567 by samcake (2014-10-09 17:41:03+00:00)
Title: Improve the TextRenderer::draw(), step 1

Improve the TextRenderer::draw(), first step
- Introduce a managed Buffer for data to be used on the GPU. THis is the first type of resource (second will be texture) that we plan to use in the graphics engine in the long term. this is an api agnostic replacement to QGLBuggerObject
It's in the new file gpu/Resource.h(.cpp)

- Add two gpu::Buffers in the TextRenderer that collect all the glyph vertices (coords + texcoords + color) during the for loop on the string characters of the TextRenderer::draw(). Right now the text glyphs are then drawn in one draw call (and not one per character) at the end of the function.

THe step 2 plan is to keep on collecting all the glyphs from all the TextRenderer::Draw() issued during one frame and to draw all of them in a single drawcall. We decided to split the task in 2 so it's easier to review.