Search
lxdream.org :: lxdream/src/pvr2/rendsort.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/rendsort.c
changeset 1137:4799d64b3478
prev1133:f3da7d810d5c
next1138:3bcb705a7ebc
author nkeynes
date Sun Oct 24 13:40:52 2010 +1000 (10 years ago)
permissions -rw-r--r--
last change Change forced-depth-function lists (autosort, punchout) to just set the
depth once at the start of the list
Remove unused parameter from render_set_tsp_context
file annotate diff log raw
1.1 --- a/src/pvr2/rendsort.c Wed Oct 20 17:56:59 2010 +1000
1.2 +++ b/src/pvr2/rendsort.c Sun Oct 24 13:40:52 2010 +1000
1.3 @@ -159,8 +159,7 @@
1.4 if( poly->tex_id != -1 ) {
1.5 glBindTexture(GL_TEXTURE_2D, poly->tex_id);
1.6 }
1.7 - render_set_context( poly->context, GL_GEQUAL );
1.8 - glDepthMask(GL_FALSE);
1.9 + render_set_tsp_context( poly->context[0], poly->context[1] );
1.10 glDrawArrays(GL_TRIANGLE_STRIP, poly->vertex_index + triangles[i]->triangle_num, 3 );
1.11 }
1.12 }
1.13 @@ -256,7 +255,9 @@
1.14 if( num_triangles == 0 ) {
1.15 return; /* nothing to do */
1.16 } else if( num_triangles == 1 ) { /* Triangle can hardly overlap with itself */
1.17 - gl_render_tilelist(tile_entry, GL_GEQUAL);
1.18 + glDepthMask(GL_FALSE);
1.19 + glDepthFunc(GL_GEQUAL);
1.20 + gl_render_tilelist(tile_entry, FALSE);
1.21 } else { /* Ooh boy here we go... */
1.22 int i;
1.23 struct sort_triangle triangles[num_triangles+1];
1.24 @@ -268,8 +269,9 @@
1.25 int extracted_triangles = sort_extract_triangles(tile_entry, triangles);
1.26 assert( extracted_triangles <= num_triangles );
1.27 sort_triangles( triangle_order, extracted_triangles, triangle_order );
1.28 + glDepthMask(GL_FALSE);
1.29 + glDepthFunc(GL_GEQUAL);
1.30 sort_render_triangles(triangle_order, extracted_triangles);
1.31 - glCullFace(GL_BACK);
1.32 assert( triangles[num_triangles].poly == (void *)SENTINEL );
1.33 }
1.34 }
.