Results 1 to 4 of 4

Thread: glVertex3f into some sort of matrix?

  1. #1
    Member Contributor
    Join Date
    Oct 2008
    Posts
    63

    glVertex3f into some sort of matrix?

    I have been drawing my letters by doing somthing simular this this
    glBegin(GL_LINES); //LETTER N

    glVertex3f(50.0, 50.0, 0.0);
    glVertex3f(50.0, 350.0, 0.0);

    glVertex3f(50.0, 350.0, 0.0);
    glVertex3f(180.0, 350.0, 0.0);

    When my tutor does her letters, she does them like this
    w[0][0]=100;
    w[0][1]=250;
    w[1][0]=250;
    w[1][1]=50;
    w[2][0]=300;
    w[2][1]=100;
    w[3][0]=350;
    w[3][1]=50;

    How would i turn the way i do them, into the way she does them?
    thanks

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: glVertex3f into some sort of matrix?

    search glVertex2fv

  3. #3
    Member Contributor
    Join Date
    Oct 2008
    Posts
    63

    Re: glVertex3f into some sort of matrix?

    So do i just take the first two values out of my one and put them into their own array?

  4. #4
    Senior Member Regular Contributor Rosario Leonardi's Avatar
    Join Date
    Aug 2008
    Location
    Italy
    Posts
    356

    Re: glVertex3f into some sort of matrix?

    w is an array of point (they are already in their own array).
    To draw them you can simply do:
    Code :
    glBegin(yourPrimitiveHere);
    for(int i = 0; i < numberOfPointInW; i++)
       glVertex2fv(w[i]);
    glEnd();
    ~ ~ I tell you, realtime 3D is made of blood, sweat and screams! ~ ~

Similar Threads

  1. glVertex3f not drawing
    By tom384 in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 03-14-2010, 11:45 PM
  2. A glVertex3f question
    By Spin3D in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 02-11-2007, 08:09 PM
  3. glVertex3f
    By OGforever in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-28-2005, 11:23 PM
  4. glVertex3f() ???
    By kuniva in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 04-03-2005, 10:47 AM
  5. glvertex3f help!
    By azncrip4lif in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 07-19-2002, 07:04 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