Added osgkeyboard to the ./runexamples.bat.

Made osgstereoimage exit when non files have been loaded.

Added non const getText() method.
This commit is contained in:
Robert Osfield 2003-03-25 13:57:16 +00:00
parent ce46db87b0
commit 5e56e0eba8
3 changed files with 16 additions and 0 deletions

View File

@ -391,6 +391,10 @@ int main( int argc, char **argv )
if (arguments.isString(pos)) fileList.push_back(arguments[pos]); if (arguments.isString(pos)) fileList.push_back(arguments[pos]);
} }
if (fileList.size()<2)
{
return 1;
}
// set up the use of stereo by default. // set up the use of stereo by default.
osg::DisplaySettings* ds = viewer.getDisplaySettings(); osg::DisplaySettings* ds = viewer.getDisplaySettings();

View File

@ -72,8 +72,17 @@ public:
* which is converted to an internal TextString.*/ * which is converted to an internal TextString.*/
void setText(const wchar_t* text); 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.*/ /** Get the const text string.*/
const String& getText() const { return _text; } 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.*/ /** Set the rendered character size in object coordinates.*/

View File

@ -10,6 +10,9 @@ osgviewer osgcool.osg
echo osgviewer cow.osg echo osgviewer cow.osg
osgviewer cow.osg osgviewer cow.osg
echo osgkeyboard
osgkeyboard
echo osgviewer --stereo cessna.osg echo osgviewer --stereo cessna.osg
osgviewer --stereo cessna.osg osgviewer --stereo cessna.osg