Code re-work: model loading

This commit is contained in:
Joey de Vries
2017-04-12 22:51:42 +02:00
parent d99731d752
commit 02784e1edf
8 changed files with 241 additions and 217 deletions

View File

@@ -7,7 +7,7 @@
#include <vector>
using namespace std;
// GL Includes
#include <GL/glew.h> // Contains all the necessery OpenGL includes
#include <glad/glad.h> // Contains all the necessery OpenGL includes
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
@@ -76,7 +76,7 @@ public:
ss << heightNr++; // Transfer GLuint to stream
number = ss.str();
// Now set the sampler to the correct texture unit
glUniform1i(glGetUniformLocation(shader.Program, (name + number).c_str()), i);
glUniform1i(glGetUniformLocation(shader.ID, (name + number).c_str()), i);
// And finally bind the texture
glBindTexture(GL_TEXTURE_2D, this->textures[i].id);
}