annotate Renderer/Engine/ChangeLog @ 541:1a31b8820a4d draft

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