From 77f1c0278163a0018907b6053cc2dc4963433d15 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Sun, 19 Dec 2021 15:03:23 -0500 Subject: [PATCH] remove ambiguous data_size property from gl_buffer structure --- src/shader.cpp | 3 --- src/shader.h | 1 - 2 files changed, 4 deletions(-) diff --git a/src/shader.cpp b/src/shader.cpp index 4ea0a0d..4d6deae 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -161,7 +161,6 @@ initTransforms(memory_arena* arena, glGenBuffers(1, &xform_ubo->id); xform_ubo->target = GL_UNIFORM_BUFFER; xform_ubo->data_type = GL_FLOAT; - xform_ubo->data_size = sizeof(*xforms); xform_ubo->name = arenaCopyCStr(arena, "matrices"); glBindBuffer(xform_ubo->target, xform_ubo->id); @@ -313,8 +312,6 @@ parseUniform(memory_arena* arena, shader_program* s, u32 uniform_idx) GL_UNIFORM_BLOCK_INDEX, &unif.block_idx); unif.idx = uniform_idx; - unif.data_size = getGLTypeSize(unif.data_type); - assert(unif.data_size > 0); unif.name = arenaCopyCStr(arena, unif_name); unif.location = glGetUniformLocation(s->prog_id, unif.name); diff --git a/src/shader.h b/src/shader.h index 6bf882e..55686fe 100644 --- a/src/shader.h +++ b/src/shader.h @@ -13,7 +13,6 @@ struct gl_buffer GLuint id; GLenum target; GLenum data_type; - GLuint data_size; GLuint location; // NOTE: if used as backing for vertex attribute GLuint binding_idx; // NOTE: if used as backing from unifor buffer object char* name;