]> git.nega.tv - josh/narcissus/commitdiff
Rename `request_command_buffer` to `create_...`
authorJoshua Simmons <josh@nega.tv>
Sat, 29 Oct 2022 14:12:39 +0000 (16:12 +0200)
committerJoshua Simmons <josh@nega.tv>
Sat, 29 Oct 2022 14:12:39 +0000 (16:12 +0200)
The distinction between requesting and creating seems a bit tenuious and
probably just confusing. Might re-visit this later once the API is more
complete.

narcissus-gpu/src/lib.rs
narcissus-gpu/src/vulkan.rs
narcissus/src/main.rs

index 36635376014fb78e2bcf696e119b4bffd807e236..e78813eb34bd5b849d3312c7420787f19abb0976 100644 (file)
@@ -241,7 +241,7 @@ pub trait Device {
     ) -> (u32, u32, Texture);
     fn destroy_window(&self, window: Window);
 
-    fn request_command_buffer<'frame>(
+    fn create_command_buffer<'frame>(
         &'frame self,
         frame_token: &'frame FrameToken,
         thread_token: &'frame mut ThreadToken,
index 5167788d727c3428f3e5992c20601350e50c330e..13e4455d2ff5c5ab416c177be3a02d26fae34763 100644 (file)
@@ -1688,7 +1688,7 @@ impl<'driver> Device for VulkanDevice<'driver> {
         }
     }
 
-    fn request_command_buffer<'frame>(
+    fn create_command_buffer<'frame>(
         &'frame self,
         frame_token: &'frame FrameToken,
         thread_token: &'frame mut ThreadToken,
index d58b36d8e647f9281222312d5a50e1aeda898685..b6e601f5f6f563efd96273c291503d79eb1789ff 100644 (file)
@@ -171,7 +171,7 @@ fn render_window(
 ) {
     let (width, height, swapchain_image) =
         device.acquire_swapchain(frame_token, window, TextureFormat::BGRA8_SRGB);
-    let mut command_buffer_token = device.request_command_buffer(frame_token, thread_token);
+    let mut command_buffer_token = device.create_command_buffer(frame_token, thread_token);
     device.cmd_begin_rendering(
         &mut command_buffer_token,
         &RenderingDesc {