{"action":"created","issue":{"url":"https://api.github.com/repos/PistonDevelopers/piston_window/issues/136","repository_url":"https://api.github.com/repos/PistonDevelopers/piston_window","labels_url":"https://api.github.com/repos/PistonDevelopers/piston_window/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/PistonDevelopers/piston_window/issues/136/comments","events_url":"https://api.github.com/repos/PistonDevelopers/piston_window/issues/136/events","html_url":"https://github.com/PistonDevelopers/piston_window/issues/136","id":149681312,"number":136,"title":"Cannot clear window due to `draw_*d` being on the window now","user":{"login":"TheNeikos","id":1631166,"avatar_url":"https://avatars.githubusercontent.com/u/1631166?v=3","gravatar_id":"","url":"https://api.github.com/users/TheNeikos","html_url":"https://github.com/TheNeikos","followers_url":"https://api.github.com/users/TheNeikos/followers","following_url":"https://api.github.com/users/TheNeikos/following{/other_user}","gists_url":"https://api.github.com/users/TheNeikos/gists{/gist_id}","starred_url":"https://api.github.com/users/TheNeikos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheNeikos/subscriptions","organizations_url":"https://api.github.com/users/TheNeikos/orgs","repos_url":"https://api.github.com/users/TheNeikos/repos","events_url":"https://api.github.com/users/TheNeikos/events{/privacy}","received_events_url":"https://api.github.com/users/TheNeikos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PistonDevelopers/piston_window/labels/discussion","name":"discussion","color":"bfe5bf"},{"url":"https://api.github.com/repos/PistonDevelopers/piston_window/labels/draft","name":"draft","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-20T07:18:10Z","updated_at":"2016-04-22T19:18:40Z","closed_at":null,"body":"An unforseen consequence of putting the draw on the window is that it is now borrowed mutably during `draw_2d` and `draw_3d`! Which means that one cannot now borrow anything from it immutably, like for example clearing the output.\r\n\r\n```rust\r\nwindow.draw_3d(&e, |enc| {\r\n    enc.clear(&window.output_color, GRAY);\r\n});\r\n```\r\n\r\nWill not compile.\r\n\r\n(I've accidentally opened it on the wrong [repo](https://github.com/PistonDevelopers/piston-examples/issues/345) before )"},"comment":{"url":"https://api.github.com/repos/PistonDevelopers/piston_window/issues/comments/213559477","html_url":"https://github.com/PistonDevelopers/piston_window/issues/136#issuecomment-213559477","issue_url":"https://api.github.com/repos/PistonDevelopers/piston_window/issues/136","id":213559477,"user":{"login":"bvssvni","id":1743862,"avatar_url":"https://avatars.githubusercontent.com/u/1743862?v=3","gravatar_id":"","url":"https://api.github.com/users/bvssvni","html_url":"https://github.com/bvssvni","followers_url":"https://api.github.com/users/bvssvni/followers","following_url":"https://api.github.com/users/bvssvni/following{/other_user}","gists_url":"https://api.github.com/users/bvssvni/gists{/gist_id}","starred_url":"https://api.github.com/users/bvssvni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bvssvni/subscriptions","organizations_url":"https://api.github.com/users/bvssvni/orgs","repos_url":"https://api.github.com/users/bvssvni/repos","events_url":"https://api.github.com/users/bvssvni/events{/privacy}","received_events_url":"https://api.github.com/users/bvssvni/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T19:18:40Z","updated_at":"2016-04-22T19:18:40Z","body":"Alternative:\r\n\r\n- Pass `PistonWindow` to `draw_3d`\r\n- Remove `PistonWindow::app` to use application state separately in `draw_2d`"}}