Search
lxdream.org :: lxdream/src/pvr2/scene.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/scene.c
changeset 1240:190df8a791ca
prev1159:580436b01b6c
next1257:e1314ad3e7cc
author nkeynes
date Tue Feb 28 17:25:26 2012 +1000 (8 years ago)
permissions -rw-r--r--
last change Implement display output for the GLES2 case (no fixed function
rendering)
file annotate diff log raw
1.1 --- a/src/pvr2/scene.c Wed Jan 19 17:50:09 2011 +1000
1.2 +++ b/src/pvr2/scene.c Tue Feb 28 17:25:26 2012 +1000
1.3 @@ -552,6 +552,11 @@
1.4 memcpy( &pvr2_scene.vertex_array[pvr2_scene.vertex_index], quad, sizeof(struct vertex_struct)*2 );
1.5 memcpy( &pvr2_scene.vertex_array[pvr2_scene.vertex_index+2], &quad[3], sizeof(struct vertex_struct) );
1.6 memcpy( &pvr2_scene.vertex_array[pvr2_scene.vertex_index+3], &quad[2], sizeof(struct vertex_struct) );
1.7 + if( !POLY1_GOURAUD_SHADED(context[0]) ) {
1.8 + memcpy( &pvr2_scene.vertex_array[pvr2_scene.vertex_index].rgba, &pvr2_scene.vertex_array[pvr2_scene.vertex_index+3].rgba, sizeof(float)*8 );
1.9 + memcpy( &pvr2_scene.vertex_array[pvr2_scene.vertex_index+1].rgba, &pvr2_scene.vertex_array[pvr2_scene.vertex_index+3].rgba, sizeof(float)*8 );
1.10 + }
1.11 +
1.12 pvr2_scene.vertex_index += 4;
1.13
1.14 if( is_modified ) {
1.15 @@ -568,6 +573,10 @@
1.16 memcpy( &pvr2_scene.vertex_array[pvr2_scene.vertex_index], quad, sizeof(struct vertex_struct)*2 );
1.17 memcpy( &pvr2_scene.vertex_array[pvr2_scene.vertex_index+2], &quad[3], sizeof(struct vertex_struct) );
1.18 memcpy( &pvr2_scene.vertex_array[pvr2_scene.vertex_index+3], &quad[2], sizeof(struct vertex_struct) );
1.19 + if( !POLY1_GOURAUD_SHADED(context[0]) ) {
1.20 + memcpy( &pvr2_scene.vertex_array[pvr2_scene.vertex_index].rgba, &pvr2_scene.vertex_array[pvr2_scene.vertex_index+3].rgba, sizeof(float)*8 );
1.21 + memcpy( &pvr2_scene.vertex_array[pvr2_scene.vertex_index+1].rgba, &pvr2_scene.vertex_array[pvr2_scene.vertex_index+3].rgba, sizeof(float)*8 );
1.22 + }
1.23 } else {
1.24 scene_add_cheap_shadow_vertexes( &pvr2_scene.vertex_array[poly->vertex_index],
1.25 &pvr2_scene.vertex_array[poly->mod_vertex_index], poly->vertex_count );
.