Commit Graph
100 Commits
Author SHA1 Message Date
ehofman a6c46c89eb *** empty log message *** 2007-01-23 10:07:36 +00:00
ehofman 3b83487611 Wether you like it or not, MispPro needs these libraries referenced 2006-12-23 12:15:05 +00:00
ehofman c831856711 MispPro requires an explicit declaration. 2006-08-28 18:53:36 +00:00
ehofman 1f5ec6b8d5 Add a texture cache mechanism. Fortunately this oly seems affective for empty.rgb ... 2006-04-22 09:38:14 +00:00
ehofman 95d1ac354e Mac OS X fixes from Ima Sudonim. 2006-03-11 22:20:19 +00:00
ehofman 6b68d9d90b Alexander Powell:
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.
2006-03-09 09:54:43 +00:00
ehofman 1cbceec0e1 Mathias Fröhlich:
zero out all parent pointers, else they might be dangling.
2006-03-04 12:46:29 +00:00
ehofman 5b3c5407a1 Mathias Fröhlich:
I have some bugfixes which will avoid fg just crashing if the sound device
could not be opened.
2006-03-03 15:11:35 +00:00
ehofman b2a4cd488d Back out the previous patch. 2006-02-21 10:47:20 +00:00
ehofman 1d8d203e9e Declare specified functions, otherwise MIPSpro bails out. 2006-02-21 09:48:33 +00:00
ehofman 4e7fe460a5 Melchior FRANZ:
- 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)
2006-02-21 09:40:12 +00:00
ehofman 9be14a63b1 Mathias Froehlich: Add license information. 2006-02-20 15:12:13 +00:00
ehofman afd3c76088 Mathias Fröhlich:
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.
2006-02-19 17:22:17 +00:00
ehofman 6b697506c3 Melchior FRANZ:
- 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
2006-02-19 17:13:37 +00:00
ehofman 366931952b Remove unused files. 2006-02-17 09:59:27 +00:00
ehofman 606fc352aa Melchior FRANZ:
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.
2006-02-17 09:23:40 +00:00
ehofman 75f817b39c Mathias Fröhlich:
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.
2006-02-17 09:22:04 +00:00
ehofman 0bc49bf244 Olaf Flebbe:
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.
2006-02-17 08:58:56 +00:00
ehofman 21c89e8163 Vassilii Khachaturov:
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).
2006-02-02 09:56:48 +00:00
ehofman b3770cd26c Expose the sun halo texture handle. 2006-01-31 15:14:02 +00:00
ehofman 0cd4d44bd3 Expose GL_COORD_REPLACE 2006-01-31 15:13:12 +00:00
ehofman af15e73e64 create an absolute value before calling log or log10, this adds support for sound on negative numbers (thrust reverse for example). 2006-01-30 20:30:56 +00:00
ehofman 33f176b8f9 Melchior FRANZ:
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.
2006-01-30 10:56:34 +00:00
ehofman 42f21972fd On a second thought, disable smooth shaded lines for all segments of the lightning. 2006-01-27 15:27:43 +00:00
ehofman 2d79e54c46 Disable smooth lines for certain lightning segments. 2006-01-27 15:18:45 +00:00
ehofman 224408b0e8 Add support for point sprites. 2006-01-26 09:15:42 +00:00
ehofman c2c0e19305 Mathias Fröhlich:
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.
2006-01-24 14:44:35 +00:00
ehofman e8c4b0d57c Mathias Fröhlich:
Use the new automatic reference counter instead of doing
that ourselfes.
2006-01-12 13:47:04 +00:00
ehofman 1df002de81 MinGW fixes. 2006-01-04 09:08:35 +00:00
ehofman b7115659b3 Make the sgi code the default to prevent future problems. 2006-01-03 17:40:49 +00:00
ehofman 258ec6b89a Save some memory. 2006-01-03 17:34:00 +00:00
ehofman d1ecdfc510 Fix the persisent IRIX bug. 2006-01-02 13:32:16 +00:00
ehofman a807e66d4a prevent confusion by not using a standard name. 2006-01-02 10:04:10 +00:00
ehofman 8f9921d00c Mathias Fröhlich:
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.
2005-12-29 12:00:29 +00:00
ehofman 99bc4e9a87 Vassilii Khachaturov:
clean up some build warnings caught with gcc-4.0.
2005-12-19 12:52:02 +00:00
ehofman 9289cfdde9 Frederic Bouvier:
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.
2005-12-19 10:22:27 +00:00
ehofman bedbe3caad Frederic: this patch to sg_path.cxx will filter out false alarms when directory already exists. 2005-12-18 09:37:37 +00:00
ehofman 2e329426ab Frederic Bouvier:
The create_dir was totally broken. No function was used at the right place
except mkdir. This patch now create directories without segfaulting.


