Move osg dependent stuff from SGMath into simgear/scene/util/OsgMath.hxx.
Update includes in simgear to reflect this change.
Note that this change also requires an updated flightgear version.
Stuart Buchanan [Fri, 2 Mar 2012 23:04:18 +0000 (23:04 +0000)]
Evaluate <condition> statements in materials.xml at tile loading time
rather than on startup. This will allow changing between winter and
summer textures in-sim, and also allow more interesting regional
textures to be defined.
Better seperation between the rti and the hla level
of classes. Decouple object model setup from the
need to connect at a federate. Fix alignment computations
for the standard hla data types. Work towards an
interaction class abstraction. Add more flexibility in
deriving from the base classes and adding callbacks.
Stuart Buchanan [Sun, 26 Feb 2012 22:38:38 +0000 (22:38 +0000)]
Handle dds object masks properly:
1) Only flip the object-mask if the texture xor the object mask is dds
2) Handle NTFS file systems where the extension may be .DDS rather than .dds.
Introduce read{RTI13,RTI1516,RTI1516E}ObjectModelTemplate
methods. Deprecate the current readObjectModelTemplate method
and provide a short term upgrade path.
Torsten Dreyer [Wed, 15 Feb 2012 13:54:02 +0000 (14:54 +0100)]
Don't untie a property when loading from xml
executing the fgcommand loadxml implicitely untied every previously
tied property if a property type was given in the property element.
That made it impossible to autosave aircraft data for tied properties.
This patch should fix this. It adds an inconsitency, though:
if a property with a given type is read in which has been tied to
before and the property types do not match, the property type in the
xml file will be ignored.
ThorstenB [Sat, 11 Feb 2012 09:55:13 +0000 (10:55 +0100)]
#658: better bugfix for findDataFile issue
Fixes the more basic probelm of "SGModelLib::findDataFile" resolving an
empty file name to the fgdata (directory) path. findData_File_ should
never return a _directory_ path, only valid _file_ names.
ThorstenB [Sat, 11 Feb 2012 08:54:53 +0000 (09:54 +0100)]
#658: avoid crash when Textures.high is missing
Don't resolve the empty file name, which would result in the fgdata
directory path (instead of a path to a file). Eventually this resulted in
a segfault, partly due to a bug in "osgDB::readImageFile", which reports
"success" when given a directory (instead of a file) path, though it
doesn't return a valid image object.
Do not disable the portability warnings on mac/win.
Since the message should help people doing textures to
provide texture files that run everywhere, do not omit
the messages just because the build platform did not
know these.
Log images containing data depending on an extension.
Print a descriptive warning on images that are given
in a texture format that do only work in presence of an
extension that might not be there at runtime.
Stuart Buchanan [Mon, 2 Jan 2012 23:10:20 +0000 (23:10 +0000)]
Adjust LoD ranges for 3D clouds so that they become visible at maximum range, taking into account the current cloud visibility range, and the possible size of the clouds themselves.
ThorstenB [Sun, 18 Dec 2011 16:04:31 +0000 (17:04 +0100)]
#479: avoid issues due to trailing path separators
Cut trailing separators when converting from string to sgpath.
Also, SGPath::fix does NOT replace ":". It only replaces "\" with "/",
so the "i!=1" check for Windows made no sense (rule #9: never believe
a source code comment).
Return ReadResult::FILE_NOT_HANDLED for unknown extensions.
This fixes a problem with fonts no longer being correctly
loaded as a side effect of the spt meta object loader.
The readObject slot is obviously being called for several
unrelated file extensions. To make sure the search continues,
osgDB::ReaderWriter::ReadResult::FILE_NOT_HANDLED needs to
be returned in this case.
ThorstenB [Sun, 4 Dec 2011 19:16:36 +0000 (20:16 +0100)]
sound: fix "source" resource leak
Sound resources were eaten up when a sample could not be loaded.
Restores sound for aircraft attempting to use stereo files for sound effects.
However, when loading fails, sound code still tries to load the same file
again and again (always resulting in the same "stereo files not supported"
error), which slows down simulation.
ThorstenB [Fri, 25 Nov 2011 11:06:54 +0000 (12:06 +0100)]
CMake: Proper support for lib vs lib64 installation
Determine name of library installation directory, i.e. "lib" vs "lib64",
which differs between all Debian-based vs all other Linux distros.
See cmake bug #11964, http://cmake.org/gitweb?p=cmake.git;a=commit;h=126c993d
Also provide a script for older (<=2.8.4) cmake
Erik Hofman [Wed, 23 Nov 2011 08:41:13 +0000 (09:41 +0100)]
Slightly rearrange the buffer removing code. This should make sure the source is always stopped (required by the OpenAL spec) before a buffer is removed and added to the free source list.