SecondHalfGames / yakui

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

Support setting address modes for yakui textures #177

Closed HexyWitch closed 1 week ago

HexyWitch commented 1 week 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