Closed Zylann closed 3 months ago
In C, rlDrawVertexArrayElements takes a const void *buffer as last parameter, which can be 0, as seen in DrawMesh: https://github.com/raysan5/raylib/blob/c1ea32655aad97402ea3b215ab7b414d0809bb8d/src/rmodels.c#L1511
rlDrawVertexArrayElements
const void *buffer
DrawMesh
However, in the Zig bindings, that parameter is exposed as *const anyopaque. It prevents from passing null or 0, so the function can't be used like in raylib's code. Perhaps it should be changed to ?*const anyopaque?
*const anyopaque
null
0
?*const anyopaque
I wonder if maybe some of the other rlgl functions that take void* arguments can also accept null pointers
void*
In C,
rlDrawVertexArrayElements
takes aconst void *buffer
as last parameter, which can be 0, as seen inDrawMesh
: https://github.com/raysan5/raylib/blob/c1ea32655aad97402ea3b215ab7b414d0809bb8d/src/rmodels.c#L1511However, in the Zig bindings, that parameter is exposed as
*const anyopaque
. It prevents from passingnull
or0
, so the function can't be used like in raylib's code. Perhaps it should be changed to?*const anyopaque
?