POV-Ray : Newsgroups : povray.general : Yet another SDL hack : Re: Yet another SDL hack Server Time
2 Aug 2024 12:15:59 EDT (-0400)
  Re: Yet another SDL hack  
From: Florian Brucker
Date: 19 Oct 2004 08:38:58
Message: <41750ae2@news.povray.org>
> Its problem is that it's just a hack which is very slow and inefficient
> (and uses a temporary file which shouldn't really be necessary).
> It's thus not a very good idea to use Parse_String in a tight loop
> which is executed millions of times.
That's of course true. It's just that I like doing things with the SDL 
which it was not developed to do. Because of some shortcomings on the 
SDL side (no pointers/references, no chance to pass an uninitialized 
identifier as a macro parameter, ...) you have to use hacks as those. 
With some modifications to Parse_String it's also possible to 
dynamically create macros, something I've used in some kind of extended 
plugin mechanism.

But you're right, I would not use such things in a "normal" scene, 
because it takes too long to parse and often gets complicated pretty fast.


Florian
-- 
camera{look_at-y*10location<8,-3,-8>*10}#local a=0;#while(a<999)sphere{
#local _=.01*a-4.99;#local p=a*.01-5;#local c=.01*a-4.995;<sin(p*pi)*5p
*10pow(p,5)*.01>sin(c*c*c*.1)+1pigment{rgb 3}}#local a=a+1;#end
/******** http://www.torfbold.com ******** http://www.imp.org ********/


Post a reply to this message

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