SecondHalfGames / yakui

yakui is a declarative Rust UI library for games
Apache License 2.0
237 stars 21 forks source link

Support setting address modes for yakui textures #177

Closed HexyWitch closed 5 months ago

HexyWitch commented 5 months ago

Addresses #175

Adds

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum AddressMode {
    /// Clamp to the edge of the texture
    ClampToEdge,

    /// Repeat the texture
    Repeat,
}

and adds it to

pub struct Texture {
    // [...]

    /// How to handle texture addressing
    pub address_mode: AddressMode,
}

and implements setting the address mode in yakui-wgpu and yakui-vulkan