Re: sdl2 and ffi
- Posted by Icy_Viking Nov 14, 2022
- 2996 views
I like the idea of having define_c_struct() and define_c_union(), I think that would help simplify things.
Would it be possible to do something like this, eventually:
public constant MY_STRUCT = define_c_struct({ C_INT, --x C_INT, --y C_INT, --w C_INT --h, MY_UNION = define_c_union({ C_FLOAT, --xx C_FLOAT, --yy }) --end of union }) --end of struct
The SDL 2 wrapper using FFI is still a work in progress and can be fixed and updated. It works for the most part, but it could use some tidying up here and there.