r3d/runtime: allocs, keeps and births at 0 on this side
render3d: shadow_fit, water_reflection_pass, layer_partition_lods and the GPU cull's scratch are made with the state; v3_dist is scalar; the pushes into lists sized at start-up, the caps probe, the table growth, the loads and the constructors declared with their bounds (one statement a line); the renderer's name made once with the device; the two error messages given back; the dead lupine models removed. runtime: a component's text is held interned in its value cell (one copy per distinct text), so the getter's own text goes with its frame instead of being kept by ludic.ui's model - 80 of the 83 keeps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5be2422c84
commit
f993c4a36a
18 changed files with 105 additions and 177 deletions
|
|
@ -36,6 +36,7 @@ function r3d_set_anisotropy(render3d_st: mut Render3dState, level: int) -> void
|
|||
if keep > 0 { gpu_tex_bind(render3d_st, GPU_TEX2D, keep) }
|
||||
}
|
||||
|
||||
@alloc_ok("a load: a file read whole, kept or freed by its caller")
|
||||
function r3d_read_file(render3d_st: mut Render3dState, path: pointer) -> pointer {
|
||||
let f = file_open(path, "rb")
|
||||
if f == null { return null }
|
||||
|
|
@ -483,6 +484,7 @@ function tex_dump(render3d_st: mut Render3dState, tex: int, w: int, h: int, path
|
|||
|
||||
# A binary PPM (P6, what Gl.screenshot writes) as an RGB8 texture, box-filtered down by
|
||||
# `shrink` (a photo thumbnail); 0 when the file is missing.
|
||||
@alloc_ok("a load: an image read from disk")
|
||||
function tex_load_ppm(render3d_st: mut Render3dState, path: pointer, shrink: int) -> int {
|
||||
let d = r3d_read_file(render3d_st, path)
|
||||
if d == null { return 0 }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue