mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -05:00
ScreenSpaceRenderables can be creates through scripts, ScreenSpaceRenderable is now a factory
This commit is contained in:
@@ -33,7 +33,6 @@ namespace openspace {
|
||||
ScreenSpaceImage::ScreenSpaceImage(std::string texturePath)
|
||||
:ScreenSpaceRenderable()
|
||||
,_texturePath("texturePath", "Texture path", texturePath)
|
||||
|
||||
{
|
||||
_id = id();
|
||||
setName("ScreenSpaceImage" + std::to_string(_id));
|
||||
@@ -45,6 +44,24 @@ ScreenSpaceImage::ScreenSpaceImage(std::string texturePath)
|
||||
_texturePath.onChange([this](){ loadTexture(); });
|
||||
}
|
||||
|
||||
ScreenSpaceImage::ScreenSpaceImage(const ghoul::Dictionary& dictionary)
|
||||
:ScreenSpaceRenderable()
|
||||
,_texturePath("texturePath", "Texture path", "")
|
||||
{
|
||||
_id = id();
|
||||
setName("ScreenSpaceImage" + std::to_string(_id));
|
||||
|
||||
std::string texturePath;
|
||||
dictionary.getValue("TexturePath", texturePath);
|
||||
_texturePath.set(texturePath);
|
||||
|
||||
registerProperties();
|
||||
|
||||
addProperty(_texturePath);
|
||||
OsEng.gui()._screenSpaceProperty.registerProperty(&_texturePath);
|
||||
_texturePath.onChange([this](){ loadTexture(); });
|
||||
}
|
||||
|
||||
ScreenSpaceImage::~ScreenSpaceImage(){}
|
||||
|
||||
bool ScreenSpaceImage::initialize(){
|
||||
|
||||
Reference in New Issue
Block a user