Enum cogl::MaterialWrapMode [−][src]
#[non_exhaustive] pub enum MaterialWrapMode { Repeat, ClampToEdge, Automatic, // some variants omitted }
The wrap mode specifies what happens when texture coordinates
outside the range 0→1 are used. Note that if the filter mode is
anything but MaterialFilter::Nearest
then texels outside the
range 0→1 might be used even when the coordinate is exactly 0 or 1
because OpenGL will try to sample neighbouring pixels. For example
if you are trying to render the full texture then you may get
artifacts around the edges when the pixels from the other side are
merged in if the wrap mode is set to repeat.
Variants (Non-exhaustive)
The texture will be repeated. This is useful for example to draw a tiled background.
The coordinates outside the range 0→1 will sample copies of the edge pixels of the texture. This is useful to avoid artifacts if only one copy of the texture is being rendered.
Cogl will try to automatically
decide which of the above two to use. For cogl_rectangle
, it
will use repeat mode if any of the texture coordinates are
outside the range 0→1, otherwise it will use clamp to edge. For
cogl_polygon
it will always use repeat mode. For
cogl_vertex_buffer_draw
it will use repeat mode except for
layers that have point sprite coordinate generation enabled. This
is the default value.
Trait Implementations
impl Clone for MaterialWrapMode
[src]
fn clone(&self) -> MaterialWrapMode
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for MaterialWrapMode
[src]
impl Debug for MaterialWrapMode
[src]
impl Display for MaterialWrapMode
[src]
impl Eq for MaterialWrapMode
[src]
impl<'a> FromValue<'a> for MaterialWrapMode
[src]
unsafe fn from_value(value: &Value) -> Self
[src]
impl<'a> FromValueOptional<'a> for MaterialWrapMode
[src]
unsafe fn from_value_optional(value: &Value) -> Option<Self>
[src]
impl Hash for MaterialWrapMode
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for MaterialWrapMode
[src]
fn cmp(&self, other: &MaterialWrapMode) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<MaterialWrapMode> for MaterialWrapMode
[src]
fn eq(&self, other: &MaterialWrapMode) -> bool
[src]
fn ne(&self, other: &MaterialWrapMode) -> bool
[src]
impl PartialOrd<MaterialWrapMode> for MaterialWrapMode
[src]
fn partial_cmp(&self, other: &MaterialWrapMode) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl SetValue for MaterialWrapMode
[src]
impl StaticType for MaterialWrapMode
[src]
fn static_type() -> Type
[src]
impl StructuralEq for MaterialWrapMode
[src]
impl StructuralPartialEq for MaterialWrapMode
[src]
Auto Trait Implementations
impl RefUnwindSafe for MaterialWrapMode
impl Send for MaterialWrapMode
impl Sync for MaterialWrapMode
impl Unpin for MaterialWrapMode
impl UnwindSafe for MaterialWrapMode
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,
pub fn borrow_mut(&mut self) -> &mut T
[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.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToSendValue for T where
T: SetValue + Send + ToValue + ?Sized,
[src]
T: SetValue + Send + ToValue + ?Sized,
pub fn to_send_value(&self) -> SendValue
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToValue for T where
T: SetValue + ?Sized,
[src]
T: SetValue + ?Sized,
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.
pub 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>,