mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 06:19:19 +02:00
AnimModel.cpp reaches cParser through the simulation core, not a direct import, so the previous pass missed it; the propagation now follows the whole import closure. Train.cpp, drivermode.cpp and Globals.cpp call Console:: inside _WIN32 guards without importing eu07.console - invisible on Linux, where those blocks are skipped.
60 lines
1.3 KiB
C++
60 lines
1.3 KiB
C++
module;
|
|
#include <array>
|
|
#include <chrono>
|
|
#include <deque>
|
|
#include <limits>
|
|
#include <mutex>
|
|
#include <ostream>
|
|
#include <sstream>
|
|
#include <type_traits>
|
|
#include <utility>
|
|
#include <cstddef>
|
|
#include <memory>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
|
|
export module eu07.vr.vr_interface;
|
|
import eu07.glm;
|
|
import eu07.vehicle.camera;
|
|
import eu07.simcore;
|
|
import eu07.model.texture;
|
|
|
|
export {
|
|
|
|
class vr_interface
|
|
{
|
|
public:
|
|
enum eye_e {
|
|
eye_left,
|
|
eye_right
|
|
};
|
|
|
|
virtual viewport_proj_config get_proj_config(eye_e) = 0;
|
|
virtual TModel3d* get_hiddenarea_mesh(eye_e) = 0;
|
|
virtual glm::ivec2 get_target_size() = 0;
|
|
virtual void begin_frame() = 0;
|
|
virtual void submit(eye_e, opengl_texture*) = 0;
|
|
virtual std::vector<TModel3d*> get_render_models() = 0;
|
|
virtual glm::mat4 get_pick_transform() = 0;
|
|
virtual void finish_frame() = 0;
|
|
virtual ~vr_interface() = 0;
|
|
};
|
|
|
|
class vr_interface_factory
|
|
{
|
|
public:
|
|
using create_method = std::unique_ptr<vr_interface>(*)();
|
|
|
|
bool register_backend(const std::string &backend, create_method func);
|
|
std::unique_ptr<vr_interface> create(const std::string &name);
|
|
|
|
static vr_interface_factory* get_instance();
|
|
|
|
private:
|
|
std::unordered_map<std::string, create_method> backends;
|
|
static vr_interface_factory *instance;
|
|
};
|
|
|
|
} // export
|