1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
// pub struct RafxTexturePtrMetal { // texture: metal::TextureRef, // } // // impl RafxTexturePtrMetal { // pub fn texture(&self) -> *metal::TextureRef { // &self.texture // } // } //#[derive(Clone)] #[derive(Debug)] pub struct RafxTextureMetal { texture: metal::Texture, } unsafe impl Send for RafxTextureMetal {} unsafe impl Sync for RafxTextureMetal {} impl RafxTextureMetal { pub fn new_from_metal_texture(texture: metal::Texture) -> Self { RafxTextureMetal { texture } } pub fn texture(&self) -> &metal::Texture { &self.texture } // pub fn take_texture_ptr(self) -> RafxTexturePtrMetal { // RafxTexturePtrMetal { // // } // } }