diff options
| author | HampusM <hampus@hampusmat.com> | 2026-04-06 20:48:36 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-04-06 20:48:36 +0200 |
| commit | 5853d458ae55443c79976893f822aaed508de013 (patch) | |
| tree | 02555763fda13d9dfb4fee00802dad205265144d /engine/src/renderer | |
| parent | 942df064017258a92eee1a14cd613c6aec983dc8 (diff) | |
refactor(engine): improve names of reflection types & items
Diffstat (limited to 'engine/src/renderer')
| -rw-r--r-- | engine/src/renderer/opengl/graphics_mesh.rs | 10 |
1 files changed, 5 insertions, 5 deletions
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::<f32>() { 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"); |
