Commit Graph
348 Commits
Author SHA1 Message Date
Richard Harrison cba902f22b Nasal GC background threaded merge.
Merge branch 'nasal-background-thredead-gc'
2019-06-08 10:07:48 +02:00
Stuart Buchanan a0bdcb30fd Correct log messages. 2019-03-12 21:53:22 +00:00
Stuart Buchanan 7e0a10c016 Set radius for PagedLOD
Speculative fix to address scenery chunks being unloaded
unexpectedly under high load.
2019-03-12 21:45:34 +00:00
Scott Giese 2303da846b Fix missing header for OSG macros.
Patch provided by Stewart Andreason.
2019-02-05 21:46:02 -06:00
Richard Harrison b76f78c6da OSG < 3.4.x fixes
This will use the inherently unsafe versions of the load methods which can result in deleting an object (from the cache) that has just been loaded in the database thread.

Symptom OSG WARN deleting still referenced object.
2019-01-26 17:48:31 +01:00
Richard Harrison cb024dd82d Fix for deleting still referenced object
ref https://sourceforge.net/p/flightgear/codetickets/2105/

Use the thread safe versions (getRef) of the objectcache methods
2019-01-20 18:28:37 +01:00
Stuart Buchanan ec14050890 General tiles with only BUILDING_LIST
Bug found during code-read.  If tile just contained BUILDING_LIST
entries (i.e. no OBJECT_STATIC or OBJECT_SIGN entries), then it would
not generate.
2018-12-22 16:52:05 +00:00
James Turner 4b17ea95fc Random buildings: reduce log output in a common case 2018-12-20 16:10:36 +00:00
Stuart Buchanan 460a666234 STG-defined buildings using Random Building shader
Support BUILDING_LIST STG verb which references a file
containing the cartesian coordinates of individual buildings,
to be generated using the random-building shader approach.

BUILDING_LIST buildings.txt OSM_Building -2.72943543 56.00080606 36.1 0

buildings.txt:

0 0 0 0 0
0 100 0 0 0
0 200 0 0 0
0 300 0 0 1
0 400 0 0 1
0 500 0 0 2
100 0 0 0 2
200 0 0 0 2
300 0 0 0 2
400 0 0 15 2
2018-11-18 21:08:06 +00:00
Richard Harrison 61cc8d6c50 Fix exception when number of primitive sets not what assumed.
This was something that happened when random vegetation was off, but tree shadows was on.

Adding random vegetation would then reliably cause an exception.
2018-10-30 20:13:32 +01:00
Richard Harrison 758ab5e581 LOD ranges
The scenery ranges for bare and rough are now deltas, to avoid overlapping values by user error.
2018-10-30 20:12:12 +01:00
Richard Harrison 8d3723c91f Prevent nullptr exception in treenodes.
Happened to me once or twice mainly during reposition probably as scenery changed whilst still loading.
2017-12-04 07:33:45 +01:00
Richard Harrison 7bfbda7188 Fix for AMD / Radeon rendering of lights as point sprites.
Tested against R9-290 and GTX 550 Ti (thanks Nikolai V. Chr.)
2017-09-24 22:10:44 +02:00
Stuart Buchanan f6a348ba94 Enable display lists for random trees. 2017-07-04 21:45:56 +01:00
Alessandro Menti 05bbba5074 Remove the last traces of enhanced lighting support
Remove some traces of the enhanced lighting support which were left
there from a refactoring several years ago.

See discussion at <https://sourceforge.net/p/flightgear/mailman/message/35875305/>
2017-06-04 16:51:27 +02:00
Stuart Buchanan a7dee1164d materials.xml support for osm2city Buildings etc. 2017-05-09 14:30:57 +01:00
Stuart Buchanan 9223f30f08 Improve warning of object in wrong bucket.
Reduce level to DEV_WARN from DEV_ALERT as it's
largely benign.
2017-04-07 21:20:42 +01:00
James Turner 72341a6de4 Adjust some messages to be developer-mode.
Still deciding how far to go with this, comments welcome.
2017-02-27 00:13:39 +00:00
Peter Sadrozinski 61525c555e Disable GDAL, and compiling new terrain engine by default 2017-02-26 09:46:29 -05:00
Peter Sadrozinski dad30b0cc2 alternative terrain engine - SGMesh utilizing pagedLOD 2017-02-25 19:17:55 -05:00
Florent Rougon 79f869a7f3 Move IOStreams-related files to simgear/io/iostreams; rename zfstream.[ch]xx to gzfstream.[ch]xx
- Rename zfstream.cxx (resp. zfstream.hxx) to gzfstream.cxx (resp.
  gzfstream.hxx)

  This is because these files only deal with the gzip format (RFC 1952),
  while zlib can actually read and write two slightly different formats:
  this one and the "ZLIB Compressed Data Format" (RFC 1950). Since I am
  going to add std::streambuf and std::istream subclasses able to deal
  with both formats (and supporting data sources that are general
  std::istream instances, not just files), this renaming will make
  things a bit clearer, I hope.

- Add new folder simgear/io/iostreams and move the following files to
  this folder:

    simgear/misc/gzcontainerfile.cxx
    simgear/misc/gzcontainerfile.hxx
    simgear/misc/gzfstream.cxx
    simgear/misc/gzfstream.hxx
    simgear/misc/sgstream.cxx
    simgear/misc/sgstream.hxx
    simgear/misc/sgstream_test.cxx

