POV-Ray : Newsgroups : povray.binaries.animations : Uberpov persistent feature for animation of big scene : Re: Uberpov persistent feature for animation of big scene Server Time
25 Apr 2024 06:35:17 EDT (-0400)
  Re: Uberpov persistent feature for animation of big scene  
From: clipka
Date: 9 Jan 2018 11:54:04
Message: <5a54f3ac$1@news.povray.org>
Am 09.01.2018 um 03:23 schrieb Kenneth:

> #macro MyMacro()
> #ifndef(FOO)
> #local FOO = pigment{image_map{png "MY_IMAGE.png"}} // #local, not #declare
> #else
> #end
> pigment{FOO}
> #end
> 
> #for(i,1,10000)
> box{0,1
>    pigment{MyMacro()}
>    translate i*x
> }
> #end
> 
> Would this *re-load* the image_map 10,000 times into memory... or would it load
> only once and 'instantiate' the image_map 9,999 times, with MUCH less memory
> use? I guess I need to do an experiment to find out.

It would load it 10,000 times; local variables are ditched after every
macro invocation.


Post a reply to this message

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