From 78ba3331649c7f9a616b3c871f259e1fc67bee7c Mon Sep 17 00:00:00 2001 From: k Date: Tue, 27 May 2025 13:18:52 -0400 Subject: [PATCH] cleanup --- src/main.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6fdb019..650f07d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -70,18 +70,16 @@ int main(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); shaderProgram->use(); - shaderProgram->setInt("Tex0", 0); shaderProgram->setMat4("view", cam->getView()); shaderProgram->setMat4("projection", cam->getProjection()); glBindVertexArray(VAO); + texture->bind(GL_TEXTURE0); + texture2->bind(GL_TEXTURE1); + glActiveTexture(GL_TEXTURE0); for (unsigned int i = 0; i < 10; i++) { - if (i % 2 == 0) { - texture->bind(GL_TEXTURE0); - } else { - texture2->bind(GL_TEXTURE0); - } + shaderProgram->setInt("tex0", i%2); glm::mat4 model = glm::mat4(1.0f); model = glm::translate(model, cubePositions[i]);