Commit Graph
100 Commits
Author SHA1 Message Date
ehofman 72f35dc914 Comment out GLX code for MacOS and (hopefully) add some MacOS AGL compattible code. More needs to be done though. 2005-02-01 10:35:43 +00:00
ehofman e5f82f53b9 MacOS doesn't have glx.h 2005-01-31 18:29:38 +00:00
ehofman e39e6893e0 Jim Wilson:
Fix a couple of loose ends and missed edits on the earlier patch.  For the
most part no change in functionality.
2005-01-31 18:21:12 +00:00
ehofman 9ab77d65f4 Cygwin fixes 2005-01-31 18:07:40 +00:00
ehofman 8ed96cad1d Windows fixes. 2005-01-29 11:44:01 +00:00
ehofman 7795eb8239 Jim Wilson:
This patch adds support to the model animation system for modifying emissive
states on the fly so that it is possible to make "lights" appear to dimm.

This is an example of a configuration entry which should explain how it is used:


 <animation>
  <type>material-emission</type>
  <object-name>Face</object-name>
  <property>/controls/lighting/instruments-norm</property>
  <emiss-red>1.0</emiss-red>
  <emiss-green>0.8</emiss-green>
  <emiss-blue>0.5</emiss-blue>
 </animation>

Note the color entries are the emissive colors when the "property" value is
1.0.  They are useful for tinting the light.   The "property" itself must be
float or double and is clamped to values between 0 ~ 1.0 inclusively.   The
"property" value is multiplied against the colors to get the actual material
properties.  Thus property value 0.0 = darkest, and 1.0 = brightest.
2005-01-29 10:31:25 +00:00
ehofman 207c7ab1e0 MSVC fix. 2005-01-28 15:23:26 +00:00
ehofman 27af79684f Frederic Bouvier:
code.c is C code ( according to the file extension ), so variables should be declared at the beginning of the function.
2005-01-28 15:21:29 +00:00
ehofman 6b61a8eed1 use a proper delete[] 2005-01-28 15:15:23 +00:00
ehofman 181e6eac75 MSVC fixes 2005-01-28 09:32:57 +00:00
ehofman fd1979857c Fix an NVIDIA problem. 2005-01-27 17:49:22 +00:00
ehofman 448bc3facd Add a RenderTexture test program. 2005-01-27 10:56:22 +00:00
ehofman 97cabadb88 Melchior FRANZ:
If alcOpenDevice( NULL ) is NULL, then context is never assigned a
value, and it's pointless to ask for it in the next "if". But as the
ALCcontext that context points to doesn't seem to be fully defined
(OpenAL bug), valgrind still complains ...


Erik Hofman:
Extend this some further and define context=0 otherwise and check for
context != 0 before using it.
2005-01-27 10:47:09 +00:00
ehofman 8e284a70b7 Melchior FRANZ:
Trying to find the bug in tower.cxx (that crashes fgfs quite frequently
for me!), I'm playing with valgrind again. Until I'm in the ATC subsystem
there will be some other bugs and nitpicking along the way.

valgrind doesn't like that imgage->tmp is once allocated with new and
once with new[], sometimes with malloc() (via map), and sometimes freed
with delete (not delete[]!) and sometimes with free(). With simple types
such as GLubyte this shouldn't really make a difference, but anyway.

