diff --git a/src/entity.cpp b/src/entity.cpp index 0f57166..34aa390 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -28,7 +28,6 @@ initEntity(Entity* e, *glm = loadGLMesh(mdl->meshes[i], GL_TRIANGLES, e->diffuse_texture->id, - glm::vec3(0, 0, 0), num_attrib_mappings, attrib_mappings); diff --git a/src/shader.cpp b/src/shader.cpp index 7902c1c..a4309b5 100644 --- a/src/shader.cpp +++ b/src/shader.cpp @@ -226,7 +226,7 @@ getVertexAttribByName(shader_program* shader, const char* name) } GLmesh -initGLmesh(const mesh& m, u32 num_mappings, GLenum draw_mode, glm::vec3 pos) +initGLmesh(const mesh& m, u32 num_mappings, GLenum draw_mode) { GLmesh glm = {0}; glm.num_indices = m.num_indices; @@ -234,9 +234,9 @@ initGLmesh(const mesh& m, u32 num_mappings, GLenum draw_mode, glm::vec3 pos) glm.usage = GL_STATIC_DRAW; // TODO: logic for updating dynamic meshes glm.num_vertex_attrib_buffers = num_mappings; glm.vertex_attrib_buffers = UTIL_ALLOC(num_mappings, gl_buffer); - glm.model_xform = UTIL_ALLOC(1, glm::mat4); glm.element_buf = UTIL_ALLOC(1, gl_buffer); - *glm.model_xform = glm::translate(glm::mat4(1), pos); + glm.model_xform = UTIL_ALLOC(1, glm::mat4); + *glm.model_xform = glm::mat4(1); return glm; } @@ -257,13 +257,12 @@ GLmesh loadGLMesh(const mesh& m, GLenum draw_mode, GLuint diffuse_texture_id, - const glm::vec3& pos, u32 num_mappings, GLBufferToAttribMapping mappings[]) { // NOTE: need to use freeGLMesh() when freeing because we're not storing // the gl_buffers on a memory arean (yet) - GLmesh glm = initGLmesh(m, num_mappings, draw_mode, pos); + GLmesh glm = initGLmesh(m, num_mappings, draw_mode); glm.tex_id = diffuse_texture_id; glGenVertexArrays(1, &glm.vao_id); glBindVertexArray(glm.vao_id); diff --git a/src/shader.h b/src/shader.h index c26dc2d..876242e 100644 --- a/src/shader.h +++ b/src/shader.h @@ -182,7 +182,6 @@ GLVertexAttrib* getVertexAttribByName(shader_program* shader, const char* name); GLmesh loadGLMesh(const mesh& m, GLenum draw_mode, GLuint diffuse_texture_id, - const glm::vec3& pos, u32 num_mappings, GLBufferToAttribMapping mappings[]);