diff --git a/.gitignore b/.gitignore index 7a0cc5fa00..aca64bfb7d 100644 --- a/.gitignore +++ b/.gitignore @@ -27,8 +27,5 @@ html/ latex/ shaders/ABuffer/constants.hglsl *.OpenSpaceGenerated.glsl -shaders/writeToTexture_fs.glsl -shaders/writeToTexture_vs.glsl -src/rendering/planets/writeToTexture.cpp LuaScripting.txt - +log.html diff --git a/CMakeLists.txt b/CMakeLists.txt index bf554d97e8..7f8dc30076 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ ######################################################################################### # General Settings ######################################################################################### - + cmake_minimum_required (VERSION 2.8) project (OpenSpace) @@ -46,7 +46,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OPENSPACE_LIBRARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OPENSPACE_BINARY_DIR}) -#include(cotire) +include(cotire) # Make sure a build type is set. Default is Debug. if(NOT CMAKE_BUILD_TYPE) diff --git a/config/sgct/single.xml b/config/sgct/single.xml index 9609397b43..6ae96d20cf 100644 --- a/config/sgct/single.xml +++ b/config/sgct/single.xml @@ -15,7 +15,7 @@ - + diff --git a/include/openspace/abuffer/abufferSingleLinked.h b/include/openspace/abuffer/abufferSingleLinked.h index 248b856a6a..ab171c3c4f 100644 --- a/include/openspace/abuffer/abufferSingleLinked.h +++ b/include/openspace/abuffer/abufferSingleLinked.h @@ -47,17 +47,11 @@ protected: virtual bool reinitializeInternal(); private: - - GLuint *_data; GLuint _anchorPointerTexture; GLuint _anchorPointerTextureInitializer; GLuint _atomicCounterBuffer; GLuint _fragmentBuffer; GLuint _fragmentTexture; - - - - }; // ABufferSingleLinked } // openspace diff --git a/include/openspace/engine/gui.h b/include/openspace/engine/gui.h index 4ee66e318d..36363c42a3 100644 --- a/include/openspace/engine/gui.h +++ b/include/openspace/engine/gui.h @@ -93,6 +93,7 @@ private: std::set _vec3Properties; std::set _stringProperties; std::set _optionProperty; + std::set _selectionProperty; std::set _triggerProperty; std::map> _propertiesByOwner; diff --git a/include/openspace/engine/openspaceengine.h b/include/openspace/engine/openspaceengine.h index 1bdfbaf05c..a0b38eb422 100644 --- a/include/openspace/engine/openspaceengine.h +++ b/include/openspace/engine/openspaceengine.h @@ -80,7 +80,7 @@ public: private: OpenSpaceEngine(std::string programName); - ~OpenSpaceEngine() = default; + ~OpenSpaceEngine(); void clearAllWindows(); bool gatherCommandlineArguments(); diff --git a/include/openspace/properties/property.h b/include/openspace/properties/property.h index 46828d13df..f14ab44e2e 100644 --- a/include/openspace/properties/property.h +++ b/include/openspace/properties/property.h @@ -200,6 +200,20 @@ public: */ std::string guiName() const; + /** + * Returns the description for this Property that contains all necessary information + * required for creating a GUI representation. The format of the description is a + * valid Lua table, i.e., it is surrounded by a pair of { and + * } with key,value pairs between. Each value can either be a number, a + * string, a bool, or another table. The general values set by this base function + * are: Identifier, Name, Type. All other + * values are specific to the type and are added in a specific subclass, which require + * the subclass to call this method first. + * \return The descriptive text for the Property that can be used for constructing a + * GUI representation + */ + virtual std::string description() const; + /** * Sets the identifier of the group that this Property belongs to. Property groups can * be used, for example, by GUI application to visually group different properties, @@ -274,6 +288,43 @@ public: const ghoul::Dictionary& metaData() const; protected: + static const std::string IdentifierKey; + static const std::string NameKey; + static const std::string TypeKey; + static const std::string MetaDataKey; + + /** + * Creates the information that is general to every Property and adds the + * Identifier, Name, Type, and + * MetaData keys and their values. The meta data is handles by the + * generateMetaDataDescription method, which has to be overloaded if a concrete base + * class wants to add meta data that is not curated by the Property class + * \return The base description common to all Property classes + */ + std::string generateBaseDescription() const; + + /** + * Creates the information for the MetaData key-part of the Lua + * description for the Property. The result can be included as one key-value pair in + * the description text generated by subclasses. Only the metadata curated by the + * Property class is used in this method. + * \return The metadata information text for the property + */ + virtual std::string generateMetaDataDescription() const; + + /** + * Creates the information that is specific to each subclass of Property%s. If a + * subclass needs to add additional information into the description, it has to + * override this method and return the string containing all of the additional + * information. The base implementation of the #description method will return the Lua + * script: + * return { generateBaseDescription(), generateMetaDataDescription(), + * generateAdditionalDescription()}, which #generateMetaDataDescription + * and this method being the override points to customize the behavior. + * \return The information specific to each subclass of Property + */ + virtual std::string generateAdditionalDescription() const; + /** * This method must be called by all subclasses whenever the encapsulated value has * changed and a potential listener has to be informed. diff --git a/include/openspace/properties/selectionproperty.h b/include/openspace/properties/selectionproperty.h index 59f2f6eb17..86b20298cb 100644 --- a/include/openspace/properties/selectionproperty.h +++ b/include/openspace/properties/selectionproperty.h @@ -46,7 +46,7 @@ public: void addOption(Option option); const std::vector