Merge branch 'master' of goat:git/laserbrain_demo
[laserbrain_demo] / src / rend_cubemap.h
1 #ifndef REND_CUBEMAP_H_
2 #define REND_CUBEMAP_H_
3
4 #include "renderer.h"
5 #include "texture.h"
6
7 class RendCubemap : public Renderer {
8 private:
9         Vec3 pos;
10         Texture *cubemap;
11         mutable unsigned int fbo, zbuf;
12         mutable int zbuf_width, zbuf_height;
13         Mat4 proj_matrix;
14
15         void setup(int face_idx) const;
16
17 public:
18         RendCubemap();
19
20         void set_position(const Vec3 &pos);
21         void set_cubemap(Texture *cubemap);
22
23         void draw() const;
24         void draw_object(Object *obj) const;
25 };
26
27 #endif  // REND_CUBEMAP_H_