We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08cc15a commit bac1b68Copy full SHA for bac1b68
src/device.rs
@@ -1899,6 +1899,21 @@ impl DeviceRef {
1899
}
1900
1901
1902
+ pub fn new_buffer_with_bytes_no_copy(
1903
+ &self,
1904
+ bytes: *const std::ffi::c_void,
1905
+ length: NSUInteger,
1906
+ options: MTLResourceOptions,
1907
+ deallocator: Option<&Block<(*const std::ffi::c_void, NSUInteger), ()>>,
1908
+ ) -> Buffer {
1909
+ unsafe {
1910
+ msg_send![self, newBufferWithBytesNoCopy:bytes
1911
+ length:length
1912
+ options:options
1913
+ deallocator:deallocator]
1914
+ }
1915
1916
+
1917
pub fn new_buffer_with_data(
1918
&self,
1919
bytes: *const std::ffi::c_void,
0 commit comments