Set attributes of screenspacerenderable through dictionary

This commit is contained in:
Sebastian Piwell
2016-05-03 15:35:33 -04:00
parent 5e5e9244f5
commit 1e4e8919c3
8 changed files with 120 additions and 63 deletions
+12 -12
View File
@@ -30,22 +30,22 @@ namespace {
}
namespace openspace {
ScreenSpaceImage::ScreenSpaceImage(std::string texturePath)
:ScreenSpaceRenderable()
,_texturePath("texturePath", "Texture path", texturePath)
{
_id = id();
setName("ScreenSpaceImage" + std::to_string(_id));
// ScreenSpaceImage::ScreenSpaceImage(std::string texturePath)
// :ScreenSpaceRenderable()
// ,_texturePath("texturePath", "Texture path", texturePath)
// {
// _id = id();
// setName("ScreenSpaceImage" + std::to_string(_id));
registerProperties();
// registerProperties();
addProperty(_texturePath);
OsEng.gui()._screenSpaceProperty.registerProperty(&_texturePath);
_texturePath.onChange([this](){ loadTexture(); });
}
// addProperty(_texturePath);
// OsEng.gui()._screenSpaceProperty.registerProperty(&_texturePath);
// _texturePath.onChange([this](){ loadTexture(); });
// }
ScreenSpaceImage::ScreenSpaceImage(const ghoul::Dictionary& dictionary)
:ScreenSpaceRenderable()
:ScreenSpaceRenderable(dictionary)
,_texturePath("texturePath", "Texture path", "")
{
_id = id();