1

On the right is the shape generated by GL_LINE_STRIP and on the left is it generated by GL_POLYGON.

enter image description here There's a function which generates each point 1 by 1 in order.

Why is there such a big difference in the basic shape? Notice how less 'curved' each portion of the cloud is in the GL_POLYGON version.

Any clue how to fix this? Or maybe use something else to fill this polygon I have?

4

2 回答 2

2

GL_POLYGON仅适用于凸多边形

GL_POLYGON:绘制单个多边形。顶点1通过N定义这个多边形。

您必须对多边形进行三角剖分GL_TRIANGLES并改用。

或者滥用模板缓冲区

于 2013-10-03T20:09:20.403 回答
0

或者您可以“遮蔽”多边形内部的片段。就像一个多边形填充算法

于 2013-10-04T13:46:02.857 回答