View Full Version : passing Vertex +Face list to opengl?

03-04-2000, 03:54 AM
I have a Vertex List(consisting of x,y,z values for every Vertex) and a Face List(consisting of A,B C,specifieing 3 Vertices from Vertex List).Now the pseudo code for my pogram to Draw these Faces looks like this:

for(i=0;i<=Number of faces;i++ http://www.opengl.org/discussion_boards/ubb/wink.gif{
glVertex3f(coords of A from Face[i]);
glVertex3f(coords of B from Face[i]);
glVertex3f(coords of C from Face[i]);
I there another,faster possibility to send such a Face List to OpenGl,than using this "not very smart" loop?
Perhaps there is a Function like glFaceList() or something like this?

03-04-2000, 09:06 AM
Take a look at the glVertexPointer and glDrawArrays calls. They are what you are looking for.

Nate http://nate.scuzzy.net

03-06-2000, 04:31 AM
Thank you for this link Nate,it helped me a lot!!!! http://www.opengl.org/discussion_boards/ubb/smile.gif