Results 1 to 3 of 3

Thread: edges problem

  1. #1
    Guest

    edges problem

    Hi!
    I'm beginner in opengl.
    How can I draw a rectangle with its black edges and fill with red color?
    or another primitive like disk or partial disk?
    or how can i draw a red cube with its black edges?
    I try to use glflagedges and glpolygonMode but i can't view correctly
    the edges?
    i need some example, please!

    thanks

  2. #2
    Senior Member Regular Contributor
    Join Date
    May 2000
    Location
    Manchester - UK
    Posts
    138

    Re: edges problem

    You really need to draw it twice, once with
    Code :
    glPolygonMode ( GL_FRONT_AND_BACK, GL_FILL );
    to draw your filled red cube.

    And then
    Code :
    glPolygonMode ( GL_FRONT_AND_BACK, GL_LINES );
    to draw your cube in wireframe, you'll have to set the drawing colour to black...

    Read up on PolygonOffset to, that could come in handy.

    Paul Groves
    pauls opengl page
    paul's opengl message board
    Paul Groves
    [b] pauls opengl page

  3. #3
    Guest

    Re: edges problem

    And this work fine with flat (2D) nurbs surface?

Similar Threads

  1. Silhouette Edges
    By Riskz in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 04-13-2009, 04:57 PM
  2. Lighting problem, jaggy looking edges
    By grady in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 11-28-2001, 05:36 AM
  3. Silhouette Edges
    By theghost in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 10-13-2001, 04:59 PM
  4. Detecting Edges
    By KurtCob in forum OpenGL: Basic Coding
    Replies: 9
    Last Post: 01-27-2001, 12:13 PM
  5. Detecting edges
    By KurtCob in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 01-26-2001, 09:53 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