Hi Roger,
The osgDB::Registry::ReadFileCallback can be used to intercept all readImage
or readNode calls. Have a search through the archives for disucssion about
it.
Robert.
On Mon, Apr 13, 2009 at 11:27 AM, Roger edl7...@hotmail.com wrote:
Hi,
I am a developer of OSG.And I am trying to simulate a stand of a forest. My
tree model is created in MultiGen Creator. Since there will be many many
trees in a stand (about 6trees or so),and each trees has it own
height\under branch height\canopy diameter etc,I develped a method to
transform the loaded tree model to given parameter restricted model. This
transformation can't be acomplishied just using transform node, so I just
change the vertex of each goede.This means that Except the vertex of each
target model are different, while the texture are the same.
Now the problem is that I would have to read the origin model many many
times,and transform it to target model. And in memory there are many many
textures are the same.
Is it possible to redrirct all readimage call to a customed method, which I
could apply sigleton pattern and assure the same image file only read once
in a application instance? Since flt file are readed with plugin, so I just
don't know how to realize it in a nice and neat way.
I will be very appreciated if you can give me some clue.
Thank you.
--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=10155#10155
___
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