From 26fc44aa32f4e821302f8b9cf577439963b40e1a Mon Sep 17 00:00:00 2001
From: ehofman <ehofman>
Date: Mon, 18 Jul 2005 16:58:52 +0000
Subject: [PATCH] Harald JOHNSEN:

Changes
=======

- shadowvolume.cxx, renderer.cxx :
  - reduced the polygon offset a bit to eliminate some artifact ;
  - changed again the cleanup code for objects inside a tile because it could crash on rare occasion ;
  - the culling of shadow casters has been rewritten to traverse the scene graph, it should be
    a bit faster when there is a lot of objects ;
  - the range selector was not correctly handled, sometimes the wrong LOD was casting shadows.
  - added the option to display aircraft's transparent objects after the shadows, this will
    reduce the problem of shadows being hidden by the transparent object (propeller disk,
    rotor, etc). A side effect is that aircraft's transparent objects won't receive shadows
    anymore. This is usually a good thing except when the aircraft use a 'transparent'
    texture where it should not. A transparent texture in the plib context is a texture
    with an alpha channel or a material with alpha <= 0.99.

- model.cxx, animation.cxx, shadowvolume.cxx :
  - added an optional <condition> under the <noshadow> animation

- tower.cxx
  - correct a rare bug where all occurences of the aircraft are not deleted from the
  departure list causing a crash in FGTower::CheckDepartureList function.
---
 gui/dialogs/rendering.xml | 11 +++++++++++
 preferences.xml           |  1 +
 2 files changed, 12 insertions(+)

diff --git a/gui/dialogs/rendering.xml b/gui/dialogs/rendering.xml
index a59b34c37..1864ddf29 100644
--- a/gui/dialogs/rendering.xml
+++ b/gui/dialogs/rendering.xml
@@ -203,6 +203,8 @@
     </group>
     <group>
     <layout>vbox</layout>
+     <group>
+     <layout>hbox</layout>
      <checkbox>
       <halign>left</halign>
       <label>Aircraft</label>
@@ -211,6 +213,15 @@
         <command>dialog-apply</command>
       </binding>
      </checkbox>
+     <checkbox>
+      <halign>left</halign>
+      <label>Transparency</label>
+      <property>/sim/rendering/shadows-ac-transp</property>
+      <binding>
+        <command>dialog-apply</command>
+      </binding>
+     </checkbox>
+     </group>
      <checkbox>
       <halign>left</halign>
       <label>Scenery objects</label>
diff --git a/preferences.xml b/preferences.xml
index 9ee56cbab..8518b3be2 100644
--- a/preferences.xml
+++ b/preferences.xml
@@ -51,6 +51,7 @@ Started September 2000 by David Megginson, david@megginson.com
    <distance-attenuation type="bool">false</distance-attenuation>
    <draw-otw type="bool">true</draw-otw>
    <shadows-ac type="bool">false</shadows-ac>
+   <shadows-ac-transp type="bool">false</shadows-ac-transp>
    <shadows-ai type="bool">false</shadows-ai>
    <shadows-to type="bool">false</shadows-to>
    <shadows-debug type="bool">false</shadows-debug>