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
|
|
@ -58,8 +58,7 @@ function q_rotate(o: floats, q: floats, v: floats) -> void {
|
|||
}
|
||||
# pitch about X, yaw about Y, roll about Z, composed as yaw * pitch * roll
|
||||
function q_euler(render3d_st: mut Render3dState, o: floats, pitch: float, yaw: float, roll: float) -> void {
|
||||
if render3d_st.q_scratch == null {
|
||||
render3d_st.q_scratch = floats(16)
|
||||
if render3d_st.q_sy == null { # q_scratch is made with the state; its views once
|
||||
render3d_st.q_sy = view(render3d_st.q_scratch, 4, 4)
|
||||
render3d_st.q_sz = view(render3d_st.q_scratch, 8, 4)
|
||||
render3d_st.q_st = view(render3d_st.q_scratch, 12, 4)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue