You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It could be done like sf::RenderStates. You can keep method for one type of shader and write second method for all three types - if you don't want one of types you can simply pass empty string/stream (add sf::EmptyStream?). If one of shader's type won't be supported - you can simply fail loadFromXXX method - programmer should check which shaders are available before using them.
For checking which shaders are available you can simply modify existing method:
static bool isAvailable (Type shaderType);
Not bad idea is make it with binary flags.
The text was updated successfully, but these errors were encountered:
It could be done like sf::RenderStates. You can keep method for one type of shader and write second method for all three types - if you don't want one of types you can simply pass empty string/stream (add sf::EmptyStream?). If one of shader's type won't be supported - you can simply fail loadFromXXX method - programmer should check which shaders are available before using them.
For checking which shaders are available you can simply modify existing method:
static bool isAvailable (Type shaderType);
Not bad idea is make it with binary flags.
The text was updated successfully, but these errors were encountered: