Tesselation run time error?

Member
Posts: 321
Joined: 2004.10
Post: #1
I've just started to use tesselation in openGL and thought I'd throw this out
on the outside chance someone has seen something like this before. my
program has a run abend between the EndContour and the EndPolygon.

I've got cout debug statements in all the CALLBACK functions, but these are never seen. Oh well, back to Chapter 11 of the Redbook.




Code:
glNewList(listID, GL_COMPILE);
      glColor3f(1,1,1);
      gluTessBeginPolygon(tess, 0);                      
         gluTessBeginContour(tess);
            for (int j = 0; j < openGLvertices.size()-1; j++ )
            {
               tessVertex[0] = openGLvertices[j].point.x;
               tessVertex[1] = openGLvertices[j].point.y;
               tessVertex[2] = 0;
               gluTessVertex(tess, tessVertex, tessVertex);
            }              
          gluTessEndContour(tess);  
          cout << "after gluTessEndContour " << endl;    
      gluTessEndPolygon(tess);  
      cout << "after gluTessEndPolygon " << endl;          
   glEndList();


567.943 472.831 0
after gluTessEndContour

Project has exited due to signal 10 (SIGBUS).
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
wow, people actually use the GLU tesselators?
Quote this message in a reply
Member
Posts: 321
Joined: 2004.10
Post: #3
Quote:wow, people actually use the GLU tesselators?

Yikes, this doesn't exactly fill me confidence Smile

Do most people do something else?

Here's what I'm doing currently. I draw a 2D "drawing" in Adobe Illustrator
and then save it off as an SVG (scalable vector graphic) file. My "test" drawing
is a closed path consisting of lines and bezier curves. My openGL programs reads in the SVG data and creates a display list of the complex outline (contour) which is exactly like the Illustrator drawing. It's a pretty complex polygon with 200+ vertices. Everything is fine at this step.

However, when I tried to "fill in" this POLYGON with a color, I got some bleed over and the countour was not fully preserved. I assume that the problem was concave polygons. So I'm persuing GLU tesselators to make them convex.

Is there a tool or program or something that will take my path/outline/contour vertices and automatically break up into convex polygons?
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
That sounds like a good use of them. Only other place I've ever heard of them being used is FTGL, which has a similar problem to solve.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #5
This is awesome and really easy to use/embedd: http://www.cs.cmu.edu/~quake/triangle.html

As long as you can give a coordinate inside each hole..

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Run time error with glGenLists(1) ? WhatMeWorry 5 2,979 Feb 26, 2006 03:33 AM
Last Post: OneSadCookie