added IBR lighting from irradiance maps
[demo] / src / renderer.h
1 #ifndef RENDERER_H_
2 #define RENDERER_H_
3
4 class OrbitCamera;
5 class Object;
6 class Scene;
7 class ShaderProgram;
8 class Texture;
9
10 class Renderer {
11 protected:
12         int diff_loc;
13         int spec_loc;
14         int shin_loc;
15         int mmviewproj_loc;
16         int mview_loc;
17         int mmod_loc;
18         int fog_loc;
19         int dstex_loc;
20         int stex_loc;
21
22         ShaderProgram *sprog;
23
24         /* debug shader to draw normals */
25         ShaderProgram *nprog;
26
27         Texture *skytex, *dskytex;
28
29         virtual void draw_object(Object *object) const;
30         virtual void draw_skybox() const;
31
32 public:
33         float fog_density;
34
35         Scene *scene;
36         OrbitCamera *camera;
37
38         Renderer();
39         virtual ~Renderer();
40
41         virtual bool create();
42         virtual void draw() const;
43
44         virtual void set_sky_tex(Texture *stex);
45         virtual void set_diffuse_sky_tex(Texture *dstex);
46 };
47
48 #endif // RENDERER_H_