MCPcopy Create free account
hub / github.com/AryanpurTech/BlueEngine / resize

Method resize

crates/blue_engine_core/src/render.rs:212–225  ·  view source on GitHub ↗
(&mut self, new_size: WindowSize)

Source from the content-addressed store, hash-verified

210 /// Resize the window.
211 #[cfg(all(not(feature = "headless"), feature = "window"))]
212 pub(crate) fn resize(&mut self, new_size: WindowSize) {
213 // check if new_size is non-zero
214 if new_size.0 != 0 && new_size.1 != 0 {
215 self.size = new_size;
216 self.config.width = new_size.0;
217 self.config.height = new_size.1;
218 #[cfg(not(target_os = "android"))]
219 if let Some(surface) = self.surface.as_ref() {
220 surface.configure(&self.device, &self.config);
221 self.depth_buffer =
222 Self::build_depth_buffer("Depth Buffer", &self.device, &self.config);
223 }
224 }
225 }
226
227 /// Render the scene. Returns the command encoder, the texture view, and the surface texture.
228 pub(crate) fn pre_render(

Callers 2

animateMethod · 0.45
window_eventMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected