POV-Ray : Newsgroups : povray.unofficial.patches : Mega Copy_Parametric() bug? : Mega Copy_Parametric() bug? Server Time
2 Sep 2024 14:20:38 EDT (-0400)
  Mega Copy_Parametric() bug?  
From: david sharp
Date: 13 Dec 1999 13:32:38
Message: <38553bc6@news.povray.org>
Previously I posted that there was a bug with
'#declare'd parametric objects which caused
Windows MegaPOV to crash. I believe it is because
the function Copy_Parametric() in f_param.c incompletely
copies the parametric object.

I took the defintion of the Parametric object from isosrf.h
and simply made sure Copy_Parametric() gives the
new object *all* the old properties, sticking the following
lines into Copy_Parametric just before return():
/* added */
    New->last_u=Old->last_u;
    New->last_v=Old->last_v;
    New->Inverted=Old->Inverted;
    New->umin=Old->umin;New->umax=Old->umax;
    New->vmin=Old->vmin;New->vmax=Old->vmax;
    #ifdef IsoBlobPatch
         New->normal_type=Old->normal_type;
    #endif
/* end of added */
Some of these  lines might be unnecessary (e.g. last_u ?)
or undesirable to copy, but this, at least, works with DJGPP
compile (gcc 2.95.2). I.e., it seems to render #declare'd
parametric objects correctly now.

I don't have MS VC++, so I haven't tested this for Windows
version.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.