#pragma once // The renderer process (t5de-renderer.exe, 64-bit) an engine draws through: started with the engine, told about // each frame through a shared memory channel (include/t5de/protocol/channel.hpp), and told to exit with it. #include #include #include #include "t5de/protocol/channel.hpp" namespace t5de { class RendererProcess { public: // Starts t5de-renderer.exe from this DLL's folder, drawing into window; null if it can't. static std::unique_ptr start(HWND window); RendererProcess(const RendererProcess&) = delete; RendererProcess& operator=(const RendererProcess&) = delete; ~RendererProcess(); // The client drew a frame. void frameDrawn(); private: RendererProcess() = default; HANDLE mapping_ = nullptr; HANDLE frameEvent_ = nullptr; HANDLE process_ = nullptr; protocol::Channel* channel_ = nullptr; }; } // namespace t5de