Use SyncEngine for synchronizing all synced state in RenderEngine

This commit is contained in:
Erik Broberg
2016-09-15 17:52:22 -04:00
parent ee0cc6d165
commit 9e59cd3b8d
4 changed files with 24 additions and 22 deletions

View File

@@ -34,6 +34,10 @@ namespace openspace {
class Syncable;
class SyncBuffer;
/**
* Manages a collection of <code>Syncable</code>s and ensures they are synchronized
* over SGCT nodes.
*/
class SyncEngine {
public:

View File

@@ -31,6 +31,9 @@
#include <openspace/properties/stringproperty.h>
#include <openspace/rendering/screenspacerenderable.h>
#include <openspace/util/syncdata.h>
#include <openspace/performance/performancemanager.h>
namespace ghoul {
@@ -49,6 +52,7 @@ namespace openspace {
// Forward declare to minimize dependencies
class Camera;
class SyncBuffer;
class Scene;
class Renderer;
class RaycasterManager;
@@ -115,9 +119,6 @@ public:
bool doesPerformanceMeasurements() const;
performance::PerformanceManager* performanceManager();
void serialize(SyncBuffer* syncBuffer);
void deserialize(SyncBuffer* syncBuffer, bool useDoubleBuffering);
float globalBlackOutFactor();
void setGlobalBlackOutFactor(float factor);
void setNAaSamples(int nAaSamples);
@@ -188,12 +189,17 @@ public:
void startFading(int direction, float fadeDuration);
void sortScreenspaceRenderables();
// This is temporary until a proper screenspace solution is found ---abock
struct {
struct OnScreenInformation{
glm::vec2 _position;
unsigned int _size;
int _node;
} _onScreenInformation;
};
SyncData<OnScreenInformation> _onScreenInformation;
std::vector<Syncable*> getSyncables();
private:
void setRenderer(std::unique_ptr<Renderer> renderer);