bind texture target (#19786)

This commit is contained in:
coulsonwang 2019-06-04 09:25:32 +08:00 committed by minggo
parent 89ba801628
commit bf93892ec9
1 changed files with 2 additions and 0 deletions

View File

@ -269,6 +269,7 @@ void Texture2DGL::generateMipmaps()
if(!_hasMipmaps)
{
_hasMipmaps = true;
glBindTexture(GL_TEXTURE_2D, _textureInfo.texture);
glGenerateMipmap(GL_TEXTURE_2D);
}
}
@ -436,6 +437,7 @@ void TextureCubeGL::generateMipmaps()
if(!_hasMipmaps)
{
_hasMipmaps = true;
glBindTexture(GL_TEXTURE_CUBE_MAP, _textureInfo.texture);
glGenerateMipmap(GL_TEXTURE_CUBE_MAP);
}
}