1
use crate::math::{Pixels, Rect, Size};
2
use crate::sprite::RenderedSprite;
3

            
4
#[derive(Debug)]
5
pub struct Batch {
6
    pub size: Size<u32>,
7
    pub clipping_rect: Option<Rect<u32, Pixels>>,
8
    pub loaded_texture_id: u64,
9
    pub sprites: Vec<RenderedSprite>,
10
}
11

            
12
impl Batch {
13
    pub const fn new(
14
        loaded_texture_id: u64,
15
        size: Size<u32>,
16
        clipping_rect: Option<Rect<u32, Pixels>>,
17
    ) -> Self {
18
        Self {
19
            loaded_texture_id,
20
            size,
21
            clipping_rect,
22
            sprites: Vec::new(),
23
        }
24
    }
25
}