TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::metal::MetalImageSet Class Referencefinal

The images the shaders sample, by ImageIndex (1-based; the shaders' slot is one less). More...

#include <gui_core/graphics/metal/metal_device.h>

Inheritance diagram for tachyon::metal::MetalImageSet:

Public Member Functions

void Create (uint32_t capacity)
void Clear () override
 Removes every image, freeing all indices.
ImageIndex Add (Image *image) override
 Adds an image (not owned) and returns its index.
void Remove (ImageIndex index) override
 Frees the index for reuse; the image itself stays.
ImageIndex ReserveIndex ()
 A slot with no image yet, for one that comes later (a text atlas page).
void SetImage (ImageIndex index, MetalImage *image)
 Points the slot at another image.
uint32_t Capacity () const
uint32_t SlotsInUse () const
 One past the highest slot handed out: what a frame writes.
const std::vector< MetalImage * > & Images () const
const std::vector< uint32_t > & SamplerSlots () const
 Each slot's sampler (SamplerSlot), as the shaders' table holds them.
Public Member Functions inherited from tachyon::ImageSet
virtual ~ImageSet ()

Detailed Description

The images the shaders sample, by ImageIndex (1-based; the shaders' slot is one less).

Each window frame writes the slots' textures into its own table (MTLResourceIDs), so a slot pointed elsewhere never changes what a frame in flight reads.

Member Function Documentation

◆ Create()

void tachyon::metal::MetalImageSet::Create ( uint32_t capacity)
inline

◆ Clear()

void tachyon::metal::MetalImageSet::Clear ( )
overridevirtual

Removes every image, freeing all indices.

Implements tachyon::ImageSet.

◆ Add()

ImageIndex tachyon::metal::MetalImageSet::Add ( Image * image)
overridevirtual

Adds an image (not owned) and returns its index.

Implements tachyon::ImageSet.

◆ Remove()

void tachyon::metal::MetalImageSet::Remove ( ImageIndex index)
overridevirtual

Frees the index for reuse; the image itself stays.

Implements tachyon::ImageSet.

◆ ReserveIndex()

ImageIndex tachyon::metal::MetalImageSet::ReserveIndex ( )

A slot with no image yet, for one that comes later (a text atlas page).

◆ SetImage()

void tachyon::metal::MetalImageSet::SetImage ( ImageIndex index,
MetalImage * image )

Points the slot at another image.

◆ Capacity()

uint32_t tachyon::metal::MetalImageSet::Capacity ( ) const
inline

◆ SlotsInUse()

uint32_t tachyon::metal::MetalImageSet::SlotsInUse ( ) const
inline

One past the highest slot handed out: what a frame writes.

◆ Images()

const std::vector< MetalImage * > & tachyon::metal::MetalImageSet::Images ( ) const
inline

◆ SamplerSlots()

const std::vector< uint32_t > & tachyon::metal::MetalImageSet::SamplerSlots ( ) const
inline

Each slot's sampler (SamplerSlot), as the shaders' table holds them.


The documentation for this class was generated from the following file: