diff --git a/data b/data index 78d9d66bd0..aeea2eed41 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 78d9d66bd028c750e7fa9c8cd7b016519ed51f63 +Subproject commit aeea2eed41c80134548ec2fb1b79cfa363a7f924 diff --git a/ext/ghoul b/ext/ghoul index c8d2a2df4a..b69d211bf0 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit c8d2a2df4aa62c929fa0dcc648c930956741add4 +Subproject commit b69d211bf0fc84129d086855593f9acc39735262 diff --git a/ext/spice/lib/msvc12/cspice.lib b/ext/spice/lib/msvc12/cspice.lib deleted file mode 100644 index 131259ddec..0000000000 Binary files a/ext/spice/lib/msvc12/cspice.lib and /dev/null differ diff --git a/ext/spice/lib/msvc14/cspice.lib b/ext/spice/lib/msvc14/cspice.lib new file mode 100644 index 0000000000..8df789d443 Binary files /dev/null and b/ext/spice/lib/msvc14/cspice.lib differ diff --git a/include/openspace/abuffer/abuffer.h b/include/openspace/abuffer/abuffer.h index 0baef3ab5e..aacba5186b 100644 --- a/include/openspace/abuffer/abuffer.h +++ b/include/openspace/abuffer/abuffer.h @@ -28,6 +28,7 @@ #include #include +#include #include #include diff --git a/modules/base/rendering/renderabletrail.cpp b/modules/base/rendering/renderabletrail.cpp index e2871f8b6b..3fac3615eb 100644 --- a/modules/base/rendering/renderabletrail.cpp +++ b/modules/base/rendering/renderabletrail.cpp @@ -299,7 +299,7 @@ void RenderableTrail::fullYearSweep(double time) { catch (const SpiceManager::SpiceException& e) { // This fires for PLUTO BARYCENTER and SUN and uses the only value sometimes? // ---abock -// LERROR(e.what()); + LERROR(e.what()); } psc pscPos = PowerScaledCoordinate::CreatePowerScaledCoordinate(p.x, p.y, p.z); diff --git a/modules/fieldlines/rendering/renderablefieldlines.cpp b/modules/fieldlines/rendering/renderablefieldlines.cpp index 788caf06d2..76b18d889a 100644 --- a/modules/fieldlines/rendering/renderablefieldlines.cpp +++ b/modules/fieldlines/rendering/renderablefieldlines.cpp @@ -202,9 +202,9 @@ bool RenderableFieldlines::initialize() { _program = ghoul::opengl::ProgramObject::Build( "Fieldline", - "${SHADERS}/modules/fieldlines/fieldline_vs.glsl", - "${SHADERS}/modules/fieldlines/fieldline_fs.glsl", - "${SHADERS}/modules/fieldlines/fieldline_gs.glsl" + "${MODULE_FIELDLINES}/shaders/fieldline_vs.glsl", + "${MODULE_FIELDLINES}/shaders/fieldline_fs.glsl", + "${MODULE_FIELDLINES}/shaders/fieldline_gs.glsl" ); if (!_program) return false; diff --git a/modules/kameleon/ext/kameleon b/modules/kameleon/ext/kameleon index 95eee93aab..f9ba0caae4 160000 --- a/modules/kameleon/ext/kameleon +++ b/modules/kameleon/ext/kameleon @@ -1 +1 @@ -Subproject commit 95eee93aabf35465adfafe234296df43080fe5df +Subproject commit f9ba0caae41dc13a752c71a2e873c02bb0dce7c3 diff --git a/src/engine/moduleengine.cpp b/src/engine/moduleengine.cpp index d85d6c55b2..f94e638c57 100644 --- a/src/engine/moduleengine.cpp +++ b/src/engine/moduleengine.cpp @@ -40,7 +40,6 @@ namespace openspace { void ModuleEngine::initialize() { for (OpenSpaceModule* m : AllModules) registerModule(std::unique_ptr(m)); - return true; } void ModuleEngine::deinitialize() { diff --git a/src/engine/openspaceengine.cpp b/src/engine/openspaceengine.cpp index 34d29b9069..c2720cb26d 100644 --- a/src/engine/openspaceengine.cpp +++ b/src/engine/openspaceengine.cpp @@ -576,7 +576,12 @@ bool OpenSpaceEngine::initializeGL() { LINFO("Initializing Rendering Engine"); bool success = _renderEngine->initializeGL(); LINFO("Initializing OnScreen GUI GL"); - _gui->initializeGL(); + try { + _gui->initializeGL(); + } + catch (const ghoul::RuntimeError& e) { + LERROR(e.what()); + } LINFO("Finished initializing OpenGL"); return success; } diff --git a/src/rendering/renderengine.cpp b/src/rendering/renderengine.cpp index 0919eba208..e38fcc20c1 100644 --- a/src/rendering/renderengine.cpp +++ b/src/rendering/renderengine.cpp @@ -62,6 +62,7 @@ #include #endif // GHOUL_USE_FREEIMAGE #include +#include #include #include @@ -148,7 +149,7 @@ bool RenderEngine::initialize() { // The default rendering method has a requirement of OpenGL 4.3, so if we are // below that, we will fall back to frame buffer operation - if (OpenGLCap.openGLVersion() < Version{4,3}) { + if (OpenGLCap.openGLVersion() < Version{4,3,0}) { LINFO("Falling back to framebuffer implementation due to OpenGL limitations"); renderingMethod = "ABufferFrameBuffer"; } @@ -208,13 +209,18 @@ bool RenderEngine::initializeGL() { OsEng.windowWrapper().setNearFarClippingPlane(0.001f, 1000.f); - const float fontSizeTime = 15.f; - _fontDate = OsEng.fontManager().font(KeyFontMono, fontSizeTime); - const float fontSizeMono = 10.f; - _fontInfo = OsEng.fontManager().font(KeyFontMono, fontSizeMono); - const float fontSizeLight = 8.f; - _fontLog = OsEng.fontManager().font(KeyFontLight, fontSizeLight); - + try { + const float fontSizeTime = 15.f; + _fontDate = OsEng.fontManager().font(KeyFontMono, fontSizeTime); + const float fontSizeMono = 10.f; + _fontInfo = OsEng.fontManager().font(KeyFontMono, fontSizeMono); + const float fontSizeLight = 8.f; + _fontLog = OsEng.fontManager().font(KeyFontLight, fontSizeLight); + } + catch (const ghoul::fontrendering::Font::FreeTypeException& e) { + LERROR(e.what()); + throw; + } @@ -292,7 +298,12 @@ bool RenderEngine::initializeGL() { //} LINFO("Initializing ABuffer"); - _abuffer->initialize(); + try { + _abuffer->initialize(); + } + catch (const ghoul::RuntimeError& e) { + LERROR(e.what()); + } LINFO("Initializing Log"); std::unique_ptr log = std::make_unique(ScreenLogTimeToLive); @@ -628,7 +639,7 @@ void RenderEngine::render(const glm::mat4 &projectionMatrix, const glm::mat4 &vi } #endif } - if (_showScreenLog) { + if (_showScreenLog && _fontLog) { _log->removeExpiredEntries(); const int max = 10; diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index 52ba2e4b7a..a3099ebfad 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -38,13 +38,14 @@ #include #include -#include "ghoul/io/texture/texturereader.h" +#include #include -#include "ghoul/logging/logmanager.h" +#include +#include #include #include -#include "ghoul/opengl/programobject.h" -#include "ghoul/opengl/texture.h" +#include +#include #include #include @@ -140,10 +141,14 @@ bool Scene::deinitialize() { void Scene::update(const UpdateData& data) { if (!_sceneGraphToLoad.empty()) { OsEng.renderEngine().scene()->clearSceneGraph(); - bool success = loadSceneInternal(_sceneGraphToLoad); - _sceneGraphToLoad = ""; - if (!success) - return; + try { + bool success = loadSceneInternal(_sceneGraphToLoad); + _sceneGraphToLoad = ""; + } + catch (const ghoul::RuntimeError& e) { + LERROR(e.what()); + return; + } OsEng.renderEngine().aBuffer()->invalidateABuffer(); } for (SceneGraphNode* node : _graph.nodes()) @@ -235,11 +240,16 @@ bool Scene::loadSceneInternal(const std::string& sceneDescriptionFilePath) { // Initialize all nodes for (SceneGraphNode* node : _graph.nodes()) { - bool success = node->initialize(); - if (success) - LDEBUG(node->name() << " initialized successfully!"); - else - LWARNING(node->name() << " not initialized."); + try { + bool success = node->initialize(); + if (success) + LDEBUG(node->name() << " initialized successfully!"); + else + LWARNING(node->name() << " not initialized."); + } + catch (const ghoul::RuntimeError& e) { + LERRORC(_loggerCat + "(" + e.component + ")", e.what()); + } } // update the position of all nodes @@ -309,17 +319,21 @@ bool Scene::loadSceneInternal(const std::string& sceneDescriptionFilePath) { OsEng.interactionHandler().setFocusNode(_graph.rootNode()); glm::vec4 position; - if (cameraDictionary.hasKey(KeyPositionObject) - && cameraDictionary.getValue(KeyPositionObject, position)) { + if (cameraDictionary.hasKeyAndValue(KeyPositionObject)) { + try { + position = cameraDictionary.value(KeyPositionObject); - LDEBUG("Camera position is (" - << position[0] << ", " - << position[1] << ", " - << position[2] << ", " - << position[3] << ")"); + LDEBUG("Camera position is (" + << position[0] << ", " + << position[1] << ", " + << position[2] << ", " + << position[3] << ")"); - cameraPosition = psc(position); - //c->setPosition(position); + cameraPosition = psc(position); + } + catch (const ghoul::Dictionary::DictionaryError& e) { + LERROR("Error loading Camera location: " << e.what()); + } } // the camera position diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index f5f7586e7a..3bf127b73f 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -333,7 +333,7 @@ int SpiceManager::naifId(const string& body) const { ghoul_assert(!body.empty(), "Empty body"); SpiceBoolean success; - int id; + SpiceInt id; bods2c_c(body.c_str(), &id, &success); if (!success) throw SpiceException(format("Could not find NAIF ID of body '{}'", body)); @@ -344,7 +344,7 @@ bool SpiceManager::hasNaifId(const string& body) const { ghoul_assert(!body.empty(), "Empty body"); SpiceBoolean success; - int id; + SpiceInt id; bods2c_c(body.c_str(), &id, &success); reset_c(); return success; @@ -353,7 +353,7 @@ bool SpiceManager::hasNaifId(const string& body) const { int SpiceManager::frameId(const string& frame) const { ghoul_assert(!frame.empty(), "Empty frame"); - int id; + SpiceInt id; namfrm_c(frame.c_str(), &id); if (id == 0) throw SpiceException(format("Could not find NAIF ID of frame '{}'", frame)); @@ -363,7 +363,7 @@ int SpiceManager::frameId(const string& frame) const { bool SpiceManager::hasFrameId(const string& frame) const { ghoul_assert(!frame.empty(), "Empty frame"); - int id; + SpiceInt id; namfrm_c(frame.c_str(), &id); return id != 0; } diff --git a/tests/main.cpp b/tests/main.cpp index fcc276adc3..49486c529c 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #include #include @@ -54,7 +53,7 @@ namespace { int main(int argc, char** argv) { std::vector args; - openspace::OpenSpaceEngine::create(argc, argv, new openspace::DummyWindowWrapper, args); + openspace::OpenSpaceEngine::create(argc, argv, std::make_unique(), args); testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS();