diff options
Diffstat (limited to 'engine/src/rendering.rs')
| -rw-r--r-- | engine/src/rendering.rs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/engine/src/rendering.rs b/engine/src/rendering.rs index 1bb11cc..524c617 100644 --- a/engine/src/rendering.rs +++ b/engine/src/rendering.rs @@ -384,6 +384,7 @@ pub struct DrawProperties pub scissor_test_enabled: bool, pub scissor_box: ScissorBox, pub face_culling_enabled: bool, + pub face_culling_mode: FaceCullingMode, /// `None` for default framebuffer pub draw_framebuffer: Option<ObjectId>, @@ -405,6 +406,7 @@ impl Default for DrawProperties scissor_test_enabled: false, scissor_box: ScissorBox::default(), face_culling_enabled: false, + face_culling_mode: FaceCullingMode::default(), draw_framebuffer: None, read_framebuffer: None, } @@ -423,11 +425,23 @@ bitflags! { const SCISSOR_TEST_ENABLED = 1 << 5; const SCISSOR_BOX = 1 << 6; const FACE_CULLING_ENABLED = 1 << 7; - const DRAW_FRAMEBUFFER = 1 << 8; - const READ_FRAMEBUFFER = 1 << 9; + const FACE_CULLING_MODE = 1 << 8; + const DRAW_FRAMEBUFFER = 1 << 9; + const READ_FRAMEBUFFER = 1 << 10; } } +#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub enum FaceCullingMode +{ + Front, + + #[default] + Back, + + FrontAndBack, +} + #[derive(Debug, Clone)] #[non_exhaustive] pub enum TextureCreation |
