1
0
Fork 0
forked from wry/wry

render: split module into gfx_apis and renderer

This commit is contained in:
Julian Orth 2023-10-22 17:35:31 +02:00
parent 5e8a6eb86f
commit d650b3375d
68 changed files with 219 additions and 222 deletions

View file

@ -0,0 +1,28 @@
use {
crate::gfx_apis::gl::{gl::texture::GlTexture, renderer::context::RenderContext},
std::{
fmt::{Debug, Formatter},
rc::Rc,
},
};
pub struct Texture {
pub(crate) ctx: Rc<RenderContext>,
pub(crate) gl: GlTexture,
}
impl Debug for Texture {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Texture").finish_non_exhaustive()
}
}
impl Texture {
pub fn width(&self) -> i32 {
self.gl.width
}
pub fn height(&self) -> i32 {
self.gl.height
}
}