hello,
i have a mesh with triangles and quads and polygons, in order to render the edges of the mesh, i need to render polygons (so do not convert to all triangles) and i konw the way using glBegin(GL_POLYGON).
but how it can be done with glDrawElements or even the vbo??
Do you have any specific problems using vbo / glDrawElements ?
GL_POLYGONs can also be rendered using vbo, just pass GL_POLYGON as parameter to glDrawArrays / glDrawElements …
For using vbo in general there are plenty of tutorials - just google.
for example, the mesh has a triangle, a quad and a polygon, do i need to :
glDrawElements(GL_TRIANGLE, … tri_index);
glDrawElements(GL_TRIANGLE, … quad_index);
glDrawElements(GL_TRIANGLE, … poly_index);