-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Byte offset greater than byte length #34
Comments
If you just want to read MeshPrimitive attribute data then I would suggest using the ReadBinaryData overload that accepts an Accessor parameter. The code looks like:
Where Also, I recommend that you do any path manipulation in your StreamReader implementation and avoid modifying the Document whenever possible. |
You could also use MeshPrimitiveUtils::GetTexCoords(_0):
|
Both work like a charm. Thanks! |
Original code snippet is mixing byte offsets with vector element indices. Solution is to either add |
I'm trying to read data from scene.bin file into memory. I am achieving this with this piece of code.
`
Then I simply do this.
`
When I'm trying to read attribute TEXCOORD_0 of MeshPrimitive from scene.bin file, I always get a situation where ByteOfsset is greater than ByteLength. This results in a crash at bufferData.erase(). What should I do in these situations? Is my offset calculation even correct?
The text was updated successfully, but these errors were encountered: