tinygltf/examples/raytrace/render-config.h
Arthur Brainville (Ybalrid) c81be8f87d
Add the current code of nanort + nanosg
This implementation will be based on commit
b31dc0bd92eb7ac896079849a2205fac4abbd087 from the nanort project

Signed-off by: Arthur Brainville (Ybalrid) <ybalrid@ybalrid.info>
2018-02-18 19:16:16 +01:00

43 lines
746 B
C++

#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 eson_filename;
float scene_scale;
} RenderConfig;
/// Loads config from JSON file.
bool LoadRenderConfig(example::RenderConfig *config, const char *filename);
} // namespace
#endif // RENDER_CONFIG_H