OGL: Use unique_ptr instead of pointer when taking screenshot.