mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-03 18:19:38 -06:00
Fixes for Windows
Fixing shader paths for fieldlines rendering Update Kameleon to work with MSVC 2015 fix
This commit is contained in:
2
data
2
data
Submodule data updated: 78d9d66bd0...aeea2eed41
Submodule ext/ghoul updated: c8d2a2df4a...b69d211bf0
Binary file not shown.
BIN
ext/spice/lib/msvc14/cspice.lib
Normal file
BIN
ext/spice/lib/msvc14/cspice.lib
Normal file
Binary file not shown.
@@ -28,6 +28,7 @@
|
||||
#include <ghoul/opengl/ghoul_gl.h>
|
||||
#include <ghoul/glm.h>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Submodule modules/kameleon/ext/kameleon updated: 95eee93aab...f9ba0caae4
@@ -40,7 +40,6 @@ namespace openspace {
|
||||
void ModuleEngine::initialize() {
|
||||
for (OpenSpaceModule* m : AllModules)
|
||||
registerModule(std::unique_ptr<OpenSpaceModule>(m));
|
||||
return true;
|
||||
}
|
||||
|
||||
void ModuleEngine::deinitialize() {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
#include <ghoul/io/texture/texturereaderfreeimage.h>
|
||||
#endif // GHOUL_USE_FREEIMAGE
|
||||
#include <ghoul/io/texture/texturereadercmap.h>
|
||||
#include <ghoul/misc/exception.h>
|
||||
|
||||
#include <array>
|
||||
#include <fstream>
|
||||
@@ -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<ScreenLog> log = std::make_unique<ScreenLog>(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;
|
||||
|
||||
@@ -38,13 +38,14 @@
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include <ghoul/filesystem/filesystem.h>
|
||||
#include "ghoul/io/texture/texturereader.h"
|
||||
#include <ghoul/io/texture/texturereader.h>
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
#include "ghoul/logging/logmanager.h"
|
||||
#include <ghoul/misc/exception.h>
|
||||
#include <ghoul/logging/logmanager.h>
|
||||
#include <ghoul/lua/ghoul_lua.h>
|
||||
#include <ghoul/lua/lua_helper.h>
|
||||
#include "ghoul/opengl/programobject.h"
|
||||
#include "ghoul/opengl/texture.h"
|
||||
#include <ghoul/opengl/programobject.h>
|
||||
#include <ghoul/opengl/texture.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
@@ -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<glm::vec4>(KeyPositionObject)) {
|
||||
try {
|
||||
position = cameraDictionary.value<glm::vec4>(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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include <openspace/engine/openspaceengine.h>
|
||||
#include <openspace/engine/wrapper/dummywindowwrapper.h>
|
||||
#include <openspace/engine/configurationmanager.h>
|
||||
#include <openspace/util/constants.h>
|
||||
#include <openspace/util/factorymanager.h>
|
||||
#include <openspace/util/time.h>
|
||||
|
||||
@@ -54,7 +53,7 @@ namespace {
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
std::vector<std::string> args;
|
||||
openspace::OpenSpaceEngine::create(argc, argv, new openspace::DummyWindowWrapper, args);
|
||||
openspace::OpenSpaceEngine::create(argc, argv, std::make_unique<openspace::DummyWindowWrapper>(), args);
|
||||
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
|
||||
Reference in New Issue
Block a user