From Rudolf Wiedemann, "I need to link OpenSceneGraph statically to my application, so I

completed the new registration of the plugin-readerwriters
("REGISTER_OSGPLUGIN") according to your osgstaticviewer-example (see
attachment, based on today's svn)."
This commit is contained in:
Robert Osfield 2007-07-06 13:54:26 +00:00
parent a7de33ee55
commit 9e2fe92ef1
51 changed files with 53 additions and 62 deletions

View File

@ -1,6 +1,6 @@
#this file is automatically generated #this file is automatically generated
SET(TARGET_ADDED_LIBRARIES osgdb_ive osgdb_freetype ) SET(TARGET_ADDED_LIBRARIES osgdb_ive osgdb_freetype osgdb_OpenFlight osgdb_osg )
SET(TARGET_SRC osgstaticviewer.cpp ) SET(TARGET_SRC osgstaticviewer.cpp )
#### end var setup ### #### end var setup ###

View File

@ -39,6 +39,8 @@
// include the plugins we need // include the plugins we need
USE_OSGPLUGIN(ive); USE_OSGPLUGIN(ive);
USE_OSGPLUGIN(freetype); USE_OSGPLUGIN(freetype);
USE_OSGPLUGIN(osg);
USE_OSGPLUGIN(OpenFlight);
// include the platform specific GraphicsWindow implementation. // include the platform specific GraphicsWindow implementation.
USE_GRAPHICSWINDOW(); USE_GRAPHICSWINDOW();

View File

@ -154,4 +154,4 @@ class ReaderWriter3DC : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriter3DC> g_readerWriter_3DX_Proxy; REGISTER_OSGPLUGIN(3dc, ReaderWriter3DC)

View File

@ -123,7 +123,7 @@ class ReaderWriter3DS : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriter3DS> g_readerWriter_3DS_Proxy; REGISTER_OSGPLUGIN(3ds, ReaderWriter3DS)
ReaderWriter3DS::ReaderWriter3DS() ReaderWriter3DS::ReaderWriter3DS()
{ {

View File

@ -19,7 +19,7 @@
#include "GroupSoLOD.h" #include "GroupSoLOD.h"
// Register with Registry to instantiate the inventor reader. // Register with Registry to instantiate the inventor reader.
osgDB::RegisterReaderWriterProxy<ReaderWriterIV> g_ivReaderWriterProxy; REGISTER_OSGPLUGIN(Inventor, ReaderWriterIV)
ReaderWriterIV::ReaderWriterIV() ReaderWriterIV::ReaderWriterIV()
{ {

View File

@ -176,7 +176,7 @@ ReaderWriter::ReadResult ReaderWriterATTR::readObject(const std::string& file, c
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterATTR> g_readerWriter_ATTR_Proxy; REGISTER_OSGPLUGIN(attr, ReaderWriterATTR)

View File

@ -1,5 +1,5 @@
// //
// OpenFlight® loader for OpenSceneGraph // OpenFlight loader for OpenSceneGraph
// //
// Copyright (C) 2005-2006 Brede Johansen // Copyright (C) 2005-2006 Brede Johansen
// //
@ -286,9 +286,7 @@ class FLTReaderWriter : public ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
RegisterReaderWriterProxy<FLTReaderWriter> g_FLTReaderWriterProxy; REGISTER_OSGPLUGIN(OpenFlight, FLTReaderWriter)

View File

@ -188,7 +188,7 @@ private:
// now register with osg::Registry to instantiate the above // now register with osg::Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterAC> g_readerWriter_AC_Proxy; REGISTER_OSGPLUGIN(ac, ReaderWriterAC)
namespace ac3d { namespace ac3d {

View File

@ -492,4 +492,4 @@ class ReaderWriterBMP : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterBMP> g_readerWriter_BMP_Proxy; REGISTER_OSGPLUGIN(bmp, ReaderWriterBMP)

View File

@ -51,7 +51,7 @@ private:
}; };
// Register with Registry to instantiate the above reader/writer. // Register with Registry to instantiate the above reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterQ3BSP> g_readerWriter_Q3BSP_Proxy; REGISTER_OSGPLUGIN(bsp, ReaderWriterQ3BSP)

View File

@ -151,6 +151,6 @@ ReaderWriterDAE::writeNode( const osg::Node& node,
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// Add ourself to the Registry to instantiate the reader/writer. // Add ourself to the Registry to instantiate the reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterDAE> g_readerWriter_DAE_Proxy; REGISTER_OSGPLUGIN(dae, ReaderWriterDAE)
// vim: set sw=4 ts=8 et ic ai: // vim: set sw=4 ts=8 et ic ai:

View File

@ -1005,4 +1005,4 @@ public:
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterDDS> g_readerWriter_DDS_Proxy; REGISTER_OSGPLUGIN(dds, ReaderWriterDDS)

View File

@ -973,5 +973,5 @@ int dwfgets(char *clin, int max, FILE *fin)
// now register with osg::Registry to instantiate the above // now register with osg::Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterDW> g_readerWriter_DW_Proxy; REGISTER_OSGPLUGIN(dw, ReaderWriterDW)

View File

@ -40,7 +40,7 @@ protected:
}; };
// register with Registry to instantiate the above reader/writer. // register with Registry to instantiate the above reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterdxf> g_dxfReaderWriterProxy; REGISTER_OSGPLUGIN(dxf, ReaderWriterdxf)
// read file and convert to OSG. // read file and convert to OSG.

View File

@ -2228,4 +2228,4 @@ class ReaderWriterGEO : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterGEO> gReaderWriter_GEO_Proxy; REGISTER_OSGPLUGIN(geo, ReaderWriterGEO)

View File

@ -398,4 +398,4 @@ class ReaderWriterGIF : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterGIF> g_readerWriter_GIF_Proxy; REGISTER_OSGPLUGIN(gif, ReaderWriterGIF)

View File

@ -173,4 +173,4 @@ public:
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterHDR> g_readerWriter_HDR_Proxy; REGISTER_OSGPLUGIN(hdr, ReaderWriterHDR)

View File

@ -515,4 +515,4 @@ class ReaderWriterJP2 : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterJP2> g_readerWriter_JP2_Proxy; REGISTER_OSGPLUGIN(jp2, ReaderWriterJP2)

View File

@ -826,4 +826,4 @@ class ReaderWriterJPEG : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterJPEG> g_readerWriter_JPEG_Proxy; REGISTER_OSGPLUGIN(jpeg, ReaderWriterJPEG)

View File

@ -286,6 +286,4 @@ class LOGOReaderWriter : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
REGISTER_OSGPLUGIN(logo, LOGOReaderWriter)
osgDB::RegisterReaderWriterProxy<LOGOReaderWriter> g_LOGOReaderWriterProxy;

View File

@ -122,7 +122,7 @@ lwosg::Converter::Options ReaderWriterLWO::parse_options(const Options *options)
// register with Registry to instantiate the above reader/writer. // register with Registry to instantiate the above reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterLWO> g_lwoReaderWriterProxy; REGISTER_OSGPLUGIN(lwo, ReaderWriterLWO)
osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode_LWO2(const std::string &fileName, const osgDB::ReaderWriter::Options *options) const osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode_LWO2(const std::string &fileName, const osgDB::ReaderWriter::Options *options) const
{ {

View File

@ -79,4 +79,4 @@ lwosg::SceneLoader::Options ReaderWriterLWS::parse_options(const Options *option
// register with Registry to instantiate the above reader/writer. // register with Registry to instantiate the above reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterLWS> g_lwsReaderWriterProxy; REGISTER_OSGPLUGIN(lws, ReaderWriterLWS)

View File

@ -56,7 +56,7 @@ public:
virtual ReadResult readNode (const std::string& filename, const osgDB::ReaderWriter::Options* options) const; virtual ReadResult readNode (const std::string& filename, const osgDB::ReaderWriter::Options* options) const;
}; };
osgDB::RegisterReaderWriterProxy<ReaderWriterMD2> g_readerWriter_MD2_Proxy; REGISTER_OSGPLUGIN(md2, ReaderWriterMD2)
osgDB::ReaderWriter::ReadResult osgDB::ReaderWriter::ReadResult
ReaderWriterMD2::readNode (const std::string& file, const osgDB::ReaderWriter::Options* options) const ReaderWriterMD2::readNode (const std::string& file, const osgDB::ReaderWriter::Options* options) const

View File

@ -466,8 +466,4 @@ class NetReader : public osgDB::ReaderWriter
}; };
osgDB::RegisterReaderWriterProxy<NetReader> g_netReader_Proxy; REGISTER_OSGPLUGIN(net, NetReader)

View File

@ -90,6 +90,4 @@ class NormalsReader: public osgDB::ReaderWriter
} }
}; };
osgDB::RegisterReaderWriterProxy<NormalsReader> g_normalsReader_Proxy; REGISTER_OSGPLUGIN(normals, NormalsReader)

