summaryrefslogtreecommitdiff
path: root/engine/src/renderer/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/renderer/opengl')
-rw-r--r--engine/src/renderer/opengl/graphics_mesh.rs10
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");