More work on properties

Added notify method to templateproperty's set method
Fixed names of subpropertyowners
This commit is contained in:
Alexander Bock
2014-08-31 16:08:19 +02:00
parent 9671921331
commit 5add1682d3
9 changed files with 20 additions and 12 deletions
+6 -7
View File
@@ -68,10 +68,9 @@ RenderablePlanet::RenderablePlanet(const ghoul::Dictionary& dictionary)
_colorTexturePath = path + "/" + texturePath;
}
for (properties::Property* p : _geometry->properties())
addProperty(p);
addPropertySubOwner(_geometry);
addProperty(_colorTexturePath);
addProperty(_colorTexturePath);
_colorTexturePath.onChange(std::bind(&RenderablePlanet::loadTexture, this));
}
@@ -107,10 +106,10 @@ bool RenderablePlanet::deinitialize()
void RenderablePlanet::render(const Camera* camera, const psc& thisPosition)
{
// TODO replace with more robust assert
// check so that the shader is set
assert(_programObject);
assert(_texture);
if (!_programObject)
return;
if (!_texture)
return;
// activate shader
_programObject->activate();