Sync LWJGL backends with ImGui upstream (OpenGL3 + GLFW)#391
Merged
Conversation
- Add init overloads for OpenGL, Vulkan, and generic rendering - Pick up upstream input fixes (GLFW_KEY_WORLD_1/2 mapping, key translation, mouse-leave sentinel) - Improve monitor tracking: skip zero-size/DPI monitors, preserve list on no-valid-monitor - Add cursor caching to suppress redundant glfwSetCursor/glfwSetInputMode calls - Add helpers: isWayland, getContentScaleForWindow/Monitor, getWindowSizeAndFramebufferScale, sleep - Skip PlatformHasViewports on Wayland - Fix glfwHawWindowTopmost typo → glfwHasWindowTopmost - Document intentional omissions (Vulkan, Win32 WndProc, X11 SetWindowFloating, legacy fns) - Report runtime GLFW version in platform name Co-authored-by: Claude <noreply@anthropic.com>
…2f4c23) Mirror upstream capability gating (HasPolygonMode, HasBindSampler, HasClipOrigin, MaxTextureSize, ES3-on-desktop detection), save/restore order in RenderDrawData, GL_PIXEL_UNPACK_BUFFER backup in createDeviceObjects, font-texture GL_UNPACK_ALIGNMENT=1 and GL_CLAMP_TO_EDGE wraps, and multi-viewport clear color (0,0,0,1). Intentionally omitted upstream pieces carry inline comments pointing at follow-up work. Restore the GLFW framebuffer-scale Linux non-Wayland override (forces 1,1) that was held back during the earlier GLFW sync. Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update LWJGL Backend Implementations to Match Recent ImGui C++ Changes
Summary
This PR synchronizes the imgui-java LWJGL backend implementations with the latest Dear ImGui C++ code (commit
32f4c23). The changes modernize OpenGL 3 rendering and GLFW platform integration to support contemporary graphics configurations and improve compatibility across platforms.Key Changes
ImGuiImplGl3.java:
hasPolygonMode,hasBindSampler) for better ES3 compatibilityImGuiImplGlfw.java:
getContentScaleForWindow()andgetContentScaleForMonitor()Type of change