From 5853d458ae55443c79976893f822aaed508de013 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 6 Apr 2026 20:48:36 +0200 Subject: refactor(engine): improve names of reflection types & items --- engine/src/renderer/opengl/graphics_mesh.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engine/src/renderer/opengl/graphics_mesh.rs') diff --git a/engine/src/renderer/opengl/graphics_mesh.rs b/engine/src/renderer/opengl/graphics_mesh.rs index d62cd3e..cdd0e8d 100644 --- a/engine/src/renderer/opengl/graphics_mesh.rs +++ b/engine/src/renderer/opengl/graphics_mesh.rs @@ -12,7 +12,7 @@ use opengl_bindings::vertex_array::{ use zerocopy::IntoBytes; use crate::mesh::Mesh; -use crate::reflection::Reflection; +use crate::reflection::Type; use crate::shader::VertexSubset as ShaderVertexSubset; #[derive(Debug)] @@ -105,8 +105,8 @@ impl GraphicsMesh vertex_arr.set_attrib_format( current_context, attrib_index, - match vertex_subset_field.reflection.reflection() { - Some(Reflection::Literal(_)) => { + match vertex_subset_field.reflection.type_reflection() { + Some(Type::Literal(_)) => { if vertex_subset_field.reflection.type_id != TypeId::of::() { panic!("Unsupported vertex field data type"); } @@ -118,8 +118,8 @@ impl GraphicsMesh offset: vertex_subset_field.offset.try_into().unwrap(), } } - Some(Reflection::Array(array_vertex_field)) => { - let Reflection::Literal(array_vertex_field_item) = + Some(Type::Array(array_vertex_field)) => { + let Type::Literal(array_vertex_field_item) = array_vertex_field.item_reflection else { panic!("Unsupported array item type in vertex field"); -- cgit v1.2.3-18-g5258