render3d: scratch the frame uses is made with the state, not on first use
Render3dState's cam_planes, gpu_u_tmp, q_scratch, ov_nine_buf, the caster test's four points, ter_bw, ter_scr and water_saved default to their buffers (as ludic.anim's clip state does), so the lazy starts in cam_planes_update, gpu_tmp, terrain_height_smooth, ter_scratch, the water pass and gvk_startup_state go. q_euler makes its views of q_scratch once (guarded on the view now). Compiled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
cd71da9330
commit
deb7c0d0c0
7 changed files with 13 additions and 22 deletions
|
|
@ -170,7 +170,7 @@ function gpu_present(render3d_st: mut Render3dState) -> void { gvk_present(rende
|
|||
# the frame as it will be presented, to a binary PPM with the top row first; before gpu_present
|
||||
function gpu_screenshot(render3d_st: mut Render3dState, path: string) -> bool { return gvk_screenshot(render3d_st, path) }
|
||||
|
||||
function gpu_tmp(render3d_st: mut Render3dState) -> words { if render3d_st.gpu_u_tmp == null { render3d_st.gpu_u_tmp = words(4) }; return render3d_st.gpu_u_tmp }
|
||||
function gpu_tmp(render3d_st: mut Render3dState) -> words { return render3d_st.gpu_u_tmp }
|
||||
# float bits (IEEE singles in an int), like every other number in the renderer
|
||||
function u_f(render3d_st: mut Render3dState, loc: int, v: float) -> void { let t = gpu_tmp(render3d_st); t[0] = float_bits(v); gvk_u_set(render3d_st, loc, data_of(t), 4, 1) }
|
||||
function u_f2(render3d_st: mut Render3dState, loc: int, x: float, y: float) -> void { let t = gpu_tmp(render3d_st); t[0] = float_bits(x); t[1] = float_bits(y); gvk_u_set(render3d_st, loc, data_of(t), 8, 1) }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue