diff options
author | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-05-12 20:07:17 +1000 |
---|---|---|
committer | omniscient <17525998+omnisci3nce@users.noreply.github.com> | 2024-05-12 20:07:17 +1000 |
commit | 02e84ee4d18e705e3362be1e327fdb6f1397a032 (patch) | |
tree | db2d0d297df3049de7f88733b8d61034ec2c0fa1 /docs | |
parent | d6d83264ff9446f19b8f611f8173812d783a20c2 (diff) |
expand docs
Diffstat (limited to 'docs')
-rw-r--r-- | docs/Contributing/c-coding-style.md | 13 | ||||
-rw-r--r-- | docs/Contributing/naming.md | 29 | ||||
-rw-r--r-- | docs/index.md | 24 | ||||
-rw-r--r-- | docs/project-layout.md | 9 | ||||
-rw-r--r-- | docs/rendering.md | 8 |
5 files changed, 70 insertions, 13 deletions
diff --git a/docs/Contributing/c-coding-style.md b/docs/Contributing/c-coding-style.md new file mode 100644 index 0000000..4e268cc --- /dev/null +++ b/docs/Contributing/c-coding-style.md @@ -0,0 +1,13 @@ +--- +title: C Coding Style +--- + +A lot of these should be forced onto you by `clang-format` and `clang-tidy` but for posterity here are +a few of the styles that we stick to. + +* **Pointer next to type** - we use `type* variable` in function signatures and variable declarations e.g. `mat4* model` + + +## Memory + +### Arena allocation diff --git a/docs/Contributing/naming.md b/docs/Contributing/naming.md new file mode 100644 index 0000000..518c22e --- /dev/null +++ b/docs/Contributing/naming.md @@ -0,0 +1,29 @@ +--- +title: Naming Conventions +--- + +#### 1. Prefer SOV function names + +Prefer SOV Subject Object Verb naming for functions. + +This makes it very easy to find the functions you want with autocomplete and maintain a consistent naming convention +throughout the codebase. + +e.g. + +* `renderer_frame_begin` +* `engine_tick_begin` +* `texture_data_load` + +--- + +#### 2. Long-running systems + +systems that run for the lifetime of the application or for a very long time should have: + +* `bool system_init(system_state* state)` a `init` function +* `void system_shutdown(system_state* state)` and a `shutdown` function + +--- + +#### 3. TODO
\ No newline at end of file diff --git a/docs/index.md b/docs/index.md index f889ee0..54d6383 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,11 +4,12 @@ Welcome to the Celeritas Game Engine's documentation! ## What is it? -Celeritas is a small 3D game engine written in OCaml **and** plain ol' C. +Celeritas is a small 3D game engine written in plain ol' C **and** OCaml. The idea underlying celeritas is to have a small versatile "core" that can then be added to from other languages. This means you could add gameplay systems in OCaml but rely on the celeritas core layer to do all the heavy lifting -when it comes to computation or rendering. +when it comes to computation or rendering. I will be providing ocaml bindings to the C API but implementing Lua bindings for example +would be fairly trivial. **What does 'celeritas' mean?** @@ -17,26 +18,25 @@ Celeritas is the original Latin word for celerity that the English is derived fr ## Feature Set -_(as of Jan 2024)_ +**Implemented (core)** -**Implemented** - -* OpenGL renderer backend! ((*need to port Metal renderer over*)) +* Vulkan & OpenGL renderer backends (*need to port Metal renderer over*) * Basic Blinn-Phong lighting model (*need to port from old project*) -* Task queue for loading mesh and texture data into memory on background threads (*how do we want to do this with OCaml engine?*) +* Task queue for loading mesh and texture data into memory on background threads **In-progress** -* UI system +* Skeletal animation **Roadmap going forwards** -* Skeletal animation +* Collision detection * Terrain rendering +* GPU-driven rendering ## Getting started -Check out these in order +Check these pages out -<!-- * [Getting started](getting-started.md) --> -<!-- * [Project layout](project-layout.md) -->
\ No newline at end of file +* [Getting started](getting-started.md) +* [Project layout](project-layout.md)
\ No newline at end of file diff --git a/docs/project-layout.md b/docs/project-layout.md new file mode 100644 index 0000000..74a84aa --- /dev/null +++ b/docs/project-layout.md @@ -0,0 +1,9 @@ +--- +title: Project Layout +--- + +``` +deps/ - third-party dependencies +docs/ - these docs you're reading now that get built with mkdocs +TODO: the rest... +```
\ No newline at end of file diff --git a/docs/rendering.md b/docs/rendering.md index 0081ac5..05da5fc 100644 --- a/docs/rendering.md +++ b/docs/rendering.md @@ -1 +1,7 @@ -# Rendering
\ No newline at end of file +# Rendering + +Rendering is split into 3 'registers'. + +1. **RAL** (Render Abstraction Layer) - thin abstraction over graphics APIs +2. **render** - implements the default renderer and higher-level functions like `draw_scene` +3. **immediate** - immediate-mode drawing API for things like debug visualisation and UI
\ No newline at end of file |