Board index FlightGear Development Canvas

Sub window view

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Sub window view

Postby Avionyx » Wed Mar 12, 2014 1:08 pm

Hi there,

I'm looking to replicate a camera with a fixed viewpoint from the aircraft. For example looking directly down.

Is there a way I can use some scripting method to call a new window displayed in the bottom right hand side of the screen showing a fixed camera view, without having to edit the preferences for my machine? I'd like it to be easily distributable.

Alex
Avionyx
 
Posts: 435
Joined: Mon Jan 11, 2010 3:07 pm
Location: EGKA
Callsign: G-AVYX
Version: GIT
OS: Arch

Re: Sub window view

Postby Philosopher » Wed Mar 12, 2014 1:35 pm

I'm assuming you're talking about a separate view, i.e. not just one view, but multiple in the same window?

Not currently supported, but there are some related plans/RFCs (aka rendering to a Canvas texture mainly - because displaying a texture/popup in FG's window can already be done), see: http://wiki.flightgear.org/Canvas_Devel ... ng_Cameras.
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: Sub window view

Postby Hooray » Wed Mar 12, 2014 4:43 pm

Also see: viewtopic.php?f=18&t=21897&p=200744&hilit=#p198735
This is a pretty popular feature request, and it's been long-standing too - I don't know if there's a separate issue in the tracker for it, but if not you may want to add one so that this can be tracked properly.
you can tell by looking at the link, that some of the most senior core developers have been discussing this for many years - so it's pretty obvious that this will be implemented at some point.
All of these discussions predate Canvas obviously - but these days, that's what should ideally be used for such things.

Do note that you can already open additional windows via preferences.xml, see README.multiscreen in $FG_ROOT/Docs

Is there a way I can use some scripting method to call a new window displayed in the bottom right hand side of the screen showing a fixed camera view, without having to edit the preferences for my machine? I'd like it to be easily distributable.

not yet, but there were a few people interested in working on this a while back, which is what got the section started in the wiki article that Philosopher linked to - the more people provide feedback (requirements, purpose etc), the more likely this will be implemented at some point. A while ago, Zan implemented this in the pre-Canvas days, and it was really looking promising - I've been in touch with Zan about his newcameras branch, which would need to be rebased onto next, and adapted to use a Canvas::Element for rendering to a texture, but also for specifying the attributes of each camera via properties (property objects), instead of being specific to preferences.xml

Depending on the level of interest, feedback and involvement, this could even make it into 3.2. The article has already seen ~2k views within just a few weeks, and I've been getting lots of messages related to this... but it would still be a good idea to add this to the issue tracker and accept the whole thing there, because it's such a popular and long-standing request.
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: 11427
Joined: Tue Mar 25, 2008 8:40 am

Re: Sub window view

Postby Avionyx » Thu Mar 13, 2014 11:00 am

Thanks for the replies gents. I'll put something more detailed together and get it into the tracker so at least it can be logged.
Avionyx
 
Posts: 435
Joined: Mon Jan 11, 2010 3:07 pm
Location: EGKA
Callsign: G-AVYX
Version: GIT
OS: Arch


Return to Canvas

Who is online

Users browsing this forum: No registered users and 1 guest