Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Changes

Jump to: navigation, search

FlightGear Headless

2,635 bytes added, 19:09, 10 August 2017
FlightGear Headless
= FlightGear Headless =
{{Main article|Supporting multiple renderers}}
 
there is no document listing the minimum set of stable features. If someone wants to write one, they can do it, but I guess they won’t volunteer to test release candidates against it; indeed getting people to even run them has been a struggle.<ref>{{cite web
|url = https://sourceforge.net/p/flightgear/mailman/message/35990557/
|title = <nowiki> Re: [Flightgear-devel] carrier features: is there any modification ,
your policy related ? </nowiki>
|author = <nowiki> James Turner </nowiki>
|date = Aug 10th, 2017
|added = Aug 10th, 2017
|script_version = 0.40
}}</ref>
 
with the new test framework it should be possible to add tests for carrier start, as I already did to ensure runway selection with METAR. Indeed the position init code is a very good candidate for testing this way since we broken different aspects (parking position startup, WXR runway selection, the carrier, probably some more things<ref>{{cite web
|url = https://sourceforge.net/p/flightgear/mailman/message/35990557/
|title = <nowiki> Re: [Flightgear-devel] carrier features: is there any modification ,
your policy related ? </nowiki>
|author = <nowiki> James Turner </nowiki>
|date = Aug 10th, 2017
|added = Aug 10th, 2017
|script_version = 0.40
}}</ref>
 
The original FG scene graph design is based on rigid assumptions of the ordering of the sequence of events for start up and shut down. Branch management is highly inconsistent, and is scattered all over the flightgear and simgear codebases. But it worked perfectly due to the fixed event sequences. The new subsystem design however brings in a much more flexible design, whereby systems can be dynamically turned on, turned off, restarted, initialised, reinitialised, etc. This is essential for enabling rebooting, and allows for custom FlightGear usage of only a small subset of systems and for '''a headless mode'''. The OSG+subsystem breakage occurred once the scene manager subsystem was fully converted to the new design. The OSG scene graph root is created at the start of FGScenery::init(). With the subsystem design, the scene graph root may not be present when other flightgear/simgear code paths are called to create, manage, or destroy the various scene graph branches.<ref>{{cite web
}}
</ref>
 
<syntaxhighlight lang="diff">
diff --git a/src/Main/options.cxx b/src/Main/options.cxx
index db5d84d..fb63dd1 100644
--- a/src/Main/options.cxx
+++ b/src/Main/options.cxx
@@ -1797,6 +1797,7 @@ struct OptionDesc {
{"prop", true, OPTION_FUNC | OPTION_MULTI, "", false, "", fgOptSetProperty},
{"load-tape", true, OPTION_FUNC, "", false, "", fgOptLoadTape },
{"developer", true, OPTION_IGNORE | OPTION_BOOL, "", false, "", nullptr },
+ {"enable-headless", false, OPTION_BOOL, "/sim/startup/headless-mode", true, "",0 },
{0}
};
diff --git a/src/Viewer/WindowBuilder.cxx b/src/Viewer/WindowBuilder.cxx
index f4d3c33..a1ffb84 100644
--- a/src/Viewer/WindowBuilder.cxx
+++ b/src/Viewer/WindowBuilder.cxx
@@ -149,6 +149,12 @@ void WindowBuilder::makeDefaultTraits(bool stencil)
SG_LOG(SG_VIEW,SG_DEBUG,"Using initial window size: " << w << " x " << h);
}
}
+bool headless = fgGetBool("/sim/startup/headless-mode", false);
+if (headless) {
+ SG_LOG(SG_VIEW, SG_ALERT, "Headless view required: rendering window to pbuffer");
+ traits->pbuffer = true;
+} // enable headless
+
}
} // of namespace flightgear
</syntaxhighlight>
 
For reference, to disable the window. It's the last thing before the return statement in WindowBuilder::makeDefaultTraits(bool stencil):
== Milestones ==
* allow FlightGear to be run without creating a visible GUI window, i.e. in "headless" mode, using a --headless parameter {{PendingDone}}
* allow FlightGear to be optionally compiled and run without any sound support/dependencies (OpenAL) {{Done}}
* allow replay buffers to be saved to a file in order to be replayed for automated test/demo flights, so that users can share saved replay buffers when reporting a bug {{Done}} (supported via the flight recorder subsystem)
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg29907.html
* http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg02028.html
 
== References ==
{{Appendix}}
[[Category:Core development projects]]
18,174
edits

Navigation menu