Repository navigation
Conversation
Port imgui_impl_sdlrenderer3 to the LWJGL SDL3 bindings. The backend uses SDL_RenderGeometryRaw and supports user textures, vertex offsets and draw-call clipping. The legacy font-atlas texture flow is kept because the binding does not expose ImTextureData yet. Add WindowSdlRenderer and Backend.SDL_RENDERER so imgui-app can drive the backend, plus the MainSdlRenderer smoke test and README notes. Co-authored-by: DeepSeek <noreply@deepseek.com>
This branch has not been deployed
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.
Summary
Adds a Java port of
imgui_impl_sdlrenderer3toimgui-lwjgl3and exposes it throughimgui-appasBackend.SDL_RENDERER/WindowSdlRenderer. The backend supports user textures, vertex offsets and draw-call clipping, and ships a runnableMainSdlRenderersmoke test.Type of change
Notes for reviewer
WindowSdlRenderersetsSDL_SetRenderScale(io.DisplayFramebufferScale)before each render, mirroring upstreamexample_sdl3_sdlrenderer3. Without it, HiDPI content commands are clipped and mouse hit-testing is offset.ImGuiBackendFlags_RendererHasTexturesis not set: the binding does not exposeImTextureData, socreateFontsTexture()keeps the legacyImFontAtlas#setTexIDpath. Dynamic atlas updates are therefore not honored.ImDrawListuser callbacks are not exposed by the binding and cannot be dispatched../gradlew buildAll, checkstyle, javadoc, and runtime pixel readback on macOS Retina (1280x768 window, 2560x1536 framebuffer) for rectangle, text andWindowSdlRendererlifecycle.