|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
Thanks!
-Nathan
david sharp <dsh### [at] interport net> wrote ...
>
> 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
|
![](/i/fill.gif) |