Thread: OpenGL Polygons...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Location
    Melbourne, Australia
    Posts
    92

    Unhappy OpenGL Polygons...

    I'm drawing a polygon using OpenGL:

    Code:
    glBegin(GL_POLYGON);
    for (theta = 0; theta < 2 * pi; theta += 0.5)
    {
      point = Centre + Vector(theta, 50);
      WindowToGlCoords(MakeWindowCoords(point)).glVertex3d();
    }
    glEnd();
    Centre is of type Vector which is a class that deals with mathematical vectors. For example, centre could lie somewhere near the centre of the screen. The constructor of Vector that takes two coordinates takes an angle and a magnitude. But basically, you don't have to worry too much about that bit because I know the coordinates are coming out right.

    The problem is, If I have GL_POLYGON_SMOOTH enabled I end up with faint lines from the first vertex of the polygon to each other polygon, presumably where its been split up into tris for drawing.

    Does anybody know how this problem can occur, and how to fix it? (or any other information / places i should look!!)

    Thanks all!

    -jEFF
    Last edited by PsychoBrat; 01-01-2004 at 03:39 AM.
    psychobrat at gmail

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking OpenGL in Dev-C++
    By linkofazeroth in forum Game Programming
    Replies: 4
    Last Post: 09-13-2005, 10:17 AM
  2. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  3. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 07:57 PM
  4. OpenGL and Windows
    By sean345 in forum Game Programming
    Replies: 5
    Last Post: 06-24-2002, 10:14 PM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM