Results 1 to 4 of 4

Thread: HELP:knows how to draw concave polygons quickly???

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2001
    Location
    Chengdu,Sichuan,China
    Posts
    12

    HELP:knows how to draw concave polygons quickly???

    Does anyone know how to draw concave polygons quickly? I mean that I just have a list of vertexes, but I don't know if it is a simple polygon or not. And perhaps there are one or more holes in it. You know, OpenGL could not do it automatically. Could you tell me what shall I do? GlUT or other ways?

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: HELP:knows how to draw concave polygons quickly???

    Hi !

    Use the glu tesselator code, it can handle almost any kind of polygons (concave and with holes), have a look at the gluTessBeginPolygon, gluTessBeginContour, gluTessCallback and so on.

    You should not use it to do the rendering though, it might be to slow, use it to put the result in a displaylist or something else so that you can render it fast later on.

    Mikael

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2001
    Location
    Chengdu,Sichuan,China
    Posts
    12

    Re: HELP:knows how to draw concave polygons quickly???

    Thanks for your replay.
    I am thinking about this problem:
    First I can check the polygon's vertexs, make sure that it is concave or convex. if it is a simple polygon, draw it directly. If it is a complex one, draw it by GLUT. there are not so many concave polygons or with one or more holes I think. So it would be faster. Do you think so? But how to judge it is concave or not fastest?
    Thanks for you help!

  4. #4
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: HELP:knows how to draw concave polygons quickly???

    Hi !

    Not GLUT, glu, this is the "utility" library that comes with OpenGL.

    Can't you just send them all through glu and create a displaylist for example ?, I don't know how to detect concave/convex state of a polygon, but most raytracers that support concave polygons have two parts, one for convex and one for concave polygons, maybe you could have a look at the source for one of those raytracers maybe ?

    Mikael

Similar Threads

  1. To display of concave polygons, polygons containing holes
    By deepa in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-13-2004, 09:22 PM
  2. Does anyone know how to draw concave polygons quickly?
    By Andyxia in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 06-28-2002, 05:55 PM
  3. Does anyone know how to draw concave polygons quickly?
    By Andyxia in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 06-28-2002, 09:52 AM
  4. How to draw concave polygons quickly???
    By Andyxia in forum OpenGL: General
    Replies: 0
    Last Post: 06-27-2002, 07:40 PM
  5. How to draw concave polygons quickly???
    By Andyxia in forum OpenGL: General
    Replies: 0
    Last Post: 06-27-2002, 07:35 PM

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