pub struct Surface { /* private fields */ }
Expand description
Contains all information about a VkSurfaceKHR
Implementations§
Source§impl Surface
impl Surface
Sourcepub fn new<Window: WindowInterface>(
instance: &Instance,
settings: &AppSettings<'_, Window>,
) -> Result<Self>
pub fn new<Window: WindowInterface>( instance: &Instance, settings: &AppSettings<'_, Window>, ) -> Result<Self>
Create a new surface.
Sourcepub fn query_details(&mut self, physical_device: &PhysicalDevice) -> Result<()>
pub fn query_details(&mut self, physical_device: &PhysicalDevice) -> Result<()>
Query support for features, capabilities and formats for this surface. Because surface support varies per physical device, this function requires one to be selected.
Sourcepub unsafe fn handle(&self) -> SurfaceKHR
pub unsafe fn handle(&self) -> SurfaceKHR
Get unsafe access to the underlying VkSurfaceKHR
object.
§Safety
Any vulkan calls that mutate the surface may put the system in an undefined state.
Sourcepub fn capabilities(&self) -> &SurfaceCapabilitiesKHR
pub fn capabilities(&self) -> &SurfaceCapabilitiesKHR
Get the surface capabilities.
Sourcepub fn formats(&self) -> &[SurfaceFormatKHR]
pub fn formats(&self) -> &[SurfaceFormatKHR]
Get the available surface formats.
Sourcepub fn present_modes(&self) -> &[PresentModeKHR]
pub fn present_modes(&self) -> &[PresentModeKHR]
Get the available surface present modes.
Methods from Deref<Target = Surface>§
Sourcepub unsafe fn get_physical_device_surface_support(
&self,
physical_device: PhysicalDevice,
queue_family_index: u32,
surface: SurfaceKHR,
) -> Result<bool, Result>
pub unsafe fn get_physical_device_surface_support( &self, physical_device: PhysicalDevice, queue_family_index: u32, surface: SurfaceKHR, ) -> Result<bool, Result>
Sourcepub unsafe fn get_physical_device_surface_present_modes(
&self,
physical_device: PhysicalDevice,
surface: SurfaceKHR,
) -> Result<Vec<PresentModeKHR>, Result>
pub unsafe fn get_physical_device_surface_present_modes( &self, physical_device: PhysicalDevice, surface: SurfaceKHR, ) -> Result<Vec<PresentModeKHR>, Result>
Sourcepub unsafe fn get_physical_device_surface_capabilities(
&self,
physical_device: PhysicalDevice,
surface: SurfaceKHR,
) -> Result<SurfaceCapabilitiesKHR, Result>
pub unsafe fn get_physical_device_surface_capabilities( &self, physical_device: PhysicalDevice, surface: SurfaceKHR, ) -> Result<SurfaceCapabilitiesKHR, Result>
Sourcepub unsafe fn get_physical_device_surface_formats(
&self,
physical_device: PhysicalDevice,
surface: SurfaceKHR,
) -> Result<Vec<SurfaceFormatKHR>, Result>
pub unsafe fn get_physical_device_surface_formats( &self, physical_device: PhysicalDevice, surface: SurfaceKHR, ) -> Result<Vec<SurfaceFormatKHR>, Result>
Sourcepub unsafe fn destroy_surface(
&self,
surface: SurfaceKHR,
allocation_callbacks: Option<&AllocationCallbacks>,
)
pub unsafe fn destroy_surface( &self, surface: SurfaceKHR, allocation_callbacks: Option<&AllocationCallbacks>, )
pub fn fp(&self) -> &KhrSurfaceFn
pub fn instance(&self) -> Instance
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Surface
impl RefUnwindSafe for Surface
impl Send for Surface
impl Sync for Surface
impl Unpin for Surface
impl UnwindSafe for Surface
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more