I want to parse a model and render 4-vertex polygons (rectangles) in OpenGL ES 2.0, and instead of using two triangles I thought of using one triangle strip for each quad/rectangle.
The problem is my rectangles are not connected throughout the model. If I have three quads (12 vertices) I would like to draw them like this (numOfQuadFaces = 3):
glDrawArrays(GL_TRIANGLE_STRIP, 0, numOfQuadFaces*4);
With the vertex array ordered so that the a new quad is begun every four vertex. But of course OpenGL interprets it like a new triangle is begun for every new vertex beyond the third vertex in the array. Can I specify somewhere that I want individual triangle strips/quads of length 4? - So that I draw similar to this (if course in only on glDrawArrays- call):
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
glDrawArrays(GL_TRIANGLE_STRIP, 4, 4);
glDrawArrays(GL_TRIANGLE_STRIP, 8, 4);