It works (as expected).
to a) For ..._FPALPHA its then as in the r200-driver.

to b) Who know's what should be done if lighting is
enabled but (ctx->Light.ColorMaterialEnabled) isnt set?
At least your patch which enables .._PKCOLOR
didnt affect the programs I tried.


Later I tried to enable .._FPALPHA depending on (ctx->Color.BlendEnabled) and it worked well for some programs, but didnt work for another testprogram with a rotating cube: 1.)when enabling lighting (pressing "l"), then blending (b), it looked bad: texture-corruption, switching back no non-blending and the texture was OK, switching to blending: texture-corruption, ... 2.)But after restarting the program: when enabling blending before lighting, it looks good in "blending-mode". When switching back to non-blending: texture-corruption, but a different manner than in the 1.st case.

its strange..
Disabling lighting temporarly and the texture looks ok,
but you CANT "switch" between the 1) and 2) case by
temporarily disabling lighting, switch blending and
reenabling lighting.
Only a restart of the testprogram can do this.
so ..FPALPHA should just be enabled with FPCOLOR like in your patch.

best regards,
Andreas


Am 2003.04.01 10:50:18 +0200 schrieb(en) Keith Whitwell:

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?




-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to