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

#include <SkeletalModule.hpp>

Public Member Functions

void clear ()
T * append (std::size_t count)
 Room for count more, to write through. The next append invalidates it.
std::size_t size () const
const T * data () const
const T & operator[] (std::size_t index) const
std::size_t capacity () const
 What it can take before it allocates again.

Detailed Description

template<class T>
class es::skeletal::Buffer< T >

Append-only storage that keeps what it allocated when it is emptied.

A vector would do this too, but only through push_back's per-element check or resize's zero-fill of bytes about to be overwritten — and a thousand skeletons write three thousand of these each, every frame.

Definition at line 53 of file SkeletalModule.hpp.

Member Function Documentation

◆ append()

template<class T>
T * es::skeletal::Buffer< T >::append ( std::size_t count)
inline

Room for count more, to write through. The next append invalidates it.

Definition at line 58 of file SkeletalModule.hpp.

Referenced by es::skeletal::BatchCollector::emit().

◆ capacity()

template<class T>
std::size_t es::skeletal::Buffer< T >::capacity ( ) const
inline

What it can take before it allocates again.

Definition at line 70 of file SkeletalModule.hpp.

◆ clear()

template<class T>
void es::skeletal::Buffer< T >::clear ( )
inline

Definition at line 55 of file SkeletalModule.hpp.

Referenced by es::skeletal::BatchList::open().

◆ data()

template<class T>
const T * es::skeletal::Buffer< T >::data ( ) const
inline

Definition at line 66 of file SkeletalModule.hpp.

Referenced by db_getMeshBatchData(), and spine_getMeshBatchData().

◆ operator[]()

template<class T>
const T & es::skeletal::Buffer< T >::operator[] ( std::size_t index) const
inline

Definition at line 67 of file SkeletalModule.hpp.

◆ size()

template<class T>
std::size_t es::skeletal::Buffer< T >::size ( ) const
inline

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