libvgm
libvgm copied to clipboard
Data Loader functions are not intuitive
The current workflow for using DataLoader is:
- File/MemoryLoader Init → create DataLoader object
- DataLoader SetPreloadBytes → set amount of bytes to load when opening the file
- DataLoader Load → "open" the file + load data (limited by SetPreloadBytes)
- [optional] DataLoader Read → load more data
- DataLoader CancelLoading → "close" the file
- DataLoader Deinit → destroy DataLoader object
New API that would be easier to understand (and be similar to what is common):
- File/MemoryLoader Init → create DataLoader object
- DataLoader Open → "open" the file (don't load data)
- DataLoader Read → load data
- DataLoader Close → "close" the file
- DataLoader Deinit → destroy DataLoader object
- [remove DataLoader SetPreloadBytes]