master merge + seed point files from directory fix

This commit is contained in:
ElonOlsson
2021-05-18 12:00:53 -04:00
164 changed files with 3123 additions and 3951 deletions

View File

@@ -27,6 +27,7 @@
#include <ghoul/lua/luastate.h>
#include <ghoul/misc/dictionary.h>
#include <filesystem>
#include <map>
#include <string>
#include <vector>
@@ -85,7 +86,7 @@ struct Configuration {
bool shouldUseScreenshotDate = false;
std::string onScreenTextScaling = "window";
bool usePerSceneCache = false;
bool usePerProfileCache = false;
bool isRenderingOnMasterDisabled = false;
glm::dvec3 globalRotation = glm::dvec3(0.0);
@@ -129,9 +130,9 @@ struct Configuration {
ghoul::lua::LuaState state;
};
std::string findConfiguration(const std::string& filename = "openspace.cfg");
std::filesystem::path findConfiguration(const std::string& filename = "openspace.cfg");
Configuration loadConfigurationFromFile(const std::string& filename,
Configuration loadConfigurationFromFile(const std::filesystem::path& filename,
const std::string& overrideScript);
} // namespace openspace::configuration

View File

@@ -26,6 +26,7 @@
#define __OPENSPACE_CORE___DOWNLOADMANAGER___H__
#include <ghoul/misc/boolean.h>
#include <filesystem>
#include <functional>
#include <future>
#include <memory>
@@ -99,7 +100,7 @@ public:
// finishedCallback - callback when download finished (happens on different thread)
// progressCallback - callback for status during (happens on different thread)
std::shared_ptr<FileFuture> downloadFile(const std::string& url,
const ghoul::filesystem::File& file,
const std::filesystem::path& file,
OverrideFile overrideFile = OverrideFile::Yes,
FailOnError failOnError = FailOnError::No, unsigned int timeout_secs = 0,
DownloadFinishedCallback finishedCallback = DownloadFinishedCallback(),

View File

@@ -29,11 +29,9 @@
#include <openspace/interaction/sessionrecording.h>
#include <ghoul/glm.h>
#include <filesystem>
#include <string>
namespace openspace::interaction {
class ConvertRecFileVersionTask : public Task {
@@ -48,7 +46,7 @@ public:
private:
std::string _inFilename;
std::string _inFilePath;
std::filesystem::path _inFilePath;
std::string _valueFunctionLua;
};

View File

@@ -29,7 +29,7 @@
#include <openspace/interaction/sessionrecording.h>
#include <ghoul/glm.h>
#include <filesystem>
#include <string>
namespace openspace::interaction {
@@ -52,8 +52,8 @@ private:
void convertToBinary();
void determineFormatType();
std::string addFileSuffix(const std::string& filePath, const std::string& suffix);
std::string _inFilePath;
std::string _outFilePath;
std::filesystem::path _inFilePath;
std::filesystem::path _outFilePath;
std::ifstream _iFile;
std::ofstream _oFile;
SessionRecording::DataMode _fileFormatType;

View File

@@ -34,6 +34,7 @@
#include <openspace/properties/vector/vec3property.h>
#include <openspace/properties/triggerproperty.h>
#include <chrono>
#include <filesystem>
namespace ghoul {
namespace fontrendering { class Font; }
@@ -109,12 +110,13 @@ public:
std::vector<ScreenSpaceRenderable*> screenSpaceRenderables() const;
std::unique_ptr<ghoul::opengl::ProgramObject> buildRenderProgram(
const std::string& name, const std::string& vsPath, std::string fsPath,
ghoul::Dictionary data = ghoul::Dictionary());
const std::string& name, const std::filesystem::path& vsPath,
std::filesystem::path fsPath, ghoul::Dictionary data = ghoul::Dictionary());
std::unique_ptr<ghoul::opengl::ProgramObject> buildRenderProgram(
const std::string& name, const std::string& vsPath, std::string fsPath,
const std::string& csPath, ghoul::Dictionary data = ghoul::Dictionary());
const std::string& name, const std::filesystem::path& vsPath,
std::filesystem::path fsPath, const std::filesystem::path& csPath,
ghoul::Dictionary data = ghoul::Dictionary());
void removeRenderProgram(ghoul::opengl::ProgramObject* program);

View File

@@ -104,11 +104,12 @@ protected:
properties::Vec3Property _localRotation;
properties::FloatProperty _scale;
properties::Vec3Property _multiplyColor;
properties::FloatProperty _opacity;
properties::TriggerProperty _delete;
glm::ivec2 _objectSize = glm::ivec2(0);
UniformCache(alpha, modelTransform, viewProj, texture) _uniformCache;
UniformCache(color, alpha, modelTransform, viewProj, texture) _uniformCache;
std::unique_ptr<ghoul::opengl::ProgramObject> _shader;
};

View File

@@ -26,6 +26,7 @@
#define __OPENSPACE_CORE___TEXTURECOMPONENT___H__
#include <ghoul/opengl/texture.h>
#include <filesystem>
namespace ghoul::filesystem { class File; }
namespace ghoul::opengl {class Texture; }
@@ -48,7 +49,7 @@ public:
void uploadToGpu();
// Loads a texture from a file on disk
void loadFromFile(const std::string& path);
void loadFromFile(const std::filesystem::path& path);
// Function to call in a renderable's update function to make sure
// the texture is kept up to date

View File

@@ -26,6 +26,7 @@
#define __OPENSPACE_CORE___TRANSFERFUNCTION___H__
#include <ghoul/glm.h>
#include <filesystem>
#include <functional>
#include <memory>
#include <string>
@@ -58,7 +59,7 @@ private:
void setTextureFromImage();
void uploadTexture();
std::string _filepath;
std::filesystem::path _filepath;
std::unique_ptr<ghoul::filesystem::File> _file;
std::shared_ptr<ghoul::opengl::Texture> _texture;
bool _needsUpdate = false;

View File

@@ -26,6 +26,7 @@
#define __OPENSPACE_CORE___ASSETLOADER___H__
#include <openspace/scene/asset.h>
#include <filesystem>
#include <map>
#include <memory>
#include <string>
@@ -169,7 +170,7 @@ private:
void tearDownAssetLuaTable(Asset* asset);
std::shared_ptr<Asset> getAsset(const std::string& name);
ghoul::filesystem::Directory currentDirectory() const;
std::filesystem::path currentDirectory() const;
void setCurrentAsset(Asset* asset);
void addLuaDependencyTable(Asset* dependant, Asset* dependency);

View File

@@ -26,6 +26,7 @@
#define __OPENSPACE_CORE___LUALIBRARY___H__
#include <ghoul/lua/ghoul_lua.h>
#include <filesystem>
#include <string>
#include <vector>
@@ -58,7 +59,7 @@ struct LuaLibrary {
/// The list of all C-based callback functions for this library
std::vector<Function> functions;
/// A list of script files that are executed for each Lua state
std::vector<std::string> scripts = std::vector<std::string>();
std::vector<std::filesystem::path> scripts = std::vector<std::filesystem::path>();
/// This struct contains information about a function or constant that is defined in
/// a Lua script