Struct Display

Source
pub struct Display<PhysicalDevice: PhysicalDevice>(pub VkDisplayKHR, pub PhysicalDevice);
Available on crate feature VK_KHR_display only.

Tuple Fields§

§0: VkDisplayKHR§1: PhysicalDevice

Implementations§

Source§

impl<PhysicalDevice: PhysicalDevice> Display<PhysicalDevice>

Source

pub fn mode_property_count(&self) -> Result<u32>

Available on crate feature Implements only.

Query a count of the set of mode properties supported by the display

§Failures

On failure, this command returns

Source

pub fn mode_properties(&self, sink: &mut [DisplayModeProperties]) -> Result<u32>

Available on crate feature Implements only.

Query the set of mode properties supported by the display

§Failures

On failure, this command returns

Source

pub fn mode_properties_alloc(&self) -> Result<Vec<DisplayModeProperties>>

Available on crate features Implements and alloc only.

Query the set of mode properties supported by the display.

§Failures

On failure, this command returns

Source

pub fn release(&self)
where PhysicalDevice::ConcreteInstance: InstanceExtensions,

Available on crate features Implements and VK_EXT_direct_mode_display only.

Release access to an acquired VkDisplayKHR

Source

pub fn acquire_xlib_display(&self, dpy: *mut Display) -> Result<()>
where PhysicalDevice::ConcreteInstance: InstanceExtensions,

Available on crate features Implements and VK_EXT_acquire_xlib_display only.

Acquire access to a VkDisplayKHR using Xlib

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_INITIALIZATION_FAILED
Source

pub unsafe fn create_display_mode_raw( &self, info: &VkDisplayModeCreateInfoKHR, allocation_callbacks: Option<&VkAllocationCallbacks>, ) -> Result<VkDisplayModeKHR>

Available on crate feature Implements only.

Create a display mode

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY
§Safety

no guarantee will be provided (simply calls under api)

Source

pub fn create_display_mode( &self, params: VkDisplayModeParametersKHR, ) -> Result<DisplayMode>

Available on crate feature Implements only.

Create a display mode

§Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY

Trait Implementations§

Source§

impl<PhysicalDevice: PhysicalDevice> VkHandle for Display<PhysicalDevice>

Source§

type Handle = VkDisplayKHR

Source§

fn native_ptr(&self) -> Self::Handle

Retrieve an underlying handle
Source§

fn as_transparent_ref(&self) -> VkHandleRef<'_, Self::Handle>

Source§

impl<PhysicalDevice: PhysicalDevice> VkHandleMut for Display<PhysicalDevice>

Source§

fn native_ptr_mut(&mut self) -> Self::Handle

Retrieve an underlying mutable handle
Source§

fn as_transparent_ref_mut(&mut self) -> VkHandleRefMut<'_, Self::Handle>

Source§

impl<PhysicalDevice: PhysicalDevice> VkObject for Display<PhysicalDevice>

Source§

const TYPE: VkObjectType = 1_000_002_000i32

Auto Trait Implementations§

§

impl<PhysicalDevice> Freeze for Display<PhysicalDevice>
where PhysicalDevice: Freeze,

§

impl<PhysicalDevice> RefUnwindSafe for Display<PhysicalDevice>
where PhysicalDevice: RefUnwindSafe,

§

impl<PhysicalDevice> !Send for Display<PhysicalDevice>

§

impl<PhysicalDevice> !Sync for Display<PhysicalDevice>

§

impl<PhysicalDevice> Unpin for Display<PhysicalDevice>
where PhysicalDevice: Unpin,

§

impl<PhysicalDevice> UnwindSafe for Display<PhysicalDevice>
where PhysicalDevice: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> VkHandleExt for T
where T: VkHandle,

Source§

fn eq_handle(&self, other: &Self) -> bool
where Self::Handle: VkRawHandle,

Checks the equality between vulkan objects by their handle value.