Hi Robert,
Sorry for the mass email. I have debugged the program and I am sure
ON_DEMAND is set to OSG_RUN_FRAME_SCHEME, but I can't see any different. The
cpu usage is still used 25% on idle.
Regards,
Clement
________________________________________
From: [email protected]
[[email protected]] On Behalf Of Robert Osfield
[[email protected]]
Sent: Tuesday, 28 February 2012 12:41 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] How to detect rotating image
Hi Clement,
If you want to find out what is going on use a debugger. A modicum of
self reliance is key element of being a successful programmer. You
can't expect others to keep hand walking your through every little
feature one by one.
Robert.
On 27 February 2012 13:11, <[email protected]> wrote:
> 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: [email protected]
> [[email protected]] On Behalf Of Robert Osfield
> [[email protected]]
> 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, <[email protected]> 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
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org