mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-01 09:08:49 -06:00
Fix compilation issues and bugs on windows
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
|
||||
#include <openspace/scripting/scriptengine.h>
|
||||
#include <openspace/rendering/renderable.h>
|
||||
#include <openspace/rendering/dashboarditem.h>
|
||||
#include <openspace/util/progressbar.h>
|
||||
#include <openspace/engine/openspaceengine.h>
|
||||
#include <openspace/engine/configurationmanager.h>
|
||||
@@ -150,6 +151,10 @@ int main(int argc, char** argv) {
|
||||
std::make_unique<ghoul::TemplateFactory<ResourceSynchronization>>(),
|
||||
"ResourceSynchronization"
|
||||
);
|
||||
FactoryManager::ref().addFactory(
|
||||
std::make_unique<ghoul::TemplateFactory<DashboardItem>>(),
|
||||
"DashboardItem"
|
||||
);
|
||||
|
||||
|
||||
openspace::ConfigurationManager configuration;
|
||||
@@ -181,7 +186,7 @@ int main(int argc, char** argv) {
|
||||
std::string tasksPath = "";
|
||||
commandlineParser.addCommand(
|
||||
std::make_unique<ghoul::cmdparser::SingleCommand<std::string>>(
|
||||
&tasksPath,
|
||||
tasksPath,
|
||||
"--task",
|
||||
"-t",
|
||||
"Provides the path to a task file to execute"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <ghoul/glm.h>
|
||||
#include <ghoul/misc/boolean.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <openspace/scene/scenegraphnode.h>
|
||||
|
||||
#include <ghoul/misc/threadpool.h>
|
||||
#include <openspace/util/threadpool.h>
|
||||
|
||||
#include <mutex>
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
std::vector<SceneGraphNode*> getInitializedNodes() override;
|
||||
private:
|
||||
std::vector<SceneGraphNode*> _initializedNodes;
|
||||
ghoul::ThreadPool _threadPool;
|
||||
ThreadPool _threadPool;
|
||||
std::mutex _mutex;
|
||||
|
||||
};
|
||||
|
||||
@@ -47,7 +47,7 @@ MultiThreadedSceneInitializer::MultiThreadedSceneInitializer(unsigned int nThrea
|
||||
{}
|
||||
|
||||
void MultiThreadedSceneInitializer::initializeNode(SceneGraphNode* node) {
|
||||
auto initFunction = [this](SceneGraphNode* node) {
|
||||
auto initFunction = [this, node]() {
|
||||
node->initialize();
|
||||
std::lock_guard<std::mutex> g(_mutex);
|
||||
LDEBUG("Thread Initialized " << node->name());
|
||||
@@ -55,7 +55,7 @@ void MultiThreadedSceneInitializer::initializeNode(SceneGraphNode* node) {
|
||||
};
|
||||
|
||||
std::lock_guard<std::mutex> g(_mutex);
|
||||
_threadPool.queue(initFunction, node);
|
||||
_threadPool.enqueue(initFunction);
|
||||
node->initialize();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user