三角形风扇使用opengl有多少个顶点 [英] How many vertices does a triangle fan use opengl

查看:130
本文介绍了三角形风扇使用opengl有多少个顶点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习openGL,我使用顶点缓冲对象遇到了三角形风扇。如果给定要渲染的顶点数组,openGL如何决定必须使用多少个顶点来构造三角形扇。

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 vertices must be used to construct a triangle fan. It seems like an arbitray number of the vertices could be used.

推荐答案

查看这里: GL_TRIANGLE FAN说明

您给openGL的顶点越多,三角形你得到。第一个顶点对所有三角形都是共同的。第一个三角形由顶点1,2和3组成。第二个三角形由1,3和4组成。等等。
你得到n - 2个三角形为n个顶点。

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.

这篇关于三角形风扇使用opengl有多少个顶点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