pub struct Workers {
pub group_x: u32,
pub group_y: u32,
pub group_z: u32,
}Expand description
Work-group dimensions for compute shader dispatch.
Used by Shader::compute to call glDispatchCompute.
Fields§
§group_x: u32§group_y: u32§group_z: u32Implementations§
Source§impl Workers
impl Workers
Sourcepub fn set_groups(&mut self, x: u32, y: u32, z: u32)
pub fn set_groups(&mut self, x: u32, y: u32, z: u32)
Sets all three work-group dimensions at once.
Sourcepub fn groups(&self) -> (u32, u32, u32)
pub fn groups(&self) -> (u32, u32, u32)
Returns the work-group dimensions as a tuple (x, y, z).
Sourcepub fn set_group_x(&mut self, x: u32)
pub fn set_group_x(&mut self, x: u32)
Sets the X work-group size.
Sourcepub fn set_group_y(&mut self, y: u32)
pub fn set_group_y(&mut self, y: u32)
Sets the Y work-group size.
Sourcepub fn set_group_z(&mut self, z: u32)
pub fn set_group_z(&mut self, z: u32)
Sets the Z work-group size.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Workers
impl RefUnwindSafe for Workers
impl Send for Workers
impl Sync for Workers
impl Unpin for Workers
impl UnsafeUnpin for Workers
impl UnwindSafe for Workers
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more