Board index FlightGear Support Graphics

Per video card configuration

Graphics issues like: bad framerates, weird colors, OpenGL errors etc. Bad graphics ar usually the result of bad graphics cards or drivers.
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?
- 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 upload a screenshot of the problem.

If you experience FlightGear crashes, please report a bug using the issue tracker (can be also used for feature requests).
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article. If you are seeing corrupted/broken textures, please see this 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.

Per video card configuration

Postby erik » Sat Mar 19, 2016 12:20 pm

After a discussion in the forums I decided to add the option to override the settings of /sim/rendering on a per video adaptor basis (based on the principle used for joysticks):
viewtopic.php?f=42&t=28681&start=15#p275173

This code is now pushed to git.
The idea is to set optimal default rendering options for video cards so users get both good performance and decent rendering quality when starting FlightGear (for the first time).

Everyone is encouraged to add it's own personal configuration so first time users will get the best experience when starting FlightGear.

The filename is the OpenGL renderer string up to "/" (NVIDIA) or " (" (AMD/Ati) wit ".xml" appended.
erik
 
Posts: 1510
Joined: Thu Nov 01, 2007 1:41 pm

Re: Per video card configuration

Postby Necolatis » Sat Mar 19, 2016 1:08 pm

Nice!
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1896
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.3.2
OS: Windows 10

Re: Per video card configuration

Postby erik » Sat Mar 19, 2016 2:24 pm

One hint: yo can find the properties in auto_save*.xml

Erik
erik
 
Posts: 1510
Joined: Thu Nov 01, 2007 1:41 pm

Re: Per video card configuration

Postby Thorsten » Sat Mar 19, 2016 4:14 pm

Very nice - thank you for going ahead and doing this!
Thorsten
 
Posts: 10240
Joined: Mon Nov 02, 2009 8:33 am

Re: Per video card configuration

Postby Hooray » Sat Mar 19, 2016 5:12 pm

You may want to take a look at the original patch (proof-of-concept) I came up with back when we were first talking about this, and maybe review/update the wiki article accordingly, i.e. to document the feature based on what you have now committed: http://wiki.flightgear.org/Graphics_Card_Profiles
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: 11292
Joined: Tue Mar 25, 2008 8:40 am

Re: Per video card configuration

Postby erik » Sat Mar 19, 2016 9:48 pm

Running the code from fg_init.cxx doesn't work since (as you say in the link) the OpenGL strings are not initialized yet. This implementation loads them right after they get available. It does indeed need a way to set the user settings again. But I just wanted to get the code available and handle with this shortly after.

Erik
erik
 
Posts: 1510
Joined: Thu Nov 01, 2007 1:41 pm

Re: Per video card configuration

Postby Hooray » Sat Mar 19, 2016 10:01 pm

You are right, as far as I remember, I changed the code to be invoked as part of the OSG GraphicsContext intialization exactly for that reason: http://wiki.flightgear.org/Graphics_Car ... les#Issues

Anyway, you seem to have found something that works just as well - but it may make sense to also support regex-style expressions, so that we don't need to add different vendor strings just because strings are case-sensitive or differ in some other subtle way.
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: 11292
Joined: Tue Mar 25, 2008 8:40 am

Re: Per video card configuration

Postby erik » Sat Mar 19, 2016 10:56 pm

Case sensitive would be easy to fix. Slightly Different names would be bad, but my hopes are this isn't a problem.

Erik
erik
 
Posts: 1510
Joined: Thu Nov 01, 2007 1:41 pm

Re: Per video card configuration

Postby Hooray » Sat Mar 19, 2016 11:31 pm

the most flexible way would indeed be supporting regex-style expressions, but that'd would require C++11/14
A simple wildcard for a std::string::find() call may still work well enough though, and would make pattern matching much more flexible.
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: 11292
Joined: Tue Mar 25, 2008 8:40 am

Re: Per video card configuration

Postby erik » Mon Mar 21, 2016 10:56 am

With the current FlightGear and FGData from git there is now an option in the Debug menu to 'Save Video Configuration' which creates a file with the correct name and the proper properties for inclusion in the Video section of FGData.

Erik
erik
 
Posts: 1510
Joined: Thu Nov 01, 2007 1:41 pm

Re: Per video card configuration

Postby Hooray » Mon Mar 21, 2016 12:11 pm

my suggestion would be to store the value of the filename in the property tree so that it can be shown in the help/about dialog (e.g. GPU profile: nvidia.xml)

Also, note that my original patch (see the wiki article) contained an CLI/startup argument to override this feature - mainly intended for troubleshooting purposes

It would also make sense to make sure that this works nicely with reset/re-init - in fact, having the option to reset with different settings applied might be a good way for end-users to test different configurations.
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: 11292
Joined: Tue Mar 25, 2008 8:40 am

Re: Per video card configuration

Postby erik » Mon Mar 21, 2016 12:29 pm

Note that the intention is to make life easier for first time users so the settings should only affect users without an auto_save.xml file. The nest start the contents of the auto_save.xml file should take over. So this update is just to make it easier to create the user configuration for inclusion in the base package.

Erik
erik
 
Posts: 1510
Joined: Thu Nov 01, 2007 1:41 pm

Re: Per video card configuration

Postby Hooray » Mon Mar 21, 2016 1:01 pm

Yes, but that would assume that we actually spread the word and ask people to share their GPU-specific settings, probably aiming for ~30 fps.

Note that the idea for the patch on the wiki was to 1) load preferences.xml, 2) apply GPU-specific defaults and 3) load autosave.xml stuff on top of that - that way, the usual defaults would be used, while GPU specific defaults would only be loaded if available, while ensuring that autosave settings always take precedence.

Back when we were still talking about implementing this, my suggestion was to apply heuristics based on vendor strings, i.e. using std::string::split(), to find the most specific path matching the detected GPU, and falling back to safest common platform (e.g. nvidia).

The corresponding heuristics would first load the matching XML file via the vendor string ("nvidia.xml"), and then try to fgGetNode() a matching renderer-based section of the XML file (e.g. gtx 540m).

That way, nvidia settings would benefit all nvidia-users, while specific settings could be provided and loaded automatically if a matching section is found
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: 11292
Joined: Tue Mar 25, 2008 8:40 am

Re: Per video card configuration

Postby erik » Mon Mar 21, 2016 1:18 pm

You're free to implement it that way.

Erik
erik
 
Posts: 1510
Joined: Thu Nov 01, 2007 1:41 pm

Re: Per video card configuration

Postby Hooray » Mon Mar 21, 2016 1:24 pm

point well taken - but once you look at the corresponding wiki article, you will see that said code predates your implementation by several weeks, so there's not much of a point encouraging me to roll up my own sleeves, given that I prototyped your idea several weeks ago.

So, referring to the patch on the wiki, my suggestion would merely be to 1) look up a matching renderer-specific file, and 2) if it does not exist, load a common vendor-specific file.

Note that this can be accomplished even using just the include directive, i.e. by referencing the top-level vendor-specific file and overriding and renderer-specific settings subsequently.
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: 11292
Joined: Tue Mar 25, 2008 8:40 am

Next

Return to Graphics

Who is online

Users browsing this forum: No registered users and 1 guest