From cee8b3a19833e1143d0551e8031aa812f7c5a92b Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 25 Mar 2026 18:59:04 +0100 Subject: feat(engine): pass vertex subsets to shaders --- engine/src/renderer/opengl/vertex.rs | 65 ------------------------------------ 1 file changed, 65 deletions(-) delete mode 100644 engine/src/renderer/opengl/vertex.rs (limited to 'engine/src/renderer/opengl/vertex.rs') diff --git a/engine/src/renderer/opengl/vertex.rs b/engine/src/renderer/opengl/vertex.rs deleted file mode 100644 index 5a1593e..0000000 --- a/engine/src/renderer/opengl/vertex.rs +++ /dev/null @@ -1,65 +0,0 @@ -use safer_ffi::derive_ReprC; - -#[derive(Debug, Clone)] -#[derive_ReprC] -#[repr(C)] -pub struct Vertex -{ - pub pos: opengl_bindings::data_types::Vec3, - pub texture_coords: opengl_bindings::data_types::Vec2, - pub normal: opengl_bindings::data_types::Vec3, -} - -impl Vertex -{ - pub fn attrs() -> &'static [Attribute] - { - #[allow(clippy::cast_possible_truncation)] - &[ - Attribute { - index: 0, - component_type: AttributeComponentType::Float, - component_cnt: AttributeComponentCnt::Three, - component_size: size_of::() as u32, - }, - Attribute { - index: 1, - component_type: AttributeComponentType::Float, - component_cnt: AttributeComponentCnt::Two, - component_size: size_of::() as u32, - }, - Attribute { - index: 2, - component_type: AttributeComponentType::Float, - component_cnt: AttributeComponentCnt::Three, - component_size: size_of::() as u32, - }, - ] - } -} - -#[derive(Debug)] -pub struct Attribute -{ - pub index: u32, - pub component_type: AttributeComponentType, - pub component_cnt: AttributeComponentCnt, - pub component_size: u32, -} - -#[derive(Debug)] -pub enum AttributeComponentType -{ - Float, -} - -#[derive(Debug, Clone, Copy)] -#[repr(u32)] -#[allow(dead_code)] -pub enum AttributeComponentCnt -{ - One = 1, - Two = 2, - Three = 3, - Four = 4, -} -- cgit v1.2.3-18-g5258