20,741
edits
m (→Implementation: More de-quoting) |
|||
| Line 115: | Line 115: | ||
Most of the required PagedLOD work (involving the tile manager in SimGear) has been recently completed - so there isn't too much missing in terms of refactoring on the SG side - primarily, you'll want to look at the "view manager" in $FG_SRC/Viewer and identify "singleton" use-cases there. | Most of the required PagedLOD work (involving the tile manager in SimGear) has been recently completed - so there isn't too much missing in terms of refactoring on the SG side - primarily, you'll want to look at the "view manager" in $FG_SRC/Viewer and identify "singleton" use-cases there. | ||
First of all, you'll have to replace the existing viewer with a single CompositeViewer - FlightGear's view manager is property-controlled, and there's currently the hard-coded assumption that there's only ever a single active MAIN view (other supported views are SLAVE views, i.e. slaved to the main view). | First of all, you'll have to replace the existing viewer with a single CompositeViewer - FlightGear's view manager is property-controlled, and there's currently the hard-coded assumption that there's only ever a single active MAIN view (other supported views are SLAVE views, i.e. slaved to the main view). | ||
you'll find dozens of references to something like '''globals->get_view_mgr()''' in quite a few places demonstrating the underlying assumption.<br/> | you'll find dozens of references to something like '''globals->get_view_mgr()''' in quite a few places demonstrating the underlying assumption.<br/> | ||
Personally, I would just change the function's signature and add an optional index, defaulting it to '''0''' - that way, you won't have to touch all the places wanting to have the single main view. | Personally, I would just change the function's signature and add an optional index, defaulting it to '''0''' - that way, you won't have to touch all the places wanting to have the single main view. | ||
For starters, it would also make sense to disable scenery/terrain loading entirely, just to have something really basic working and then take it from there (i.e. use --disable-scenery, or refer to the [[Minimal Startup Profile]]). | |||
Once that is working, it comes down to trial & error, i.e. testing multiple independent viewers, each having their own instance/access to the tile manager - the work itself is well understood and pretty straightforward, and pretty much all core developers agree that this is a worthwhile thing to aim for - it's just not currently being prioritized or being worked on by anybody else as far as I am aware. | Once that is working, it comes down to trial & error, i.e. testing multiple independent viewers, each having their own instance/access to the tile manager - the work itself is well understood and pretty straightforward, and pretty much all core developers agree that this is a worthwhile thing to aim for - it's just not currently being prioritized or being worked on by anybody else as far as I am aware. | ||