Added -n/--no-overlay option
This commit is contained in:
parent
6096af0b99
commit
7b644e6d82
@ -250,6 +250,9 @@ int main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
bool useOverlay = true;
|
||||
while (arguments.read("--no-overlay") || arguments.read("-n")) useOverlay = false;
|
||||
|
||||
osgSim::OverlayNode::OverlayTechnique technique = osgSim::OverlayNode::OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY;
|
||||
while (arguments.read("--object")) technique = osgSim::OverlayNode::OBJECT_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY;
|
||||
@ -257,6 +260,7 @@ int main(int argc, char **argv)
|
||||
while (arguments.read("--persp") || arguments.read("--perspective")) technique = osgSim::OverlayNode::VIEW_DEPENDENT_WITH_PERSPECTIVE_OVERLAY;
|
||||
|
||||
|
||||
|
||||
// if user request help write it out to cout.
|
||||
if (arguments.read("-h") || arguments.read("--help"))
|
||||
{
|
||||
@ -288,11 +292,9 @@ int main(int argc, char **argv)
|
||||
if (csn)
|
||||
{
|
||||
|
||||
bool insertOverlayNode = true;
|
||||
osg::ref_ptr<osgSim::OverlayNode> overlayNode;
|
||||
if (insertOverlayNode)
|
||||
if (useOverlay)
|
||||
{
|
||||
|
||||
overlayNode = new osgSim::OverlayNode(technique);
|
||||
|
||||
// insert the OverlayNode between the coordinate system node and its children.
|
||||
|
Loading…
Reference in New Issue
Block a user