Skip to content

Commit

Permalink
Link to TextureBlitterBuilder from TextureBlitter::new (#7003)
Browse files Browse the repository at this point in the history
  • Loading branch information
DJMcNab authored Jan 27, 2025
1 parent 7e4cfb5 commit fcbadc9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
6 changes: 6 additions & 0 deletions wgpu/src/util/texture_blitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit fcbadc9

Please sign in to comment.