Changeset 8579

Show
Ignore:
Timestamp:
07/14/08 10:48:49
Author:
robert
Message:

Added initial cut at plugin query code

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • OpenSceneGraph/trunk/applications/osgconv/CMakeLists.txt

    r7025 r8579  
    22 
    33 
    4 SET(TARGET_SRC OrientationConverter.cpp osgconv.cpp ) 
    5 SET(TARGET_H OrientationConverter.h ) 
     4SET(TARGET_SRC 
     5    OrientationConverter.cpp  
     6    PluginQuery.cpp 
     7    osgconv.cpp 
     8
     9SET(TARGET_H 
     10    OrientationConverter.h 
     11    PluginQuery.h 
     12
     13 
    614#### end var setup  ### 
    715SETUP_APPLICATION(osgconv) 
  • OpenSceneGraph/trunk/applications/osgconv/osgconv.cpp

    r8074 r8579  
    2929 
    3030#include "OrientationConverter.h" 
     31#include "PluginQuery.h" 
    3132 
    3233typedef std::vector<std::string> FileNameList; 
     
    507508    arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display command line parameters"); 
    508509    arguments.getApplicationUsage()->addCommandLineOption("--help-env","Display environmental variables available"); 
     510    arguments.getApplicationUsage()->addCommandLineOption("--fmts","List supported file formats"); 
    509511 
    510512 
     
    523525    } 
    524526     
     527    if (arguments.read("--fmts")) 
     528    { 
     529        osgDB::FileNameList plugins = osgDB::listAllAvailablePlugins(); 
     530        for(osgDB::FileNameList::iterator itr = plugins.begin(); 
     531            itr != plugins.end(); 
     532            ++itr) 
     533        { 
     534            std::cout<<"Plugin "<<*itr<<std::endl; 
     535        } 
     536        return 1; 
     537    }     
     538     
    525539    if (arguments.argc()<=1) 
    526540    {