mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-15 20:08:54 +03:00
Application and layers refactoring
This commit is contained in:
26
Editor/src/EditorApplication.cpp
Normal file
26
Editor/src/EditorApplication.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "EditorApplication.h"
|
||||
|
||||
#include "Engine.h"
|
||||
#include "Windows/EditorInterface.h"
|
||||
#include "Misc/GizmoDrawer.h"
|
||||
#include "EditorLayer.h"
|
||||
|
||||
#include <glad/glad.h>
|
||||
|
||||
|
||||
void EditorApplication::OnInit()
|
||||
{
|
||||
using namespace Nuake;
|
||||
|
||||
Engine::Init();
|
||||
m_Window = Engine::GetCurrentWindow();
|
||||
m_Window->SetSize({ m_Specification.WindowWidth, m_Specification.WindowHeight });
|
||||
m_Window->SetTitle(m_Specification.Name);
|
||||
|
||||
PushLayer(CreateScope<EditorLayer>());
|
||||
}
|
||||
|
||||
void EditorApplication::OnShutdown()
|
||||
{
|
||||
Nuake::Engine::Close();
|
||||
}
|
||||
Reference in New Issue
Block a user