NURBS writes cabalistics codes to my term !


I’m experiencing a strange behaviour : when plotting a nurbs, my program writes some strange things on to the terminal I’ve launched the applicatin from.

Here is my code :

g_print("Begin Nurbs
(GLint) surf->nku,
(GLfloat *) surf->knotsu,
(GLint) surf->nkv,
(GLfloat *) surf->knotsv,
(GLint) surf->npv * 4,
(GLfloat *) surf->ppoint,
(GLint) surf->dgu 1,
(GLint) surf->dgv 1,
g_print("End Nurbs

(g_print are usefull to determine the origin of the problem…)

Graphical display is OK, but on terminal, I have :

Begin Nurbs
arc_ccw_turn, p = 0
case b
arc_ccw_turn, p = 0
case d
arc_ccw_turn, p = 0
case a
arc_ccw_turn, p = 0
case c
End Nurbs

Isn’t it curious ?

I’m using Linux Mandrake 8.2 with XFree86-devel-4.2.0
libMesaGLU1-devel-4.0.1 and libgtkglarea5-devel-1.2.3
I have a nvidia TNT2 card with last nvidia driver.

Some idea ?

Thanks for any help…

curious … but have you grep’d the source code for the MesaGLU for the string “arc_ccw_turn”, or at least done a strings on the libraries to get a clue as to where it is coming from?

Do you have any “debug” flags of your own which just might match a MesaGLU debug flag and has inadvertantly switched on a debug mode for you!

Just some thoughts … OK I have looked …

in the file

Mesa-4.0.3/si-glu/libnurbs/internals/ you will find …

Subdivider::ccwTurn_sr( Arc_ptr j1, Arc_ptr j2 ) // dir = 1
register TrimVertex *v1 = &j1->pwlArc->pts[j1->pwlArc->npts-1];
register TrimVertex *v1last = &j1->pwlArc->pts[0];
register TrimVertex *v2 = &j2->pwlArc->pts[0];
register TrimVertex *v2last = &j2->pwlArc->pts[j2->pwlArc->npts-1];
register TrimVertex *v1next = v1-1;
register TrimVertex *v2next = v2+1;
int sgn;

assert( v1 != v1last );
assert( v2 != v2last );

#ifndef NDEBUG
dprintf( "arc_ccw_turn, p = %d
", 0 );

} else if( v1next->param[0] > v2next->param[0] ) {

#ifndef NDEBUG
dprintf( "case b
" );
assert( v1->param[0] <= v2next->param[0] );


So, your lib has been built with NDEBUG undefined …

Check your build again …



I’ve tried grep on my own source code but not on the lib source code (I use precompiled libraries)

Anyway thanks for your help…