Hi Patrick,

Thanks for restating things.  I'll have to just point you back at the
code though, it might be a bug in RenderStage.cpp, but there has been
changes to the CVS version of RenderStage.cpp w.r.t RTT so please try
this out.  Also step through the code yourselves, you are actually
better placed to fix any problems as I don't have an code in front of
me that reproduces the problem.

Robert.

On 8/8/06, Patrick Roye <[EMAIL PROTECTED]> wrote:
Robert Osfield <[EMAIL PROTECTED]> writes:

>
> On 8/7/06, Daniel Larimer <[EMAIL PROTECTED]> wrote:
> >         Well, I believe what I want to do is the equivalent of culling the
> > camera node on
> > every frame that I don't have an update to the texture.  I can do
> > this the "hard way" by
> > placing a switch above the camera node, but was hoping for something
> > similar to a
> > dirty bit or enable/disable bit.
>
> You could implement things in a variaty of ways, from implment a
> custom callback to switch the node on of off, through to even hiding
> the use of the camera completely, such as what osgSim::OverlayNode
> does.
>
> >         I am doing all of my operations directly on the "frame buffer
> > object" aka texture.
> >
> >         If I switch to FRAME_BUFFER mode then I need to render the current
> > texture contents
> > before rendering my updates.
>
> You've lost me.
>
> Robert.
>

Hello all,

I am working with Dan on this problem and I wanted to try and clarify what we're
doing. Currently, we have a CameraNode that is rendering to an FBO and is
attached to a TextureRectangle. The CameraNode contains a Geode which contains a
Drawable. In the Drawable's drawImplementation(osg::State&) function, we draw
widgets to the FBO using pure openGL calls.

The first time a widget is rendered to the FBO, it renders its full size to the
FBO which will update the entire texture (the widget is the same size as the
TextureRectangle). From that point on, however, only partial updates of the
widget are drawn, and if no update is necessary, then the widget is not redrawn
at all and the current data in the FBO/TextureRectangle should be retained.

Switching only the render target implementation, we get the following behavior:
FRAME_BUFFER_OBJECT - works correctly
PIXEL_BUFFER - segmentation fault
FRAME_BUFFER - widget drawn once, but then goes black

We want to use FRAME_BUFFER as a fallback to FRAME_BUFFER_OBJECT, but when we
make the switch, the data in the framebuffer/TextureRectangle is not retained
from frame to frame. Instead, the widget is drawn correctly only on the first
frame or when there is an update, but otherwise, the texture is black.

Thank you for your help
--Patrick Roye

_______________________________________________
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/

Reply via email to