mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-21 18:38:20 -05:00
More work on properties
Added notify method to templateproperty's set method Fixed names of subpropertyowners
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user