🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Get triangles from trianglefan

Started by
4 comments, last by convert 1 year, 6 months ago

How to get triangles from an array of inidices stored as trianglefan. so for example the array looks like this:

{0, 1, 2, 3, 4,…}

For trianglestrip it would be {0,1,2}, {2,1,3}, {2,3,4},… But I need the same with trianglefan.

Advertisement

I'd guess it's {0,1,2}, {0,2,3}, {0,3,4}
But better check the Khronos link i've posted in your last topic. Iirc it clarifies all those things in one place. Otherwise OpenGL specs definitively do.

@JoeJ Thought both trianglestrip and trianglefan are not just limited to OpenGL.

convert said:
@JoeJ Thought both trianglestrip and trianglefan are not just limited to OpenGL.

Oh - i'm no DirectX user and have associated all those terms with OpenGL, as that's their historical origin. Idk how much of that was adopted from Microsoft, and how their conventions differ. (Usually MS tries to be different wherever they can.)

But if you seek for the most widely used convention, OpenGL seems the best resource. It's origin dates back to SGIs IrixGL, so it's much older and it was the first industry standard for a 3D gfx API.
Today that's all dead and gone, but so are quads, fans, and even strips. Meshes became more dense and GPU caches became bigger, so the cache optimization granularity went from local vertex neighborhood towards whole clusters of triangles. The old conventions are no longer worth to maintain and were mostly dropped.


Today that's all dead and gone, but so are quads, fans, and even strips. Meshes became more dense and GPU caches became bigger, so the cache optimization granularity went from local vertex neighborhood towards whole clusters of triangles. The old conventions are no longer worth to maintain and were mostly dropped.

Stripes and fans are not always smaller tnen triangles.

This topic is closed to new replies.

Advertisement