Search
lxdream.org :: lxdream/src/pvr2/rendsort.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/rendsort.c
changeset 648:ef9aa5cba86f
prev645:a7392098299c
next650:80568a7a1ec7
author nkeynes
date Sat Mar 08 04:21:42 2008 +0000 (15 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/rendsort.c Thu Mar 06 08:22:00 2008 +0000
1.2 +++ b/src/pvr2/rendsort.c Sat Mar 08 04:21:42 2008 +0000
1.3 @@ -157,12 +157,12 @@
1.4 render_set_context( poly->context, RENDER_NORMAL );
1.5 glEnable(GL_DEPTH_TEST);
1.6 glDepthFunc(GL_GEQUAL);
1.7 + /* Fix cull direction */
1.8 if( triangles[i].triangle_num & 1 ) {
1.9 glCullFace(GL_FRONT);
1.10 } else {
1.11 glCullFace(GL_BACK);
1.12 }
1.13 - /* Fix cull direction */
1.14 glDrawArrays(GL_TRIANGLE_STRIP, poly->vertex_index + triangles[i].triangle_num, 3 );
1.15 }
1.16 }
1.17 @@ -171,7 +171,7 @@
1.18 {
1.19 const struct sort_triangle *tri1 = a;
1.20 const struct sort_triangle *tri2 = b;
1.21 - return tri1->minz - tri2->minz;
1.22 + return tri2->minz - tri1->minz;
1.23 }
1.24
1.25 void sort_triangles( struct sort_triangle *triangles, int num_triangles )
1.26 @@ -179,7 +179,7 @@
1.27 qsort( triangles, num_triangles, sizeof(struct sort_triangle), compare_triangles );
1.28 }
1.29
1.30 -void render_autosort_tile( pvraddr_t tile_entry, int render_mode, gboolean cheap_modifier_mode )
1.31 +void render_autosort_tile( pvraddr_t tile_entry, int render_mode )
1.32 {
1.33 int num_triangles = sort_count_triangles(tile_entry);
1.34 if( num_triangles == 0 ) {
.