我试图利用垂直阵列来提取一个相当庞大的粉碎机,含有大量vert。 案文是从这些案文中确定的,很容易按照以下路线立即提取:
glBegin(GL_TRIANGLES) {
for ( int faceIdx = 0; faceIdx < nFaces; ++faceIdx )
glVertex3fv(&vertexArray[vIdx]);
glTexCoord2fv(&texCoord[vIdx++]);
glVertex3fv(&vertexArray[vIdx]);
glTexCoord2fv(&texCoord[vIdx++]);
glVertex3fv(&vertexArray[vIdx]);
glTexCoord2fv(&texCoord[vIdx++]);
}
}
glEnd();
然而,就可读性、速度和其余部分而言,我想使用垂直阵列(以便移至甚远的地方)。 是否有办法绕过把一枚阴道带入阵列多次?
As I understand it at the moment it s necessary to specify each vertex of the mesh as many times as it appears in a face of the mesh, as each vertex identifies to multiple texture coordinates (the textures are captured from a real-world image of the object the mesh approximates), i.e. my vertex/tex coord array reads as if I d filled it in immediate mode.
是否有任何办法使用垂直阵列,同时具体说明文字坐标,而不使用多余(我指的是重复的)vert?