]> git.tdb.fi Git - libs/vr.git/blob - source/system.h
Fix memory leaks
[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 #include "motioncontroller.h"
8
9 namespace Msp {
10 namespace VR {
11
12 class HeadTrackingCamera;
13 class StereoCombiner;
14 class StereoView;
15
16 class System
17 {
18 protected:
19         System() { }
20 public:
21         virtual ~System() { }
22
23         static System *create(const std::string &);
24         static System *create_autodetect();
25
26         virtual void configure_window(Graphics::Window &) const = 0;
27         virtual void configure_view(StereoView &) const = 0;
28         virtual bool is_absolute_tracking_supported() const { return false; }
29         virtual void set_absolute_tracking(bool);
30         virtual bool get_absolute_tracking() const { return false; }
31         virtual HeadTrackingCamera *create_camera(const GL::Camera &) = 0;
32         virtual StereoCombiner *create_combiner(GL::View &) = 0;
33         virtual MotionController *create_controller();
34
35         virtual void tick() { }
36 };
37
38 } // namespace VR
39 } // namespace Msp
40
41 #endif