From 8c0b41037151d3b3c0f81d8dbcb508bda8b0b6f5 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 19 Jan 2026 16:18:18 +0100 Subject: [PATCH] Docs: tweaks. --- backends/imgui_impl_win32.cpp | 2 +- backends/imgui_impl_win32.h | 4 ++-- docs/CHANGELOG.txt | 22 +++++++++++----------- examples/example_android_opengl3/main.cpp | 6 ------ 4 files changed, 14 insertions(+), 20 deletions(-) diff --git a/backends/imgui_impl_win32.cpp b/backends/imgui_impl_win32.cpp index de3c6fbd6..c344a1417 100644 --- a/backends/imgui_impl_win32.cpp +++ b/backends/imgui_impl_win32.cpp @@ -830,7 +830,7 @@ IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandlerEx(HWND hwnd, UINT msg, WPA // - Your own app may already do this via a manifest or explicit calls. This is mostly useful for our examples/ apps. // - In theory we could call simple functions from Windows SDK such as SetProcessDPIAware(), SetProcessDpiAwareness(), etc. // but most of the functions provided by Microsoft require Windows 8.1/10+ SDK at compile time and Windows 8/10+ at runtime, -// neither we want to require the user to have. So we dynamically select and load those functions to avoid dependencies. +// neither of which we want to require the user to have. So we dynamically select and load those functions to avoid dependencies. //--------------------------------------------------------------------------------------------------------- // This is the scheme successfully used by GLFW (from which we borrowed some of the code) and other apps aiming to be highly portable. // ImGui_ImplWin32_EnableDpiAwareness() is just a helper called by main.cpp, we don't call it automatically. diff --git a/backends/imgui_impl_win32.h b/backends/imgui_impl_win32.h index 5ae399e0e..d2a960059 100644 --- a/backends/imgui_impl_win32.h +++ b/backends/imgui_impl_win32.h @@ -26,7 +26,7 @@ IMGUI_IMPL_API bool ImGui_ImplWin32_InitForOpenGL(void* hwnd); IMGUI_IMPL_API void ImGui_ImplWin32_Shutdown(); IMGUI_IMPL_API void ImGui_ImplWin32_NewFrame(); -// Win32 message handler your application need to call. +// Win32 message handler your application needs to call. // - Intentionally commented out in a '#if 0' block to avoid dragging dependencies on from this helper. // - You should COPY the line below into your .cpp code to forward declare the function and then you can call it. // - Call from your application's message handler. Keep calling your message handler unless this function returns TRUE. @@ -40,7 +40,7 @@ extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg // - Your own app may already do this via a manifest or explicit calls. This is mostly useful for our examples/ apps. // - In theory we could call simple functions from Windows SDK such as SetProcessDPIAware(), SetProcessDpiAwareness(), etc. // but most of the functions provided by Microsoft require Windows 8.1/10+ SDK at compile time and Windows 8/10+ at runtime, -// neither we want to require the user to have. So we dynamically select and load those functions to avoid dependencies. +// neither of which we want to require the user to have. So we dynamically select and load those functions to avoid dependencies. IMGUI_IMPL_API void ImGui_ImplWin32_EnableDpiAwareness(); IMGUI_IMPL_API float ImGui_ImplWin32_GetDpiScaleForHwnd(void* hwnd); // HWND hwnd IMGUI_IMPL_API float ImGui_ImplWin32_GetDpiScaleForMonitor(void* monitor); // HMONITOR monitor diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index e8ff5aa0d..023ae0263 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -187,33 +187,33 @@ Other Changes: - Improve error handling and recovery for TableSetupColumn(). - Debug Tools: - Debug Log: fixed incorrectly printing characters in IO log when submitting - non-ASCII values to io.AddInputCharacter(). (#9099) + non-ASCII values to `io.AddInputCharacter()`. (#9099) - Debug Log: can output to debugger on Windows. (#5855) - Backends: - - DirectX10: added 'SamplerNearest' in ImGui_ImplDX10_RenderState. - (+renamed 'SamplerDefault' to 'SamplerLinear', which was tagged as beta API) - - DirectX11: added 'SamplerNearest' in ImGui_ImplDX11_RenderState. - (+renamed 'SamplerDefault' to 'SamplerLinear', which was tagged as beta API) - - GLFW: Avoid repeated glfwSetCursor()/glfwSetInputMode() calls when unnecessary. + - DirectX10: added `SamplerNearest` in `ImGui_ImplDX10_RenderState`. + (+renamed `SamplerDefault` to `SamplerLinear`, which was tagged as beta API) + - DirectX11: added `SamplerNearest` in ImGui_ImplDX11_RenderState. + (+renamed `SamplerDefault` to `SamplerLinear`, which was tagged as beta API) + - GLFW: Avoid repeated `glfwSetCursor()` / `glfwSetInputMode()` unnecessary calls. Lowers overhead for very high framerates (e.g. 10k+ FPS). [@maxliani] - GLFW: Added IMGUI_IMPL_GLFW_DISABLE_X11 / IMGUI_IMPL_GLFW_DISABLE_WAYLAND to forcefully disable either. (#9109, #9116) - OpenGL3: Fixed embedded loader multiple init/shutdown cycles broken on some platforms. (#8792, #9112) - - SDL2, SDL3: changed GetClipboardText() handler to return NULL on error aka + - SDL2, SDL3: changed `GetClipboardText()` handler to return NULL on error aka clipboard contents is not text. Consistent with other backends. (#9168) - - SDL_GPU3: added 'TexSamplerNearest' in ImGui_ImplSDLGPU3_RenderState. + - SDL_GPU3: added `SamplerNearest` in `ImGui_ImplSDLGPU3_RenderState`. - SDL_GPU3: macOS version can use MSL shaders in order to support macOS 10.14+ (vs Metallib shaders requiring macOS 14+). Requires application calling - SDL_CreateGPUDevice() with SDL_GPU_SHADERFORMAT_MSL. (#9076) [@Niminem] + `SDL_CreateGPUDevice()` with `SDL_GPU_SHADERFORMAT_MSL`. (#9076) [@Niminem] - Vulkan: helper for creating a swapchain (used by examples and multi-viewports) selects `VkSwapchainCreateInfoKHR`'s `compositeAlpha` value based on `cap.supportedCompositeAlpha`, which seems to be required on some Android devices. (#8784) [@FelixStach] - - Win32: handle WM_IME_CHAR/WM_IME_COMPOSITION to support Unicode inputs on + - Win32: handle `WM_IME_CHAR`/`WM_IME_COMPOSITION` to support Unicode inputs on MBCS (non-Unicode) Windows. (#9099, #3653, #5961) [@ulhc, @ocornut, @Othereum] - Examples: - - Win32+DirectX12: ignore seemingly incorrect D3D12_MESSAGE_ID_FENCE_ZERO_WAIT + - Win32+DirectX12: ignore seemingly incorrect `D3D12_MESSAGE_ID_FENCE_ZERO_WAIT` warning on startups on some setups. (#9084, #9093) [@RT2Code, @LeoGautheron] diff --git a/examples/example_android_opengl3/main.cpp b/examples/example_android_opengl3/main.cpp index 0de952dbd..7f60ac631 100644 --- a/examples/example_android_opengl3/main.cpp +++ b/examples/example_android_opengl3/main.cpp @@ -151,12 +151,6 @@ void Init(struct android_app* app) ImGui_ImplAndroid_Init(g_App->window); ImGui_ImplOpenGL3_Init("#version 300 es"); - // Load Fonts - // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them. - // - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit). - // - Read 'docs/FONTS.md' for more instructions and details. If you like the default font but want it to scale better, consider using the 'ProggyVector' from the same author! - // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ ! - // Setup scaling float main_scale = 2.0f; ImGuiStyle& style = ImGui::GetStyle();