You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backends/imgui_impl_vulkan.cpp
+1-1
Original file line number
Diff line number
Diff line change
@@ -594,7 +594,7 @@ void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer comm
594
594
// Note: at this point both vkCmdSetViewport() and vkCmdSetScissor() have been called.
595
595
// Our last values will leak into user/application rendering IF:
596
596
// - Your app uses a pipeline with VK_DYNAMIC_STATE_VIEWPORT or VK_DYNAMIC_STATE_SCISSOR dynamic state
597
-
// - And you forgot to call vkCmdSetViewport() and vkCmdSetScissor() yourself to explicitely set that state.
597
+
// - And you forgot to call vkCmdSetViewport() and vkCmdSetScissor() yourself to explicitly set that state.
598
598
// If you use VK_DYNAMIC_STATE_VIEWPORT or VK_DYNAMIC_STATE_SCISSOR you are responsible for setting the values before rendering.
599
599
// In theory we should aim to backup/restore those values but I am not sure this is possible.
600
600
// We perform a call to vkCmdSetScissor() to set back a full viewport which is likely to fix things for 99% users but technically this is not perfect. (See github #4644)
Copy file name to clipboardExpand all lines: docs/BACKENDS.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -5,22 +5,22 @@ _(You may browse this at https://github.com/ocornut/imgui/blob/master/docs/BACKE
5
5
**The backends/ folder contains backends for popular platforms/graphics API, which you can use in
6
6
your application or engine to easily integrate Dear ImGui.** Each backend is typically self-contained in a pair of files: imgui_impl_XXXX.cpp + imgui_impl_XXXX.h.
7
7
8
-
- The 'Platform' backends are in charge of: mouse/keyboard/gamepad inputs, cursor shape, timing, windowing.<BR>
8
+
- The 'Platform' backends are in charge of: mouse/keyboard/gamepad inputs, cursor shape, timing, and windowing.<BR>
9
9
e.g. Windows ([imgui_impl_win32.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_win32.cpp)), GLFW ([imgui_impl_glfw.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_glfw.cpp)), SDL2 ([imgui_impl_sdl.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_sdl.cpp)), etc.
10
10
11
-
- The 'Renderer' backends are in charge of: creating atlas texture, rendering imgui draw data.<BR>
11
+
- The 'Renderer' backends are in charge of: creating atlas texture, and rendering imgui draw data.<BR>
12
12
e.g. DirectX11 ([imgui_impl_dx11.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_dx11.cpp)), OpenGL/WebGL ([imgui_impl_opengl3.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_opengl3.cpp)), Vulkan ([imgui_impl_vulkan.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_vulkan.cpp)), etc.
13
13
14
-
- For some high-level frameworks, a single backend usually handle both 'Platform' and 'Renderer' parts.<BR>
14
+
- For some high-level frameworks, a single backend usually handles both 'Platform' and 'Renderer' parts.<BR>
15
15
e.g. Allegro 5 ([imgui_impl_allegro5.cpp](https://github.com/ocornut/imgui/blob/master/backends/imgui_impl_allegro5.cpp)). If you end up creating a custom backend for your engine, you may want to do the same.
16
16
17
-
An application usually combines 1 Platform backend + 1 Renderer backend + main Dear ImGui sources.
17
+
An application usually combines one Platform backend + one Renderer backend + main Dear ImGui sources.
18
18
For example, the [example_win32_directx11](https://github.com/ocornut/imgui/tree/master/examples/example_win32_directx11) application combines imgui_impl_win32.cpp + imgui_impl_dx11.cpp. There are 20+ examples in the [examples/](https://github.com/ocornut/imgui/blob/master/examples/) folder. See [EXAMPLES.MD](https://github.com/ocornut/imgui/blob/master/docs/EXAMPLES.md) for details.
19
19
20
20
**Once Dear ImGui is setup and running, run and refer to `ImGui::ShowDemoWindow()` in imgui_demo.cpp for usage of the end-user API.**
21
21
22
22
23
-
### What are backends
23
+
### What are backends?
24
24
25
25
Dear ImGui is highly portable and only requires a few things to run and render, typically:
26
26
@@ -41,7 +41,7 @@ Dear ImGui is highly portable and only requires a few things to run and render,
41
41
This is essentially what each backend is doing + obligatory portability cruft. Using default backends ensure you can get all those features including the ones that would be harder to implement on your side (e.g. multi-viewports support).
42
42
43
43
It is important to understand the difference between the core Dear ImGui library (files in the root folder)
44
-
and backends which we are describing here (backends/ folder).
44
+
and the backends which we are describing here (backends/ folder).
45
45
46
46
- Some issues may only be backend or platform specific.
47
47
- You should be able to write backends for pretty much any platform and any 3D graphics API.
@@ -109,19 +109,19 @@ Think twice!
109
109
If you are new to Dear ImGui, first try using the existing backends as-is.
110
110
You will save lots of time integrating the library.
111
111
You can LATER decide to rewrite yourself a custom backend if you really need to.
112
-
In most situations, custom backends have less features and more bugs than the standard backends we provide.
112
+
In most situations, custom backends have fewer features and more bugs than the standard backends we provide.
113
113
If you want portability, you can use multiple backends and choose between them either at compile time
114
114
or at runtime.
115
115
116
116
**Example A**: your engine is built over Windows + DirectX11 but you have your own high-level rendering
117
117
system layered over DirectX11.<BR>
118
118
Suggestion: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
119
-
Once it works, if you really need it you can replace the imgui_impl_dx11.cpp code with a
119
+
Once it works, if you really need it, you can replace the imgui_impl_dx11.cpp code with a
120
120
custom renderer using your own rendering functions, and keep using the standard Win32 code etc.
121
121
122
-
**Example B**: your engine runs on Windows, Mac, Linux and uses DirectX11, Metal, Vulkan respectively.<BR>
122
+
**Example B**: your engine runs on Windows, Mac, Linux and uses DirectX11, Metal, and Vulkan respectively.<BR>
123
123
Suggestion: use multiple generic backends!
124
-
Once it works, if you really need it you can replace parts of backends with your own abstractions.
124
+
Once it works, if you really need it, you can replace parts of backends with your own abstractions.
125
125
126
126
**Example C**: your engine runs on platforms we can't provide public backends for (e.g. PS4/PS5, Switch),
0 commit comments