Skip to content

Change Buffer.Uri type from string to byte[] #47

@Nickpofig

Description

@Nickpofig

C# char is ALWAYS 2 bytes long (UTF-16). Therefore, in cases of loading GLTF files with embedded data (buffer's URI cares model data within it), when you treat the buffer as an array of bytes/ints/floats/etc - the data you read is wrong. The reason is that every second byte's value that you read from such a buffer is zero. Not only data is ill-formatted, but the buffer itself is twice the necessary size.

Please fix it.

P.s. I know it is annoying :) #blame_microsoft. This bug will always haunt people who port C/C++ code to C#.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions