Struct SamplerCreateInfo

Source
#[repr(C)]
pub struct SamplerCreateInfo<'a> {
Show 16 fields pub flags: SamplerCreateFlags, pub mag_filter: Filter, pub min_filter: Filter, pub mipmap_mode: SamplerMipmapMode, pub address_mode_u: SamplerAddressMode, pub address_mode_v: SamplerAddressMode, pub address_mode_w: SamplerAddressMode, pub mip_lod_bias: f32, pub anisotropy_enable: Bool32, pub max_anisotropy: f32, pub compare_enable: Bool32, pub compare_op: CompareOp, pub min_lod: f32, pub max_lod: f32, pub border_color: BorderColor, pub unnormalized_coordinates: Bool32, /* private fields */
}
Expand description

Fields§

§flags: SamplerCreateFlags§mag_filter: Filter§min_filter: Filter§mipmap_mode: SamplerMipmapMode§address_mode_u: SamplerAddressMode§address_mode_v: SamplerAddressMode§address_mode_w: SamplerAddressMode§mip_lod_bias: f32§anisotropy_enable: Bool32§max_anisotropy: f32§compare_enable: Bool32§compare_op: CompareOp§min_lod: f32§max_lod: f32§border_color: BorderColor§unnormalized_coordinates: Bool32

Implementations§

Source§

impl<'a> SamplerCreateInfo<'a>

Source

pub fn flags(self, value: SamplerCreateFlags) -> Self

Source

pub fn mag_filter(self, value: Filter) -> Self

Source

pub fn min_filter(self, value: Filter) -> Self

Source

pub fn mipmap_mode(self, value: SamplerMipmapMode) -> Self

Source

pub fn address_mode_u(self, value: SamplerAddressMode) -> Self

Source

pub fn address_mode_v(self, value: SamplerAddressMode) -> Self

Source

pub fn address_mode_w(self, value: SamplerAddressMode) -> Self

Source

pub fn mip_lod_bias(self, value: f32) -> Self

Source

pub fn anisotropy_enable(self, value: impl Into<Bool32>) -> Self

Source

pub fn max_anisotropy(self, value: f32) -> Self

Source

pub fn compare_enable(self, value: impl Into<Bool32>) -> Self

Source

pub fn compare_op(self, value: CompareOp) -> Self

Source

pub fn min_lod(self, value: f32) -> Self

Source

pub fn max_lod(self, value: f32) -> Self

Source

pub fn border_color(self, value: BorderColor) -> Self

Source

pub fn unnormalized_coordinates(self, value: impl Into<Bool32>) -> Self

Source

pub fn push_next<T: ExtendingStructure<Self>>(self, ext: &'a mut T) -> Self

Trait Implementations§

Source§

impl<'a> Default for SamplerCreateInfo<'a>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'a> ExtendableStructure for SamplerCreateInfo<'a>

Source§

const STRUCTURE_TYPE: StructureType = StructureType::SamplerCreateInfo

Source§

unsafe fn retrieve_next(&self) -> &Cell<*const Header>

Source§

unsafe fn push_next_unchecked<T: ExtendableStructure>(&self, ext: &T)

Assuming the current structure chain is the following: Self -> Ext1 -> Ext2 -> Ext3 calling this function with Ext4 will result in: Self -> Ext4 -> Ext1 -> Ext2 -> Ext3 This function will never cause cycles in the structure chain This function is unsafe because it discards the lifetime (ExtendableStructure does not have a lifetime parameter) Also it does not check that T is a valid extension to be added to Self and only requires references (and not mutable references)
Source§

fn new_uninit() -> MaybeUninit<Self>

Return a unitialized structure except the structure type being correctly set and the p_next pointer being set to null
Source§

impl<'a> ExtendableStructureBase for SamplerCreateInfo<'a>

Source§

impl<'a, 'b> ExtendingStructure<SamplerCreateInfo<'b>> for OpaqueCaptureDescriptorDataCreateInfoEXT<'a>

Source§

impl<'a, 'b> ExtendingStructure<SamplerCreateInfo<'b>> for SamplerBlockMatchWindowCreateInfoQCOM<'a>

Source§

impl<'a, 'b> ExtendingStructure<SamplerCreateInfo<'b>> for SamplerBorderColorComponentMappingCreateInfoEXT<'a>

Source§

impl<'a, 'b> ExtendingStructure<SamplerCreateInfo<'b>> for SamplerCubicWeightsCreateInfoQCOM<'a>

Source§

impl<'a, 'b> ExtendingStructure<SamplerCreateInfo<'b>> for SamplerCustomBorderColorCreateInfoEXT<'a>

Source§

impl<'a, 'b> ExtendingStructure<SamplerCreateInfo<'b>> for SamplerReductionModeCreateInfo<'a>

Source§

impl<'a, 'b> ExtendingStructure<SamplerCreateInfo<'b>> for SamplerYcbcrConversionInfo<'a>

Source§

impl<'a> Send for SamplerCreateInfo<'a>

Source§

impl<'a> Sync for SamplerCreateInfo<'a>

Auto Trait Implementations§

§

impl<'a> !Freeze for SamplerCreateInfo<'a>

§

impl<'a> !RefUnwindSafe for SamplerCreateInfo<'a>

§

impl<'a> Unpin for SamplerCreateInfo<'a>

§

impl<'a> !UnwindSafe for SamplerCreateInfo<'a>

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<H> StructureChainOut<H> for H

Source§

fn setup_uninit(chain: &mut MaybeUninit<H>)

Setup an uninitialized structure chain After this call, for the structure chain to be initialized, each structure field (with the exception of the structure type and the p_next pointer) must be initialized (usually by calling the appropriate vulkan command) The structure type and p_next pointer of each struct are set so that a vulkan commands sees a pointer to the head as a valid chain containing all structures Calling setup_uninit should be enough to then call a vulkan command filling this structure chain, moreover after the call to this vulkan command, the whole structure chain should be considered initialized
Source§

fn get_uninit_head_ptr(chain: *mut H) -> *mut H

Return a mutable pointer to the head structure, which can then be passed to vulkan commands
Source§

fn setup_cleanup(_: *mut H)

Function to call after a vulkan function initialized this structure to make sure there is no dangling pointer or anything which could cause undefined behavior
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> Alias<T> for T

Source§

impl<T> ExtendingStructure<T> for T