Browse Source

add new GLMeshMapping structure

main
cinnaboot 5 years ago
parent
commit
edd4fc6239
  1. 11
      src/shader.h

11
src/shader.h

@ -14,7 +14,8 @@ struct gl_buffer
GLenum target; GLenum target;
GLenum data_type; GLenum data_type;
GLuint data_size; 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; char* name;
}; };
@ -53,6 +54,7 @@ struct shader_program
u32 num_uniforms; u32 num_uniforms;
gl_uniform* uniforms; gl_uniform* uniforms;
// FIXME: better name would be vertex_attribs
u32 num_buffers; u32 num_buffers;
gl_buffer* buffers; gl_buffer* buffers;
@ -99,6 +101,13 @@ struct GLmesh
GLuint idx_buf_id; GLuint idx_buf_id;
}; };
// NOTE: attempt to resolve GLmesh to shader_program mapping issue
struct GLmeshMapping
{
u32 mesh_idx;
u32 shader_idx;
};
struct PointLight struct PointLight
{ {
glm::vec3 position; glm::vec3 position;

Loading…
Cancel
Save