erebus

view liberebus/src/erebus_impl.h @ 41:2e817711d0f6

console: proper input line windowing and clipping
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 10 Jun 2014 12:28:56 +0300
parents 53a98c148bf8
children bab25c0ce337
line source
1 #ifndef EREBUS_IMPL_H_
2 #define EREBUS_IMPL_H_
4 #include <vector>
5 #include <vmath/vmath.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_