X-Git-Url: http://git.tdb.fi/?p=libs%2Fvr.git;a=blobdiff_plain;f=source%2Flibovr%2Flibovrsystem.h;fp=source%2Flibovr%2Flibovrsystem.h;h=d5623a02d848657b618743dec2aa983b0456311f;hp=0000000000000000000000000000000000000000;hb=31c28161d36749d040cbab0099b352f53cad232d;hpb=b6de7d24475dec8f5d6b8148a69cf8b561bc0761 diff --git a/source/libovr/libovrsystem.h b/source/libovr/libovrsystem.h new file mode 100644 index 0000000..d5623a0 --- /dev/null +++ b/source/libovr/libovrsystem.h @@ -0,0 +1,45 @@ +#ifndef MSP_VR_LIBOVRSYSTEM_H_ +#define MSP_VR_LIBOVRSYSTEM_H_ + +#include +#include "libovrcamera.h" +#include "libovrcombiner.h" + +namespace Msp { +namespace VR { + +class LibOVRSystem: public System +{ +public: + struct Private; + +private: + Private *priv; + unsigned frame_index; + bool timing_active; + + static unsigned n_instances; + +public: + LibOVRSystem(); + virtual ~LibOVRSystem(); + + const Private &get_private() const { return *priv; } + + virtual void configure_window(Graphics::Window &) const; + virtual void configure_view(StereoView &) const; + virtual LibOVRCamera *create_camera(const GL::Camera &); + virtual LibOVRCombiner *create_combiner(GL::View &); + + void begin_frame(); + void end_frame(); + bool is_timing_active() const { return timing_active; } + double get_tracking_time() const; + double get_timewarp_time() const; + double get_current_time() const; +}; + +} // namespace VR +} // namespace Msp + +#endif