[Fluxus] render to texture

Dave Griffiths dave at pawfal.org
Fri Jan 2 12:34:06 PST 2009


On Fri, 2009-01-02 at 18:40 +0100, gabor papp wrote:
> i am working on rendering to textures in fluxus, but got a bit stuck. i
> modified the pixel primitive to use a framebuffer object, and i'm
> planning to use it somehow like this:
> 
> (define pixels (build-pixels 256 256))
> 
> (bind pixels)
> (draw-cube)
> (unbind)
> 
> (bind) and (unbind) could be used similarly to (with-primitive ...)
> using something like (bind-pixels ...).
> if the pixels fbo is bound rendering is directed to the fbo instead of
> the output window. when it is unbound the target of rendering is set
> back to the window. then the rendered buffer can be used as a texture
> using (pixels->texture).
> 
> the problem is that interpreting the script and rendering the scene is
> done at different places, so as far as i understand binding should be
> done when the rendering is taking place. am i right? or is there a more
> logical way how to do this? should it be done by adding the target
> buffer to the state? 

On the face of it, a state item for the target seems like the best way
to do it. A check per primitive should be fine overhead wise.

Exciting stuff!

cheers,

dave




More information about the Fluxus mailing list