GL_TRIANGLE FAN说明 [英] GL_TRIANGLE FAN Explanation
问题描述
我试图在此处使用此算法填充"我绘制的球体表面:
http://paulbourke.net/miscellaneous/sphere_cylinder/,第一种方法.
我知道GL_QUADS
在OpenGL 3+中不再使用.所以我用GL_TRIANGLE_FAN
.是同一回事吗?这里的问题是我的球面是正方形.因此,如果我使用GL_TRIANGLE
,那么我会得到一个奇怪的填充",并不是所有的表面都被覆盖了.我做错了吗? GL_TRIANGLE_FAN
如何工作?
I am trying to "fill" a surface of a sphere that I drew using this algorithm here:
http://paulbourke.net/miscellaneous/sphere_cylinder/, the first method.
I know that GL_QUADS
is no longer used in OpenGL 3+. SO I used GL_TRIANGLE_FAN
. Is it the same thing? The problem here is that my sphere facets are squares. So if I use GL_TRIANGLE
then I get a weird "filling", not all the surface is covered. Am I doing it the wrong way? How does GL_TRIANGLE_FAN
work exactly?
推荐答案
GL_TRIANGLE_FAN如何正常工作?
How does GL_TRIANGLE_FAN works exactly?
三角形风扇的第一个顶点的行为就像一个轮毂.以下顶点与先前的非起始顶点和中心相连.
The first vertex of a triangle fan acts like a hub. The vertices following connect with the previous non-starting vertex and the hub.
这篇关于GL_TRIANGLE FAN说明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!