-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
30 lines (23 loc) · 689 Bytes
/
main.cpp
File metadata and controls
30 lines (23 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "window.h"
#include "renderer.h"
#include "log.h"
extern Logger logger;
int main() {
// Set log level (optional, can set to DEBUG, INFO, etc.)
logger.setLogLevel(LogLevel::DEBUG);
// Log application start
logger.log(LogLevel::INFO, "Application started.");
// Create window
Window window(800, 600, "ProjectName");
// Initialize renderer
Renderer renderer;
// Main loop
while (!window.shouldClose()) {
window.pollEvents();
renderer.render();
window.swapBuffers();
}
// Log application termination
logger.log(LogLevel::INFO, "Application terminated.");
return 0;
}