On Aug 21, 6:15=A0pm, uuilly <willy.li...@[EMAIL PROTECTED]
> wrote:
> On Aug 21, 5:45=A0pm, uuilly <willy.li...@[EMAIL PROTECTED]
> wrote:
>
>
>
> > On Aug 21, 5:35=A0pm, uuilly <willy.li...@[EMAIL PROTECTED]
> wrote:
>
> > > On Aug 21, 4:58=A0pm, "jbwest" <jbw...@[EMAIL PROTECTED]
> wrote:
>
> > > > "uuilly" <willy.li...@[EMAIL PROTECTED]
> wrote in message
>
> > >
>news:b204512e-7fb7-4fdc-9d46-369db9277154@[EMAIL PROTECTED]
> > > > On Aug 21, 9:11 am, "jbwest" <jbw...@[EMAIL PROTECTED]
> wrote:
>
> > > > > <willy.p...@[EMAIL PROTECTED]
> wrote in message
>
> > > >
>news:c45bd917-ce46-4f04-82e7-4cf6508e6e15@[EMAIL PROTECTED]
> > > > > On Aug 20, 5:40 pm, "jbwest" <jbw...@[EMAIL PROTECTED]
> wrote:
>
> > > > > [...]
>
> > > > > > Gosh, it's been a while... Is it a closure problem? Do you
need=
to add a
> > > > > > last point =3D 1st in the input data to close up the polygon ?
>
> > > > > > jbw
> > > > > >I've tried w/ and w/o a last=3D=3Dfirst. It's funny, it fixes
so=
me of the
> > > > > >counties and breaks just as many others. Any other thoughts? My
=
next
> > > > > > move is to write my own tessellation algorithm.
>
> > > > > That's definitely a closure, off-by-one or last-triangle logic
pr=
oblem.
> > > > > I've
> > > > > never had problems with the much-maligned tesselator with very
co=
mplex
> > > > > geometries. Surely you can just trace what's being emitted and
se=
e why the
> > > > > last triangle isn't being created (or has the wrong winding ?).
>
> > > > > jbw
> > > > >I think I get closure, first =3D=3D last, but what is an: "Off by
=
one" or
> > > > >"last triangle logic problem"? =A0Thanks for the advice btw.
>
> > > > Your sample data doesn't even invoke Combine on my Linux glu
Tessel=
ator
> > > > sample app. Just a combination of tri-strips and tri-fans,
resultin=
g in a
> > > > rectangle. One or the other of those types of BEGIN appears to be
> > > > implemented wrong in your app. Otherwise, does this note apply to
y=
ou ?
>
> > > > "Notes
> > > > It is a common error to use a local variable for location or data
a=
nd store
> > > > values into it as part of a loop. For example: for (i =3D 0; i <
NV=
ERTICES;
> > > > ++i) {
> > > > =A0 GLdouble data[3];
> > > > =A0 data[0] =3D vertex[i][0];
> > > > =A0 data[1] =3D vertex[i][1];
> > > > =A0 data[2] =3D vertex[i][2];
> > > > =A0 gluTessVertex(tobj, data, data);
> > > > =A0 }
>
> > > > This doesn't work. Because the pointers specified by location and
d=
ata might
> > > > not be dereferenced until gluTessEndPolygon is executed, all the
ve=
rtex
> > > > coordinates but the very last set could be overwritten before
tesse=
llation
> > > > begins.
>
> > > > Two common symptoms of this problem are consists of a single point
=
(when a
> > > > local variable is used for data) and a
GLU_TESS_NEED_COMBINE_CALLBA=
CK error
> > > > (when a local variable is used for location."
>
> > > > jbw
>
> > > Wow. =A0Can you paste all your gluCallbacks here?
>
> > I am not even using callbacks for begin and end. =A0I'm just passing
th=
e
> > raw gl routines. =A0Combine callback and tessError are my only two
> > custom callbacks.
>
> > =A0 =A0 =A0 =A0 gluTessCallback( _tessPtr, GLU_TESS_BEGIN, ( GLvoid( *
=
)
> > ( ... ) )glBegin );
> > =A0 =A0 =A0 =A0 gluTessCallback( _tessPtr, GLU_TESS_END, ( GLvoid( * )
> > ( ... ) )glEnd );
> > =A0 =A0 =A0 =A0 gluTessCallback( _tessPtr, GLU_TESS_VERTEX, ( GLvoid(
*=
)
> > ( ... ) )glVertex3fv );
> > =A0 =A0 =A0 =A0 gluTessCallback( _tessPtr, GLU_TESS_COMBINE, ( GLvoid(
=
* )
> > ( ... ) )combineCallback );
> > =A0 =A0 =A0 =A0 gluTessCallback( _tessPtr, GLU_TESS_ERROR, ( GLvoid( *
=
)
> > ( ... ) )tessError );
>
> > same code for linux ****t:
> > =A0 =A0 =A0 =A0 gluTessCallback( _tessPtr, GLU_TESS_BEGIN, ( void( *
)(=
) )glBegin );
> > =A0 =A0 =A0 =A0 gluTessCallback( _tessPtr, GLU_TESS_END, ( void( * )()
=
)glEnd );
> > =A0 =A0 =A0 =A0 gluTessCallback( _tessPtr, GLU_TESS_VERTEX, ( void( *
)
> > () )glVertex3fv );
> > =A0 =A0 =A0 =A0 gluTessCallback( _tessPtr, GLU_TESS_COMBINE, ( void( *
=
)
> > () )combineCallback );
> > =A0 =A0 =A0 =A0 gluTessCallback( _tessPtr, GLU_TESS_ERROR, ( void( * )
> > () )tessError );
>
> And the verts are not getting destroyed before endTess().
Here is the output from my tessellation:
Raw Verts:
-2.2583 0.801231 0
-2.25511 0.801228 0
-2.25496 0.801229 0
-2.25203 0.801228 0
-2.24635 0.801228 0
-2.24635 0.798129 0
-2.24636 0.796031 0
-2.24636 0.791673 0
-2.25056 0.791665 0
-2.25095 0.791663 0
-2.2557 0.791649 0
-2.25728 0.791648 0
-2.25829 0.791646 0
-2.25828 0.791834 0
-2.25829 0.792248 0
-2.25829 0.799885 0
-2.2583 0.80077 0
-2.2583 0.801231 0
Output from Callbacks:
Combine Callback Vertex Data
-2.25828 0.791834 0
-2.25829 0.791646 0
-2.2557 0.791649 0
-2.25728 0.791648 0
Combine Callback Vertex Data
-2.25496 0.801229 0
-2.25203 0.801228 0
-2.24635 0.801228 0
-2.24635 0.798129 0
begin: "GL_TRIANGLE_FAN"
vert -2.25496 0.801229 0
vert -2.24635 0.798129 0
vert -2.25829 0.799885 0
vert -2.2583 0.80077 0
vert -2.25511 0.801228 0
vert -2.25496 0.801229 0
end
begin: "GL_TRIANGLE_FAN"
vert -2.24636 0.796031 0
vert -2.24636 0.791673 0
vert -2.25828 0.791834 0
vert -2.25829 0.792248 0
vert -2.25829 0.799885 0
vert -2.24635 0.798129 0
end
begin: "GL_TRIANGLE_FAN"
vert -2.25828 0.791834 0
vert -2.24636 0.791673 0
vert -2.25056 0.791665 0
vert -2.25095 0.791663 0
vert -2.2557 0.791649 0
vert -2.25828 0.791834 0
end
begin: "GL_TRIANGLES"
vert -2.25511 0.801228 0
vert -2.2583 0.80077 0
vert -2.2583 0.801231 0
vert -2.24635 0.801228 0
vert -2.25203 0.801228 0
vert -2.25496 0.801229 0
vert -2.25828 0.791834 0
vert -2.25829 0.791646 0
vert -2.25728 0.791648 0
end
Any thoughts?


|