code wiki / _hdl_build / nx_donor_native.nx

nx_donor_native.nx

buildroot/runtime/_hdl_build/nx_donor_native.nx

3240 B73 linesdepth 4pulls 9 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_donor_native.nx -- FIRST-BIT-NATIVE render of a DONOR asset (operator law: everything on nishi os/browser/lang until forced third-party) MOTION VISUAL for the benchmark pages: load our .glb with OUR loader, rasterize K turntable frames with OUR renderer, encode with OUR APNG writer. No host GL, no third-party code anywhere in the chain: model -> render -> encode is all nishi, and the output plays in any browser (APNG IS a PNG) including the Nishi browser's own decoders. Also writes frame 0 as the native STILL. Composes nx_gltf_load + nx_trimesh + nx_png + nx_apng_write. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_png.nx nx_trimesh.nx nx_gltf_load.nx nx_apng_write.nx nx_donor_native.nx

imports: nx_syscalls.nxnx_png.nxnx_trimesh.nxnx_gltf_load.nxnx_apng_write.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nt_w sys_write gltf_load sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close gll_ru32 gll_nth_num gll_slen gll_align4 tm_reset sys_mmap ↻ gll_f32i tm_vert gll_ru8 tm_vcol tm_tri tm_compute_normals tm_isqrt sys_exit nt_num sys_mmap ↻ sys_write ↻ tm_nv tm_nt sys_mmap ↻ apng_open sys_openat_wr ap_be32 pw_chunk pw_u32be sys_mmap ↻ sys_write ↻ sys_write ↻ pw_crc_block

structs

none

consts

12const NT_MAGIC_6283: i64 = 6283
13const NT_MAGIC_2600: i64 = 2600
16const NT_W: i64 = 240
17const NT_H: i64 = 368
18const NT_FRAMES: i64 = 20
19const NT_BG: i64 = 24 + 26*256 + 34*65536

functions

21func nt_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
22func nt_num(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
31func main() -> i64