various cleanup

This commit is contained in:
Erris
2026-02-10 09:42:59 +01:00
parent a53150d228
commit 86392e0790
13 changed files with 181 additions and 155 deletions

View File

@@ -13,14 +13,15 @@
#include <imgui.h>
namespace OpenEngine {
Application::Application()
Application::Application(const std::string& name)
: name(name)
{
OE_PROFILE_FUNCTION();
OE_CORE_ASSERT(!instance, "Application already exists!");
instance = this;
window = Window::Create();
window = Window::Create(WindowProps(name));
window->SetEventCallback(BIND_EVENT_FN(Application::OnEvent));
{
@@ -90,11 +91,16 @@ namespace OpenEngine {
bool Application::OnWindowClose(WindowCloseEvent& event)
{
running = false;
Close();
return true;
}
void Application::Close()
{
running = false;
}
bool Application::OnWindowResize(WindowResizeEvent& event)
{
OE_PROFILE_FUNCTION();