Hi Leven,
The OSG's use of environmental variables is purely an optional way of
setting default values that various classes wish to expose to outside
control. The ApplicationUsage::instance() is just a class used the
collect the details on the env variables that the OSG can use, is just
a fulfills a documentation role, it's not active at all in terms of
checking env vars - this instead is the role of the individual
classes.
The easiest way to use the list of supported env vars is to do:
osgviewer --help-env
Which lists the env vars supported. On the command line you can use this like:
export OSG_STEREO=ON
osgviewer cow.osg
Use set instead of export under Windows.
Robert.
On Dec 14, 2007 9:33 AM, leven <[EMAIL PROTECTED]> wrote:
> Hi all:
>
> I have been using OSG for couples of days. But recently, I am confused by
> the management of Environment Variables.
> Here, I found this class seemed very useful:
> class OSG_EXPORT ApplicationUsage : public osg::Referenced
> Well, it seemed arranging all the variables clearly. But I also found the
> following using way here and there:
>
> getenv("OSG_COMPUTE_NEAR_FAR_MODE"))
> getenv( "OSG_LIBRARY_PATH")
> getenv( "OSG_LD_LIBRARY_PATH")
> ....
>
> All these variables are not exist in my System Environment Variable. So I
> suppose it should be the following one:
> osg::ApplicationUsage::instance()->getEnvironmentalVariables[ByName](
> const std::string str )
>
> But this function getEnvironmentalVariables[ByName] is not exist. So I
> wonder why.
>
> Maybe ApplicationUsage is being in the process of dealing? Anyone can help
> me? Thanks very much.
>
> Yours sincerely,
> Leven
>
> [EMAIL PROTECTED]
> 07-12-24
>
>
> ________________________________
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
> now.
> _______________________________________________
> 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