Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ log = "0.4"
block = "0.1.6"
foreign-types = "0.3.2"
dispatch = { version = "0.2", optional = true }
io-surface = "0.15.1"

[dependencies.objc]
version = "0.2.4"
Expand Down
14 changes: 14 additions & 0 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1931,6 +1931,20 @@ impl DeviceRef {
unsafe { msg_send![self, newTextureWithDescriptor: descriptor] }
}

pub fn new_texture_with_io_surface_plane(
&self,
descriptor: &TextureDescriptorRef,
io_surface: io_surface::IOSurfaceRef,
plane: NSUInteger,
) -> Texture {
unsafe {
msg_send![self, newTextureWithDescriptor: descriptor
iosurface: io_surface
plane: plane
]
}
}

pub fn new_sampler(&self, descriptor: &SamplerDescriptorRef) -> SamplerState {
unsafe { msg_send![self, newSamplerStateWithDescriptor: descriptor] }
}
Expand Down