piston_window
piston_window copied to clipboard
How to update `G2dTexture` during a `draw_2d` event?
I'd like to use a G2dTexture as a cache for some glyphs alongside a rusttype::gpu_cache::Cache. In order to call UpdateTexture::update, it looks like mutable access to the Encoder is required, however it is already uniquely borrowed by the GfxGraphics instance during the call to draw_2d. Perhaps we should make the Encoder field on the GfxGraphics public?
Edit: Also, the update method requires the Format type, which I think is currently inaccessible through through piston_window. Same goes for the trait itself I think. Perhaps we should re-export the texture crate too?
Yes, that would be nice.