graphics
graphics copied to clipboard
Use associated type for draw state
Blending is not usually required for widgets, and using a custom draw state means overhead. Perhaps we could use the native draw state?
- A software rasterizer might want full Duff/Porter blending
- A GPU rasterizer might want pre-multiplied alpha with a simple blend equation
Some features, such as rectangle clipping and stencil buffer, could be handled through a trait.
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