Well i was reading a small renderer of Half-Life bsp maps and i see the function “glDrawArray(…)”. Well i don’t know this function and if somebody could help me about the data to pass to the function.
Is that a way to threat the famous VertexArray wich i have seen several times in posts? I so, well… Oops! Sorry for asking once more informations about it.
Yes - glDrawArray is what you use to draw a vertex array.
glDrawElements draws the currently enabled and active vertex array via indices. glDrawArrays simply marches down the current vertex array. Essentially, glDrawArrays is equivalent to glDrawElements whose indices are: 1, 2, 3, 4, … to the end of the array. glDrawArrays is good for arrays that don’t often use repeated vertices, but it is usually faster (especially if you have many short strips) to use glDrawElements, especially if your card uses hardware T&L.
Ok but glDrawArrays seems to be un-loved because of the repetition of the vertices for each normal, text coords, … Is it possible to avoid this with glDrawElements?