Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Loading sf::Texture from seperate thread requires glFlush() #411
In the latest 2.0 release, this bug is still apparently an issue and I have to use glFlush() at the end of my threads execution.
I only know of the solution thanks to this thread from last month:
I can confirm that several of my users had the same issue where if I didn't flush after loading a texture from a thread, the textures would often end up corrupt or wouldn't load at all. Granted I was using straight up OpenGL and not SFML's sf::Texture, but the point remains that this is a real issue. Simply adding a glFlush at the end of every texture load is not ideal as that can drastically reduce performance, but having to bother the user with issues such as having to flush isn't ideal either.