how removing opengl textures from outside main thread is done so it happens as part of the main loop.