This fixes the gltf_viewer automated testing mode, invoked via `--batch=default --headless`. ReadPixels was being issued with an out-of-bounds size on high DPI platforms, which caused weird backend errors. Since we create an invisible SDL window while in headless mode, the presence of the SDL window does *not* indicate headless vs non-headless. Partial fix for #5111