Hi,

my digging is starting to pay off ;)

I had reported that weird problem, that the global ambient light is not
correct using hardware TCL if I specify anything other than 1.0 as alpha
component. Now I found out that the trigger for this problem is actually
to specify the default of (0.2, 0.2, 0.2, 1.0). In that case Mesa is
clever enough to not call the driver's LightModelfv functions as the
value doesn't change.

So the real error is that the global ambient is not set to the correct
default value in the TCL state after turning on the ambient light. I
fixed it by adding a call to update_global_ambient in
radeonColorMaterial. Here is the one-line patch for completeness ;)

--- radeon_state.c.~1.24.~      2002-11-26 02:57:38.000000000 +0100
+++ radeon_state.c      2002-12-01 02:43:42.000000000 +0100
@@ -887,6 +887,7 @@
 
         for (p = 0 ; p < MAX_LIGHTS; p++) 
            update_light_colors( ctx, p );
+        update_global_ambient( ctx );
       }
    }


Regards,
Felix

               __\|/__    ___     ___     ___
__Tschüß_______\_6 6_/___/__ \___/__ \___/___\___You can do anything,___
_____Felix_______\Ä/\ \_____\ \_____\ \______U___just not everything____
  [EMAIL PROTECTED]    >o<__/   \___/   \___/        at the same time!


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to