Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: How to highlight visible edges

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

    How to highlight visible edges

    I have 3d objects (they are made from GL_POLYGON that are cover by repeating 2D textures.
    I want to highlighted visible edges between polygons (to have line making a border). What is the easiest way how to do it ?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Feb 2000
    Location
    France
    Posts
    1,118

    Re: How to highlight visible edges

    If I understand correctly what you are trying to achieve, you could use the "polygon offset" feature and re-render your objects in wireframe.

    Regards.

    Eric

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    May 2001
    Location
    France
    Posts
    768

    Re: How to highlight visible edges

    And for rendering in wireframe (assuming you're using the POLYGON primitive) the easiest way is to call glPolygonMode :

    glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); // Faces will be rendered solid
    glBegin(GL_POLYGON);
    ...
    glEnd();
    glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); // Faces will be rendered in wireframe
    glBegin(GL_POLYGON);
    ...
    glEnd();

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •