diff options
Diffstat (limited to 'docs/architechture.md')
| -rw-r--r-- | docs/architechture.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/architechture.md b/docs/architechture.md index 787d19d..3c47cd2 100644 --- a/docs/architechture.md +++ b/docs/architechture.md @@ -4,6 +4,13 @@ Project & engine architecture This document is a collection of vaguely related ideas surrounding how some of the core functionality of the engine is designed. +## State + +A state should define an initialization, update, and cleanup function. + +Optionally, it should define a `RenderStack` which allows customizing how your +game is rendered. Use this to add shadow mapping, secondary cameras and UI. + ## State Management [state.c](../src/state.c)  @@ -67,6 +74,20 @@ and toggling said visibility again once the key is released. ## Rendering +### Custom pipelines + +DAW initializes GLFW, which uses a "default framebuffer". When you do not setup +a custom renderpipeline (RenderStack), the default behaviour when you issue +a drawcall is for DAW to render to an internal framebuffer drawn to a texture, +which is then displayed on a fullscreen quad on the default framebuffer. You can +then define your own "default shader" to add custom post-processing. + +If you define a custom pipeline, you setup one or more framebuffers, the first +one _is_ then used by DAW in place of the "internal" one, displayed to the +"default framebuffer" for GLFW. + +This allows you to add stuff like UI on a separate layer of your pipeline. + ### Window management The plan is to spawn a new thread for each window. |
