pub struct SwapchainCreateInfoKHR<'a> {Show 18 fields
pub s_type: StructureType,
pub p_next: *const c_void,
pub flags: SwapchainCreateFlagsKHR,
pub surface: SurfaceKHR,
pub min_image_count: u32,
pub image_format: Format,
pub image_color_space: ColorSpaceKHR,
pub image_extent: Extent2D,
pub image_array_layers: u32,
pub image_usage: ImageUsageFlags,
pub image_sharing_mode: SharingMode,
pub queue_family_index_count: u32,
pub p_queue_family_indices: *const u32,
pub pre_transform: SurfaceTransformFlagBitsKHR,
pub composite_alpha: CompositeAlphaFlagBitsKHR,
pub present_mode: PresentModeKHR,
pub clipped: Bool32,
pub old_swapchain: SwapchainKHR,
/* private fields */
}Expand description
Native structure VkSwapchainCreateInfoKHR.
Fields§
§s_type: StructureTypeNative field sType.
p_next: *const c_voidNative field pNext.
flags: SwapchainCreateFlagsKHRNative field flags.
surface: SurfaceKHRNative field surface.
min_image_count: u32Native field minImageCount.
image_format: FormatNative field imageFormat.
image_color_space: ColorSpaceKHRNative field imageColorSpace.
image_extent: Extent2DNative field imageExtent.
image_array_layers: u32Native field imageArrayLayers.
image_usage: ImageUsageFlagsNative field imageUsage.
image_sharing_mode: SharingModeNative field imageSharingMode.
queue_family_index_count: u32Native field queueFamilyIndexCount.
p_queue_family_indices: *const u32Native field pQueueFamilyIndices.
pre_transform: SurfaceTransformFlagBitsKHRNative field preTransform.
composite_alpha: CompositeAlphaFlagBitsKHRNative field compositeAlpha.
present_mode: PresentModeKHRNative field presentMode.
clipped: Bool32Native field clipped.
old_swapchain: SwapchainKHRNative field oldSwapchain.
Implementations§
Source§impl<'a> SwapchainCreateInfoKHR<'a>
impl<'a> SwapchainCreateInfoKHR<'a>
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct the record with its canonical sType tag and default native state.
Sourcepub fn set_flags(self, value: SwapchainCreateFlagsKHR) -> Self
pub fn set_flags(self, value: SwapchainCreateFlagsKHR) -> Self
Set native field flags without native effects.
Sourcepub fn set_surface(self, value: SurfaceKHR) -> Self
pub fn set_surface(self, value: SurfaceKHR) -> Self
Set native field surface without native effects.
Sourcepub fn set_min_image_count(self, value: u32) -> Self
pub fn set_min_image_count(self, value: u32) -> Self
Set native field minImageCount without native effects.
Sourcepub fn set_image_format(self, value: Format) -> Self
pub fn set_image_format(self, value: Format) -> Self
Set native field imageFormat without native effects.
Sourcepub fn set_image_color_space(self, value: ColorSpaceKHR) -> Self
pub fn set_image_color_space(self, value: ColorSpaceKHR) -> Self
Set native field imageColorSpace without native effects.
Sourcepub fn set_image_extent(self, value: Extent2D) -> Self
pub fn set_image_extent(self, value: Extent2D) -> Self
Set native field imageExtent without native effects.
Sourcepub fn set_image_array_layers(self, value: u32) -> Self
pub fn set_image_array_layers(self, value: u32) -> Self
Set native field imageArrayLayers without native effects.
Sourcepub fn set_image_usage(self, value: ImageUsageFlags) -> Self
pub fn set_image_usage(self, value: ImageUsageFlags) -> Self
Set native field imageUsage without native effects.
Sourcepub fn set_image_sharing_mode(self, value: SharingMode) -> Self
pub fn set_image_sharing_mode(self, value: SharingMode) -> Self
Set native field imageSharingMode without native effects.
Sourcepub fn set_queue_family_index_count(self, value: u32) -> Self
pub fn set_queue_family_index_count(self, value: u32) -> Self
Set native count queueFamilyIndexCount directly without checking associated pointer extents.
Use the borrowed array helpers to derive matching storage and counts together.
Direct count edits support null-query/dynamic-state paths and remain a
native-call validity obligation, including after earlier borrowed setters.
Sourcepub fn set_queue_family_indices(
self,
value: &'a [u32],
) -> Result<Self, ConstructionError>
pub fn set_queue_family_indices( self, value: &'a [u32], ) -> Result<Self, ConstructionError>
Borrow pQueueFamilyIndices and set checked native count queueFamilyIndexCount.
The borrow covers this storage only; nested raw pointers, format, alignment
and asynchronous retention remain native-call obligations.
Output storage must be initialized; returned sizes do not enlarge its capacity.
§Errors
Returns a construction error if the length exceeds the native count width.
Sourcepub fn set_pre_transform(self, value: SurfaceTransformFlagBitsKHR) -> Self
pub fn set_pre_transform(self, value: SurfaceTransformFlagBitsKHR) -> Self
Set native field preTransform without native effects.
Sourcepub fn set_composite_alpha(self, value: CompositeAlphaFlagBitsKHR) -> Self
pub fn set_composite_alpha(self, value: CompositeAlphaFlagBitsKHR) -> Self
Set native field compositeAlpha without native effects.
Sourcepub fn set_present_mode(self, value: PresentModeKHR) -> Self
pub fn set_present_mode(self, value: PresentModeKHR) -> Self
Set native field presentMode without native effects.
Sourcepub fn set_clipped(self, value: Bool32) -> Self
pub fn set_clipped(self, value: Bool32) -> Self
Set native field clipped without native effects.
Sourcepub fn set_old_swapchain(self, value: SwapchainKHR) -> Self
pub fn set_old_swapchain(self, value: SwapchainKHR) -> Self
Set native field oldSwapchain without native effects.
Sourcepub fn push_next<T: Extends<Self>>(
self,
next: &'a mut T,
) -> Result<Self, ConstructionError>
pub fn push_next<T: Extends<Self>>( self, next: &'a mut T, ) -> Result<Self, ConstructionError>
Prepend one registry-compatible node, retaining its exclusive borrow.
The node must have a null p_next and both headers must have canonical tags.
Existing links are never traversed and remain written after the borrow ends.
Type compatibility does not establish enabled extensions or Vulkan valid usage.
§Errors
Returns a construction error for a changed structure tag or already-linked node.
Trait Implementations§
Source§impl<'a> Default for SwapchainCreateInfoKHR<'a>
impl<'a> Default for SwapchainCreateInfoKHR<'a>
impl<'a, 'root> Extends<SwapchainCreateInfoKHR<'root>> for ImageUsageFlags2CreateInfoKHR<'a>
impl<'a, 'root> Extends<SwapchainCreateInfoKHR<'root>> for SwapchainCounterCreateInfoEXT<'a>
impl<'a, 'root> Extends<SwapchainCreateInfoKHR<'root>> for DeviceGroupSwapchainCreateInfoKHR<'a>
impl<'a, 'root> Extends<SwapchainCreateInfoKHR<'root>> for SwapchainDisplayNativeHdrCreateInfoAMD<'a>
impl<'a, 'root> Extends<SwapchainCreateInfoKHR<'root>> for ImageFormatListCreateInfo<'a>
impl<'a, 'root> Extends<SwapchainCreateInfoKHR<'root>> for SurfaceFullScreenExclusiveInfoEXT<'a>
platform-win32 only.impl<'a, 'root> Extends<SwapchainCreateInfoKHR<'root>> for SurfaceFullScreenExclusiveWin32InfoEXT<'a>
platform-win32 only.