annotate TaskManager/Test/test_render/Tapestry.h @ 132:e7c80537b6aa

add XML
author gongo@charles.cr.ie.u-ryukyu.ac.jp
date Tue, 25 Nov 2008 18:19:53 +0900
parents e2b1c795525e
children c8b868871dce
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
117
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
1 #ifndef INCLUDED_TAPESTRY
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
2 #define INCLUDED_TAPESTRY
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
3
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
4 /**
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
5 * image file name と tapestry DB の binary tree
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
6 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
7 * // PPE
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
8 * main memory の tapestry DB (Array)
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
9 * tapestry DB への accessor
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
10 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
11 * TapestryPtr getTapestry(int TapestryID);
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
12 * TilePtr getTile(TapestryPtr tapsetry, int tx, int ty, int scale);
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
13 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
14 * SPE が生成する tapestry List (in CreateSpan)
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
15 * (no texture image)
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
16 * @in TapestryDBPtr, Tapestry ID, x, y, tx, ty, px, py
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
17 * x, y : polygon の中の平面座標
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
18 * tx, ty : texture の座標
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
19 * px, py : texture の分割数
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
20 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
21 * @out (TilePtr, tix1, tiy1, tix2, tiy2)*
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
22 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
23 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
24 * SPE に渡す tapestry List
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
25 * @in Tile
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
26 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
27 * // SPE
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
28 * SPE 内部での tapestry DB (Hash)
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
29 * TapestryID, scale, TilePtr, Tile
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
30 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
31 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
32 * SPE 内部での tapestry DB への accessor
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
33 * TileEntryPtr getTile(int TapestryID, int tx, int ty, int scale);
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
34 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
35 * if (TileEntry == NULL) {
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
36 * DMA read
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
37 * }
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
38 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
39 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
40 * Rendering
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
41 * 1pass Zbuffer と Texture の有無の判定
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
42 * if (zbuffer ok) {
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
43 * if (texture ある) {
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
44 * zbuffer 、linebunf に書き込む
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
45 * } else {
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
46 * texture の load list に加える
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
47 * zbuffer だけ更新しておく
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
48 * }
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
49 * } else {
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
50 * 無視
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
51 * }
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
52 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
53 * 1pass で texture が一杯になったら、中断して
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
54 * ここまでのを書き込んどけ
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
55 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
56 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
57 * 2pass rgb の書き込み
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
58 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
59 * if (zbuffer の値が自分と一緒) {
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
60 * read した texture みて
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
61 * 書き込め!
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
62 * }
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
63 *
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
64 */
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
65 struct texture_block {
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
66
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
67 };
118
e2b1c795525e fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 117
diff changeset
68 #if 0
117
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
69 struct TileList {
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
70 TilePtr tile;
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
71 int tix1, tiy1, tix2, tiy2;
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
72 };
b7eceea91c76 add Tapestry.h
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents:
diff changeset
73 #endif
118
e2b1c795525e fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 117
diff changeset
74 #endif