Hello Sam,

When I run the code to load a simple object (that you supplied above) with a 
direct path, I get no errors but osgviewer seems to load nothing, just the 
default blue background with no model. Ive tried different .osg and .obj files 
but no luck.

If you're on Windows, make sure you specify the full path with slashes ("/") instead of backslashes, or escape the backslashes by doubling them ("\\"). In a string, a backslash starts an escape sequence (like \n for newline, etc.) so if you specify a path like C:\models\bob.obj the compiler will not be able to find it because it will interpret \m and \b as escape sequences. But using C:/models/bob.obj or C:\\models\\bob.obj will work.

Also, make sure you have the plugin to read your model's file format. Set the notify level higher (set OSG_NOTIFY_LEVEL=DEBUG) to see what's going on - OSG will print out whether it can find and open the plugin to read your model, and then whether it can read the model itself, in the console (stdout and stderr).

Hope this helps,

J-S
--
______________________________________________________
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