summaryrefslogtreecommitdiff
path: root/engine/src/renderer/opengl/graphics_mesh.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/renderer/opengl/graphics_mesh.rs')
-rw-r--r--engine/src/renderer/opengl/graphics_mesh.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/engine/src/renderer/opengl/graphics_mesh.rs b/engine/src/renderer/opengl/graphics_mesh.rs
index 8e0e3cc..62dadb8 100644
--- a/engine/src/renderer/opengl/graphics_mesh.rs
+++ b/engine/src/renderer/opengl/graphics_mesh.rs
@@ -1,6 +1,7 @@
use opengl_bindings::CurrentContextWithFns as GlCurrentContextWithFns;
use opengl_bindings::buffer::{Buffer as GlBuffer, Usage as GlBufferUsage};
use opengl_bindings::vertex_array::{
+ AttributeFormat as GlVertexArrayAttributeFormat,
DataType as GlVertexArrayDataType,
VertexArray as GlVertexArray,
};
@@ -64,11 +65,16 @@ impl GraphicsMesh
vertex_arr.set_attrib_format(
current_context,
attrib.index,
- match attrib.component_type {
- VertexAttributeComponentType::Float => GlVertexArrayDataType::Float,
+ GlVertexArrayAttributeFormat {
+ data_type: match attrib.component_type {
+ VertexAttributeComponentType::Float => {
+ GlVertexArrayDataType::Float
+ }
+ },
+ count: attrib.component_cnt as u8,
+ normalized: false,
+ offset,
},
- false,
- offset,
);
vertex_arr.set_attrib_vertex_buf_binding(current_context, attrib.index, 0);