From e0e98d3426727a8e9f155b79f77fbba6a640246f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 28 Jan 2008 20:52:31 +0000 Subject: [PATCH] From Mike Weiblen, "an aesthetic enhancement for displaying important version information." --- examples/osglogo/osglogo.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/osglogo/osglogo.cpp b/examples/osglogo/osglogo.cpp index 5d80c7963..0d36ae282 100644 --- a/examples/osglogo/osglogo.cpp +++ b/examples/osglogo/osglogo.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -478,6 +479,14 @@ int main( int argc, char **argv ) std::string label = "OpenSceneGraph"; std::string subscript = ""; + bool showVersion = false; + while (arguments.read("--version")) { showVersion = true; } + if( showVersion ) + { + label += " "; + label += osgGetVersion(); + } + while (arguments.read("--label", label)) {} while (arguments.read("--subscript", subscript)) {}