Changes

Jump to: navigation, search

FlightGear Headless

693 bytes added, 15:48, 3 August 2016
Motivation
}}
{{FGCquote== Proof of concept (patch) == |the The main camera is created in CameraGroup::buildCamera and a pbuffer is allocated when you set osg::GraphicContext::Traits.pbuffer to true. These traits are available in buildCamera because we set width and height there. For debugging purpose, you can add a line like
<syntaxhighlight lang="cpp">window->gc->getTraits()->pbuffer=true;
</syntaxhighlight>at the end of this function. |<ref>{{cite web |url=http://forum.flightgear.org/viewtopic.php?p=179978#p179978
|title=<nowiki>Re: run without osg</nowiki>
|author=<nowiki>FredB</nowiki>
|date=<nowiki>Sun Mar 24</nowiki>
}}
</ref> For reference, to disable the window. It's the last thing before the return statement in WindowBuilder::makeDefaultTraits(bool stencil):<syntaxhighlight lang="cpp"> char* fg_gui = getenv("FG_GUI"); if (fg_gui != NULL && strcmp(fg_gui, "disabled") == 0) { printf ("danna_fg_gui: %s\n", fg_gui); traits->pbuffer = true; }</syntaxhighlight><ref>{{cite web |url = https://forum.flightgear.org/viewtopic.php?p=291699#p291699 |title = <nowiki> Re: Headless mode with access to property tree </nowiki> |author = <nowiki> alexklibisz </nowiki> |date = Aug 1st, 2016 |added = Aug 1st, 2016 |script_version = 0.40 }}</ref>
== Status (07/2014) ==
18,852
edits

Navigation menu