New entrypoint
This commit is contained in:
parent
3d3596a3b6
commit
4b84707f98
@ -1,3 +1,4 @@
|
||||
#include "../../YoggieEngine/src/EntryPoint.h"
|
||||
#include <imgui.h>
|
||||
#include <backends/imgui_impl_opengl3.h>
|
||||
#include <backends/imgui_impl_glfw.h>
|
||||
@ -294,9 +295,9 @@ private:
|
||||
|
||||
};
|
||||
|
||||
int main (int argc , char* argv[]) {
|
||||
|
||||
Editor().Run();
|
||||
YoggieEngine::Application* CreateApplication() {
|
||||
|
||||
return new Editor();
|
||||
|
||||
}
|
||||
|
||||
@ -306,3 +307,6 @@ int main (int argc , char* argv[]) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
22
YoggieEngine/src/EntryPoint.h
Normal file
22
YoggieEngine/src/EntryPoint.h
Normal 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();
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user