Vbo utils

Add a VertexLayout class and VboMesh class, then add an example use case to the Tangram test program
Cool, makes sense for now to conserve memory in absence of a concrete case.

On Fri, Sep 19, 2014 at 11:13 PM, Varun <notifications@github.com> wrote:

> In core/util/vboMesh.cpp:
>
> > +    }
> > +
> > +    // Buffer vertex data
> > +    glBindBuffer(GL_ARRAY_BUFFER, m_glVertexBuffer);
> > +    glBufferData(GL_ARRAY_BUFFER, m_vertexData.size(), m_vertexData.data(), GL_STATIC_DRAW);
> > +
> > +    // Generate index buffer, if needed
> > +    if (m_glIndexBuffer == 0) {
> > +        glGenBuffers(1, &m_glIndexBuffer);
> > +    }
> > +
> > +    // Buffer element index data
> > +    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_glIndexBuffer);
> > +    glBufferData(GL_ELEMENT_ARRAY_BUFFER, m_indices.size() * sizeof(GL_UNSIGNED_SHORT), m_indices.data(), GL_STATIC_DRAW);
> > +
> > +    // Release copies of geometry in CPU memory
>
> @bcamper <https://github.com/bcamper> We were discussing about the
> situation you are talking about yesterday on flowdock, and decided on going
> with this for the time being. Can discuss this further.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/tangram-map/tangram-es/pull/8/files#r17817518>.
>