26#include <unordered_map>
83 bool hasWork()
const {
return scheduled_ > 0; }
100 u64 meshRevision = 0;
101 std::shared_ptr<const std::vector<u8>> source;
108 u32 poseCapacity = 0;
112 bool scheduled =
false;
113 std::vector<glm::mat4> pendingPose;
116 bool build(Entry& entry,
const Mesh& mesh);
117 void release(Entry& entry);
120 SkinCacheSettings settings_;
121 std::unordered_map<u32, Entry> entries_;
123 bool kernelFailed_ =
false;
Entity utilities for the ECS system.
Backend-agnostic graphics enumerations.
Math utilities and GLM configuration for ESEngine.
Core type definitions and utilities for ESEngine.
Abstract graphics device interface.
Buffers, the layout that describes them, and the bounds culling reads.
u32 drawsThisFrame() const
SkinCache & operator=(const SkinCache &)=delete
void setSettings(const SkinCacheSettings &settings)
u32 refusedThisFrame() const
SkinCache(const SkinCache &)=delete
bool wants(SkinCacheUsage usage) const
BufferHandle bufferFor(Entity entity) const
void beginFrame(u64 frame)
const SkinCacheSettings & settings() const
SkinCache(GfxDevice &device)
BufferHandle schedule(Entity entity, const Mesh &mesh, const glm::mat4 *pose, u32 joints)
Schedules entity's skin for this frame, posed by pose (one matrix a joint: joint world times inverse ...
u32 scheduledThisFrame() const
std::uint64_t u64
Unsigned 64-bit integer.
ComputeHandle
A compute program (GfxDevice::createCompute); only a device that supportsCompute() issues one.
std::uint32_t u32
Unsigned 32-bit integer.
std::uint8_t u8
Unsigned 8-bit integer.
SkinCacheUsage
A mesh's own word on the cache (MeshSkin::skinCache).
SkinCacheBehavior
Which skinned meshes go through the cache when their own MeshSkin says Auto.
float f32
32-bit floating point
Entity identifier with packed index + generation.
The project's skin cache settings.
SkinCacheBehavior behavior