Search
lxdream.org :: lxdream/src/pvr2/glrender.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/glrender.c
changeset 1219:3966d3e55351
prev1207:f7ca985659c6
next1232:e5b12e2fe6ba
author nkeynes
date Mon Feb 13 21:43:22 2012 +1000 (8 years ago)
permissions -rw-r--r--
last change Remove unused pvr2_poly_texblend array
Support GL_MAX_TEXTURE_UNITS and GL_MAX_IMAGE_TEXTURE_UNITS
Protected against undefined GL_STACK_OVERFLOW
file annotate diff log raw
1.1 --- a/src/pvr2/glrender.c Tue Feb 07 11:20:00 2012 +1000
1.2 +++ b/src/pvr2/glrender.c Mon Feb 13 21:43:22 2012 +1000
1.3 @@ -46,12 +46,6 @@
1.4 GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR,
1.5 GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA,
1.6 GL_ONE_MINUS_DST_ALPHA };
1.7 -int pvr2_poly_texblend[4] = {
1.8 - GL_REPLACE,
1.9 - GL_MODULATE,
1.10 - GL_DECAL,
1.11 - GL_MODULATE
1.12 -};
1.13
1.14 static gboolean have_shaders = FALSE;
1.15 static int currentTexId = -1;
1.16 @@ -188,13 +182,15 @@
1.17 {
1.18 glShadeModel( POLY1_SHADE_MODEL(poly1) );
1.19
1.20 - if( POLY1_TEXTURED(poly1) && !have_shaders ) {
1.21 - if( POLY2_TEX_BLEND(poly2) == 2 )
1.22 - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL );
1.23 - else
1.24 - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
1.25 + if( !have_shaders ) {
1.26 + if( POLY1_TEXTURED(poly1) ) {
1.27 + if( POLY2_TEX_BLEND(poly2) == 2 )
1.28 + glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL );
1.29 + else
1.30 + glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
1.31
1.32 - }
1.33 + }
1.34 + }
1.35
1.36 switch( POLY2_FOG_MODE(poly2) ) {
1.37 case PVR2_POLY_FOG_LOOKUP:
.