mirror of
https://github.com/guilhermewerner/wgpu-renderer
synced 2025-06-16 22:04:24 +00:00
Initial pipeline abstraction
This commit is contained in:
22
Source/Render/Pipeline/FrontFace.rs
Normal file
22
Source/Render/Pipeline/FrontFace.rs
Normal file
@ -0,0 +1,22 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// Winding order which classifies the "front" face.
|
||||
#[repr(C)]
|
||||
#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq, Serialize, Deserialize)]
|
||||
pub enum FrontFace {
|
||||
/// Triangles with vertices in counter clockwise order are considered the front face.
|
||||
///
|
||||
/// This is the default with right handed coordinate spaces.
|
||||
Ccw = 0,
|
||||
|
||||
/// Triangles with vertices in clockwise order are considered the front face.
|
||||
///
|
||||
/// This is the default with left handed coordinate spaces.
|
||||
Cw = 1,
|
||||
}
|
||||
|
||||
impl Default for FrontFace {
|
||||
fn default() -> Self {
|
||||
FrontFace::Ccw
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user