Browse Source

Merge branch 'master' into docking

# Conflicts:
#	backends/imgui_impl_glfw.cpp
#	backends/imgui_impl_opengl3.cpp
#	docs/CHANGELOG.txt
ocornut 2 năm trước cách đây
mục cha
commit
6b3435a2db
44 tập tin đã thay đổi với 127 bổ sung52 xóa
  1. 8 8
      backends/imgui_impl_glfw.cpp
  2. 1 0
      backends/imgui_impl_opengl3.cpp
  3. 3 3
      backends/imgui_impl_opengl3_loader.h
  4. 8 2
      docs/CHANGELOG.txt
  5. 2 2
      docs/CONTRIBUTING.md
  6. 2 1
      examples/example_allegro5/example_allegro5.vcxproj
  7. 5 2
      examples/example_allegro5/example_allegro5.vcxproj.filters
  8. 1 0
      examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj
  9. 3 0
      examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters
  10. 2 1
      examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj
  11. 3 0
      examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters
  12. 1 0
      examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj
  13. 3 0
      examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters
  14. 1 0
      examples/example_glut_opengl2/example_glut_opengl2.vcxproj
  15. 5 2
      examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters
  16. 2 1
      examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj
  17. 4 1
      examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters
  18. 2 1
      examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj
  19. 4 1
      examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters
  20. 2 1
      examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj
  21. 4 1
      examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters
  22. 2 1
      examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj
  23. 4 1
      examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj.filters
  24. 2 1
      examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj
  25. 4 1
      examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters
  26. 2 1
      examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj
  27. 4 1
      examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters
  28. 10 3
      examples/example_sdl3_opengl3/main.cpp
  29. 1 0
      examples/example_win32_directx10/example_win32_directx10.vcxproj
  30. 3 0
      examples/example_win32_directx10/example_win32_directx10.vcxproj.filters
  31. 1 0
      examples/example_win32_directx11/example_win32_directx11.vcxproj
  32. 3 0
      examples/example_win32_directx11/example_win32_directx11.vcxproj.filters
  33. 1 0
      examples/example_win32_directx12/example_win32_directx12.vcxproj
  34. 3 0
      examples/example_win32_directx12/example_win32_directx12.vcxproj.filters
  35. 1 0
      examples/example_win32_directx9/example_win32_directx9.vcxproj
  36. 3 0
      examples/example_win32_directx9/example_win32_directx9.vcxproj.filters
  37. 1 1
      imgui.cpp
  38. 3 3
      imgui.h
  39. 2 2
      imgui_demo.cpp
  40. 1 1
      imgui_draw.cpp
  41. 1 1
      imgui_internal.h
  42. 1 1
      imgui_tables.cpp
  43. 1 1
      imgui_widgets.cpp
  44. 7 6
      misc/debuggers/imgui.natstepfilter

+ 8 - 8
backends/imgui_impl_glfw.cpp

@@ -21,6 +21,7 @@
 // CHANGELOG
 // CHANGELOG
 // (minor and older changes stripped away, please see git history for details)
 // (minor and older changes stripped away, please see git history for details)
 //  2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
 //  2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
+//  2023-03-16: Inputs: Fixed key modifiers handling on secondary viewports (docking branch). Broken on 2023/01/04. (#6248, #6034)
 //  2023-03-14: Emscripten: Avoid using glfwGetError() and glfwGetGamepadState() which are not correctly implemented in Emscripten emulation. (#6240)
 //  2023-03-14: Emscripten: Avoid using glfwGetError() and glfwGetGamepadState() which are not correctly implemented in Emscripten emulation. (#6240)
 //  2023-02-03: Emscripten: Registering custom low-level mouse wheel handler to get more accurate scrolling impulses on Emscripten. (#4019, #6096)
 //  2023-02-03: Emscripten: Registering custom low-level mouse wheel handler to get more accurate scrolling impulses on Emscripten. (#4019, #6096)
 //  2023-01-18: Handle unsupported glfwGetVideoMode() call on e.g. Emscripten.
 //  2023-01-18: Handle unsupported glfwGetVideoMode() call on e.g. Emscripten.
@@ -298,14 +299,13 @@ static ImGuiKey ImGui_ImplGlfw_KeyToImGuiKey(int key)
 
 
 // X11 does not include current pressed/released modifier key in 'mods' flags submitted by GLFW
 // X11 does not include current pressed/released modifier key in 'mods' flags submitted by GLFW
 // See https://github.com/ocornut/imgui/issues/6034 and https://github.com/glfw/glfw/issues/1630
 // See https://github.com/ocornut/imgui/issues/6034 and https://github.com/glfw/glfw/issues/1630
-static void ImGui_ImplGlfw_UpdateKeyModifiers()
+static void ImGui_ImplGlfw_UpdateKeyModifiers(GLFWwindow* window)
 {
 {
     ImGuiIO& io = ImGui::GetIO();
     ImGuiIO& io = ImGui::GetIO();
-    ImGui_ImplGlfw_Data* bd = ImGui_ImplGlfw_GetBackendData();
-    io.AddKeyEvent(ImGuiMod_Ctrl,  (glfwGetKey(bd->Window, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS) || (glfwGetKey(bd->Window, GLFW_KEY_RIGHT_CONTROL) == GLFW_PRESS));
-    io.AddKeyEvent(ImGuiMod_Shift, (glfwGetKey(bd->Window, GLFW_KEY_LEFT_SHIFT)   == GLFW_PRESS) || (glfwGetKey(bd->Window, GLFW_KEY_RIGHT_SHIFT)   == GLFW_PRESS));
-    io.AddKeyEvent(ImGuiMod_Alt,   (glfwGetKey(bd->Window, GLFW_KEY_LEFT_ALT)     == GLFW_PRESS) || (glfwGetKey(bd->Window, GLFW_KEY_RIGHT_ALT)     == GLFW_PRESS));
-    io.AddKeyEvent(ImGuiMod_Super, (glfwGetKey(bd->Window, GLFW_KEY_LEFT_SUPER)   == GLFW_PRESS) || (glfwGetKey(bd->Window, GLFW_KEY_RIGHT_SUPER)   == GLFW_PRESS));
+    io.AddKeyEvent(ImGuiMod_Ctrl,  (glfwGetKey(window, GLFW_KEY_LEFT_CONTROL) == GLFW_PRESS) || (glfwGetKey(window, GLFW_KEY_RIGHT_CONTROL) == GLFW_PRESS));
+    io.AddKeyEvent(ImGuiMod_Shift, (glfwGetKey(window, GLFW_KEY_LEFT_SHIFT)   == GLFW_PRESS) || (glfwGetKey(window, GLFW_KEY_RIGHT_SHIFT)   == GLFW_PRESS));
+    io.AddKeyEvent(ImGuiMod_Alt,   (glfwGetKey(window, GLFW_KEY_LEFT_ALT)     == GLFW_PRESS) || (glfwGetKey(window, GLFW_KEY_RIGHT_ALT)     == GLFW_PRESS));
+    io.AddKeyEvent(ImGuiMod_Super, (glfwGetKey(window, GLFW_KEY_LEFT_SUPER)   == GLFW_PRESS) || (glfwGetKey(window, GLFW_KEY_RIGHT_SUPER)   == GLFW_PRESS));
 }
 }
 
 
 static bool ImGui_ImplGlfw_ShouldChainCallback(GLFWwindow* window)
 static bool ImGui_ImplGlfw_ShouldChainCallback(GLFWwindow* window)
@@ -320,7 +320,7 @@ void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int acti
     if (bd->PrevUserCallbackMousebutton != nullptr && ImGui_ImplGlfw_ShouldChainCallback(window))
     if (bd->PrevUserCallbackMousebutton != nullptr && ImGui_ImplGlfw_ShouldChainCallback(window))
         bd->PrevUserCallbackMousebutton(window, button, action, mods);
         bd->PrevUserCallbackMousebutton(window, button, action, mods);
 
 
-    ImGui_ImplGlfw_UpdateKeyModifiers();
+    ImGui_ImplGlfw_UpdateKeyModifiers(window);
 
 
     ImGuiIO& io = ImGui::GetIO();
     ImGuiIO& io = ImGui::GetIO();
     if (button >= 0 && button < ImGuiMouseButton_COUNT)
     if (button >= 0 && button < ImGuiMouseButton_COUNT)
@@ -384,7 +384,7 @@ void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int keycode, int scancode, i
     if (action != GLFW_PRESS && action != GLFW_RELEASE)
     if (action != GLFW_PRESS && action != GLFW_RELEASE)
         return;
         return;
 
 
-    ImGui_ImplGlfw_UpdateKeyModifiers();
+    ImGui_ImplGlfw_UpdateKeyModifiers(window);
 
 
     if (keycode >= 0 && keycode < IM_ARRAYSIZE(bd->KeyOwnerWindows))
     if (keycode >= 0 && keycode < IM_ARRAYSIZE(bd->KeyOwnerWindows))
         bd->KeyOwnerWindows[keycode] = (action == GLFW_PRESS) ? window : nullptr;
         bd->KeyOwnerWindows[keycode] = (action == GLFW_PRESS) ? window : nullptr;

+ 1 - 0
backends/imgui_impl_opengl3.cpp

@@ -16,6 +16,7 @@
 // CHANGELOG
 // CHANGELOG
 // (minor and older changes stripped away, please see git history for details)
 // (minor and older changes stripped away, please see git history for details)
 //  2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
 //  2023-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
+//  2023-03-15: OpenGL: Fixed GL loader crash when GL_VERSION returns NULL. (#6154, #4445, #3530)
 //  2023-03-06: OpenGL: Fixed restoration of a potentially deleted OpenGL program, by calling glIsProgram(). (#6220, #6224)
 //  2023-03-06: OpenGL: Fixed restoration of a potentially deleted OpenGL program, by calling glIsProgram(). (#6220, #6224)
 //  2022-11-09: OpenGL: Reverted use of glBufferSubData(), too many corruptions issues + old issues seemingly can't be reproed with Intel drivers nowadays (revert 2021-12-15 and 2022-05-23 changes).
 //  2022-11-09: OpenGL: Reverted use of glBufferSubData(), too many corruptions issues + old issues seemingly can't be reproed with Intel drivers nowadays (revert 2021-12-15 and 2022-05-23 changes).
 //  2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.
 //  2022-10-11: Using 'nullptr' instead of 'NULL' as per our switch to C++11.

+ 3 - 3
backends/imgui_impl_opengl3_loader.h

@@ -118,7 +118,7 @@ extern "C" {
 ** included as <GL/glcorearb.h>.
 ** included as <GL/glcorearb.h>.
 **
 **
 ** glcorearb.h includes only APIs in the latest OpenGL core profile
 ** glcorearb.h includes only APIs in the latest OpenGL core profile
-** implementation together with APIs in newer ARB extensions which 
+** implementation together with APIs in newer ARB extensions which
 ** can be supported by the core profile. It does not, and never will
 ** can be supported by the core profile. It does not, and never will
 ** include functionality removed from the core profile, such as
 ** include functionality removed from the core profile, such as
 ** fixed-function vertex and fragment processing.
 ** fixed-function vertex and fragment processing.
@@ -692,8 +692,8 @@ static int parse_version(void)
     if (version.major == 0 && version.minor == 0)
     if (version.major == 0 && version.minor == 0)
     {
     {
         // Query GL_VERSION in desktop GL 2.x, the string will start with "<major>.<minor>"
         // Query GL_VERSION in desktop GL 2.x, the string will start with "<major>.<minor>"
-        const char* gl_version = (const char*)glGetString(GL_VERSION);
-        sscanf(gl_version, "%d.%d", &version.major, &version.minor);
+        if (const char* gl_version = (const char*)glGetString(GL_VERSION))
+            sscanf(gl_version, "%d.%d", &version.major, &version.minor);
     }
     }
     if (version.major < 2)
     if (version.major < 2)
         return GL3W_ERROR_OPENGL_VERSION;
         return GL3W_ERROR_OPENGL_VERSION;

+ 8 - 2
docs/CHANGELOG.txt

@@ -99,15 +99,21 @@ Other changes:
 
 
 
 
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
- VERSION 1.89.5 (In Progress)
+ VERSION 1.89.5 WIP (In Progress)
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 
 
 Breaking Changes:
 Breaking Changes:
 
 
-Other Changes:
+Other changes:
+
+- Backends: OpenGL3: Fixed GL loader crash when GL_VERSION returns NULL. (#6154, #4445, #3530)
+- Examples: Windows: Added 'misc/debuggers/imgui.natstepfilter' file to all Visual Studio projects,
+  now that VS 2022 17.6 Preview 2 support adding Debug Step Filter spec files into projects.
+- Examples: SDL3: Updated for latest WIP SDL3 branch. (#6243)
 
 
 Docking+Viewports Branch:
 Docking+Viewports Branch:
 
 
+- Backends: GLFW: Fixed key modifiers handling on secondary viewports. (#6248, #6034) [@aiekick]
 - Backends: GLFW: Fix Emscripten erroneously enabling multi-viewport support, leading to assert. (#5683)
 - Backends: GLFW: Fix Emscripten erroneously enabling multi-viewport support, leading to assert. (#5683)
 
 
 
 

+ 2 - 2
docs/CONTRIBUTING.md

@@ -2,13 +2,13 @@
 
 
 ## Index
 ## Index
 
 
-- [Getting Started & General Advices](#getting-started--general-advices)
+- [Getting Started & General Advice](#getting-started--general-advice)
 - [Issues vs Discussions](#issues-vs-discussions)
 - [Issues vs Discussions](#issues-vs-discussions)
 - [How to open an Issue](#how-to-open-an-issue)
 - [How to open an Issue](#how-to-open-an-issue)
 - [How to open a Pull Request](#how-to-open-a-pull-request)
 - [How to open a Pull Request](#how-to-open-a-pull-request)
 - [Copyright / Contributor License Agreement](#copyright--contributor-license-agreement)
 - [Copyright / Contributor License Agreement](#copyright--contributor-license-agreement)
 
 
-## Getting Started & General Advices
+## Getting Started & General Advice
 
 
 - Article: [How To Ask Good Questions](https://bit.ly/3nwRnx1).
 - Article: [How To Ask Good Questions](https://bit.ly/3nwRnx1).
 - Please browse the [Wiki](https://github.com/ocornut/imgui/wiki) to find code snippets, links and other resources (e.g. [Useful extensions](https://github.com/ocornut/imgui/wiki/Useful-Extensions)).
 - Please browse the [Wiki](https://github.com/ocornut/imgui/wiki) to find code snippets, links and other resources (e.g. [Useful extensions](https://github.com/ocornut/imgui/wiki/Useful-Extensions)).

+ 2 - 1
examples/example_allegro5/example_allegro5.vcxproj

@@ -171,10 +171,11 @@
     <ClInclude Include="..\..\backends\imgui_impl_allegro5.h" />
     <ClInclude Include="..\..\backends\imgui_impl_allegro5.h" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
   </ImportGroup>
-</Project>
+</Project>

+ 5 - 2
examples/example_allegro5/example_allegro5.vcxproj.filters

@@ -52,7 +52,10 @@
   <ItemGroup>
   <ItemGroup>
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
-      <Filter>sources</Filter>
+      <Filter>imgui</Filter>
+    </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>
-</Project>
+</Project>

+ 1 - 0
examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj

@@ -172,6 +172,7 @@
     <ClInclude Include="..\..\backends\imgui_impl_opengl2.h" />
     <ClInclude Include="..\..\backends\imgui_impl_opengl2.h" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>

+ 3 - 0
examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters

@@ -57,5 +57,8 @@
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
       <Filter>imgui</Filter>
       <Filter>imgui</Filter>
     </None>
     </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
+    </None>
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 2 - 1
examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj

@@ -173,10 +173,11 @@
     <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h" />
     <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
   </ImportGroup>
-</Project>
+</Project>

+ 3 - 0
examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters

@@ -60,5 +60,8 @@
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
       <Filter>imgui</Filter>
       <Filter>imgui</Filter>
     </None>
     </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
+    </None>
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 1 - 0
examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj

@@ -176,6 +176,7 @@
     <ClInclude Include="..\..\backends\imgui_impl_vulkan.h" />
     <ClInclude Include="..\..\backends\imgui_impl_vulkan.h" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>

+ 3 - 0
examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters

@@ -57,5 +57,8 @@
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
       <Filter>imgui</Filter>
       <Filter>imgui</Filter>
     </None>
     </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
+    </None>
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 1 - 0
examples/example_glut_opengl2/example_glut_opengl2.vcxproj

@@ -172,6 +172,7 @@
     <ClInclude Include="..\..\backends\imgui_impl_opengl2.h" />
     <ClInclude Include="..\..\backends\imgui_impl_opengl2.h" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>

+ 5 - 2
examples/example_glut_opengl2/example_glut_opengl2.vcxproj.filters

@@ -55,7 +55,10 @@
   <ItemGroup>
   <ItemGroup>
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
-      <Filter>sources</Filter>
+      <Filter>imgui</Filter>
+    </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
     </None>
     </None>
   </ItemGroup>
   </ItemGroup>
-</Project>
+</Project>

+ 2 - 1
examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj

@@ -173,10 +173,11 @@
     <ClInclude Include="..\..\backends\imgui_impl_dx11.h" />
     <ClInclude Include="..\..\backends\imgui_impl_dx11.h" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
   </ImportGroup>
-</Project>
+</Project>

+ 4 - 1
examples/example_sdl2_directx11/example_sdl2_directx11.vcxproj.filters

@@ -56,5 +56,8 @@
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
       <Filter>imgui</Filter>
       <Filter>imgui</Filter>
     </None>
     </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
+    </None>
   </ItemGroup>
   </ItemGroup>
-</Project>
+</Project>

+ 2 - 1
examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj

@@ -172,10 +172,11 @@
     <ClInclude Include="..\..\backends\imgui_impl_opengl2.h" />
     <ClInclude Include="..\..\backends\imgui_impl_opengl2.h" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
   </ImportGroup>
-</Project>
+</Project>

+ 4 - 1
examples/example_sdl2_opengl2/example_sdl2_opengl2.vcxproj.filters

@@ -57,5 +57,8 @@
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
       <Filter>imgui</Filter>
       <Filter>imgui</Filter>
     </None>
     </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
+    </None>
   </ItemGroup>
   </ItemGroup>
-</Project>
+</Project>

+ 2 - 1
examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj

@@ -173,10 +173,11 @@
     <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h" />
     <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
   </ImportGroup>
-</Project>
+</Project>

+ 4 - 1
examples/example_sdl2_opengl3/example_sdl2_opengl3.vcxproj.filters

@@ -60,5 +60,8 @@
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
       <Filter>imgui</Filter>
       <Filter>imgui</Filter>
     </None>
     </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
+    </None>
   </ItemGroup>
   </ItemGroup>
-</Project>
+</Project>

+ 2 - 1
examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj

@@ -172,10 +172,11 @@
     <ClInclude Include="..\..\backends\imgui_impl_sdlrenderer.h" />
     <ClInclude Include="..\..\backends\imgui_impl_sdlrenderer.h" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
   </ImportGroup>
-</Project>
+</Project>

+ 4 - 1
examples/example_sdl2_sdlrenderer/example_sdl2_sdlrenderer.vcxproj.filters

@@ -57,5 +57,8 @@
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
       <Filter>imgui</Filter>
       <Filter>imgui</Filter>
     </None>
     </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
+    </None>
   </ItemGroup>
   </ItemGroup>
-</Project>
+</Project>

+ 2 - 1
examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj

@@ -176,10 +176,11 @@
     <ClInclude Include="..\..\backends\imgui_impl_vulkan.h" />
     <ClInclude Include="..\..\backends\imgui_impl_vulkan.h" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
   </ImportGroup>
-</Project>
+</Project>

+ 4 - 1
examples/example_sdl2_vulkan/example_sdl2_vulkan.vcxproj.filters

@@ -57,5 +57,8 @@
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
       <Filter>imgui</Filter>
       <Filter>imgui</Filter>
     </None>
     </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
+    </None>
   </ItemGroup>
   </ItemGroup>
-</Project>
+</Project>

+ 2 - 1
examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj

@@ -173,10 +173,11 @@
     <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h" />
     <ClInclude Include="..\..\backends\imgui_impl_opengl3_loader.h" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
   </ImportGroup>
-</Project>
+</Project>

+ 4 - 1
examples/example_sdl3_opengl3/example_sdl3_opengl3.vcxproj.filters

@@ -60,5 +60,8 @@
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
       <Filter>imgui</Filter>
       <Filter>imgui</Filter>
     </None>
     </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
+    </None>
   </ItemGroup>
   </ItemGroup>
-</Project>
+</Project>

+ 10 - 3
examples/example_sdl3_opengl3/main.cpp

@@ -25,7 +25,7 @@ int main(int, char**)
     // Setup SDL
     // Setup SDL
     if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD) != 0)
     if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMEPAD) != 0)
     {
     {
-        printf("Error: %s\n", SDL_GetError());
+        printf("Error: SDL_Init(): %s\n", SDL_GetError());
         return -1;
         return -1;
     }
     }
 
 
@@ -60,11 +60,18 @@ int main(int, char**)
     SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
     SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
     SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
     SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
     SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
     SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
-    SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
-    SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL3+OpenGL3 example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags);
+    SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIDDEN);
+    SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL3+OpenGL3 example", 1280, 720, window_flags);
+    if (window == NULL)
+    {
+        printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
+        return -1;
+    }
+    SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
     SDL_GLContext gl_context = SDL_GL_CreateContext(window);
     SDL_GLContext gl_context = SDL_GL_CreateContext(window);
     SDL_GL_MakeCurrent(window, gl_context);
     SDL_GL_MakeCurrent(window, gl_context);
     SDL_GL_SetSwapInterval(1); // Enable vsync
     SDL_GL_SetSwapInterval(1); // Enable vsync
+    SDL_ShowWindow(window);
 
 
     // Setup Dear ImGui context
     // Setup Dear ImGui context
     IMGUI_CHECKVERSION();
     IMGUI_CHECKVERSION();

+ 1 - 0
examples/example_win32_directx10/example_win32_directx10.vcxproj

@@ -162,6 +162,7 @@
     <ClCompile Include="main.cpp" />
     <ClCompile Include="main.cpp" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>

+ 3 - 0
examples/example_win32_directx10/example_win32_directx10.vcxproj.filters

@@ -56,5 +56,8 @@
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
       <Filter>imgui</Filter>
       <Filter>imgui</Filter>
     </None>
     </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
+    </None>
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 1 - 0
examples/example_win32_directx11/example_win32_directx11.vcxproj

@@ -161,6 +161,7 @@
     <ClCompile Include="main.cpp" />
     <ClCompile Include="main.cpp" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>

+ 3 - 0
examples/example_win32_directx11/example_win32_directx11.vcxproj.filters

@@ -56,5 +56,8 @@
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
       <Filter>imgui</Filter>
       <Filter>imgui</Filter>
     </None>
     </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
+    </None>
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 1 - 0
examples/example_win32_directx12/example_win32_directx12.vcxproj

@@ -164,6 +164,7 @@
     <ClCompile Include="main.cpp" />
     <ClCompile Include="main.cpp" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>

+ 3 - 0
examples/example_win32_directx12/example_win32_directx12.vcxproj.filters

@@ -53,6 +53,9 @@
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
+    </None>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <Natvis Include="..\..\misc\debuggers\imgui.natvis">
     <Natvis Include="..\..\misc\debuggers\imgui.natvis">

+ 1 - 0
examples/example_win32_directx9/example_win32_directx9.vcxproj

@@ -162,6 +162,7 @@
     <ClInclude Include="..\..\backends\imgui_impl_win32.h" />
     <ClInclude Include="..\..\backends\imgui_impl_win32.h" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\..\misc\debuggers\imgui.natvis" />
     <None Include="..\README.txt" />
     <None Include="..\README.txt" />
   </ItemGroup>
   </ItemGroup>

+ 3 - 0
examples/example_win32_directx9/example_win32_directx9.vcxproj.filters

@@ -57,5 +57,8 @@
     <None Include="..\..\misc\debuggers\imgui.natvis">
     <None Include="..\..\misc\debuggers\imgui.natvis">
       <Filter>imgui</Filter>
       <Filter>imgui</Filter>
     </None>
     </None>
+    <None Include="..\..\misc\debuggers\imgui.natstepfilter">
+      <Filter>imgui</Filter>
+    </None>
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 1 - 1
imgui.cpp

@@ -1,4 +1,4 @@
-// dear imgui, v1.89.4
+// dear imgui, v1.89.5 WIP
 // (main code and documentation)
 // (main code and documentation)
 
 
 // Help:
 // Help:

+ 3 - 3
imgui.h

@@ -1,4 +1,4 @@
-// dear imgui, v1.89.4
+// dear imgui, v1.89.5 WIP
 // (headers)
 // (headers)
 
 
 // Help:
 // Help:
@@ -22,8 +22,8 @@
 
 
 // Library Version
 // Library Version
 // (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345')
 // (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM > 12345')
-#define IMGUI_VERSION               "1.89.4"
-#define IMGUI_VERSION_NUM           18940
+#define IMGUI_VERSION               "1.89.5 WIP"
+#define IMGUI_VERSION_NUM           18941
 #define IMGUI_HAS_TABLE
 #define IMGUI_HAS_TABLE
 #define IMGUI_HAS_VIEWPORT          // Viewport WIP branch
 #define IMGUI_HAS_VIEWPORT          // Viewport WIP branch
 #define IMGUI_HAS_DOCK              // Docking WIP branch
 #define IMGUI_HAS_DOCK              // Docking WIP branch

+ 2 - 2
imgui_demo.cpp

@@ -1,4 +1,4 @@
-// dear imgui, v1.89.4
+// dear imgui, v1.89.5 WIP
 // (demo code)
 // (demo code)
 
 
 // Help:
 // Help:
@@ -7540,7 +7540,7 @@ static void ShowExampleAppFullscreen(bool* p_open)
     static ImGuiWindowFlags flags = ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings;
     static ImGuiWindowFlags flags = ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings;
 
 
     // We demonstrate using the full viewport area or the work area (without menu-bars, task-bars etc.)
     // We demonstrate using the full viewport area or the work area (without menu-bars, task-bars etc.)
-    // Based on your use case you may want one of the other.
+    // Based on your use case you may want one or the other.
     const ImGuiViewport* viewport = ImGui::GetMainViewport();
     const ImGuiViewport* viewport = ImGui::GetMainViewport();
     ImGui::SetNextWindowPos(use_work_area ? viewport->WorkPos : viewport->Pos);
     ImGui::SetNextWindowPos(use_work_area ? viewport->WorkPos : viewport->Pos);
     ImGui::SetNextWindowSize(use_work_area ? viewport->WorkSize : viewport->Size);
     ImGui::SetNextWindowSize(use_work_area ? viewport->WorkSize : viewport->Size);

+ 1 - 1
imgui_draw.cpp

@@ -1,4 +1,4 @@
-// dear imgui, v1.89.4
+// dear imgui, v1.89.5 WIP
 // (drawing and font code)
 // (drawing and font code)
 
 
 /*
 /*

+ 1 - 1
imgui_internal.h

@@ -1,4 +1,4 @@
-// dear imgui, v1.89.4
+// dear imgui, v1.89.5 WIP
 // (internal structures/api)
 // (internal structures/api)
 
 
 // You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.
 // You may use this file to debug, understand or extend Dear ImGui features but we don't provide any guarantee of forward compatibility.

+ 1 - 1
imgui_tables.cpp

@@ -1,4 +1,4 @@
-// dear imgui, v1.89.4
+// dear imgui, v1.89.5 WIP
 // (tables and columns code)
 // (tables and columns code)
 
 
 /*
 /*

+ 1 - 1
imgui_widgets.cpp

@@ -1,4 +1,4 @@
-// dear imgui, v1.89.4
+// dear imgui, v1.89.5 WIP
 // (widgets code)
 // (widgets code)
 
 
 /*
 /*

+ 7 - 6
misc/debuggers/imgui.natstepfilter

@@ -3,14 +3,15 @@
 .natstepfilter file for Visual Studio debugger.
 .natstepfilter file for Visual Studio debugger.
 Purpose: instruct debugger to skip some functions when using StepInto (F11)
 Purpose: instruct debugger to skip some functions when using StepInto (F11)
 
 
-To enable:
+Since Visual Studio 2022 version 17.6 Preview 2 (currently available as a "Preview" build on March 14, 2023)
+It is possible to add the .natstepfilter file to your project file and it will automatically be used.
+(https://developercommunity.visualstudio.com/t/allow-natstepfilter-and-natjmc-to-be-included-as-p/561718)
+
+For older Visual Studio version prior to 2022 17.6 Preview 2:
 * copy in %USERPROFILE%\Documents\Visual Studio XXXX\Visualizers (current user)
 * copy in %USERPROFILE%\Documents\Visual Studio XXXX\Visualizers (current user)
 * or copy in %VsInstallDirectory%\Common7\Packages\Debugger\Visualizers (all users)
 * or copy in %VsInstallDirectory%\Common7\Packages\Debugger\Visualizers (all users)
-If you have multiple VS version installed, the version that matters is the one you are using the IDE/debugger of (not the compiling toolset).
-This is supported since Visual Studio 2012.
-
-Unfortunately, unlike .natvis files, it isn't yet possible to include this file in your project :(
-You may upvote this: https://developercommunity.visualstudio.com/t/allow-natstepfilter-and-natjmc-to-be-included-as-p/561718
+If you have multiple VS version installed, the version that matters is the one you are using the IDE/debugger
+of (not the compiling toolset). This is supported since Visual Studio 2012.
 
 
 More information at: https://docs.microsoft.com/en-us/visualstudio/debugger/just-my-code?view=vs-2019#BKMK_C___Just_My_Code
 More information at: https://docs.microsoft.com/en-us/visualstudio/debugger/just-my-code?view=vs-2019#BKMK_C___Just_My_Code
 -->
 -->