summaryrefslogtreecommitdiff
path: root/src/core.h
blob: db711d0e3016a1a772d7f09df08d6eca12c8675b (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
31
32
33
34
35
36
37
38
#pragma once

#include "input.h"
#include "screenspace.h"
#include "scene.h"
#include "terrain.h"
#include "text.h"
// #include "threadpool.h"

typedef struct core {
  const char* app_name;
  // foundations
  renderer renderer;
  // threadpool threadpool;
  // systems
  input_state input;
  text_system_state text;
  terrain_state terrain;
  screenspace_state screenspace;
  // data storage
  scene default_scene;
  model_darray* models;
} core;

core* get_global_core();

// --- Lifecycle

/** @brief Throws error if the core cannot be instantiated */
void core_bringup();
void core_shutdown();
bool should_exit();

void frame_begin();
void frame_draw();
void frame_end();

void core_input_update();