Ported all glut based demos across to using the new osg::ArgumentParser.
This commit is contained in:
@@ -42,11 +42,11 @@ class SG_EXPORT DisplaySettings : public osg::Referenced
|
||||
readEnvironmentalVariables();
|
||||
}
|
||||
|
||||
DisplaySettings(std::vector<std::string>& commandLine)
|
||||
DisplaySettings(ArgumentParser& arguments)
|
||||
{
|
||||
setDefaults();
|
||||
readEnvironmentalVariables();
|
||||
readCommandLine(commandLine);
|
||||
readCommandLine(arguments);
|
||||
}
|
||||
|
||||
DisplaySettings(const DisplaySettings& vs);
|
||||
@@ -61,12 +61,8 @@ class SG_EXPORT DisplaySettings : public osg::Referenced
|
||||
|
||||
void readEnvironmentalVariables();
|
||||
|
||||
/** read the command line string list, removing any matched control sequences.*/
|
||||
void readCommandLine(std::vector<std::string>& commandLine);
|
||||
|
||||
/** read the commandline arguments.*/
|
||||
void readCommandLine(ArgumentParser& parser);
|
||||
|
||||
void readCommandLine(ArgumentParser& arguments);
|
||||
|
||||
|
||||
void setStereo(bool on) { _stereo = on; }
|
||||
|
||||
@@ -51,9 +51,6 @@ class OSGDB_EXPORT Registry : public osg::Referenced
|
||||
|
||||
static Registry* instance();
|
||||
|
||||
/** read the command line string list, removing any matched control sequences.*/
|
||||
void readCommandLine(std::vector<std::string>& commandLine);
|
||||
|
||||
/** read the command line arguments.*/
|
||||
void readCommandLine(osg::ArgumentParser& commandLine);
|
||||
|
||||
@@ -201,12 +198,6 @@ class OSGDB_EXPORT Registry : public osg::Referenced
|
||||
|
||||
};
|
||||
|
||||
/** read the command line string list into the osgDB::Registry(), removing any matched control sequences.*/
|
||||
inline void readCommandLine(std::vector<std::string>& commandLine)
|
||||
{
|
||||
Registry::instance()->readCommandLine(commandLine);
|
||||
}
|
||||
|
||||
/** read the command line arguments.*/
|
||||
inline void readCommandLine(osg::ArgumentParser& parser)
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <osg/Geode>
|
||||
#include <osg/Timer>
|
||||
#include <osg/DisplaySettings>
|
||||
#include <osg/ArgumentParser>
|
||||
|
||||
#include <osgGA/GUIEventAdapter>
|
||||
#include <osgGA/CameraManipulator>
|
||||
@@ -46,8 +47,13 @@ class OSGGLUT_EXPORT Viewer : public Window, public osgGA::GUIActionAdapter
|
||||
public:
|
||||
|
||||
Viewer();
|
||||
Viewer(osg::ArgumentParser& arguments);
|
||||
|
||||
virtual ~Viewer();
|
||||
|
||||
/** read the command line string list, removing any matched control sequences.*/
|
||||
void readCommandLine(osg::ArgumentParser& arguments);
|
||||
|
||||
/** init is deprecated, you should use addViewport instead. init is
|
||||
* only available for backwards compatibility.*/
|
||||
virtual void init(osg::Node* rootnode);
|
||||
@@ -108,8 +114,6 @@ class OSGGLUT_EXPORT Viewer : public Window, public osgGA::GUIActionAdapter
|
||||
|
||||
/// Toggle fullscreen
|
||||
virtual void toggleFullScreen();
|
||||
/** read the command line string list, removing any matched control sequences.*/
|
||||
void readCommandLine(std::vector<std::string>& commandLine);
|
||||
|
||||
void setDisplaySettings(osg::DisplaySettings* ds) { _displaySettings = ds; }
|
||||
osg::DisplaySettings* getDisplaySettings() { return _displaySettings.get(); }
|
||||
@@ -129,6 +133,8 @@ class OSGGLUT_EXPORT Viewer : public Window, public osgGA::GUIActionAdapter
|
||||
int mapWindowXYToViewport(int x, int y);
|
||||
|
||||
protected:
|
||||
|
||||
void initialize();
|
||||
|
||||
virtual void clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user