Also, I promised that I'd send patches for "if (foo) delete foo;" as
I'm making other changes to concerned files. texture.cxx is one with a
few occurrences thereof. (Remember: C++ explicitly allows to delete
null-pointers, so this check is redundant, and hence not tolerated in
other projects, such as KDE. Doesn't have to impress us, of course.  :-)

Also, fixes 4 signed/unsigned warnings (gcc 3.3.4)
2005-01-27 10:42:31 +00:00
ehofman 73f9febe06 Add Mark Haris' RenderTexture class based on SimGear's extesion support files. 2005-01-27 10:39:15 +00:00
ehofman b293639b76 Add a bunch of extensions in preparation of render-to-texture support. 2005-01-25 18:33:59 +00:00
ehofman f6314d3124 Erik Hofman
1. Remove the dependency on alut  which (on certein platforms) might pose
   some restrictuons on commercial use.

2. Create a sound source just prior to playing the sound and destroy it
   again when the sound has stopped. This should greatly reduce the
   error reports from Windows users.
2005-01-24 15:51:37 +00:00
ehofman 1e87dd7903 Melchior FRANZ:
The following patches to SimGear & FlightGear ...

- create an FGMetar abstraction layer, whose purpose is:
  * provide defaults for unset values
  * interpolate/randomize data (GREATER_THAN)
  * derive additional values (time, age, snow cover)
  * consider minimum identifier (CAVOK, mil. color codes)
- add rain/hail/snow/snowcover support on the METAR side
- add max age of METAR data handling (currently set to
- add support for an external METAR cache proxy server
- add CAVOK handling
- set missing year/month in regular METAR messages
- fix a small bug in metar.cxx (wrong return value)
2005-01-20 09:28:04 +00:00
ehofman 67e9d105cb Use the double precission pow() function to get Solaris compiling. 2005-01-16 08:52:22 +00:00
ehofman f1fc99f16f Solaris fix 2005-01-15 14:24:28 +00:00
ehofman f89e359d53 Solaris fix. 2005-01-15 14:22:56 +00:00
ehofman 77ec170a50 MingW/MSYS fix 2005-01-15 14:18:30 +00:00
ehofman 34320f5f20 Eliminate some compiler warnings about converting float to int. 2005-01-15 11:57:34 +00:00
ehofman a26271e46e Add a make_bumpmap and a make_maxcolorwindow function, modify the make_normalmap function to maximize the color window before proceding. 2005-01-15 10:48:40 +00:00
ehofman e2e7466250 Add support for contrast. 2005-01-14 15:52:56 +00:00
ehofman 1e24cc4643 little endian fixes. 2005-01-14 14:27:57 +00:00
ehofman dfc23c3528 Add a make_grayscale function and call it from make_normalmap automatically, removing the need to do it make_grayscale prior to calling make_normalmap. 2005-01-14 13:36:38 +00:00
ehofman cd11a5dc27 Fix a mistake. 2005-01-14 13:12:44 +00:00
ehofman 899734296b Add a function to calculate the normalmap from a regular texture. 2005-01-14 13:08:57 +00:00
ehofman 7a3a81c152 RGBA textures can be made monochrome also 2005-01-14 10:12:00 +00:00
ehofman e62a4a05ac Fix a few bugs and add a make_monochrome() function 2005-01-14 10:09:21 +00:00
ehofman 463ca207ce Some small updates to the saving code. 2005-01-13 18:35:56 +00:00
ehofman da6e1b31ea Fix a crash situation. 2005-01-13 18:05:46 +00:00
ehofman 8c783b1680 Update the code a bit more, add a function to retreive the last error string and add a function to write SGI texture fils. 2005-01-13 14:47:31 +00:00
ehofman 0b723174fd Add support for binding a thread to a specific CPU (IRIX only at this time). 2005-01-09 10:24:54 +00:00
ehofman 5d248bf0df Frederic Bouvier:
It comes to me that the bulk of all problem reports, especially from Windows users, have it's cause in an obsolete sound driver. These messages should direct them to the right solution before complaining.
2005-01-08 11:47:19 +00:00
ehofman d88fb32a73 Melchior FRANZ:
My recent fix for the load/save fgfs.sav feature was a bit too ambitious.
While aliases lead to abortion before, I tried to copy them properly,
although this wasn't a requirement. Unfortunately, this seems to have
worked for absolute aliases only, not for relative ones, and hence broke
several panel instruments. The attached patch backs most of the previous
patch out again, and goes a simpler route: just ignore aliases.
2004-12-23 13:32:01 +00:00
ehofman 37ac409586 Melchior FRANZ:
fgLoadFlight() loads a property file ("fgfs.sav") to a new property tree,
and then copies that over to the main tree. copyProperties() didn't know
how to handle type SGPropertyNode::ALIAS and hence threw an exception that
made fgfs abort.

The attached patch adds support for ALIAS to copyProperties(): aliased
nodes are created in the target tree if necessary, and then linked like in
the source tree. It seemed useful to add an optional argument to
props.[ch]xx/getType() that would indeed return the property type "ALIAS"
for aliased nodes, and not the type of the node that it refers to. The patch
also fixes a bug in writeNode() that caused extra lines after alias entries.

If there's resistance to the change to getType() (David?) I can easily use
isAlias(). This just makes copyProperties() a tad uglier, but I can live with
it. It's useful for scanning a tree, though, if an alias node can be treated
exactly like all other nodes, without automatic redirection.
2004-12-19 10:19:14 +00:00
ehofman 7b24e94c66 gcc 4.0 fix. 2004-12-18 10:53:54 +00:00
ehofman e12cd2a50c Initialize volume to inaudiable at startup. 2004-12-16 13:15:13 +00:00
ehofman 79734df554 Threads detection code cleanup and FreeBSD fixes. 2004-12-13 20:31:44 +00:00
ehofman c52657fa1a This was too quick, now pthreads isn't detected on IRIX (and other platforms?) anymore. This needs some more thought. 2004-12-08 15:12:11 +00:00
ehofman 9cac8409cd FreeBSD fix. 2004-12-08 15:00:45 +00:00
ehofman 18703ce02d AIX fix 2004-12-05 09:36:49 +00:00
ehofman c19af3525e Melchior FRANZ:
At last I've found the reason why fgfs crashed routinely for me. When I still
used KDE's artsdsp (preloads lib with OSS replacement functions) I saw
this crash only occasionally. After letting OpenAl communicate with artsd
directly (by means of ~/.openalrc setting), I got the crash always when
I left fgfs.

This bug may also have crashed fgfs when running with sound daemons other than
aRts.
2004-11-21 17:05:42 +00:00
ehofman a52b1ec64f MSVC fix. 2004-11-20 12:35:28 +00:00
ehofman ca50fe386d Roy Vegard Ovesen:
I've added two new debug log types for the instrumentation and systems. They
used to use the autopilot debug log, because I couldn't figure out how to
make new log types. Well, now I have figured it out.  ;-)
2004-10-24 09:29:56 +00:00
ehofman 39f3c6e41d Frederic Bouvier:
This is a patch to make display list usage optional. They are on by default.
Use --prop:/sim/rendering/use-display-list=false to use immediate mode.
There is also a change in exception handling in main.cxx and bootstrap.cxx
2004-10-17 17:06:50 +00:00
ehofman ba1b96e518 Roy Vegard Ovesen:
I'm working on a route manager in the GPS module. So I've added a name
parameter to the waypoint class in Simgear. I use the existing ID parameter
to store the ID, for example KLAX, and the name parameter to store the name,
San Francisco Intl.
2004-10-16 12:23:53 +00:00
ehofman ef486b2cc6 Remove the refference to fgsg 2004-10-14 13:35:11 +00:00
ehofman ab69c03698 Fix a typo. 2004-10-11 07:56:08 +00:00
ehofman fab1f4e7a0 Frederic: Ignore display lists when using the blend animation. 2004-10-11 07:37:42 +00:00
ehofman 41eed484c1 Adding the panel was a step too far for Linux, causing a segfault. 2004-10-10 19:38:46 +00:00
ehofman 7d18f9bdde Remove a phantom makeDList call (probably an old one from my code. 2004-10-10 19:16:25 +00:00
ehofman 3a48c3de7a Check for the plib version when using display lists, just to be sure. 2004-10-10 19:05:25 +00:00
ehofman d769a9936b Frederic: Include FGPanelNode in the display list generation process. 2004-10-10 18:43:11 +00:00
ehofman 1697cb3b1a Frederic: Use display lists for 3d models also. 2004-10-10 17:49:27 +00:00
ehofman 62aa32a417 Reverse the declaration order. jpgRenderFrame (formerly known as trRenderFrame) is now declared as a NULL function pointer and assignment of the proper function is now done in FlightGear (jpgRenderFrame=FGRenderer::update). 2004-10-06 09:57:31 +00:00
ehofman a0d0852838 David Luff:
The one-liner removes a lot of re-definition warnings on Cygwin.
2004-09-30 09:43:11 +00:00
ehofman 2f479cae69 Small update for future use. 2004-09-19 09:08:12 +00:00
ehofman 88c0dbf661 Add support for audio orientation: direction and cone definition. This currently only works for internal view and tower view because those set the listener position correctly. 2004-09-08 11:15:57 +00:00
ehofman 9e3822ceaf Remove a left over of ancient times. 2004-08-19 12:18:20 +00:00
ehofman 007b0a8fe6 this simple patch will enable the direct use of Point3D::get_n() instead of making duplications to call sgCartToGeod 2004-08-17 08:31:51 +00:00
ehofman 7f0ebf8871 this simple patch will prevent to have fog in Clear cload layers. 2004-08-17 08:28:35 +00:00
ehofman 5414e94a1a change the log level of the initialization of OpenAL. This prevent a console popup for no reason on Windows. 2004-08-15 09:24:12 +00:00
ehofman 297b6193fe Make gcc 2.95.* compile again. 2004-07-29 08:30:10 +00:00
ehofman 4b74e40a5f Use the SimGear default notation. 2004-07-28 14:13:16 +00:00
ehofman 5a9b08dec2 IRIX fixes (at least). 2004-07-28 13:59:57 +00:00
ehofman 5e6f9f79a2 IRIX fix (at least). 2004-07-28 13:16:54 +00:00
ehofman 29269c6686 Correct a typo that produces segfault during cleanup on some systems. 2004-07-22 08:04:18 +00:00
ehofman 04fb708543 Frederic Bouvier:
I just discovered this : state() is not valid when _level==0,
because it is doing:
{ return _state_stack[_state_stack.size() - 1]; }
and is returning a wrong index fetch ( 0 - 1 ) == -1

Moreover, st is not used when _level==0 so the line can be moved
to a safer place.
2004-07-21 10:52:40 +00:00
ehofman df302f277c Test for alutInit in libopenal.so and in libalut.so for Cygwin builds. 2004-07-19 14:59:51 +00:00
ehofman 5e63e663bb alut is now part of libopenal.so 2004-07-17 14:01:00 +00:00
ehofman ca10cb2d37 Weak excuse, but it's getting late. Do clipping right this time. 2004-07-16 21:00:46 +00:00
ehofman c9854153f8 Clip to volume to 1.0 if necessary. 2004-07-16 20:36:01 +00:00
ehofman 66996711ae Make sure that a directory name containing a '.' doesn't screw up the ::base() and ::extension() functions. 2004-07-05 16:39:02 +00:00
ehofman 8fe37cea51 Remove the need to append a trailing / to the texture-path string. 2004-07-05 13:40:37 +00:00
ehofman de64b6f267 Allow the use of a <texture-path/> tag to specify the directory containing the textures for this model. 2004-07-05 11:42:19 +00:00
ehofman 9a9d9c7cc1 Use #elif instead of #else if 2004-07-03 11:16:53 +00:00
ehofman a191e9762a Frederic Bouvier:
I have 3 issues that are fixed by this set of patches.

1. In extensions.cxx
  #else if !defined( WIN32 )  must be changed by
  #elif !defined( WIN32 ) because the text after #else
  seems to be ignored

2. banner is not available on windows, only cygwin

3. ANSI escape sequences are not interpreted on the
   windows console. We just have garbage that is hard
   to read.
2004-07-03 10:59:00 +00:00
ehofman 5034346b67 Some small updates. 2004-06-27 08:09:56 +00:00
ehofman 661f64b902 Work around a broken dlopen/dlclose Linux implementation. 2004-06-27 07:49:40 +00:00
ehofman bbc83f721c Frederic Bouvier:
this patch correct the cloud repositionning that
made them going against the wind. Now the clouds
and the windsock show the same direction.
2004-06-25 10:59:59 +00:00
ehofman 0e4a894f62 Be a bit anoying (and a tad more descriptive) about OpenAL volume errors for some time. 2004-06-13 11:59:36 +00:00
ehofman 1c135a9b5b Frederic Bouvier:
Do state sorting by material before adding primitives
in the tile branch. I thought I could see a bit of
improvement in framerate but it is not the case on my setup.
I don't see a degradation though
2004-06-12 21:03:45 +00:00
ehofman e65c85ce73 Frederic Bouvier:
I am still experimenting with the
code. Here is so far the best I could achieve. The
dark aspect of clouds at dusk or dawn is far better
than the problems of transparency of the previous
version.
2004-06-07 18:49:32 +00:00
ehofman 26b58991f9 MingW fix. 2004-06-07 12:43:29 +00:00
ehofman 8390df37ca Add an 'add(str)' function that adds a search path separator and appends the str. 2004-06-07 09:50:32 +00:00
ehofman 371fc73f24 Tweak the doppler effect. 2004-06-04 16:59:12 +00:00
ehofman 921dae5444 Revert the previous patch. There was already a class availble that allows for that. It's just that the description doesn't explain too much. 2004-05-28 08:42:59 +00:00
ehofman 9b3abbec89 Tweak the bump-mapped 2d cloud color a bit. 2004-05-27 18:00:03 +00:00
ehofman 6935baba5b Add the possibillity to parse a user data pointer to getter and satter functions. This adds a convenient way to get the 'this' pointer to the static functions. 2004-05-27 13:03:01 +00:00
ehofman dec1e32f96 Use a different coloring scheme. 2004-05-25 07:58:33 +00:00
ehofman 710c2ccfcd MacOSX fix that never got applied before. 2004-05-21 16:27:16 +00:00
ehofman 8e66e534ae mingw32 fix 2004-05-21 15:07:25 +00:00
ehofman 0f5f30b993 Updates from Frederic to use 2 texture units and a color blend function rather than 3 texture units. 2004-05-21 14:50:49 +00:00
ehofman b199f733f7 Frederic Bouvier:
Melchior spotted a problem where we can crash an airplane into the
beacon's beam. The patch below enable to mask out a branch from HOT
traversal, whatever the animation.

The beacon.xml file is also included. It has a
<enable-hot type="bool">false</enable-hot> in a halo branch
2004-05-20 14:18:15 +00:00
ehofman 0cdcf3a3e0 Make sure there will be no previous declaration errors. 2004-05-20 14:02:40 +00:00
ehofman 8e09486e82 Patch from Frederic. Adds support for bump-mapped (multi textured) 2d clouds, includeing support code. 2004-05-20 13:24:48 +00:00
ehofman 0c24b78573 Fred: include more check against null pointers and a raise in log level for missing objects. 2004-05-15 12:45:51 +00:00