PistonDevelopers / graphics

A library for 2D graphics, written in Rust, that works with multiple back-ends
MIT License
479 stars 55 forks source link

Use associated type for draw state #1006

Open bvssvni opened 8 years ago

bvssvni commented 8 years ago

Blending is not usually required for widgets, and using a custom draw state means overhead. Perhaps we could use the native draw state?

Some features, such as rectangle clipping and stencil buffer, could be handled through a trait.

bvssvni commented 8 years ago

Gfx might change to PSO, which stores some extra stuff in draw state. This might be problematic to map to Glium's draw state, but not sure yet. See https://github.com/gfx-rs/gfx/issues/815