Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: passing Vertex +Face list to opengl?

  1. #1
    Junior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    Germany
    Posts
    235

    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?

  2. #2

    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

  3. #3
    Junior Member Regular Contributor
    Join Date
    Mar 2000
    Location
    Germany
    Posts
    235

    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
  •