X-Git-Url: http://git.tdb.fi/?p=libs%2Fvr.git;a=blobdiff_plain;f=source%2Fopenvr%2Fopenvrsystem.h;fp=source%2Fopenvr%2Fopenvrsystem.h;h=0e787eb8d465c947d8d6f53283be5c5a6bfb5f1d;hp=7799ad298405914f198d41c7ddd676eae902b59b;hb=8b0577558582dd34362219e498f688d9416f0ca1;hpb=ee7031ad49618ac199adb506f78b2ca0d2bea2fc diff --git a/source/openvr/openvrsystem.h b/source/openvr/openvrsystem.h index 7799ad2..0e787eb 100644 --- a/source/openvr/openvrsystem.h +++ b/source/openvr/openvrsystem.h @@ -1,7 +1,10 @@ #ifndef MSP_VR_OPENVRSYSTEM_H_ #define MSP_VR_OPENVRSYSTEM_H_ +#include #include +#include +#include #include #include "openvrcamera.h" #include "openvrcombiner.h" @@ -13,11 +16,21 @@ namespace VR { class OpenVRSystem: public System { private: + struct RenderModel; + unsigned n_tracked_devices; std::vector tracking_matrices; std::vector controllers; std::vector unclaimed_controllers; + GL::Program render_shprog; + GL::Program render_shprog_textured; + GL::Material render_material; + std::map render_models; + std::map render_textures; + std::list loading_render_models; + std::list loading_textures; + static unsigned n_instances; public: @@ -42,6 +55,12 @@ public: const GL::Matrix &get_hmd_matrix() const; void add_controller(OpenVRController &); void remove_controller(OpenVRController &); + + const GL::Object *get_render_model(const std::string &); +private: + bool check_loading_render_model(const std::string &); + const GL::Texture2D *get_texture(unsigned); + bool check_loading_texture(unsigned); }; } // namespace VR