Original Post
Okay, I've answered tons of RTFM questions in other forums here, I feel like I'm entitled to ask one at least once. Say I have a static mesh where I have a list of vertices and one set of texture coordinates, and I have a list of indicies (32 bit) each trio of which represents one triangle. What are the simplest OpenGL calls to make to be able to draw this as a vertex/index buffer? Basically, something to do this quickly:
vec4* vert_buffer;
unsigned int* tri_buffer;
float* uv_buffer;
glBegin(GL_TRIANGLES);
for(int i = 0; i < tri_count/3; i += 3)
{
glTexCoord2fv(uv_buffer[tri_buffer]);
glVertex4fv(vert_buffer[tri_buffer]);
glTexCoord2fv(uv_buffer[tri_buffer[i + 1]]);
glVertex4fv(vert_buffer[tri_buffer[i + 1]]);
glTexCoord2fv(uv_buffer[tri_buffer[i + 2]]);
glVertex4fv(vert_buffer[tri_buffer[i + 2]]);
}
glEnd();