Hello Alexander,

First of all, don't worry about your English so much it is very good and much better than my German! :-)

Second, I would like to request that in the future, you ask any OSG-related questions directly on the osg-users mailing list or on the forum at forum.openscenegraph.org. That way, others can also reply and other people who have the same problems/questions as you will benefit from the replies.

So, on to your questions. You've got the first steps right, though for the basic dependencies of OSG (libpng, zlib, libjpeg, freetype etc.) you could have downloaded the appropriate 3rdparty package from openscenegraph.org and saved a bit of time (I assume you downloaded these libraries yourself individually, though you don't mention that specifically).

Now i use this code to load a wrl-File:   osg::ref_ptr<osg::Node> node = 
osgDB::readNodeFile("sample.wrl");
This file from the tutorial is properly loaded, but if i replace the filename 
i.e. with Anchor.wrl (a file from the openVRML examples) no scene is displayed.

I don't know these files specifically, but I think if you increase the OSG verbosity level it should tell you if there was any error while loading the file you asked it to load. To increase the verbosity, you can do on the command prompt:

set OSG_NOTIFY_LEVEL=DEBUG

or in your program's code, at the beginning of the main(), you could do:

osg::setNotifyLevel(osg::DEBUG_FP);

This will print lots of information about where OSG finds plugins, which OpenGL extensions are available, etc. and in all that information there should hopefully be a few messages from the OpenVRML loader telling you why the file couldn't load properly.

It's possible the file contains some VRML that is not read/interpreted by the OSG VRML loader. I think the VRML loader only uses a subset of VRML and ignores the rest. Others will know more about this, I haven't done much with the VRML loader except compile it...

And should i use a newer version of openVRML? Then how should i set up my 
system properly. (i already tried to compile the newest Version of OpenVRML 
without success).

I think the OSG VRML loader cannot work with newer versions of OpenVRML at all, though again others will be able to give you more details. If this is a problem for you then you may want to get familiar with the OSG VRML loader's code and try to improve it yourself, contributing your changes back to OSG afterwards!

My final task is to load wrl-Files and check if the wrl-file-standard is 
correct. After that the Scene is used in OSG by other people.

You may have to work a bit on the VRML loader if that's your goal, since as I said I think it only loads a subset of VRML at present.

Hope this helps,

J-S


On 10/11/2010 6:11 AM, Alexander Moeller wrote:
Hi!

My Name ist Alexander Moeller and i am from Germany (so please forgive
my bad english). And i'm new to OSG. I programmed with C++ before, but
not with such big librarys i have to compile by myself. I have same
questions about OpenSceneGraph espacially reading .wrl Files. It will be
nice if you can help me to solve these problems.

I'm using Windows XP with Visual Studio Express 2008
Here are the steps i've done so far:

-Downloading the source of OSG 2.8.3
-Build the solution without any errors
-Downloading OpenVRML 0.14.3 an installing it by following the
instruction of this tutorial
http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/VisualStudio/VisualStudioPlugins

-CMake tells some errors of not finding pnglib, jpeg, zlib
-Donwloading this missing librarys, installing them and telling CMake
the correct Pathes.
-Building the solution of OSG without errors.

Now i use this code to load a wrl-File: osg::ref_ptr<osg::Node> node =
osgDB::readNodeFile("sample.wrl");
This file from the tutorial is properly loaded, but if i replace the
filename i.e. with Anchor.wrl (a file from the openVRML examples) no
scene is displayed.

So where is my mistake?
And should i use a newer version of openVRML? Then how should i set up
my system properly. (i already tried to compile the newest Version of
OpenVRML without success).

My final task is to load wrl-Files and check if the wrl-file-standard is
correct. After that the Scene is used in OSG by other people.

With regards
Alexander Moeller

PS: You can correct this text if you like. So my english will improve. :)
______________________________________
Lebe...und werde stärker! (Methos)



--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to