For clang-format happy

This commit is contained in:
halx99 2023-03-28 00:07:33 +08:00
parent af68d2e9e2
commit 90f441441e
2 changed files with 4 additions and 6 deletions

View File

@ -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)

View File

@ -43,7 +43,7 @@ struct TextureInfoGL
~TextureInfoGL() { destroy(); }
template <typename _Fty>
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);
}