Basic model loading
This commit is contained in:
@@ -41,7 +41,7 @@ Texture::Texture(const char* texturePath, uint8_t textureType) {
|
||||
}
|
||||
|
||||
Texture::~Texture() {
|
||||
glDeleteTextures(1, &textureId);
|
||||
//glDeleteTextures(1, &textureId);
|
||||
}
|
||||
|
||||
void Texture::bind(uint8_t textureUnit, ShaderProgram* shaderProgram, uint8_t textureTypeNum) {
|
||||
@@ -63,6 +63,9 @@ void Texture::bind(uint8_t textureUnit, ShaderProgram* shaderProgram, uint8_t te
|
||||
break;
|
||||
}
|
||||
|
||||
// Add material. as we store textures in a struct
|
||||
uniformName = "material." + uniformName;
|
||||
|
||||
shaderProgram->setUniform(uniformName.c_str(), textureTypeNum);
|
||||
|
||||
glActiveTexture(GL_TEXTURE0 + textureUnit);
|
||||
|
||||
Reference in New Issue
Block a user