]> git.tdb.fi Git - libs/vr.git/blob - source/sidebysidecombiner.h
Require mspcore since symbols from it are used
[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::View &view;
17         GL::Mesh mesh;
18         GL::Program shprog;
19         GL::ProgramData left_shdata;
20         GL::ProgramData right_shdata;
21         bool cross_eyed;
22
23 public:
24         SideBySideCombiner(GL::View &, bool = false);
25
26         void set_cross_eyed(bool);
27
28         virtual void render(const GL::Texture2D &, const GL::Texture2D &) const;
29 };
30
31 } // namespace VR
32 } // namespace Msp
33
34 #endif