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 8:59 am

Hi,

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

How can i make it?

Thanks.
huidefeng
 
Posts: 11
Joined: Wed Mar 20, 2013 11:45 am

Re: run without osg

Postby Hooray » Sun Mar 24, 2013 12:14 pm

huidefeng wrote in Sun Mar 24, 2013 8: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
window->gc->getTraits()->pbuffer=true;
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: https://code.google.com/p/flightgear-bu ... ?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,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Development

Who is online

Users browsing this forum: No registered users and 9 guests