mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Fixed ImGui and added docking and viewport support
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user