Commit Graph
5958 Commits
Author SHA1 Message Date
Erik Hofman a9615869e3 If a reader is detected there is no need to test it further, just set a boolean. 2021-03-12 10:48:12 +01:00
Erik Hofman 878b742558 Display the time file that fails 2021-03-12 10:45:01 +01:00
Erik Hofman 9bbb615fbf Use sg_ifstream to load the timezone database into a buffer, and access the database from that buffer. This prevents opening and closing the files too often and allows for wide character paths on Windows. 2021-03-12 09:27:15 +01:00
Erik Hofman c9e24dcb0b Use a vector database to get the timezone based on territorial boundaries 2021-03-11 15:59:52 +01:00
Stuart Buchanan bbd84a944a WS30: Improved Road rendering
- Remove road vertices too close together (slicer artifacts)
- Generate linked polygons to remove most gaps.
2021-03-10 22:12:25 +00:00
Erik Hofman b6c80f2e6a Postpone reader detection to the write call and skip writing if there is no reader yet. 2021-03-10 16:14:30 +01:00
Erik Hofman c0205f7eb2 Use the find_dependency option to parse Simgear dependencies to FlightGear 2021-03-08 16:15:14 +01:00
Erik Hofman 023364e245 Fix reading from DDS: read data in the requested buffer and not in our own private buffer. 2021-03-08 13:45:18 +01:00
Stuart Buchanan 7b336d2018 WS30 Improve LineFeature Mesh
- Rely on the Slicer for path vertices
- Remove redundant vertices (<1m distance)
2021-03-07 22:26:25 +00:00
James Turner c86b6fe96c Catalogs: check for local IO failures writing to disk
Sentry.io shows some examples where we failed to write valid data
to disk; check for that if possible.
2021-03-07 15:34:57 +00:00
James Turner 71358dca92 Error-reporting: show XML path when 3D load fails 2021-03-07 12:30:36 +00:00
James Turner 087547c6a0 Report out-of-memory in some loading places
BTG can throw bad-alloc in the wild; catch this case and report it.
2021-03-07 12:30:36 +00:00
James Turner b7234be625 TerraSync: report errors during downloading
Report various out-of-memory and IO failure conditions; especially,
failure to write downloaded to disk, which was previously not 
recorded.
2021-03-07 12:30:36 +00:00
Stuart Buchanan 0b986beac6 WS30 - Line feature accuracy and width control
- Fix a bug causing roads to be displaced from their
true position (caused by incorrect assumption in ElevationSlicer).

- Add control of the minimum width of roads that are rendered at
each LoD level.  Control properties under /sim/rendering/static-lod

- Improve marking tiles for re-rendering.
2021-03-06 17:23:34 +00:00
Julian Smith 4c25e7898e simgear/io/HTTP*: added support for enabling compression when downloading.
Uses underlying curl library's CURLOPT_ACCEPT_ENCODING.
2021-03-06 08:52:11 +00:00
Julian Smith 58279d03d4 simgear/scene/material/EffectCullVisitor.cxx: avoid c++ warning.
osg::Object() is a virtual base class and clang++ warns unless we explicitly construct it.
2021-03-06 08:52:11 +00:00
Erik Hofman 09156b90fe Per request: Rename DDS to DataDistributionService to prevent confusion with DDS the image format. 2021-03-06 09:10:20 +01:00
Erik Hofman ae573877da Remove a typo 2021-03-05 15:40:11 +01:00
Erik Hofman 90e9d0a9d8 Support CycloneDDS as a SGIOChannel 2021-03-05 15:23:25 +01:00
Stuart Buchanan c147c5eb55 WS30 - Move expensive conversion to loading thread 2021-03-04 21:00:12 +00:00
Stuart Buchanan ce197ea828 WS30 - Improve line feature loading
- Mark tiles that require re-loading after .STG loading, removing a race
condition
- Only re-build line features rather than the entire tile
2021-03-04 20:20:41 +00:00
James Turner 40ead1f71a Add osg::Program wrapper for error-reporting 2021-03-01 11:57:30 +00:00
James Turner 802ce5ad23 ErrorReporting: set context for STG loading
Ensure the STG absolute path can be propagated to all files triggered
by STG loading, including the delayed files and proxied files. This
allows us to attribute errors to the correct scenery path.
2021-03-01 09:42:04 +00:00
Stuart Buchanan f4dfa854ec WS30 Fix invalid search-and-replace 2021-02-27 16:17:25 +00:00
James Turner 7352e992e6 Allow delayed setup of ErrorContext data
Permit no model data to be provided, when loading a model via the
modelLib API (d’oh)
2021-02-25 12:24:43 +00:00
Stuart Buchanan 1bc0f86cc0 WS30 Line Features - fix build
Add missing files.
2021-02-25 10:54:05 +00:00
James Turner cb15502b41 Error reporting: add SGModelData context support
Allow us to pass the current error-context from the main thread
into the osgDB loader thread. This is necessary so we can attribute
AIModel (etc) load problems to the correct source.
2021-02-25 09:04:45 +00:00
James Turner a402eda151 Error-reporting: add some errors for Effect shaders 2021-02-25 09:04:45 +00:00
Stuart Buchanan 716835c7ad WS30 Line Features
Adds a LINE_FEATURES STG Verb of the form

