blob: 237aaf84a8d1a5a462c5b472a983c9595a21a8ec (
plain)
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 "platform.h"
#include <GLFW/glfw3.h>
static GLFWwindow* window = nullptr;
void platform_init() {
glfwInit();
window = glfwCreateWindow(1280, 720, "demo64k", nullptr, nullptr);
}
void platform_shutdown() {
glfwDestroyWindow(window);
glfwTerminate();
}
void platform_poll() {
glfwPollEvents();
}
bool platform_should_close() {
return glfwWindowShouldClose(window);
}
GLFWwindow* platform_get_window() {
return window;
}
double platform_get_time() {
return glfwGetTime();
}
|