Commit Graph

5639 Commits

Author SHA1 Message Date
Fernando García Liñán
f1212dfa73 Initial support for texture arrays in Effects 2020-12-03 18:36:56 +01:00
James Turner
191d546b54 TerraSync: stronger fix for handling 0-byte files
Change logic so we create an empty file for such cases, i.e exactly
matching the repository. This simplifies logic in downstream code,
compared with not creating a local file.

Add a test-case to cover this

Modify TerraSync to detect a failure of Airports_archive downloading,
and fall back to file-by-file updating.
2020-12-03 16:40:48 +00:00
James Turner
57a4dc53f2 HTTPRepository: don’t crash on empty files
Fix some additional crash cases around 0-length files
2020-12-02 21:28:37 +00:00
James Turner
e370477e4e Unzip: adjust error reporting mechanism
Don’t use local exception throw+catch to report failures in extracting
a zip archive, since this generates noise in Sentry.
2020-12-02 12:12:56 +00:00
James Turner
c88b8b201a State-machines: don’t require name for transitions
Allow anonymous transitions, since the name is purely informational
(unlike for states).

Sentry-Id: FLIGHTGEAR-9H
2020-11-30 16:17:59 +00:00
Nathaniel Warner
fee2c592c0 Use observer_ptr in OrthophotoManager 2020-11-29 15:02:09 -08:00
Stuart Buchanan
023a3de5f1 WS30: Landclass to material mapping
Using indirection in materials.xml

<landclass-mapping>
  <map>
    <description>111 - Continuous urban fabric</description>
    <landclass>1</landclass>
    <material-name>Urban</material-name>
  </map>
</landclass-mapping>
2020-11-29 19:28:58 +00:00
James Turner
de268300fb TerraSync: fix crashes with null file return
Not sure how this is happening, but, check for a null file object
in FileGetRequest::onDone.
2020-11-29 16:22:21 +00:00
Scott Giese
79252d889c Merge branch 'next' of https://git.code.sf.net/p/flightgear/simgear into next 2020-11-27 17:56:52 -06:00
Nathaniel Warner
ca38d9110c Fix orthophotos not being cleaned up on scenery reload 2020-11-27 17:54:28 -06:00
Stuart Buchanan
6ece39e34c Set minimum expiry time on STG nodes. 2020-11-26 22:55:56 +00:00
Scott Giese
aab373ac3a Model Loading: Overlays
Cannot copy overlays until the props has been read.
Ticket: #2429
2020-11-24 11:26:57 -06:00
Nathaniel Warner
d4d149f3c0 Rebase photoscenery patch on next 2020-11-23 17:49:24 -06:00
Scott Giese
59809ab61f smell: avoid uncasting with left-shift 2020-11-23 16:17:28 -06:00
Scott Giese
7673da3832 smell: throwing heap object
null check.
2020-11-23 16:16:14 -06:00
Scott Giese
112c9a110b smell: potential div-by-0 2020-11-23 16:14:37 -06:00
Scott Giese
59e62b1414 warning: unreachable code 2020-11-23 16:13:43 -06:00
Scott Giese
43bf10d803 warning: defined but not used 2020-11-23 16:12:07 -06:00
Scott Giese
20bcb0f245 warning: defined but not used
clean up whitespace.
2020-11-23 16:11:08 -06:00
Scott Giese
c469f072f1 warning: ‘Active’ will be initialized after 'CanWait' 2020-11-23 16:08:55 -06:00
Scott Giese
62f3923692 warning: comparison of integer expressions of different signedness 2020-11-23 16:07:39 -06:00
Scott Giese
03abb674dc warning: unused variable ‘fd’ 2020-11-23 16:06:43 -06:00
Scott Giese
f6e63e1831 warning: unused variable ‘idx’ 2020-11-23 16:05:03 -06:00
Fernando García Liñán
cc8b2bbf72 Add support for anisotropic filtering in Canvas 2020-11-23 16:33:09 +01:00
Stuart Buchanan
0a37986551 Use ref_ptr for ReaderWriterSPT 2020-11-21 21:45:09 +00:00
Chris Frey
04ca40ad81 tgdb: check result of readRefNodeFile and log 2020-11-21 21:41:10 +00:00
Chris Frey
42ceb429a7 Small spelling/grammar fix in comments in ReaderWriterSPT.cxx 2020-11-21 21:39:17 +00:00
Chris Frey
6ae7eb31a6 BucketBox: fixed possibility of writing one past the end of the given array 2020-11-21 21:38:19 +00:00
Richard Harrison
5d5f1779c6 Reduce severity of ".." at model root
It seems more sensible to return nullptr rather than throwing an exception.
2020-11-21 14:56:16 +01:00
Richard Harrison
2cb6499f1c Model loading; overlay properties earlier
This is to permit an <overlay> section in <model> to be present whilst the rest of the model is loaded - otherwise the overlay is only present after the model is loaded;

