[Fluxus] (build-pixels) textures

Ted tedr56 at gmail.com
Mon Feb 20 05:28:33 PST 2012


Le jeudi 16 février 2012 à 23:02 +0100, gabor papp a écrit : 

> > I don't see the goal of the alternating frame  variable value
> > and why don't shorten this in this, using only one texture:
> it's not possible. it's an opengl limitation. a pixel-primitive is a 
> framebuffer object (fbo) in opengl. this means you can render content into 
> it. you can attach textures to an fbo, these are the pixel-primitive 
> textures. it is not possible to render into a texture, and use that 
> texture at the same time. that's why the texture switching is necessary.
> 

I get this now. But the script I posted on the previous mail works, and
display the same result.
Maybe it's an openGl driver update or something?


> > But can I use the different pixels primitives textures to do sort of
> > multitexturing, or I'm misunderstanding this.
> i'm not sure i understand the question. you can use pixel-primitive 
> textures for multitexturing. there's a second parameter of 
> (pixels->texture), to ask for the texture with the given the texture 
> index.


In fact, I would like to do that:

Pix - Pixels-Renderer
    \______Tex1
    \______Tex2
    \______Tex3

(cond
    ((mask-update?)
        (pixels-render-to 2)
    )
    (else
        (pixels-render-to 1)
    )
    (pixels-update)
    (pixels-display 3)

)
(define (pixels-update)
    ;The part I don't know how to write
    Tex3 = Tex1 - Tex2
)

I don't know how to access to write in a pixels texture. Is the pixels
primitive the only one allowed to update textures?
The idea is to make a multi-texturing ffgl-style scheme-writed.


An other question is, if I want to chain multiple ffgl effects,
One way would be with 10 anticipated textures in a pixels primitive
Or build one with only 2 textures,then destroy and rebuild with one more
texture for each added ffgl effect?
The point is, is a dozen empty texture is not to heavy in memory if I
have like a dozen of pixels primitives?
I don't know if I am really clear here.

Thanks for the advices.

Ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pawfal.org/pipermail/fluxus-pawfal.org/attachments/20120220/9abaefbf/attachment-0001.html>


More information about the Fluxus mailing list