I am trying to load a PNG image as
osg::ref_ptr<osg::Image> image1 (osgDB::readImageFile("C:\\Users\\Tufan\\Desktop\\wood.png"));
Thank you!
Cheers,
Tufan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22209#22209
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Do you have the png plugin built? Check your osgPlugins-version/
directory for which osgdb_*.dll you have. If you don't have it you'll
need to grab the 2rd party dependencies compile the OSG from source.
See the documentation on compiling the OSG on the wiki.
Robert.
I have osgdb_png.dll in C:\Users\Tufan\Desktop\New Folder\OpenSceneGraph-2.8.2\bin\osgPlugins-2.8.2 directory.
But still cannot load PNG.
Thank you!
Cheers,
Tufan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22212#22212
On Thu, Jan 7, 2010 at 11:28 AM, Tufan Taş <tas....@gmail.com> wrote:
> I have osgdb_png.dll in C:\Users\Tufan\Desktop\New Folder\OpenSceneGraph-2.8.2\bin\osgPlugins-2.8.2 directory.
> But still cannot load PNG.
Check that this OpenSceneGraph/bin directory is on your path.
Robert.
Yes C:\Users\Tufan\Desktop\New Folder\OpenSceneGraph-2.8.2\bin is in my path. I don't get any error messages I can load bmp image but cannot png. I don't know why.
Thank you!
Cheers,
Tufan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22214#22214
On Thu, Jan 7, 2010 at 1:59 PM, selman duatepe <selman...@gmail.com> wrote:
> Check also that C:\Users\Tufan\Desktop\New
> Folder\OpenSceneGraph-2.8.2\bin\osgPlugins-2.8.2 directory is in your path.
I would not advice this, as this can cause problems later on when you
might start mixing different OSG versions on the same machine and have
paths pick up the wrong set of plugins which can cause a crash. The
osgPlugins-version directory is deliberately versioned to avoid this
mixing versions issue, and osgDB knows about this scheme so will
automatically append the osgPlugin-version directory so there is no
need to add anything more than the parent directory where the plugins
are.
A better thing to look at next is whether the plugin is loading for
this you can enable verbose debugging to see whether the plugin has
been located and loaded. In a terminal type:
set OSG_NOTIFY_LEVEL=DEBUG
runmyapp mymodel.osg
Then look at the console output, in particular look for notifications
about plugin loading.
Robert.
> Yes C:\Users\Tufan\Desktop\New Folder\OpenSceneGraph-2.8.2\bin is in my path. I don't get any error messages I can load bmp image but cannot png. I don't know why.
The difference is that the BMP plugin does not need any additional DLLs
(other than the plugin itself of course) but the PNG plugin does
(something like libpng13.dll). So I suspect you don't have this DLL.
This DLL is part of the 3rdParty dependencies, so you either have it
already (if you compiled OSG from source) or you need to download the
appropriate 3rdParty dependencies for your version of Visual Studio. See
this page:
http://www.openscenegraph.org/projects/osg/wiki/Downloads/Dependencies
You could then copy all the DLLs from your 3rdparty\bin folder to your
OpenSceneGraph-2.8.2\bin folder so it will be found when osgDB loads the
PNG plugin.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-seba...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22230#22230
> I have tried all of your comments add the path of plugins bin but not worked also I have previously downloaded 3rdparty dependencies coppied libpng13.dll into my osg bin but still not working. Do you have any more comments I am really stucked
Try setting OSG_NOTIFY_LEVEL=DEBUG before running, it will print lots of
info to the console and might help pinpoint the problem. Also try
DependencyWalker (google it) if that doesn't help.
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-seba...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
Cheers,
Tufan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22234#22234
Cheers,
Tufan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22238#22238
osg::Node* mapNode;
mapNode = osgDB::readNodeFile("C:\\Users\\Tufan\\Desktop\\buffs.flt");
osg::Group* root = new osg::Group();
root->addChild(mapNode);
osgViewer::Viewer viewer;
viewer.setSceneData( root );
viewer.setUpViewInWindow(100, 100, 640, 480);
viewer.run();
Cheers,
Tufan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22239#22239
void viewWindow()
{
osg::Node* mapNode = osgDB::readNodeFile("C:\\Users\\Tufan\\Desktop\\buffs.flt");
//mapNode = osgDB::readNodeFile("C:\\Users\\Tufan\\Desktop\\wood.png");
osg::Group* root = new osg::Group();
root->addChild(mapNode);
osgViewer::Viewer viewer;
viewer.setSceneData( root );
viewer.setUpViewInWindow(100, 100, 640, 480);
viewer.run();
}
This is the function in my dll. I use it in my c# project. Other isssues work fine like viewing a png image but it does not work for flt.
Thank you!
Cheers,
Tufan
Cheers,
Tufan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22242#22242
Ignore any other advice, and do this before you do anything else. OSG has prodigious
error reporting if you set NOTIFY_LEVEL to DEBUG. It will usually tell you exactly what's
going on. If you still can't figure out what it going wrong, use pastebin.ca or something
to put up a copy of the DEBUG output for us to look at. (Don't attach it to your e-mail,
sometimes that can mess up formatting).
--
Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
Thanks for your replies I just rebuil my OSG and the problem is solved.
Cheers,
Tufan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=22276#22276