mirror of https://github.com/axmolengine/axmol.git
For clang-format happy
This commit is contained in:
parent
65875a977e
commit
abf3405066
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue