From ff77ca470903063dd0512482c746ee2c47d2c62a Mon Sep 17 00:00:00 2001 From: omar Date: Tue, 4 Feb 2025 21:57:32 +0100 Subject: [PATCH] Add SDL3 --- Getting-Started.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Getting-Started.md b/Getting-Started.md index a833076..1bc1d9e 100644 --- a/Getting-Started.md +++ b/Getting-Started.md @@ -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) +
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) +
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"