Closed ghost closed 10 years ago
Hi,
'pri' stands for Primitive Restart Index, it is a value that which when found in the index array restarts the currently drawn primitive. The plane is drawn using the GL_TRIANGLE_STRIP primitives, and the strips are oriented in the direction of the plane's u-axis and each such strip is restarted by the PRI. This allows to draw the plane using a single glDrawElements call instead of one call-per-strip, which is much more efficient. The PRI has to be a value that is not 'normally' found in the index array.
So unless I'm overlooking something, this is a feature not a bug :)
Ok, thanks. Did not know about this opengl feature.
the indices array returned of the plane shape contains indices for points which are not in the positions array
with the default udiv(2) and vdiv(2) the index 14 is contained in the index array although there are only 9 points / 27 floats
i think the bug is in plane.ipp line 32: indices[k++] = pri; you probably meant the last point whereas pri is the number of indices.