mirror of
https://github.com/SFML/SFML.git
synced 2024-11-25 04:41:05 +08:00
Fixed stale FBOs not being erased from the staleFramebuffers set after they have been deleted.
This commit is contained in:
parent
b9303866a6
commit
4a41f37d5d
@ -60,12 +60,18 @@ namespace
|
||||
{
|
||||
sf::Uint64 contextId = sf::Context::getActiveContextId();
|
||||
|
||||
for (std::set<std::pair<sf::Uint64, unsigned int> >::iterator iter = staleFrameBuffers.begin(); iter != staleFrameBuffers.end(); ++iter)
|
||||
for (std::set<std::pair<sf::Uint64, unsigned int> >::iterator iter = staleFrameBuffers.begin(); iter != staleFrameBuffers.end();)
|
||||
{
|
||||
if (iter->first == contextId)
|
||||
{
|
||||
GLuint frameBuffer = static_cast<GLuint>(iter->second);
|
||||
glCheck(GLEXT_glDeleteFramebuffers(1, &frameBuffer));
|
||||
|
||||
staleFrameBuffers.erase(iter++);
|
||||
}
|
||||
else
|
||||
{
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user