Commit Graph

4112 Commits

Author SHA1 Message Date
Stuart Buchanan
c35243e215 OSG 3.2.0 compatibility and surface light effects. 2014-02-18 21:30:15 +00:00
James Turner
00d8849a28 Revise SGBucket::get_width_m
- remove the 0.5 degree offset away from the equator, which was
  causing wrap-around at the poles
- add a new helper to get the highest latitude of a tile (which may
  be +/- 90 for the polar cap tiles), and use this to compute radius
- special case the polar-caps and return a fixed, small width so
  the tile-manager loads all tiles.
2014-02-13 18:49:38 +00:00
Thomas Geymayer
6b9ce935cd Write back additional attributes to PropertyList 2014-02-13 18:27:34 +01:00
James Turner
e440aba0d2 Some Linux platforms need <cstdio> for snprintf. 2014-02-13 15:31:58 +00:00
James Turner
574d459f4e Fix MSVC build. 2014-02-13 13:23:43 +00:00
James Turner
5fa0931a89 Revised set_bucket implementation.
- sink some inline methods into the .cxx file
- add isValid test to SGBucket
- sgGetBuckets won't return invalid buckets near the poles
- additional unit tests
2014-02-13 12:36:06 +00:00
James Turner
748b13850a SGBucket unit-testing
- test polar wrapping near the 180-meridian
- test corner points for polar tiles
- expand test-macro helpers slightly
2014-02-12 16:21:16 +00:00
James Turner
9a09a6a447 Add new sibling() helper to SGBucket
- will replace sgBucketOffset eventually
- expand test coverage for both sibling() and offset function

(one test case is disabled since it fails)
2014-02-12 15:31:40 +00:00
James Turner
79c56c924f Add unit-testing for SGBucket
- as part of looking at polar behaviour, start testing the
bucket code since the code has subtleties which it would be unwise
to change.

- remove a legacy setter on SGBucket (taking two doubles as a C-array)
2014-02-11 21:49:45 +00:00
James Turner
eef73953cb Race-condition fix in get_effect.
Adapted from a fix by Jeff Biggs. (Shows up easier when using osgEarth,
and multiple osgDB pager threads)
2014-02-10 17:59:02 +00:00
Thomas Geymayer
781682f4ee Minor formatting... 2014-02-08 19:15:46 +01:00
Thomas Geymayer
4a10806352 SubsystemMgr: helper to remove all subsystems. 2014-02-08 19:15:14 +01:00
Thomas Geymayer
13ae2f08ee Put unused attributes in the property tree while parsing.
Store unhandled xml attributes in a subnode named _attr_ for each
node on parsing propertylist files. This allows retrieving them at
a later stage where there is no access to the source xml file any
more.
2014-02-08 19:12:17 +01:00
Thomas Geymayer
3e8aeccc87 New textrapezoid TexTransformAnimation.
Allows trapezoid texture transformations, as needed for example to
correct for the tilt angle of HUD combiners.
2014-02-08 12:39:43 +01:00
Thomas Geymayer
de39e0093a Canvas: Fix bounding box calculation for paths with subpaths. 2014-02-08 00:22:36 +01:00
Thomas Geymayer
943f52aedf Canvas::Element: expose combined transformation matrix 2014-02-06 17:55:51 +01:00
James Turner
46eb2f439d MSVC lacks stdint.h / inttypes.h
- we can't use simgear/misc/stdint.hxx here, since it's a C++
header and md5.c is compiled as plain C (no bool type available).
2014-02-06 12:10:34 +00:00
James Turner
4f5c519636 Replace md5 from RSA with OpenBSD version
- no more BSD-with-advertising-license
- files from http://sources.debian.net/src/dpkg/1.17.6/lib/compat
(with SG_ prefixes to avoid collision issues)
2014-02-06 10:42:41 +00:00
James Turner
8f6677974e Mac: fix static linkage
- Link against Cocoa, not CoreServices (for NSFileManager)
2014-01-28 12:39:28 +00:00
James Turner
0f5cbc35a2 Apple directory helpers
- drop use of deprecated FSFindFolder (use NSFileManager)
- support Downloads and Pictures directories
2014-01-28 11:16:19 +00:00
Thomas Geymayer
c54b1e037a SGPath: typo... 2014-01-28 00:42:20 +01:00
Thomas Geymayer
0d19be2196 SGPath: generalize retrieving standard locations (and add more) 2014-01-28 00:32:08 +01:00
James Turner
c1b579ec5d Remove jpeg-factory.
(FlightGear can now do the same, without the helper class)
2014-01-27 09:19:11 +00:00
James Turner
0a8246c676 Add desktop() accessor to SGPath
(Windows-only for the moment)
2014-01-26 16:03:31 +00:00
Torsten Dreyer
ea02453f63 fix typo
Thanks to Alex Romosan
2014-01-24 11:10:34 +01:00
James Turner
d1942da317 Remove some debug log messages
- two uninformative ones in TextureBuilder
- very noisy one in tied-property-list
2014-01-23 13:51:18 +00:00
James Turner
ed9764f923 Fix spurious event-mgr warnings
- don't warn on removeTask if the event-manager was already shutdown,
  as happens during normal FG shutdown or reset.
