cgltf icon indicating copy to clipboard operation
cgltf copied to clipboard

BigEndian support

Open UkooLabs opened this issue 3 years ago • 4 comments

would it be possible to add support for BigEndian

UkooLabs avatar Jun 26 '21 23:06 UkooLabs

For what would the be applicable? Are you having issues with endianess? Where does it break?

jkuhlmann avatar Jul 04 '21 15:07 jkuhlmann

@jkuhlmann in my case Xbox 360. I have made some modifications which has made it work. But maybe a better more complete way to do it that also supports writing as only done some read side.

I'm not sure what other platforms I'll be using that will also need big endian yet.

UkooLabs avatar Jul 04 '21 23:07 UkooLabs

Yeah, I think there aren't too many platforms left that default to big endian nowadays. The Xbox 360 seems hardly relevant when the Series X is out. :wink: Anyway, if you could share some sample code of what you fixed and how you did it, that might help me make a better decision on what we can do and if we should do something.

jkuhlmann avatar Sep 02 '21 19:09 jkuhlmann

@jkuhlmann

Changes.zip

I have attached a zip showing my changes. You will see int.h which add various int types not available for XBOX Original. Then the endian helper which checks for endianness and can convert values.

Since im not 100% familular with clgtf I may of missed conversion of endianess, if you see any please let me know but loading models on a Xbox 360 seems to work fine and render.

As a note it seems the Xbox Original / 360 / X scene is opening up again and im one of a few teams bringing new dashboards / apps to those consoles as well as other platforms

UkooLabs avatar Sep 15 '21 01:09 UkooLabs