问题描述
我使用的是 iOS 5.1
I'm on iOS 5.1
我试图在同一个顶点数组中显示多批线,我想使用退化顶点将它们分开.但它似乎不起作用.在每批顶点之间绘制 I 线.
I was trying to display several batch of lines in the same vertex array and I wanted to separate them using degenerated vertices. But it does not seem to work. I line is drawn between each batch of vertices.
谷歌搜索这个问题给我的结果是退化的顶点与 GL_LINE_STRIP 不兼容,但我不太确定.有人可以确认吗?还有什么选择?
Googling the problem gave me results that degenerated vertices was not compatible with GL_LINE_STRIP but I'm not really sure about it. Can someone confirm that? And also what's the alternative ?
推荐答案
虽然不能在线带中使用退化顶点,但可以使用图元重新启动索引(通常是数字类型可能的最大索引值),在 Direct3D 术语中也称为条切索引.可以使用 glPrimitiveRestartIndex 进行配置.
Whereas you can't use degenerate vertices in a line strip, you can use a primitive restart index (usually the maximum index value possible for the numeric type), also called a strip-cut index in Direct3D parlance. It can be configured using glPrimitiveRestartIndex.
这篇关于退化的顶点和 GL_LINE_STRIP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!