I have a question and i would also like to hear some tips and trick regarding this problem.
I’m currently generating a 2d mesh and drawing it as triangle strip.
It looks something like this
and i have two arrays that i populate with data
float  vertices; float  uv;
Code drawing this looks something like this
glBindBuffer(GL_ARRAY_BUFFER, _vertexBufferVertices->getVBO()); glVertexAttribPointer(VERTEX_ATTRIB_POSITION, 2, GL_FLOAT, GL_FALSE, sizeof(Vec2), 0); glBindBuffer(GL_ARRAY_BUFFER, _vertexBufferTexCoords->getVBO()); glVertexAttribPointer(VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, sizeof(Tex2F), 0); glDrawArrays(GL_TRIANGLE_STRIP, 0, (GLsizei) _vertexBufferVertices->getVertexNumber()); glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ARRAY_BUFFER, 0);
I was wondering if this is a good solution, should i use indices also ? How can i optimize more ?