Radium Engine  1.5.20
Loading...
Searching...
No Matches
RenderParameters.cpp
1#include "Core/Containers/VariableSet.hpp"
2#include <Core/Utils/Log.hpp>
3
4#include <Engine/Data/RenderParameters.hpp>
5#include <Engine/RadiumEngine.hpp>
6
7#include <fstream>
8namespace Ra {
9namespace Engine {
10namespace Data {
11
13 nlohmann::json& destination ) {
14 auto resourcesRootDir { RadiumEngine::getInstance()->getResourcesDir() };
15 std::string metadataFileName = "Metadata/" + basename + ".json";
16 std::ifstream metadata( resourcesRootDir + metadataFileName );
17 if ( metadata ) { metadata >> destination; }
18 else {
19 LOG( Core::Utils::logERROR )
20 << "RenderParameters : failed to load metadata file " << metadataFileName;
21 }
22}
23} // namespace Data
24} // namespace Engine
25} // namespace Ra
static void loadMetaData(const std::string &basename, nlohmann::json &destination)
Load the ParameterSet description.
hepler function to manage enum as underlying types in VariableSet
Definition Cage.cpp:3