]> git.tdb.fi Git - libs/vr.git/blob - source/oculusriftcombiner.h
Convert Oculus code to use SDK 0.4.4
[libs/vr.git] / source / oculusriftcombiner.h
1 #ifndef MSP_VR_OCULUSRIFTCOMBINER_H_
2 #define MSP_VR_OCULUSRIFTCOMBINER_H_
3
4 #include <msp/gl/mesh.h>
5 #include <msp/gl/program.h>
6 #include <msp/gl/programdata.h>
7 #include "stereocombiner.h"
8
9 namespace Msp {
10 namespace VR {
11
12 class OculusRiftDevice;
13
14 /**
15 Presents a stereo view in a way suitable for an Oculus Rift HMD.  All distances
16 are specified in multiples of the screen width.
17 */
18 class OculusRiftCombiner: public StereoCombiner
19 {
20 private:
21         const OculusRiftDevice &device;
22         GL::Mesh left_mesh;
23         GL::Mesh right_mesh;
24         GL::Program shprog;
25         GL::ProgramData shdata;
26
27 public:
28         OculusRiftCombiner(const OculusRiftDevice &);
29
30         virtual void render(const GL::Texture2D &, const GL::Texture2D &) const;
31 };
32
33 } // namespace VR
34 } // namespace Msp
35
36 #endif