RendererCreateInfo

Struct RendererCreateInfo 

Source
pub struct RendererCreateInfo {
    pub queue_family: u32,
    pub queue: Queue,
    pub render_pass: RenderPass,
    pub subpass: u32,
    pub image_count: u32,
    pub msaa_samples: Option<SampleCountFlags>,
    pub pipeline_cache: PipelineCache,
    pub surface_color_fmt: SurfaceColorFormat,
    pub descriptor_pool_size: Option<u32>,
}

Fields§

§queue_family: u32

The queue family of the device from which RendererCreateInfo::queue was allocated from

§queue: Queue

A queue on the passed n device with GRAPHICS capabilities.

§render_pass: RenderPass

A render pass the created pipeline must be compatible with, only used upon initialisation

§subpass: u32

The subpass on the aforementioned RendererCreateInfo::render_pass

§image_count: u32

The number of frames in flight

§msaa_samples: Option<SampleCountFlags>

Mutli sampling configuration for texture sampling

§pipeline_cache: PipelineCache

An optional pipeline cache

§surface_color_fmt: SurfaceColorFormat

Whether the outputting surface is linear or srgb logarithmic, generally linear is desired and as such is the default

§descriptor_pool_size: Option<u32>

The size of the descriptor pool managed by this renderer. Must be greater than MIN_DESCRIPTOR_POOL_SIZE, any additional increment allows use of another custom texture. If you wanted to render 3 custom textures you would set this to MIN_DESCRIPTOR_POOL_SIZE + 3 and add your textures with Renderer::add_texture

Implementations§

Source§

impl RendererCreateInfo

Source

pub fn queue_family(self, queue_family: u32) -> Self

Source

pub fn queue(self, queue: Queue) -> Self

Source

pub fn render_pass(self, render_pass: RenderPass) -> Self

Source

pub fn subpass(self, subpass: u32) -> Self

Source

pub fn image_count(self, image_count: u32) -> Self

Source

pub fn msaa_samples(self, msaa_samples: Option<SampleCountFlags>) -> Self

Source

pub fn pipeline_cache(self, pipeline_cache: PipelineCache) -> Self

Source

pub fn surface_color_fmt(self, surface_color_fmt: SurfaceColorFormat) -> Self

Source

pub fn descriptor_pool_size(self, descriptor_pool_size: Option<u32>) -> Self

Trait Implementations§

Source§

impl Clone for RendererCreateInfo

Source§

fn clone(&self) -> RendererCreateInfo

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RendererCreateInfo

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RendererCreateInfo

Source§

fn default() -> RendererCreateInfo

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

impl Ord for RendererCreateInfo

Source§

fn cmp(&self, other: &RendererCreateInfo) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for RendererCreateInfo

Source§

fn eq(&self, other: &RendererCreateInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for RendererCreateInfo

Source§

fn partial_cmp(&self, other: &RendererCreateInfo) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for RendererCreateInfo

Source§

impl Eq for RendererCreateInfo

Source§

impl StructuralPartialEq for RendererCreateInfo

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.