Skip to content

Commit

Permalink
add convenience function (bevyengine#1197)
Browse files Browse the repository at this point in the history
  • Loading branch information
Restioson authored and rparrett committed Jan 27, 2021
1 parent 9c5e455 commit 69a13ff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/bevy_render/src/texture/sampler_descriptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ pub struct SamplerDescriptor {
pub anisotropy_clamp: Option<NonZeroU8>,
}

impl SamplerDescriptor {
/// Sets the address mode for all dimensions of the sampler descriptor.
pub fn set_address_mode(&mut self, address_mode: AddressMode) {
self.address_mode_u = address_mode;
self.address_mode_v = address_mode;
self.address_mode_w = address_mode;
}
}

impl Default for SamplerDescriptor {
fn default() -> Self {
SamplerDescriptor {
Expand Down

0 comments on commit 69a13ff

Please sign in to comment.