Results 1 to 3 of 3

Thread: Drawing a random form

  1. #1
    Guest

    Drawing a random form

    Hi,

    I am trying to draw a random form..
    I have all the coordonates, but I am not sure as to what form of drawing I should use. I tried GL_POLYGON, but it seems to draw objects in which you can see every face from any point within the surface, which is not always the case...
    Any ideas (without breaking the objetc into quads, etc...).
    Thx.

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    France
    Posts
    880

    Re: Drawing a random form

    You should use a tesselator object via the GLU library.

    Look for functions such as :

    gluNewTess
    gluTessVertex
    gluTessBeginContour
    gluTessBeginPolygon

    Basically, a tesselator "tesselates" ( ) which means it divides your objects into triangles.

    When you want to display concave objects, you have to use a tesselator (GLU one or your own !).

    GL_POLYGON will only render convex shapes.

    Hope this helps.

    Regards.

    Eric

  3. #3
    Guest

    Re: Drawing a random form

    Hey Eric,

    Thanks a lot !!

    It was exactly what I was looking for. Knowing what I had to used, I looked around for a bit of sample code & discussions (I saw it's not the first time you answered this), and now, it works fine. Once again, thanks !

    Moose

Similar Threads

  1. Replies: 3
    Last Post: 06-15-2015, 03:48 AM
  2. Vertex Array drawing random points and colors
    By Beiufin in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 10-04-2012, 10:09 AM
  3. Draw on Form
    By appdeveloper in forum OpenGL: Windows
    Replies: 1
    Last Post: 09-03-2009, 07:19 PM
  4. At someone form nVidia
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 02-10-2003, 08:06 AM
  5. Drawing on more than one form at a time.
    By John Jenkins in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 09-25-2002, 07:17 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