clear caches before updating component

This commit is contained in:
jacekpoz 2024-09-09 23:07:31 +02:00
parent 40c2329b3c
commit 7952918cdb
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -166,6 +166,8 @@ void component(PtkHandle c) {
PTK_LIST_ADD_ALL_P(uint32_t, g_indices, icache.data, icache.size);
} else {
PTK_LIST_SET(bool, m_update, c->id, false);
PTK_LIST_CLEAR(m_vertices_cache.data[c->id]);
PTK_LIST_CLEAR(m_indices_cache.data[c->id]);
switch (c->type) {
case PTK_COMPONENT_TYPE_TRIANGLE: {