Erik:

This was my bad, I've been using a really slow computer for the last ten months
and recompiling SimGear with a change to the properties code takes ages, so
once in a while I apply something not entirely tested. This is one really bad
example which shouldn't have happened. Thanks to Frederic for fixing it.
2005-12-17 22:12:53 +00:00
ehofman 4c68d03457 Add the subdir to the path before trying to create it, instead of afterwards. 2005-12-17 15:41:48 +00:00
ehofman 0911fa4fa2 MSVC fixes. 2005-12-17 15:32:43 +00:00
ehofman c5737c5f74 Try to detect the proper type for mode_t 2005-12-17 15:15:09 +00:00
ehofman 106198fa20 Stefan Seifert: Add the posibility to specify a userarchive attribute which could be used to save user prefferences at program exit. 2005-12-17 15:11:37 +00:00
ehofman 4eb74a3c93 Add a function to create aa new directory 2005-12-17 15:06:56 +00:00
ehofman 3f0bcc9568 Mathias Fröhlich:
Detect whether we support pubuffers at runtime using the GLX extension string.


Erik:

Add support to compile TestRenderTexture if GLUT is installed.
2005-12-14 10:28:16 +00:00
ehofman f0c35fde6d MacOs X fix. 2005-12-11 13:41:57 +00:00
ehofman 8357eeb762 Vassilii Khachaturov:
* in some cases more specific sg exception types were used in place
  of the more generic one, e.g., sg_io_exception instead of sg_exception
  when the context of the error was an IO error
* in some cases, the error message was made more specific
* minor style fix for exception rethrowing --- using throw; whenever
  a re-throw is made; sometimes optimizing away the exception symbol name
  in the catch handler at all
* more specific catch handlers added in some places -- e.g.,
  an sg_io_exception caught ahead of sg_exception
