[fluxus] errors at runtime

Dave Griffiths dave at pawfal.org
Wed Jun 21 05:58:23 PDT 2006


> On Wednesday 21 June 2006 14:01, Dave Griffiths wrote:
>> >> if you do:
>> >>
>> >> (define (render)
>> >>     (draw-cube))
>> >> (every-frame (render))
>> >>
>> >> you get no cube?
>> >
>> > i get a cube. but no "animation", no repetition - i thought that's
>> what
>> > the
>> > function (is it called a function?) is good for
>>
>> to animate that script you have to tell it what to change:
>>
>> (define (render)
>>      (rotate (vector 0 1 0)) ; turn one degree in y each frame
>>      (draw-cube))
>> (every-frame (render))
>>
>> you need to redraw the cube every frame. if you just execute:
>>
>> (draw-cube)
>>
>> on it's own you get a cube for a frame and then it's gone. this is
>> called
>> immediate mode, retained mode will store and redraw the cube for you ie:
>>
>> (build-cube)
>>
>> which you want to use depends on what you want to do, immediate mode is
>> easier in some ways, but you have to recalculate the frame every time
>> it's
>> drawn so it can be slow and a bit cumbersome when you start to do more
>> complex things.
>>
>> cheers,
>>
>> dave
>
> hmm. i can only animated it by holding f5. it looks like the canvas is not
> cleared for every new frame (http://bilder.netzkind.org/fluxus01.png).

you typed build-cube, it should be draw-cube

> i think i need someone to hold my hand and walk me through this. sorry for
> spamming idle ml-readers ;-)

carry on - this is good info for me, as stuff that isn't immediatly
obvious, and needs to be added to the manual.

cheers,

dave




More information about the Fluxus mailing list