|
From: Julian S. <ju...@op...> - 2020-07-15 19:16:43
|
I've not made any progress on the scenery loading problem, but i've made
the use of CompositeViewer configurable at runtime, which might simplify
investigations - the same binary can now be used for normal use and and
for investigating CompositeViewer behaviour.
Activate with:
--prop:bool:/sim/composite_viewer=true
I've put the code on a branch in my repository:
https://sourceforge.net/u/cgdae/flightgear/ci/CompositeViewer
I've tried to make it easy to verify that the default
non-compositeviewer behaviour is unchanged from a normal build - e.g.
just do:
git diff -w e7b357290
Unfortunately the property system seemed to be not set up early enough
to read in FGRenderer's constructor so we do a few calls of
fgGetNode("/sim/composite_viewer", true)->getBoolValue() at runtime. I
suspect they aren't called very frequently, in which case this branch
(minus the diagnostics changes probably) might be ok to push to next at
some point, so that it's easier to test/investigate things.
Thanks,
- Jules
On Mon, 13 Jul 2020 11:08:35 +0100
Julian Smith <ju...@op...> wrote:
> On Mon, 13 Jul 2020 10:17:57 +0100
> James Turner <ja...@fl...> wrote:
>
> > > On 13 Jul 2020, at 10:12, Julian Smith <ju...@op...> wrote:
> > >
> > > For now at least, i'm not actually trying to add any extra windows
> > > or views. If/when we do so, then WindowBuilder might well be the
> > > place for that, though i suspect it would need extending a fair
> > > amount.
> > >
> > > Instead, my first step was simply to try to change fgfs's use of a
> > > Viewer to a CompositeViewer with a single View; in theory this
> > > should result in no change to the existing behaviour, and would
> > > give us something on which we could add new view windows etc.
> > > Unfortunately it seems to mess up scenery loading, as discussed
> > > elsewhere in this thread.
> >
> > Yeah I recall from a longtime ago that we 'Cant Use' CompositeViewer
> > because of $reasons in the Effects code. Maybe the reason is simply
> > that it needs some work to move away from the single CameraGroup,
> > however. But knowing Tim and Mathias, I suspect if they thought it
> > was hard, then it was something a bit trickier than that.
>
> Sounds interesting.
>
> >
> > Is the WIP patch you shared earlier in the thread, the version to
> > test, if I want to poke around at this?
>
> Yes, that patch is the latest i have; i haven't made any more changes.
>
> I spent a while over the weekend trying to investigate what was
> happening, and the only thing i could show was that when loading, we
> call SceneryPager::PagerRequest::doRequest(SceneryPager*
> pager) which calls pager->requestNodeFile() which is an alias for
> osgDB::DatabasePager::requestNodeFile().
>
> With vanilla fgfs, this eventually results in a call to:
>
> simgear/simgear/scene/tgdb/ReaderWriterSTG.cxx:700:ReaderWriterSTG::readNode()
>
> But with the CompositeViewer changes, this never seems to happen.
>
> Presumably osgDB::DatabasePager::requestNodeFile() is making some sort
> of callback after it has (while running in a separate thread)
> loaded the requested file.
>
> Thanks,
>
> - Jules
>
--
http://op59.net
|