POV-Ray : Newsgroups : povray.unofficial.patches : Mega Copy_Parametric() bug? Server Time
2 Nov 2024 07:27:08 EDT (-0400)
  Mega Copy_Parametric() bug? (Message 1 to 2 of 2)  
From: david sharp
Subject: Mega Copy_Parametric() bug?
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

From: Nathan Kopp
Subject: Re: Mega Copy_Parametric() bug?
Date: 13 Dec 1999 20:47:43
Message: <3855a1bf@news.povray.org>
Thanks!

-Nathan

david sharp <dsh### [at] interportnet> 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

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