From a56b4764d2773a957658e496b0e2863e27b0bca9 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Tue, 18 Jan 2005 14:53:32 +0000 Subject: Fixed a big memory leak in Geo.c related to polys and tristrips. Fixed a typo in the find closest command related to atomic groups. --- generic/tkZinc.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'generic/tkZinc.c') diff --git a/generic/tkZinc.c b/generic/tkZinc.c index e9fa9de..6f0ec05 100644 --- a/generic/tkZinc.c +++ b/generic/tkZinc.c @@ -3194,7 +3194,7 @@ FindItems(ZnWInfo *wi, if (argc > (first+4)) { result = ZnItemWithTagOrId(wi, args[first+4], &item, search_var); if ((result == TCL_OK) && (item != ZN_NO_ITEM)) { - if ((item->class == ZnGroup) && !ZnGroupAtomic) { + if ((item->class == ZnGroup) && !ZnGroupAtomic(item)) { ps.in_group = item; } else { @@ -8742,11 +8742,11 @@ ZnTessBegin(GLenum type, tristrips->num_strips * sizeof(ZnStrip)); tristrips->strips[tristrips->num_strips-1].fan = (type==GL_TRIANGLE_FAN); } - /*printf("Début de fragment de type: %s\n", - (type == GL_TRIANGLE_FAN) ? "FAN" : - (type == GL_TRIANGLE_STRIP) ? "STRIP" : - (type == GL_TRIANGLES) ? "TRIANGLES" : - (type == GL_LINE_LOOP) ? "LINE LOOP" : "");*/ + //printf("Début de fragment de type: %s\n", + //(type == GL_TRIANGLE_FAN) ? "FAN" : + //(type == GL_TRIANGLE_STRIP) ? "STRIP" : + //(type == GL_TRIANGLES) ? "TRIANGLES" : + //(type == GL_LINE_LOOP) ? "LINE LOOP" : ""); } static void @@ -8821,8 +8821,9 @@ ZnTessCombine(GLdouble coords[3], cdata->next = ZnTesselator.combine_list; ZnTesselator.combine_list = cdata; *out_data = &cdata->v; - /*printf("Création d'un nouveau sommet en %g %g\n", - cdata->v[0], cdata->v[1]);*/ + ZnTesselator.combine_length++; + //printf("Création d'un nouveau sommet en %g %g\n", + //cdata->v[0], cdata->v[1]); } static void @@ -8901,6 +8902,7 @@ InitZinc(Tcl_Interp *interp) { */ ZnTesselator.tess = gluNewTess(); ZnTesselator.combine_list = NULL; + ZnTesselator.combine_length = 0; gluTessCallback(ZnTesselator.tess, GLU_TESS_BEGIN_DATA, (_GLUfuncptr) ZnTessBegin); gluTessCallback(ZnTesselator.tess, GLU_TESS_VERTEX_DATA, -- cgit v1.1