render3d: recycle texture and buffer ids, free a released model whole, actor_release
A freed texture or buffer id goes on a spare list the next one takes; tex_note_size keeps sizes by id. model_release frees prims, meshes, material names, the skin and leaves gltf_cached. actor_release takes an actor off the stage and actor_new reuses its record (ECS's Things come and go all day). steady.ludic: an actor round at 0 bytes over 2000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
2fe4018d28
commit
9b482d609a
14 changed files with 208 additions and 39 deletions
|
|
@ -44,7 +44,6 @@ program Release {
|
|||
let diff = a.prims[0].diff
|
||||
ok = check("the plates share their textures", diff != 0 and b.prims[0].diff == diff and render3d_st.gltf_tex_n == 2) and ok
|
||||
model_release(render3d_st, a)
|
||||
ok = check("the first plate is emptied", len(a.prims) == 0) and ok
|
||||
ok = check("what the second still uses stays", tex_live(render3d_st, diff) and render3d_st.gltf_tex_n == 2) and ok
|
||||
model_release(render3d_st, b)
|
||||
ok = check("the last user frees the textures", not tex_live(render3d_st, diff) and render3d_st.gltf_tex_n == 0) and ok
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue