Render progress: separate function implementation into cpp