fccm / OCamlSDL2

OCaml interface to SDL 2.0 (for Linux, Windows, MacOS, and ChromeBook)
Other
51 stars 10 forks source link

Implement texture locking and creation with access type #30

Closed csoren closed 2 years ago

csoren commented 2 years ago

This PR comprises two parts -

  1. Creating a texture with a specific access type (for instance rendering target or CPU writeable)
  2. Support for the SDL texture locking API.

Part 1 introduces the files sdlTextureAccess.* and the function caml_SDL_CreateTexture in sdltexture_stub.c

In part 2 texture locking produces a Bigarray instance, so the implementation is added to sdlba, by way of the sdltexture_ba.* files.