Re: [osg-users] Simple Loading Tutorial

2009-11-30 Thread Jean-Sébastien Guay

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 Guayjean-sebastien.g...@cm-labs.com
   http://www.cm-labs.com/
http://whitestar02.webhop.org/
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Simple Loading Tutorial

2009-11-28 Thread Sam Gidding
Thanks for that- I have tried to get the osg wiki FAQ/tutorials but the site 
has been down since Wednesday so having trouble getting to them at the moment.

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.

Thanks for your help to a newbie!

Sam.

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=20520#20520





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Simple Loading Tutorial

2009-11-28 Thread Paul Martz

Sam Gidding wrote:

Hi,
Thanks Paul, just a question - where you are loading "cow.osg" - how do i 
define where this is kept? Ive just got the pdf you linked so will have a read.


There is an OSG_FILE_PATH variable, but of course you can always just 
specify the full path.


FYI, in addition to the Quick Start Guide, there is also a FAQ on the 
OSG wiki that you might want to read through.

   -Paul

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Simple Loading Tutorial

2009-11-28 Thread Sam Gidding
Hi,
Thanks Paul, just a question - where you are loading "cow.osg" - how do i 
define where this is kept? Ive just got the pdf you linked so will have a read.


... 

Thank you!

Cheers,
Sam

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=20514#20514





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Simple Loading Tutorial

2009-11-27 Thread Paul Martz

Have you taken a look at the OSG Quick Start Guide and its examples?
http://www.skew-matrix.com/OSGQSG/index.html

Anyway, a bare-bones OSG example would be:

#include 
#include 
int main()
{
  osgViewer viewer;
  viewer.setSceneData( osgDB::ReadNodeFile( "cow.osg" ) );
  viewer.run();
}

Paul Martz
Skew Matrix Software LLC
_http://www.skew-matrix.com_ 
+1 303 859 9466



Sam Gidding wrote:

Hi all,


I've recently been trying to get my head around OSG, been trying the inbuilt 
examples and am not getting very far. I thought i'd check out the OSG tutorials 
but the site seems to have been down for the last few days now. Is there any 
specific example that I should be looking at just to learn how to load a model 
into OSG, as some seem a little more complex than this.

Hopefully that made sense, cheers
... 


Thank you!

Cheers,
s

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=20490#20490





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Simple Loading Tutorial

2009-11-27 Thread Sam Gidding
Hi all,


I've recently been trying to get my head around OSG, been trying the inbuilt 
examples and am not getting very far. I thought i'd check out the OSG tutorials 
but the site seems to have been down for the last few days now. Is there any 
specific example that I should be looking at just to learn how to load a model 
into OSG, as some seem a little more complex than this.

Hopefully that made sense, cheers
... 

Thank you!

Cheers,
s

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=20490#20490





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org