CompositeViewer support: Difference between revisions

Jump to navigation Jump to search
m
→‎Implementation: More de-quoting
m (→‎Implementation: More de-quoting)
Line 113: Line 113:
== Implementation ==
== Implementation ==
{{See also|Canvas View Camera Element}}
{{See also|Canvas View Camera Element}}
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.


{{FGCquote
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). <br/>
  |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.
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=227929#p227929
    |title=<nowiki>Re: How to create 2 master camera and 2 views  in flightgear</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Tue Dec 23</nowiki>
  }}
}}
 
{{FGCquote
  |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). <br/>
<br/>
<br/>
you'll find dozens of references to something like '''globals-&gt;get_view_mgr()''' in quite a few places demonstrating the underlying assumption.<br/>
you'll find dozens of references to something like '''globals-&gt;get_view_mgr()''' in quite a few places demonstrating the underlying assumption.<br/>
Line 130: Line 121:
<br/>
<br/>
Once that is working, it comes down to trial &amp; 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 &amp; 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.
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=227929#p227929
    |title=<nowiki>Re: How to create 2 master camera and 2 views  in flightgear</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Tue Dec 23</nowiki>
  }}
}}


{{FGCquote
 
  |If you're interested in seriously pursuing this, you'll want to look at the CompositeViewer example in the OSG source tree, and read up on discussions about CompositeViewer coding on the OSG list.<br/>
If you're interested in seriously pursuing this, you'll want to look at the CompositeViewer example in the OSG source tree, and read up on discussions about CompositeViewer coding on the OSG list.<br/>
For the SG/FG side of things, the aforementioned wiki articles should be pretty comprehensive already - and then you'll probably want to get in touch with fellow FG developers using the FG developers mailing list.  
For the SG/FG side of things, the aforementioned wiki articles should be pretty comprehensive already - and then you'll probably want to get in touch with fellow FG developers using the FG developers mailing list.  
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=227929#p227929
    |title=<nowiki>Re: How to create 2 master camera and 2 views  in flightgear</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Tue Dec 23</nowiki>
  }}
}}


{{FGCquote
Depending on your degree of familiarity with OpenGL/OSG coding, you could have a basic version of this running within 3-4 weekends - but I guess it might take at least another 4-6 weeks of spare time coding to actually tease out all the hard-coded assumptions about having a single main view only.<br/>
  |Depending on your degree of familiarity with OpenGL/OSG coding, you could have a basic version of this running within 3-4 weekends - but I guess it might take at least another 4-6 weeks of spare time coding to actually tease out all the hard-coded assumptions about having a single main view only.<br/>
<br/>
<br/>
The other issue is getting your work reviewed, i.e. committed upstream, which is known to be a particularly long, tedious and painful  process - especially for anything non-trivial that may possibly break critical parts of the simulator - which is why it's a good idea to start networking early on, i.e. by discussing this work way ahead of time and getting people involved to provide feedback - which may involve working through a gitorious topic branch.<br/>
The other issue is getting your work reviewed, i.e. committed upstream, which is known to be a particularly long, tedious and painful  process - especially for anything non-trivial that may possibly break critical parts of the simulator - which is why it's a good idea to start networking early on, i.e. by discussing this work way ahead of time and getting people involved to provide feedback - which may involve working through a gitorious topic branch.<br/>
<br/>
<br/>
The underlying PagedLOD in SimGear work is generally understood to be vital for other parts of the simulator, so anything related to this should also be appreciated.
The underlying PagedLOD work in SimGear work is generally understood to be vital for other parts of the simulator, so anything related to this should also be appreciated.
  |{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=227929#p227929
    |title=<nowiki>Re: How to create 2 master camera and 2 views  in flightgear</nowiki>
    |author=<nowiki>Hooray</nowiki>
    |date=<nowiki>Tue Dec 23</nowiki>
  }}
}}


== Related ==
== Related ==

Navigation menu