erebus

view liberebus/src/erebus_impl.h @ 47:4b91c9a501d8

minor fix of strange code structure in the thread func
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 01 Feb 2016 14:56:15 +0200
parents 9d6368850fe1
children c4d48a21bc4a
line source
1 #ifndef EREBUS_IMPL_H_
2 #define EREBUS_IMPL_H_
4 #include <vector>
5 #include <gmath/gmath.h>
6 #include "erebus.h"
7 #include "image.h"
8 #include "scene.h"
9 #include "threadpool.h"
11 struct Option {
12 enum Type { INT, FLOAT, VEC } type;
13 int ival;
14 float fval;
15 Vector4 vval;
16 };
18 struct Block {
19 int x, y, width, height;
20 int sample;
21 int frame;
22 };
24 struct erebus {
25 Scene *scn;
27 Image<float> fbimg;
28 Image<float> accum; // sample accumulator per pixel
29 Option options[ERB_NUM_OPTIONS];
31 ThreadPool *tpool;
33 // render state
34 bool rendering;
35 float inv_gamma;
36 long cur_time;
37 int cur_sample;
38 int cur_frame;
40 // interactive input
41 std::vector<bool> keystate;
42 std::vector<bool> bnstate;
43 int mouse_pos[2];
45 // debugging stuff
46 int dbg_nodesel;
47 };
49 float randf(float low = 0.0f, float high = 1.0f);
51 #endif // EREBUS_IMPL_H_