add opengl texture restore