-
Junior Member
Regular Contributor
passing Vertex +Face list to opengl?
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:
glBegin(GL_TRIANGLES);
for(i=0;i<=Number of faces;i++
{
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?
-
Re: passing Vertex +Face list to opengl?
Take a look at the glVertexPointer and glDrawArrays calls. They are what you are looking for.
Nate http://nate.scuzzy.net
-
Junior Member
Regular Contributor
Re: passing Vertex +Face list to opengl?
Thank you for this link Nate,it helped me a lot!!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules