Fixed ImGui and added docking and viewport support

This commit is contained in:
Simon Lübeß
2020-11-16 21:16:19 +01:00
parent b472d0774d
commit 6bfeffa49d
9 changed files with 115 additions and 48 deletions
+8
View File
@@ -2,6 +2,7 @@ using System;
using GlitchyEngine.Events;
using GlitchyEngine.Platform.Windows;
using GlitchyEngine.Platform.DX11;
using GlitchyEngine.ImGui;
namespace GlitchyEngine
{
@@ -14,6 +15,8 @@ namespace GlitchyEngine
private LayerStack _layerStack = new LayerStack() ~ delete _;
private ImGuiLayer _imGuiLayer;
private GameTime _gameTime = new GameTime(true) ~ delete _;
public bool IsRunning => _running;
@@ -29,6 +32,9 @@ namespace GlitchyEngine
_window = GlitchyEngine.Window.CreateWindow(WindowDescription());
_window.EventCallback = new => OnEvent;
_imGuiLayer = new ImGuiLayer();
PushLayer(_imGuiLayer);
}
public void OnEvent(Event e)
@@ -59,6 +65,8 @@ namespace GlitchyEngine
_window.Update();
_imGuiLayer.ImGuiRender();
DirectX.Present();
}
}