Andreas,


Looking at the code, the FPCOLOR/FPALPHA elements are only turned on when colormaterial is used -- in all other cases we use a ubyte 'PKCOLOR' representation.

If we're using FPCOLOR, I don't think that it would be so bad to always turn on FPALPHA too, as it seems like the current tests are missing a case for you.

So, I propose the attached patch, which
        a) always includes alpha in color material modes
        b) includes a packed color even if lighting is turned on.

In other words, this will always send a 4-component color to hardware.

Keith

? Am
? diff
Index: radeon_vtxfmt.c
===================================================================
RCS file: /cvsroot/dri/xc/xc/lib/GL/mesa/src/drv/radeon/radeon_vtxfmt.c,v
retrieving revision 1.16
diff -u -r1.16 radeon_vtxfmt.c
--- radeon_vtxfmt.c     31 Mar 2003 21:46:29 -0000      1.16
+++ radeon_vtxfmt.c     1 Apr 2003 08:47:53 -0000
@@ -566,11 +566,11 @@
        * directly.
        */
       if (ctx->Light.ColorMaterialEnabled) {
-        ind |= RADEON_CP_VC_FRMT_FPCOLOR;
-         if (ctx->Color.AlphaEnabled) {
-           ind |= RADEON_CP_VC_FRMT_FPALPHA;
-         }
+        ind |= (RADEON_CP_VC_FRMT_FPCOLOR |
+                RADEON_CP_VC_FRMT_FPALPHA);
       }
+      else
+        ind |= RADEON_CP_VC_FRMT_PKCOLOR; /* for alpha? */
    }
    else {
       /* TODO: make this data driven?

Reply via email to