mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-02 04:37:54 +08:00
Code re-work: model loading
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user