LINE_FEATURES <file.txt> <Material>

Where <file.txt> is a text file consisting of line features to be
rendered with the appropriate <Material> definition.

Each line of <file.txt> has the form
<w> <attr> <a> <b> <c> <d> <lon1> <lat1> <lon2> <lat2> ...

Where
<w> is the line feature width in m
<attr> is an integer for attributes - likely a bitmask*
<a> <b> <c> <d> are floats*
<lonN> <latN> are the lon/lat of point N on the line feature

* denotes values that may be feature-dependent.  For example to indicate
street lighting, kerbing etc.

There must be at least two points on the line feature.
2021-02-24 21:49:42 +00:00
James Turner 93e2bccb0e Error reporting for submodels
Also add some error codes I forgot for AI and traffic.
2021-02-21 19:16:53 +00:00
James Turner b8b88995cf Add failure reporting / context to various places.
Not total coverage by far, but working through the list of common
failure points as seen on Sentry
2021-02-20 19:57:29 +00:00
James Turner 041c247c0f Suppress reports on some common exception throws 2021-02-20 19:57:29 +00:00
James Turner e3f4c44685 Add sg_location to all exceptions, add report flag
Move sg_location member up to the base clase, since it’s potentially
useful in more types.

Allow suppression of the report callback when the exception is thrown
2021-02-20 19:57:29 +00:00
James Turner 7b4dc51f93 Add new error reporting function / callback 2021-02-20 19:57:29 +00:00
James Turner 368cbcb377 Remove stray include of std::filesystem 2021-02-20 19:57:29 +00:00
Julian Smith 3521ed44e4 simgear/io/HTTPFileRequest.cxx: Reinstated std::function callback.
Also fixed setCallback() to call the supplied function immediately if transfer
has already finished.
2021-02-20 13:30:13 +00:00
Julian Smith 97828a8e4e simgear/io/HTTPFileRequest.*: Use fnptr rather than std::function to avoid SEGVs with g++ on Linux.
Previous code sometimes gave a SEGV in _callback's destructor when
setCallback() was called; this is on Linux with g++-8.3.0. Have tried various
alternative ways to initialise _callback but the problem persistend.

So have switched to an old-style function-pointer plus void* approach.
2021-02-18 23:20:46 +00:00
Julian Smith f9ecf455ba simgear/io/: exteded http client support to allow replaying of recordings from a URL.
simgear/io/HTTPClient.cxx
    Support range in HTTPRequest's. Set CURLOPT_MAX_RECV_SPEED_LARGE if request's
    getMaxBytesPerSec() is non-zero.
simgear/io/HTTPFileRequest.cxx
simgear/io/HTTPFileRequest.hxx
    Added 'bool append' to constructor args; if specified we assume that, if
    the output file already exists, it is from an interrupted download, and we
    use an http Range header to append any remaining data.
    Support a std::function callback when new data is available.
    Added setMaxBytesPerSec() to limit download bandwidth; useful for testing.
simgear/io/HTTPRequest.cxx
simgear/io/HTTPRequest.hxx
   Added support for setting Range header.

In both simgear/io/HTTPClient.cxx and simgear/io/HTTPRequest.cxx, if
a range is specified, we treat http results 206 'Partial Content' and
416 'Range Not Satisfiable' as success.
2021-02-18 09:30:56 +00:00
legoboyvdlp R 7f83686853 TerraSync: counter to fetch number of bytes which have been extracted from a tarball file 2021-02-14 17:08:00 +00:00
Scott Giese d1509d6096 NULL check after malloc 2021-02-13 22:25:31 -06:00
Scott Giese 469a28c49a Remove obsolete, unused variable 2021-02-13 21:44:25 -06:00
Scott Giese a1f83542cb Remove unncessary cmake policy definitions 2021-02-13 21:43:48 -06:00
James Turner 6319254d71 Fix ownership of SGLight::appendLight, using a ref_ptr
Fix some other C++11-isms as well.
2021-02-11 11:23:38 +00:00
James Turner 1ad7161465 SGLight: use copyProperties 2021-02-10 14:51:18 +00:00
James Turner 6a78bc2cdb Fix VPB compilation with OSG 3.4.x 2021-02-10 14:51:02 +00:00
Stuart Buchanan 6fb47e8e68 WS30: Random vegetation from Marc EBERHARD
Generate random vegetation of VPB tiles.  Currently
prototype that generates same vegetation for all landclass types.

Needs additional work to
a) make the scenegraph more efficient
b) support different material definitions of vegetation.
2021-02-09 17:52:52 +00:00
Stuart Buchanan bf62554da9 WS30: Apply correct technique to top-leve tile. 2021-02-09 11:20:53 +00:00
Henning Stahlke fd0e7ac2d8 Make SGLight configurable at runtime. 2021-02-08 12:43:10 +01:00
James Turner 9561895335 Text-animation: fix missing encoding specification
Ensure we can pass full UTF-8 strings into text animations. Will consider
for back-port after discussion on the devel list.

Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2512/
2021-02-07 13:02:31 +00:00
James Turner b6c0f5ba00 Particles: fix handling of world-attached particles
Fix the cull callback to continue with normal culling. Also move
where the particle frame is added to the scene graph, to be sure
we don’t modify the scene during OSG traversals.
2021-02-07 11:38:04 +00:00