From 5e56e0eba81124eb886172442c9aa3e4ca5417c1 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 25 Mar 2003 13:57:16 +0000 Subject: [PATCH] Added osgkeyboard to the ./runexamples.bat. Made osgstereoimage exit when non files have been loaded. Added non const getText() method. --- examples/osgstereoimage/osgstereoimage.cpp | 4 ++++ include/osgText/Text | 9 +++++++++ runexamples.bat | 3 +++ 3 files changed, 16 insertions(+) diff --git a/examples/osgstereoimage/osgstereoimage.cpp b/examples/osgstereoimage/osgstereoimage.cpp index 925112c21..fe81893f1 100644 --- a/examples/osgstereoimage/osgstereoimage.cpp +++ b/examples/osgstereoimage/osgstereoimage.cpp @@ -391,6 +391,10 @@ int main( int argc, char **argv ) if (arguments.isString(pos)) fileList.push_back(arguments[pos]); } + if (fileList.size()<2) + { + return 1; + } // set up the use of stereo by default. osg::DisplaySettings* ds = viewer.getDisplaySettings(); diff --git a/include/osgText/Text b/include/osgText/Text index 67e052f45..065888634 100644 --- a/include/osgText/Text +++ b/include/osgText/Text @@ -72,8 +72,17 @@ public: * which is converted to an internal TextString.*/ void setText(const wchar_t* text); + /** Get the text string. + * Note, if you modify the string you must call Text::update() for + * the internal glyph reprentation to be updated.*/ + String& getText() { return _text; } + /** Get the const text string.*/ const String& getText() const { return _text; } + + /** update internal glyph respresnetation used for rendering, + * and bounding volume.*/ + void update() { computeGlyphRepresentation(); } /** Set the rendered character size in object coordinates.*/ diff --git a/runexamples.bat b/runexamples.bat index 441d6f10a..06770b6c3 100644 --- a/runexamples.bat +++ b/runexamples.bat @@ -10,6 +10,9 @@ osgviewer osgcool.osg echo osgviewer cow.osg osgviewer cow.osg +echo osgkeyboard +osgkeyboard + echo osgviewer --stereo cessna.osg osgviewer --stereo cessna.osg