From ef18a856b83c1344d6bd90807e34ed7238bc9aa2 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 23 Dec 2019 09:14:40 +1100 Subject: [PATCH] Fixing spacing in mesh.h This file doesn't display properly in the code viewer due to a mixture of spaces and tabs https://learnopengl.com/code_viewer_gh.php?code=includes/learnopengl/mesh.h --- includes/learnopengl/mesh.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/learnopengl/mesh.h b/includes/learnopengl/mesh.h index d6f7ee9..8203041 100644 --- a/includes/learnopengl/mesh.h +++ b/includes/learnopengl/mesh.h @@ -69,15 +69,15 @@ public: string number; string name = textures[i].type; if(name == "texture_diffuse") - number = std::to_string(diffuseNr++); - else if(name == "texture_specular") - number = std::to_string(specularNr++); // transfer unsigned int to stream + number = std::to_string(diffuseNr++); + else if(name == "texture_specular") + number = std::to_string(specularNr++); // transfer unsigned int to stream else if(name == "texture_normal") - number = std::to_string(normalNr++); // transfer unsigned int to stream + number = std::to_string(normalNr++); // transfer unsigned int to stream else if(name == "texture_height") - number = std::to_string(heightNr++); // transfer unsigned int to stream + number = std::to_string(heightNr++); // transfer unsigned int to stream - // now set the sampler to the correct texture unit + // now set the sampler to the correct texture unit glUniform1i(glGetUniformLocation(shader.ID, (name + number).c_str()), i); // and finally bind the texture glBindTexture(GL_TEXTURE_2D, textures[i].id);