1
0
Fork 0
Commit graph

246 commits

Author SHA1 Message Date
gallaert
4854607382 Replace boost::lexical_cast by std::ostringstream and std:stof/stoi/stod 2020-04-22 14:06:13 +01:00
Richard Harrison
bf85a2d542 Fixes to static LOD ranges 2020-04-12 21:34:41 +02:00
Richard Harrison
cb08eb6d6d Fix for range animations in the scenery
Reinstate lod/rough and lod/bare and therefore fix the use of range animations that implement hardwired LOD.

Initially I was reluctant to do this - but after a lot more research I'm no longer convinced that range animations cause a huge performance hit and so we can keep this fix until either the scenery is fixed or the situation becomes clear.

Ideally this fix should be reviewed prior to the next LTS release; or maybe after the next LTS release - but in future reviewed it must be
2020-04-04 00:55:12 +02:00
James Turner
e492ddd5a0 Event more local8Bit -> UTF8 fixes 2020-03-13 09:53:49 +00:00
James Turner
27410761f3 Lots of UTF8 path correctness fixes 2020-03-12 14:23:44 +00:00
Richard Harrison
c99ea20883 LOD ranges rework.
Rework the LOD ranges.

1. The scenery ranges are now deltas (avoids overlapping values)
2. The AI/MP pixel mode now has a default radius that is 20 for Aircraft, 200 for ships, 350 for carriers. This is a simple constant in a virtual function.
3. Added the ability to set the AI/MP ranges equal which means use the low detail model.
4. Changed high detail only to be indicated by a -ve number in maxRangeDetail
5. Re-ordered the range list to go from lowest detail at [0] to highest detail at the end. This is because OSG always loads the models starting from zero on the assumption that the detail increases with the index.

