How many vertices does a triangle fan use opengl

后端 未结 4 930
轮回少年
轮回少年 2021-01-03 01:44

I am learning openGL, and i have come across triangle fans using vertex buffer objects. If given an array of vertices to render, how does openGL decide how many of those ve

4条回答
  •  一向
    一向 (楼主)
    2021-01-03 02:41

    Look here: GL_TRIANGLE FAN Explanation

    The more vertices you give to openGL, the more triangles you get. The first vertex will be common to all triangles. First triangle consists of the vertices 1, 2 and 3. Second triangle consists of 1, 3 and 4. And so on. You get n - 2 triangles for n vertices.

提交回复
热议问题