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

Function bloom_resize

native/web/src/lib.rs:146–158  ·  view source on GitHub ↗
(physical_w: f64, physical_h: f64, logical_w: f64, logical_h: f64)

Source from the content-addressed store, hash-verified

144/// the renderer.
145#[wasm_bindgen]
146pub fn bloom_resize(physical_w: f64, physical_h: f64, logical_w: f64, logical_h: f64) {
147 let pw = (physical_w as u32).max(1);
148 let ph = (physical_h as u32).max(1);
149 let lw = (logical_w as u32).max(1);
150 let lh = (logical_h as u32).max(1);
151 unsafe {
152 if let Some(eng) = ENGINE.get_mut() {
153 if pw != eng.renderer.physical_width() || ph != eng.renderer.physical_height() {
154 eng.renderer.resize(pw, ph, lw, lh);
155 }
156 }
157 }
158}
159
160#[wasm_bindgen]
161pub fn bloom_window_should_close() -> f64 {

Callers

nothing calls this directly

Calls 4

get_mutMethod · 0.80
physical_widthMethod · 0.80
physical_heightMethod · 0.80
resizeMethod · 0.45

Tested by

no test coverage detected