View File

@ -103,7 +103,7 @@ inline osg::Vec3 ReaderWriterOBJ::transformNormal(const osg::Vec3& vec, const bo
// register with Registry to instantiate the above reader/writer. // register with Registry to instantiate the above reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterOBJ> g_objReaderWriterProxy; REGISTER_OSGPLUGIN(obj, ReaderWriterOBJ)
void ReaderWriterOBJ::buildMaterialToStateSetMap(obj::Model& model, MaterialToStateSetMap& materialToStateSetMap) const void ReaderWriterOBJ::buildMaterialToStateSetMap(obj::Model& model, MaterialToStateSetMap& materialToStateSetMap) const
{ {

View File

@ -203,4 +203,4 @@ class OSGReaderWriter : public ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
RegisterReaderWriterProxy<OSGReaderWriter> g_OSGReaderWriterProxy; REGISTER_OSGPLUGIN(osg, OSGReaderWriter)

View File

@ -139,5 +139,5 @@ public:
// Add ourself to the Registry to instantiate the reader/writer. // Add ourself to the Registry to instantiate the reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterOsgShadow> g_readerWriter_OsgShadow_Proxy; REGISTER_OSGPLUGIN(osgShadow, ReaderWriterOsgShadow)

View File

@ -153,5 +153,5 @@ public:
// Add ourself to the Registry to instantiate the reader/writer. // Add ourself to the Registry to instantiate the reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterOsgViewer> g_readerWriter_OsgViewer_Proxy; REGISTER_OSGPLUGIN(osgViewer, ReaderWriterOsgViewer)

View File

@ -102,4 +102,4 @@ protected:
// register with Registry to instantiate the above reader/writer. // register with Registry to instantiate the above reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterOSGA> g_osgaReaderWriterProxy; REGISTER_OSGPLUGIN(osga, ReaderWriterOSGA)

View File

@ -116,4 +116,4 @@ class sgReaderWriterOSGTGZ : public osgDB::ReaderWriter
// now register with sgRegistry to instantiate the above // now register with sgRegistry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<sgReaderWriterOSGTGZ> g_readerWriter_OSGTGZ_Proxy; REGISTER_OSGPLUGIN(osgtgz, sgReaderWriterOSGTGZ)

View File

@ -242,4 +242,4 @@ void ReaderWriterPFB::initPerformer()
// now register with sgRegistry to instantiate the above // now register with sgRegistry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterPFB> g_readerWriter_PFB_Proxy; REGISTER_OSGPLUGIN(pfb, ReaderWriterPFB)

View File

@ -241,4 +241,4 @@ class ReaderWriterPIC : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterPIC> g_readerWriter_PIC_Proxy; REGISTER_OSGPLUGIN(pic, ReaderWriterPIC)

View File

@ -321,4 +321,4 @@ class ReaderWriterPNG : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterPNG> g_readerWriter_PNG_Proxy; REGISTER_OSGPLUGIN(png, ReaderWriterPNG)

View File

@ -486,4 +486,4 @@ class ReaderWriterPNM : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterPNM> g_readerWriter_PNM_Proxy; REGISTER_OSGPLUGIN(pnm, ReaderWriterPNM)

View File

@ -459,4 +459,4 @@ public:
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterQT> g_readerWriter_QT_Proxy; REGISTER_OSGPLUGIN(quicktime, ReaderWriterQT)

View File

@ -652,4 +652,4 @@ class ReaderWriterRGB : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterRGB> g_readerWriter_RGB_Proxy; REGISTER_OSGPLUGIN(rgb, ReaderWriterRGB)

View File

@ -162,7 +162,7 @@ public:
// Add ourself to the Registry to instantiate the reader/writer. // Add ourself to the Registry to instantiate the reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterROT> g_readerWriter_ROT_Proxy; REGISTER_OSGPLUGIN(rot, ReaderWriterROT)
/*EOF*/ /*EOF*/

View File

@ -172,7 +172,7 @@ public:
// Add ourself to the Registry to instantiate the reader/writer. // Add ourself to the Registry to instantiate the reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterSCALE> g_readerWriter_SCALE_Proxy; REGISTER_OSGPLUGIN(scale, ReaderWriterSCALE)
/*EOF*/ /*EOF*/

View File

@ -36,5 +36,4 @@ class ESRIShapeReaderWriter : public osgDB::ReaderWriter
private: private:
}; };
osgDB::RegisterReaderWriterProxy<ESRIShapeReaderWriter> g_esriShapeReaderWriter_Proxy; REGISTER_OSGPLUGIN(shp, ESRIShapeReaderWriter)

View File

@ -81,7 +81,7 @@ private:
// Register with Registry to instantiate the above reader/writer. // Register with Registry to instantiate the above reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterSTL> g_readerWriter_STL_Proxy; REGISTER_OSGPLUGIN(stl, ReaderWriterSTL)
/* /*

View File

@ -530,4 +530,4 @@ class ReaderWriterTGA : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterTGA> g_readerWriter_TGA_Proxy; REGISTER_OSGPLUGIN(tga, ReaderWriterTGA)

View File

@ -140,4 +140,4 @@ class ReaderWriterTGZ : public osgDB::ReaderWriter
// now register with sgRegistry to instantiate the above // now register with sgRegistry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterTGZ> g_readerWriter_TGZ_Proxy; REGISTER_OSGPLUGIN(tgz, ReaderWriterTGZ)

View File

@ -787,4 +787,4 @@ class ReaderWriterTIFF : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterTIFF> g_readerWriter_TIFF_Proxy; REGISTER_OSGPLUGIN(tiff, ReaderWriterTIFF)

View File

@ -159,7 +159,7 @@ public:
// Add ourself to the Registry to instantiate the reader/writer. // Add ourself to the Registry to instantiate the reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterTRANS> g_readerWriter_TRANS_Proxy; REGISTER_OSGPLUGIN(trans, ReaderWriterTRANS)
/*EOF*/ /*EOF*/

View File

@ -59,4 +59,4 @@ class ReaderWriterTXF : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterTXF> g_readerWriter_TXF_Proxy; REGISTER_OSGPLUGIN(txf, ReaderWriterTXF)

View File

@ -869,5 +869,5 @@ osg::Node* ReaderWriterTXP::getTileContent(const TXPArchive::TileInfo &info, con
return tileGroup; return tileGroup;
} }
osgDB::RegisterReaderWriterProxy<ReaderWriterTXP> g_txpReaderWriterProxy; REGISTER_OSGPLUGIN(txp, ReaderWriterTXP)

