Hi J.P, Guy and Art et. al,

On Wed, Apr 2, 2008 at 3:53 PM, J.P. Delport <[EMAIL PROTECTED]> wrote:

> >  When the visitor is implemented, if a node is using MRT it's probably
> > because the user attached a shader that uses gl_Data[], and then it will
> > set on the flag whether it has one or many COLOR BUFFER attachments, or
> > maybe the attribute will be something like (MRT, State::ON) and this
> > will turn on the flags. For the cameras, if there are more than one
> > COLORBUFFER attachments, it should turn the flag on whether the
> > StateAttribute is ON or OFF, but if there is only one attachment (or
> > less), and the user didn't set the StateAttribute to ON, the drawBuffers
> > extension shouldn't be applied.
> Attaching COLOR_BUFFER0 or greater now enables MRT, so no other setting
> that can get out of sync is needed anymore. If user does not want MRT,
> attach COLOR_BUFFER only.
>
> Matching shaders to attachments is still the user's responsibility.
>

I agree totally with J.P.. matching shaders to attachments is really the
users responsibility for constructing the scene graph in the appropriate
way.  Trying to come up with clever visitors to try and guess at what is
meant and required is not something that is practical in a general purpose
way, and for the most users there is no need as they'll no whether they
intend to use MRT or not based on their shaders and Camera setup.

W.r.t the MRT support decoupled from osg::Camera I'd suggest this is
something we'll need to address separately, before you start trying to come
up with a solution we'd need to tie down some particular usages models that
require it and aren't served by the standard osg::Camera RTT support.
Writing an OSG example of this would a good first step for providing a
concrete usage example that even if it doesn't compile or work, would still
give us something to work on.

I'm about to review J.P's final changes so hopefully we'll have one piece of
the jigsaw in place very soon.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to