English 中文(简体)
利用GL_Trianglestrip OpenGL ES 2.0
原标题:Draw quad elements using GL_Trianglestrip OpenGL ES 2.0

I want to parse a model and render 4-vertex polygons (rectangles) in OpenGL ES 2.0, and instead of using two triangles I thought of using one triangle strip for each quad/rectangle.

问题在于,在整个模式中,我没有联系。 如果我有三点(12vert) 我愿照此(QuadFaces = 3):

glDrawArrays(GL_TRIANGLE_STRIP, 0, numOfQuadFaces*4);

由于订购了垂直阵列,因此每4个脊椎动物就开始生产新的碎片。 但是,当然,开放式自由党的解释是,在阵列第三层外,每台新的脊椎动物都会开始使用新的三角。 曼 谷 我具体指出,在什么地方,我需要个别的三角地带/长度。 4) 因此,我也这样做(如果说这只是以冰川呼唤为方向):

glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
glDrawArrays(GL_TRIANGLE_STRIP, 4, 4);
glDrawArrays(GL_TRIANGLE_STRIP, 8, 4);
最佳回答

你们的最佳选择是把这块土地变为三角地。 如果你使用指数化的三角地带,则有<条码>glPrimitive RestartInd,其中基本具体规定了一个指数,即:在重新开脱时,该星号可在开放式ES2.0中查到,尽管如此,我猜测没有帮助。

另一种选择是将“简易机场”与精炼的三角体连接起来,但这种记忆将像将碎块转换成三角体(两个外vert)。

问题回答

你们可以通过添加点子,形成细形的三角体,使三角破碎,使图形的驱动力能够优化这些分光,使三轴线脱光,能够形成两块(两块三角体)





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签