- Adapt other files accordingly (mainly #includes and CMakeLists.txt
  files).
2017-02-12 21:18:52 +01:00
Stuart Buchanan 6c64e9b36c Add scenery-path-suffix support to terrasync
Remove /sim/rendering/building-mesh as it is
redundant.

Add check that objects are in the correct bounding
box of the containing STG file.
2017-01-21 22:19:38 +00:00
Ron Haertel f3e066cce0 Bug fix for bug 1920
In pt_lights.cxx in SGLightFactory::getOdal, at segment "centerline lights",
the decrement loop index i is initialized with lights.getNumLights(), then is used at lights.getLight. (ERROR)
The function getNumLights is set to the size of the vector which is one more than the max index refernce.

This restores the behavior that was in place before commit 8ddb99f62f
2016-12-30 18:49:19 -05:00
Erik Hofman e768553a4a Replace auto_ptr with unique_ptr 2016-12-07 11:03:49 +01:00
James Turner e266e44f63 Extended scenery/STG suffix handling 2016-11-22 00:09:51 +00:00
Stuart Buchanan c1e50e9a9c Correct mesh size correction for building LOD ranges 2016-11-08 20:06:34 +00:00
Stuart Buchanan dcbf5b7c11 Fix for OBJECT_BUILDING_MESH_DETAILED 2016-11-08 19:56:08 +00:00
Stuart Buchanan 809ddb21c9 Add STG verbs for building mesh integration.
Add OBJECT_BUILDING_MESH_ROUGH and OBJECT_BUILDING_MESH_DETAILED

Intended for use by OSM buildings.
2016-09-22 20:38:58 +01:00
James Turner f21eac8473 Building with clean SGPath API 2016-06-30 16:17:52 +01:00
James Turner fb1b1b9c5e Fix uninitialized var 2016-06-03 08:44:25 -05:00
Stuart Buchanan 06f888d38c Display random objects independently of buildings
Fix bug reported by Thorsten RENK on the mailing list
that random objects were only being displayed if random
objects were also present for the tile.  Also fix crash
if none of the random object models were found.
2016-05-01 22:35:21 +01:00
Stuart Buchanan 493aab8bab Make LOD for buildings/trees/STG configurable.
Now based on /sim/rendering/static-lod/rough.
2016-04-08 22:36:06 +01:00
James Turner f256d45b65 Quiet a debug message. 2016-01-04 13:36:32 -06:00
Stuart Buchanan 21e6dd34b2 QuadTree fix for large buildings.
QuadTree relies on a bounding box to set up correctly.

ProxyNodes don't have a BB until the model is loaded,
causing the QuadTree to collapse if the DB loader can't
keep up with the STG loader.

Fix this by creating a default BB before the model
is loaded.
2015-11-06 21:38:53 +00:00
Torsten Dreyer ff3efaee93 Fix wrong log-class for debug message 2015-11-02 10:56:17 +01:00
Stuart Buchanan 08fb433923 Use quadtree to improve culling of STG objects 2015-10-29 20:07:12 +00:00
Stuart Buchanan 1a752d28a4 Remove max density 10000m for surface lights. 2015-10-22 20:28:37 +01:00
Tim Moore 8b351520bd Off-by-one error in the OSG_VERSION_LESS_THAN macro
I was confused about when the version number gets bumped in OSG sources...
2015-04-21 00:06:22 +02:00
Tim Moore 51ff30f386 changes for OSG 3.3.4 and later
The public interfaces to osgText and osg::GLExtensions changed.
2015-04-19 22:45:59 +02:00
James Turner 0b6738b616 Portability: Fix compile errors on MSVC
From Scott (xDraconian)
2015-03-24 11:05:57 -05:00
Stuart Buchanan e5995208a9 Support for tree shadows from Thorsten RENK. 2015-02-19 21:14:07 +00:00
Stuart Buchanan 6f15bb415f materials.xml defined vegetation Effect. 2015-02-17 21:47:51 +00:00
Rebecca N. Palmer 8c38f799ad DrawElementsFacade: use ref_ptr instead of mismatched new/free
Found by AddressSanitizer; not seen to crash, but probably best fixed
2015-02-12 15:48:36 +00:00
Stuart Buchanan 0cc5374fe7 Fix VASI/PAPI so they are generated. 2015-02-10 21:19:51 +00:00
Peter Sadrozinski 148640be34 memory reduced tile loading.
- do not save the TileGeometryBin and matcach in the randomObjectCallback
- recreate matcache, and get TileGeometry from scenegraph
- split obj.cxx into three distinct files - loadBTG, load surface geometry, and load tile details
- includes fix for sceneries that have missing materials
2015-01-19 21:06:27 +01:00
Stuart Buchanan 51d43f809e Fix directional lighting 2015-01-05 20:50:34 +00:00
Peter Sadrozinski beeaef3868 - fix for index overrun when building TexturedTriangleArray
- fix for ws2.0 zero area triangles - drop them when loading
2014-12-26 13:07:33 -05:00
Stuart Buchanan 9da0031039 Fix PagedLOD for random objects.
- Only generate the object set and flights from the data once.
- Only expire the PagedLOD node after a suitable period of time.
2014-11-28 21:57:37 +00:00
Stuart Buchanan 958ae9bdf0 Fix two bugs in random object placement 2014-11-21 22:14:03 +00:00
Stuart Buchanan 365ddb84a7 Limit number of random objects per triangle 2014-11-07 22:22:55 +00:00