Hi Robert,

  Do you know how to test the osgViewer is using ON_DEMAND flag?  Here is my 
code:

void cOSG::Render(void* ptr)
{
    cOSG* osg = (cOSG*)ptr;
    osgViewer::Viewer* viewer = osg->getViewer();
    viewer->run();
}

void cOSG::initOSGViewer()
{
        putenv("OSG_RUN_FRAME_SCHEME=ON_DEMAND");
        osgViewer::Viewer* osgViewer = new osgViewer::Viewer();
        ...
        ...
}


   Before I create osgViewer, I added environment variable.  But I can't see 
any different compare without environment variable setting.  I am not sure 
whether osg viewer is using ON_DEMAND.


Regards,
Clement


________________________________________
From: osg-users-boun...@lists.openscenegraph.org 
[osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield 
[robert.osfi...@gmail.com]
Sent: Monday, 27 February 2012 10:35 PM
To: OpenSceneGraph Users
Subject: Re: [osg-users] How to detect rotating image

On 27 February 2012 11:26,  <clement....@csiro.au> wrote:
> Hi Robert,
>
>  Thanks for your suggestion.  I checked the source code viewerbase.cpp.  
> There is attribute called _runFrameScheme, but the value is assigned by 
> getenv("OSG_RUN_FRAME_SCHEME").  Except to set the environment variable, any 
> method I can assign the value to _runFrameScheme?  Thanks.

You have the source code, your hopefully are a programmer so should be
capable of looking at the API and reading what the methods are.
Please try it before asking lots of low level questions that could be
answered with a quick look with an editor.

Robert.
_______________________________________________
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