Prettied up some code.

This commit is contained in:
Alex Szpakowski
2014-08-26 00:05:08 -03:00
parent d5e5f38e2f
commit d6cd2e2e7e
3 changed files with 18 additions and 32 deletions
+3 -4
View File
@@ -521,11 +521,10 @@ void OpenGL::deleteTexture(GLuint texture)
{
// glDeleteTextures binds texture 0 to all texture units the deleted texture
// was bound to before deletion.
std::vector<GLuint>::iterator it;
for (it = state.textureUnits.begin(); it != state.textureUnits.end(); ++it)
for (GLuint &texid : state.textureUnits)
{
if (*it == texture)
*it = 0;
if (texid == texture)
texid = 0;
}
glDeleteTextures(1, &texture);