diff --git a/examples/osgstaticviewer/CMakeLists.txt b/examples/osgstaticviewer/CMakeLists.txt index 4e447bd78..3d986c4d4 100644 --- a/examples/osgstaticviewer/CMakeLists.txt +++ b/examples/osgstaticviewer/CMakeLists.txt @@ -1,6 +1,6 @@ #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 ) #### end var setup ### diff --git a/examples/osgstaticviewer/osgstaticviewer.cpp b/examples/osgstaticviewer/osgstaticviewer.cpp index 664e0a6ff..f2cbd24ab 100644 --- a/examples/osgstaticviewer/osgstaticviewer.cpp +++ b/examples/osgstaticviewer/osgstaticviewer.cpp @@ -39,6 +39,8 @@ // include the plugins we need USE_OSGPLUGIN(ive); USE_OSGPLUGIN(freetype); +USE_OSGPLUGIN(osg); +USE_OSGPLUGIN(OpenFlight); // include the platform specific GraphicsWindow implementation. USE_GRAPHICSWINDOW(); diff --git a/src/osgPlugins/3dc/ReaderWriter3DC.cpp b/src/osgPlugins/3dc/ReaderWriter3DC.cpp index bf244e42b..1ba8a77fd 100644 --- a/src/osgPlugins/3dc/ReaderWriter3DC.cpp +++ b/src/osgPlugins/3dc/ReaderWriter3DC.cpp @@ -154,4 +154,4 @@ class ReaderWriter3DC : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_3DX_Proxy; +REGISTER_OSGPLUGIN(3dc, ReaderWriter3DC) diff --git a/src/osgPlugins/3ds/ReaderWriter3DS.cpp b/src/osgPlugins/3ds/ReaderWriter3DS.cpp index cd2d79b1a..e2f9eeb89 100644 --- a/src/osgPlugins/3ds/ReaderWriter3DS.cpp +++ b/src/osgPlugins/3ds/ReaderWriter3DS.cpp @@ -123,7 +123,7 @@ class ReaderWriter3DS : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_3DS_Proxy; +REGISTER_OSGPLUGIN(3ds, ReaderWriter3DS) ReaderWriter3DS::ReaderWriter3DS() { diff --git a/src/osgPlugins/Inventor/ReaderWriterIV.cpp b/src/osgPlugins/Inventor/ReaderWriterIV.cpp index a865d2aef..0cdaa2b4f 100644 --- a/src/osgPlugins/Inventor/ReaderWriterIV.cpp +++ b/src/osgPlugins/Inventor/ReaderWriterIV.cpp @@ -19,7 +19,7 @@ #include "GroupSoLOD.h" // Register with Registry to instantiate the inventor reader. -osgDB::RegisterReaderWriterProxy g_ivReaderWriterProxy; +REGISTER_OSGPLUGIN(Inventor, ReaderWriterIV) ReaderWriterIV::ReaderWriterIV() { diff --git a/src/osgPlugins/OpenFlight/ReaderWriterATTR.cpp b/src/osgPlugins/OpenFlight/ReaderWriterATTR.cpp index 76489606c..f8ca35fbf 100644 --- a/src/osgPlugins/OpenFlight/ReaderWriterATTR.cpp +++ b/src/osgPlugins/OpenFlight/ReaderWriterATTR.cpp @@ -176,7 +176,7 @@ ReaderWriter::ReadResult ReaderWriterATTR::readObject(const std::string& file, c // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_ATTR_Proxy; +REGISTER_OSGPLUGIN(attr, ReaderWriterATTR) diff --git a/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp b/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp index 99ef39712..3f08fe398 100644 --- a/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp +++ b/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp @@ -1,5 +1,5 @@ // -// OpenFlightŪ loader for OpenSceneGraph +// OpenFlight loader for OpenSceneGraph // // Copyright (C) 2005-2006 Brede Johansen // @@ -286,9 +286,7 @@ class FLTReaderWriter : public ReaderWriter // now register with Registry to instantiate the above // reader/writer. -RegisterReaderWriterProxy g_FLTReaderWriterProxy; - - +REGISTER_OSGPLUGIN(OpenFlight, FLTReaderWriter) diff --git a/src/osgPlugins/ac/ac3d.cpp b/src/osgPlugins/ac/ac3d.cpp index f44172368..109706c44 100644 --- a/src/osgPlugins/ac/ac3d.cpp +++ b/src/osgPlugins/ac/ac3d.cpp @@ -188,7 +188,7 @@ private: // now register with osg::Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_AC_Proxy; +REGISTER_OSGPLUGIN(ac, ReaderWriterAC) namespace ac3d { diff --git a/src/osgPlugins/bmp/ReaderWriterBMP.cpp b/src/osgPlugins/bmp/ReaderWriterBMP.cpp index 99561d82d..fa0cb5bc7 100644 --- a/src/osgPlugins/bmp/ReaderWriterBMP.cpp +++ b/src/osgPlugins/bmp/ReaderWriterBMP.cpp @@ -492,4 +492,4 @@ class ReaderWriterBMP : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_BMP_Proxy; +REGISTER_OSGPLUGIN(bmp, ReaderWriterBMP) diff --git a/src/osgPlugins/bsp/ReaderWriterQ3BSP.cpp b/src/osgPlugins/bsp/ReaderWriterQ3BSP.cpp index 4129b5a0e..ec133a466 100644 --- a/src/osgPlugins/bsp/ReaderWriterQ3BSP.cpp +++ b/src/osgPlugins/bsp/ReaderWriterQ3BSP.cpp @@ -51,7 +51,7 @@ private: }; // Register with Registry to instantiate the above reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_Q3BSP_Proxy; +REGISTER_OSGPLUGIN(bsp, ReaderWriterQ3BSP) diff --git a/src/osgPlugins/dae/ReaderWriterDAE.cpp b/src/osgPlugins/dae/ReaderWriterDAE.cpp index ad2c8c478..1dd4e132b 100644 --- a/src/osgPlugins/dae/ReaderWriterDAE.cpp +++ b/src/osgPlugins/dae/ReaderWriterDAE.cpp @@ -151,6 +151,6 @@ ReaderWriterDAE::writeNode( const osg::Node& node, /////////////////////////////////////////////////////////////////////////// // Add ourself to the Registry to instantiate the reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_DAE_Proxy; +REGISTER_OSGPLUGIN(dae, ReaderWriterDAE) // vim: set sw=4 ts=8 et ic ai: diff --git a/src/osgPlugins/dds/ReaderWriterDDS.cpp b/src/osgPlugins/dds/ReaderWriterDDS.cpp index 6489e4a25..487244f0f 100644 --- a/src/osgPlugins/dds/ReaderWriterDDS.cpp +++ b/src/osgPlugins/dds/ReaderWriterDDS.cpp @@ -1005,4 +1005,4 @@ public: // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_DDS_Proxy; +REGISTER_OSGPLUGIN(dds, ReaderWriterDDS) diff --git a/src/osgPlugins/dw/ReaderWriterDW.cpp b/src/osgPlugins/dw/ReaderWriterDW.cpp index 64d96fd40..201606559 100644 --- a/src/osgPlugins/dw/ReaderWriterDW.cpp +++ b/src/osgPlugins/dw/ReaderWriterDW.cpp @@ -973,5 +973,5 @@ int dwfgets(char *clin, int max, FILE *fin) // now register with osg::Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_DW_Proxy; +REGISTER_OSGPLUGIN(dw, ReaderWriterDW) diff --git a/src/osgPlugins/dxf/ReaderWriterDXF.cpp b/src/osgPlugins/dxf/ReaderWriterDXF.cpp index 226bd8e3a..ab29efca8 100644 --- a/src/osgPlugins/dxf/ReaderWriterDXF.cpp +++ b/src/osgPlugins/dxf/ReaderWriterDXF.cpp @@ -40,7 +40,7 @@ protected: }; // register with Registry to instantiate the above reader/writer. -osgDB::RegisterReaderWriterProxy g_dxfReaderWriterProxy; +REGISTER_OSGPLUGIN(dxf, ReaderWriterdxf) // read file and convert to OSG. diff --git a/src/osgPlugins/geo/ReaderWriterGEO.cpp b/src/osgPlugins/geo/ReaderWriterGEO.cpp index 7213f6d28..b36c181a3 100644 --- a/src/osgPlugins/geo/ReaderWriterGEO.cpp +++ b/src/osgPlugins/geo/ReaderWriterGEO.cpp @@ -2228,4 +2228,4 @@ class ReaderWriterGEO : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy gReaderWriter_GEO_Proxy; +REGISTER_OSGPLUGIN(geo, ReaderWriterGEO) diff --git a/src/osgPlugins/gif/ReaderWriterGIF.cpp b/src/osgPlugins/gif/ReaderWriterGIF.cpp index 9203e45b0..2ba45cfee 100644 --- a/src/osgPlugins/gif/ReaderWriterGIF.cpp +++ b/src/osgPlugins/gif/ReaderWriterGIF.cpp @@ -398,4 +398,4 @@ class ReaderWriterGIF : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_GIF_Proxy; +REGISTER_OSGPLUGIN(gif, ReaderWriterGIF) diff --git a/src/osgPlugins/hdr/ReaderWriterHDR.cpp b/src/osgPlugins/hdr/ReaderWriterHDR.cpp index 47a7516c6..70296f66e 100644 --- a/src/osgPlugins/hdr/ReaderWriterHDR.cpp +++ b/src/osgPlugins/hdr/ReaderWriterHDR.cpp @@ -173,4 +173,4 @@ public: // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_HDR_Proxy; +REGISTER_OSGPLUGIN(hdr, ReaderWriterHDR) diff --git a/src/osgPlugins/jp2/ReaderWriterJP2.cpp b/src/osgPlugins/jp2/ReaderWriterJP2.cpp index 90de11c5e..954a28590 100644 --- a/src/osgPlugins/jp2/ReaderWriterJP2.cpp +++ b/src/osgPlugins/jp2/ReaderWriterJP2.cpp @@ -515,4 +515,4 @@ class ReaderWriterJP2 : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_JP2_Proxy; +REGISTER_OSGPLUGIN(jp2, ReaderWriterJP2) diff --git a/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp b/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp index cbce21000..060936851 100644 --- a/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp +++ b/src/osgPlugins/jpeg/ReaderWriterJPEG.cpp @@ -826,4 +826,4 @@ class ReaderWriterJPEG : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_JPEG_Proxy; +REGISTER_OSGPLUGIN(jpeg, ReaderWriterJPEG) diff --git a/src/osgPlugins/logo/ReaderWriterLOGO.cpp b/src/osgPlugins/logo/ReaderWriterLOGO.cpp index 547699ca2..33e5e4fa8 100644 --- a/src/osgPlugins/logo/ReaderWriterLOGO.cpp +++ b/src/osgPlugins/logo/ReaderWriterLOGO.cpp @@ -286,6 +286,4 @@ class LOGOReaderWriter : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. - -osgDB::RegisterReaderWriterProxy g_LOGOReaderWriterProxy; - +REGISTER_OSGPLUGIN(logo, LOGOReaderWriter) diff --git a/src/osgPlugins/lwo/ReaderWriterLWO.cpp b/src/osgPlugins/lwo/ReaderWriterLWO.cpp index ed928e4fd..96c181129 100644 --- a/src/osgPlugins/lwo/ReaderWriterLWO.cpp +++ b/src/osgPlugins/lwo/ReaderWriterLWO.cpp @@ -122,7 +122,7 @@ lwosg::Converter::Options ReaderWriterLWO::parse_options(const Options *options) // register with Registry to instantiate the above reader/writer. -osgDB::RegisterReaderWriterProxy g_lwoReaderWriterProxy; +REGISTER_OSGPLUGIN(lwo, ReaderWriterLWO) osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode_LWO2(const std::string &fileName, const osgDB::ReaderWriter::Options *options) const { diff --git a/src/osgPlugins/lws/ReaderWriterLWS.cpp b/src/osgPlugins/lws/ReaderWriterLWS.cpp index 8102fffcf..2b3ebecbb 100644 --- a/src/osgPlugins/lws/ReaderWriterLWS.cpp +++ b/src/osgPlugins/lws/ReaderWriterLWS.cpp @@ -79,4 +79,4 @@ lwosg::SceneLoader::Options ReaderWriterLWS::parse_options(const Options *option // register with Registry to instantiate the above reader/writer. -osgDB::RegisterReaderWriterProxy g_lwsReaderWriterProxy; +REGISTER_OSGPLUGIN(lws, ReaderWriterLWS) diff --git a/src/osgPlugins/md2/ReaderWriterMD2.cpp b/src/osgPlugins/md2/ReaderWriterMD2.cpp index b2c8fc348..18c6b8559 100644 --- a/src/osgPlugins/md2/ReaderWriterMD2.cpp +++ b/src/osgPlugins/md2/ReaderWriterMD2.cpp @@ -56,7 +56,7 @@ public: virtual ReadResult readNode (const std::string& filename, const osgDB::ReaderWriter::Options* options) const; }; -osgDB::RegisterReaderWriterProxy g_readerWriter_MD2_Proxy; +REGISTER_OSGPLUGIN(md2, ReaderWriterMD2) osgDB::ReaderWriter::ReadResult ReaderWriterMD2::readNode (const std::string& file, const osgDB::ReaderWriter::Options* options) const diff --git a/src/osgPlugins/net/ReaderWriterNET.cpp b/src/osgPlugins/net/ReaderWriterNET.cpp index adfbf7e91..379a3889c 100644 --- a/src/osgPlugins/net/ReaderWriterNET.cpp +++ b/src/osgPlugins/net/ReaderWriterNET.cpp @@ -466,8 +466,4 @@ class NetReader : public osgDB::ReaderWriter }; -osgDB::RegisterReaderWriterProxy g_netReader_Proxy; - - - - +REGISTER_OSGPLUGIN(net, NetReader) diff --git a/src/osgPlugins/normals/ReaderWriterNormals.cpp b/src/osgPlugins/normals/ReaderWriterNormals.cpp index 1c7cd4661..240c71e06 100644 --- a/src/osgPlugins/normals/ReaderWriterNormals.cpp +++ b/src/osgPlugins/normals/ReaderWriterNormals.cpp @@ -90,6 +90,4 @@ class NormalsReader: public osgDB::ReaderWriter } }; -osgDB::RegisterReaderWriterProxy g_normalsReader_Proxy; - - +REGISTER_OSGPLUGIN(normals, NormalsReader) diff --git a/src/osgPlugins/obj/ReaderWriterOBJ.cpp b/src/osgPlugins/obj/ReaderWriterOBJ.cpp index 1683420b8..b3f18027f 100644 --- a/src/osgPlugins/obj/ReaderWriterOBJ.cpp +++ b/src/osgPlugins/obj/ReaderWriterOBJ.cpp @@ -103,7 +103,7 @@ inline osg::Vec3 ReaderWriterOBJ::transformNormal(const osg::Vec3& vec, const bo // register with Registry to instantiate the above reader/writer. -osgDB::RegisterReaderWriterProxy g_objReaderWriterProxy; +REGISTER_OSGPLUGIN(obj, ReaderWriterOBJ) void ReaderWriterOBJ::buildMaterialToStateSetMap(obj::Model& model, MaterialToStateSetMap& materialToStateSetMap) const { diff --git a/src/osgPlugins/osg/ReaderWriterOSG.cpp b/src/osgPlugins/osg/ReaderWriterOSG.cpp index ed3e78cc1..2c35d0430 100644 --- a/src/osgPlugins/osg/ReaderWriterOSG.cpp +++ b/src/osgPlugins/osg/ReaderWriterOSG.cpp @@ -203,4 +203,4 @@ class OSGReaderWriter : public ReaderWriter // now register with Registry to instantiate the above // reader/writer. -RegisterReaderWriterProxy g_OSGReaderWriterProxy; +REGISTER_OSGPLUGIN(osg, OSGReaderWriter) diff --git a/src/osgPlugins/osgShadow/ReaderWriterOsgShadow.cpp b/src/osgPlugins/osgShadow/ReaderWriterOsgShadow.cpp index 2efa36497..c55ec9a47 100644 --- a/src/osgPlugins/osgShadow/ReaderWriterOsgShadow.cpp +++ b/src/osgPlugins/osgShadow/ReaderWriterOsgShadow.cpp @@ -139,5 +139,5 @@ public: // Add ourself to the Registry to instantiate the reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_OsgShadow_Proxy; +REGISTER_OSGPLUGIN(osgShadow, ReaderWriterOsgShadow) diff --git a/src/osgPlugins/osgViewer/ReaderWriterOsgViewer.cpp b/src/osgPlugins/osgViewer/ReaderWriterOsgViewer.cpp index 5e091a8f6..cd3576458 100644 --- a/src/osgPlugins/osgViewer/ReaderWriterOsgViewer.cpp +++ b/src/osgPlugins/osgViewer/ReaderWriterOsgViewer.cpp @@ -153,5 +153,5 @@ public: // Add ourself to the Registry to instantiate the reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_OsgViewer_Proxy; +REGISTER_OSGPLUGIN(osgViewer, ReaderWriterOsgViewer) diff --git a/src/osgPlugins/osga/ReaderWriterOSGA.cpp b/src/osgPlugins/osga/ReaderWriterOSGA.cpp index c23440c91..f7af8e313 100644 --- a/src/osgPlugins/osga/ReaderWriterOSGA.cpp +++ b/src/osgPlugins/osga/ReaderWriterOSGA.cpp @@ -102,4 +102,4 @@ protected: // register with Registry to instantiate the above reader/writer. -osgDB::RegisterReaderWriterProxy g_osgaReaderWriterProxy; +REGISTER_OSGPLUGIN(osga, ReaderWriterOSGA) diff --git a/src/osgPlugins/osgtgz/ReaderWriterOSGTGZ.cpp b/src/osgPlugins/osgtgz/ReaderWriterOSGTGZ.cpp index 1b636dec2..7f44f95c5 100644 --- a/src/osgPlugins/osgtgz/ReaderWriterOSGTGZ.cpp +++ b/src/osgPlugins/osgtgz/ReaderWriterOSGTGZ.cpp @@ -116,4 +116,4 @@ class sgReaderWriterOSGTGZ : public osgDB::ReaderWriter // now register with sgRegistry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_OSGTGZ_Proxy; +REGISTER_OSGPLUGIN(osgtgz, sgReaderWriterOSGTGZ) diff --git a/src/osgPlugins/pfb/ReaderWriterPFB.cpp b/src/osgPlugins/pfb/ReaderWriterPFB.cpp index 9b7ff849b..9cee2366a 100644 --- a/src/osgPlugins/pfb/ReaderWriterPFB.cpp +++ b/src/osgPlugins/pfb/ReaderWriterPFB.cpp @@ -242,4 +242,4 @@ void ReaderWriterPFB::initPerformer() // now register with sgRegistry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_PFB_Proxy; +REGISTER_OSGPLUGIN(pfb, ReaderWriterPFB) diff --git a/src/osgPlugins/pic/ReaderWriterPIC.cpp b/src/osgPlugins/pic/ReaderWriterPIC.cpp index bf64a4e0a..e39796645 100644 --- a/src/osgPlugins/pic/ReaderWriterPIC.cpp +++ b/src/osgPlugins/pic/ReaderWriterPIC.cpp @@ -241,4 +241,4 @@ class ReaderWriterPIC : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_PIC_Proxy; +REGISTER_OSGPLUGIN(pic, ReaderWriterPIC) diff --git a/src/osgPlugins/png/ReaderWriterPNG.cpp b/src/osgPlugins/png/ReaderWriterPNG.cpp index f6caa5950..9278f6225 100644 --- a/src/osgPlugins/png/ReaderWriterPNG.cpp +++ b/src/osgPlugins/png/ReaderWriterPNG.cpp @@ -321,4 +321,4 @@ class ReaderWriterPNG : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_PNG_Proxy; +REGISTER_OSGPLUGIN(png, ReaderWriterPNG) diff --git a/src/osgPlugins/pnm/ReaderWriterPNM.cpp b/src/osgPlugins/pnm/ReaderWriterPNM.cpp index 1dac0365b..bc99efc6d 100644 --- a/src/osgPlugins/pnm/ReaderWriterPNM.cpp +++ b/src/osgPlugins/pnm/ReaderWriterPNM.cpp @@ -486,4 +486,4 @@ class ReaderWriterPNM : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_PNM_Proxy; +REGISTER_OSGPLUGIN(pnm, ReaderWriterPNM) diff --git a/src/osgPlugins/quicktime/ReaderWriterQT.cpp b/src/osgPlugins/quicktime/ReaderWriterQT.cpp index 2e997c46a..a79753882 100644 --- a/src/osgPlugins/quicktime/ReaderWriterQT.cpp +++ b/src/osgPlugins/quicktime/ReaderWriterQT.cpp @@ -459,4 +459,4 @@ public: // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_QT_Proxy; +REGISTER_OSGPLUGIN(quicktime, ReaderWriterQT) diff --git a/src/osgPlugins/rgb/ReaderWriterRGB.cpp b/src/osgPlugins/rgb/ReaderWriterRGB.cpp index c1f2b89bb..1d5f154e8 100644 --- a/src/osgPlugins/rgb/ReaderWriterRGB.cpp +++ b/src/osgPlugins/rgb/ReaderWriterRGB.cpp @@ -652,4 +652,4 @@ class ReaderWriterRGB : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_RGB_Proxy; +REGISTER_OSGPLUGIN(rgb, ReaderWriterRGB) diff --git a/src/osgPlugins/rot/ReaderWriterROT.cpp b/src/osgPlugins/rot/ReaderWriterROT.cpp index fe5de1b9d..7178f61b4 100644 --- a/src/osgPlugins/rot/ReaderWriterROT.cpp +++ b/src/osgPlugins/rot/ReaderWriterROT.cpp @@ -162,7 +162,7 @@ public: // Add ourself to the Registry to instantiate the reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_ROT_Proxy; +REGISTER_OSGPLUGIN(rot, ReaderWriterROT) /*EOF*/ diff --git a/src/osgPlugins/scale/ReaderWriterSCALE.cpp b/src/osgPlugins/scale/ReaderWriterSCALE.cpp index 33c3bb43e..c6a20adc4 100644 --- a/src/osgPlugins/scale/ReaderWriterSCALE.cpp +++ b/src/osgPlugins/scale/ReaderWriterSCALE.cpp @@ -172,7 +172,7 @@ public: // Add ourself to the Registry to instantiate the reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_SCALE_Proxy; +REGISTER_OSGPLUGIN(scale, ReaderWriterSCALE) /*EOF*/ diff --git a/src/osgPlugins/shp/ESRIShapeReaderWriter.cpp b/src/osgPlugins/shp/ESRIShapeReaderWriter.cpp index 8c8570e53..03d52a0e0 100644 --- a/src/osgPlugins/shp/ESRIShapeReaderWriter.cpp +++ b/src/osgPlugins/shp/ESRIShapeReaderWriter.cpp @@ -36,5 +36,4 @@ class ESRIShapeReaderWriter : public osgDB::ReaderWriter private: }; -osgDB::RegisterReaderWriterProxy g_esriShapeReaderWriter_Proxy; - +REGISTER_OSGPLUGIN(shp, ESRIShapeReaderWriter) diff --git a/src/osgPlugins/stl/ReaderWriterSTL.cpp b/src/osgPlugins/stl/ReaderWriterSTL.cpp index c7f9cf5c8..f6f18d092 100644 --- a/src/osgPlugins/stl/ReaderWriterSTL.cpp +++ b/src/osgPlugins/stl/ReaderWriterSTL.cpp @@ -81,7 +81,7 @@ private: // Register with Registry to instantiate the above reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_STL_Proxy; +REGISTER_OSGPLUGIN(stl, ReaderWriterSTL) /* diff --git a/src/osgPlugins/tga/ReaderWriterTGA.cpp b/src/osgPlugins/tga/ReaderWriterTGA.cpp index ddf6ac006..f613c0dac 100644 --- a/src/osgPlugins/tga/ReaderWriterTGA.cpp +++ b/src/osgPlugins/tga/ReaderWriterTGA.cpp @@ -530,4 +530,4 @@ class ReaderWriterTGA : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_TGA_Proxy; +REGISTER_OSGPLUGIN(tga, ReaderWriterTGA) diff --git a/src/osgPlugins/tgz/ReaderWriterTGZ.cpp b/src/osgPlugins/tgz/ReaderWriterTGZ.cpp index a32d319f4..03530a169 100644 --- a/src/osgPlugins/tgz/ReaderWriterTGZ.cpp +++ b/src/osgPlugins/tgz/ReaderWriterTGZ.cpp @@ -140,4 +140,4 @@ class ReaderWriterTGZ : public osgDB::ReaderWriter // now register with sgRegistry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_TGZ_Proxy; +REGISTER_OSGPLUGIN(tgz, ReaderWriterTGZ) diff --git a/src/osgPlugins/tiff/ReaderWriterTIFF.cpp b/src/osgPlugins/tiff/ReaderWriterTIFF.cpp index 576045a01..a6a0bf4aa 100644 --- a/src/osgPlugins/tiff/ReaderWriterTIFF.cpp +++ b/src/osgPlugins/tiff/ReaderWriterTIFF.cpp @@ -787,4 +787,4 @@ class ReaderWriterTIFF : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_TIFF_Proxy; +REGISTER_OSGPLUGIN(tiff, ReaderWriterTIFF) diff --git a/src/osgPlugins/trans/ReaderWriterTRANS.cpp b/src/osgPlugins/trans/ReaderWriterTRANS.cpp index c15e16ca1..ba2921910 100644 --- a/src/osgPlugins/trans/ReaderWriterTRANS.cpp +++ b/src/osgPlugins/trans/ReaderWriterTRANS.cpp @@ -159,7 +159,7 @@ public: // Add ourself to the Registry to instantiate the reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_TRANS_Proxy; +REGISTER_OSGPLUGIN(trans, ReaderWriterTRANS) /*EOF*/ diff --git a/src/osgPlugins/txf/ReaderWriterTXF.cpp b/src/osgPlugins/txf/ReaderWriterTXF.cpp index db4155d33..df61ad8b6 100644 --- a/src/osgPlugins/txf/ReaderWriterTXF.cpp +++ b/src/osgPlugins/txf/ReaderWriterTXF.cpp @@ -59,4 +59,4 @@ class ReaderWriterTXF : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_TXF_Proxy; +REGISTER_OSGPLUGIN(txf, ReaderWriterTXF) diff --git a/src/osgPlugins/txp/ReaderWriterTXP.cpp b/src/osgPlugins/txp/ReaderWriterTXP.cpp index c6bb3e70d..9bc861272 100644 --- a/src/osgPlugins/txp/ReaderWriterTXP.cpp +++ b/src/osgPlugins/txp/ReaderWriterTXP.cpp @@ -869,5 +869,5 @@ osg::Node* ReaderWriterTXP::getTileContent(const TXPArchive::TileInfo &info, con return tileGroup; } -osgDB::RegisterReaderWriterProxy g_txpReaderWriterProxy; +REGISTER_OSGPLUGIN(txp, ReaderWriterTXP) diff --git a/src/osgPlugins/vrml/ReaderWriterVRML2.cpp b/src/osgPlugins/vrml/ReaderWriterVRML2.cpp index f6a1e6260..0992521b1 100644 --- a/src/osgPlugins/vrml/ReaderWriterVRML2.cpp +++ b/src/osgPlugins/vrml/ReaderWriterVRML2.cpp @@ -70,7 +70,7 @@ class ReaderWriterVRML2 : public osgDB::ReaderWriter }; // Register with Registry to instantiate the above reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_VRML_Proxy; +REGISTER_OSGPLUGIN(vrml, ReaderWriterVRML2) osgDB::ReaderWriter::ReadResult ReaderWriterVRML2::readNode(const std::string &fileName, const Options*) const { diff --git a/src/osgPlugins/x/ReaderWriterDirectX.cpp b/src/osgPlugins/x/ReaderWriterDirectX.cpp index 76d7609c1..cdd16fa22 100644 --- a/src/osgPlugins/x/ReaderWriterDirectX.cpp +++ b/src/osgPlugins/x/ReaderWriterDirectX.cpp @@ -70,7 +70,7 @@ private: }; // Register with Registry to instantiate the above reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_DirectX_Proxy; +REGISTER_OSGPLUGIN(x, ReaderWriterDirectX) // Read node diff --git a/src/osgPlugins/xine/ReaderWriterXine.cpp b/src/osgPlugins/xine/ReaderWriterXine.cpp index 5216b7ab3..138a54906 100644 --- a/src/osgPlugins/xine/ReaderWriterXine.cpp +++ b/src/osgPlugins/xine/ReaderWriterXine.cpp @@ -352,4 +352,4 @@ class ReaderWriterXine : public osgDB::ReaderWriter // now register with Registry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_Xine_Proxy; +REGISTER_OSGPLUGIN(xine, ReaderWriterXine) diff --git a/src/osgPlugins/zip/ReaderWriterZIP.cpp b/src/osgPlugins/zip/ReaderWriterZIP.cpp index 3512b7380..0dc5b1eb0 100644 --- a/src/osgPlugins/zip/ReaderWriterZIP.cpp +++ b/src/osgPlugins/zip/ReaderWriterZIP.cpp @@ -122,4 +122,4 @@ class ReaderWriterZIP : public osgDB::ReaderWriter // now register with sgRegistry to instantiate the above // reader/writer. -osgDB::RegisterReaderWriterProxy g_readerWriter_ZIP_Proxy; +REGISTER_OSGPLUGIN(zip, ReaderWriterZIP)