MCPcopy Create free account
hub / github.com/Rust-GPU/rust-gpu / surface_resolution

Method surface_resolution

examples/runners/ash/src/main.rs:466–478  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

464 }
465
466 pub fn surface_resolution(&self) -> vk::Extent2D {
467 let surface_capabilities = self.surface_capabilities();
468 match surface_capabilities.current_extent.width {
469 std::u32::MAX => {
470 let window_inner = self.window.inner_size();
471 vk::Extent2D {
472 width: window_inner.width,
473 height: window_inner.height,
474 }
475 }
476 _ => surface_capabilities.current_extent,
477 }
478 }
479
480 pub fn surface_capabilities(&self) -> vk::SurfaceCapabilitiesKHR {
481 unsafe {

Callers 3

mainFunction · 0.80
create_swapchainMethod · 0.80
recreate_swapchainMethod · 0.80

Calls 1

surface_capabilitiesMethod · 0.80

Tested by

no test coverage detected