nuclear@2: #ifndef EREBUS_IMPL_H_ nuclear@2: #define EREBUS_IMPL_H_ nuclear@2: nuclear@17: #include nuclear@45: #include nuclear@17: #include "erebus.h" nuclear@17: #include "image.h" nuclear@17: #include "scene.h" nuclear@24: #include "threadpool.h" nuclear@17: nuclear@17: struct Option { nuclear@17: enum Type { INT, FLOAT, VEC } type; nuclear@17: int ival; nuclear@17: float fval; nuclear@17: Vector4 vval; nuclear@17: }; nuclear@17: nuclear@26: struct Block { nuclear@17: int x, y, width, height; nuclear@26: int sample; nuclear@26: int frame; nuclear@17: }; nuclear@17: nuclear@17: struct erebus { nuclear@17: Scene *scn; nuclear@17: nuclear@17: Image fbimg; nuclear@17: Image accum; // sample accumulator per pixel nuclear@17: Option options[ERB_NUM_OPTIONS]; nuclear@17: nuclear@31: ThreadPool *tpool; nuclear@24: nuclear@17: // render state nuclear@40: bool rendering; nuclear@17: float inv_gamma; nuclear@17: long cur_time; nuclear@17: int cur_sample; nuclear@26: int cur_frame; nuclear@17: nuclear@17: // interactive input nuclear@17: std::vector keystate; nuclear@17: std::vector bnstate; nuclear@17: int mouse_pos[2]; nuclear@17: nuclear@17: // debugging stuff nuclear@17: int dbg_nodesel; nuclear@17: }; nuclear@17: nuclear@2: float randf(float low = 0.0f, float high = 1.0f); nuclear@2: nuclear@2: #endif // EREBUS_IMPL_H_