Pictures of a Cauldron2D.Sectors.Pictures set uploaded as RGBA textures through a
768-byte palette. Masked pixels (mask byte 0) are see-through.
The set must keep its pictures in Elixir (Pictures.new(named, tables, native: false)).
textures = CauldronGPU.Sectors.Textures.upload(gpu, pictures, palette, [3, 7], :nearest)
%{handle: handle, masked: false} = textures[3]
Summary
Functions
The RGBA texture of one column-by-column picture in colours, a tuple of 256 RGBA binaries.
Uploads pictures ids of pictures, filtered with filter. Raises ArgumentError
when the set keeps its pictures in the native library.
Types
@type entry() :: %{handle: CauldronGPU.Handle.t(), masked: boolean()}
Functions
@spec texture(Cauldron2D.Sectors.Pictures.picture(), tuple()) :: CauldronGPU.Texture.t()
The RGBA texture of one column-by-column picture in colours, a tuple of 256 RGBA binaries.
@spec upload( CauldronGPU.Target.t(), Cauldron2D.Sectors.Pictures.t(), binary(), [non_neg_integer()], :linear | :nearest ) :: %{required(non_neg_integer()) => entry()}
Uploads pictures ids of pictures, filtered with filter. Raises ArgumentError
when the set keeps its pictures in the native library.