When dealing with calculations that are fundamentally two dimensional
it's helpful to use a 2D data type as much as possible rather than
decomposing the calculations into x and y components. The more we use
vector operations the better chance we have of easiliy reasoning about
what the code is doing.
Fixed formatting issues per review
Implemented copy constructor since operator= is implemented
Reverted operator=, add NOLINT for copy constructor per review
Fixed clang-tidy escape in examples
Fixed OSX clang-tidy escapes
CMake doesn't require absolute paths so we can safely remove
SRCROOT and let implicit relative pathing achieve the same result
with less work on our part.
Similar to sf::Time, sf::Angle provides a typesafe API for working
with angles and provides named functions for converting to and from
degrees and radians.
This removes the sfml- prefixed targets from the export set. The sfml-
prefixed targets are still available within the build tree but not to
downstream users thus making this an API breaking change when compared
to the 2.x releases. To keep things consistent, usage of the sfml-
targets were replaced with their namespaced counterparts.
This has a number of benefits:
1. It's more idiomatic. Modern CMake libraries are expected to
have namespaced targets.
2. Namespaced targets are less likely to collide with user-defined
targets. No one will accidentally define a SFML:: target.
3. If a namespaced target is not found by CMake, configuration
will immediately stop.
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
* French to English punctuation.
* Pong and Shader use fixed-sized windows now (especially on tiling
window managers, the windows will be resized automatically, thus
making the examples look and also behave weirdly).