From fcbadc9529d52f4684924fcaf5f1ec020c343b81 Mon Sep 17 00:00:00 2001 From: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> Date: Mon, 27 Jan 2025 10:30:26 +0000 Subject: [PATCH] Link to `TextureBlitterBuilder` from `TextureBlitter::new` (#7003) --- CHANGELOG.md | 2 +- wgpu/src/util/texture_blitter.rs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ac09f3a93..944406e70c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,7 +86,7 @@ By @brodycj in [#6925](https://github.com/gfx-rs/wgpu/pull/6925). ### Documentation -- Improved documentation around pipeline caches. By @DJMcNab in [#6978](https://github.com/gfx-rs/wgpu/pull/6978). +- Improved documentation around pipeline caches and `TextureBlitter`. By @DJMcNab in [#6978](https://github.com/gfx-rs/wgpu/pull/6978) and [#7003](https://github.com/gfx-rs/wgpu/pull/7003). - Added a hello window example. By @laycookie in [#6992](https://github.com/gfx-rs/wgpu/pull/6992). diff --git a/wgpu/src/util/texture_blitter.rs b/wgpu/src/util/texture_blitter.rs index e7ef11f925..2ee6c85d5e 100644 --- a/wgpu/src/util/texture_blitter.rs +++ b/wgpu/src/util/texture_blitter.rs @@ -156,6 +156,12 @@ pub struct TextureBlitter { impl TextureBlitter { /// Returns a [`TextureBlitter`] with default settings. + /// + /// # Arguments + /// - `device` - A [`Device`] + /// - `format` - The [`TextureFormat`] of the texture that will be copied to. This has to have the `RENDER_TARGET` usage. + /// + /// Properties of the blitting (such as the [`BlendState`]) can be customised by using [`TextureBlitterBuilder`] instead. pub fn new(device: &Device, format: TextureFormat) -> Self { TextureBlitterBuilder::new(device, format).build() }