After a false start and sorting out what "pitch" meant on SDL_UpdateTexture. Turns out it was very literal in naming (and also tsdl saves you from having to compute the number of bytes pre row).

Anyways :>

#OCaml #GameDev

Also, so glad OCaml simple to use imperative programming. It makes this mind of pumping work a lot nicer.
@andnull Yeah compared to the other SDL boilerplate I've seen this seems lovely
@arcade It's more or less a transliteration of C with the helper sdl_unwrap which just returns the value in Ok res or calls failwith msg from Error (Msg msg)`. The bindings are more or less 1:1 with C (aside from wherever OCaml can offer a small bit of convience). Looking forward to building an actual API out of this.
@andnull maybe ocaml just looks cleaner than C lol :P
@arcade OCaml is so clean.