Hi Alejandro,
Just to reiterate what J-S said.
The oceanExample.exe should be in the same directory as the root resources
something like this:
Directory_name\oceanExample.exe
Directory_name\resources\shaders
Directory_name\resources\textures
Directory_name\resources\island
If you wish to change where the resources are loaded from you can add new data
path to the registry within the application.cpp in oceanExample and recompile.
Preferably at the top of main().
i.e.
osgDB::Registry::instance()->getDataFilePathList().push_back("resources/island");
That *should* solve that one. Let me know if it doesn't.
> Why it cannot change type of Shader?
I notice you're using osg 2.9.3, I've tested osgOcean against 2.8. I suspect
that the registry in 2.9.3 can now differentiate between the shader extensions
.frag and .vert and assigns the shader type automatically. Perhaps Robert could
shout out on this one. Either way in osg2.8 at least that doesn't cause the
shader to fail but rather flag a warning. I'll try and dig around in the osg
2.9.3 source to see if this is the case.
Regards,
Kim.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Jean-Sébastien
Guay
Sent: 16 June 2009 03:46
To: OpenSceneGraph Users
Subject: Re: [osg-users] osgOcean 1.0 (LGPL) Released
Hi Alejandro,
> But apparently it doesn't find the instaled resources, neither in the
> bin directory (instaled there by default) nor in the OSG data
> directory (where osgDB find things). Only finds them if I run it from
> the source directory.
Not sure about this, I think the easiest way right now is to put
resources in a "resources" subdirectory of your current directory from
which you run the executable. So you would have the executable, and in
the same directory you'd have resources/shaders, resources/textures,
resources/islands.
This is configurable if you're developing an app with osgOcean. Just add
the path to the resources directory to the osgDB search paths and it
will find its resources.
> I got these output in the console:
>
> Building scene...
> . Loading cubemaps: 0.321772s
> . Generating ocean surface: 0.000128s
> . Creating ocean scene: 0.001092s
> . Loading islands: cannot change type of Shader
> cannot change type of Shader
> 0.08298s
> . Setting up lighting: 7.6e-05s
> complete.
> Time Taken: 0.406433s
>
> Why it cannot change type of Shader?
Not sure what would cause this message. I'll have a look when I get back
to my desk tomorrow morning.
> I'm running it in a Debian GNU/Linux 2.6.26, 8GB RAM, OSG 2.9.3, NV
> Quadro FX 1700.
Thanks for testing, and keep us informed of any cool things you do with
osgOcean! :-)
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*****************************************************************************************
To view the terms under which this email is distributed, please go to
http://www.hull.ac.uk/legal/email_disclaimer.html
*****************************************************************************************
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org