summaryrefslogtreecommitdiff
path: root/src/ral/backends/opengl/opengl_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ral/backends/opengl/opengl_helpers.h')
-rw-r--r--src/ral/backends/opengl/opengl_helpers.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ral/backends/opengl/opengl_helpers.h b/src/ral/backends/opengl/opengl_helpers.h
index f240050..0450c74 100644
--- a/src/ral/backends/opengl/opengl_helpers.h
+++ b/src/ral/backends/opengl/opengl_helpers.h
@@ -59,7 +59,7 @@ static u32 opengl_bindcreate_vao(GPU_Buffer* buf, VertexDescription desc) {
u32 attr_count = desc.attributes_count;
printf("N attributes %d\n", attr_count);
u64 offset = 0;
- size_t vertex_size = desc.use_full_vertex_size ? sizeof(Vertex) : desc.stride;
+ size_t vertex_size = desc.use_full_vertex_size ? sizeof(Vertex) : VertexDesc_CalcStride(&desc);
for (u32 i = 0; i < desc.attributes_count; i++) {
opengl_vertex_attr format = format_from_vertex_attr(desc.attributes[i]);
glVertexAttribPointer(i, format.count, format.data_type, GL_FALSE, vertex_size, (void*)offset);