[Fluxus] (build-pixels) textures

Ted tedr56 at gmail.com
Thu Feb 16 09:13:20 PST 2012


Another thread to discuss about the 4th parameter in the (build-pixels)
function.

I do realize the point for a ffgl chaining but I can't figure out the
feedback goal.
Taking the supplied fluxus example : pixels-feedback.scm

(clear)

(scale (vector 20 15 1))

(define p (build-pixels 512 512 #t 2))

(define frame 0)

(every-frame
    (let ([tex (pixels->texture p frame)]
          [ptex (pixels->texture p (bitwise-xor frame 1))])
        (with-primitive p
            (pixels-render-to tex)
            (pixels-display tex))
        (with-pixels-renderer p
            (clear-colour 1)
            (with-state
                (texture ptex)
                (rotate (vector (* 60 (time)) 45 0))
                (scale 6)
                (draw-cube)))
        (set! frame (bitwise-xor frame 1))))

I don't see the goal of the alternating frame  variable value
and why don't shorten this in this, using only one texture:

(clear)

(scale (vector 20 15 1))

(define p (build-pixels 512 512 #t 1))

(define frame 0)

(every-frame
    (let ([tex (pixels->texture p frame)])
        (with-primitive p
            (pixels-render-to tex)
            (pixels-display tex))
        (with-pixels-renderer p
            (clear-colour 1)
            (with-state
                (texture tex)
                (rotate (vector (* 60 (time)) 45 0))
                (scale 6)
                (draw-cube)))))

The other Gabor example "pixels.scm" seems to me quite confusing too
with this balanced frame variable.

That was my first questioning
I read in the mailing list, the main goal was to avoid multiple pixels
primitives.
My goal is to build a pixels renderer with a pixels or texture mask what
I did with to pixels renderer and a multitextured plane playing with
blending parameters.
You'll find it in attachement in "multitexture-pixels.scm".

But can I use the different pixels primitives textures to do sort of
multitexturing, or I'm misunderstanding this.

Thanks for any explanations.

On an other note, there is no documentation in the helpmap on the
(pixels-render-to ) and (pixels-display ) functions, and the 4th
(build-pixels) parameter.
I'll be happy to translate but I prefer to let you explain these
things. ;-)


best,
Ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pawfal.org/pipermail/fluxus-pawfal.org/attachments/20120216/9b3aef7c/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multitexture-pixels.scm
Type: text/x-scheme
Size: 1626 bytes
Desc: not available
URL: <http://lists.pawfal.org/pipermail/fluxus-pawfal.org/attachments/20120216/9b3aef7c/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixels.scm
Type: text/x-scheme
Size: 2459 bytes
Desc: not available
URL: <http://lists.pawfal.org/pipermail/fluxus-pawfal.org/attachments/20120216/9b3aef7c/attachment-0005.bin>


More information about the Fluxus mailing list