20,741
edits
| Line 179: | Line 179: | ||
== Canvas vs. OpenGL ES == | == Canvas vs. OpenGL ES == | ||
We have other folks interested in running such things on Android devices or mobile phones: | |||
[http://forum.flightgear.org/viewtopic.php?p=169150#p169150 Subject: using FGpanel to display various instruments and electrics]<ref>{{cite web | |||
|url = https://forum.flightgear.org/viewtopic.php?p=199432#p199432 | |||
|title = <nowiki> Re: TQ/Panel for FG made with Kivy </nowiki> | |||
|author = <nowiki> Hooray </nowiki> | |||
|date = Jan 31st, 2014 | |||
|added = Jan 31st, 2014 | |||
|script_version = 0.40 | |||
}}</ref> | |||
So it would make sense to coordinate such efforts, because the requirements will be very similar. | |||
Even some core developers discussed this on the devel list: [[Howto:Optimiing FlightGear for mobile devices#Status .2809.2F2013.29]] | |||
For example, see: [[Howto:Optimizing FlightGear for mobile devices]] | |||
The Canvas is a property tree-based subsystem using listeners, the canvas is primarily a wrapper on top of Shiva and OSG that is invoked via listeners. | |||
So all the OpenGL code is either located in Shiva or in OSG - OSG can be told to use OpenGL ES. | |||
So it would be a matter of experimenting with it. | |||
For this particular project, I would suggest to extract the Canvas into a standalone executable - something like this has been previously done by TorstenD when he came up with FGPanel, he "just" extracted FlightGear's 2D panel code and turned it into a standalone binary. | |||
This alone would help us ensure that we can optimize the canvas to support OpenGL ES - once that is working, you could cross-compile the standalone canvas binary. | |||
Technically, this will involve some -but not all- of the steps outlined at: [[FGCanvas]]<ref>{{cite web | |||
|url = https://forum.flightgear.org/viewtopic.php?p=199432#p199432 | |||
|title = <nowiki> Re: TQ/Panel for FG made with Kivy </nowiki> | |||
|author = <nowiki> Hooray </nowiki> | |||
|date = Jan 31st, 2014 | |||
|added = Jan 31st, 2014 | |||
|script_version = 0.40 | |||
}}</ref> | |||
This should give you a rough idea on what's involved in extracting the canvas system into a separate code base, to cross-compile it for other devices. | |||
Basically, the steps are: | |||
* use the FGPanel/FGRadar or SGApplication code base to come up with a SGSubsystem-based program | |||
* add the Nasal, events (timers) and property tree subsystems | |||
* add the canvas system | |||
* check where OpenGL ES is not yet supported, report issues or fix them directly | |||
* come up with workarounds regarding the FBO issue | |||
40-60% of this are already done inside FGPanel and FGRadar - so the first weekend will be primarily spent doing "copy & paste". | |||
If you are interested in working on this, you should obviously know some C++ and you should be able to build from source. | |||
If that's not a problem, I suggest to raise the question in the canvas forum, so that TheTom can provide some more informed input. | |||
It would definitely be a useful project, not just for Rasberry PI support, but for FG itself - because the whole FGPanel/FGCanvas idea is generally agreed to be useful, so any work related to this would be highly appreciated, and we're here to help you accordingly.<ref>{{cite web | |||
|url = https://forum.flightgear.org/viewtopic.php?p=199432#p199432 | |||
|title = <nowiki> Re: TQ/Panel for FG made with Kivy </nowiki> | |||
|author = <nowiki> Hooray </nowiki> | |||
|date = Jan 31st, 2014 | |||
|added = Jan 31st, 2014 | |||
|script_version = 0.40 | |||
}}</ref> | |||
== Canvas vs. FGCanvas == | == Canvas vs. FGCanvas == | ||