[−][src]Struct luminance::tess::Tess
GPU tessellation.
GPU tessellations gather several pieces of information:
- Vertices, which define points in space associated with vertex attributes, giving them meaningful data. Those data are then processed by a vertex shader to produce more interesting data down the graphics pipeline.
- Indices, which are used to change the order the vertices are fetched to form primitives (lines, triangles, etc.).
- Primitive mode, the way vertices should be linked together. See
Mode
for further details. - And other information used to determine how to render such tessellations.
A Tess
doesn’t directly state how to render an object, it just describes its topology and
inner construction (i.e. mesh).
Constructing a Tess
is not doable directly: you need to use a TessBuilder
first.
Methods
impl Tess
[src]
pub fn as_slice<V>(&mut self) -> Result<BufferSlice<V>, TessMapError> where
V: Vertex,
[src]
V: Vertex,
Obtain a slice over the vertex buffer.
This function fails if you try to obtain a buffer from an attriteless Tess
or
deinterleaved memory.
pub fn as_slice_mut<V>(&mut self) -> Result<BufferSliceMut<V>, TessMapError> where
V: Vertex,
[src]
V: Vertex,
Obtain a mutable slice over the vertex buffer.
This function fails if you try to obtain a buffer from an attriteless Tess
or
deinterleaved memory.
pub fn as_index_slice<I>(&mut self) -> Result<BufferSlice<I>, TessMapError> where
I: TessIndex,
[src]
I: TessIndex,
Obtain a slice over the index buffer.
This function fails if you try to obtain a buffer from an attriteless Tess
or if no
index buffer is available.
pub fn as_index_slice_mut<I>(
&mut self
) -> Result<BufferSliceMut<I>, TessMapError> where
I: TessIndex,
[src]
&mut self
) -> Result<BufferSliceMut<I>, TessMapError> where
I: TessIndex,
Obtain a mutable slice over the index buffer.
This function fails if you try to obtain a buffer from an attriteless Tess
or if no
index buffer is available.
pub fn as_inst_slice<V>(&mut self) -> Result<BufferSlice<V>, TessMapError> where
V: Vertex,
[src]
V: Vertex,
Obtain a slice over the instance buffer.
This function fails if you try to obtain a buffer from an attriteless Tess
or
deinterleaved memory.
pub fn as_inst_slice_mut<V>(
&mut self
) -> Result<BufferSliceMut<V>, TessMapError> where
V: Vertex,
[src]
&mut self
) -> Result<BufferSliceMut<V>, TessMapError> where
V: Vertex,
Obtain a mutable slice over the instance buffer.
This function fails if you try to obtain a buffer from an attriteless Tess
or
deinterleaved memory.
Trait Implementations
impl TessSliceIndex<RangeFull> for Tess
[src]
fn slice(&self, _: RangeFull) -> TessSlice
[src]
fn inst_slice(&self, _: RangeFull, inst_nb: usize) -> TessSlice
[src]
impl TessSliceIndex<RangeTo<usize>> for Tess
[src]
fn slice(&self, to: RangeTo<usize>) -> TessSlice
[src]
fn inst_slice(&self, to: RangeTo<usize>, inst_nb: usize) -> TessSlice
[src]
impl TessSliceIndex<RangeFrom<usize>> for Tess
[src]
fn slice(&self, from: RangeFrom<usize>) -> TessSlice
[src]
fn inst_slice(&self, from: RangeFrom<usize>, inst_nb: usize) -> TessSlice
[src]
impl TessSliceIndex<Range<usize>> for Tess
[src]
fn slice(&self, range: Range<usize>) -> TessSlice
[src]
fn inst_slice(&self, range: Range<usize>, inst_nb: usize) -> TessSlice
[src]
impl TessSliceIndex<RangeInclusive<usize>> for Tess
[src]
fn slice(&self, range: RangeInclusive<usize>) -> TessSlice
[src]
fn inst_slice(&self, range: RangeInclusive<usize>, inst_nb: usize) -> TessSlice
[src]
impl TessSliceIndex<RangeToInclusive<usize>> for Tess
[src]
fn slice(&self, to: RangeToInclusive<usize>) -> TessSlice
[src]
fn inst_slice(&self, to: RangeToInclusive<usize>, inst_nb: usize) -> TessSlice
[src]
impl Drop for Tess
[src]
impl<'a> From<&'a Tess> for TessSlice<'a>
[src]
Auto Trait Implementations
impl !Send for Tess
impl Unpin for Tess
impl !Sync for Tess
impl !RefUnwindSafe for Tess
impl !UnwindSafe for Tess
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,