highfidelity/hifi — pull request #3642 by samcake (2014-10-22 22:56:44+00:00)
Title: Bring back the GL batching for model rendering and fixed the bug on MAC

- FIxed the bug happening on Mac due to the different order of evaluation of the parameter value of a function call. My bfault for assuming that the Windows order was universal...

- See all the changes:
Record graphics API commands in a "gpu::Batch" to separate traversal from rendering #3633
ntroducing the gpu::Batch class that is used to record all the graphics API commands (for now GL) in a command buffer along with the parameters values (copy chunck of memory for pointers parameters)

The Batch can then be rendered with a call to gpu::backend::renderBatch

introduced the Batch approach in the Model::render call ( and renderMEshes), all the glcalls issued form this function are collected in one batch and rendered in one call at the end of the function

This is the first step to separate the traversal of the scene objects and the actual call to the underneath graphics commands that talk to the GPU driver layer

I didn't always respected the coding guidelines (the enum names) since i wanted to use Macro to factor a lot of the code we do the record the gl commands.