Link to TextureBlitterBuilder from TextureBlitter::new (#7003)

This commit is contained in:
Daniel McNab
2025-01-27 10:30:26 +00:00
committed by GitHub
parent 7e4cfb5947
commit fcbadc9529
2 changed files with 7 additions and 1 deletions

View File

@@ -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).

View File

@@ -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()
}