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: StringName of the graph view instance, this is the same as the key that is stored in the pmfx views map.
pmfx_view_name: StringName of the pmfx view, this is the source view (camera, render targets)
name_hash: PmfxHashHash of the view name
colour_hash: u32Colour hash (for debug markers, derived from name)
pass: D::RenderPassA pre-built render pass: multiple colour targets and depth possible
viewport: ViewportPre-calculated viewport based on the output dimensions of the render target adjusted for user data from .pmfx
scissor_rect: ScissorRectPre-calculated viewport based on the output dimensions of the render target adjusted for user data from .pmfx
blit_dimension: Vec2fDimension of a resource for use when blitting
cmd_buf: D::CmdBufA command buffer ready to be used to buffer draw / render commands
camera: StringName of camera this view intends to be used with
view_pipeline: StringThis 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>