New entrypoint

This commit is contained in:
Nigel Barink 2022-11-12 16:57:34 +01:00
parent 3d3596a3b6
commit 4b84707f98
2 changed files with 29 additions and 3 deletions

View File

@ -1,3 +1,4 @@
#include "../../YoggieEngine/src/EntryPoint.h"
#include <imgui.h> #include <imgui.h>
#include <backends/imgui_impl_opengl3.h> #include <backends/imgui_impl_opengl3.h>
#include <backends/imgui_impl_glfw.h> #include <backends/imgui_impl_glfw.h>
@ -294,9 +295,9 @@ private:
}; };
int main (int argc , char* argv[]) { YoggieEngine::Application* CreateApplication() {
Editor().Run(); return new Editor();
} }
@ -306,3 +307,6 @@ int main (int argc , char* argv[]) {

View File

@ -0,0 +1,22 @@
#pragma once
#include "Application.h"
extern YoggieEngine::Application* CreateApplication();
namespace YoggieEngine
{
int entryPoint()
{
Application* app = CreateApplication();
app->Run();
delete app;
return 0;
}
}
int main(int argc, char** argv) {
return YoggieEngine::entryPoint();
}