POV-Ray : Newsgroups : povray.programming : [BUG] POVRay excessive memory consumption : Re: [BUG] POVRay excessive memory consumption Server Time
5 Jul 2024 14:54:17 EDT (-0400)
  Re: [BUG] POVRay excessive memory consumption  
From: Wolfgang Wieser
Date: 31 Jan 2004 04:24:40
Message: <401b7457@news.povray.org>
Thorsten Froehlich wrote:

> In article <40197115@news.povray.org> , Wolfgang Wieser <wwi### [at] gmxde>
> wrote:
> 
>> Is there a define/const int anywhere which tells me the size
>> of the COLOUR array?
>>
>> Hard-coding the size 5 into MY code seems to be the worst solution.
> 
> Well, there is nothing in there that says it has to be a float, does it? 
> So this should read sizeof(COLOUR)/sizeof(COLC) if you really insist on
> the rather pointless idea to assume the COLOUR could ever change its
> number of componenents in 3.x code...
> 
Actually, I had in mind that color is "an array of 5 floats" and I did 
not look it up to see that it is really COLC when writing the code. 
But, right, COLC is certainly better. 

> The "correct" way to implement you interpolation would be to follow
> current implementation, which is to put the interpolation into a macro or
> inline
> function in colour.h .  This way anybody who might really want to try to
> change the number of color components could easily find your code next to
> the other code operating on colors.
> 
Yes. But in order to make hand-patching future versions of POVRay more 
easy for me, I decided to put as much code as possible into one extra 
file. 

There is no doubt that in case one actually wants to integrate this 
patch into megapov or povray, some code has to be placed at different 
locations. 

Wolfgang


Post a reply to this message

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