Results 1 to 7 of 7

Thread: Delimiting same colour quads

  1. #1
    Member Contributor
    Join Date
    Jan 2002
    Posts
    96

    Delimiting same colour quads

    How can I do borders around polygons without texturing them? I have a few quads next to each other but they are all the same colour, so want something to show where the edges are.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Delimiting same colour quads

    You need to first draw your geometry in solid form. That is, as you are currently doing. Then draw it a second time, but with glPolygonMode(FRONT_AND_BACK, GL_LINE). This will draw the model in wire frame mode. You may have to use polygon offset to avoind some Z-fighting.

    See the FAQ , chapter 13, for polygon offset.

  3. #3
    Member Contributor
    Join Date
    Jan 2002
    Posts
    96

    Re: Delimiting same colour quads

    That faq sounds pretty complex but I'll give it a go, thanks.

  4. #4
    Member Contributor
    Join Date
    Jan 2002
    Posts
    96

    Re: Delimiting same colour quads

    While I'm here can someone clarify that the front of a quad is the clockwise wound side?

  5. #5
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Delimiting same colour quads

    Would that not depend on how you draw the vertex?

    Originally posted by endo:
    While I'm here can someone clarify that the front of a quad is the clockwise wound side?

  6. #6
    Senior Member Regular Contributor
    Join Date
    Oct 2001
    Location
    Princeton, NJ
    Posts
    380

    Re: Delimiting same colour quads

    I believe that opengl culling considers a counter clockwise wound polygon to be facing forward

  7. #7
    Member Contributor
    Join Date
    Jan 2002
    Posts
    96

    Re: Delimiting same colour quads

    This is my confusion because the SuperBible says that Quads and Quadstrips have clockwise winding? I would really like a definitive answer....

Similar Threads

  1. OpenGL colour not able to render colour
    By mundrapiyush in forum OpenGL: Linux
    Replies: 3
    Last Post: 05-16-2010, 03:15 AM
  2. blink colour
    By adie_03 in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-27-2005, 12:13 PM
  3. colour order BGR
    By mr_coolio in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 02-11-2003, 05:34 AM
  4. colour smoothening
    By Rajveer in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-23-2002, 07:28 AM
  5. colour
    By fox in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 03-21-2001, 07:47 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