Add MAC OS X Render Texture support:
Most texture modes seem to work on my Powerbook, but I don't have a wide array
of machines to test it on otherwise.
If you have problems, please let me know and I'll see if I can help track down
the source of the bug. I'd love to keep working on it if time permits (I use
RenderTexture in a few other projects), so I'll keep you informed if there are
any changes that I make for the better.
add abstract class SGModelData. If a pointer to such a class is handed over
to sgLoad3DModel, then its modelLoaded() method is called with path, property
node and branch. And then it's added to the scene graph so that it's
destroyed when the model branch is removed from the graph.
modellib.[ch]xx:
only cache objects when asked to. This is the case for OBJECT_SHARED
and random objects (like before), but no longer for OBJECT_STATIC.
These are now removed from the graph when they are "out of sight". This
prevents accumulation of static models, and makes destroying model data
possible (e.g. removing Nasal modules)
matmodel.cxx:
set cache flag for random objects (same behavior as before)
- don't unlock an already unlocked mutex (Someone wanted to be on
the safe side with this, but the result is undefined and makes
pthread_mutex_destroy fail. Reference: manpage for
pthread_mutexattr_gettype/The Open Group[1]: "Attempting to
unlock a mutex of this type which is not locked results in
undefined behaviour.")
- re-enabled all subsystem destructors again (this has been disabled
because fgfs hung on exit, due to the mutex destroy failure from
above.)
Reference:
http://www.opengroup.org/onlinepubs/007908799/xsh/pthread_mutexattr_gettype.html
- new FSF address
- removed a few hundred trailing spaces
- fixed a few $Id$ lines
- copied two license headers from *.hxx files to their respective
*.cxx counterparts
- added two test aps to .cvsignore
- don't unlock an already unlocked mutex (Someone wanted to be on
the safe side with this, but the result is undefined and makes
pthread_mutex_destroy fail. Reference: manpage for
pthread_mutexattr_gettype/The Open Group[1]: "Attempting to
unlock a mutex of this type which is not locked results in
undefined behaviour.")
- re-enabled all subsystem destructors again (this has been disabled
because fgfs hung on exit, due to the mutex destroy failure)
This patch makes use of the vectors now available in simgear with that past
patch. And using that it simplyfies the carrier code somehow.
- Small additional factory's to the quaternion code are done in the simgear
part. Also more explicit unit names in the factory functions.
- The flightgear part makes use of them and simplyfies some computations
especially in the carrier code.
- The data part fixes the coordinate frames I used for the park positions in
the carrier to match the usual ones. I believed that I had done so, but it
was definitly different. Also there are more parking positions avaliable now.
- change SG back to FG (this was accidently changed in three wrong
places when I prepared the file for SG)
- correct length for the proxy id detection
- set (guessed) deposit depth < 1mm correctly
- set deposit type string
- formatting
This patch fixes the sound of 737, Concorde and others, if fgfs
was compiled with newer gcc versions (e.g. gcc 4.0.2). These compilers
implement the c++ standard more strictly, and thus don't guarantee
that c-style casted pointers to different data types really point
to the same address. This is only guaranteed for union members.
The patch adds a vector lib I have put together during the last time,
it is just handy and interfaces well with s(s)g*. Together with some small
modifications this will later also interface well with OpenSceneGraphs
vectors/matrices. Using this vector kernel is targeted to have a handy
matrix/vector lib available and to provide a scenegraph independent vector
type for use with a small scenegraph wrapper aimed for a smooth transition to
openscenegraph.
That vector code also includes an improoved geodetic conversion routine I
have found some time ago published in the 'journal of geodesy' which avoids
iterative computations for that purpose.
Also the geodetic position class is more typesafe and unitsafe than the
Point3D currently is.
That part is relatively old and in use in my local trees for several months
now.
This patch makesFlightGear at least compile on MSVC. I hope I have removed
reference of my other local changes. DSP and DSW files are included for
reference. They have been reconstructed with am2dsp.pl. I had to introduce a
change to am2dsp because of the need of filenames with embedded spaces. (Yuck)
The major direction is to remove clutter like the _USE_MATH_DEFINES and
have it on the compiler command line sice there is no central include
file. You will have to put it on the command line for your locale
Project files, if it not there, already. I added the
_CRT_SECURE_NO_DEPRECATE define for 2005, since it does no harm to other
VC version.
Third Party Libs like plib, OpenALSDK, freeglut, pthreads-win32, zlib
are unpacked as is side by side. Only change put the includes of OpenAL
into include/AL rather directly into include.
Fix the current buggy rain orientation behaviour for the views attached to the
aircraft (while still inheriting bugs with the views attached to anything else).
add optional arg to SGPropertyNode::addChangeListener that triggers
the listener function call initially. This is useful for cases where
a freshly installed listener wants to treat the current property
value as changed from 'unknown' to the actual value right away.
Examples can be found in the Nasal incarnation setlistener(),
where we have for example this (in $FG_ROOT/Nasal/gui.nas):
INIT = func {
...
setlistener("/sim/rendering/fps-display", fpsDisplay);
if (getprop("/sim/rendering/fps-display")) {
fgcommand("dialog-show", props.Node.new({"dialog-name": "fps"}));
}
}
That is: we first attach a listener that cares for changes to the FPS
display switch, but then we have to manually open the dialog initially.
That's a duplication of code and could be as simple as this
(INIT part only):
INIT = func {
...
setlistener("/sim/rendering/fps-display", fpsDisplay, 1);
}
That is: the optional third arg makes fpsDisplay be called initially,
and then again with every write action. My first solution was in the
Nasal code only, but Andy (rightfully) says that this should rather
be in sg.
Incorporating the shared ptr code:
- All scenegraph references from SimGear
- SGMaterial which already had a reference counter uses now that common
infrastructure.
- SGMatModel is now counted.
- SGSoundSample from SimGear
- And the corresponding change for the sound samples in flightgear which fixes
a latent crash if FGBeacon would evern be deleted.
This patch fixes this SimGear compile error on x86_64 Fedora Development with gcc-4.1:
placement.hxx:49: error: extra qualification ‘SGModelPlacement::’ on member ‘init’
Add the basic infrastructure for a reference counter class.
Adding it now (without using it) enables Mathias and others to
prepare some memory reduction code.
Fix a problem where the directory being created is made relative when in fact
it's absolute. It also tightens things a bit on the Windows side.
Erik:
Make the section that splits up the directory in a lists of parent directories
a standalone function.