[−][src]Enum glium::index::PrimitiveType
List of available primitives.
See this page for a visual representation of each primitive type.
Variants
Each vertex is an individual point.
Vertices are grouped by chunks of two vertices. Each chunk represents a line.
Vertices are grouped by chunks of four vertices. The second and third vertices of each chunk represents the line.
Adjacency information doesn't do anything per-se, but is passed to the geometry shader if there is any. The first vertex represents the vertex adjacent to the second vertex. The fourth vertex represents the vertex adjacent to the third vertex.
Each vertex (except the last one) forms a line with the next vertex.
For example vertices 0 and 1 form a line, vertices 1 and 2 form a line, vertices 2 and 3 form a line, etc.
Similar to LineStrip
, but with an additional vertex at the beginning and at the end
that represent the vertices adjacent to the first and last ones.
Adjacency information doesn't do anything per-se, but is passed to the geometry shader if there is any.
Each vertex forms a line with the next vertex. The last vertex form a line with the first one.
Vertices are grouped by chunks of three vertices. Each chunk represents a triangle.
The order of the vertices is important, as it determines whether the triangle will be
clockwise or counter-clockwise. See BackfaceCulling
for more infos.
Vertices are grouped by chunks of six vertices. The first, third and fifth vertices represent a triangle.
The order of the vertices is important, as it determines whether the triangle will be
clockwise or counter-clockwise. See BackfaceCulling
for more infos.
Adjacency information doesn't do anything per-se, but is passed to the geometry shader if there is any. The second vertex represents the vertex adjacent to the first and third vertices. The fourth vertex represents the vertex adjacent to the third and fifth vertices. The sixth vertex represents the vertex adjacent to the first and fifth vertices.
Each vertex (except the first one and the last one) forms a triangle with the previous and the next vertices.
For example vertices 0, 1, 2
form a triangle, 1, 2, 3
form a triangle, 2, 3, 4
form a
triangle, 3, 4, 5
form a triangle, etc.
Each uneven triangle is reversed so that all triangles are facing the same direction.
Each even vertex forms a triangle with vertices n+2
and n+4
.
Each uneven vertex is adjacent to the previous and next ones. Adjacency information doesn't do anything per-se, but is passed to the geometry shader if there is any.
Starting at the second vertex, each vertex forms a triangle with the next and the first vertices.
For example vertices 0, 1, 2
form a triangle, 0, 2, 3
form a triangle, 0, 3, 4
form a
triangle, 0, 4, 5
form a triangle, etc.
Vertices are grouped by chunks of vertices_per_patch
vertices.
This primitives type can only be used in conjunction with a tessellation shader. The tessellation shader will indicate how each patch will be divided into lines or triangles.
Fields of Patches
vertices_per_patch: u16
Number of vertices per patch.
Implementations
impl PrimitiveType
[src]
pub fn is_supported<C: ?Sized>(&self, caps: &C) -> bool where
C: CapabilitiesSource,
[src]
C: CapabilitiesSource,
Returns true if the backend supports this type of primitives.
Trait Implementations
impl Clone for PrimitiveType
[src]
fn clone(&self) -> PrimitiveType
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PrimitiveType
[src]
impl Debug for PrimitiveType
[src]
impl Eq for PrimitiveType
[src]
impl PartialEq<PrimitiveType> for PrimitiveType
[src]
fn eq(&self, other: &PrimitiveType) -> bool
[src]
fn ne(&self, other: &PrimitiveType) -> bool
[src]
impl StructuralEq for PrimitiveType
[src]
impl StructuralPartialEq for PrimitiveType
[src]
Auto Trait Implementations
impl RefUnwindSafe for PrimitiveType
impl Send for PrimitiveType
impl Sync for PrimitiveType
impl Unpin for PrimitiveType
impl UnwindSafe for PrimitiveType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Content for T where
T: Copy,
[src]
T: Copy,
type Owned = T
A type that holds a sized version of the content.
fn read<F, E>(usize, F) -> Result<T, E> where
F: FnOnce(&mut T) -> Result<(), E>,
[src]
F: FnOnce(&mut T) -> Result<(), E>,
fn get_elements_size() -> usize
[src]
fn to_void_ptr(&Self) -> *const ()
[src]
fn ref_from_ptr(*mut (), usize) -> Option<*mut T>
[src]
fn is_size_suitable(usize) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,