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
|
|
@ -13,6 +13,7 @@ export state Render3dState {
|
|||
ac_out_cut: AcProg = null
|
||||
ac_actors: []Actor = null
|
||||
ac_next_id: int = 0
|
||||
ac_spare: []Actor = null # released actors, taken again by actor_new (actor_release)
|
||||
ac_frame: int = 0
|
||||
ac_oq: []OutlineReq = null
|
||||
ac_oq_n: int = 0 # live entries; the array is kept and reused
|
||||
|
|
@ -211,6 +212,8 @@ export state Render3dState {
|
|||
gvk_lay_flat: []int = null # every layout known, end to end; gvk_lay_off / _len find each
|
||||
gvk_lay_off: []int = null
|
||||
gvk_lay_len: []int = null
|
||||
gvk_tex_spare: []int = null # ids of freed textures, handed out again by gvk_tex_new
|
||||
gvk_buf_spare: []int = null # the same for buffers (gvk_buf_delete)
|
||||
gvk_has_bc: bool = false # textureCompressionBC: .dds textures are uploaded compressed
|
||||
# R3D_VK_PROF: Vulkan objects made and destroyed, reported every 120 frames
|
||||
gvk_mk_img: int = 0
|
||||
|
|
@ -805,7 +808,6 @@ export state Render3dState {
|
|||
tex_depth: int = 0 # bits per sample (8 or 16)
|
||||
tex_file_len: int = 0
|
||||
tex_anisotropy: fixed = 16.0
|
||||
tex_size_ids: []int = new []int
|
||||
tex_size_ws: []int = new []int
|
||||
tex_size_hs: []int = new []int
|
||||
hdr_max_lum: float = 0.0 # float bits of the brightest texel (sun finding)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue