allow setting target fbo for imgui rendertask

This commit is contained in:
Green Sky 2022-06-29 23:11:34 +02:00
parent 9aa6618e0f
commit 2ee17a63ea
2 changed files with 4 additions and 1 deletions

View File

@ -27,7 +27,7 @@ void ImGuiRT::render(Services::OpenGLRenderer& rs, Engine&) {
ZoneScopedN("MM::OpenGL::RenderTasks::ImGuiRT::render"); ZoneScopedN("MM::OpenGL::RenderTasks::ImGuiRT::render");
TracyGpuZone("MM::OpenGL::RenderTasks::ImGuiRT::render"); TracyGpuZone("MM::OpenGL::RenderTasks::ImGuiRT::render");
rs.targets["display"]->bind(FrameBufferObject::W); rs.targets[target_fbo]->bind(FrameBufferObject::W);
// render // render
ImGui::Render(); ImGui::Render();

View File

@ -14,6 +14,9 @@ namespace MM::OpenGL::RenderTasks {
const char* name(void) override { return "ImGuiRT"; } const char* name(void) override { return "ImGuiRT"; }
void render(Services::OpenGLRenderer& rs, Engine& engine) override; void render(Services::OpenGLRenderer& rs, Engine& engine) override;
public:
std::string target_fbo = "display";
}; };
} // MM::OpenGL::RenderTasks } // MM::OpenGL::RenderTasks