[Fluxus] fbo pixels commits
Dave Griffiths
dave at pawfal.org
Thu Jan 29 03:52:56 PST 2009
On Thu, 2009-01-29 at 12:31 +0100, gabor papp wrote:
> for a couple of reasons i changed the primitive level binding to state
> level binding, so now the fbo is bound when entering a state, and
> unbound when leaving it, istead of changing fbo's when the primitive
> is rendered.
I think that sounds like the right thing to do - I'm happy if you are :)
> there was a need for clearing the fbo manually. i don't know how you
> like this, but i changed pixels-clear, so it clears the pdata when the
> primitive is grabbed, but clears the fbo when it is bound.
Sounds fine, I think.
> now i'm going to try to sort out the camera issues. any suggestion how
> i should address this?
This is tricky isn't it... I haven't looked too closely at the new code,
but are you intending to kick off a new render for each pixel primitive?
You should be able to sequence things so the pixel primitives all get
rendered first, followed by the main scene - or are you doing this
already?
In which case I would say that each pixel primitive should have it's own
camera - which will have to be owned by the renderer, the multicamera
code is already there, so you would create a camera for each pixel
primitive and do something like:
(current-camera (pixels-camera p))
(set-camera-transform foo) ; change
(viewport 0 0.5 0 0.5) ; stuff
(ortho) ; in this camera
(current-camera 0) ; set back to the main one
I intended to write a (with-camera) macro to make this a little cleaner
and more fluxus like... Also the internals of the renderer's camera list
and ownership will need looking at - so cameras get removed when pixel
prims get destroyed. I can help with some of this if you'd like.
cheers,
dave
More information about the Fluxus
mailing list