]> git.tdb.fi Git - libs/vr.git/blob - source/sidebysidecombiner.h
Provide absolute render target dimensions from StereoCombiner
[libs/vr.git] / source / sidebysidecombiner.h
1 #ifndef MSP_VR_SIDEBYSIDECOMBINER_H_
2 #define MSP_VR_SIDEBYSIDECOMBINER_H_
3
4 #include <msp/gl/mesh.h>
5 #include <msp/gl/program.h>
6 #include <msp/gl/programdata.h>
7 #include <msp/gl/view.h>
8 #include "stereocombiner.h"
9
10 namespace Msp {
11 namespace VR {
12
13 class SideBySideCombiner: public StereoCombiner
14 {
15 private:
16         GL::Mesh mesh;
17         GL::Program shprog;
18         GL::ProgramData left_shdata;
19         GL::ProgramData right_shdata;
20         bool cross_eyed;
21
22 public:
23         SideBySideCombiner(GL::View &, bool = false);
24
25         void set_cross_eyed(bool);
26
27         virtual void render(const GL::Texture2D &, const GL::Texture2D &) const;
28 };
29
30 } // namespace VR
31 } // namespace Msp
32
33 #endif