[Fluxus] render-to-texture progress

gabor papp gabor.lists at mndl.hu
Tue Jan 27 06:34:49 PST 2009


i'm trying to add render-to-texture capabilities of fluxus. i created a
new branch called fbo-pixels. it's promising, but there are still quite
a lot of problems with it. example code:

(clear)

(define p (build-pixels 256 256))

(define (animate)
    (with-state
        (bind p)
        (hint-wire)
        (rotate (vector (* 90 (time)) 0 0))
        (draw-cube)))

(every-frame (animate))

this renders a rotating wireframe cube in the pixels, that you can use
later as a texture. the main problem is that there's something like
lighting or fog on the texture, and i was not able to figure it out yet
where it is coming from. because of this bug, you have to zoom in to see
the image rendered by the example code, otherwise only a white rectangle
is shown. any ideas or help would be appreciated.

the render target is set on state level and checked in the prerender
method of each primitive.

changes to the camera affects the picture rendered to the texture,
probably we should reinitialise the camera after each bind state.

best,
gabor




More information about the Fluxus mailing list