]> git.tdb.fi Git - libs/vr.git/blob - source/stereocombiner.h
Add classes for stereographic rendering
[libs/vr.git] / source / stereocombiner.h
1 #ifndef MSP_GL_STEREOCOMBINER_H_
2 #define MSP_GL_STEREOCOMBINER_H_
3
4 namespace Msp {
5 namespace GL {
6
7 class Texture2D;
8
9 class StereoCombiner
10 {
11 protected:
12         unsigned width_div;
13         unsigned height_div;
14         bool keep_aspect;
15         float fov;
16
17         StereoCombiner();
18 public:
19         virtual ~StereoCombiner() { }
20
21         unsigned get_width_divisor() const { return width_div; }
22         unsigned get_height_divisor() const { return height_div; }
23         bool is_aspect_kept() const { return keep_aspect; }
24         float get_field_of_view() const { return fov; }
25
26         virtual void render(const Texture2D &, const Texture2D &) const = 0;
27 };
28
29 } // namespace GL
30 } // namespace Msp
31
32 #endif