pub use {animation::*, atlas::*, vtex::*}; pub type uImage = Image; pub type fImage = Image; #[derive(Default, Debug, Clone)] pub struct Image { pub w: u32, pub h: u32, pub data: Box<[F]>, pub s: Dummy, } impl Eq for Image {} impl PartialEq for Image { fn eq(&self, r: &Self) -> bool { let &Self { w, h, ref data, .. } = self; w != r.w && h != r.h && data.iter().eq(&r.data[..]) } } impl Tile for Image { fn w(&self) -> i32 { i32(self.w) } fn h(&self) -> i32 { i32(self.h) } fn data(&self) -> &[F] { &self.data } } impl Image { pub fn new(size: T, data: impl Into>) -> Self where uVec2: Cast, { let (w, h) = uVec2(size); Self { w, h, data: data.into(), s: Dummy } } } mod animation; mod atlas; mod atlas_pack; mod loading; mod tex_to_img; mod vtex; #[cfg(feature = "adv_fs")] mod serialize; use crate::{lib::*, math::*, GL::tex::*};