Enum dae_parser::WrapMode
source · [−]pub enum WrapMode {
Wrap,
Mirror,
Clamp,
Border,
None,
}
Expand description
Wrap modes that affect the interpretation of s
, t
, and p
texture coordinates in Sampler*
elements.
Variants
Wrap
OpenGL symbol GL_REPEAT
.
Ignores the integer part of texture coordinates, using only the fractional part.
Mirror
OpenGL symbol GL_MIRRORED_REPEAT
.
First mirrors the texture coordinate.
The mirrored coordinate is then clamped as described for Clamp
.
Clamp
OpenGL symbol GL_CLAMP_TO_EDGE
.
Clamps texture coordinates at all mipmap levels such
that the texture filter never samples a border texel.
Note: GL_CLAMP
takes any texels beyond the
sampling border and substitutes those texels with
the border color. So CLAMP_TO_EDGE
is more
appropriate. This also works much better with
OpenGL ES where the GL_CLAMP
symbol was
removed from the OpenGL ES specification.
Border
OpenGL symbol GL_CLAMP_TO_BORDER
.
Clamps texture coordinates at all MIPmaps such that
the texture filter always samples border texels for
fragments whose corresponding texture coordinate
is sufficiently far outside the range [0, 1].
None
The defined behavior for None
is consistent with
decal texturing where the border is black. Mapping
this calculation to GL_CLAMP_TO_BORDER
is the best approximation of this.
Implementations
Trait Implementations
impl Copy for WrapMode
impl Eq for WrapMode
impl StructuralEq for WrapMode
impl StructuralPartialEq for WrapMode
Auto Trait Implementations
impl RefUnwindSafe for WrapMode
impl Send for WrapMode
impl Sync for WrapMode
impl Unpin for WrapMode
impl UnwindSafe for WrapMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more