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
James Turner
48145fb234
Fail HTTP request with missing/illegal protocols.
...
Instead of throwing, run the failure handler for requests with
either a missing spec or something other than http:// (eg, https
or ftp)
2013-10-20 23:20:49 +01:00
James Turner
49730cadee
Placement can contain multiple nodes.
...
- Allow placement to have multiple children added.
- Remove legacy position setting APIs, enforce use of SGGeod
2013-10-20 20:44:42 +01:00
James Turner
8b0c246a7b
Avoid a divide-by-zero on malformed BTG files.
...
Encountered while testing v850 airports; some airports
generate materials with no tris, and hence no indices.
This causes a divide-by-zero when computing the index stride.
Detect this, and convert the BTG reader to throw exceptions
in error conditions, and to catch this and report the
appropriate result code.
2013-10-17 20:13:50 +01:00
James Turner
9c4face1ae
Fix float-int conversion bug caught by Clang
2013-10-17 20:13:49 +01:00
James Turner
952e2e6631
Fix unused-var warnings from Clang.
2013-10-17 20:13:49 +01:00
James Turner
4766910413
Terraysnc: don't block requests when inactive.
...
Add the same check for data files so we don't block when terrasync is
disabled.
2013-10-17 17:29:06 +01:00
James Turner
3c2f97a8d2
Re-order install(EXPORT ) lines.
...
Certain cmake builds/versions complain when a dependent target is
exported but dependencies are not. Export SimGearCore before
SimGearScene.
2013-10-17 17:12:02 +01:00
James Turner
f75730f165
Initial work on syncing non-scenery data.
...
This is some initial pieces to synchronise other pieces of base
data than scenery via the sync mechanism. An additional sync slot is
added to avoid scenery or other data blocking each other.
2013-10-17 16:39:29 +01:00
James Turner
b596e62a61
Remove some iostream debugging.
...
Accidentally committed this debug stuff, remove it.
2013-10-17 16:35:36 +01:00
James Turner
1349d48339
Export SimGear config to cmake.
...
Experimenting with this, should make FindSimGear module unecessary,
and avoid mis-matched SG/FG cmake settings in the future.
2013-10-17 16:10:18 +01:00
James Turner
d69ea5fda6
Kill off EMBEDDED_SIMGEAR
2013-10-17 16:09:39 +01:00
James Turner
9e3172cb04
Another attempt to make MSVC happy!
...
C89 requires variable declarations upfront.
2013-10-09 12:26:29 +02:00
James Turner
426c6b9a72
Linux needs <cstring>
2013-10-09 11:58:51 +02:00
James Turner
d148bdedcd
Fix MSVC build, no C99 so no round().
...
(Doesn't use SGMisc<T>::round, since Nasal is pure C)
2013-10-09 11:52:54 +02:00
James Turner
23140e3bf7
Avoid a data copy decoding base64 data.
...
Use an out parameter to avoid a buffer alloc/copy/free cycle
when returning base64-decoded data.
2013-10-09 10:03:30 +02:00
James Turner
2f023803e7
Refactor HTTP content-encoding support.
...
Move content-encoding handler into its own file, which
simplifies the main code. As part of this, fix a bug where we
didn't flush the ZLIB buffers on response completion.
2013-10-09 10:03:28 +02:00
James Turner
d658b5fc38
Use std::string.append, avoid string copying.
...
Removes a hot-spot on the SVN update path.
2013-10-09 10:03:27 +02:00
James Turner
68cd84c330
Make base64 decode significantly faster.
...
Use a reverse lookup table instead of a call to string.find for
each input byte, much speedier.
2013-10-09 10:03:27 +02:00
James Turner
0bd82a43d3
Check for DAV status parse failures.
2013-10-09 10:03:26 +02:00