Board index FlightGear Support

create window

All general support: help on flying, installation, hardware, getting online etc. There are lots of users and developers to help you out.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- where did you download your aircraft/scenery from?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).

Please report any bugs not specific to an aircraft on the issue tracker.
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

create window

Postby sgb110 » Sat Aug 16, 2014 7:34 am

hi
i need to create 2 window with different view.
for example window1 show cockpit view and window2 show tower view

i did try to edit performance.xml with bellow code :
Code: Select all
          <camera>
            <host-name type="string"></host-name>
            <display>0</display>
            <screen>0</screen>
            <shear-x>2</shear-x>
            <shear-y>1</shear-y>
            <width>320</width>
            <height>240</height>
            <fullscreen type="bool">false</fullscreen>
           </camera>
           <camera>
            <host-name type="string"></host-name>
            <display>0</display>
            <screen>0</screen>
            <shear-x>-2</shear-x>
            <shear-y>1</shear-y>
            <width>320</width>
            <height>240</height>
            <fullscreen type="bool">false</fullscreen>

but when changed view in on of window other window changed with this window
plz help me
sgb110
 
Posts: 6
Joined: Thu Sep 29, 2011 10:06 pm

Re: create window

Postby ludomotico » Sat Aug 16, 2014 8:46 am

I think, but I'm not really sure, that FligthGear does not support two different views even if you have two windows.

One idea is running TWO instances of FlightGear, each one with a single window. This way you can control the view freely in each instance.

To run FlightGear like this, one of the instances is the master (runs the simulation) and the other is a slave that only renders a specific point of view. Check this link: http://wiki.flightgear.org/Howto:Multi- ... FlightGear

Even if it says "multicomputing", you can run both instances on the same computer. I think. I have tried multicomputing to show different views of the same simulation in two computers (and it works perfectly), but I have not run two instances of FligthGear on the same computer.
User avatar
ludomotico
 
Posts: 1077
Joined: Tue Apr 24, 2012 1:01 pm
Version: git
OS: Debian GNU/Linux

Re: create window

Postby Hooray » Sat Aug 16, 2014 9:00 am

ludomotico is correct - also, this is not a Canvas related question for the time being - while we've had a number of discussions about possibly supporting camera views as Canvas elements, this isn't currently supported. At some point, this will probably be added, because it would simplify quite a bit of existing code (especially the view manager, and the way camera groups are set up) - however, the corresponding C++ predates Canvas by many years, so it would involve a bit of work.

But we've had a number of aircraft developers, who would also require this functionality for implementing mirrors and/or tailcam views rendered to instruments, or FLIR-type views. All of these wouuld be possible to support once the view manager is refactored such that it can render views to a new Canvas::Element - possibly in combination with supporting effects/shaders per element.
We've several building blocks for this in place already - but we've also seen people getting stuck while working on #1, simply because our existing way of using OSG is not particularly well-suited for having truly independent camera views - for a more technical explanantion, I'd suggest to check out: http://wiki.flightgear.org/CompositeViewer_Support

For the time being, I'd suggest to use the multi-instance approach mentioned by ludomotico - depending on your requirements (and your willingness to tinker with experimental code), you could also check out FGViewer: http://wiki.flightgear.org/FGViewer

Given how FlightGear has evolved over time, not just regarding effects/shaders, but also complementary efforts like deferred rendering (via rembrandt), we'll probably see cameras (and maybe individual rendering stages) exposed as Canvases, so that there's a well-defined interface for hooking up custom effects/shaders to each stage in the pipeline - Zan's newcamera work demonstrates just how much flexibility can be accomplished this way, basically schemes like Rembrandt could then be entirely maintained in XML/effects and shader (fgdata) space.
And even the fgviewer code base could be significantly unified by just working in terms of canvases that deal with camera views, which also simplifies serialization for HLA.

At some point, it would probably make sense to also support the creation of native OSG windows via Canvas placements, so that the camera/view manager code can be simplified accordingly:
http://wiki.flightgear.org/Canvas_Devel ... ve_Windows
TheTom wrote:Support multiple views/windows: Currently the GUI can only be placed inside one view/window (see Docs/README.multiscreen) but it would be nice to be able to move windows between views.
Last edited by Hooray on Sat Aug 16, 2014 11:23 am, edited 1 time in total.
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: 11739
Joined: Tue Mar 25, 2008 8:40 am

Re: create window

Postby sgb110 » Sat Aug 16, 2014 10:13 am

tnx
i have a new question

i am running new instance of fg and set network protocol for this instance.
now i need show just map dialog in this instance
sgb110
 
Posts: 6
Joined: Thu Sep 29, 2011 10:06 pm

Re: create window

Postby Hooray » Sat Aug 16, 2014 10:17 am

Assuming you are referring to the old Map dialog, you can just open it - but you'll obviously need to sync both instances: http://wiki.flightgear.org/Slaving_for_Dummies
http://wiki.flightgear.org/Property_Tre ... ol_Slaving

You can also check out the minimal startup profile to disable a few features, i.e. to help free up system resources in the 2nd instance: http://wiki.flightgear.org/Troubleshoot ... up_profile

Which should give you a window looking like this:
Image

Note that you'll have to use a custom startup script here, or the same settings would apply to your main fgfs instance

The GUI remains functional, and you can even use Canvas dialogs/windows this way.
At some point, we're hoping to support such use-cases via FGCanvas: http://wiki.flightgear.org/FGCanvas
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: 11739
Joined: Tue Mar 25, 2008 8:40 am


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests