This fixes wrong rendering for RenderTexture that need sRGB encoding along a
non-sRGB window.
We cannot simply always enable GL_FRAMEBUFFER_SRGB because some drivers
enable sRGB encoding on non-sRGB window surfaces.
Also add a isSrgb() method to tell if a RenderTarget is encoding into
sRGB color space.
When the sf::ContextSettings asks for an sRGB capable buffer, set the
rendered image to sRGB mode and convert pixels when drawing.
This is the choice of simplicity compared to actually support textures
with more color depth.
- On Windows you can use Clang with both MSVC and MinGW
- When using Clang with MSVC all the MSVC conditions should be fulfilled
- When using Clang with MinGW all the MSVC steps should not be run
When waiting for an event, rather then polling, the android
looper prevents the creation of a OpenGL context till ALooper
receives an event rather then allowing creation at the appropriate time
sf::Context::getActiveContext could return an inactive context if
RenderTargets activation occured since the last sf::Context activation.
This is not what its documentation suggest, and was clearly an
unexpected behaviour.
This fix make the function return NULL if the current active context is
not managed by sf::Context (e.g. because it is a RenderTarget).
Windows uses a mechanism known as 'resource files' which provides, among
other things, metadata to a given executable/dll/driver/etc, and add a
layer of polish to a project which it would otherwise lack.
The existing dependencies in the extlibs directory
have been updated to use universal frameworks
for both x86_64 and arm64, allowing SFML to built
natively on the new M1 chipset
When a single GitHub Action build fails, the other builds should not be
canceled, but instead should continue to build.
Since the matrix is setup on OS level, a failing build on one OS usually
doesn't mean it's broken for all OS.
Closes#1711 - race condition on stbi_failure_reason()
This does not only avoid the race condition on the failure string itself, but also makes failure state thread-local, meaning that each string will be correctly associated with the last image it failed to load.
This fixes a bug that caused `sf::Music` to cease looping after certain
seeks due to the sample offset misaligning with the sound file's channel
count.