Trait luminance::tessellation::HasTessellation [] [src]

pub trait HasTessellation {
    type Tessellation;
    fn new<T>(mode: Mode,
          vertices: &[T],
          indices: Option<&[u32]>)
          -> Self::Tessellation where T: Vertex; fn destroy(tessellation: &mut Self::Tessellation); fn attributeless(mode: Mode, vert_nb: usize) -> Self::Tessellation; }

Trait to implement to provide tessellation features.

Associated Types

A type representing tessellation on GPU.

Required Methods

Create a Tessellation from its vertices and a Mode.

If indices == None, the vertices represent an array of vertices that are connected to each others in the order they appear. If you want to connect them in another way, you can index them with Some(indices).

Destroy a Tessellation.

Create a Tessellation that will procedurally generate its vertices (i.e. attribute-less).

You just have to give the Mode to use and the number of vertices the Tessellation must have. You’ll be handed back a Tessellation object that doesn’t actually hold anything. You will have to generate the vertices on the fly in your shaders.

Implementors