Give combiners more control over rendering
[libs/vr.git] / source / ovr / oculusriftcombiner.h
index 65809a3a2c6827c79d1d529d234b4f95d30d0181..27c3c83bac49caa7ad8a0d7e590e34d7ac8b4ea9 100644 (file)
@@ -4,6 +4,7 @@
 #include <msp/gl/mesh.h>
 #include <msp/gl/program.h>
 #include <msp/gl/programdata.h>
+#include <msp/gl/view.h>
 #include <msp/vr/stereocombiner.h>
 
 namespace Msp {
@@ -18,7 +19,8 @@ are specified in multiples of the screen width.
 class OculusRiftCombiner: public StereoCombiner
 {
 private:
-       const OculusRiftDevice &device;
+       OculusRiftDevice &device;
+       GL::View &view;
        GL::Mesh left_mesh;
        GL::Mesh right_mesh;
        GL::Program shprog;
@@ -26,8 +28,9 @@ private:
        mutable GL::ProgramData right_shdata;
 
 public:
-       OculusRiftCombiner(const OculusRiftDevice &);
+       OculusRiftCombiner(OculusRiftDevice &, GL::View &);
 
+       virtual void prepare() const;
        virtual void render(const GL::Texture2D &, const GL::Texture2D &) const;
 };