KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
EntryPoint.h
Go to the documentation of this file.
1
10#pragma once
11#include "Karma.h"
12
13// Karma's entry point
14
15// If we are on Windows
16#ifdef KR_WINDOWS_PLATFORM
17
18// CreateApplication should be implemented in client
24
35int main(int argc, char** argv)
36{
37 // TODO: add engine initialization code for various systems
40 KR_INFO("Hello Cowboy. Your lucky number is {0}", 7);
41
42 auto app = Karma::CreateApplication();
43
45
46 app->PrepareApplicationForRun();
47 app->Run();
48
49 delete app;
50
53
54 return 0;
55}
56
57// If we are on Linux
58#elif defined KR_LINUX_PLATFORM
59
60// CreateApplication should be implemented in client
71int main(int argc, char** argv)
72{
73 // TODO: add engine initialization code for various systems
76 KR_INFO("Hello Cowboy. Your lucky number is {0}", 7);
77
78 auto app = Karma::CreateApplication();
79
81
82 app->PrepareApplicationForRun();
83 app->Run();
84
85 delete app;
86
89
90 return 0;
91}
92
93// If we are on Mac
94#elif defined KR_MAC_PLATFORM
95
96// CreateApplication should be implemented in client
98
108int main(int argc, char** argv)
109{
110 // TODO: add engine initialization code for various systems
113 KR_INFO("Hello Cowboy. Your lucky number is {0}", 7);
114
115 auto app = Karma::CreateApplication();
116
118
119 app->PrepareApplicationForRun();
120 app->Run();
121 delete app;
122
125
126 return 0;
127}
128
129#endif
Application * CreateApplication()
Declaration of client definable routine.
Definition KarmaApp.cpp:203
#define KR_INFO(...)
A macro for logging information in the Client part.
Definition Log.h:117
The class for Game + Editor in application form.
Definition Application.h:50
static void DeInit()
Deinitialize the Input system.
Definition Input.h:259
static void Init()
Initialize the Input system for Karma.
Definition Input.cpp:126
static void Init()
Initializes the logging class.
Definition Log.cpp:8
static void DeInit()
Deinitialize RenderCommand by freeing up rendering resources.
Definition RenderCommand.cpp:30
static void Init()
Initializing RenderCommand by creating the instance of appropriate RendererAPI Called in the main fun...
Definition RenderCommand.cpp:9