GL_TRIANGLE FAN说明 [英] GL_TRIANGLE FAN Explanation

查看:213
本文介绍了GL_TRIANGLE FAN说明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在此处使用此算法填充"我绘制的球体表面: 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屋!

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