]> git.tdb.fi Git - libs/vr.git/blob - source/system.h
b7187b9e00a95670ddfe974690afc0fc70b090cb
[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 bool is_absolute_tracking_supported() const { return false; }
28         virtual void set_absolute_tracking(bool);
29         virtual bool get_absolute_tracking() const { return false; }
30         virtual HeadTrackingCamera *create_camera(const GL::Camera &) = 0;
31         virtual StereoCombiner *create_combiner(GL::View &) = 0;
32
33         virtual void tick() { }
34 };
35
36 } // namespace VR
37 } // namespace Msp
38
39 #endif