summaryrefslogtreecommitdiff
path: root/src/renderer/backends/opengl/opengl_helpers.h
diff options
context:
space:
mode:
authorOmniscient <omniscient.oce@gmail.com>2024-06-09 14:55:53 +1000
committerOmniscient <omniscient.oce@gmail.com>2024-06-09 14:55:53 +1000
commitd4ff15d9cd82a6e3bc71da9d04ee0f250460cef1 (patch)
tree9082af194033e5e3e4a770456209d3bac7784943 /src/renderer/backends/opengl/opengl_helpers.h
parent64830ce51a185091f54c2b42b365110d89d44f1b (diff)
fix cube
Diffstat (limited to 'src/renderer/backends/opengl/opengl_helpers.h')
-rw-r--r--src/renderer/backends/opengl/opengl_helpers.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/renderer/backends/opengl/opengl_helpers.h b/src/renderer/backends/opengl/opengl_helpers.h
index 405a8f1..a3c4014 100644
--- a/src/renderer/backends/opengl/opengl_helpers.h
+++ b/src/renderer/backends/opengl/opengl_helpers.h
@@ -54,7 +54,7 @@ static u32 opengl_bindcreate_vao(gpu_buffer* buf, vertex_description desc) {
u32 attr_count = desc.attributes_count;
printf("N attributes %d\n", attr_count);
u64 offset = 0;
- size_t vertex_size = desc.stride;
+ size_t vertex_size = desc.use_full_vertex_size ? sizeof(vertex) : desc.stride;
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);