e.g. to allow a model specific registration to be applied to a shared model;

    <model>
        <overlay>
            <texture-file>island_68.png</texture-file>
            <carrier-name>Nimitz</carrier-name>
            <carrier-registration>CVN-68</carrier-registration>
        </overlay>
        <path>nimitz-class.xml</path>
    </model>
2020-11-21 14:56:16 +01:00
Julian Smith
e2596eaeea simgear/debug/logdelta.cxx: remove initial diagnostic if SG_LOG_DELTAS uset. 2020-11-21 12:17:59 +00:00
Scott Giese
da39e30439 METAR: mitigate wind sensor failures 2020-11-20 21:13:47 -06:00
Automatic Release Builder
15c6f73136 Catalogs: fix ownership of new Catalogs
When doing the initial download of a Catalog, ensure we still keep
an owning ref to it.
2020-11-18 17:32:10 +00:00
Fernando García Liñán
da53e8fb1b Make sure we render the CameraGroup cameras one after another 2020-11-18 14:30:06 +01:00
Stuart Buchanan
1852e3c7fc Use BB radius rather than range for STG entries
Also remove excess logging from TREE_LIST
2020-11-17 21:34:57 +00:00
Stuart Buchanan
25d922cf6b TREE_LIST STG verb
Add a TREE_LIST STG analogous to the existing BUILDING_LIST verb

  TREE_LIST <filename> <material name> <lon> <lat> <elev>

where <filename> is a file containing a set of trees to generate
using the defined <material name> at the given location.

The referenced <filename> contains lines of the form

X Y Z A B C

Where:
- X,Y,Z are the cartesian coordinates of the tree. +X is East, +Y is North
- A,B,C is optional and represents the normal of the underlying terrain.  Used for shadows.  Defaults to (0,0,1)
2020-11-17 21:17:04 +00:00
Stuart Buchanan
158ac28e60 Add a range noun to STG verbs
Previously the PagedLoD range for OBJECT_STATIC etc. was purely
measured from the object reference point.  For large meshes from
osm2city this was problematic, particular at DETAILED LOD ranges,
where the range of (say) 1500m would result in the mesh being
rendered at 500m distance from the edge.  We fudged this by adding
1400m to the DETAILED LOD range.

Now, such meshes can specify their radius in the STG file, ensuring
they are loaded at the correct distance.
2020-11-17 19:56:01 +00:00
Richard Harrison
02b20462e1 DDS-TC add option to exclude all Canvas orignated images. 2020-11-17 19:08:38 +01:00
Richard Harrison
be6d28557a Emesary : change to use scoped lock
- scoped locks using lock_guard are better
- because of this the exception handler can also be removed;
  although this was originally intended to manage the locks
  it never did work properly with C++ exceptions.
2020-11-17 19:08:38 +01:00
Richard Harrison
cac3739a6b Emesary: add missing property initialisation to constructor 2020-11-17 19:08:38 +01:00
Julian Smith
d98d893f3e simgear/props/props.cxx: use rmutex to protect SGPropertyNodeListeners.
Also added asserts to check _num_iterators always >= 0.
2020-11-17 15:08:25 +00:00
Julian Smith
79e1ea02ab simgear/debug/logdelta.cxx: protect cache with a std::mutex. 2020-11-17 15:08:25 +00:00
Fernando García Liñán
a77551aa02 Only merge fallback effects if the Effect hasn't been realized yet 2020-11-17 15:21:49 +01:00
Fernando García Liñán
31170b11a0 Fix frustum parameters not being initialized 2020-11-17 13:08:30 +01:00
Fernando García Liñán
42ee05fd0e Check for 0 value before doing log2 2020-11-17 12:34:03 +01:00
Fernando García Liñán
79b858d6d8 Replace more references to GL_RGBA32F with GL_RGBA32F_ARB 2020-11-16 16:39:30 +01:00
Fernando García Liñán
6ae0dba659 Fix compilation issue on Mac and other graphics drivers 2020-11-16 16:19:27 +01:00
Fernando García Liñán
8f214fff7d Make Compositor default
- Remove prepending shader filenames with Compositor/.
- Always check for fallback effects in Effects/schemes.xml.
- Shadow mapping can now be disabled at night.
- New clustered shading implementation for older systems (GLSL 120 compatible).
- Miscellaneous bug fixes.
2020-11-16 13:21:51 +01:00
Erik Hofman
c9e23231da Keep the region name with the material. 2020-11-15 09:29:26 +01:00
Stuart Buchanan
94630733ff WS3.0: Pass tile_level, tile_width, tile_height
Create Uniforms for the tile_level, tile_width and tile_height.

These can be used by the fragment shader to determine the level
of detail to render and also to perform samples for borders of
landclasses.
2020-11-14 21:01:55 +00:00