Alexandre Amalric wrote:
I think what Paul meant is that you'd have to modify the plugin to
only load the texture when it encounters a reference to it in the
traversal of the main document. Currently, it loads the texture
palette at the beginning. You'd have to modify it in some way to delay
the actual texture load until a primary record references it.
I think about this solution since the begining but I'm not sure that
those modifications won't bring errors when using the plugin in a
normal way.
We're talking about a fundamental change to the plugin, so this would
become the "normal way" :-)
Maybe that the original author from this plugin can tell me if the
texture palette record has to be read or not, so we may decide to skip it.
I'm not the original author (Paul is, I believe), but I'm pretty
familiar with OpenFlight. You definitely need to refer to the texture
palette because that's the only place where the filenames for the
textures are stored. You don't necessarily have to load the entire
texture palette, though. You only need to load a given texture if there
is a face or mesh that uses it. This is what I was talking about above.
You have the choice of modifying the OSG OpenFlight plugin to do this at
load time, you can use the OpenFlight API to create an application to do
it offline, or you can refer to the OpenFlight spec and do your own
parsing and modifications as Nick suggested. They're all essentially
the same task, just three different ways to get it done.
--"J"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org