This fixes the pixel mode, which previously would use the radius of the parent which would be confusingly large, and unrelated to the actual size of the model. With the simple defaults that we have the pixel values set in the ranges won't exactly match the rendered size of the model on screen, but it will be a lot closer and more importantly meaningful.
2018-10-30 21:05:55 +01:00
Peter Sadrozinski
ec4b9f8542 Alternative terrain engine based on pagedLOD
- remove TileMgr from sub systems - add to btg terrain engine
2017-02-26 10:17:15 -05:00
Stuart Buchanan
dab9a9fc73 Remove /sim/rendering/building-mesh.
Made redundant by /sim/rendering/scenery-path-suffix
2017-01-21 22:22:43 +00:00
James Turner
e64a2db5a0 Remove the scenery path mangling.
Requires a matching SG commit for correct operation.
2016-11-20 22:42:48 +00:00
Stuart Buchanan
55f64820df Fix display of OBJECT_BUILDING_MESH_DETAILED 2016-11-08 19:43:32 +00:00
Rebecca N. Palmer
3b1f01c49d stop using /sim/terrasync/scenery-dir, fix scenery path order
Having non-Nasal-readable scenery paths breaks things
(The property continues to exist, but is now from-C++-to-Nasal only)
2016-10-18 22:10:09 +01:00
Stuart Buchanan
14f20e4165 Add support for building meshes. 2016-09-22 20:40:26 +01:00
James Turner
16814800ce Use Paths instead of strings. 2016-06-22 17:36:05 +01:00
Stuart Buchanan
56374621c5 Make LOD of buildings/trees/objects/STG configurable.
Now using /sim/rendering/static-lod/rough.
2016-04-08 22:38:17 +01:00
James Turner
8877b442f8 ATC/Traffic doesn’t crash reset.
- remove some global headers from AI headers, to avoid pollution
- change how ATC owns the ‘player’ FGAIAircraft so reset works
- ensure AIAircraft controllers are cleared on unbind for reset
2015-12-11 12:11:59 -06:00
James Turner
585235ce01 One more log item for the tile-cache. 2015-03-08 09:41:27 +00:00
James Turner
89115ccb1d Adding some debugs for Thorsten Renk’s issue.
Will revert this patch in the future.
2014-11-19 22:35:44 +00:00
James Turner
c6c63e65f7 Adding log message for an edge case. 2014-11-19 22:35:44 +00:00
James Turner
71da5b7a76 Tweak scenery-loaded logic
Make first-start (not a reset / re-init) behaviour more explicit.
2014-11-15 16:29:39 +00:00
James Turner
779a97b925 Move all tile-manager init to reinit path.
- improves changing scenery paths at runtime.
2014-11-11 22:25:55 +00:00
Stuart Buchanan
b654477794 New materials.xml format 2014-08-09 20:43:34 +01:00
James Turner
fd248e9391 Respect tile expiry time when cache is disabled.
Tiles added via the visible mechanism always have an
expiry time of 0.0, so this only affects tiles added by elevation queries, from the AI or FDM.
2014-05-24 14:23:59 +01:00
James Turner
431a3eaa1b Tune osgDB::MaxPagedLODs parameter 2014-05-17 09:05:34 +01:00
James Turner
f19da413bb Initial mode to disable caching of tiles. 2014-05-16 14:52:24 +01:00
James Turner
130f581b18 Tile-manager can request VBOs.
Monitor /sim/rendering/use-vbos and pass the value into
our SGReaderWriterOptions.
2014-02-21 08:52:07 -08:00
James Turner
0473607731 Tweak tile-manager SGBucket API
* FG builds with 'NO_DEPRECATED_API' in SGBucket
2014-02-19 14:02:09 -08:00
James Turner
239a000763 Use new SGBucket API in tile-manager
- check for invalid tiles / buckets, which occurs at the poles
- use .sibling() method to offset
- no longer need to store view lat/lon in the manager.
2014-02-13 18:52:52 +00:00
Christian Schmitt
6cadc2cf40 Simplify some SGGeod-related calculations 2014-02-05 23:07:43 +01:00
James Turner
ce3a7b20fe Crash-fix: mat-lib is now reference-counted.
Adapt to corresponding SG change to make SGMaterialLib be ref-counted,
and have the 'reload-materials' command notify the tile-manager of this,
so it can update the options struct it passes to new tiles.
2014-01-19 16:49:44 +00:00
James Turner
7b8a64b614 Crash fix: thread-safe material conditions
When tiles are being loaded, re-evaluate the materials cache once
per update cycle. (This is probably too often, but no worse than the
previous approach).
2014-01-06 08:28:40 +00:00
James Turner
ad4834c651 Splash-screen feedback on scenery download. 2013-09-30 16:36:13 +01:00
James Turner
cb087dc4de Tile-manager: kill off tile-refresh.
Now the manager waits on terrasync, we never need to do the 
'experimental' refresh feature, since we only load finished tiles.
2013-09-30 12:07:35 +01:00
James Turner
e03ebef99f Tile-Manager waits on TerraSync to load.
Using a new TerraSync API, make the tile manager wait on actively
syncing tiles before sending them to the SceneryPager. This resolves numerous
issues with missing tiles, including at startup.
2013-09-30 12:03:47 +01:00
James Turner
1862688d27 Pass terrasync dir through to osgDB options.
Half of fix for TerraSync Models not being found.
2013-08-29 22:12:34 +01:00
James Turner
7b663cd7f7 Split huge NasalSys header apart. 2013-02-09 15:33:05 +00:00
James Turner
487638be7f Restructure positional finalisation for sim-reset.
Make position finalisation happen in the same phase as scenery load, i.e as a task during the main loop, instead of during the init loop. This is compatible with the existing reset logic. Unfortunately more work is needed; the environment code doesn't update the local station quickly enough on reset. (Fixing that is next!)
2012-12-15 15:25:45 +00:00
ThorstenB
59448f11cc #952 terrasync not scheduling tiles before sim reset 2012-11-28 00:26:47 +01:00
James Turner
fe3a1424eb Restore the fdm-init check to splash-screen logic.
Guessing this is the cause of the splash-screen coming down early in some cases. Adding this back to confirm or deny that guess.
2012-09-27 15:15:02 +01:00
James Turner
649d579124 Helpers to access view position.
Avoid direct use of FGViewer in various places, by providing property-based accessors to the current view position.
2012-09-25 10:06:56 +01:00
ThorstenB
a2cfef95fb Minor tile manager clean-up.
The tilemgr schedules scenery, so it should also trigger the
"sceneryloaded" signals once it's done.
2012-09-24 23:42:25 +02:00
Stuart Buchanan
5e3ec6209c Add command to reload materials definitions. Note that this explicitly
does not attempt to delete the old materials definitions, as they
may be in use at the time.
2012-07-19 22:06:08 +01:00
ThorstenB
89b41395d8 Move viewer-related sources to separate folder.
Simple source directory clean-up, so "Main" folder contains fewer stuff
and the list of files in the editors a lot shorter.
2012-04-25 23:28:00 +02:00
ThorstenB
d683d39e85 Fix SceneryPager destruction sequence.
SceneryPager singleton must not be removed while FGScenery is still alive,
so hold a reference to it in FGScenery, saving the pager from being
deleted first.
2012-04-15 15:30:44 +02:00
ThorstenB
da2ee04eea Fix scenery reload issues.
Aircraft could fall through the ground on scenery reload.
2012-04-07 16:35:04 +02:00
ThorstenB
9effb06047 Fix scenery reload issues.
Aircraft could fall through the ground on scenery reload. Properly reset
the "sceneryloaded" flag to pause FDM processing while scenery is being
reloaded. Also stop processing some instruments while scenery is reloaded.
2012-04-07 16:20:22 +02:00
ThorstenB
f14ca9c611 tilemanager: initialize member variables
Also drop some obsolete members.
2012-03-26 21:11:03 +02:00
Mathias Froehlich
1ddb658a70 scenery: Move flightgears paging back into the application.
This way of scenery paging is really application code.
Now that the simgear stg loader is seperated from the paging
code, this appication specific paging can reside here.
May be at some time also use the spt stuff here.
2012-03-15 20:56:37 +01:00
Mathias Froehlich
44c716bb03 scenery: The tile entries load callback is not needed anymore.
The stg loader can do this itself.
2012-03-15 19:39:07 +01:00
Mathias Froehlich
8d3e1b06be Remove /sim/paths/use-custom-scenery-data.
Scenery people tell me that this is always set to true
today. Thus we can remove this property as this allows
me for some further osg loader cleanups.
2012-03-15 18:48:57 +01:00
ThorstenB
17590ba436 Fix another line lost in a merge conflict. 2012-02-07 21:12:51 +01:00