add ApplicationSpecification
This commit is contained in:
@ -5,14 +5,14 @@
|
|||||||
|
|
||||||
#include <SDL3/SDL_main.h>
|
#include <SDL3/SDL_main.h>
|
||||||
|
|
||||||
extern Hazel::Application* Hazel::CreateApplication();
|
extern Hazel::Application* Hazel::CreateApplication(ApplicationCommandLineArgs args);
|
||||||
|
|
||||||
|
|
||||||
int main(int, char**) {
|
int main(int argc, char** argv) {
|
||||||
Hazel::Log::init();
|
Hazel::Log::init();
|
||||||
|
|
||||||
HZ_PROFILE_BEGIN_SESSION("Start", "Start.json");
|
HZ_PROFILE_BEGIN_SESSION("Start", "Start.json");
|
||||||
const auto app = Hazel::CreateApplication();
|
const auto app = Hazel::CreateApplication({argc, argv});
|
||||||
HZ_PROFILE_END_SESSION();
|
HZ_PROFILE_END_SESSION();
|
||||||
|
|
||||||
HZ_PROFILE_BEGIN_SESSION("Update", "Update.json");
|
HZ_PROFILE_BEGIN_SESSION("Update", "Update.json");
|
||||||
|
|||||||
@ -9,20 +9,23 @@ namespace Hazel
|
|||||||
class HazelEditor : public Application
|
class HazelEditor : public Application
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HazelEditor()
|
HazelEditor(const ApplicationSpecification& specification)
|
||||||
: Application("Hazel Editor", 1920, 1080)
|
: Application(specification)
|
||||||
{
|
{
|
||||||
PushLayer(new EditorLayer());
|
PushLayer(new EditorLayer());
|
||||||
}
|
}
|
||||||
|
|
||||||
~HazelEditor() = default;
|
~HazelEditor() = default;
|
||||||
|
|
||||||
private:
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Application* CreateApplication()
|
Application* CreateApplication(ApplicationCommandLineArgs args)
|
||||||
{
|
{
|
||||||
return new HazelEditor();
|
ApplicationSpecification spec;
|
||||||
|
spec.name = "Editor app";
|
||||||
|
spec.commandLineArgs = args;
|
||||||
|
|
||||||
|
return new HazelEditor(spec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user