James Turner
ce7f78e0ca
Remove use of ‘register’ keyword in this file.
...
Clang is now warning about this, and it’s certainly useless.
2015-02-12 16:21:15 +00:00
James Turner
6323477a35
Tweak warning flags, for newer Clang.
...
No functionality changing, just less spam in the compile logs.
2015-02-12 16:21:15 +00:00
James Turner
1bf0b7222d
Explicitly force libc++ on clang
2015-02-11 15:46:01 +00:00
James Turner
b2ac9982d4
Better CMake policy detection
...
- thanks to Rebecca Palmer for suggesting this!
2015-02-10 17:11:31 +00:00
James Turner
84cbfb2e98
Cmake policies conditional on Cmake version.
2015-02-09 16:42:40 +00:00
James Turner
7479cadbba
Switch 10.7 on Mac and revert to using libc++
...
(Deployment on libstdc++ with the 10.9 SDK is just too painful)
2015-02-09 15:12:21 +00:00
James Turner
f711306085
Force SDK version / C++ library on Mac.
2015-02-08 13:46:09 +00:00
James Turner
ddd9691439
Explicitly track not-found responses from SVN.
...
When SVN reports a path is not found (ocean tile), track
this data explicitly and cache the result. Reduces backend
hits for missing tiles.
2014-12-01 17:49:03 +00:00
James Turner
1b7f310ea6
Merge FreeBSD patches.
...
Taken from:
http://svnweb.freebsd.org/ports/head/devel/simgear/files/
2014-11-11 22:29:24 +00:00
James Turner
bb5e07d958
Package: support for variants
...
- Catalog keeps a map from variant IDs to packages
- Package caches its ID
- Refreshing a catalog updates existing Package instances
Dropping a package from a Catalog will now warn, need to decide
a real policy for this scenario.
2014-06-15 19:55:50 +02:00
James Turner
edbfbd769e
Package: expose file size property.
2014-06-12 18:43:27 +01:00
James Turner
dc60cf0e67
Pkg: record live installs in Catalog.
...
Ensures active Installs can be found immediately after creation.
2014-06-12 18:43:27 +01:00
James Turner
083b364afd
Pkg: qualified ID accessor.
2014-06-12 08:50:09 +01:00
James Turner
a8c8148068
Package::existingInstall helper.
2014-06-10 21:21:30 +01:00
James Turner
67a8d8049f
Package::match case-insensitive string comparison
2014-06-01 11:35:26 +01:00
James Turner
c3670b211f
Substring search of package name/description.
...
Note this only searches the current locale, should potentially also
search the default locale too.
2014-06-01 11:28:10 +01:00
James Turner
da6ab1eabc
Add installedPackages() to Catalog.
2014-05-31 18:00:38 +01:00
James Turner
e3ddcbe2dd
Update package classes ownership model.
...
Use SGReferences as the base for package classes, so they can be
exposed directly to Nasal by cppbind.
2014-05-31 16:47:12 +01:00
James Turner
4bd8fe5855
Fix bad Nasal parse of ‘foo[]’.
...
When a vector subscript is empty, don’t parse it as ‘[foo]’, instead
print a parse error.
Fix by Nicholas Scheel & Thomas Geymayer.
2014-05-27 10:05:17 +01:00
James Turner
15d3c12139
Fixed for FreeBSD
...
(From Gerald Laplanche)
2014-04-03 13:42:11 +01:00
James Turner
c925b7b601
Don't leak cube-map textures
...
- use observer_ptr so cube-map textures are released without the
builder holing a ref.
2014-03-13 22:16:58 +00:00
James Turner
966789de90
Fix leak of object-mask textures
2014-03-13 22:16:00 +00:00
James Turner
f40efe66fa
Simplify copyProperties
...
- with initial-state save/restore gone, all uses of
copyProperties are now simple. For selective copying, use
copyPropertiesWithAttribute.
2014-03-11 08:32:33 +00:00
James Turner
4ea8e4774e
Remove unused cube-map from 2D clouds.
2014-03-05 14:42:29 +00:00
James Turner
18ff03acdf
VBO switch also controls random-buildings.
2014-03-05 10:20:48 +00:00
James Turner
a8d7645004
Code cleanups.
...
(no functionality change)
2014-03-04 16:05:36 +00:00
James Turner
081aafb914
Allow clouds to be toggled on/off
...
- Change the cloud-root Group to a Switch
2014-02-28 11:06:47 +00:00
James Turner
bd5bc9cda0
TerraSync: expose method as public
...
- needed for command-line terrasync util.
2014-02-25 09:13:16 +00:00
James Turner
db684eb33e
HTTP: improve handling of connection errors
...
- handle 'whole connection' errors consistently, e.g. EUNREACH
which can occur with intermittent connections.
2014-02-24 19:41:14 +00:00
James Turner
a07cfdb683
Remove obsolete TerraSync methods.
...
- all scheduling is now done via paths/buckets, not lat+lon.
2014-02-24 18:45:57 +00:00
James Turner
b956a2c834
Sky: expose OSG branches as Groups.
...
- avoids creating additional groups in Renderer
2014-02-24 18:45:57 +00:00
James Turner
ba38688a83
Fix failing BucketBox test
...
- improve behaviour of floorWithEpsilon helper in bucket code, and
use in more places so that near-integral values are rounded correctly.
2014-02-24 18:03:17 +00:00
James Turner
32a6bd78d8
Make return type from loadPagedModel explicit.
...
- explicitly return osg::PagedLOD instead of Node, so callers
don't need to rely on documentation + cast to get the LOD
settings on the result.
2014-02-22 16:24:47 -08:00
James Turner
3b5665fe92
Only disable display lists if using VBOs.
...
(Otherwise we fall back to very slow submission)
2014-02-19 15:10:48 -08:00
James Turner
b4f4ef9c5b
Optionally deprecate parts of SGBucket
...
When NO_DEPRECATED_API is set, remove portions of the
SGBucket API.
2014-02-19 14:06:48 -08:00
James Turner
3c4c05fb3e
Fix GCC 4.6 / Ubuntu compile failure.
2014-02-19 14:05:26 -08:00
James Turner
b0cad59508
Raise required OSG version to 3.2.0
2014-02-19 10:58:39 -08:00
James Turner
d4030e72e4
Runtime VBO option in BTG loading.
2014-02-18 19:58:19 -08:00
James Turner
481f7e3bfa
Technique selection: fix shader-language
...
(Also add a glsl-supported test to simplify Effect logic)
2014-02-18 19:56:24 -08: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
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
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
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
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
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
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
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
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
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
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
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
James Turner
2edbb1cf8b
Reset: clear some property references.
2013-12-15 20:48:30 +00:00
James Turner
890cc46825
Reset: alternate property copying strategy.
...
Search the tree for leaves / sub-trees with a particular attribute set.
This permits both sparse selection as well as selection by sub-tree.
(This is needed for PRESERVE attribute, and once new reset is switched
on, will enable 'normal' copyProperties to revert to ignoring
attributes completely)
2013-12-10 17:37:37 +00:00
James Turner
6b0f7e8512
Quiet a message.
2013-12-09 23:28:52 +00:00
James Turner
3ec9c7ae6e
Canvas: clear elements in shutdown()
...
- without this change, elements aren't un-ref-ed and hence destroyed
until the actual dtor runs, which is too late (other systems may be
destroyed already)
2013-12-06 18:14:48 +00:00
James Turner
e326d0c756
Work around a clang/libc++ issue.
2013-12-06 18:03:35 +00:00
James Turner
26d9256ee9
Reset: hook to clear the effects cache.
2013-12-04 09:12:51 +00:00
James Turner
053e761d8f
Reset: don't leak EffectPropertyListener.
...
Track and free listeners from effect expressions.
2013-12-03 21:36:18 +00:00
James Turner
7bbec8dbcb
Reset: allow re-init of Nasal Ghosts.
...
After discussion with Thomas, reset needs the scenario this assert
was designed to guard against, so removing it for now.
2013-11-23 20:06:47 +00:00
James Turner
10375086ed
Allow Command-manager singleton to be deleted.
...
(Shutdown can delete commands in an orderly way)
2013-11-23 20:00:23 +00:00
James Turner
dd367daac9
Fix another SVN crash on failure.
2013-11-19 21:33:50 +00:00
James Turner
80ff0282c3
Give terrasync a custom HTTP UA.
2013-11-16 09:45:40 +00:00
James Turner
e973e406a3
Fix some SVN errors/crashes.
2013-11-15 11:47:36 +00:00
James Turner
3e9ed08c53
Reset: use ref-counting to own subsystems.
...
Change the subsystem-group and manager code to use shared-ptr references
to subsystems, instead of holding a raw pointer. Hence the manager becomes
the owning ref to most subsystems.
2013-11-12 23:12:45 +00:00
James Turner
b7df9026c0
Reset: Terrasync root can change, can be shutdown.
2013-11-12 23:04:13 +00:00
James Turner
6527c6357b
Reset: clean event-manager shutdown
2013-11-12 22:23:19 +00:00
James Turner
fad333256c
Reset: DeletionManager can be uninstalled
2013-11-12 22:23:14 +00:00
James Turner
8753811fe1
Remove exceptions on missing texture names
2013-11-12 22:23:09 +00:00
James Turner
237752ff62
String case conversion, UTF-8 conversion.
2013-11-12 22:17:12 +00:00
James Turner
d84394efa0
Tweak HTTP code to always sleep.
...
Check explicitly for the 'no channels' case and
sleep instead, to avoid busy-waiting. (This is a work-
around, the underlying issue still be be traced)
2013-11-06 15:11:46 -08:00
James Turner
dd613d48bc
Reset: pin ctor and dtor of event manager.
2013-11-05 05:21:57 +00:00
James Turner
2e8e500d4f
Reset: commands can be removed
2013-11-05 05:21:52 +00:00
James Turner
48f866dcc6
TerraSync: avoid assert on missing file
2013-11-05 05:17:57 +00:00
James Turner
2f42a8714c
Terrasync: don't busy wait when no requests are running.
2013-10-28 14:51:52 +00:00
James Turner
94326fd964
Windows logging changes
...
- can log to the debugger (MSVC output window) via OutputDebugStr
- logging to the console is optional, triggered by new
requestConsole hook()
2013-10-26 21:04:16 +01:00
James Turner
f26f3b606d
Fix handling of SGPath::rename
...
Windows handling of ::rename differs from POSIX when the new name
exists. Check for this case on Windows and remove the file manually.
(This allows a work-around in SVNDirectory to be removed)
2013-10-26 21:03:00 +01:00
James Turner
d896e71ae9
Add total bytes downloaded tracking.
2013-10-24 23:35:44 +01:00
James Turner
95f77ef81d
Ooops, fix INSTALL rule.
...
We need the rule, just not the export, for now.
2013-10-23 14:18:39 +01:00
James Turner
c4e7d26b70
Comment out Cmake export experiments for now.
...
This is breaking CMake 2.6, so commenting out for the moment, until
I understand how to support this portably.
2013-10-22 13:42:59 +01:00
James Turner
ea49a1a07b
Fix GPS activation on Windows.
...
Bug 1190, fix route-manager -> GPS activation on Windows
(and probably a couple of unrelated issues).
SGPropertyChangeCallback was missing a suitable copy-constructor,
leading to incorrect behaviour on compilers where the operation
is not elided. Such as MSVC.
2013-10-22 00:42:31 +01:00
James Turner
784223c67f
Fix Dir warnings on Windows.
...
Test result of GetLastError so we don't log a warning in the
'nothing matched' case. Makes early startup logging much
more pleasant, especially when scanning aircraft dirs.
2013-10-21 23:51:19 +01:00
James Turner
77aa2c9a9d
Smoother download rate from HTTP
...
Crude filtering (low pass) of the download rate, over a 400msec
time window.
2013-10-21 23:08:55 +01:00