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/osgocclusionquery/osgocclusionquery.cpp

    r9395 r9705  
    246246            if (_total > _limit) 
    247247                break; 
    248         }  
     248        } 
    249249    } 
    250250 
     
    312312        //   Don't add one here to avoid hierarchical nesting. 
    313313        return; 
    314      
     314 
    315315    // There are no OQNs below this group. If the vertex 
    316316    //   count exceeds the threshold, add an OQN here. 
     
    396396 
    397397 
    398 void  
     398void 
    399399DebugDisplayVisitor::apply( osg::OcclusionQueryNode& oqn ) 
    400400{ 
     
    490490// Allow user to do interesting things with an 
    491491// OcclusionQueryNode-enabled scene graph at run time. 
    492 class KeyHandler : public osgGA::GUIEventHandler  
    493 { 
    494 public:  
     492class KeyHandler : public osgGA::GUIEventHandler 
     493{ 
     494public: 
    495495    KeyHandler( osg::Node& node ) 
    496496      : _node( node ), 
     
    564564 
    565565    osg::StateSet* state = box->getOrCreateStateSet(); 
    566     osg::PolygonMode* pm = new osg::PolygonMode(  
     566    osg::PolygonMode* pm = new osg::PolygonMode( 
    567567        osg::PolygonMode::FRONT_AND_BACK, osg::PolygonMode::FILL ); 
    568568    state->setAttributeAndModes( pm, 
     
    631631//  * Lots of vertices and color data per vertex 
    632632//  * No vertex sharing 
     633//  * Draw the triangles as wireframe 
    633634osg::ref_ptr<osg::Node> 
    634635createRandomTriangles( unsigned int num ) 
     
    656657    unsigned int i; 
    657658    srand( 0 ); 
    658 #define RAND_NEG1_TO_1 ( ((rand()%20)-10)*.1 )  
     659#define RAND_NEG1_TO_1 ( ((rand()%20)-10)*.1 ) 
    659660    for (i=0; i<num; i++) 
    660661    { 
     
    673674    c->resize( num ); 
    674675 
    675 #define RAND_0_TO_1 ( (rand()%10)*.1 )  
     676#define RAND_0_TO_1 ( (rand()%10)*.1 ) 
    676677    for (i=0; i<num; i++) 
    677678    { 
     
    732733        return 1; 
    733734    } 
    734      
     735 
    735736    osgViewer::Viewer viewer( arguments ); 
    736737 
    737738    // add the state manipulator 
    738739    viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) ); 
    739      
     740 
    740741    // add the stats handler 
    741742    viewer.addEventHandler(new osgViewer::StatsHandler); 
     
    792793    return viewer.run(); 
    793794} 
     795