Fix the race condition issue of RenderOnce() in GlWindow