Removed the usage of setenv to avoid portability issues.
This commit is contained in:
parent
2ef59b73e9
commit
c1e047d549
@ -25,19 +25,8 @@
|
|||||||
|
|
||||||
#include "OrientationConverter.h"
|
#include "OrientationConverter.h"
|
||||||
|
|
||||||
#if (_MSC_VER >= 1400) // Visual Studio 2005
|
|
||||||
#include <sstream>
|
|
||||||
int setenv(const char *name, const char *value, int /*rewrite*/)
|
|
||||||
{
|
|
||||||
std::stringstream sstr;
|
|
||||||
sstr<<name<<'='<<value;
|
|
||||||
return _putenv(sstr.str().c_str());
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef std::vector<std::string> FileNameList;
|
typedef std::vector<std::string> FileNameList;
|
||||||
|
|
||||||
|
|
||||||
class GraphicsContext {
|
class GraphicsContext {
|
||||||
public:
|
public:
|
||||||
GraphicsContext()
|
GraphicsContext()
|
||||||
@ -452,21 +441,12 @@ int main( int argc, char **argv )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (arguments.argc()<=1)
|
if (arguments.argc()<=1)
|
||||||
{
|
{
|
||||||
arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
|
arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string options;
|
|
||||||
while(arguments.read("--optimizer",options))
|
|
||||||
{
|
|
||||||
setenv("OSG_OPTIMIZER",options.c_str(),1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FileNameList fileNames;
|
FileNameList fileNames;
|
||||||
OrientationConverter oc;
|
OrientationConverter oc;
|
||||||
bool do_convert = false;
|
bool do_convert = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user