Open MGilleronFJ opened 4 months ago
I think returning an error would me more "Zig like", but it requires creating an extra struct for each type this affects. These are
I'll see if I can come up with an elegant solution for this, without requiring much manual intervention
In Raylib,
Image.data
can be checked for null in case loading an image failed: https://github.com/raysan5/raylib/blob/9a280cda0be211ee751cdb44fedab8f1e698be2a/src/rtextures.c#L4156But in the bindings,
data
is*anyopaque
, and Zig seems to not allow comparing it with null. Maybe it should be?*anyopaque
? OrloadImage
could return an error? (depending on how thin the bindings should be)