Search
lxdream.org :: lxdream/src/pvr2/scene.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/scene.c
changeset 1139:9af81878480b
prev1133:f3da7d810d5c
next1140:7dc1c71ece76
author nkeynes
date Sun Oct 24 15:22:59 2010 +1000 (10 years ago)
permissions -rw-r--r--
last change Eliminate GL_REPLACE tex mode in favour of GL_MODULATE (by setting colour
values to 1.0) - one less case for shaders to care about later
file annotate diff log raw
1.1 --- a/src/pvr2/scene.c Wed Oct 20 17:56:59 2010 +1000
1.2 +++ b/src/pvr2/scene.c Sun Oct 24 15:22:59 2010 +1000
1.3 @@ -275,11 +275,23 @@
1.4 vert->u = *data.fval++;
1.5 vert->v = *data.fval++;
1.6 }
1.7 - if( POLY2_TEX_BLEND(poly2) == 1 ) {
1.8 +
1.9 + switch( POLY2_TEX_BLEND(poly2) ) {
1.10 + case 0:/* Convert replace => modulate by setting colour values to 1.0 */
1.11 + vert->rgba[0] = vert->rgba[1] = vert->rgba[2] = vert->rgba[3] = 1.0;
1.12 + data.ival++; /* Skip the colour word */
1.13 + break;
1.14 + case 1:
1.15 force_alpha = TRUE;
1.16 + /* fall-through */
1.17 + default: /* Can't handle decal this way */
1.18 + unpack_bgra(*data.ival++, vert->rgba);
1.19 + break;
1.20 }
1.21 + } else {
1.22 + unpack_bgra(*data.ival++, vert->rgba);
1.23 }
1.24 - unpack_bgra(*data.ival++, vert->rgba);
1.25 +
1.26 if( POLY1_SPECULAR(poly1) ) {
1.27 unpack_bgra(*data.ival++, vert->offset_rgba);
1.28 } else {
.