2014-01-23 12:49:39 +00:00
James Turner
3b5ed81216 Crash-fix: make mat-lib reference counted.
Make SGReaderWriterOptions own the material lib it's passing to
loader code, so it cannot be freed unexpectedly.
2014-01-19 16:45:01 +00:00
Torsten Dreyer
12d0d4140e Version 3.1.0 2014-01-17 21:59:58 +01:00
Torsten Dreyer
d6c8008978 No double-zero for the version number :-/ 2014-01-17 21:49:13 +01:00
James Turner
488ca0fcc5 Remove a noisy log message from the Terrasync code. 2014-01-17 17:46:46 +00:00
James Turner
dfd15cadab Bug-fix - short-circuit path validation.
When an SGPath is empty, don't bother stat()-ing. This avoids
an uninitialized-memory read inside the C-runtime on Windows.
2014-01-17 17:26:29 +00:00
James Turner
1613257bdc Ensure type tag of contextId binding is set.
(Otherwise defaults to DOUBLE).
2014-01-17 16:27:54 +00:00
Torsten Dreyer
1061580118 Version 3.0.0 2014-01-16 21:47:13 +01:00
James Turner
7184828a58 Support a 'clear' operation on SGBinding.
Needed to bug-fix a problem with the menubar on Mac - post-3.0 I will
change the behaviour of SGBinding's destructor to avoid the property
copies in other use-cases.
2014-01-15 21:56:26 +00:00
Thomas Geymayer
0428adff03 CanvasMap: Expose property screen-range.
Only allowing a hardcoded screen range of 200 units
is not very flexible...
2014-01-09 19:36:38 +01:00
James Turner
04246f0a63 HTTP: tweak response parsing.
Signal a parse failure via an exception, instead of via a status
code, since this is hard to disambiguate from a valid server-side
status code.
2014-01-07 16:22:10 +00:00
James Turner
61df58d651 Terrasync: update fixes.
- Fix a nasty issue when updating existing repositories, which could
cause repository corruption and hence repeated re-syncs.
2014-01-07 14:24:01 +00:00
James Turner
1bd9a440e8 HTTP: tweak for malformed header handling. 2014-01-07 14:24:01 +00:00
Thomas Geymayer
d82c8eb945 Socket: do not crash on writing to broken pipe.
Writing to a closed socket on all Unix/Linux systems raises
a SIGPIPE signal which immediately closes the program. Disabling
raising of SIGPIPE allows proper error handling by checking the
return values of send/sendto and getting the EPIPE in errno.
2014-01-06 12:17:59 +01:00
James Turner
becbad7ea4 Crash fix: use cache to find materials.
Add a thread-safe cache of the currently valid materials, to avoid
the osgDB thread making repeated SGCondition evaluations in conflict
with the main thread.

(Requires an accompanying FG change)
2014-01-06 08:26:48 +00:00
Thomas Geymayer
2335796a28 Fix track-to animation basic tracking without slave object 2014-01-05 19:38:03 +01:00
James Turner
c6330b64f6 Bugs 1207, 1301
Only apply the fix for time-zone offsetting on Windows, since Unix
is handling mktime differently. (Arguably we should also apply a
conversion for Unix systems, but the previous logic worked)
2014-01-03 19:51:58 +00:00
James Turner
df57a23512 #1207: Add helper to get Unix time in GMT
On Windows, time() is returning a value which if offset by the
selected time-zone. Provide a variant which is always in GMT.
2014-01-01 21:03:24 +00:00
Thomas Geymayer
aea71cf0af HTTPFileRequest: only save file if status == 200 2013-12-30 01:31:47 +01:00
James Turner
fb54386f8d Bugfix: remove SGSky minimum distance check.
Without this, various sky rendering modes exhibit artefacts in low-
visibility conditions. The cost of always rendering the dome is 
negligible. (And Rembrandt already had to work this way)
2013-12-19 17:20:06 +00:00
Rebecca Palmer
4d931b6109 Fix test failure on char-unsigned-by-default architectures (eg. ARM)
(from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=722115 )
2013-12-19 15:02:07 +00:00
Rebecca Palmer
407c7a10f5 Fix buffer overflow CVE-2012-2091 (thanks to Saikrishna Arcot)
https://bugs.launchpad.net/ubuntu/+source/simgear/+bug/1077624
(discussed in comments 65-78)
(This is already fixed in 2.12 but appears to have been forgotten in 2.99;
the other vulnerabilities described there are already fixed.)
2013-12-19 15:02:07 +00:00
James Turner
16fa4d1d17 Security: fix 0777 directory permissions to 0755. 2013-12-19 14:56:23 +00:00
James Turner
1ecccd43d4 Fix a typo breaking Mac build. 2013-12-15 20:55:02 +00:00