LaurentGomila/SFML — pull request #599 by MarioLiebisch (2014-05-15 13:52:47+00:00)
Title: Added support for geometry shaders

I went ahead and created this branch/pull request as an alternative/enhancement to #432.

Here are the differences/additions:

* This patch doesn't remove the member function group `loadFrom...(resource, type)`.
* I've added a new example showcasing a geometry shader used to create billboards from single points (great for particle systems; this is rendering 10.000 moving/resizing/rotating sprites).
![Geometry shader example screenshot][1]
* The old shader example compiles once again.
* I've already updated quite a few comments (but there are still a few to go).

The only big thing I'm still thinking about is the fact that this essentially changes the API (although in a minimal way and it's fixable):

* `sf::Shader::isAvailable()` now expects a bitmask to identify the requested shader types (this could be fixed using a default parameter or overloaded function).
* The member function group `loadFrom...(resource, resource, resource)` has a new additional parameter. The order of parameters shouldn't be changed (since that's the order shaders are processed), but would it be a good idea to provide an overload with the old order/interface?

What do you think?

[1]:http://i.imgur.com/xQYrjkW.png