   using glDrawArrays instead of glDrawElements.
  Hi,i am using glDrawElements to render multiple vertices quads with one call. Now I want to use glDrawArrays instead, to see if there going to be any performance enhancements.The code I use to render vertices, is as follows:-(void)DrawToScreen{for (i=0;i<7;i++)[Sprites PrepareSpriteToRender];  //calculate vertices & texcoords and add them to vertices and textCorrds arrays;glColor4f(1, 1, 1, 1);glEnableClientState(GL_TEXTURE_COORD_ARRAY);glEnableClientState(GL_VERTEX_ARRAY);glBindTexture(GL_TEXTURE_2D, SpritesTextureName);glVertexPointer(2, GL_FLOAT, 0, Vertices);glTexCoordPointer(2, GL_FLOAT, 0, TexCoords);glDrawElements(GL_TRIANGLES, QuadsNbr*6, GL_UNSIGNED_SHORT, indices);QuadsNbr=0;}I replaced glDrawelemnts call (Which works as it should) with this (everything else is kept unchanged) :glDrawArrays(GL_TRIANGLE_STRIP, 0,4*QuadsNbr);Now I get each sprite rendered twice... It seems to me from the result I get, that glDrawArrays, attachs every vertices quad to another, and create one vertices quad before drawing in the screen.Could anyone please tell me how to avoid this weird bug?I would really apreciate your kind help.Thank you.   
  GL_TRIANGLE_STRIP is not the same as GL_TRIANGLES.A strip has 3 verts for the first triangle, then one for every triangle after it.Triangles has 3 verts per triangle.   ;  It's not a bug, glDrawArrays uses a index buffer which contains indices starting at 0 to count - 1 (0, 1, 2, 3, ..., ..., count - 1), and what you're looking at is probably just your vertex buffers indexed that way.   ;  Thanks for your help.I have tried each of the following without success:1- glDrawArrays(GL_TRIANGLE_STRIP, 0,4*QuadsNbr);2- glDrawArrays(GL_TRIANGLE_STRIP, 0,6*QuadsNbr);3- glDrawArrays(GL_TRIANGLES, 0,4*QuadsNbr);4- glDrawArrays(GL_TRIANGLES, 0,6*QuadsNbr);Here is how my vertices quads look like:typedef struct _VerticeQuad {float tl_x, tl_y;float tr_x, tr_y;float bl_x, bl_y;float br_x, br_y;} Quad;Here how I calculate vertices values:Quad GetSpriteVerices{  //returns calculated vertices quadQuad Temp;Temp.br_x = X + SpriteWidth / 2;Temp.br_y = Y + SpriteHeight / 2;Temp.tr_x = X + SpriteWidth / 2;Temp.tr_y = Y + -SpriteHeight / 2;Temp.bl_x = X + -SpriteWidth / 2;Temp.bl_y = Y + SpriteHeight / 2;Temp.tl_x = X + -SpriteWidth / 2;Temp.tl_y = Y + -SpriteHeight / 2;return Temp;}Here is how I add quads to Vertices and texCoords arrays of Quads:-(void)PrepareSpriteToRender{  Vertices[QuadNbr]=GetSpriteVertices();TexCoords[QuadNbr]=GetSpriteTexCoords();QuadNbr++;}How can I re-index my vertices quads in order to get the glDrawarrays working and end up with the same result I get from calling glDrawElements?Thank you.   ;  Try glDrawArrays with the number of vertices in the buffer so it would be justglDrawArrays(GL_TRIANGLE_STRIP, 0,QuadsNbr);;  Since you are drawing 4 points, wouldn't GL_QUADS be the primitive of choice?   ;  I am working on OpenGl Es 1.1 and I think GL_TRIANGLE_STRIP is not suported.  :(Why does the vertices data work with DrawElements, and not with DrawArrays?Could anyone help me figuring that out, please?Thank you.   ;Quote:Original post by SakukuI am working on OpenGl Es 1.1 and I think GL_TRIANGLE_STRIP is not suported.  :(Yes, it is supported. See http://www.khronos.org/opengles/sdk/1.1/docs/man/glDrawElements.xmlQuote:Original post by SakukuWhy does the vertices data work with DrawElements, and not with DrawArrays?Are you aware that glDrawArrays doesn't use your index buffer? So, the render is likely to be incorrect.   ;Quote:Original post by HuntsManAre you aware that glDrawArrays doesn't use your index buffer? So, the render is likely to be incorrect.Nop, I am not! My OpenGl knowledge level isn't even basic.  :(If I understand you correctly, there is no way to make glDrawArrays do what I want to be done, which can be done only by glDrawElements?Thank you.   ;  Yes, exactly.   