Results 1 to 6 of 6

Thread: diagonals on line-drawn polygons

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2003
    Posts
    3

    diagonals on line-drawn polygons

    If I draw quads on the screen using lines instead of fills, by doing:

    [CODE]
    glPolygonMode(GL_FRONT,GL_LINE);
    glPolygonMode(GL_BACK,GL_LINE);
    [CODE]
    beforer drawing the polygons, diagonals for each quad are also drawn if the quad is near the edge of the screen. Why does this happen and how can I fix it?

    Thanks,
    -dimroed

  2. #2
    Junior Member Newbie
    Join Date
    Oct 2000
    Posts
    6

    Re: diagonals on line-drawn polygons

    Not sure but try glDisable(GL_SMOOTH)...

  3. #3
    Senior Member Regular Contributor
    Join Date
    Sep 2001
    Location
    Eastern USA
    Posts
    218

    Re: diagonals on line-drawn polygons

    I would venture a guess that your implementation clips things that lie partially on and offscreen by decomposing them into triangles.

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2003
    Posts
    3

    Re: diagonals on line-drawn polygons

    Thanks... I tried to use glDisable(GL_SMOOTH), but it didn't seem to fix the problem. My base code is the same as the NeHe code from this website .

    Any other ideas about how to disable this clipping?

  5. #5
    Junior Member Newbie
    Join Date
    Oct 2000
    Posts
    6

    Re: diagonals on line-drawn polygons

    What grafix card are you using?

    I've seen 'near clip' problems on SiS
    grafix chips.

    I've also seen it on other boards but
    it was usually solved by not using the
    glShadeModel(GL_SMOOTH).

    NeHe's base code was usually the same
    from the 2d lesson thru the 3d textured
    lessons. Do you mean your base code is
    from lesson 1 or from another lesson?

  6. #6
    Junior Member Newbie
    Join Date
    Jan 2003
    Posts
    3

    Re: diagonals on line-drawn polygons

    Yeah, I'm using a SIS card. That must be it. Thanks!

    I am using NeHe's code from those first few lessons.

Similar Threads

  1. Features vs. Extensions: where does the line get drawn?
    By Alfonse Reinheart in forum Vulkan
    Replies: 1
    Last Post: 03-11-2016, 02:35 PM
  2. line not being drawn
    By bugmenot in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 03-12-2011, 12:12 PM
  3. Not all polygons are drawn
    By MiteT in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-27-2009, 05:41 PM
  4. polygons drawn from one side only
    By Neonic in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-12-2009, 03:05 PM
  5. Diagonal Non-drawn line through textures
    By gusnan in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 07-11-2008, 06:40 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