Hi Johannes,

Have a look at the osg2cpp example, and also have a look at how the
shaders are included in src/osgVolume/Shaders/*.cpp, these .cpp's are
directly generated from .glsl files.

Robert.

On 6 February 2013 13:39, Johannes Scholz <[email protected]> wrote:
> Hi,
>
> is there an OSG-way to compile resources directly into your OSG projects, so 
> that for example you would not have to load your e.g. axes.osg from file 
> during application startup?
>
> What would be the best way to do this at the moment?
>
> Actually I am thinking about a generic way to store osg::Object's in a 
> generated .cpp file integrating that data into some Singleton.
>
> osg::ref_ptr<osg::Object> 
> osgDB::Resources::instance()->getObjectResource(":/some-label/object.osgt");
> osg::ref_ptr<osg::Node> 
> osgDB::Resources::instance()->getNodeResource(":/some-label/axes.osgt");
> osg::ref_ptr<osg::Image> 
> osgDB::Resources::instance()->getImageResource(":/some-label/my_picture.jpg");
>
> Would that be a nice add-on to OSG or is it just a stupid idea because 
> there's already a cool way to do this?
>
> Thank you!
>
> Cheers,
> Johannes
>
> ------------------------
> ---
> Johannes Scholz
> Software Engineer
> P3 Voith Aerospace GmbH, Bremen, Germany
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=52425#52425
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to