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
- The installation paths are no longer hard coded; cmake now configures them so that Frameworks and libs can be installed somewhere else.
- No longer copy sndfile.framework but instead copy the new dependencies of the audio module.
- No longer copy .DS_Store to the install directory.
* Replaced the toolchain file with a new version based on [zuhowei's fork](https://github.com/zhuowei/android-cmake), which enables x64 builds as well as support for the latest NDK. This breaks compatibility with old build directories.
* Removed the STL dependency from **sfml-activity** rather than relying on *some* implementation implicitly linked by default.
* Deleted *project.properties*, which wasn't supposed to be part of the repository code. You have to use the Android SDK to recreate it (`android update project --path to/your/example --target 1 --name SFML-Example`).
* Made it possible to select a STL implementation to be used (default: `c++_shared`). Keep in mind that not all available configurations are necessarily compatible with SFML.
* Fixed linker flags to be compatible with Nvidia's Nsight Tegra for Visual Studio.
* It is now possible to compile the Android version using Nvidia's Nsight Tegra for Visual Studio (requires up-to-date CMake and `CMAKE_SFML_SYSTEM` to be set to `Android`; keep in mind that this is still experimental and requires further CMake updates).
* Updated and renamed some Android specific CMake variables.
* Made `armeabi-v7a` the default ABI for Android builds.
No longer install sndfile and/or freetype frameworks if SFML is built libraries not from the extlibs folder.
Related to #620 and Homebrew/homebrew#35479
Xcode templates are not updated yet to reflect that change since it involve toying with `install_name_tool` and is quite complex.
- Replaced @executable_path by @rpath for more flexibility
- Updated freetype and sndfile libs as follow:
install_name_tool -id "@rpath/../Frameworks/freetype.framework/Versions/A/freetype" freetype
install_name_tool -id "@rpath/../Frameworks/sndfile.framework/Versions/A/sndfile" sndfile
RPATH is especially useful when running debug builds for testing on *nix
operating systems, because the binaries (e.g. examples) include library
runtime path information. This allows you to skip installing SFML to the
system or adjusting PATH variables/ld config.
* Instead of configuring Xcode templates directly to /Library the files are first saved in CMAKE_CURRENT_BINARY_DIR
* This avoid running CMake as root on some systems
* Setting CMAKE_OSX_DEPLOYMENT_TARGET to something implies setting CMAKE_OSX_SYSROOT too
* The default values are enough for most users
* If someone is trying to compile SFML with 10.6 SDK it will simply fail later anyway
* Apparently, there were some leaks not reported as such
* Support for 32 bits computer is restored
* Fix memory leak in sfStringToNSString (related to #484)
* Unapply context when closing the window, freeing memory
The following commits are related to ARC modifications:
* 42f6e83dfb
* 6edc4b9518
* f6c94451fb
* 324d4a18e7
* 0d47056132
Commit ac28902b57 is the last one before the introduction of ARC.
A current limitation prevents one library from depending on shared libraries.
As we have legal issues here (LGPL wants us to use shared libs of OpenAL-Soft and libsndfile), we're forced to use this homemade native activity which will manually load our shared libraries.
What's new in the templates:
- Removed support for 32 bits and gcc
- Removed useless code
- Removed custom warnings settings – let Xcode decide with its default values
- Set default target version to CMAKE_OSX_DEPLOYMENT_TARGET
What's new in cmake script:
- Added cmake options for archs and deployment target
- Added minimum requirements checking
No attempt to fix this part of the script is made because it change too
often (at each OS release) and no gain would result from a potential
fix.
SDKs are not stored in /Developer anymore with recent versions of Xcode.
Now the users should manually set the following variables :
- CMAKE_OSX_SYSROOT,
- CMAKE_OSX_DEPLOYMENT_TARGET,
- CMAKE_OSX_ARCHITECTURES
The modules provided are:
- sfml-system
- sfml-graphics
- sfml-window
- sfml-audio
- sfml-network
- sfml-all (depends on all the above modules)
They are installed to ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig/
which is the standard location for pkg-config files on Linux.
An example use if using autotools:
# configure.ac
AC_INIT([sfml-example],[1.0],[example@example.com])
AM_INIT_AUTOMAKE([foreign])
AC_PROG_CXX
PKG_CHECK_MODULES([sfml],
[sfml-all >= 2.0.0],
[], [AC_MSG_ERROR([SFML is required])])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
# Makefile.am
bin_PROGRAMS = sfml_example
sfml_example_SOURCES = src/sfml_example.cpp
sfml_example_CFLAGS = $(sfml_CFLAGS)
sfml_example_LIBS = $(sfml_LIBS)
An example if using hand-written Makefiles:
# Makefile
sfml-example: src/sfml-example.cpp
g++ `pkg-config --cflags --libs sfml-all` -o $@ $^