// SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 2023 by Ronald "Eidolon" Kinard // // This program is free software distributed under the // terms of the GNU General Public License, version 2. // See the 'LICENSE' file for more details. //----------------------------------------------------------------------------- #ifndef __SRB2_HWR2_PASS_IMGUI_HPP__ #define __SRB2_HWR2_PASS_IMGUI_HPP__ #include #include "../rhi/rhi.hpp" #include "pass.hpp" namespace srb2::hwr2 { class ImguiPass final : public Pass { struct DrawCmd { rhi::Handle tex; uint32_t v_offset; uint32_t elems; uint32_t i_offset; rhi::Rect clip; rhi::Handle binding_set; }; struct DrawList { void* list; rhi::Handle vbo; rhi::Handle ibo; rhi::Handle us_1; rhi::Handle us_2; std::vector cmds; }; rhi::Handle pipeline_; rhi::Handle font_atlas_; std::vector draw_lists_; public: ImguiPass(); virtual ~ImguiPass(); virtual void prepass(rhi::Rhi& rhi) override; virtual void transfer(rhi::Rhi& rhi, rhi::Handle ctx) override; virtual void graphics(rhi::Rhi& rhi, rhi::Handle ctx) override; virtual void postpass(rhi::Rhi& rhi) override; }; } // namespace srb2::hwr2 #endif // __SRB2_HWR2_PASS_IMGUI_HPP__