On Mon, Aug 13, 2012 at 7:40 PM, James Turner <zakal...@mac.com> wrote: > > On 11 Aug 2012, at 18:21, Tim Moore wrote: > >> This is what osg::PagedLOD does, though we often forget that the >> paging of the higher LODs is triggered in the cull phase. >>> I can't recall what scene modifications are / are not permitted inside a >>> cull-callbacl, however. >> You would want to let the OSG loader mechanism and the database pager >> do their thing. Geometry doesn't have to be loaded from files... > > Could you outline the pieces of machinery needed for this to work? Given that > we already create LOD nodes, I assume it's switching those to be PagedLOD, > and setting the filename / extension / reader-writerOptions to some magic, > and creating a loader which matches that, which creates the buildings > geometry. That is how PagedLODs work, without too much magic. Some data will need to be passed to the loader. A low-tech way to do that is to encode parameters in the "file name" passed to the loader, but in this case you will probably need access to the scenery to place buildings. You can subclass the DatabaseOptions object stored in the PagedLOD to store whatever you need.
You would choose a file extension that doesn't correspond to a real file type, and then register a loader with that extension. > > If you could point to an example of such a loader, I'm pretty sure Stuart or > I could adapt his code. > > James We register loading callbacks using both osgDB mechanisms and some SimGear goo to control optimizations, construction bvh trees, etc. grep for ModelRegistryCallbackProxy. For the body of the loader, there is nothing special; just don't read any files. Tim > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Flightgear-devel mailing list > Flightgear-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/flightgear-devel ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel