Results 1 to 3 of 3

Thread: passing Vertex +Face list to opengl?

  1. #1
    Senior 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
    Senior 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!!!!

Similar Threads

  1. changing back face to front face in vertex shader
    By hoschie211 in forum OpenGL: GLSL
    Replies: 1
    Last Post: 11-03-2009, 12:36 AM
  2. is vertex interpolated when passing shader?
    By rapheal in forum OpenGL: GLSL
    Replies: 2
    Last Post: 09-11-2008, 08:07 PM
  3. opengl gml per face normal and per face vertex question
    By GaMEFRo in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 11-06-2006, 10:49 AM
  4. automatic face indices from vertex list
    By dashiell in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 10-01-2000, 07:51 PM
  5. passing Vertex +Face list to opengl
    By XBCT in forum OpenGL: Advanced Coding
    Replies: 12
    Last Post: 03-15-2000, 03:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean