Trait euc::Pipeline [−][src]
Represents the high-level structure of a rendering pipeline.
Conventionally, uniform data is stores as state within the type itself.
This governs the following things:
- Vertex position and data calculation (computed by the vertex shader)
- Determining whether each polygon is ‘backfacing’, and optionally skipping it
- Rasterization (performed internally by
euc
) - Comparing the fragment depth against the depth buffer to determine whether it is occluded, and optionally skipping it
- Fragment output calculation (computed by the fragment shader)
In the future, euc
may extend its capabilities to include compute, geometry, and tesselation
shaders.
Associated Types
type Vertex
[src]
The type of the vertex shader input data.
This usually consists of the vertex’s position, normal, colour, texture coordinates, and other such per-vertex information. When vertex indexing is used, this tends to consist of the vertex index.
type VsOut: Clone + Interpolate
[src]
The type of the data that gets passed on from the vertex shader to the fragment shader.
This usually consists of the fragment’s normal, colour, texture coordinates and other such per-fragment information.
type Pixel: Clone
[src]
The type of emitted pixels.
This type is emitted by the fragment shader and usually corresponds to the colour of the pixel.
Required methods
fn vert(&self, vertex: &Self::Vertex) -> ([f32; 4], Self::VsOut)
[src]
The vertex shader
fn frag(&self, vs_out: &Self::VsOut) -> Self::Pixel
[src]
The fragment shader
Provided methods
fn get_depth_strategy(&self) -> DepthStrategy
[src]
A method used to determine what depth buffer strategy should be used when determining fragment occlusion.
This method will be called at minimum only once per draw call, but may be called an arbitrary number of times.
fn draw<R: Rasterizer, T: Target<Item = Self::Pixel>>(
&self,
vertices: &[Self::Vertex],
target: &mut T,
supplement: <R as Rasterizer>::Supplement
)
[src]
&self,
vertices: &[Self::Vertex],
target: &mut T,
supplement: <R as Rasterizer>::Supplement
)
Perform a draw call with the given uniform data, vertex array, output target and supplement type.
The supplement type is commonly used to represent additional surfaces required by the rasterizer, such as a depth buffer target.