]> git.tdb.fi Git - libs/gl.git/blobdiff - source/sidebysidecombiner.h
Add classes for stereographic rendering
[libs/gl.git] / source / sidebysidecombiner.h
diff --git a/source/sidebysidecombiner.h b/source/sidebysidecombiner.h
new file mode 100644 (file)
index 0000000..f6ec593
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef MSP_GL_SIDEBYSIDECOMBINER_H_
+#define MSP_GL_SIDEBYSIDECOMBINER_H_
+
+#include "mesh.h"
+#include "program.h"
+#include "programdata.h"
+#include "stereocombiner.h"
+
+namespace Msp {
+namespace GL {
+
+class SideBySideCombiner: public StereoCombiner
+{
+private:
+       Mesh mesh;
+       Program shprog;
+       ProgramData left_shdata;
+       ProgramData right_shdata;
+       bool cross_eyed;
+
+public:
+       SideBySideCombiner(bool = false);
+
+       void set_cross_eyed(bool);
+
+       virtual void render(const Texture2D &, const Texture2D &) const;
+};
+
+} // namespace GL
+} // namespace Msp
+
+#endif