From edd4fc623975303fbf6703a40e2a121e29873760 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Sat, 18 Dec 2021 11:12:57 -0500 Subject: [PATCH] add new GLMeshMapping structure --- src/shader.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/shader.h b/src/shader.h index 8e31371..6bf882e 100644 --- a/src/shader.h +++ b/src/shader.h @@ -14,7 +14,8 @@ struct gl_buffer GLenum target; GLenum data_type; GLuint data_size; - GLuint binding_idx; + GLuint location; // NOTE: if used as backing for vertex attribute + GLuint binding_idx; // NOTE: if used as backing from unifor buffer object char* name; }; @@ -53,6 +54,7 @@ struct shader_program u32 num_uniforms; gl_uniform* uniforms; + // FIXME: better name would be vertex_attribs u32 num_buffers; gl_buffer* buffers; @@ -99,6 +101,13 @@ struct GLmesh GLuint idx_buf_id; }; +// NOTE: attempt to resolve GLmesh to shader_program mapping issue +struct GLmeshMapping +{ + u32 mesh_idx; + u32 shader_idx; +}; + struct PointLight { glm::vec3 position;