diff --git a/core/renderer/backend/opengl/TextureGL.cpp b/core/renderer/backend/opengl/TextureGL.cpp index 6812a6e8a9..828afa7390 100644 --- a/core/renderer/backend/opengl/TextureGL.cpp +++ b/core/renderer/backend/opengl/TextureGL.cpp @@ -77,14 +77,13 @@ void TextureInfoGL::applySampler(const SamplerDescriptor& descriptor, bool isPow } // apply sampler for all internal textures - foreach ([this, target](GLuint texID, int index) { + foreachTextures([this, target](GLuint texID, int index) { glBindTexture(target, textures[index]); setCurrentTexParameters(target); glBindTexture(target, 0); // unbind - }) - ; + }); } void TextureInfoGL::setCurrentTexParameters(GLenum target) diff --git a/core/renderer/backend/opengl/TextureGL.h b/core/renderer/backend/opengl/TextureGL.h index 2eb8aa0683..e975626448 100644 --- a/core/renderer/backend/opengl/TextureGL.h +++ b/core/renderer/backend/opengl/TextureGL.h @@ -43,7 +43,7 @@ struct TextureInfoGL ~TextureInfoGL() { destroy(); } template - void foreach (const _Fty& cb) const + void foreachTextures(const _Fty& cb) const { GLuint texID; int idx = 0; @@ -56,8 +56,7 @@ struct TextureInfoGL void destroy() { - foreach ([=](GLuint texID, int) { glDeleteTextures(1, &texID); }) - ; + foreachTextures([=](GLuint texID, int) { glDeleteTextures(1, &texID); }); textures.fill(0); }