Add a gltf_filename feild to the renderconfig struct

This is to get the filename that will be given to the gltf-loader

Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
This commit is contained in:
Arthur Brainville (Ybalrid) 2018-02-18 21:01:59 +01:00
parent adfe936dd3
commit c9ec1ea7b6
No known key found for this signature in database
GPG Key ID: BC05C4812A06BCF3
2 changed files with 7 additions and 0 deletions

View File

@ -35,6 +35,12 @@ bool LoadRenderConfig(example::RenderConfig* config, const char* filename) {
}
}
if (o.find("gltf_filename") != o.end()) {
if (o["gltf_filename"].is<std::string>()) {
config->gltf_filename = o["gltf_filename"].get<std::string>();
}
}
if (o.find("eson_filename") != o.end()) {
if (o["eson_filename"].is<std::string>()) {
config->eson_filename = o["eson_filename"].get<std::string>();

View File

@ -29,6 +29,7 @@ typedef struct {
// Scene input info
std::string obj_filename;
std::string gltf_filename;
std::string eson_filename;
float scene_scale;