Exoide

03-03-2010, 10:01 AM

Hi there,

I wanna create a sphere by hand in an optimal way so I decided to use VBO and IBO.

I've created the VBO for the vertices of the sphere and I rendered as GL_POINTS and they're in their right positions.

The question is about the IBO. I was trying to create it in such a way to get advantage of the GL_TRIANGLE_STRIP, but now I'm reading an old post http://www.opengl.org/discussion_boards/...true#Post272666 (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=272666&Searchpa ge=1&Main=52645&Words=sphere+algorithm&Search=true #Post272666)

where Dark Photon said this

Second, using carefully ordered triangles is much more important than using the TRIANGLE_STRIP primitive. Strips are old school and basically dead except for trivial things such regular grids. You'll get the same performance from indexed TRIANGLEs where the triangle order is the same.

What he means with "You'll get the same performance from indexed TRIANGLEs where the triangle order is the same."?

I was trying to create the index to render only triangles using GL_TRIANGLE_STRIP but it seems to be complex to order the vertices. If drawing separated triangles has no penalty in performance I think it's the easiest way. But I repeat I'm looking for high performance.

Can someone help me with this?

Thank you.

PD: I'm looking for the fastest possible way to render the sphere.

I wanna create a sphere by hand in an optimal way so I decided to use VBO and IBO.

I've created the VBO for the vertices of the sphere and I rendered as GL_POINTS and they're in their right positions.

The question is about the IBO. I was trying to create it in such a way to get advantage of the GL_TRIANGLE_STRIP, but now I'm reading an old post http://www.opengl.org/discussion_boards/...true#Post272666 (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=272666&Searchpa ge=1&Main=52645&Words=sphere+algorithm&Search=true #Post272666)

where Dark Photon said this

Second, using carefully ordered triangles is much more important than using the TRIANGLE_STRIP primitive. Strips are old school and basically dead except for trivial things such regular grids. You'll get the same performance from indexed TRIANGLEs where the triangle order is the same.

What he means with "You'll get the same performance from indexed TRIANGLEs where the triangle order is the same."?

I was trying to create the index to render only triangles using GL_TRIANGLE_STRIP but it seems to be complex to order the vertices. If drawing separated triangles has no penalty in performance I think it's the easiest way. But I repeat I'm looking for high performance.

Can someone help me with this?

Thank you.

PD: I'm looking for the fastest possible way to render the sphere.