Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
es::skeletal::BatchList Class Reference

#include <SkeletalModule.hpp>

Classes

struct  Capacity
 What the list can take before it allocates again. More...

Public Member Functions

void reset ()
MeshBatch & open (std::uint32_t texture, int blendMode, bool premultipliedColor=false)
MeshBatch & back ()
 The batch still open — meaningful only while size() is nonzero.
std::size_t size () const
const MeshBatch & operator[] (std::size_t index) const
const MeshBatch * begin () const
const MeshBatch * end () const
Capacity capacity () const

Detailed Description

The batches of one extraction, in slots that outlive it: a slot is reopened rather than destroyed, so a frame writes into the capacity the last one grew. That capacity is the high-water mark of the largest extraction ever run here, held until the module goes — trimming it on a small frame is a per-frame free.

Definition at line 101 of file SkeletalModule.hpp.

Member Function Documentation

◆ back()

MeshBatch & es::skeletal::BatchList::back ( )
inline

The batch still open — meaningful only while size() is nonzero.

Definition at line 129 of file SkeletalModule.hpp.

◆ begin()

const MeshBatch * es::skeletal::BatchList::begin ( ) const
inline

Definition at line 133 of file SkeletalModule.hpp.

◆ capacity()

Capacity es::skeletal::BatchList::capacity ( ) const
inline

The whole pool, not what this extraction used: an idle slot keeps its storage, which is the point.

Definition at line 138 of file SkeletalModule.hpp.

References es::skeletal::BatchList::Capacity::indices, es::skeletal::BatchList::Capacity::slots, and es::skeletal::BatchList::Capacity::vertexFloats.

◆ end()

const MeshBatch * es::skeletal::BatchList::end ( ) const
inline

Definition at line 134 of file SkeletalModule.hpp.

◆ open()

MeshBatch & es::skeletal::BatchList::open ( std::uint32_t texture,
int blendMode,
bool premultipliedColor = false )
inline

Starts a batch in this state, in the next slot's storage. The reference is good until the next open, which may move every slot.

Definition at line 117 of file SkeletalModule.hpp.

References es::skeletal::MeshBatch::blendMode, es::skeletal::Buffer< T >::clear(), es::skeletal::MeshBatch::indices, es::skeletal::MeshBatch::premultipliedColor, es::skeletal::MeshBatch::texture, and es::skeletal::MeshBatch::vertices.

◆ operator[]()

const MeshBatch & es::skeletal::BatchList::operator[] ( std::size_t index) const
inline

Definition at line 132 of file SkeletalModule.hpp.

◆ reset()

void es::skeletal::BatchList::reset ( )
inline

Reopens the list for another extraction. A slot is emptied when it is opened, not here, so a slot past the new extent cannot be read as this extraction's either — nothing reaches one but open.

Definition at line 113 of file SkeletalModule.hpp.

◆ size()

std::size_t es::skeletal::BatchList::size ( ) const
inline

Definition at line 131 of file SkeletalModule.hpp.


The documentation for this class was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/bindings/modules/spine/SkeletalModule.hpp