protot/3rdparty/tinygltf/examples/raytrace/render-config.h

44 lines
775 B
C
Raw Permalink Normal View History

2018-03-19 23:00:51 +01:00
#ifndef RENDER_CONFIG_H
#define RENDER_CONFIG_H
#include <string>
namespace example {
typedef struct {
// framebuffer
int width;
int height;
// camera
float eye[3];
float up[3];
float look_at[3];
float fov; // vertical fov in degree.
// render pass
int pass;
int max_passes;
// For debugging. Array size = width * height * 4.
float *normalImage;
float *positionImage;
float *depthImage;
float *texcoordImage;
float *varycoordImage;
// Scene input info
std::string obj_filename;
std::string gltf_filename;
std::string eson_filename;
float scene_scale;
} RenderConfig;
/// Loads config from JSON file.
bool LoadRenderConfig(example::RenderConfig *config, const char *filename);
} // namespace
#endif // RENDER_CONFIG_H