fix memleak, make sure gl textures are deleted by render thread, thanks to popcornmix