Fixed mipmaps being outdates after texture update.

pyro-refactor
Tomasz Kapuściński 2020-07-31 22:04:47 +02:00
parent 33b7c893cb
commit 4c14050b27
1 changed files with 2 additions and 0 deletions

View File

@ -886,6 +886,8 @@ void CGL33Device::UpdateTexture(const Texture& texture, Math::IntPoint offset, I
glTexSubImage2D(GL_TEXTURE_2D, 0, offset.x, offset.y, texData.actualSurface->w, texData.actualSurface->h,
texData.sourceFormat, GL_UNSIGNED_BYTE, texData.actualSurface->pixels);
glGenerateMipmap(GL_TEXTURE_2D);
SDL_FreeSurface(texData.convertedSurface);
}