[][src]Struct grr::GraphicsPipelineDesc

pub struct GraphicsPipelineDesc<'a> {
    pub vertex_shader: &'a Shader,
    pub tessellation_control_shader: Option<&'a Shader>,
    pub tessellation_evaluation_shader: Option<&'a Shader>,
    pub geometry_shader: Option<&'a Shader>,
    pub fragment_shader: Option<&'a Shader>,
}

Graphics Pipeline Descriptor.

Overview

The graphics pipeline is invoked by executing a draw command. The pipeline consists of multiple stages, where some are fully programmable (Shader) and other fixed-function stages can be only configured.

Stages

We will go through the the different stages starting from top to bottom. At the highest abstraction level we split the graphics pipeline into three components (grr terminology):

  • Primitive Stage: Reading data from buffers and generates primitives.
  • Rasterizer: Transforms primitives into fragments.
  • Fragment Stage: Shades fragments and blends them into the framebuffer.

Fig. 1 shows a very simplistic view of a graphics pipeline consisting of a vertex (VS) and fragment (FS) shader. We will discuss the different stages in more detail later on. The Primitive Stage in this examples consists of the Input Assembler (IA) and the Vertex Shader (VS). The Rasterizer is shown as the fixed function RS stage. The fragment shader together with the framebuffer output (FB) build the Fragment Stage.

Fig.1 Basic Vertex-Fragment Shader Pipeline

In the following the different top-level stages will be split up and discussed in more detail

Primitive Stage

Rasterizer

Fragment Stage

Examples

Fields

vertex_shader: &'a Shadertessellation_control_shader: Option<&'a Shader>tessellation_evaluation_shader: Option<&'a Shader>geometry_shader: Option<&'a Shader>fragment_shader: Option<&'a Shader>

Auto Trait Implementations

impl<'a> Send for GraphicsPipelineDesc<'a>

impl<'a> Sync for GraphicsPipelineDesc<'a>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.