|
| 1 | +# API Overview |
| 2 | + |
| 3 | +## The application interface |
| 4 | + |
| 5 | +Needed to use their windowing system |
| 6 | + |
| 7 | +Talk about the macro `DEFINE_APPLICATION_MAIN` at the bottom of this file |
| 8 | + |
| 9 | +Defined in the `OS` project |
| 10 | + |
| 11 | +Not mandatory, possible to use SDL2 or GLFW, but latest game consoles not handled by these libs while they are with TheForge |
| 12 | + |
| 13 | +```c++ |
| 14 | +class IApp |
| 15 | +{ |
| 16 | +public: |
| 17 | + // this pair of functions initializes and exits once during start-up and shut-down of the application |
| 18 | + // we open and close all the resources that will never change during the live span of an application |
| 19 | + // in other words, they are independent from any user changes to the device and quality settings |
| 20 | + // typically this is restricted to for example to loading and unloading geometry |
| 21 | + virtual bool Init() = 0; |
| 22 | + virtual void Exit() = 0; |
| 23 | + |
| 24 | + // this pair of functions loads and unloads everything that need to be re-loaded in case of a device change. |
| 25 | + // device changes can come from a user switching from hardware to Warp rendering support or switching on and off MSAA |
| 26 | + // and other quality settings |
| 27 | + // typically shaders, textures, render targets and buffers are loaded here |
| 28 | + virtual bool Load() = 0; |
| 29 | + virtual void Unload() = 0; |
| 30 | + |
| 31 | + // this is input / math update -> everything CPU only ... no Graphics API calls |
| 32 | + virtual void Update(float deltaTime) = 0; |
| 33 | + |
| 34 | + // only Graphics API draw calls and command buffer generation |
| 35 | + virtual void Draw() = 0; |
| 36 | + |
| 37 | + virtual const char* GetName() = 0; |
| 38 | +} |
| 39 | +``` |
| 40 | +
|
| 41 | +## Init |
| 42 | +
|
| 43 | +Need to create the renderer |
| 44 | +
|
| 45 | +### Queue families |
| 46 | +
|
| 47 | +### Command Pool |
| 48 | +
|
| 49 | +### Synchronisation primitives |
| 50 | +
|
| 51 | +#### Fences |
| 52 | +
|
| 53 | +#### Semaphores |
| 54 | +
|
| 55 | +### Samplers |
| 56 | +
|
| 57 | +### Resources |
| 58 | +
|
| 59 | +#### Textures |
| 60 | +
|
| 61 | +#### Models |
| 62 | +
|
| 63 | +### Shaders |
| 64 | +
|
| 65 | +#### Root Signature |
| 66 | +
|
| 67 | +#### Buffer Load Description |
| 68 | +
|
| 69 | +#### Descriptor sets |
| 70 | +
|
| 71 | +### UI |
| 72 | +
|
| 73 | +### User Inputs |
| 74 | +
|
| 75 | +## Load |
| 76 | +
|
| 77 | +### SwapChain |
| 78 | +
|
| 79 | +### DepthBuffer |
| 80 | +
|
| 81 | +### Graphics Pipeline Description |
| 82 | +
|
| 83 | +#### Vertex layout |
| 84 | +
|
| 85 | +#### Rasterizer State Description |
| 86 | +
|
| 87 | +#### Depth State Description |
| 88 | +
|
| 89 | +## Update |
| 90 | +
|
| 91 | +### Camera |
| 92 | +
|
| 93 | +### User inputs |
| 94 | +
|
| 95 | +### Uniforms local values |
| 96 | +
|
| 97 | +## Draw |
| 98 | +
|
| 99 | +### Swapchain |
| 100 | +
|
| 101 | +### Render target |
| 102 | +
|
| 103 | +### Synchronisation primitives |
| 104 | +
|
| 105 | +### Uniform buffers update |
| 106 | +
|
| 107 | +### Command generation |
| 108 | +
|
| 109 | +### Microprofiler markers |
| 110 | +
|
| 111 | +### Queue Submit |
| 112 | +
|
0 commit comments