/* Copyright 2021 flyinghead This file is part of Flycast. Flycast is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. Flycast is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Flycast. If not, see . */ #pragma once #include "types.h" #include #include #include #include "windows/comptr.h" class D3DOverlay { public: void init(const ComPtr& device) { this->device = device; } void term() { device.reset(); xhairTexture.reset(); for (auto& vmu : vmuTextures) vmu.reset(); } void draw(u32 width, u32 height, bool vmu, bool crosshair); private: void setupRenderState(u32 displayWidth, u32 displayHeight); void drawQuad(const RECT& rect, D3DCOLOR color); struct Vertex { float pos[3]; float uv[2]; }; ComPtr device; ComPtr xhairTexture; std::array, 8> vmuTextures; };