mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 03:00:58 -06:00
Use SyncEngine for synchronizing all synced state in RenderEngine
This commit is contained in:
@@ -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:
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user