]> git.tdb.fi Git - libs/vr.git/blob - source/system.h
Add a system creation function with automatic backend detection
[libs/vr.git] / source / system.h
1 #ifndef MSP_VR_SYSTEM_H_
2 #define MSP_VR_SYSTEM_H_
3
4 #include <string>
5 #include <msp/gl/camera.h>
6 #include <msp/gl/view.h>
7
8 namespace Msp {
9 namespace VR {
10
11 class HeadTrackingCamera;
12 class StereoCombiner;
13 class StereoView;
14
15 class System
16 {
17 protected:
18         System() { }
19 public:
20         virtual ~System() { }
21
22         static System *create(const std::string &);
23         static System *create_autodetect();
24
25         virtual void configure_window(Graphics::Window &) const = 0;
26         virtual void configure_view(StereoView &) const = 0;
27         virtual void set_absolute_tracking(bool) = 0;
28         virtual HeadTrackingCamera *create_camera(const GL::Camera &) = 0;
29         virtual StereoCombiner *create_combiner(GL::View &) = 0;
30 };
31
32 } // namespace VR
33 } // namespace Msp
34
35 #endif