Browse Source

set GLVertexAttrib.buf_type when loading a GLMesh

main
cinnaboot 5 years ago
parent
commit
52dc91dad4
  1. 2
      src/shader.cpp

2
src/shader.cpp

@ -273,6 +273,8 @@ loadGLMesh(const Mesh& m,
for (u32 i = 0; i < num_mappings; i++) { for (u32 i = 0; i < num_mappings; i++) {
GLBuffer& buf = glm.vertex_attrib_buffers[i]; GLBuffer& buf = glm.vertex_attrib_buffers[i];
GLVertexAttrib* attrib = mappings[i].attrib; GLVertexAttrib* attrib = mappings[i].attrib;
// FIXME: does it make sense to set 'buf_type' in a separate function?
attrib->buf_type = mappings[i].buf_type;
u32 type_size = getGLTypeSize(attrib->data_type); u32 type_size = getGLTypeSize(attrib->data_type);
assert(type_size > 0); assert(type_size > 0);

Loading…
Cancel
Save