bevy/pipelined/bevy_render2/src/render_resource/texture.rs

32 lines
661 B
Rust
Raw Normal View History

2021-04-11 20:13:07 +00:00
use bevy_utils::Uuid;
#[derive(Copy, Clone, Hash, Eq, PartialEq, Debug)]
pub struct TextureId(Uuid);
impl TextureId {
#[allow(clippy::new_without_default)]
pub fn new() -> Self {
TextureId(Uuid::new_v4())
}
}
2021-06-02 02:59:17 +00:00
#[derive(Copy, Clone, Hash, Eq, PartialEq, Debug)]
pub struct TextureViewId(Uuid);
impl TextureViewId {
#[allow(clippy::new_without_default)]
pub fn new() -> Self {
TextureViewId(Uuid::new_v4())
}
}
2021-04-11 20:13:07 +00:00
#[derive(Copy, Clone, Hash, Eq, PartialEq, Debug)]
pub struct SamplerId(Uuid);
impl SamplerId {
#[allow(clippy::new_without_default)]
pub fn new() -> Self {
SamplerId(Uuid::new_v4())
}
}