Hi John,

My guess is that the type of viewer will be irrelevant, i.e. the
problem will still occur on osgViewer::Viewer, or even a SceneView
based viewer, my guess is that there is an issue with management of
osg::State when moving between the cameras.  I don't know of any
existing problem in this area, but users pushing the OSG in new and
different ways so there may well be problems lurking unnoticed.

Debugging this 3rd hand will be practically impossible, so I'd either
have to let you get on with finding it yourself, or for their to be a
simple example code that can be shared and tested against, ideally via
modification of an existing OSG example, or if needs be an new example
set up to test this particular combination of viewer/RTT camera setup
and state.

Robert.

On Thu, Jun 19, 2008 at 4:53 PM, Argentieri, John-P63223
<[EMAIL PROTECTED]> wrote:
> All,
>
> We are using osgViewer::CompositeViewer.
>
> We have cases in which we switch certain things to become transparent during
> runtime, depending on user input and the view being drawn.
>
> In order for those things to contain other transparent elements (particles)
> we must disable writing to the depth buffer for those elements. And, we set
> the rendering hint on those element statesets to TRANSPARENT_BIN.
>
> In a typical setup this works great.
>
> When RTT is enabled, the camera that renders the texture ( a PRE_RENDER
> camera ) sees that osg::Depth and does apply() on it somewhere. The OpenGL
> state applied by this does not get re-set before the main camera draws the
> textured quad over the view.
>
> The way that I fix this issue is:
> Create a Camera::DrawCallback that does glDepthMask(GL_TRUE) and assign it
> to the main camera's predraw callback if RTT is used.
>
> John
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to