Skip to content

Commit

Permalink
fix(engine): correct imgui and renderer systems order
Browse files Browse the repository at this point in the history
  • Loading branch information
DiogoMendonc-a committed Oct 29, 2023
1 parent 2e49718 commit 7545433
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion engine/include/cubos/engine/imgui/plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ namespace cubos::engine
/// - `cubos.imgui.init` - `ImGui` is initialized, after `cubos.window.init`.
///
/// ## Tags
/// - `cubos.imgui.begin` - the ImGui frame begins (after `cubos.window.poll`).
/// - `cubos.imgui.begin` - the ImGui frame begins (after `cubos.renderer.draw`).
/// - `cubos.imgui.end` - the ImGui frame ends (before `cubos.window.render`).
/// - `cubos.imgui` - runs between the previous two tags.
///
/// ## Dependencies
/// - @ref renderer-plugin
/// - @ref window-plugin

/// @brief Plugin entry function.
Expand Down
4 changes: 3 additions & 1 deletion engine/src/cubos/engine/imgui/plugin.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <cubos/engine/imgui/plugin.hpp>
#include <cubos/engine/renderer/plugin.hpp>
#include <cubos/engine/window/plugin.hpp>

#include "imgui.hpp"
Expand Down Expand Up @@ -38,9 +39,10 @@ static void end()
void cubos::engine::imguiPlugin(Cubos& cubos)
{
cubos.addPlugin(windowPlugin);
cubos.addPlugin(rendererPlugin);

cubos.startupTag("cubos.imgui.init").after("cubos.window.init");
cubos.tag("cubos.imgui.begin").after("cubos.window.poll");
cubos.tag("cubos.imgui.begin").after("cubos.renderer.draw");
cubos.tag("cubos.imgui.end").before("cubos.window.render").after("cubos.imgui.begin");
cubos.tag("cubos.imgui").after("cubos.imgui.begin").before("cubos.imgui.end");

Expand Down

0 comments on commit 7545433

Please sign in to comment.