[osg-submissions] Bug in osgPlugins logo display solved
Robert Osfield
robert.osfield at gmail.com
Fri Jun 6 06:55:50 PDT 2008
Thanks Mathieu, fix now merged and submitted to SVN.
On Tue, Jun 3, 2008 at 2:36 PM, Mathieu MARACHE
<mathieu.marache at gmail.com> wrote:
> Hi,
>
> I have made the logo plugin work again (a simple copy and paste problem) and
> added the path of the logo file (if not empty) to the data file path in
> order to be able to find images relatively.
>
> 8<----------------
>
> Index: src/osgPlugins/logo/ReaderWriterLOGO.cpp
> ===================================================================
> --- src/osgPlugins/logo/ReaderWriterLOGO.cpp (révision 8402)
> +++ src/osgPlugins/logo/ReaderWriterLOGO.cpp (copie de travail)
> @@ -98,8 +98,8 @@
> {
> vx = viewport->x();
> vy = viewport->y();
> - vx = viewport->width();
> - vy = viewport->height();
> + vw = viewport->width();
> + vh = viewport->height();
> }
>
> glMatrixMode( GL_PROJECTION );
> @@ -161,6 +161,8 @@
> osg::Image *image = osgDB::readImageFile( name.c_str() );
> if( image != NULL )
> logos[pos].push_back( image );
> + else
> + osg::notify(osg::WARN)<< "Logos::addLogo image file not
> found : " << name << ".\n";
> }
>
> osg::Viewport *getViewport() { return viewport; }
> @@ -209,8 +211,15 @@
> if (fileName.empty())
> return ReadResult::FILE_NOT_FOUND;
>
> - osg::notify(osg::INFO)<< "ReaderWriterLOGO::readNode(
> "<<fileName.c_str()<<" )\n";
> + osg::notify(osg::INFO)<< "ReaderWriterLOGO::readNode(
> "<<fileName.c_str()<<" )\n";
>
> + std::string filePath = osgDB::getFilePath(fileName);
> + if (!filePath.empty()) {
> + osg::notify(osg::DEBUG_INFO)<< "Adding : " << filePath << "
> to the file data path\n";
> + osgDB::getDataFilePathList().push_back(filePath);
> + }
> +
> +
> osg::Geode *geode = new osg::Geode;
>
> unsigned int screen = 0;
>
> ----------------->8
>
> HTH
>
> --
> Mathieu
> _______________________________________________
> osg-submissions mailing list
> osg-submissions at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
>
More information about the osg-submissions
mailing list