A 3D game engine from scratch.
1// (c) 2020 Vlad-Stefan Harbuz <vlad@vladh.net>
2
3#pragma once
4
5#include <GLFW/glfw3.h>
6#include "types.hpp"
7#include "renderer.hpp"
8#include "common.hpp"
9
10class core {
11public:
12 static WindowSize * get_window_size();
13 static int run();
14 static void framebuffer_size_callback(GLFWwindow* window, int width, int height);
15 static void mouse_button_callback(GLFWwindow *window, int button, int action, int mods);
16 static void mouse_callback(GLFWwindow *window, f64 x, f64 y);
17 static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods);
18 static void char_callback(GLFWwindow* window, u32 codepoint);
19
20private:
21 static bool init_state(State *state, memory::Pool *asset_memory_pool);
22 static memory::Pool * get_asset_memory_pool();
23 static void destroy_state(State *state);
24
25 static State *state;
26};