MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / begin_frame

Method begin_frame

native/shared/src/renderer/transient.rs:142–150  ·  view source on GitHub ↗

Called once at the start of each frame. If the swapchain size changed, invalidates every slot whose size policy is swapchain-relative; fixed-size transients survive.

(&mut self, swap_w: u32, swap_h: u32)

Source from the content-addressed store, hash-verified

140 /// changed, invalidates every slot whose size policy is
141 /// swapchain-relative; fixed-size transients survive.
142 pub fn begin_frame(&mut self, swap_w: u32, swap_h: u32) {
143 if self.swap_size != (swap_w, swap_h) {
144 let prev = self.swap_size;
145 self.swap_size = (swap_w, swap_h);
146 if prev != (0, 0) {
147 self.invalidate_swapchain_relative();
148 }
149 }
150 }
151
152 /// Drop every slot whose size policy depends on the swapchain.
153 /// Called automatically on resize; callers can also trigger this

Calls 1