Added new methods to set uniforms in sf::Shader

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
This commit is contained in:
Jan Haller 2015-10-12 07:54:21 +02:00
parent fcb05fb975
commit 9c5c750e60
10 changed files with 1272 additions and 321 deletions

View file

@ -2000,7 +2000,9 @@ PREDEFINED = SFML_SYSTEM_API \
SFML_NETWORK_API \
SFML_WINDOW_API \
SFML_AUDIO_API \
SFML_GRAPHICS_API
SFML_GRAPHICS_API \
SFML_DEPRECATED \
SFML_DOXYGEN
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
# tag can be used to specify a list of macro names that should be expanded. The