Skip to content

Conversation

@DubiousCactus
Copy link
Contributor

Implement #14 and enable the use of webp extension (among other features).

extern fn cgltf_node_transform_world(node: ?*const Node, out_matrix: ?*[16]f32) void;

extern fn cgltf_buffer_view_data(view: ?*const BufferView) ?[*]u8;
extern fn cgltf_find_accessor(prim: ?*const Primitive, type: AttributeType, index: i32) ?*const Accessor;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For proper CABI compatibility index should really be of type c_int, as cgltf_int is defined as int in cgltf.h. There's loads of incorrect integer types already so this is at least in-keeping with the status quo. I'll follow up with fixes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, I used i32 based on what I saw in the rest of zcgltf.zig. I can adress those if you want.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, if you'd like to take care of it while you're working on the lib it would be much appreciated. Otherwise it might take some time before I get to it because it doesn't seem to be an issue that is affecting anyone.

@hazeycode hazeycode merged commit da79e85 into zig-gamedev:main Dec 28, 2025
9 checks passed
@DubiousCactus DubiousCactus deleted the upgrade_cgltf branch December 28, 2025 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants