backend: gl: clear up textures

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2022-08-24 12:24:49 +01:00
parent b9d4b8a851
commit e680e8b30d
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
1 changed files with 5 additions and 0 deletions

View File

@ -494,6 +494,11 @@ static void _gl_compose(backend_t *base, struct backend_image *img, GLuint targe
glDeleteVertexArrays(1, &vao);
// Cleanup
glActiveTexture(GL_TEXTURE2);
glBindTexture(GL_TEXTURE_2D, 0);
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, 0);
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, 0);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
glDrawBuffer(GL_BACK);