tsdl
tsdl copied to clipboard
Thin bindings to SDL for OCaml
Fix for #99 (I still need to test this on Windows and Linux.)
This pull request implements the SDL_Vertex type and SDL_RenderGeometry function for TSDL. SDL_RenderGeometry renders an arbitrary list of vertices, by default in order but optionally in a user-specified order. It...
Follow-up to https://discuss.ocaml.org/t/ann-bogue-the-ocaml-gui/9099/60?u=jbeckford The logs are garbled: ``` 2024-03-07 22:03:44.812 examples.exe[7961:10522604] INFO: ؠ&` 2024-03-07 22:16:56.467 ocamlrunx[25764:10578085] INFO: (null) ``` and can get a SIGSEGV through this backtrace: ``` (lldb) thread...
This is a fix for https://github.com/dbuenzli/tsdl/issues/96 ### Before (1.0.0) ``` $ del -force -Recurse _build ; Y:\source\dksdk-coder\msys64\usr\bin\bash -lc 'PATH="/y/source/dksdk-coder/.ci/sd4/opamrun:$PATH"; opamrun exec -- ocaml pkg/pkg.ml build' ... ocamlfind ocamlmklib -o src/tsdl...
(I'll submit a PR) Using `dune utop` in an opam switch that has `tsdl` on Windows results in: ```text Fatal error: exception Dl.DL_error("dlsym: no such symbol: \"SDL_GetError\"") ``` That is...
[SDL2 documentation](https://wiki.libsdl.org/SDL2/SDL_GetTicks#remarks) recommends avoiding SDL_GetTicks in favor of SDL_GetTicks64, because values from SDL_GetTicks will wrap every ~49 days. It would be useful to have a binding for SDL_GetTicks64.
For some reason this line: https://github.com/dbuenzli/tsdl/blob/9e8403065fa53d46adefd7d196c659e058ef7099/test/test.ml#L630 Results in a: ``` -[_MTLCommandBuffer presentDrawable:]:602: failed assertion `drawable must not be nil.' ``` on macOS
While writing an application using OCaml and Tsdl, I encountered a bug which affects either Tsdl, SDL, Cocoa or Ocaml bindings. I fully described the bug here: https://bugzilla.libsdl.org/show_bug.cgi?id=4069 In short,...