CompositeViewer support: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 13: Line 13:
     |title=<nowiki>How to create 2 master camera and 2 views  in flightgear 3.0</nowiki>
     |title=<nowiki>How to create 2 master camera and 2 views  in flightgear 3.0</nowiki>
     |author=<nowiki>Divi</nowiki>
     |author=<nowiki>Divi</nowiki>
    |date=<nowiki>Tue Dec 23</nowiki>
  }}
}}
{{FGCquote
  |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/>
you'll find dozens of references to something like '''globals-&gt;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.<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.
  |{{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/>
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/>
<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/>
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.
  |{{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>
     |date=<nowiki>Tue Dec 23</nowiki>
   }}
   }}
Line 118: Line 72:
these parameters. The you would be able to load and use these clouds from fgviewer and see isolated statistics about the draw/cull whatever steps. This  
these parameters. The you would be able to load and use these clouds from fgviewer and see isolated statistics about the draw/cull whatever steps. This  
might also help in understanding what is going on.<ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg35147.html|title=<nowiki>Re: [Flightgear-devel] Trying to get more performance out of the 3D clouds!</nowiki>|author=Mathias Fröhlich|date=Wed, 07 Dec 2011 22:16:45 -0800}}</ref>|Mathias Fröhlich}}
might also help in understanding what is going on.<ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg35147.html|title=<nowiki>Re: [Flightgear-devel] Trying to get more performance out of the 3D clouds!</nowiki>|author=Mathias Fröhlich|date=Wed, 07 Dec 2011 22:16:45 -0800}}</ref>|Mathias Fröhlich}}
== Implementation ==
{{FGCquote
  |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/>
you'll find dozens of references to something like '''globals-&gt;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.<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.
  |{{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/>
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/>
<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/>
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.
  |{{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