Enum cogl::PipelineWrapMode[][src]

#[non_exhaustive]
pub enum PipelineWrapMode {
    Repeat,
    MirroredRepeat,
    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 PipelineFilter::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)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Repeat

The texture will be repeated. This is useful for example to draw a tiled background.

MirroredRepeat
ClampToEdge

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.

Automatic

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 PipelineWrapMode[src]

impl Copy for PipelineWrapMode[src]

impl Debug for PipelineWrapMode[src]

impl Display for PipelineWrapMode[src]

impl Eq for PipelineWrapMode[src]

impl Hash for PipelineWrapMode[src]

impl Ord for PipelineWrapMode[src]

impl PartialEq<PipelineWrapMode> for PipelineWrapMode[src]

impl PartialOrd<PipelineWrapMode> for PipelineWrapMode[src]

impl StructuralEq for PipelineWrapMode[src]

impl StructuralPartialEq for PipelineWrapMode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.