2005-12-11 13:35:05 +00:00
ehofman 61da54d6ca add swap_test to .cvsignore 2005-12-11 13:26:30 +00:00
ehofman efea47833d Add a proper return statement for MSVC. 2005-12-11 12:51:51 +00:00
ehofman 24ea08b6d3 Vassilii: help those
using the Doxygen docs.
2005-12-06 18:45:14 +00:00
ehofman 2808b334ed Mathias: silence some valgrind warnings so that you can concentrate better on the real problems. 2005-12-06 18:29:28 +00:00
ehofman 96159cf739 How did this end up there?? 2005-11-27 09:48:51 +00:00
ehofman 577dfa4f54 Initialize glut before using it. 2005-11-27 09:46:58 +00:00
ehofman 66075d620e More WIN32 fixes. 2005-11-23 09:28:02 +00:00
ehofman 60f1d21914 Oops, WIN32 typo fix. 2005-11-22 18:42:16 +00:00
ehofman b108621a59 * Use SimGear's logging facility isntead of printf's.
* Hopefuly fix a nasty (mostly ATI related) bug.
2005-11-22 18:03:26 +00:00
ehofman 7da45cb49e Revert to the original (0.9.8) version, it causes more problems than it solves (did actually solve any?) 2005-11-14 18:25:17 +00:00
ehofman e994305da6 Put in public domain, Curtis wants it (because net_fdm.hxx depends on it) and I created the other functions. 2005-11-13 09:42:38 +00:00
ehofman 2af37b484e Let the application free the buffer data. 2005-11-12 12:22:23 +00:00
ehofman faf41f7d96 Prevent a possible memory leak. 2005-11-12 12:17:04 +00:00
ehofman 7629e29397 add a missing character. 2005-11-12 10:55:22 +00:00
ehofman 1cff7fcfea Make a clear separation between loading a sound file into main memroy and sending it to the driver. This prevents data to be loaded into the main memory (or onto the soundcard's memory) when it's not needed. 2005-11-12 10:26:21 +00:00
ehofman 694cf6e958 Expose some internals. 2005-11-11 13:19:58 +00:00
ehofman 450ad45882 MSVC fix. 2005-11-10 09:57:58 +00:00
ehofman d674e50591 gcc 4.0 fix. 2005-11-10 09:55:57 +00:00
ehofman d5eedd2c65 Move Curt's ssgEntityArray experiment over to SimGear. 2005-11-01 09:45:10 +00:00
ehofman fe4f907099 Remove some unused code. 2005-10-30 15:02:58 +00:00
ehofman 1b45eaf3de Mathias Fröhlich:
I guess the most important memory leaks are plugged now.
Just by inspection: An other memory leak in Simgear.
2005-10-27 08:21:58 +00:00
ehofman cfbc0a1579 MSVC fix. 2005-10-27 08:21:00 +00:00
ehofman db1b99d8dd Back out the shared mutex code since it only works when the mutex is in shared
memory[1], something we don't support anyhow.
This also fixes a FreeBSD compile problem.

[1] http://hypermail.linklord.com/new-httpd.old/2002/Jan/0557.html
2005-10-26 11:19:58 +00:00
ehofman 65a880e9fa Oops, ALUT 1.0 requires a little more work than expected. 2005-10-25 18:05:23 +00:00
ehofman 37b4005d3e Alex Romosan:
* Use "const string&" rather than "string" in function calls when appropriate.
* Use "const Point3D&" instead of "Pint3D" in function calls when appropriate.
* Improved course calculation in calc_gc_course_dist()
* Safer thread handling code.

Vassilii Khachaturov:

Dont use "const Point3D&" for return types unless you're absolutely sure.

Erik Hofman:

* Use SGD_(2)PI(_[24]) as defined in simgear/constants.h rather than
  calculating it by hand every time.
2005-10-25 13:48:58 +00:00
ehofman 70faa252e7 Prepare for ALUT version 1.0 2005-10-25 13:06:25 +00:00
ehofman 3620be8dbc Cosmetic updates. 2005-10-23 14:04:42 +00:00
ehofman 21c64dd60f Slightly update the seasonal texture support code. 2005-10-23 13:47:46 +00:00
ehofman fb69d790ce Add support for seasons. 2005-10-23 13:31:13 +00:00
ehofman debd066edd Melchior FRANZ:
The attached patch makes remove_child() available as removeChild(pos, keep).
That's consistent with getChild. Only renamed remove_child to removeChild and
added a check for validity of the pos argument.

removeChildren() will be used in input.cxx, and a lot in the upcoming
dynamic new_gui dialogs, which are aiming at replacing the hard-coded
dialogs. I'll discuss them on the list once the infrastructure is
in place. (The <hide> gui property was one part of it.)
2005-10-23 11:55:48 +00:00
ehofman f58d81b1e9 Harald JOHSEN: the sky color now fades to black with altitude 2005-10-23 11:46:41 +00:00
ehofman 8d507f161b Remove some dead code. 2005-10-22 11:07:00 +00:00
ehofman b015f7c801 Harald JOHNSEN:
I have corrected a few bugs with the owner draw gauge, weather radar code and heat-haze effect.

- shadanim.cxx :
  the heat/haze effect was showing artifacts when using a screen resolution >
  1024 pixels.
2005-10-16 17:23:59 +00:00
ehofman 80abe952ba Ima Sudonim remembered me there is still one problem for gcc Vs. 3.4 or later under Cygwin. This fixes it. 2005-10-15 14:59:02 +00:00
ehofman 7f5c3b223a Mathias Fröhlich:
This one, removes some virtual qualifiers at a private member class of
SGPropertyNode. These virtual qualifiers are really useless and stop the
compiler from inlineing these functions. I gain a single frame with my
favourite aircraft per second!
2005-10-14 16:27:06 +00:00
ehofman 2f3e4ebf39 Mathias Fröhlich:
I have done a valgrind run in flightgear. Just start it up and close it at the
fist change I had about half an hour later.

property-leak.diff:
   A leak in the property system which I could even notice in top.

texture-leak.diff:
    minor one, but fixed is fixed ...
2005-10-14 16:21:57 +00:00
ehofman 42224052e2 Martin Spott:
make GCC on Solaris8 happy.
2005-10-12 08:59:39 +00:00
ehofman f3d0a9bc3f David Luff:
The following patch needs to be applied to fix the errors that Georg
Vollnhals was getting whilst attempting to compile SimGear with gcc-3.4.x
2005-10-09 09:37:35 +00:00
ehofman d629b9e36a Harald JOHNSEN:
- shadanim.cxx, animation.hxx :
  new chrome (sphere mapping) shading ;
  disabled the loading of the fresnel VP until it is fixed ;
2005-10-08 11:52:48 +00:00
ehofman 4d54ba2200 Another Solaris fix. 2005-10-06 14:39:12 +00:00
ehofman 0035ef9194 Martin Spott: Use standardized Sun directive. 2005-10-06 11:06:27 +00:00
ehofman fcb20296d7 MSYS fix. 2005-10-06 09:45:36 +00:00
ehofman 6bb9080017 MSVC fixes. Frederic: MSVC has no ssize_t type 2005-10-06 08:25:14 +00:00
ehofman bbde16dc08 Remove a leftover. 2005-10-04 11:49:24 +00:00
ehofman ac9716f193 Cygwin fixes(?), it's a good idea to do it this way anyhow. 2005-10-01 11:41:59 +00:00
ehofman 8a2bc1c21b Cygwin fixes. 2005-09-29 12:05:22 +00:00
ehofman 942b474ad7 Fix an oops. 2005-09-28 08:03:44 +00:00
ehofman f3ef9b671f Back out a patch from Sept. 25th. Setting the *factor* to 0.0 by default isn't generally a good idea. 2005-09-28 08:00:33 +00:00
ehofman 1577ab04e1 Vivian Meazza:
Correct the bug in the translate animation where the offset was part of the
multiplication. It now behaves like all other animations:
out = (prop * factor) + offset

I feel strongly that the existing is wrong and must be corrected - it is non-op
if the offset is zero as I have found to my cost! It is just a typo I expect.

The diff also provides non-op default values for the scale animation.

I've also included Harald's latest eye-candy animation which allows us to
have a very smart heat-haze for exhausts. They have been tested by me and
others on Linux and Cygwin. You might like to upload these - I have a
revised Hunter ready to go as soon as they are uploaded.
2005-09-25 07:44:50 +00:00
ehofman 63f7e9feb0 AMD64 and sgi fixes. 2005-09-23 12:30:25 +00:00
ehofman 5eb380e103 Platform compatibility fix. 2005-09-22 13:43:09 +00:00
ehofman 832e821919 Add some linefeeds. 2005-09-22 09:15:10 +00:00
ehofman 197e3f144d Create our own stdint.h(xx) implementation and use it where needed. 2005-09-22 09:11:27 +00:00
ehofman 056b5b41e2 Prepare for Openal 1.1 and a separate alut library 2005-09-21 09:22:51 +00:00