moved renderer->update() in engine::run()