2022-11-30 00:39:42 -05:00
|
|
|
use crate::framebuffer::GLImage;
|
2022-11-30 01:38:05 -05:00
|
|
|
use librashader_common::{FilterMode, WrapMode};
|
2022-11-27 02:10:11 -05:00
|
|
|
|
|
|
|
#[derive(Default, Debug, Copy, Clone)]
|
|
|
|
pub struct Texture {
|
2022-11-30 00:39:42 -05:00
|
|
|
pub image: GLImage,
|
2022-11-27 02:10:11 -05:00
|
|
|
pub filter: FilterMode,
|
|
|
|
pub mip_filter: FilterMode,
|
|
|
|
pub wrap_mode: WrapMode,
|
|
|
|
}
|
2022-11-29 19:36:09 -05:00
|
|
|
|
|
|
|
impl Texture {
|
|
|
|
pub fn is_bound(&self) -> bool {
|
2022-11-30 01:38:05 -05:00
|
|
|
self.image.handle != 0
|
2022-11-29 19:36:09 -05:00
|
|
|
}
|
2022-11-30 01:38:05 -05:00
|
|
|
}
|