Make the WindowWrapper a PropertyOwner and add SGCT properties to the subclass (closes #260)

This commit is contained in:
Alexander Bock
2017-03-03 18:39:35 -05:00
parent 8e0a37fb7a
commit 63af7e67f9
8 changed files with 38 additions and 9 deletions

View File

@@ -50,7 +50,6 @@ public:
bool useDoubleBuffering();
private:
properties::FloatProperty _eyeSeparation;
properties::OptionProperty _scenes;
properties::BoolProperty _busyWaitForDecode;
properties::BoolProperty _logSGCTOutOfOrderErrors;

View File

@@ -27,6 +27,9 @@
#include <openspace/engine/wrapper/windowwrapper.h>
#include <openspace/properties/scalar/boolproperty.h>
#include <openspace/properties/scalar/floatproperty.h>
namespace openspace {
/**
@@ -36,6 +39,8 @@ namespace openspace {
*/
class SGCTWindowWrapper : public WindowWrapper {
public:
SGCTWindowWrapper();
void terminate() override;
void setBarrier(bool enabled) override;
void setSynchronization(bool enabled) override;
@@ -72,6 +77,10 @@ public:
bool isSimpleRendering() const override;
void takeScreenshot(bool applyWarping = false) const override;
private:
properties::FloatProperty _eyeSeparation;
properties::BoolProperty _showStatsGraph;
};
} // namespace openspace

View File

@@ -25,6 +25,8 @@
#ifndef __OPENSPACE_CORE___WINDOWWRAPPER___H__
#define __OPENSPACE_CORE___WINDOWWRAPPER___H__
#include <openspace/properties/propertyowner.h>
#include <ghoul/glm.h>
#include <ghoul/misc/exception.h>
@@ -42,8 +44,11 @@ namespace scripting { struct LuaLibrary; }
* Every new windowing framework needs to have its own WindowWrapper subclass exposing the
* required features.
*/
class WindowWrapper {
class WindowWrapper : public properties::PropertyOwner {
public:
/// Default constructor
WindowWrapper();
/**
* Returns the Lua library that contains all Lua functions available to affect the
* windowing system.