29 #include "localInitData.h"
30 #include "frameData.h"
32 #pragma warning( disable: 4275 )
33 #include <boost/program_options.hpp>
34 #pragma warning( default: 4275 )
40 namespace po = boost::program_options;
44 LocalInitData::LocalInitData()
45 : _maxFrames( 0xffffffffu )
46 , _isResident( false )
50 const LocalInitData& LocalInitData::operator = (
const LocalInitData& from )
52 _maxFrames = from._maxFrames;
53 _isResident = from._isResident;
56 setFilename( from.getFilename( ));
57 setWindowSystem( from.getWindowSystem( ));
58 setPrecision( from.getPrecision( ));
59 setBrightness( from.getBrightness( ));
60 setAlpha( from.getAlpha( ));
64 void LocalInitData::parseArguments(
const int argc,
char** argv )
66 std::string wsHelp =
"Window System API ( one of: ";
76 #ifdef EQUALIZER_USE_QT4
82 uint32_t userDefinedPrecision(2);
83 float userDefinedBrightness(1.0f);
84 float userDefinedAlpha(1.0f);
85 std::string userDefinedModelPath(
"");
86 std::string userDefinedWindowSystem(
"");
88 const std::string& desc = EVolve::getHelp();
89 po::options_description options( desc +
" Version " +
92 (
"help,h", po::bool_switch(&showHelp)->default_value(
false),
93 "produce help message" )
94 (
"model,m", po::value<std::string>(&userDefinedModelPath),
95 "raw model file name, e.g. Bucky32x32x32.raw" )
96 (
"resident,r", po::bool_switch(&_isResident)->default_value(
false),
97 "Keep client resident (see resident mode documentation on website)" )
99 po::value<uint32_t>(&_maxFrames)->default_value(0xffffffffu),
100 "Maximum number of rendered frames")
102 po::value<uint32_t>(&userDefinedPrecision)->default_value(2),
103 "Rendering precision (default 2, bigger is better and slower)")
105 po::value<float>(&userDefinedBrightness)->default_value(1.0f),
106 "brightness factor" )
108 po::value<float>(&userDefinedAlpha)->default_value(1.0f),
109 "alpha attenuation" )
110 (
"ortho,o", po::bool_switch(&_ortho)->default_value(
false),
111 "use orthographic projection" )
113 po::value<std::string>(&userDefinedWindowSystem),
116 po::variables_map variableMap;
120 po::store( po::command_line_parser( argc, argv ).options(
121 options ).allow_unregistered().run(),
123 po::notify(variableMap);
125 catch( std::exception& exception )
127 LBERROR <<
"Error parsing command line: " << exception.what()
136 std::cout << options << std::endl;
141 if ( variableMap.count(
"model" ) > 0 )
142 setFilename( userDefinedModelPath );
144 if( variableMap.count(
"windowSystem" ) > 0 )
145 setWindowSystem( userDefinedWindowSystem );
148 if( variableMap.count(
"precision") > 0 )
149 setPrecision( userDefinedPrecision );
150 if( variableMap.count(
"brightness") > 0 )
151 setBrightness( userDefinedBrightness );
152 if( variableMap.count(
"alpha") > 0 )
153 setAlpha( userDefinedAlpha );
static std::string getString()
EQFABRIC_API bool exit()
De-initialize the Equalizer fabric namespace.
EQ_API bool exit()
De-initialize the Equalizer client library.