ColorMask::disabled() and enabled()
@@ -48,8 +48,8 @@ pub struct ColorMask {
pub alpha: bool
}
-impl Default for ColorMask {
- fn default() -> Self {
+impl ColorMask {
+ pub fn enabled() -> Self {
Self {
red: true,
green: true,
@@ -57,6 +57,21 @@ impl Default for ColorMask {
alpha: true,
}
}
+
+ pub fn disabled() -> Self {
+ Self {
+ red: false,
+ green: false,
+ blue: false,
+ alpha: false,
+ }
+ }
+}
+
+impl Default for ColorMask {
+ fn default() -> Self {
+ Self::enabled()
+ }
}
#[derive(Debug, Copy, Clone, PartialEq)]