View File

@ -70,7 +70,7 @@ class ReaderWriterVRML2 : public osgDB::ReaderWriter
}; };
// Register with Registry to instantiate the above reader/writer. // Register with Registry to instantiate the above reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterVRML2> g_readerWriter_VRML_Proxy; REGISTER_OSGPLUGIN(vrml, ReaderWriterVRML2)
osgDB::ReaderWriter::ReadResult ReaderWriterVRML2::readNode(const std::string &fileName, const Options*) const osgDB::ReaderWriter::ReadResult ReaderWriterVRML2::readNode(const std::string &fileName, const Options*) const
{ {

View File

@ -70,7 +70,7 @@ private:
}; };
// Register with Registry to instantiate the above reader/writer. // Register with Registry to instantiate the above reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterDirectX> g_readerWriter_DirectX_Proxy; REGISTER_OSGPLUGIN(x, ReaderWriterDirectX)
// Read node // Read node

View File

@ -352,4 +352,4 @@ class ReaderWriterXine : public osgDB::ReaderWriter
// now register with Registry to instantiate the above // now register with Registry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterXine> g_readerWriter_Xine_Proxy; REGISTER_OSGPLUGIN(xine, ReaderWriterXine)

View File

@ -122,4 +122,4 @@ class ReaderWriterZIP : public osgDB::ReaderWriter
// now register with sgRegistry to instantiate the above // now register with sgRegistry to instantiate the above
// reader/writer. // reader/writer.
osgDB::RegisterReaderWriterProxy<ReaderWriterZIP> g_readerWriter_ZIP_Proxy; REGISTER_OSGPLUGIN(zip, ReaderWriterZIP)