annotate Renderer/Engine/ChangeLog @ 1379:13065ad17328 draft

collada moved but only my mac.
author e095732 <e095732@ie.u-ryukyu.ac.jp>
date Thu, 26 Jan 2012 21:56:32 +0900
parents 34944900f266
children acfa426b277e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1254
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
1 2011-9-7 Shinji Kono <kono@ie.u-ryukyu.ac.jp>
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
2
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
3 allExecute 使わない方の Camera の処理をしないとだめ。
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
4
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
5 Camera のbrother ===> sprite
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
6 Camera のchildren ===> sceneGraph
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
7
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
8 じゃないの? Camera に座標と行列をcopyする必要があると思われる。
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
9
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
10 matrix/real_matrix は重複っぽい。そもそも、なんで別なんだ? 普通は同じ値?
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
11
1129
a8bffdb5d2e3 bus error
yutaka@localhost.localdomain
parents: 966
diff changeset
12 2011-2-14 Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
a8bffdb5d2e3 bus error
yutaka@localhost.localdomain
parents: 966
diff changeset
13
a8bffdb5d2e3 bus error
yutaka@localhost.localdomain
parents: 966
diff changeset
14 CreatePolygonFromScenenGraph を SPEで動くようにTask化。もうできるのはわかっているけど
a8bffdb5d2e3 bus error
yutaka@localhost.localdomain
parents: 966
diff changeset
15 今はバスエラーです。polygon.h が持っている matrix, real_matrix, texture_info にアラインメント
a8bffdb5d2e3 bus error
yutaka@localhost.localdomain
parents: 966
diff changeset
16 合わせないとダメです。いろいろ書きなおさないとアラインメントかけれない?どーも簡単にはいかない。
a8bffdb5d2e3 bus error
yutaka@localhost.localdomain
parents: 966
diff changeset
17 継承関係あたりちょっと見直しが必要。
a8bffdb5d2e3 bus error
yutaka@localhost.localdomain
parents: 966
diff changeset
18
966
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
19 2010-8-6 Shinji Kono <kono@ie.u-ryukyu.ac.jp>
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
20
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
21 Renderer Engine の task の下に user task を置くのは反則だろ?
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
22 問題は、User program の方で、どうやって、task_init するかだが、
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
23 PPE側は自分でやって問題ない。SPE側が困る。
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
24
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
25 やはり、main memory 上のtask listをSPEが自分で読み出すと言う
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
26 方式が合理的だと思われる。get_segment で良いしね。ただ、可変長
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
27 にしないとダメだが... 2^n allocator with compaction が必要か?
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
28
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
29 必ず ppe/spe task があるわけだから、task_list はppe/speで一つ
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
30 でも良い。少なくとも設定は一ヶ所が望ましい。object search path
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
31 があれば良い。
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
32
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
33 task_list を main memory に置くのは良いが、spe task のentry point
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
34 が決まらないと言う問題がある。
4cd17f86dda6 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 724
diff changeset
35
724
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
36 2009-12-19 Shinji Kono <kono@ie.u-ryukyu.ac.jp>
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
37
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
38 SgChange/viewer は大域変数使いすぎ。禁止って言ったのに。
1254
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
39 linda api は、federated linda 対応でないものが使われている。
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
40 対応したものは、どこにあるんだろう?
724
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
41
1254
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
42 他の例題いじるのは、自分の例題を動かしてからにして欲しい。
724
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
43
1254
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
44 まぁねぇ。Pipeline execution するのに、sgpack とかも Pipeline buffer
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
45 にするのは気づかないものなんだろうな... なくても、動かないことは
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
46 ないのか。
724
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
47
1254
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
48 viewer.cc の大域変数を落すところから始めるべきか?
724
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
49
624
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 618
diff changeset
50 2009-11-15 Shinji Kono <kono@ie.u-ryukyu.ac.jp>
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 618
diff changeset
51
724
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
52 DrawSpan は,
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
53 Start DrawSpan region (allocate Z buffer)
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
54 DrawSpan / for each SpanPack
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
55 add_inData
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
56 End DrawSpan region (Write frame buffer,free Z buffer)
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
57 add_outData
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
58 みたいにしたい.
624
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 618
diff changeset
59
724
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
60 CreateSpan は,SpanPack を入れ換えているようだが,
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
61 SpanPack は,ランダムに書きだし,
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
62 PPU 側で,それをsortする.
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
63 と言う方がよい? ほぼ毎回入れ換えているんじゃないの?
624
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 618
diff changeset
64
618
58417006268c worked. Cell fix. (not yet tested)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 539
diff changeset
65 2009-11-14 Shinji Kono <kono@ie.u-ryukyu.ac.jp>
58417006268c worked. Cell fix. (not yet tested)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 539
diff changeset
66
724
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
67 DrawSpan の dma_write を追放。なんでこんなになっていたかは謎。
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
68 これで、renew Task を落とせます。
618
58417006268c worked. Cell fix. (not yet tested)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 539
diff changeset
69
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
70 2009-08-06 Shinji Kono <kono@ie.u-ryukyu.ac.jp>
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
71
724
6e9e4726113e Small clean up of Rendering Engine
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 624
diff changeset
72 DrawSpan の reboot/ TASK_DRAW_SPAN2 は、使ってないのね。
539
3bc98f6d31ff Reorganization..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 283
diff changeset
73
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
74 2009-03-29 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
75
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
76 * Makefile
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
77 SGlist.{cpp,h} を make clean で消去し、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
78 make で自動生成するようにしました。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
79 けどなんか他のファイルと同じ書きかたしても
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
80 上手く行かなかった。何か見落としてるかもしれない。誰か直(ry
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
81
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
82 2009-02-12 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
83
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
84 * task/CreatePolygonFromSceneGraph.cpp (CreatePolygonFromSceneGraph::run): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
85 下にあわせる様に
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
86
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
87 * SceneGraph.cpp (SceneGraph::SceneGraph, SceneGraph::init)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
88 (SceneGraph::finalize_original): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
89 今まで、Polygon が持つ vertex, normal, texture coordinate ってのが
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
90
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
91 ---------------------------------------
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
92 data = | vertex | normal | texture | sizeof(data) = size*3
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
93 ---------------------------------------
1254
34944900f266 minor fix
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1129
diff changeset
94 \ size / \ size / \ size /
283
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
95
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
96 てな感じで、SceneGraph->data の中に 3 つ入ってたわけです。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
97 これだと、アクセスする時にどれがどれかわからんくなるし、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
98 ソース読む時に迷う(経験談)ので、data を消して、代わりに
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
99 coord_xyz, normal, coord_tex を作りました。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
100
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
101 * polygon.cpp (Polygon::pickup_coordinate)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
102 (Polygon::pickup_normal, Polygon::pickup_texture):
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
103
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
104 2009-02-10 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
105
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
106 * Makefile.macosx (depend): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
107 depend.inc とかを吐き出す様にしました
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
108
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
109 * Camera.cpp (Camera::Camera, Camera::updateView)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
110 (Camera::updatePerspective, Camera::updateScreen)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
111 (Camera::update): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
112 なんとかカメラできてるっぽいです。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
113 Perspective とかも聞いてるし、中心に向かって遠くなってる。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
114 あとは行列演算をもうちょいこぎれいにすればいい感じかなー。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
115
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
116 残りは、ユーザ側からの設定。例えば
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
117 1. 車の運転席目線(FPS)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
118 2. 車の後ろから(TPS)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
119 3. 車の前から(SPS)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
120
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
121 的なのを、ユーザが CameraData みたいな構造体に
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
122 zd とか yd とかを設定して camera->set(data) とかやれば
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
123 反映するみたいな!みたいな!
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
124
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
125 2009-02-09 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
126
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
127 * SceneGraphRoot.cpp (SceneGraphRoot::allExecute)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
128 (SceneGraphRoot): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
129 SceneGraph を root から走査していきながら
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
130 その都度コピーしていき、最終的に全体の新しい SceneGraph ができる。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
131 削除されていればコピーしない、っていうのは簡単だけど
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
132 追加された場合、コピー元に追加されるのは困るので
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
133 コピーしたやつに追加って形にしたら今のコードになった。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
134 めんどくさいっちゃめんどくさい。もっと綺麗な書き方あるかね
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
135
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
136
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
137 2009-02-01 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
138
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
139 * SceneGraph.cpp (SceneGraph::SceneGraph)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
140 (SceneGraph::SceneGraph, SceneGraph::SceneGraph)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
141 (SceneGraph::finalize_original, SceneGraph)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
142 (SceneGraph::finalize_copy): add, fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
143 今のところ、SceneGraph の作られ方は
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
144
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
145 a1. xml ファイルから生成 (sgid 毎、sg_src[] に格納)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
146 a2. ID を指定し、sg_src[id] の SceneGraph を複製
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
147 a3. xml も ID も指定しない、何も表示しない SceneGraph
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
148
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
149 a1 の時はポリゴンデータ(data[])を生成するわけだけど、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
150 a2 でも、オリジナルと同じ data[] を持つ必要は(今は)ない。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
151 なので、a2 の場合、data[] は a1 と同じ場所を指せば良い。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
152 しかし、今までは、SceneGraph::~SceneGraph では
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
153 どんな SceneGraph でも
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
154
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
155 delete [] data;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
156
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
157 とかやってたので、それならということで
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
158
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
159 b1. a1 用の、Desturctor で data[] を delete する finalize_original()
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
160 b2. a2,a3 用の、data[] を削除しない finalize_copy()
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
161
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
162 を用意し、a1,a2,a3 の Consturoctor で、どっちかを設定する。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
163
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
164 2009-01-30 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
165
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
166 * spe/DrawSpan.cpp (DrawSpan::drawDot1): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
167 span->length_x == 1 の処理。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
168
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
169 (DrawSpan::drawDot2): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
170 Dot1 の続き。要は Dot1 で load して、Dot2 で wait->書き込みって感じ
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
171 しかし、1ドットだとそこまで待つ必要もないかなって感じなので
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
172 今は Dot 2には何も書いてない。ちゃんとしらべて、必要そうだったら
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
173 ここで書き込みを行う
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
174
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
175 (DrawSpan::drawLine1): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
176 span->length_x > 1 の処理。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
177 いくつか Load パターンを考えてる途中
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
178
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
179 1. 全部 load
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
180 1. z buf で描きこむと判断したとき、その pixel の texture tile を
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
181 load する。(すでにある、ないに関わらず。ある場合は、実際には
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
182 Load の処理は行われないが)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
183 2. Line2 で描画する(ここで使う tile はすでに全部読み込まれてるとする
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
184
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
185 2. 無い物だけload
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
186 1. 書き込むと判断したとき、tile があるかどうかを調べ
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
187 あればそのまま linebuf に、無ければ load を掛けて continue;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
188 このとき、load した(つまりまだ書き込まれてない) 場所を覚えておく
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
189 2. Line2 で、1. で覚えた場所から再び計算して描画する。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
190 tile はすでに全部読み込まれているとする
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
191
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
192 まだあったけど忘れた。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
193 今のところ描画領域が 256x8、もしくは512x8 で、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
194 単純に考えて、領域pixel と texture pixel が一緒だと考えると
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
195 一個の Span で最大 64 (512/8) 個の tile があればいいと考えられる。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
196 一個の SPE には Tile を 128 個持っておけるし、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
197 今は Span を二つ平行して処理しているので、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
198 途中で Tile が足りなくなる!ってことはないはず。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
199 とまあ、いろいろ考えてたんだけど、何書けばいいのか忘れた。。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
200 思い出したらまた書きます。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
201
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
202 2009-01-26 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
203
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
204 * spe/CreateSpan.cpp (CreateSpan::run): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
205 ポリゴンをx軸に水平に分割し、その二つを計算するってのが
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
206 half_triangelで、上としたで、何故か渡すテクスチャの情報が違う。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
207 なんでだろうと思いつつも、今まで特に問題が出なかったから無視してたが、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
208 今回、三つのSceneGraph を動かしてる時に問題発生。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
209 それぞれ違うテクスチャを貼ってるのに、なぜかそれらのうちの半分が
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
210 別のテクスチャが貼られていた。簡単に言うと、A,B,C の SG があった。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
211
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
212 A: 正常
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
213 B: 右上だけ A のテクスチャ
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
214 C: 右上だけ A のテクスチャ
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
215
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
216 といった具合。わけがわからなかったんだが、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
217 half_triangle に渡すやつの所為だと気づきました
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
218 なんでここだけ pp->tri[0].tex_info.addr とか渡してんのか未だに謎。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
219 単なる書き間違いか直し間違いか。微妙なところ。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
220 これ書いた後輩はもう居ない
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
221
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
222
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
223 * SceneGraphIterator.cpp (SceneGraphIterator::hasNext)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
224 (SceneGraphIterator::next): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
225 検索する引数を int id に変更。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
226
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
227 * SceneGraph.h (class SceneGraph): add variable
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
228 int flag_drawbale : この SceneGraph は描画する物かどうか
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
229 int sgid : SceneGraph の ID 。ID は SGList.h にあるものを使う
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
230
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
231 * SceneGraphIterator.cpp : add file
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
232 SceneGraph を走査する用。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
233 基本、Java の Iterator を参考にしてます。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
234 追加機能としては
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
235
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
236 - hasNext(const char* name);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
237 名前が name の SceneGraph があるかどうか
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
238
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
239 - next(const char* name);
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
240 名前が name の SceneGraph まで進ませる
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
241
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
242 * SceneGraphIterator.cpp : TODO
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
243 hasNext とかは名前じゃなくて ID が良いかなーとも思うけどね。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
244 てかその方がいいな。あとで直します
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
245
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
246 * ieshoot.cpp (ieboss_move): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
247 (ieboss_collision): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
248 BOSSの動きを追加。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
249 IETAMA が数回衝突したら BOSS を消すって処理。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
250
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
251 * SceneGraphIterator.cpp (SceneGraphIterator::next): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
252 break してなかった。そりゃ取れないわ
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
253
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
254 * SceneGraph.cpp (SceneGraph::realRemoveFromTree): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
255
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
256 < p1 = p1->next;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
257 < p = p->next;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
258 =====
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
259 > p1 = p1->brother;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
260 > p = p->brother;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
261
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
262
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
263 * viewer.cpp (Viewer::run_draw): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
264 Spanの無い部分を塗りつぶす処理はタスクを走らせず、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
265 そのまま memset とかの方が早い。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
266 まとめてするタスクを立ち上げるってのもいいかもしれない。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
267 あと、memsetで指定する値が、0xFF と 0x00 とで速度が違う。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
268 universe だと、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
269
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
270 0xFF 24fps
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
271 0x00 30fps
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
272
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
273 なんだろう。0x00 だと、ただのクリアになるから速いってことかな。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
274
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
275 * Camera.h (class Camera): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
276 とりあえず Camera を作って、これを SceneGraph の Top にした。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
277
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
278 * SceneGraph.cpp (SceneGraph::realRemoveFromTree): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
279 realRemove() の Tree構造用。削除後の tree top を返す様にしている。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
280 まあ top が消えなければ返す必要も無いし、top が消えるってことは
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
281 SceneGraph そのものが消えるってことでそうは無い・・はずだけどね。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
282 (SceneGraph::realRemoveFromList): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
283 realRemove() の list用。削除後の list top を返す様にしている。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
284 (SceneGraph::realRemoveFromTree): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
285 < p->next = p1->next;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
286 ===
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
287 > p->brother = p1->brother;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
288
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
289 2009-01-25 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
290
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
291 * add (tools/create_sglist): new
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
292 必要な SceneGraph xml file から SceneGraph を抽出し、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
293 名前と対応する ID を SGList.h に出力する。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
294 また、名前から ID を求める sglist_table を SGList.cpp に出力する。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
295
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
296 * SceneGraph.cpp (SceneGraph::remove): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
297 User API。ここで削除するのではなく、まずはフラグを立てるだけ
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
298 ここですぐに消すと、allExecute() の走査で何気に困る
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
299
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
300 (SceneGraph::isRemoved): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
301 この SceneGraph 削除フラグが立っているかどうか
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
302
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
303 (SceneGraph::realRemove): TODO
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
304 子を持つ SceneGraph が消された場合、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
305 その子孫を全て削除するかどうか。まあ削除するのかな。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
306
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
307 (SceneGraph::realRemove): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
308 Cerium System で呼ばれる。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
309 remove flag の立った SceneGraph を削除する。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
310 parentやbrother、next は繋ぎ直す。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
311
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
312 * SceneGraphRoot.cpp (SceneGraphRoot::addNext): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
313 sg_available_list に追加していく
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
314 木の操作が要らないアクセスの際にはこっちの方がいい。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
315
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
316 (SceneGraphRoot::setSceneData): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
317 Cerium に SceneGraph の tree を渡す。Cerium はこの tree を辿って
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
318 処理を行う
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
319
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
320 (SceneGraphRoot::createFromXMLfile): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
321 xml file を指定して、そこから SceneGraph を生成し、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
322 sg_src に格納する。ユーザはこの SceneGraph を直接は扱えない。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
323 以下に示す createSceneGraph の、読み込み元データとして保存しておく。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
324
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
325 (SceneGraphRoot::createSceneGraph): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
326 オリジナルの SceneGraph を clone してユーザに返す。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
327 この SceneGraph をユーザが操作する。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
328
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
329 * SceneGraphRoot.h (class SceneGraphRoot): new variables
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
330 sg_src, sg_exec_list, sg_draw_list, sg_available_list
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
331
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
332 * addfile (SceneGraphRoot.cpp)
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
333 SceneGraph を管理するクラス、ってところか。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
334 Root ってのは SceneGraph という名前からすると
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
335 一番親と思われそうで微妙です。変えるかも。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
336
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
337 2009-01-12 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
338
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
339 * Joystick.cpp: TODO
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
340 使用している Joystick が
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
341
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
342 1. PS3 コントローラ
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
343 2. PS2 コントローラにUSB変換をかましたやつ
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
344
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
345 によってボタンの番号配置が違うので
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
346 そこを自動的に取得して割り振りたい
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
347
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
348 SDL_JoystickName() で名前取れるんだけど
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
349 全部共通なのかなー。「PS3って文字列があるか否か」でわけてもいいけど
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
350
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
351 * Joystick.cpp: fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
352 コントローラボタンの番号を PS3 コントローラに合わせました。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
353
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
354 - 参考
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
355 PS3 Linux SDLでプログラミング -コントローラを使う-
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
356 http://yun.cup.com/ps3sdl007.html
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
357
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
358 アナログスティックの方はまだです
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
359
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
360 2009-01-08 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
361
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
362 * spe/DrawSpanRenew.cpp (DrawSpanRenew::run): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
363 next_spack を free() していたが、do-while の最初で
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
364 next_spack = NULL とかやっている。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
365 DrawSpan だと、free するのは free_spack ってやつなので
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
366 問題なかったが、なぜここは free(next_spack) とかやってるのか。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
367 というわけで、next_spack,spack 両方用の
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
368 free_spack1, free_spack2 を生成して、これを free させることに。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
369 これで、ようやくまともに動くようになった。けど微妙です。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
370 遅いですね。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
371
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
372 * addFile : DrawSpanRenew.cpp
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
373 DrawSpan の再起動 ver。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
374
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
375 2008-12-22 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
376
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
377 * fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
378 charles を Fedora 10 に上げて、コンパイラが新しくなったせいか、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
379 以下のような warning が出始めた
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
380
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
381 warning: deprecated conversion from string constant to 'char *'
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
382
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
383 まあよくわからんが、例えば
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
384
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
385 char *str = "hoge";
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
386
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
387 みたいな所だとこの warning が出る。これを
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
388
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
389 const char *str = "hoge";
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
390
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
391 にすると消えた。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
392 以後こういう形に統一しろよ的なやつなのかな。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
393
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
394 2008-12-19 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
395
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
396 * viewer.cpp (Viewer::run_draw): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
397 startx, endx に対して、start_y, end_y って名前は統一されてなくて
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
398 わかりづらいので、starty, endy に変更
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
399
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
400 * main.cpp (init): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
401 bpp (BitsPerPixel) の値がデフォルトで 0 になっていた。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
402 今のレンダリング方式では 32 がデフォルトなので、間違ってた。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
403 今まで気づかなかったのは
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
404
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
405 1. SDL_SetVideoMode に bpp = 0 で渡される
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
406 2. SDL が開発・実行環境に合わせて bpp を設定
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
407 3. 今までそれが 32 になってた
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
408
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
409 しかし、ゲーム班の環境では bpp = 16 になってしまったため、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
410 その次の bitmap の allocate の時に
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
411 screen->pitch*height = 16*width*height となり、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
412 DrawSpan では 32 のつもりで書き込んでいたため領域外への
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
413 メモリ書き込み->エラー
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
414
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
415 ゲーム班ありがとう
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
416
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
417 2008-12-16 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
418
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
419 * SceneGraph.cpp (makeTapestry): add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
420 SceneGraph::get_data にあったけど、ごちゃごちゃしてたので
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
421 関数として生成
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
422
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
423 * viewer.cpp (Viewer::run_init, Viewer::run_draw): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
424 * spe/DrawSpan.cpp (DrawSpan::zRow_init): delete
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
425
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
426 Z Buffering に使う zRow は DrawSpan で毎回生成、初期化するのではなく、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
427 PPE で生成、初期化を行っておき、DrawSpan に add_inData で
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
428 DMA で渡すという方法に変更。速度的にはほんのちょっとしか(ry
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
429
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
430 * spe/CreateSpan.cpp (CreateSpan::half_triangle): fix
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
431 getScale に渡す tex_width,tex_height を修正。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
432 比較にそのまま tex_width, tex_height を使うと、
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
433 Span が持つテクスチャが全体の一部分だったとしても
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
434 比較結果で縮小が行われてしまうため。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
435
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
436 - 例
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
437 span->length_x = 32;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
438 tex_width = 128;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
439 tex_x_len = (span->tex_x2 - span->tex_x1) = (0.5 - 0.3) = 0.2;
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
440
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
441 今までの処理だと、span->length_x < tex_width の結果により
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
442 縮小されたテクスチャを使うことになる。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
443 しかし、実際に Span が使う Texture の長さは
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
444
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
445 tex_width*tex_x_len = 24
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
446
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
447 なので、縮小を行う必要は無い
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
448
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
449
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
450 2008-12-12 Wataru MIYAGUNI <gongo@cr.ie.u-ryukyu.ac.jp>
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
451
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
452 * SceneGraph.cpp (SceneGraph::get_data): Todo
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
453 テクスチャの縦横が 8 の倍数でなければ弾く処理を入れる。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
454
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
455 * spe/DrawSpan.cpp (DrawSpan::run): Todo
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
456 テクスチャの座標計算と、そこから取得できる Tile の DMA を
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
457 一スレッドで処理しているのでそれを分けないといけない
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
458
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
459 * spe/CreateSpan.cpp (getTapestry): Add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
460 (getScale): Add
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
461
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
462 * memo: 雑記
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
463 ようやくこいつに ChangeLog を加えました。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
464 なんか emacs で「C-x 4 a」とかすると、ChangeLog の entry が
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
465 加えれられるんだけど、上の階層のを探しにいくので、TaskManager/ のに
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
466 加えようとしてたわけさ。まあそういう仕様なんだけど。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
467 で、だからといって不可能ってわけじゃないから書けばよかったんだが。
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
468
15bfacccde99 fix test_render
e065746@localhost.localdomain
parents:
diff changeset
469 要するに、これからはちゃんと書いていこうと思います。