rapidobj icon indicating copy to clipboard operation
rapidobj copied to clipboard

Question for the implementation of reading a file.

Open lch32111 opened this issue 1 year ago • 1 comments

Thank you for sharing your awesome work of reading obj data quickly! I am referring to your implementation for my game engine.

While reading your implementation, I was curious about why you replaced the aio with readahead+pread64 on the linux platform. Could you share anything about this? I have little experience on this kind of topic.

Thanks.

lch32111 avatar Oct 15 '24 14:10 lch32111

I think that you are using a wrong variable for GetOverlappedResult here: https://github.com/guybrush77/rapidobj/blob/744374a5d21fe01704eab0f36e633e8d620265e5/include/rapidobj/rapidobj.hpp#L5067

m_handle is the Event object created like this: https://github.com/guybrush77/rapidobj/blob/744374a5d21fe01704eab0f36e633e8d620265e5/include/rapidobj/rapidobj.hpp#L5014

According to MSDN, the first parameter of GetOverlappedResult should be a handle to the file, named pipe, or communication device. You can also find an example from here.

lch32111 avatar Oct 19 '24 03:10 lch32111