Running triangles through loop

This is a discussion on Running triangles through loop within the C++ Programming forums, part of the General Programming Boards category; I know this is kind of opengl question, but It also has to do with c++. Hope you guys understand ...

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    5

    Running triangles through loop

    I know this is kind of opengl question, but It also has to do with c++.
    Hope you guys understand this.
    Okay I need to be able to make every triangle running through this loop selectable by the mouse. How would I do this??
    I know how to use glLoadName and the selection and feedback system.
    Please some hints or pointers
    THANKS!!

    for (int i= 0; i<tris.size();i++)
    {


    glVertex3f(verts[tris[i].ix[2]].x,verts[tris[i].ix[2]].y,verts[tris[i].ix[2]].z);
    glVertex3f(2.0f,0.0f,0.0f);
    glVertex3f(5.0f,0.0f,0.0f);

    };
    glEnd();

  2. #2
    Registered User rmullen3's Avatar
    Join Date
    Nov 2001
    Posts
    330

    ~

    I dunno, that looks pretty weird (the way you're drawing stuff). I think there's a tutorial in the OGL section fo www.gametutorials.com about clicking polygons.

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    5

    Thanks

    Thanks anyone else got ideas??

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 12-01-2008, 09:09 AM
  2. Mutiliplcation Program that uses a (do, while, and for loop)?
    By Debbie Bremer in forum C++ Programming
    Replies: 4
    Last Post: 10-11-2008, 06:04 PM
  3. Running a program in a loop
    By Robert_Sitter in forum C# Programming
    Replies: 7
    Last Post: 01-27-2006, 09:09 AM
  4. loop needed also how to make input use letters
    By LoRdHSV1991 in forum C Programming
    Replies: 3
    Last Post: 01-13-2006, 04:39 AM
  5. when a while loop will stop ?
    By blue_gene in forum C Programming
    Replies: 13
    Last Post: 04-20-2004, 03:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21