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