graphics icon indicating copy to clipboard operation
graphics copied to clipboard

Use associated type for draw state

Open bvssvni opened this issue 10 years ago • 1 comments

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.

bvssvni avatar Sep 30 '15 14:09 bvssvni

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

bvssvni avatar Nov 09 '15 00:11 bvssvni