… | |
… | |
183 | ctx.nc_far = max (ctx.nc_far, z); |
183 | ctx.nc_far = max (ctx.nc_far, z); |
184 | #endif |
184 | #endif |
185 | |
185 | |
186 | if (vs.state == OCCLUDED) |
186 | if (vs.state == OCCLUDED) |
187 | { |
187 | { |
|
|
188 | if (extent < ctx.z_far) |
|
|
189 | { |
188 | ctx.postdepthlist.push_back (this); |
190 | ctx.postdepthlist.push_back (this); |
189 | return false; |
191 | return false; |
|
|
192 | } |
|
|
193 | else |
|
|
194 | vs.state == PARTIAL; |
190 | } |
195 | } |
191 | |
196 | |
192 | bool visible = size () && (vs.state == PARTIAL || vs.state == FULL); |
197 | bool visible = size () && vs.state == FULL; |
193 | |
198 | |
194 | // node to start with |
199 | // node to start with |
195 | unsigned char si = centeri.x > 0 ? 1 : 0 |
200 | unsigned char si = centeri.x > 0 ? 1 : 0 |
196 | | centeri.y > 0 ? 2 : 0 |
201 | | centeri.y > 0 ? 2 : 0 |
197 | | centeri.z > 0 ? 4 : 0; |
202 | | centeri.z > 0 ? 4 : 0; |
… | |
… | |
216 | ctx.vislist.push_back (this); |
221 | ctx.vislist.push_back (this); |
217 | |
222 | |
218 | ctx.postdepthlist.push_back (this); |
223 | ctx.postdepthlist.push_back (this); |
219 | } |
224 | } |
220 | else |
225 | else |
|
|
226 | { |
221 | vs.state = OCCLUDED; |
227 | vs.state = OCCLUDED; |
|
|
228 | ctx.postdepthlist.push_back (this); |
|
|
229 | } |
222 | |
230 | |
223 | return visible; |
231 | return visible; |
224 | } |
232 | } |
225 | |
233 | |
226 | void octant::draw_depth (view &ctx) |
234 | void octant::draw_depth (view &ctx) |
… | |
… | |
333 | } |
341 | } |
334 | |
342 | |
335 | vb.set (vd, 8, GL_STREAM_DRAW_ARB); |
343 | vb.set (vd, 8, GL_STREAM_DRAW_ARB); |
336 | vb.bind (); |
344 | vb.bind (); |
337 | for (int i = 0; i < 6; i++) |
345 | for (int i = 0; i < 6; i++) |
338 | ib.draw (GL_LINES, i*4, 4); |
346 | ib.draw (GL_LINE_LOOP, i*4, 4); |
|
|
347 | |
339 | } |
348 | } |
340 | #endif |
349 | #endif |
341 | |
350 | |
342 | for (int i = 0; i < size (); ++i) |
351 | for (int i = 0; i < size (); ++i) |
343 | { |
352 | { |