Commit 44b2dca
authored
Unshackle renderer; move DearImGui into engine; merge editor with context (#42)
* Merge editor into context; use Gui interface for Renderer
- Move `DearImGui` to engine (internal), have `Engine` create a `GuiDearImGui` instance for the main window.
* Restrict Dear ImGui to a single instance
* Avoid passing incomplete `Renderer` instance to `Gui`.
A class instance technically isn't constructed until the constructor returns: `Renderer` passes `*this` to `Gui` to initialize it.
Duplicate `DearImGui::CreateInfo` as `Gui::InitInfo` instead.
* Remove (now) unecessary API, make DearImGui constructor private
`ConstructTag` approach yields a cleaner implementation: can pass such a dummy object to `std::make_unique` directly instead of having to construct `DearImGui` instance manually, but it muddies the API. Having a private constructor makes it clear to readers that an instance of this class cannot be constructed externally.
* Integrate DearImGui into engine
- Move `Glfw::Wsi` into its own header. (Avoid including vulkan in glfw.hpp).
* Move Window ownership to Context
- Add docs for Engine and Context.
* Cleanup, docs
* Lock shared mutex before using device queue
- Add `Engine::Validation` to enable users to override default logic. This will be useful with RenderDoc, which refuses to load an app that even attempts to check if validation layers are available, unless layers are available in PATH.
- Remove `.at()` indexing in `Scene`: harder to figure out where the problem is when debugging: stack unwinds all the way to try/catch in main.
- Add default camera to `Scene` on its construction.1 parent 492e8bd commit 44b2dca
File tree
33 files changed
+404
-309
lines changed- lib
- context
- include/facade/context
- editor
- src
- editor
- editor
- engine
- include/facade/engine
- src
- glfw
- include/facade/glfw
- src
- render
- include/facade/render
- src
- detail
- scene
- include/facade/scene
- src
- vk
- include/facade/vk
- src
- src
33 files changed
+404
-309
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
38 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
39 | 49 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
7 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
8 | 23 | | |
9 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
10 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
11 | 35 | | |
12 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
13 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
14 | 45 | | |
15 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
16 | 54 | | |
17 | 55 | | |
18 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
19 | 65 | | |
20 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
21 | 69 | | |
22 | 70 | | |
23 | 71 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
88 | 99 | | |
89 | 100 | | |
90 | 101 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
5 | 19 | | |
6 | | - | |
| 20 | + | |
7 | 21 | | |
8 | 22 | | |
9 | | - | |
| 23 | + | |
10 | 24 | | |
11 | 25 | | |
12 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
13 | 31 | | |
14 | 32 | | |
15 | | - | |
16 | | - | |
| 33 | + | |
| 34 | + | |
17 | 35 | | |
18 | | - | |
| 36 | + | |
| 37 | + | |
19 | 38 | | |
20 | 39 | | |
21 | 40 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
| |||
0 commit comments