FYI, never figured this one out, but I did find a workaround:

hud_cam->setRenderOrder( osg::CameraNode::NESTED_RENDER );
hud_cam->getOrCreateStateSet()->setRenderBinDetails( 9999, "RenderBin" );
hud_cam->getOrCreateStateSet()->setAttribute( new osg::Depth(
osg::Depth::ALWAYS ) );

Kind of a poor man's POST_RENDER :) -gw

On 7/17/07, Robert Osfield <[EMAIL PROTECTED]> wrote:
>
> HI Glenn,
>
> As an experiment it might be just worth trying 2.0 as a lot of
> improvements have been made in the way that Camera's are managed w.r.t
> the front end and the back-end like RenderStage.
>
> Robert.
>
> On 7/17/07, Glenn Waldron <[EMAIL PROTECTED]> wrote:
> > Robert,
> > I neglected to mention that I am using osg::CameraNode under 1.2 at the
> > moment, if that makes a difference.
> >
> >
> > > FYI, each of these Camera will have its own RenderStage, the RTT one
> > > will have is RenderStage as a pre draw of the main RenderStage, and
> > > the HUD will have its own RenderStage, which is drawn at the end of
> > > the RTT RenderStage.  The exception is when you do NESTED_RENDER on
> > > the HUD Camera, this will use the RTT RenderStage instread of its own.
> >
> > So to make sure I understand NESTED_RENDER -- after I quick peek at
> > CullVisitor.cpp it looks like NESTED_RENDER will apply a new projection
> > matrix and reference frame, but will ignore things like viewport, render
> > order, target impl, etc. Is that correct?
> >
> > > Now... the question is why isn't this working... in what way are you
> > > using the result form the RTT Camera?  Are you rendering to an Image?
> > > To a Texture that is used in the main frame?
> >
> > I am rendering to an Image using an FBO (as in osgprerender) in order to
> > send video frames down a DirectShow pipeline. (I was also rendering the
> > resulting texture to a single quad in the main scene with an ortho
> camera,
> > but if I remove this subgraph the issue remains.)
> >
> > > My guess is that there is some bug in RenderStage w.r.t handling of
> > > post draw RenderStage.  But then it could be something else, there is
> > > a complex type of set up, without putting in debugging code and
> > > stepping through it its hard to guess what is going on.
> > >
> > > Robert.
> >
> > Thanks, I will continue to poke at it and see if I can spot anything.
> -gw
> >
> > > On 7/16/07, Glenn Waldron <[EMAIL PROTECTED] > wrote:
> > > > Hi all,
> > > > My brain's not working today so maybe you can help with this one.
> > > >
> > > > I have a scene with a HUD:
> > > >
> > > >     scene -> HUD camera -> HUD geom
> > > >
> > > > The HUD camera is POST_RENDER, ABSOLUTE_RF, and works great. Now I
> want
> > to
> > > > render this graph to a texture. So I have:
> > > >
> > > >     RTT camera -> scene -> HUD camera -> HUD geom
> > > >
> > > > The RTT camera is PRE_RENDER.
> > > >
> > > > The scene renders to texture, but the HUD does not appear. Well of
> > course
> > > > not; it is POST_RENDER. So I tried PRE_RENDER with an adjusted
> render
> > > > number, but no luck. With NESTED_RENDER I do see the HUD, but alpha
> > blending
> > > > is wrong and it appears that the ortho projection matrix gets
> mangled.
> > > >
> > > > What is the proper way to combine a HUD with RTT? Thanks much. -gw
> > > >
> > > > --
> > > > Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
> > 703-652-4791
> > > > _______________________________________________
> > > > osg-users mailing list
> > > > [EMAIL PROTECTED]
> > > > http://openscenegraph.net/mailman/listinfo/osg-users
> > > > http://www.openscenegraph.org/
> > > >
> > > _______________________________________________
> > > osg-users mailing list
> > > [EMAIL PROTECTED]
> > > http://openscenegraph.net/mailman/listinfo/osg-users
> > > http://www.openscenegraph.org/
> > >
> >
> >
> >
> > --
> >
> > Glenn Waldron : Pelican Mapping : http://pelicanmapping.com :
> 703-652-4791
> > _______________________________________________
> > osg-users mailing list
> > [EMAIL PROTECTED]
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> >
> _______________________________________________
> osg-users mailing list
> [EMAIL PROTECTED]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>



-- 
Glenn Waldron : Pelican Mapping : http://pelicanmapping.com : 703-652-4791
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to