Ray-caster: don't bother clearing the screen
The ray-caster triangles cover the whole viewport, so they'll completely overdraw the previous frame.
This commit is contained in:
parent
766d56027c
commit
b9587872d3
@ -161,9 +161,7 @@ fn main() {
|
||||
ctx.uniform1f(highlight_loc.as_ref(), highlight.get() as f32);
|
||||
ctx.uniform1i(layer_threshold_loc.as_ref(), layer_threshold.get() as i32);
|
||||
|
||||
// clear the screen and draw the scene
|
||||
ctx.clear_color(0.0, 0.0, 0.0, 1.0);
|
||||
ctx.clear(WebGl2RenderingContext::COLOR_BUFFER_BIT);
|
||||
// draw the scene
|
||||
ctx.draw_arrays(WebGl2RenderingContext::TRIANGLES, 0, VERTEX_CNT as i32);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user