Search
lxdream.org :: lxdream/src/pvr2/glrender.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/glrender.c
changeset 648:ef9aa5cba86f
prev645:a7392098299c
next649:620c5c6496b5
author nkeynes
date Sat Mar 08 04:21:42 2008 +0000 (12 years ago)
branchlxdream-render
permissions -rw-r--r--
last change Put the 1/z back in for the moment
file annotate diff log raw
1.1 --- a/src/pvr2/glrender.c Thu Mar 06 08:22:00 2008 +0000
1.2 +++ b/src/pvr2/glrender.c Sat Mar 08 04:21:42 2008 +0000
1.3 @@ -151,23 +151,7 @@
1.4 int width = POLY2_TEX_WIDTH(poly2);
1.5 int height = POLY2_TEX_HEIGHT(poly2);
1.6 glEnable(GL_TEXTURE_2D);
1.7 - switch( POLY2_TEX_BLEND(poly2) ) {
1.8 - case 0: /* Replace */
1.9 - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
1.10 - break;
1.11 - case 2:/* Decal */
1.12 - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL );
1.13 - break;
1.14 - case 1: /* Modulate RGB */
1.15 - /* This is not directly supported by opengl (other than by mucking
1.16 - * with the texture format), but we get the same effect by forcing
1.17 - * the fragment alpha to 1.0 and using GL_MODULATE.
1.18 - */
1.19 - case 3: /* Modulate RGBA */
1.20 - glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
1.21 - break;
1.22 - }
1.23 -
1.24 + glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, pvr2_poly_texblend[POLY2_TEX_BLEND(poly2)] );
1.25 if( POLY2_TEX_CLAMP_U(poly2) ) {
1.26 glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP );
1.27 } else {
1.28 @@ -266,7 +250,7 @@
1.29 farz*= 2.0;
1.30 }
1.31 glOrtho( 0, pvr2_scene.buffer_width, pvr2_scene.buffer_height, 0,
1.32 - -nearz, -farz );
1.33 + -farz, -nearz );
1.34
1.35 /* Clear the buffer (FIXME: May not want always want to do this) */
1.36 glDisable( GL_SCISSOR_TEST );
1.37 @@ -304,7 +288,7 @@
1.38 (pvr2_scene.sort_mode == SORT_TILEFLAG && (segment->control&SEGMENT_SORT_TRANS))) {
1.39 gl_render_tilelist(segment->trans_ptr);
1.40 } else {
1.41 - render_autosort_tile(segment->trans_ptr, RENDER_NORMAL, !pvr2_scene.full_shadow);
1.42 + render_autosort_tile(segment->trans_ptr, RENDER_NORMAL );
1.43 }
1.44 }
1.45 if( IS_TILE_PTR(segment->punchout_ptr) ) {
.