When I change to SingleThreaded, I do not see the problem. The standard OSG 
examples work fine. Other cases of my problem also work fine. 

Clearly, it's something in this app that is causing problems.  In the problem 
case, I'm rendering to two different image buffers and then reading the images 
out on the CPU. My scene is a "normal" scene except I have two cameras with 
each rendering to these different textures (i.e. a top and bottom view of the 
scene). I also have another camera rendering an orthogonal projection on top of 
the scene.

Paul P.

 
----- Original Message ----
From: Robert Osfield <[EMAIL PROTECTED]>
To: OpenSceneGraph Users <osg-users@lists.openscenegraph.org>
Sent: Wednesday, September 17, 2008 11:03:33 AM
Subject: Re: [osg-users] DataVariance

Hi Paul,

I can't say why your app might be hanging.  Do the standard OSG
example hang on your machine?

Try running the view single threaded as something that might at least
flesh out whether threading is an issue at all.

Robert.

On Wed, Sep 17, 2008 at 3:52 PM,  <[EMAIL PROTECTED]> wrote:
> Thanks for the quick response...
>
> Then, any idea why my application is hanging when I attempt to render my 
> first frame?? Below is the call stack of the two OSG threads.
>
> The problem seems to exist when I include two different parts of my scene 
> graph.  My scene graph consists of two Camera's at the root. Each renders to 
> a different image array (using camera->attach(..., image);).
>
> Each camera then has shared subgraphs attached which also contain a Camera 
> node (for Ortho view for part of the scene) but with no attachments.
>
> The osgViewer's camera is unchanged (and I really don't need to "render" 
> anything).
>
> Am I doing something wrong with these camera's?
>
> While I'm at it, one more questions:
> Is there  a way to turn on the OSG statistics overlay without using the 
> keyboard. I've added the StatsHandler event handler. With osgProducer, I used 
> to be able to do viewerEventHandler->setFrameStatsMode(mode).
>
> Paul P.
>
> THREAD #1
> #0  0x4146627d in pthread_cond_wait@@GLIBC_2.3.2 ()
>    from /lib/tls/libpthread.so.0
> #1  0x41235a66 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libc.so.6
> #2  0x40b1e364 in OpenThreads::Condition::wait (this=0x8281f88,
>    mutex=0x8281f80)
>    at 
>/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/OpenThreads/pthreads/PThreadCondition.c++:137
> #3  0x40ad9241 in OpenThreads::BlockCount::block (this=0x8281f80) at Block:133
> #4  0x40ad7506 in osgViewer::ViewerBase::renderingTraversals (this=0x827ab58)
>    at 
>/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/ViewerBase.cpp:733
> #5  0x40ad6a88 in osgViewer::ViewerBase::frame (this=0x827ab58,
>    simulationTime=0)
>    at 
>/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/ViewerBase.cpp:592
> #6  0x080858a7 in MyViewer::frame (this=0x827aad8, simTime=0)
>    at MyViewer.hpp:131
>
> THREAD #2
> #0  0x4146627d in pthread_cond_wait@@GLIBC_2.3.2 ()
>    from /lib/tls/libpthread.so.0
> #1  0x41235a66 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/tls/libc.so.6
> #2  0x40b1e364 in OpenThreads::Condition::wait (this=0x82786dc,
>    mutex=0x82786d4)
>    at 
>/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/OpenThreads/pthreads/PThreadCondition.c++:137
> #3  0x400aedf5 in OpenThreads::Block::block (this=0x82786d4) at Block:42
> #4  0x40a8cdc7 in osgViewer::Renderer::TheadSafeQueue::takeFront (
>    this=0x82786cc)
>    at 
>/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/Renderer.cpp:136
> #5  0x40a8ee38 in osgViewer::Renderer::draw (this=0x8278640)
>    at 
>/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/Renderer.cpp:340
> #6  0x40a9085e in osgViewer::Renderer::operator() (this=0x8278640,
>    context=0x8272258)
>    at 
>/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osgViewer/Renderer.cpp:640
> #7  0x4086352d in osg::GraphicsContext::runOperations (this=0x8272258)
>    at 
>/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsContext.cpp:688
> #8  0x4086c3ee in osg::RunOperations::operator() (this=0x829ea70,
> -    context=0x8272258)
>    at 
>/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsThread.cpp:134
> #9  0x4086bc7d in osg::GraphicsOperation::operator() (this=0x829ea70, 
> object=Internal: global symbol `Object' found in RissAnimationPath.cpp 
> psymtab but not in symtab.
> Object may be an inlined function, or may be a template function
> (if a template, try specifying an instantiation: Object<type>).
> )
>    at 
>/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsThread.cpp:50
> #10 0x408af928 in osg::OperationThread::run (this=0x829e810)
>    at 
>/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/OperationThread.cpp:413
> #11 0x4086bbf9 in osg::GraphicsThread::run (this=0x829e810)
>    at 
>/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/osg/GraphicsThread.cpp:38
> #12 0x40b1d672 in OpenThreads::ThreadPrivateActions::StartThread (
>    data=0x829e820)
>    at 
>/src/OpenSceneGraph_2.6/OpenSceneGraph-2.6.0/src/OpenThreads/pthreads/PThread.c++:170
> #13 0x41463dec in start_thread () from /lib/tls/libpthread.so.0
> #14 0x41228a2a in clone () from /lib/tls/libc.so.6
>
>
>
>
> ----- Original Message ----
> From: Robert Osfield <[EMAIL PROTECTED]>
> To: OpenSceneGraph Users <osg-users@lists.openscenegraph.org>
> Sent: Wednesday, September 17, 2008 8:06:47 AM
> Subject: Re: [osg-users] DataVariance
>
> Hi Paul,
>
> In all the OSG 2.x series the DataVariance is used during the draw
> traversal to monitor when all DYNAMIC StateSet and Drawables have been
> dispatched, as once they have been the next frame can be started in a
> parallel with the remaining STATIC objects are rendered (in
> DrawThreadPerContex, CullThreadPerCameraDrawThreadPerContext threading
> models.)
>
> Robert.
>
> On Wed, Sep 17, 2008 at 12:54 PM,  <[EMAIL PROTECTED]> wrote:
>> In OSG 2.6, is the DataVariance value only used by the Optimizer or is it 
>> also used during the frame processing?
>>
>> I've had some problems in the past with the StaticObjectDetectionVisitor and 
>> the Optimizer (assume "sharing" part of the Optimizer) doing some things to 
>> my scene graph which cause it to render incorrectly when I don't specify my 
>> DataVariance as being DYNAMIC.
>>
>> Is there a reason why there is a StaticObjectDetectionVisitor being done 
>> when setSceneData() is performed independent of the Optimizer settings? Is 
>> the DataVariance value used by something other than the Optimizer?
>>
>> Paul P.
>>
>>
>>
>>
>> _______________________________________________
>> 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
>
>
>
> _______________________________________________
> 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



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

Reply via email to