Work on removing immediate mode GL_QUADS

This PR goes a long way toward removing all immediate mode GL_QUADS. There is still a use of glBegin(GL_QUADS) in the hair implementation. I need to think about how to best implement support for that.

All other quads have been converted to use a new GeometryCache::renderQuad() which takes several different possible options, 2d, 2d with texture, 3d, 3d with textures.

TODO: currently we cache the vbos for various quads, but for things like the cursor, magnifying glass, and audio vu level, it would be better to not cache those values. I want to add some mechanism where you can get back an ID for the quad you rendered and it will reuse that ID for some usage cases where caching is not useful.
Go ahead



> On Dec 29, 2014, at 20:47, Brad Hefta-Gaub <notifications@github.com> wrote:
> 
> In libraries/render-utils/src/GeometryCache.cpp:
> 
> > +        
> > +        glGenBuffers(1, &vbo.first);
> > +        glBindBuffer(GL_ARRAY_BUFFER, vbo.first);
> > +        glBufferData(GL_ARRAY_BUFFER, vertices * NUM_BYTES_PER_VERTEX, vertexData, GL_STATIC_DRAW);
> > +        delete[] vertexData;
> > +        
> > +        GLushort* indexData = new GLushort[indices];
> > +        GLushort* index = indexData;
> > +        for (int i = 0; i < indices; i++) {
> > +            index[i] = cannonicalIndices[i];
> > +        }
> > +        
> > +        glGenBuffers(1, &vbo.second);
> > +        glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, vbo.second);
> > +        glBufferData(GL_ELEMENT_ARRAY_BUFFER, indices * NUM_BYTES_PER_INDEX, indexData, GL_STATIC_DRAW);
> > +        delete[] indexData;
> Will this block the merge? Or can I change this on a subsequent PR?
> 
> —
> Reply to this email directly or view it on GitHub.
>