1 #ifndef RENDER_CONFIG_H 2 #define RENDER_CONFIG_H 3 4 #include <string> 5 6 namespace example { 7 8 typedef struct { 9 // framebuffer 10 int width; 11 int height; 12 13 // camera 14 float eye[3]; 15 float up[3]; 16 float look_at[3]; 17 float fov; // vertical fov in degree. 18 19 // render pass 20 int pass; 21 int max_passes; 22 23 // For debugging. Array size = width * height * 4. 24 float *normalImage; 25 float *positionImage; 26 float *depthImage; 27 float *texcoordImage; 28 float *varycoordImage; 29 30 // Scene input info 31 std::string obj_filename; 32 std::string eson_filename; 33 float scene_scale; 34 35 } RenderConfig; 36 37 /// Loads config from JSON file. 38 bool LoadRenderConfig(example::RenderConfig *config, const char *filename); 39 40 } // namespace 41 42 #endif // RENDER_CONFIG_H 43