I'm new to OpenSceneGraph, and now I met a problem. When trying out a simple skybox program, it gives
Warning: Could not find plugin to read objects from file "xxx.jpg"
when calling osgDB::readImageFile()
, and I can only see a white screen;
Then I tried using osgviewer --image xxx.jpg
in cmd, it works well and I can see the picture displayed on the screen.
What's the possible reason for this and what can I do? Thank you!
I solved my own problem. The reason is that I mixed up two versions of OpenSceneGraph, one is compiled with VS2012 without JPEG plugin and the other is compiled with VS2010 with JPEG plugin. The OSG compiled with VS2010 will not work under VS2012. Now I've found another OSG compiled with VS2012 with all necessary plugins included and the problem is solved.