Search
lxdream.org :: lxdream/src/pvr2/scene.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/pvr2/scene.h
changeset 1133:f3da7d810d5c
prev1066:ddffe9d2b332
next1140:7dc1c71ece76
author nkeynes
date Wed Oct 20 17:56:59 2010 +1000 (9 years ago)
permissions -rw-r--r--
last change Perform backface culling in scene preparation rather than leaving it to the
GL - this is a huge performance win, at least on the 9400M - changing cull
state appears to be very expensive, whereas the CPU needed to do the same
job is only just barely measurable.
file annotate diff log raw
1.1 --- a/src/pvr2/scene.h Sun Jul 05 13:53:48 2009 +1000
1.2 +++ b/src/pvr2/scene.h Wed Oct 20 17:56:59 2010 +1000
1.3 @@ -49,6 +49,7 @@
1.4 uint32_t mod_tex_id;
1.5 int32_t mod_vertex_index; // index of first modified vertex in vertex buffer
1.6 struct polygon_struct *next; // chain for tri/quad arrays
1.7 + struct polygon_struct *sub_next; // chain for internal sub-polygons
1.8 };
1.9
1.10 void pvr2_scene_init(void);
1.11 @@ -74,10 +75,11 @@
1.12
1.13 /**
1.14 * Maximum polygons - smallest is 1 polygon in 48 bytes, giving
1.15 - * 87381, plus 1 for the background
1.16 + * 87381, plus 1 for the background. Allow the same amount again
1.17 + * for split polygons (worst case)
1.18 *
1.19 */
1.20 -#define MAX_POLYGONS 87382
1.21 +#define MAX_POLYGONS (87382*2)
1.22 #define MAX_POLY_BUFFER_SIZE (MAX_POLYGONS*sizeof(struct polygon_struct))
1.23 #define BUF_POLY_MAP_SIZE (4 MB)
1.24
.