|
Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
|
What readying a set of renderables' programs found. Counts, not JSON: this crosses no boundary and pays for no encoding. More...
#include <RenderTypePlugin.hpp>
Public Member Functions | |
| bool | addKey (u32 variant) |
| Whether this key is already in the set; adds it if not. | |
| void | addMaterialKey (u64 key) |
| u64 | requirementDigest () const |
| A stable name for the SET of program requirements described here. | |
| RenderPrewarmResult & | operator+= (const RenderPrewarmResult &other) |
Static Public Member Functions | |
| static u64 | materialKey (u32 materialId, bool normals, bool skinned, bool envMapped, bool lightmapped, bool tangents=false) |
| What a material program is asked for, as one comparable value. | |
Public Attributes | |
| u32 | asks = 0 |
| u32 | compiles = 0 |
| u32 | uniqueKeys = 0 |
| u32 | materialAsks = 0 |
| u32 | materialCompiles = 0 |
| std::array< u64, MESH_VARIANTS/64 > | keys {} |
| std::vector< u64 > | materialKeys |
What readying a set of renderables' programs found. Counts, not JSON: this crosses no boundary and pays for no encoding.
Definition at line 207 of file RenderTypePlugin.hpp.
|
inline |
Whether this key is already in the set; adds it if not.
Definition at line 219 of file RenderTypePlugin.hpp.
References keys.
Referenced by esengine::MeshPlugin::prewarmFacts().
|
inline |
Definition at line 238 of file RenderTypePlugin.hpp.
References materialKeys.
Referenced by operator+=(), and esengine::MeshPlugin::prewarmFacts().
|
inlinestatic |
What a material program is asked for, as one comparable value.
Definition at line 232 of file RenderTypePlugin.hpp.
Referenced by esengine::MeshPlugin::prewarmFacts().
|
inline |
Definition at line 262 of file RenderTypePlugin.hpp.
References addMaterialKey(), asks, compiles, keys, materialAsks, materialCompiles, materialKeys, and uniqueKeys.
|
inline |
A stable name for the SET of program requirements described here.
Order-independent and duplicate-insensitive, because the question is which programs are needed and not how often each was asked for. Two derivations of the same content therefore agree, and a requirement arriving or leaving is what changes the answer.
Definition at line 252 of file RenderTypePlugin.hpp.
References esengine::hash::fnv1aBytes(), keys, esengine::hash::kFnv64Offset, and materialKeys.
Referenced by esengine::engine_prepareMeshPrograms().
| u32 esengine::RenderPrewarmResult::asks = 0 |
Definition at line 208 of file RenderTypePlugin.hpp.
Referenced by esengine::engine_prepareMeshPrograms(), operator+=(), and esengine::MeshPlugin::prewarmFacts().
| u32 esengine::RenderPrewarmResult::compiles = 0 |
Definition at line 209 of file RenderTypePlugin.hpp.
Referenced by esengine::engine_prepareMeshPrograms(), operator+=(), and esengine::MeshPlugin::prewarmFacts().
| std::array<u64, MESH_VARIANTS / 64> esengine::RenderPrewarmResult::keys {} |
Which keys, not how many: an equality claim needs the set. One bit per MESH_VARIANTS, so it is two words rather than one.
Definition at line 216 of file RenderTypePlugin.hpp.
Referenced by addKey(), operator+=(), and requirementDigest().
| u32 esengine::RenderPrewarmResult::materialAsks = 0 |
Definition at line 212 of file RenderTypePlugin.hpp.
Referenced by esengine::engine_prepareMeshPrograms(), operator+=(), and esengine::MeshPlugin::prewarmFacts().
| u32 esengine::RenderPrewarmResult::materialCompiles = 0 |
Definition at line 213 of file RenderTypePlugin.hpp.
Referenced by esengine::engine_prepareMeshPrograms(), operator+=(), and esengine::MeshPlugin::prewarmFacts().
| std::vector<u64> esengine::RenderPrewarmResult::materialKeys |
The material programs the content needs, by identity rather than count. A material world whose shading changed must not digest the same as the one before it, and materialAsks alone cannot say that.
Definition at line 229 of file RenderTypePlugin.hpp.
Referenced by addMaterialKey(), operator+=(), and requirementDigest().
| u32 esengine::RenderPrewarmResult::uniqueKeys = 0 |
Distinct variant keys the content needed — the dimension of the answer.
Definition at line 211 of file RenderTypePlugin.hpp.
Referenced by operator+=(), and esengine::MeshPlugin::prewarmFacts().