New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading sf::Texture from seperate thread requires glFlush() #411

Closed
silbinarywolf opened this Issue Jun 18, 2013 · 2 comments

Comments

Projects
None yet
3 participants
@silbinarywolf

silbinarywolf commented Jun 18, 2013

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:
http://en.sfml-dev.org/forums/index.php?topic=10344.15

@retep998

This comment has been minimized.

Show comment
Hide comment
@retep998

retep998 Jun 18, 2013

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.
For specifics on the hardware/software, Windows with Nvidia or Intel caused the issue, while Windows with AMD or any linux or mac platform I tested did not have the issue. Nvidia had corrupt textures, while Intel simply had blank missing textures.

retep998 commented Jun 18, 2013

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.
For specifics on the hardware/software, Windows with Nvidia or Intel caused the issue, while Windows with AMD or any linux or mac platform I tested did not have the issue. Nvidia had corrupt textures, while Intel simply had blank missing textures.

@ghost ghost assigned LaurentGomila Jun 18, 2013

@LaurentGomila

This comment has been minimized.

Show comment
Hide comment
@LaurentGomila

LaurentGomila Jul 1, 2013

Member

Actually, calling glFlush() might be a solution. It would be needed only after loading resources (sf::Font, sf::Texture, sf::Shader), which is usually not done 60 times per second and already expensive anyway.

Member

LaurentGomila commented Jul 1, 2013

Actually, calling glFlush() might be a solution. It would be needed only after loading resources (sf::Font, sf::Texture, sf::Shader), which is usually not done 60 times per second and already expensive anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment