Implements a new design for the shader uniform API.
* Added Shader::setUniform() and Shader::setUniformArray() overloads for the following types:
-> scalars: float, int, bool
-> vectors: 2D, 3D, 4D
-> matrices: 3x3, 4x4
-> arrays of basic types
-> samplers (sf::Texture)
-> conversions for SFML types (sf::Transform, sf::Color)
* Added sf::Glsl namespace with GLSL-equivalent types
* Deprecated Shader::setParameter() overloads
Other related changes:
* Refactored sf::Shader internals to avoid code duplication
* Improved documentation
* Added SFML_DEPRECATED macro to Doxyfile
* Defined _SCL_SECURE_NO_WARNINGS to disable std::copy() warnings on MSVC
Attempt to fix issue #953, although I can't really say whether this is
indeed some driver thing. All snippets I've found use exact comparison
only (usually switches).
Changes:
* In addition to source file and line, the expression itself is output
* For better readability, the log is split across multiple lines
* alCheck() doesn't unnecessarily construct std::string when there is no error
* Unused #include directives are removed
At the moment, glCheck(...) and alCheck(...) look like a function calls, which is misleading and can cause subtle bugs, for example when used in if statements. This change mitigates the situation by allowing those expressions to be used as single statements within if/else branches.
Initializations of OpenGL handles that previously involved glCheck() calls now need to be split into separate declaration and assignment.
Changes:
* In addition to source file and line, the expression itself is output
* For better readability, the log is split across multiple lines
* alCheck() doesn't unnecessarily construct std::string when there is no error
* Unused #include directives are removed
At the moment, glCheck(...) and alCheck(...) look like a function calls, which is misleading and can cause subtle bugs, for example when used in if statements. This change mitigates the situation by allowing those expressions to be used as single statements within if/else branches.
Initializations of OpenGL handles that previously involved glCheck() calls now need to be split into separate declaration and assignment.