Hi Tugkan,

The osgdistortion example works a bit like what you are describing,
could you try this to see what performance it's getting.

As for general notes about threading, if you are working on the same
graphics context as you are then all the draw dispatch and the draw
GPU can only be done by a single graphics thread so there is little
opportunity to make it more parallel without using another graphics
card/graphics context and interleaving of frames.

As for why the second camera is very expensive on draw dispatch, this
suggest to me that it's blocking either due to the OpenGL fifo being
full or that it contains a GL read back operation of some kind.

Robert.

On Wed, Jan 13, 2010 at 11:34 AM, Tugkan Calapoglu <tug...@vires.com> wrote:
> Hi All,
>
> I am using a slave view for rendering the scene to a texture. Initially
>  I tried with a camera node, however, this did not work well due to a
> problem in LiSPSM shadows and I was suggested to use RTT slave views.
>
> My setup is as follows: There is a single main view and I attach a slave
> view to it. This slave view is attached with addSlave( slave , false );
>  so that it does *not* automatically use the master scene.
>
> I attach a texture to the slave view and make my scene child of this
> view. I attach a screen aligned quad to the main view. This quad
> visualizes the RTT texture from the slave view.
>
> Now I have a threading problem which can be seen on the snapshot I
> attached. There are two issues:
> 1- The main view (cam1) has a very large draw time even though it only
> renders the screen aligned quad. I double checked to see whether it also
> renders the actual scene but this is not the case.
>
> 2- Slave view does not run cull and draw in parallel. Cull and draw do
> run in parallel if they are not rendered with the slave view. Moreover,
> if I change the render order of the slave camera from PRE_RENDER to
> POST_RENDER it is ok.
>
> I could simply use POST_RENDER but I am afraid it introduces an extra
> one frame latency. If I render the screen aligned quad first and the
> scene later than what I see on the quad is the texture from previous
> frame (right?).
>
> Any ideas?
>
> cheers,
> tugkan
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to