chickadee » sdl2 » create-texture*

create-texture renderer format access w hprocedure
create-texture* renderer format access w hprocedure

Create a new sdl2:texture using the given sdl2:renderer and settings.

  • renderer must be a sdl2:renderer.
  • format must be a pixel format enum symbol or equivalent integer.
  • access must be a texture access enum symbol or equivalent integer.
  • w must be an integer, specifying the texture's width in pixels.
  • h must be an integer, specifying the texture's height in pixels.

These procedures signal an exception of kind (exn sdl2) if the sdl2:texture could not be created.

  • create-texture returns a memory-managed sdl2:texture.
  • create-texture* returns an unmanaged sdl2:texture, which should be destroyed with destroy-texture! when you are done with it.

Requires sdl2 egg 0.2.0 or higher.