Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added command line argument for examples to pick version of Ogre #277

Merged
merged 1 commit into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/actor_animation/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,17 @@ int main(int _argc, char** _argv)

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string engine("ogre");
std::string ogreEngineName("ogre");
if (_argc > 1)
{
engine = _argv[1];
ogreEngineName = _argv[1];
}

common::Console::SetVerbosity(4);
std::vector<std::string> engineNames;
std::vector<CameraPtr> cameras;

engineNames.push_back(engine);
engineNames.push_back(ogreEngineName);

std::vector<VisualPtr> visuals;
ic::SkeletonPtr skel = nullptr;
Expand Down
10 changes: 9 additions & 1 deletion examples/camera_tracking/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,20 @@ int main(int _argc, char** _argv)
{
glutInit(&_argc, _argv);

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string ogreEngineName("ogre");
if (_argc > 1)
{
ogreEngineName = _argv[1];
}

common::Console::SetVerbosity(4);
std::vector<std::string> engineNames;
std::vector<CameraPtr> cameras;
std::vector<NodePtr> nodes;

engineNames.push_back("ogre");
engineNames.push_back(ogreEngineName);
engineNames.push_back("optix");

for (auto engineName : engineNames)
Expand Down
6 changes: 3 additions & 3 deletions examples/custom_scene_viewer/ManualSceneDemo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ int main(int _argc, char** _argv)

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string ogreEngine("ogre");
std::string ogreEngineName("ogre");
if (_argc > 1)
{
ogreEngine = _argv[1];
ogreEngineName = _argv[1];
}

common::Console::SetVerbosity(4);
Expand All @@ -208,7 +208,7 @@ int main(int _argc, char** _argv)
sceneDemo->AddScene(SceneBuilderPtr(new ShadowSceneBuilder(4)));
sceneDemo->AddScene(SceneBuilderPtr(new ShadowSceneBuilder(5)));
//! [add scenes]
sceneDemo->AddCamera(ogreEngine);
sceneDemo->AddCamera(ogreEngineName);
sceneDemo->AddCamera("optix");
sceneDemo->Run();
return 0;
Expand Down
6 changes: 3 additions & 3 deletions examples/gazebo_scene_viewer/GazeboDemo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ int main(int _argc, char** _argv)

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string ogreEngine("ogre");
std::string ogreEngineName("ogre");
if (_argc > 1)
{
ogreEngine = _argv[1];
ogreEngineName = _argv[1];
}

Connect();
std::vector<CameraPtr> cameras;
std::vector<std::string> engineNames;

engineNames.push_back(ogreEngine);
engineNames.push_back(ogreEngineName);
engineNames.push_back("optix");

for (auto engineName : engineNames)
Expand Down
6 changes: 3 additions & 3 deletions examples/gazebo_scene_viewer/GazeboWorldDemo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ int main(int _argc, char** _argv)

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string ogreEngine("ogre");
std::string ogreEngineName("ogre");
if (_argc > 1)
{
ogreEngine = _argv[1];
ogreEngineName = _argv[1];
}

Connect();
std::vector<CameraPtr> cameras;
std::vector<std::string> engineNames;

engineNames.push_back(ogreEngine);
engineNames.push_back(ogreEngineName);
engineNames.push_back("optix");

for (auto engineName : engineNames)
Expand Down
6 changes: 3 additions & 3 deletions examples/lidar_visual/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -264,10 +264,10 @@ int main(int _argc, char** _argv)

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string engine("ogre");
std::string ogreEngineName("ogre");
if (_argc > 1)
{
engine = _argv[1];
ogreEngineName = _argv[1];
}

common::Console::SetVerbosity(4);
Expand All @@ -276,7 +276,7 @@ int main(int _argc, char** _argv)
std::vector<LidarVisualPtr> nodes;
std::vector<GpuRaysPtr> sensors;

engineNames.push_back(engine);
engineNames.push_back(ogreEngineName);

for (auto engineName : engineNames)
{
Expand Down
10 changes: 9 additions & 1 deletion examples/mesh_viewer/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,19 @@ int main(int _argc, char** _argv)
{
glutInit(&_argc, _argv);

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string ogreEngineName("ogre");
if (_argc > 1)
{
ogreEngineName = _argv[1];
}

common::Console::SetVerbosity(4);
std::vector<std::string> engineNames;
std::vector<CameraPtr> cameras;

engineNames.push_back("ogre");
engineNames.push_back(ogreEngineName);
engineNames.push_back("optix");

for (auto engineName : engineNames)
Expand Down
10 changes: 9 additions & 1 deletion examples/mouse_picking/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,19 @@ int main(int _argc, char** _argv)
{
glutInit(&_argc, _argv);

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string ogreEngineName("ogre");
if (_argc > 1)
{
ogreEngineName = _argv[1];
}

common::Console::SetVerbosity(4);
std::vector<std::string> engineNames;
std::vector<CameraPtr> cameras;

engineNames.push_back("ogre");
engineNames.push_back(ogreEngineName);
engineNames.push_back("optix");

for (auto engineName : engineNames)
Expand Down
10 changes: 9 additions & 1 deletion examples/particles_demo/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,19 @@ int main(int _argc, char** _argv)
{
glutInit(&_argc, _argv);

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string ogreEngineName("ogre");
if (_argc > 1)
{
ogreEngineName = _argv[1];
}

common::Console::SetVerbosity(4);
std::vector<std::string> engineNames;
std::vector<CameraPtr> cameras;

engineNames.push_back("ogre2");
engineNames.push_back(ogreEngineName);

for (auto engineName : engineNames)
{
Expand Down
10 changes: 9 additions & 1 deletion examples/render_pass/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,19 @@ int main(int _argc, char** _argv)
{
glutInit(&_argc, _argv);

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string ogreEngineName("ogre");
if (_argc > 1)
{
ogreEngineName = _argv[1];
}

common::Console::SetVerbosity(4);
std::vector<std::string> engineNames;
std::vector<CameraPtr> cameras;

engineNames.push_back("ogre");
engineNames.push_back(ogreEngineName);
engineNames.push_back("optix");
for (auto engineName : engineNames)
{
Expand Down
6 changes: 3 additions & 3 deletions examples/simple_demo/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,17 @@ int main(int _argc, char** _argv)

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string engine("ogre");
std::string ogreEngineName("ogre");
if (_argc > 1)
{
engine = _argv[1];
ogreEngineName = _argv[1];
}

common::Console::SetVerbosity(4);
std::vector<std::string> engineNames;
std::vector<CameraPtr> cameras;

engineNames.push_back(engine);
engineNames.push_back(ogreEngineName);
engineNames.push_back("optix");

for (auto engineName : engineNames)
Expand Down
10 changes: 9 additions & 1 deletion examples/thermal_camera/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,19 @@ int main(int _argc, char** _argv)
{
glutInit(&_argc, _argv);

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string ogreEngineName("ogre");
if (_argc > 1)
{
ogreEngineName = _argv[1];
}

common::Console::SetVerbosity(4);
std::vector<std::string> engineNames;
std::vector<CameraPtr> cameras;

engineNames.push_back("ogre2");
engineNames.push_back(ogreEngineName);

for (auto engineName : engineNames)
{
Expand Down
10 changes: 9 additions & 1 deletion examples/transform_control/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,19 @@ int main(int _argc, char** _argv)
{
glutInit(&_argc, _argv);

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string ogreEngineName("ogre");
if (_argc > 1)
{
ogreEngineName = _argv[1];
}

common::Console::SetVerbosity(4);
std::vector<std::string> engineNames;
std::vector<CameraPtr> cameras;

engineNames.push_back("ogre");
engineNames.push_back(ogreEngineName);
engineNames.push_back("optix");

for (auto engineName : engineNames)
Expand Down
10 changes: 9 additions & 1 deletion examples/view_control/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,19 @@ int main(int _argc, char** _argv)
{
glutInit(&_argc, _argv);

// Expose engine name to command line because we can't instantiate both
// ogre and ogre2 at the same time
std::string ogreEngineName("ogre");
if (_argc > 1)
{
ogreEngineName = _argv[1];
}

common::Console::SetVerbosity(4);
std::vector<std::string> engineNames;
std::vector<CameraPtr> cameras;

engineNames.push_back("ogre");
engineNames.push_back(ogreEngineName);
engineNames.push_back("optix");
for (auto engineName : engineNames)
{
Expand Down