Hi Sukender, On Thu, Jan 14, 2010 at 3:52 PM, Sukender <[email protected]> wrote: > Do you think there may be a solution (such as splitting/inlining calls) in my > current implementation to make the proxy loading an acceptable overhead?
The best solutions are the ones that don't spill out over everywhere and don't involve checking flags for conditional paths for conditional paths that are only used a fraction of the time. If one could localise everything into a Image::validate() call that is called before access the details of an osg::Image then we might be getting nearer. However, this still doesn't address the issue of stalling a graphics thread due to a file read. > And/or do you want me to propose another submission with #if directives to > make this option available only to those who want? This could be a > "solution", don't you think? I can't bu sure of how users could use it, but I > think some users may find purely rendering-oriented applications to such a > code. Maybe that may help some. Jikes, #if'd are worse than if() blocks for maintainability either for me or members of the community trying to work out what features are enabled when. Sometimes #if blocks are the best solution for particular problems - such as cross platform support, but for this type of feature it not something I would consider appropriate. > I actually do some processing with big models, and AFTER that I handle them > as "usual". But having "nodes callbacks + chunks" sounds fine. I'll keep all > your advice for further reference! The node callback approach will certainly work for runtime support. For the database processing approach perhaps something else would be appropriate, such as the NodeVisitor that you'd use to do the chunking could keep the list of blank Images, or perhaps just detect the blank Image during the traversal and have this read the image real and copy the data across i.e. fill in the blanks as it goes. A NodeVistor that traverses through a subgraph, find all the StateSet's and then the Texture's within this, then the Image's attached, and then checks the status of the Images (i.e. image.data() == NULL) shouldn't be too hard to put together. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
