diff --git a/src/main.cpp b/src/main.cpp index 45b93e9..ce43561 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -178,6 +178,8 @@ void draw_cube(glm::ivec3 coords, Shader& shader, unsigned int VAO, size_t index glm::mat4 model = glm::mat4(1.0f); model = glm::translate(model, glm::vec3(coords)); + model = glm::scale(model, glm::vec3(0.5f, 0.5f, 0.5f)); + // Calculate MVP matrix glm::mat4 mvp = projection * view * model; @@ -190,6 +192,7 @@ void draw_cube(glm::ivec3 coords, Shader& shader, unsigned int VAO, size_t index glBindVertexArray(VAO); glDrawElements(GL_TRIANGLES, indexCount, GL_UNSIGNED_INT, nullptr); } + int main() { // 1. --- Initialize GLFW --- if (!glfwInit()) {