diff --git a/include/openspace/engine/downloadmanager.h b/include/openspace/engine/downloadmanager.h index 91e7eb6603..7b35ea282d 100644 --- a/include/openspace/engine/downloadmanager.h +++ b/include/openspace/engine/downloadmanager.h @@ -55,7 +55,7 @@ public: bool isAborted; std::string filePath; std::string errorMessage; - std::string extension; + std::string format; // Values set by others to be consumed by the DownloadManager bool abortDownload; }; diff --git a/modules/iswa/CMakeLists.txt b/modules/iswa/CMakeLists.txt index 019485ab6e..cfae47476c 100644 --- a/modules/iswa/CMakeLists.txt +++ b/modules/iswa/CMakeLists.txt @@ -30,6 +30,7 @@ set(HEADER_FILES ${CMAKE_CURRENT_SOURCE_DIR}/rendering/iswacygnet.h ${CMAKE_CURRENT_SOURCE_DIR}/rendering/dataplane.h ${CMAKE_CURRENT_SOURCE_DIR}/rendering/textureplane.h + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/kameleonplane.h ${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspacecygnet.h ${CMAKE_CURRENT_SOURCE_DIR}/rendering/colorbar.h ${CMAKE_CURRENT_SOURCE_DIR}/util/iswamanager.h @@ -42,6 +43,7 @@ set(SOURCE_FILES ${CMAKE_CURRENT_SOURCE_DIR}/rendering/cygnetplane.cpp ${CMAKE_CURRENT_SOURCE_DIR}/rendering/dataplane.cpp ${CMAKE_CURRENT_SOURCE_DIR}/rendering/textureplane.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/rendering/kameleonplane.cpp ${CMAKE_CURRENT_SOURCE_DIR}/rendering/screenspacecygnet.cpp ${CMAKE_CURRENT_SOURCE_DIR}/rendering/colorbar.cpp ${CMAKE_CURRENT_SOURCE_DIR}/util/iswamanager.cpp diff --git a/modules/iswa/iswamodule.cpp b/modules/iswa/iswamodule.cpp index e96eca0a76..861c58be89 100644 --- a/modules/iswa/iswamodule.cpp +++ b/modules/iswa/iswamodule.cpp @@ -32,6 +32,7 @@ #include #include #include +#include namespace openspace { @@ -46,5 +47,6 @@ namespace openspace { fRenderable->registerClass("ISWAContainer"); fRenderable->registerClass("TexturePlane"); fRenderable->registerClass("DataPlane"); + fRenderable->registerClass("KameleonPlane"); } } \ No newline at end of file diff --git a/modules/iswa/rendering/cygnetplane.cpp b/modules/iswa/rendering/cygnetplane.cpp index 0aabf004cc..69667f51e8 100644 --- a/modules/iswa/rendering/cygnetplane.cpp +++ b/modules/iswa/rendering/cygnetplane.cpp @@ -80,7 +80,7 @@ void CygnetPlane::render(const RenderData& data){ transform = rotation * transform; } - position += transform*glm::vec4(_data->spatialScale.x*_data->offset, _data->spatialScale.y); + position += transform*glm::vec4(_data->spatialScale.x*_data->offset, _data->spatialScale.w); // Activate shader @@ -129,7 +129,7 @@ void CygnetPlane::update(const UpdateData& data){ bool timeToUpdate = (fabs(_openSpaceTime-_lastUpdateOpenSpaceTime) >= _data->updateTime && - (_realTime.count()-_lastUpdateRealTime.count()) > _minRealTimeUpdateInterval)); + (_realTime.count()-_lastUpdateRealTime.count()) > _minRealTimeUpdateInterval); if( Time::ref().timeJumped() || timeToUpdate ){ updateTexture(); @@ -155,7 +155,7 @@ void CygnetPlane::createPlane(){ const GLfloat x = s*_data->scale.x/2.0; const GLfloat y = s*_data->scale.y/2.0; const GLfloat z = s*_data->scale.z/2.0; - const GLfloat w = _data->spatialScale.y; + const GLfloat w = _data->spatialScale.w; const GLfloat vertex_data[] = { // square of two triangles (sigh) // x y z w s t diff --git a/modules/iswa/rendering/dataplane.cpp b/modules/iswa/rendering/dataplane.cpp index 916110eb8e..b6ec1bf324 100644 --- a/modules/iswa/rendering/dataplane.cpp +++ b/modules/iswa/rendering/dataplane.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -42,9 +41,9 @@ namespace openspace { DataPlane::DataPlane(const ghoul::Dictionary& dictionary) :CygnetPlane(dictionary) ,_dataOptions("dataOptions", "Data Options") - ,_normValues("normValues", "Normalize Values", glm::vec2(1.0, 1.0), glm::vec2(0), glm::vec2(5.0)) + ,_normValues("normValues", "Normalize Values", glm::vec2(0.1,0.2), glm::vec2(0), glm::vec2(0.5)) ,_useLog("useLog","Use Logarithm Norm", false) - ,_useHistogram("useHistogram","Use Histogram Equalization", true) + ,_useHistogram("_useHistogram", "Use Histogram", true) ,_useRGB("useRGB","Use RGB Channels", false) // ,_topColor("topColor", "Top Color", glm::vec4(1,0,0,1), glm::vec4(0), glm::vec4(1)) // ,_midColor("midColor", "Mid Color", glm::vec4(0,0,0,0), glm::vec4(0), glm::vec4(1)) @@ -59,7 +58,6 @@ DataPlane::DataPlane(const ghoul::Dictionary& dictionary) setName(name); addProperty(_useLog); - addProperty(_useHistogram); addProperty(_useRGB); addProperty(_normValues); addProperty(_dataOptions); @@ -72,7 +70,6 @@ DataPlane::DataPlane(const ghoul::Dictionary& dictionary) registerProperties(); OsEng.gui()._iSWAproperty.registerProperty(&_useLog); - OsEng.gui()._iSWAproperty.registerProperty(&_useHistogram); OsEng.gui()._iSWAproperty.registerProperty(&_useRGB); OsEng.gui()._iSWAproperty.registerProperty(&_normValues); OsEng.gui()._iSWAproperty.registerProperty(&_dataOptions); @@ -85,7 +82,6 @@ DataPlane::DataPlane(const ghoul::Dictionary& dictionary) _normValues.onChange([this](){loadTexture();}); _useLog.onChange([this](){loadTexture();}); - _useHistogram.onChange([this](){loadTexture();}); _dataOptions.onChange([this](){ if( _useRGB.value() && (_dataOptions.value().size() > 3)){ LWARNING("More than 3 values, using only the red channel."); @@ -108,6 +104,7 @@ bool DataPlane::initialize(){ initializeTime(); createPlane(); + if (_shader == nullptr) { // DatePlane Program RenderEngine& renderEngine = OsEng.renderEngine(); @@ -154,7 +151,7 @@ bool DataPlane::loadTexture() { return false; if (!_texture) { - std::unique_ptr texture = std::make_unique( + std::unique_ptr texture = std::make_unique( values, _dimensions, ghoul::opengl::Texture::Format::RGB, @@ -257,22 +254,6 @@ float* DataPlane::readData(){ std::vector standardDeviation; std::vector> optionValues; - - // HISTOGRAM - // number of levels/bins/values - const int levels = 512; - // Normal Histogram where "levels" is the number of steps/bins - std::vector> histogram; - // Maps the old levels to new ones. - std::vector> newLevels; - - // maps the data values to the histogram bin/index/level - auto mapToHistogram = [levels](float val, float varMin, float varMax) { - float probability = (val-varMin)/(varMax-varMin); - float mappedValue = probability * levels; - return glm::clamp(mappedValue, 0.0f, static_cast(levels - 1)); - }; - for(int i=0; i < selectedOptions.size(); i++){ min.push_back(std::numeric_limits::max()); @@ -283,11 +264,6 @@ float* DataPlane::readData(){ std::vector v; optionValues.push_back(v); - - //initialize histogram for chosen values - histogram.push_back( std::vector(levels, 0) ); - //initialize the newLevels for chosen values - newLevels.push_back( std::vector(levels, 0.0f) ); } float* combinedValues = new float[3*_dimensions.x*_dimensions.y]; @@ -331,81 +307,39 @@ float* DataPlane::readData(){ mean.push_back((1.0 / numValues) * sum[i]); //Calculate the Standard Deviation standardDeviation.push_back(sqrt (((pow(sum[i], 2.0)) - ((1.0/numValues) * (pow(sum[i],2.0)))) / (numValues - 1.0))); + //calulate log mean - logmean[i] /= numValues; - + logmean[i] /= numValues; } - //HISTOGRAM FUNCTIONALITY - //====================== - if(_useHistogram.value()){ - for(int j=0; jparent); // addProperty(_enabled); - addProperty(_updateInterval); addProperty(_delete); // std::cout << _data->id << std::endl; @@ -85,6 +83,7 @@ ISWACygnet::ISWACygnet(const ghoul::Dictionary& dictionary) // std::cout << std::to_string(_data->scale) << std::endl; // std::cout << std::to_string(_data->max) << std::endl; // std::cout << std::to_string(_data->min) << std::endl; + std::cout << std::to_string(_data->spatialScale) << std::endl; // std::cout << _data->path << std::endl; // std::cout << _data->parent << std::endl; // std::cout << _data->frame << std::endl; @@ -96,7 +95,6 @@ ISWACygnet::~ISWACygnet(){} void ISWACygnet::registerProperties(){ OsEng.gui()._iSWAproperty.registerProperty(&_enabled); - OsEng.gui()._iSWAproperty.registerProperty(&_updateInterval); OsEng.gui()._iSWAproperty.registerProperty(&_delete); } diff --git a/modules/iswa/rendering/iswacygnet.h b/modules/iswa/rendering/iswacygnet.h index 414efaf31e..8ff0b8563f 100644 --- a/modules/iswa/rendering/iswacygnet.h +++ b/modules/iswa/rendering/iswacygnet.h @@ -58,7 +58,7 @@ struct Metadata { glm::vec3 max; glm::vec3 offset; glm::vec3 scale; - glm::vec2 spatialScale; + glm::vec4 spatialScale; std::string scaleVariable; std::shared_ptr kw; }; @@ -89,7 +89,6 @@ protected: // void setParent(); // properties::BoolProperty _enabled; - properties::FloatProperty _updateInterval; properties::TriggerProperty _delete; std::unique_ptr _shader; diff --git a/modules/iswa/rendering/kameleonplane.cpp b/modules/iswa/rendering/kameleonplane.cpp new file mode 100644 index 0000000000..d0e2fa8406 --- /dev/null +++ b/modules/iswa/rendering/kameleonplane.cpp @@ -0,0 +1,138 @@ +// /***************************************************************************************** +// * * +// * OpenSpace * +// * * +// * Copyright (c) 2014-2016 * +// * * +// * Permission is hereby granted, free of charge, to any person obtaining a copy of this * +// * software and associated documentation files (the "Software"), to deal in the Software * +// * without restriction, including without limitation the rights to use, copy, modify, * +// * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * +// * permit persons to whom the Software is furnished to do so, subject to the following * +// * conditions: * +// * * +// * The above copyright notice and this permission notice shall be included in all copies * +// * or substantial portions of the Software. * +// * * +// * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * +// * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * +// * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * +// * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * +// * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * +// * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +// ****************************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { + const std::string _loggerCat = "KameleonPlane"; +} + +namespace openspace { + +KameleonPlane::KameleonPlane(const ghoul::Dictionary& dictionary) + :CygnetPlane(dictionary) +{ + _id = id(); + + std::string name; + dictionary.getValue("Name", name); + setName(name); + + registerProperties(); + + dictionary.getValue("kwPath", _kwPath); + std::cout << "Creating kameleonplane" << std::endl; +} + +KameleonPlane::~KameleonPlane(){} + + +bool KameleonPlane::initialize(){ + std::cout << "initialize kameleonplane" << std::endl; + // std::string kwPath; + _kw = std::make_shared(absPath(_kwPath)); + // dictionary.getValue("KW", _kw); + + KameleonWrapper::Model model = _kw->model(); + if( model == KameleonWrapper::Model::BATSRUS) + _var = "p"; + else + _var = "rho"; + + + createPlane(); + + if (_shader == nullptr) { + // DatePlane Program + RenderEngine& renderEngine = OsEng.renderEngine(); + _shader = renderEngine.buildRenderProgram("PlaneProgram", + "${MODULE_ISWA}/shaders/dataplane_vs.glsl", + "${MODULE_ISWA}/shaders/dataplane_fs.glsl" + ); + if (!_shader) + return false; + } + + _dimensions = glm::size3_t(500,500,1); + float zSlice = 0.5f; + _dataSlice = _kw->getUniformSliceValues(std::string(_var), _dimensions, zSlice); + + loadTexture(); + + return isReady(); +} + +bool KameleonPlane::deinitialize(){ + unregisterProperties(); + destroyPlane(); + destroyShader(); + + _kw = nullptr; + _memorybuffer = ""; + + return true; +} + + +bool KameleonPlane::loadTexture() { + std::cout << "load kameleonplane texture" << std::endl; + ghoul::opengl::Texture::FilterMode filtermode = ghoul::opengl::Texture::FilterMode::Linear; + ghoul::opengl::Texture::WrappingMode wrappingmode = ghoul::opengl::Texture::WrappingMode::ClampToEdge; + std::unique_ptr texture = + std::make_unique(_dataSlice, _dimensions, ghoul::opengl::Texture::Format::Red, GL_RED, GL_FLOAT, filtermode, wrappingmode); + + if (!texture) + return false; + // LDEBUG("Loaded texture from '" << absPath(_path) << "'"); + + texture->uploadTexture(); + + // Textures of planets looks much smoother with AnisotropicMipMap rather than linear + texture->setFilter(ghoul::opengl::Texture::FilterMode::Linear); + + _texture = std::move(texture); + + return true; +} + +bool KameleonPlane::updateTexture(){ + return true; +} + +int KameleonPlane::id(){ + static int id = 0; + return id++; +} +}// namespace openspace \ No newline at end of file diff --git a/modules/iswa/rendering/kameleonplane.h b/modules/iswa/rendering/kameleonplane.h new file mode 100644 index 0000000000..064a17dd12 --- /dev/null +++ b/modules/iswa/rendering/kameleonplane.h @@ -0,0 +1,56 @@ +/***************************************************************************************** +* * +* OpenSpace * +* * +* Copyright (c) 2014-2015 * +* * +* Permission is hereby granted, free of charge, to any person obtaining a copy of this * +* software and associated documentation files (the "Software"), to deal in the Software * +* without restriction, including without limitation the rights to use, copy, modify, * +* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * +* permit persons to whom the Software is furnished to do so, subject to the following * +* conditions: * +* * +* The above copyright notice and this permission notice shall be included in all copies * +* or substantial portions of the Software. * +* * +* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * +* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * +* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * +* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * +* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * +* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * +****************************************************************************************/ + +#ifndef __KAMELEONPLANE_H__ +#define __KAMELEONPLANE_H__ + +#include +#include + + namespace openspace{ + + class KameleonPlane : public CygnetPlane { + public: + KameleonPlane(const ghoul::Dictionary& dictionary); + ~KameleonPlane(); + + virtual bool initialize() override; + virtual bool deinitialize() override; + + private: + virtual bool loadTexture() override; + virtual bool updateTexture() override; + + static int id(); + + std::shared_ptr _kw; + std::string _kwPath; + glm::size3_t _dimensions; + float* _dataSlice; + std::string _var; + }; + + } // namespace openspace + +#endif //__KAMELEONPLANE_H__ \ No newline at end of file diff --git a/modules/iswa/util/iswamanager.cpp b/modules/iswa/util/iswamanager.cpp index eea3d63aad..feddce713b 100644 --- a/modules/iswa/util/iswamanager.cpp +++ b/modules/iswa/util/iswamanager.cpp @@ -85,7 +85,10 @@ namespace openspace{ metaFuture->type = info; metaFuture->id = id; _metaFutures.push_back(metaFuture); - } + }else{ + //create kameleonplane + createKameleonPlane(info); + } } void ISWAManager::deleteISWACygnet(std::string name){ @@ -128,8 +131,8 @@ namespace openspace{ metaFuture->id = id; DlManager.downloadToMemory( - // "http://128.183.168.116:3000/" + std::to_string(-id), - "http://10.0.0.76:3000/" + std::to_string(-id), + "http://128.183.168.116:3000/" + std::to_string(-id), + // "http://10.0.0.76:3000/" + std::to_string(-id), metaFuture->json, [metaFuture](const DownloadManager::FileFuture& f){ LDEBUG("Download to memory finished"); @@ -175,8 +178,8 @@ namespace openspace{ std::string ISWAManager::iSWAurl(int id, std::string type){ std::string url; if(id < 0){ - // url = "http://128.183.168.116:3000/ "+type+"/" + std::to_string(-id) + "/"; - url = "http://10.0.0.76:3000/"+type+"/" + std::to_string(-id) + "/"; + url = "http://128.183.168.116:3000/"+type+"/" + std::to_string(-id) + "/"; + // url = "http://10.0.0.76:3000/"+type+"/" + std::to_string(-id) + "/"; } else{ url = "http://iswa2.ccmc.gsfc.nasa.gov/IswaSystemWebApp/iSWACygnetStreamer?window=-1&cygnetId="+ std::to_string(id) +"×tamp="; } @@ -234,11 +237,13 @@ namespace openspace{ j["Plot ZMIN"] ); - glm::vec2 spatialScale(1, 10); + glm::vec4 spatialScale(1, 1, 1, 10); std::string spatial = j["Spatial Scale (Custom)"]; if(spatial == "R_E"){ spatialScale.x = 6.371f; - spatialScale.y = 6; + spatialScale.y = 6.371f; + spatialScale.z = 6.371f; + spatialScale.w = 6; } std::string table = "{" @@ -262,55 +267,48 @@ namespace openspace{ return ""; } - // std::string ISWAManager::parseKWToLuaTable(std::string kwPath){ - // //NEED TO REWRITE IF USED AGAIN - // if(kwPath != ""){ - // const std::string& extension = ghoul::filesystem::File(absPath(kwPath)).fileExtension(); - // if(extension == "cdf"){ - // KameleonWrapper kw = KameleonWrapper(absPath(kwPath)); + std::string ISWAManager::parseKWToLuaTable(std::string kwPath){ + if(kwPath != ""){ + const std::string& extension = ghoul::filesystem::File(absPath(kwPath)).fileExtension(); + if(extension == "cdf"){ + KameleonWrapper kw = KameleonWrapper(absPath(kwPath)); - // std::string parent = kw.getParent(); - // std::string frame = kw.getFrame(); - // glm::vec4 scale = kw.getModelScaleScaled(); - // glm::vec4 offset = kw.getModelBarycenterOffsetScaled(); + std::string parent = kw.getParent(); + std::string frame = kw.getFrame(); + glm::vec3 min = kw.getGridMin(); + glm::vec3 max = kw.getGridMax(); - // std::string table = "{" - // "Name = 'DataPlane'," - // "Parent = '" + parent + "', " - // "Renderable = {" - // "Type = 'DataPlane', " - // "Id = 0 ," - // "Frame = '" + frame + "' , " - // "Scale = " + std::to_string(scale) + ", " - // "Offset = " + std::to_string(offset) + ", " - // "kwPath = '" + kwPath + "'" - // "}" - // "}" - // ; - // // std::cout << table << std::endl; - // return table; - // } - // } - // return ""; - // } + glm::vec4 spatialScale; + std::tuple < std::string, std::string, std::string > gridUnits = kw.getGridUnits(); + if (std::get<0>(gridUnits) == "R" && std::get<1>(gridUnits) == "R" && std::get<2>(gridUnits) == "R") { + spatialScale.x = 6.371f; + spatialScale.y = 6.371f; + spatialScale.z = 6.371f; + spatialScale.w = 6; + }else{ + spatialScale = glm::vec4(1.0); + spatialScale.w = -log10(1.0f/max.x); + } + std::string table = "{" + "Name = 'KameleonPlane0'," + "Parent = '" + parent + "', " + "Renderable = {" + "Type = 'KameleonPlane', " + "Id = 0 ," + "Frame = '" + frame + "' , " + "Min = " + std::to_string(min) + ", " + "Max = " + std::to_string(max) + ", " + "kwPath = '" + kwPath + "'" + "}" + "}" + ; + // std::cout << table << std::endl; + return table; + } + } + return ""; + } - //Create KameleonPlane? - // void ISWAManager::createDataPlane(std::string kwPath){ - // std::string luaTable = parseKWToLuaTable(kwPath); - // if(luaTable != ""){ - // std::string script = "openspace.addSceneGraphNode(" + luaTable + ");"; - // OsEng.scriptEngine().queueScript(script); - // } - // } - - - // void ISWAManager::createTexturePlane(int id, std::string json){ - // std::string luaTable = parseJSONToLuaTable(id, json); - // if(luaTable != ""){ - // std::string script = "openspace.addSceneGraphNode(" + parseJSONToLuaTable(id, json) + ");"; - // OsEng.scriptEngine().queueScript(script); - // } - // } void ISWAManager::createPlane(int id, std::string json, std::string type){ @@ -331,4 +329,19 @@ namespace openspace{ void ISWAManager::createScreenSpace(int id){ OsEng.renderEngine().registerScreenSpaceRenderable(std::make_shared(id)); } + + void ISWAManager::createKameleonPlane(std::string kwPath){ + kwPath = "${OPENSPACE_DATA}/" + kwPath; + const std::string& extension = ghoul::filesystem::File(absPath(kwPath)).fileExtension(); + + if(FileSys.fileExists(absPath(kwPath)) && extension == "cdf"){ + std::string luaTable = parseKWToLuaTable(kwPath); + if(!luaTable.empty()){ + std::string script = "openspace.addSceneGraphNode(" + luaTable + ");"; + OsEng.scriptEngine().queueScript(script); + } + }else{ + LWARNING( kwPath + " is not a cdf file or can't be found."); + } + } }// namsepace openspace \ No newline at end of file diff --git a/modules/iswa/util/iswamanager.h b/modules/iswa/util/iswamanager.h index c42cf72478..c79a11333f 100644 --- a/modules/iswa/util/iswamanager.h +++ b/modules/iswa/util/iswamanager.h @@ -81,12 +81,13 @@ private: std::shared_ptr downloadMetadata(int id); std::string getDictionaryTable(int id, std::string path); std::string parseJSONToLuaTable(int id, std::string json, std::string type); - // std::string parseKWToLuaTable(std::string kwPath); + std::string parseKWToLuaTable(std::string kwPath); // void createDataPlane(std::string kwPath); // void createTexturePlane(int id, std::string json); void createPlane(int id, std::string json, std::string type); void createScreenSpace(int id); + void createKameleonPlane(std::string kwPath); std::map _month; ISWAContainer* _container; diff --git a/src/engine/downloadmanager.cpp b/src/engine/downloadmanager.cpp index 1dabb7390c..ba8d5ae496 100644 --- a/src/engine/downloadmanager.cpp +++ b/src/engine/downloadmanager.cpp @@ -234,7 +234,7 @@ std::shared_ptr DownloadManager::downloadToMemory( char *ct; res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct); if(ct){ - future->extension = std::string(ct); + future->format = std::string(ct); } } diff --git a/src/rendering/renderable.cpp b/src/rendering/renderable.cpp index 11ee989c06..f2288defa2 100644 --- a/src/rendering/renderable.cpp +++ b/src/rendering/renderable.cpp @@ -53,6 +53,7 @@ Renderable* Renderable::createFromDictionary(const ghoul::Dictionary& dictionary std::string renderableType; success = dictionary.getValue(KeyType, renderableType); + std::cout << renderableType << std::endl; if (!success) { LERROR("Renderable '" << name << "' did not have key '" << KeyType << "'"); return nullptr;