Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Test/test_render/polygon_pack.h @ 168:cf2aa37d2fe7
Delete DrawSpan::get_pixel().
author | gongo@localhost.localdomain |
---|---|
date | Thu, 11 Dec 2008 10:38:28 +0900 |
parents | 38cbb7aecc70 |
children | 559b48b69b76 |
rev | line source |
---|---|
109 | 1 #ifndef INCLUDED_POLYGON_PACK |
2 #define INCLUDED_POLYGON_PACK | |
3 | |
164
38cbb7aecc70
TilePtr は SPE で計算した方がいいと判断して変更。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
4 #ifndef INCLUDED_TYPES |
38cbb7aecc70
TilePtr は SPE で計算した方がいいと判断して変更。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
5 # include "types.h" |
38cbb7aecc70
TilePtr は SPE で計算した方がいいと判断して変更。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
6 #endif |
38cbb7aecc70
TilePtr は SPE で計算した方がいいと判断して変更。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
7 |
109 | 8 #define MAX_SIZE_TRIANGLE 128 |
9 | |
10 typedef struct VertexPack { | |
11 float x; | |
12 float y; | |
13 float z; | |
14 float tex_x; | |
15 float tex_y; | |
16 }VertexPack, *VertexPackPtr; | |
17 | |
18 | |
19 typedef struct TrianglePack { | |
164
38cbb7aecc70
TilePtr は SPE で計算した方がいいと判断して変更。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
20 uint32 *tex_addr; |
38cbb7aecc70
TilePtr は SPE で計算した方がいいと判断して変更。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
21 int tex_width, tex_height; |
109 | 22 VertexPack ver1; |
23 VertexPack ver2; | |
24 VertexPack ver3; | |
25 } TrianglePack, *TrianglePackPtr; | |
26 | |
27 | |
28 typedef struct PolygonPack { | |
29 struct PORIGON_info { | |
30 int size; | |
31 int light_pos[3]; | |
32 int light_rgb[3]; | |
33 }info; | |
34 TrianglePack tri[MAX_SIZE_TRIANGLE]; // Variable length array | |
35 | |
36 PolygonPack* next; | |
37 | |
38 void init(void) { | |
39 info.size = 0; | |
164
38cbb7aecc70
TilePtr は SPE で計算した方がいいと判断して変更。
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
109
diff
changeset
|
40 next = 0; |
109 | 41 } |
42 | |
43 void clear(void) { | |
44 PolygonPack *q = 0; | |
45 PolygonPack *q1 = 0; | |
46 | |
47 q = this->next; | |
48 while (q) { | |
49 q1 = q->next; | |
50 delete(q); | |
51 q = q1; | |
52 } | |
53 this->init(); | |
54 } | |
55 } PolygonPack, *PolygonPackPtr; | |
56 | |
57 typedef struct PolygonPackList { | |
58 int size; | |
59 //PolygonPack *list[6]; | |
60 PolygonPack *list; | |
61 } PolygonPackList; | |
62 | |
63 #endif |