]> git.tdb.fi Git - libs/vr.git/blob - source/libovr/libovrsystem.h
Name LibOVR classes after the API, not the device
[libs/vr.git] / source / libovr / libovrsystem.h
1 #ifndef MSP_VR_LIBOVRSYSTEM_H_
2 #define MSP_VR_LIBOVRSYSTEM_H_
3
4 #include <msp/vr/system.h>
5 #include "libovrcamera.h"
6 #include "libovrcombiner.h"
7
8 namespace Msp {
9 namespace VR {
10
11 class LibOVRSystem: public System
12 {
13 public:
14         struct Private;
15
16 private:
17         Private *priv;
18         unsigned frame_index;
19         bool timing_active;
20
21         static unsigned n_instances;
22
23 public:
24         LibOVRSystem();
25         virtual ~LibOVRSystem();
26
27         const Private &get_private() const { return *priv; }
28
29         virtual void configure_window(Graphics::Window &) const;
30         virtual void configure_view(StereoView &) const;
31         virtual LibOVRCamera *create_camera(const GL::Camera &);
32         virtual LibOVRCombiner *create_combiner(GL::View &);
33
34         void begin_frame();
35         void end_frame();
36         bool is_timing_active() const { return timing_active; }
37         double get_tracking_time() const;
38         double get_timewarp_time() const;
39         double get_current_time() const;
40 };
41
42 } // namespace VR
43 } // namespace Msp
44
45 #endif