package hugin

  1. Overview
  2. Docs

Module Usdl.SurfaceSource

Sourcetype t = surface

The type for SDL surfaces.

Sourceval create_argb8888 : w:int -> h:int -> t

create_argb8888 ~w ~h is a 32-bit ARGB8888 surface.

Raises Failure if allocation fails.

Sourceval pitch : t -> int

pitch t is the byte length of one row.

pixels t is the raw pixel buffer. The bigarray is a view onto SDL-managed memory; it must not outlive the surface.

Sourceval destroy : t -> unit

destroy t frees the surface. Safe to call more than once.