Just asking about some progress callback API. It would be convenient to pass something like OpenImage::ProgressCallback onto the rapidobj::ParseFile. E.x.
/// Pointer to a function called periodically by ParseFile.
/// It returns a bool, which if 'true' will STOP the read.
typedef bool (*ProgressCallback)(float portion_done);
inline Result ParseFile(
const std::filesystem::path& obj_filepath,
const MaterialLibrary& mtl_library = MaterialLibrary::Default(),
const ProgressCallback& progress_callback = nullptr);
As shown, it also can be used to terminate the reading, returning an error probably. It's a QoL for loading large files / using slow PC.
Just asking about some progress callback API. It would be convenient to pass something like
OpenImage::ProgressCallback
onto therapidobj::ParseFile
. E.x.As shown, it also can be used to terminate the reading, returning an error probably. It's a QoL for loading large files / using slow PC.