Hi Alexej,

On 14 May 2012 15:33, Alexej Fink <dk...@gmx.net> wrote:
> the reason for changing the FBO attachment is generating dynamic ground tiles 
> on the fly in a separate ground-scene-graph. Each ground-tile is a separate, 
> location bound texture (with allocated image). If the tile location gets 
> dirty I want to re-render the ground tile (the related texture).
>
> The camera setting remains the same all the time, only the position changes. 
> So I want to skip the creation/deletion of the depth buffer (or other meta 
> stuff) for each ground-tile rendering frame. I just want to change the 
> render-target. Any ideas, how to do it in an efficient way?

You don't need to change the render-target to re-render a tile.  I
can't work out exactly what you mean in your scheme but it sounds a
bit odd.

While I do understand what you are specifically doing or how/why you
are trying to achieve it as general notes I would say:

You can have many RTT osg::Camera in the scene and these scene graph
objects themselves are pretty small compared the texture/buffer data
assigned to them, also it's possible to share subgraphs under Cameras
so the scene graph specific costs are likely to be very small, so no
need to go to lengths to try and avoid creating them.

If you have a dynamic system of terrain tiles that get expired/created
as you move around your world then I would suggest retaining the RTT
osg::Camera and all it's attachements when tiles are expired and leave
them on a reuse list.  You can detach the subgraph below them and
reuse the Camera when creating new tiles, just attaching your new
subgraph. This scheme would avoid create/destroying any RTT related GL
objects or nodes.

Whether this appropriate to you, or whether any the general approach
of using RTT or your terrain is something I can't say.

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

Reply via email to