bjz/gfx-rs — pull request #79 by kvark (2014-07-07 01:45:35+00:00)
Title: Basic rasterizer states

Provided for the review and to ignite a discussion.
Partially addresses #51. Features:
* Basic rasterizer state infrastructure
* Primitive state
* Depth state
* Blend state

It doesn't expose everything, striking for a reasonable balance in usability/power. For instance, it doesn't support rendering front faces as facets but back faces as lines. Blend states are going to need a per-draw-buffer selector, will be done in the future work. It's also imperfect that the blend state includes the constant color even though none of the factors may really need it.

Overall I'm not satisfied with the `Factor` and `Comparison` types. They would be more useful if they just copied GL enums, but I wanted to experiment first if we can take advantage of the Rust types system to make them more expressive. Any feedback is greatly appreciated!