[Fluxus] fbo pixels commits

gabor papp gabor.lists at mndl.hu
Thu Jan 29 03:31:09 PST 2009


for a couple of reasons i changed the primitive level binding to state
level binding, so now the fbo is bound when entering a state, and
unbound when leaving it, istead of changing fbo's when the primitive is
rendered.

there was a need for clearing the fbo manually. i don't know how you
like this, but i changed pixels-clear, so it clears the pdata when the
primitive is grabbed, but clears the fbo when it is bound.

the fbo cube example should work like this now:

(clear)

(define p (build-pixels 256 256))

(with-primitive p
    ; primitive cleared
    (pixels-clear (vector 1 0 1))
    (pixels-upload))

(define (animate)
    (with-state
        (bind p)
	; fbo cleared
        (pixels-clear (vector 0 1 0 1))
        (rotate (vector (* 90 (time)) 0 0))
        (draw-cube))
    (with-state
        (texture (pixels->texture p))
        (draw-cube)))

(every-frame (animate))


now i'm going to try to sort out the camera issues. any suggestion how i
should address this?

best,
gabor




More information about the Fluxus mailing list