PistonDevelopers/piston-examples

Cannot clear window due to `draw_*d` being on the window now

TheNeikos opened this issue · 1 comments

An unforseen consequence of putting the draw on the window is that it is now borrowed mutably! Which means that one cannot now borrow anything from it immutably, like for example clearing the output.

window.draw_3d(&e, |enc| {
    enc.clear(&window.output_color, GRAY);
});

Will not compile.

Oops, wrong repo