- make-surface width height depthprocedure
- make-surface* width height depthprocedure
Create a new sdl2:surface with the given width, height, and color depth (bits per pixel). This is a more convenient interface for create-rgb-surface. The sdl2:surface's pixel format and masks will be chosen automatically based on the requested depth and the current platform's byte order (little endian or big endian).
These procedures signal an exception of kind (exn sdl2) if the sdl2:surface could not be created (e.g. because the color depth is unsupported).
- make-surface returns a managed sdl2:surface.
- make-surface* returns an unmanaged sdl2:surface, which must be freed with free-surface! when you are done with it.