mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-30 13:05:23 -05:00
Add SDL3
@@ -10,8 +10,8 @@ _(had to turn off wiki editing, see [Home](Home) for details. you may post meani
|
||||
- [Example: If you are using Raw Win32 API + DirectX12](#example-if-you-are-using-raw-win32-api--directx12)
|
||||
- [Example: If you are using GLFW + OpenGL/WebGL](#example-if-you-are-using-glfw--openglwebgl)
|
||||
- [Example: If you are using GLFW + Metal (on Apple devices)](#example-if-you-are-using-glfw--metal-on-apple-devices)
|
||||
- [Example: If you are using SDL2 + OpenGL/WebGL](#example-if-you-are-using-sdl2--openglwebgl)
|
||||
- [Example: If you are using SDL2 + Vulkan](#example-if-you-are-using-sdl2--vulkan)
|
||||
- [Example: If you are using SDL2/SDL3 + OpenGL/WebGL](#example-if-you-are-using-sdl2sdl3--openglwebgl)
|
||||
- [Example: If you are using SDL2/SDL3 + Vulkan](#example-if-you-are-using-sdl2sdl3--vulkan)
|
||||
- [Using another combination of backends?](#using-another-combination-of-backends)
|
||||
- [Additional code to enable Docking](#additional-code-to-enable-docking)
|
||||
- [Additional code to enable Multi-viewports](#additional-code-to-enable-multi-viewports)
|
||||
@@ -312,9 +312,12 @@ ImGui::DestroyContext();
|
||||
```
|
||||
That should be all!
|
||||
|
||||
## Example: If you are using SDL2 + OpenGL/WebGL
|
||||
## Example: If you are using SDL2/SDL3 + OpenGL/WebGL
|
||||
|
||||
Full standalone example: [example_sdl2_opengl3/main.cpp](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_opengl3/main.cpp)
|
||||
Full standalone example for SDL2: [example_sdl2_opengl3/main.cpp](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_opengl3/main.cpp)
|
||||
<BR>Full standalone example for SDL3: [example_sdl3_opengl3/main.cpp](https://github.com/ocornut/imgui/blob/master/examples/example_sdl3_opengl3/main.cpp)
|
||||
|
||||
All instructions below are for SDL2. Simply replace "SDL2" with "SDL3" to get SDL3 equivalent.
|
||||
|
||||
Add to Includes:
|
||||
```cpp
|
||||
@@ -364,14 +367,17 @@ ImGui::DestroyContext();
|
||||
```
|
||||
That should be all!
|
||||
|
||||
## Example: If you are using SDL2 + Vulkan
|
||||
## Example: If you are using SDL2/SDL3 + Vulkan
|
||||
|
||||
Full standalone example: [example_sdl2_vulkan/main.cpp](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_vulkan/main.cpp)
|
||||
Full standalone example for SDL2: [example_sdl2_vulkan/main.cpp](https://github.com/ocornut/imgui/blob/master/examples/example_sdl2_vulkan/main.cpp)
|
||||
<BR>Full standalone example for SDL3: [example_sdl3_vulkan/main.cpp](https://github.com/ocornut/imgui/blob/master/examples/example_sdl3_vulkan/main.cpp)
|
||||
|
||||
Unfortunately this is the most complex one and may not work with all app setups. We are always working on making imgui_impl_vulkan.cpp more compatible with existing engines, so please don't hesitate to post feedback.
|
||||
|
||||
You must provide a Descriptor Pool with room for at least `IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE` combined image sampler (`VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER`). You may also set the ImGui_ImplVulkan_InitInfo::DescriptorPoolSize field to that or a larger value for the backend to automatically create one for you, which won't be shared with your app.
|
||||
|
||||
All instructions below are for SDL3. Simply replace "SDL2" with "SDL3" to get SDL3 equivalent.
|
||||
|
||||
Add to Includes:
|
||||
```cpp
|
||||
#include "imgui.h"
|
||||
|
||||
Reference in New Issue
Block a user