简体   繁体   English

用 GL_TRIANGLE_STRIP 将每一列相互连接起来

[英]Connecting each column with each other with GL_TRIANGLE_STRIP

I've created these triangles using triangle strip.我使用三角形条创建了这些三角形。 I was wondering if there's a better way to connect the triangles to each other (first picture).我想知道是否有更好的方法将三角形相互连接(第一张图片)。 For now I just created the triangles based on the previous columns verticies (second picture).现在我只是根据前面的列顶点(第二张图片)创建了三角形。 So is there a better way so I dont have to calculate all the previous vertices?那么有没有更好的方法让我不必计算所有以前的顶点?

在此处输入图片说明

在此处输入图片说明

AFAIK the only way to avoid recalculating/storing some previous vertices is to use an index buffer AFAIK 避免重新计算/存储某些先前顶点的唯一方法是使用索引缓冲区

https://www.learnopengles.com/tag/triangle-strips/ https://www.learnopengles.com/tag/triangle-strips/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM