blob: c3c1a079ee5dfab9ed40696240f7c954405bcfb4 (
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
39
|
# Modules
This document aims to document how the engine modules are designed to work
together.
_This is not a description of the current state of this project, but rather
where I want it to be._
A module provides some basic functionality to the engine. Since that is
incredibly broad, we define specific resources and functions to be implemented
by each module in order to function with daw.
## Goals
The design and implementation of the module system aims to provide the
following features:
1. Hot reloading modules.
2. Provide a implementation and platform agnostic interface.
3. Allow implementations to be easily interchangeable.
## Types
DAW defines different module types, each type is a definition of a _struct_ that
a module of that specific type must implement. It usually consists of function
pointers that are called by the core of the engine. A specific function could be
the `window_init` function, required by the `Platform` module type.
## TODO
This module system is, at this current commit in time, nowhere near the above
description.
Once all of this is done in code I want to make sure the static compilation
configuration does not rely on function pointers, but on functions
themselves. This is probably done through macros.
|