hi all,

render to texture support is merged from the fbo-pixels branch to master.

simple example how to use it:

(clear)

; create a new pixel primitive with active renderer
(define p (build-pixels 256 256 #t))

(define (animate)
    ; draw a cube in the pixel primitive
    (with-pixels-renderer p
        (identity)
        (clear-colour .2)
        (rotate (vector (* 82 (time))
                        (* 11 (time))
                        (* 8 (time))))
        (scale 5)
        (draw-cube))
    ; use the pixel primitive as a texture on a cube
    (texture (pixels->texture p))
    (translate (vector 2 0.5 0))
    (draw-cube))

best,
gabor

Reply via email to