mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-25 21:48:57 -05:00
Add visibility toggle to Property base class
Restructure GuiPropertyComponent to take a source function that returns a list of PropertyOwner%s instead of registering individual properties Apply restructuring
This commit is contained in:
@@ -21,10 +21,10 @@
|
||||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
|
||||
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
||||
****************************************************************************************/
|
||||
|
||||
#include <modules/base/rendering/screenspaceframebuffer.h>
|
||||
#include <openspace/engine/openspaceengine.h>
|
||||
#include <openspace/rendering/renderengine.h>
|
||||
#include <modules/onscreengui/include/gui.h>
|
||||
#include <openspace/util/camera.h>
|
||||
|
||||
#include <openspace/rendering/renderer.h>
|
||||
@@ -40,11 +40,9 @@ ScreenSpaceFramebuffer::ScreenSpaceFramebuffer(const ghoul::Dictionary& dictiona
|
||||
{
|
||||
_id = id();
|
||||
setName("ScreenSpaceFramebuffer" + std::to_string(_id));
|
||||
registerProperties();
|
||||
|
||||
glm::vec2 resolution = OsEng.windowWrapper().currentWindowResolution();
|
||||
addProperty(_size);
|
||||
OsEng.gui()._screenSpaceProperty.registerProperty(&_size);
|
||||
_size.set(glm::vec4(0, 0, resolution.x,resolution.y));
|
||||
|
||||
_scale.setValue(1.0f);
|
||||
@@ -63,8 +61,6 @@ bool ScreenSpaceFramebuffer::initialize(){
|
||||
}
|
||||
|
||||
bool ScreenSpaceFramebuffer::deinitialize(){
|
||||
unregisterProperties();
|
||||
|
||||
glDeleteVertexArrays(1, &_quad);
|
||||
_quad = 0;
|
||||
|
||||
|
||||
@@ -31,8 +31,6 @@
|
||||
#include <ghoul/io/texture/texturereader.h>
|
||||
#include <ghoul/filesystem/filesystem>
|
||||
|
||||
#include <modules/onscreengui/include/gui.h>
|
||||
|
||||
namespace {
|
||||
const std::string _loggerCat = "ScreenSpaceImage";
|
||||
|
||||
@@ -58,12 +56,10 @@ ScreenSpaceImage::ScreenSpaceImage(const ghoul::Dictionary& dictionary)
|
||||
}
|
||||
|
||||
addProperty(_texturePath);
|
||||
registerProperties();
|
||||
|
||||
std::string texturePath;
|
||||
if (dictionary.getValue(KeyTexturePath, texturePath)) {
|
||||
_texturePath = texturePath;
|
||||
OsEng.gui()._screenSpaceProperty.registerProperty(&_texturePath);
|
||||
_texturePath.onChange([this](){ loadTexture(); });
|
||||
}
|
||||
|
||||
@@ -85,7 +81,6 @@ bool ScreenSpaceImage::initialize() {
|
||||
}
|
||||
|
||||
bool ScreenSpaceImage::deinitialize() {
|
||||
unregisterProperties();
|
||||
|
||||
glDeleteVertexArrays(1, &_quad);
|
||||
_quad = 0;
|
||||
|
||||
Reference in New Issue
Block a user