added destroyGL deleting modules in renderer
This commit is contained in:
parent
04cc620797
commit
837fe1cd39
@ -49,3 +49,9 @@ void PhongMaterial::setTexture(Texture* myTexture)
|
||||
diffuse_texture = myTexture;
|
||||
updateShader();
|
||||
}
|
||||
|
||||
void PhongMaterial::setNormalMap(Texture* myNormalMap)
|
||||
{
|
||||
normal_map = myNormalMap;
|
||||
updateShader();
|
||||
}
|
||||
|
@ -13,8 +13,8 @@ public:
|
||||
glm::vec3 diffuse;
|
||||
glm::vec3 specular;
|
||||
float shininess;
|
||||
Texture* diffuse_texture;
|
||||
Texture* normal_map;
|
||||
Texture* diffuse_texture;
|
||||
Texture* normal_map;
|
||||
|
||||
PhongMaterial() :
|
||||
emission(0),
|
||||
@ -40,6 +40,7 @@ public:
|
||||
void crappyBindAttributes();
|
||||
|
||||
void setTexture(Texture* myTexture);
|
||||
void setNormalMap(Texture* myNormalMap);
|
||||
|
||||
void updateShader();
|
||||
};
|
||||
|
@ -44,7 +44,9 @@ void SparrowRenderer::initGL(int width, int height, bool forceCrappy)
|
||||
|
||||
void SparrowRenderer::destroyGL()
|
||||
{
|
||||
|
||||
for(ModuleNode &m : modules)
|
||||
delete m.module;
|
||||
modules.clear();
|
||||
}
|
||||
|
||||
void SparrowRenderer::resizeGL(int width, int height)
|
||||
|
Loading…
x
Reference in New Issue
Block a user