Board index FlightGear Development

How to run FG without OSG window?

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

How to run FG without OSG window?

Postby huidefeng » Sun Mar 24, 2013 7:59 am


I want to run flightgear without osg view. Or I want to run flightgear on console.

How can i make it?

Posts: 12
Joined: Wed Mar 20, 2013 10:45 am

Re: run without osg

Postby Hooray » Sun Mar 24, 2013 11:14 am

huidefeng wrote in Sun Mar 24, 2013 7:59 am:I want to run flightgear without osg view. Or I want to run flightgear on console.

A "headless" mode is a long-standing feature request, especially requested by developers and contributors who are hoping to do better/automated regression testing (valgrind, gdb, gprof). At the moment, it isn't directly possible - not without modifying the C++ source code and and rebuilding FG from source. You would basically have to change our OSG init code such that the window is not visible, note that you would still require OSG and X11 obviously, the window just wouldn't be shown - so that FG could be run from a console/shell:

fredb wrote: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
Code: Select all
at the end of this function.

There are various related feature requests, and FG core developer Zakalawe has repeatedly mentioned that he's supportive of this: ... ?id=882#c1
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Posts: 11782
Joined: Tue Mar 25, 2008 8:40 am

Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests