CauldronGPU.Bsp.Pictures (CauldronGPU v0.3.3)

Copy Markdown View Source

A BSP world's textures uploaded as RGBA: the base picture of each, and for a :quake world a glow picture holding only its full-bright colours (palette 224 and up) when it has any. Colour 255 of a :masked texture is see-through.

Summary

Functions

The uploaded pictures of texture index.

Every handle held.

Uploads every texture of bsp; palette serves textures without their own.

Types

entry()

@type entry() :: %{
  base: CauldronGPU.Handle.t(),
  glow: CauldronGPU.Handle.t() | nil,
  kind: Cauldron3D.Bsp.kind()
}

t()

@type t() :: tuple()

Functions

get(pictures, index)

@spec get(t(), non_neg_integer()) :: entry()

The uploaded pictures of texture index.

handles(pictures)

@spec handles(t()) :: [CauldronGPU.Handle.t()]

Every handle held.

upload(gpu, bsp, palette, filter)

@spec upload(CauldronGPU.Target.t(), Cauldron3D.Bsp.t(), binary(), :linear | :nearest) ::
  t()

Uploads every texture of bsp; palette serves textures without their own.