Skip to content

Commit

Permalink
Tune mtl api
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Oct 21, 2024
1 parent 6e31ac8 commit e0d40d2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cidre/src/mtl/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ pub enum Swizzle {
Alpha = 5,
}

#[doc(alias = "MTLTextureSwizzleChannels")]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[repr(C)]
pub struct SwizzleChannels {
Expand Down Expand Up @@ -264,7 +265,7 @@ impl Texture {
/// The texture this texture view was created from, or [`None`] if this is not
/// a texture view or it was not created from a texture.
#[objc::msg_send(parentTexture)]
pub fn parent_texture(&self) -> Option<&Texture>;
pub fn parent_texture(&self) -> Option<arc::R<Texture>>;

#[objc::msg_send(newTextureViewWithPixelFormat:)]
pub fn new_texture_view_with_pixel_format(
Expand All @@ -275,7 +276,7 @@ impl Texture {
/// The buffer this texture view was created from, or [`None`] if this is not a texture
/// view or it was not created from a buffer.
#[objc::msg_send(buffer)]
pub fn buf(&self) -> Option<&mtl::Buf>;
pub fn buf(&self) -> Option<arc::R<mtl::Buf>>;

/// The offset of the buffer this texture view was created from, or 0 if this is not a texture view.
#[objc::msg_send(bufferOffset)]
Expand Down

0 comments on commit e0d40d2

Please # to comment.