#Program crashes, but works in gdb
1 messages · Page 1 of 1 (latest)
GL_FLOAT does not indicate float size in bytes. It is a constant used by OpenGL to specify types. Use @sizeOf(f32) instead
Yes but I usually let Copilot write this sort of standard code, and it seemed about right
Of course this has to implicitly cast the "GL_FLOAT" GLenum to a c_int to a GLsizei which is questionable, but if Zig doesn't prohibit this by default I guess it's fine
It's not casting anything, they are both just type aliases for a c_int in the first place
pub const GLenum = c_uint;
pub const GLsizei = c_int;
I guess one of them is a c_uint but C libraries often use these interchangeably so it makes sense to not be as strict here