Show
Ignore:
Timestamp:
02/08/09 16:56:35 (6 years ago)
Author:
robert
Message:

From Paul Melis, "While trying out the osgbrowser example (where I had forgotten to update
LD_LIBRARY_PATH so the XUL libs would be found) I noticed that although
the gecko plugin was found it could not be loaded. But this did not
trigger any visible warning/error message (at least not without INFO
notify level). Would you mind if we change the notify level for a
dlerror() to WARNING? This will also make it more explicit for the case
when a plugin isn't actually found, which seems to come up a lot for
novice users (e.g. no freetype on win32, so no freetype plugin, etc).
Also, the current error message is misleading ("Warning: Could not FIND
plugin to ...") because the it's not always a case of not finding the
plugin. I slightly enhanced the situation of not finding a plugin versus
finding it but not being able to load it.

Here's also a few fixes to some of the examples:
- osgfont: make usage help line more in line with the actual behaviour
- osgcompositeviewer: complain when no model file was provided
- osgmovie: don't include quicktime-dependent feature on Linux
- osgocclussionquery: comment addition (as I was surprised that lines
were being drawn in a function called createRandomTriangles())"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgcompositeviewer/osgcompositeviewer.cpp

    r9565 r9705  
    1616*  THE SOFTWARE. 
    1717*/ 
     18 
     19#include <iostream> 
    1820 
    1921#include <osgUtil/Optimizer> 
     
    135137    osg::ref_ptr<osg::Node> scene = osgDB::readNodeFiles(arguments); 
    136138 
    137     if (!scene) return 1; 
     139    if (!scene) 
     140    { 
     141        std::cout << argv[0] << ": requires filename argument." << std::endl; 
     142        return 1; 
     143    } 
    138144 
    139145    // construct the viewer. 
    140146    osgViewer::CompositeViewer viewer(arguments); 
    141  
    142  
    143  
    144147 
    145148    if (arguments.read("-1")) 
     
    301304     return viewer.run(); 
    302305} 
     306