Skip to main content

View

Struct View 

Source
pub struct View<D: Device> {
    pub graph_pass_name: String,
    pub pmfx_view_name: String,
    pub name_hash: PmfxHash,
    pub colour_hash: u32,
    pub pass: D::RenderPass,
    pub viewport: Viewport,
    pub scissor_rect: ScissorRect,
    pub blit_dimension: Vec2f,
    pub cmd_buf: D::CmdBuf,
    pub camera: String,
    pub view_pipeline: String,
    pub use_indices: Vec<ResourceUse>,
}
Expand description

Everything you need to render a world view; command buffers will be automatically reset and submitted for you.

Fields§

§graph_pass_name: String

Name of the graph view instance, this is the same as the key that is stored in the pmfx views map.

§pmfx_view_name: String

Name of the pmfx view, this is the source view (camera, render targets)

§name_hash: PmfxHash

Hash of the view name

§colour_hash: u32

Colour hash (for debug markers, derived from name)

§pass: D::RenderPass

A pre-built render pass: multiple colour targets and depth possible

§viewport: Viewport

Pre-calculated viewport based on the output dimensions of the render target adjusted for user data from .pmfx

§scissor_rect: ScissorRect

Pre-calculated viewport based on the output dimensions of the render target adjusted for user data from .pmfx

§blit_dimension: Vec2f

Dimension of a resource for use when blitting

§cmd_buf: D::CmdBuf

A command buffer ready to be used to buffer draw / render commands

§camera: String

Name of camera this view intends to be used with

§view_pipeline: String

This is the name of a single pipeline used for all draw calls in the view. supplied in data as pipelines: ["name"]

§use_indices: Vec<ResourceUse>

Auto Trait Implementations§

§

impl<D> Freeze for View<D>
where <D as Device>::RenderPass: Freeze, <D as Device>::CmdBuf: Freeze,

§

impl<D> RefUnwindSafe for View<D>

§

impl<D> Send for View<D>

§

impl<D> Sync for View<D>

§

impl<D> Unpin for View<D>
where <D as Device>::RenderPass: Unpin, <D as Device>::CmdBuf: Unpin,

§

impl<D> UnsafeUnpin for View<D>

§

impl<D> UnwindSafe for View<D>

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.