Search
lxdream.org :: lxdream/src/pvr2/rendsort.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/rendsort.c
changeset 429:e581b90c3fb3
prev331:a6048d3a9a79
next561:533f6b478071
author nkeynes
date Mon Oct 08 11:52:13 2007 +0000 (14 years ago)
permissions -rw-r--r--
last change Fix compilation warnings
file annotate diff log raw
1.1 --- a/src/pvr2/rendsort.c Fri Jan 26 01:37:39 2007 +0000
1.2 +++ b/src/pvr2/rendsort.c Mon Oct 08 11:52:13 2007 +0000
1.3 @@ -1,5 +1,5 @@
1.4 /**
1.5 - * $Id: rendsort.c,v 1.5 2007-01-26 01:37:39 nkeynes Exp $
1.6 + * $Id: rendsort.c,v 1.6 2007-10-08 11:52:13 nkeynes Exp $
1.7 *
1.8 * PVR2 renderer routines for depth sorted polygons
1.9 *
1.10 @@ -148,7 +148,7 @@
1.11 }
1.12 } else {
1.13 /* Polygon */
1.14 - int i, first=-1, last = -1;
1.15 + int i;
1.16 float *vertex = (float *)polygon+context_length;
1.17 for( i=0; i<6; i++ ) {
1.18 if( entry & (0x40000000>>i) ) {
1.19 @@ -178,7 +178,7 @@
1.20 void render_triangles( struct render_triangle *triangles, int num_triangles,
1.21 int render_mode )
1.22 {
1.23 - int i,j, k, m = 0;
1.24 + int i;
1.25 for( i=0; i<num_triangles; i++ ) {
1.26 render_set_context( triangles[i].polygon, render_mode );
1.27 glEnable(GL_DEPTH_TEST);
1.28 @@ -194,10 +194,10 @@
1.29
1.30 }
1.31
1.32 -int compare_triangles( void *a, void *b )
1.33 +int compare_triangles( const void *a, const void *b )
1.34 {
1.35 - struct render_triangle *tri1 = a;
1.36 - struct render_triangle *tri2 = b;
1.37 + const struct render_triangle *tri1 = a;
1.38 + const struct render_triangle *tri2 = b;
1.39 if( tri1->minz < tri2->minz ) {
1.40 return 1; // No these _aren't_ back to front...
1.41 } else if( tri1->minz > tri2->minz ) {
.