Board index FlightGear Development Canvas

CompositeViewer, Canvas and windows outside main window

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.

Re: Piper PA28 Warrior II

Postby Robertfm » Sun Aug 23, 2020 8:30 pm

It was the link you posted, the one above the screenshot.
Robertfm
 
Posts: 1361
Joined: Thu Apr 25, 2019 4:56 pm
Version: 2020.1.3
OS: W10 v 1907

Re: Piper PA28 Warrior II

Postby Robertfm » Sun Aug 23, 2020 8:35 pm

I've looked at the other 2 git links and still have no idea how to down load it even if I wanted to.
Robertfm
 
Posts: 1361
Joined: Thu Apr 25, 2019 4:56 pm
Version: 2020.1.3
OS: W10 v 1907

Re: Piper PA28 Warrior II

Postby Hooray » Sun Aug 23, 2020 8:44 pm

For FGQCanvas, see: https://sourceforge.net/p/flightgear/ma ... /36724213/

Otherwise (using just a browser):

- enable mongoose (Phi)
- start flightgear
- start your browser
- open Phi via the browser
- edit the URL to append /canvasimage?type=png&canvasindex=0
- change the index as needed, i.e. by navigating to the /canvas location via the property browser

PS: This may still not be the perfect tool for the job, especially when dealing with complex avionics like the FG1000 - like I said, it's "streaming" the raster image over http - FGQCanvas works differently, i.e. by copying/replicating state over http and re-rendering the underlying primitive.
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: 11885
Joined: Tue Mar 25, 2008 8:40 am

Re: Piper PA28 Warrior II

Postby Robertfm » Sun Aug 23, 2020 8:47 pm

Thank you I will try tomorrow.
Robertfm
 
Posts: 1361
Joined: Thu Apr 25, 2019 4:56 pm
Version: 2020.1.3
OS: W10 v 1907

Re: Piper PA28 Warrior II

Postby Hooray » Sun Aug 23, 2020 8:52 pm

At least on a single computer, Jules' windowBuilder approach is likely to be very much superior in comparison - simply because it's under 50 lines of C++ code that could be either executed as a fgcommand, or added as a dedicated "canvas placement", and it's hardware-accelerated too - i.e. using native OSG/OpenGL, without re-rendering the Canvas as per FGQCanvas, and without "streaming" anything.

So, people wanting to render a canvas outside the main fgfs window (on a single machine, possibly using multiple GPUs/screens) will be better served using the WindowBuilder/compositeviewer option.

Furthermore, it would be a good test bed to continue prototyping CompositeViewer support, without being restricted by scenery/terrain issues (our pager wasn't designed with this use-case in mind, but a canvas is conceptually a separate scene graph anyway).
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: 11885
Joined: Tue Mar 25, 2008 8:40 am

Re: CompositeViewer, Canvas and windows outside main window

Postby Robertfm » Mon Aug 24, 2020 10:02 am

Tried to add to 8080 as suggested and got an 404 error. I then added it keeping MAP in URL and it took me to aircraft page in Phi. I looked in the browser/canvas/index/Textures x4. But no reference to panel.
Robertfm
 
Posts: 1361
Joined: Thu Apr 25, 2019 4:56 pm
Version: 2020.1.3
OS: W10 v 1907

Re: CompositeViewer, Canvas and windows outside main window

Postby Hooray » Mon Aug 24, 2020 4:09 pm

keep the port number as is, after the port number change the URL like I said.
Use the property browser to determine a valid index, or simply use 0 or 1 for testing purposes.

To be honest though, getting this to work isn't very complicated, so you must be making rather trivial mistakes - in other words, you might be better off sharing screen shots detailing your exact steps, because it seems unlikely that we can guess what you are doing differently.
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: 11885
Joined: Tue Mar 25, 2008 8:40 am

Re: CompositeViewer, Canvas and windows outside main window

Postby Robertfm » Mon Aug 24, 2020 4:43 pm

Why don't you understand the written word. When I put the extension to the URL you posted I got 404 error message . This is what the URL was localhost:8080/canvasimage?type=png&canvasindex=0 Then I tried it with the #Map in situe which is when it went to the Aircraft tab of the Phi.

There was nothing clearly related to the panel in Property Browser canvas index there was x 4 textures.

So what did I do wrong.

Edit: just changed 0 to 1 and got same 404 error message.
Robertfm
 
Posts: 1361
Joined: Thu Apr 25, 2019 4:56 pm
Version: 2020.1.3
OS: W10 v 1907

Previous

Return to Canvas

Who is online

Users browsing this forum: No registered users and 1 guest