rendering during main loop using back buffer