mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-04 10:40:09 -06:00
Merge branch 'develop' of github.com:OpenSpace/OpenSpace into pr/kameleonvolume
Conflicts: src/engine/openspaceengine.cpp
This commit is contained in:
@@ -28,12 +28,16 @@
|
||||
#include <memory>
|
||||
|
||||
namespace ghoul {
|
||||
|
||||
class Dictionary;
|
||||
namespace logging { class Log; }
|
||||
}
|
||||
|
||||
} // namespace ghoul
|
||||
|
||||
namespace openspace {
|
||||
|
||||
namespace documentation { struct Documentation; }
|
||||
|
||||
/**
|
||||
* This function provides the capabilities to create a new ghoul::logging::Log from the
|
||||
* provided ghoul::Dictionary%. The Dictionary must at least contain a <code>Type</code>
|
||||
@@ -44,15 +48,24 @@ namespace openspace {
|
||||
* created . Both logs can be customized using the <code>Append</code>,
|
||||
* <code>TimeStamping</code>, <code>DateStamping</code>, <code>CategoryStamping</code>,
|
||||
* and <code>LogLevelStamping</code> values.
|
||||
* \param dictionary The dictionary from which the ghoul::logging::Log should be created
|
||||
*
|
||||
* \param dictionary The dictionary from which the ghoul::logging::Log should be created
|
||||
* \return The created ghoul::logging::Log
|
||||
* \post The return value will not be <code>nullptr</code>
|
||||
* \throw ghoul::RuntimeError If there was an error creating the ghoul::logging::Log
|
||||
* \sa ghoul::logging::TextLeg
|
||||
* \sa ghoul::logging::HTMLLog
|
||||
* \post The return value will not be <code>nullptr</code>
|
||||
* \throw ghoul::RuntimeError If there was an error creating the ghoul::logging::Log
|
||||
* \sa ghoul::logging::TextLog
|
||||
* \sa ghoul::logging::HTMLLog
|
||||
*/
|
||||
std::unique_ptr<ghoul::logging::Log> createLog(const ghoul::Dictionary& dictionary);
|
||||
|
||||
/**
|
||||
* Returns the Documentation that describes a Dictionary used to create a log by using the
|
||||
* function createLog.
|
||||
* \return The Documentation that describes an acceptable Dictionary for the method
|
||||
* createLog
|
||||
*/
|
||||
documentation::Documentation LogFactoryDocumentation();
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
#endif // __OPENSPACE_CORE___LOGFACTORY___H__
|
||||
|
||||
@@ -25,14 +25,23 @@
|
||||
#ifndef __OPENSPACE_CORE___MODULEENGINE___H__
|
||||
#define __OPENSPACE_CORE___MODULEENGINE___H__
|
||||
|
||||
#include <openspace/util/openspacemodule.h>
|
||||
#include <openspace/scripting/scriptengine.h>
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace ghoul {
|
||||
namespace systemcapabilities {
|
||||
|
||||
struct Version;
|
||||
|
||||
} // namespace systemcapabilities
|
||||
} // namespace ghoul
|
||||
|
||||
namespace openspace {
|
||||
|
||||
namespace scripting { struct LuaLibrary; }
|
||||
|
||||
class OpenSpaceModule;
|
||||
|
||||
/**
|
||||
* The ModuleEngine is the central repository for registering and accessing
|
||||
* OpenSpaceModule for the current application run. By initializing (#initialize) the
|
||||
@@ -80,8 +89,7 @@ public:
|
||||
* version of all registered modules' OpenGL versions.
|
||||
* \return The combined minimum OpenGL version
|
||||
*/
|
||||
ghoul::systemcapabilities::OpenGLCapabilitiesComponent::Version
|
||||
requiredOpenGLVersion() const;
|
||||
ghoul::systemcapabilities::Version requiredOpenGLVersion() const;
|
||||
|
||||
/**
|
||||
* Returns the Lua library that contains all Lua functions available to affect the
|
||||
|
||||
@@ -43,26 +43,19 @@ public:
|
||||
|
||||
void initialize();
|
||||
|
||||
void setModules(std::vector<OpenSpaceModule*> modules);
|
||||
void setModules(const std::vector<OpenSpaceModule*>& modules);
|
||||
|
||||
bool busyWaitForDecode();
|
||||
bool logSGCTOutOfOrderErrors();
|
||||
bool useDoubleBuffering();
|
||||
|
||||
private:
|
||||
void initEyeSeparation();
|
||||
void initSceneFiles();
|
||||
void initBusyWaitForDecode();
|
||||
void initLogSGCTOutOfOrderErrors();
|
||||
void initUseDoubleBuffering();
|
||||
|
||||
properties::FloatProperty _eyeSeparation;
|
||||
properties::OptionProperty _scenes;
|
||||
properties::BoolProperty _busyWaitForDecode;
|
||||
properties::BoolProperty _logSGCTOutOfOrderErrors;
|
||||
properties::BoolProperty _useDoubleBuffering;
|
||||
properties::BoolProperty _spiceUseExceptions;
|
||||
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -25,80 +25,82 @@
|
||||
#ifndef __OPENSPACE_CORE___SYNCENGINE___H__
|
||||
#define __OPENSPACE_CORE___SYNCENGINE___H__
|
||||
|
||||
#include <openspace/util/syncbuffer.h>
|
||||
|
||||
#include <ghoul/misc/boolean.h>
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
namespace openspace {
|
||||
|
||||
class Syncable;
|
||||
class SyncBuffer;
|
||||
|
||||
/**
|
||||
* Manages a collection of <code>Syncable</code>s and ensures they are synchronized
|
||||
* over SGCT nodes. Encoding/Decoding order is handles internally.
|
||||
*/
|
||||
* Manages a collection of <code>Syncable</code>s and ensures they are synchronized
|
||||
* over SGCT nodes. Encoding/Decoding order is handles internally.
|
||||
*/
|
||||
class SyncEngine {
|
||||
public:
|
||||
using IsMaster = ghoul::Boolean;
|
||||
|
||||
/**
|
||||
* Dependency injection: a SyncEngine relies on a SyncBuffer to encode the sync data.
|
||||
*/
|
||||
SyncEngine(SyncBuffer* syncBuffer);
|
||||
|
||||
* Creates a new SyncEngine which a buffer size of \p syncBufferSize
|
||||
* \pre syncBufferSize must be bigger than 0
|
||||
*/
|
||||
SyncEngine(unsigned int syncBufferSize);
|
||||
|
||||
/**
|
||||
* Encodes all added Syncables in the injected <code>SyncBuffer</code>.
|
||||
* This method is only called on the SGCT master node
|
||||
*/
|
||||
* Encodes all added Syncables in the injected <code>SyncBuffer</code>.
|
||||
* This method is only called on the SGCT master node
|
||||
*/
|
||||
void encodeSyncables();
|
||||
|
||||
/**
|
||||
* Decodes the <code>SyncBuffer</code> into the added Syncables.
|
||||
* This method is only called on the SGCT slave nodes
|
||||
*/
|
||||
* Decodes the <code>SyncBuffer</code> into the added Syncables.
|
||||
* This method is only called on the SGCT slave nodes
|
||||
*/
|
||||
void decodeSyncables();
|
||||
|
||||
/**
|
||||
* Invokes the presync method of all added Syncables
|
||||
*/
|
||||
void presync(bool isMaster);
|
||||
* Invokes the presync method of all added Syncables
|
||||
*/
|
||||
void preSynchronization(IsMaster isMaster);
|
||||
|
||||
/**
|
||||
* Invokes the postsync method of all added Syncables
|
||||
*/
|
||||
void postsync(bool isMaster);
|
||||
* Invokes the postsync method of all added Syncables
|
||||
*/
|
||||
void postSynchronization(IsMaster isMaster);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Add a Syncable to be synchronized over the SGCT cluster
|
||||
*/
|
||||
* Add a Syncable to be synchronized over the SGCT cluster.
|
||||
* \pre syncable must not be nullptr
|
||||
*/
|
||||
void addSyncable(Syncable* syncable);
|
||||
|
||||
/**
|
||||
* Add multiple Syncables to be synchronized over the SGCT cluster
|
||||
*/
|
||||
* Add multiple Syncables to be synchronized over the SGCT cluster
|
||||
* \pre syncables must not contain any nullptr
|
||||
*/
|
||||
void addSyncables(const std::vector<Syncable*>& syncables);
|
||||
|
||||
/**
|
||||
* Remove a Syncable from being synchronized over the SGCT cluster
|
||||
*/
|
||||
* Remove a Syncable from being synchronized over the SGCT cluster
|
||||
*/
|
||||
void removeSyncable(Syncable* syncable);
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Vector of Syncables. The vectors ensures consistent encode/decode order
|
||||
*/
|
||||
* Vector of Syncables. The vectors ensures consistent encode/decode order
|
||||
*/
|
||||
std::vector<Syncable*> _syncables;
|
||||
|
||||
/**
|
||||
* Databuffer used in encoding/decoding
|
||||
*/
|
||||
std::unique_ptr<SyncBuffer> _syncBuffer;
|
||||
* Databuffer used in encoding/decoding
|
||||
*/
|
||||
SyncBuffer _syncBuffer;
|
||||
};
|
||||
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
#endif // __OPENSPACE_CORE___SYNCENGINE___H__
|
||||
|
||||
Reference in New Issue
Block a user