Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: SpaiR/imgui-java
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: Igrium/imgui-java
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 9 commits
  • 15 files changed
  • 2 contributors

Commits on Jul 23, 2026

  1. feat(api): add ImTextureData texture-management types

    Bind Dear ImGui 1.92's texture-management structs and enums so backends can
    drive ImGuiBackendFlags_RendererHasTextures:
    
    - ImTextureFormat / ImTextureStatus flag enums (AST-generated).
    - ImTextureRect wrapper (x/y/w/h of an update region).
    - ImTextureData wrapper exposing the struct fields (status, format, size,
      pixels, texID, update rects, ...) and binding through the C++ SetStatus/
      SetTexID/Create/DestroyPixels methods. getPixels() returns a direct
      ByteBuffer over the native pixel buffer (no copy).
    
    These are the core-library/backend-facing types; end-user application code
    does not need them. Follow-up commits expose the per-frame texture lists and
    wire the LWJGL GL3 backend.
    
    Co-authored-by: Claude <[email protected]>
    claude authored and Igrium committed Jul 23, 2026
    Configuration menu
    Copy the full SHA
    564dd56 View commit details
    Browse the repository at this point in the history
  2. feat(api): expose per-frame texture lists for renderer backends

    Add the accessors a renderer backend needs to honor texture requests each
    frame:
    
    - ImDrawData.getTexturesSize()/getTextures(idx) over ImDrawData::Textures
      (may be NULL when texture updates are disabled).
    - ImGuiPlatformIO.getTexturesSize()/getTextures(idx) over the platform IO
      texture list, plus Renderer_TextureMaxWidth/Height getters and setters so
      the backend can advertise its maximum texture size.
    
    Co-authored-by: Claude <[email protected]>
    claude authored and Igrium committed Jul 23, 2026
    Configuration menu
    Copy the full SHA
    26fe769 View commit details
    Browse the repository at this point in the history
  3. feat(api): drive ImTextureData texture updates in the GL3 backend

    Wire ImGuiImplGl3 to Dear ImGui 1.92's texture-management system and enable
    ImGuiBackendFlags_RendererHasTextures end-to-end:
    
    - init(): advertise RendererHasTextures and publish the GL max texture size
      via ImGuiPlatformIO.Renderer_TextureMaxWidth/Height; shutdown() clears the
      flag.
    - renderDrawData(): before drawing, iterate ImDrawData's texture list and
      reconcile every non-OK ImTextureData with the GPU.
    - updateTexture()/destroyTexture(): create (glTexImage2D from the texture's
      pixel buffer), incrementally update (glTexSubImage2D over UpdateRect
      blocks using UNPACK_ROW_LENGTH) and destroy GL textures, reporting the new
      TexID/status back through the C++ SetTexID/SetStatus methods.
    - createDeviceObjects()/newFrame() no longer eagerly build the font texture;
      destroyDeviceObjects() frees every owned texture (RefCount == 1).
    
    The legacy createFontsTexture()/destroyFontsTexture() methods are kept and
    deprecated for source compatibility, but are no longer part of the frame
    loop.
    
    Co-authored-by: Claude <[email protected]>
    claude authored and Igrium committed Jul 23, 2026
    Configuration menu
    Copy the full SHA
    5647685 View commit details
    Browse the repository at this point in the history
  4. feat(api): demonstrate texture management in the example app

    Add a "Texture Management" section to the example that reads the live
    ImTextureData list the GL3 backend now maintains
    (ImGuiBackendFlags_RendererHasTextures): it reports the backend flag state,
    lists each managed texture's id/size/format/status/texID, and renders the
    uploaded font-atlas texture inline via ImGui.image().
    
    Co-authored-by: Claude <[email protected]>
    claude authored and Igrium committed Jul 23, 2026
    Configuration menu
    Copy the full SHA
    8473969 View commit details
    Browse the repository at this point in the history
  5. chore(build): update linux native with ImTextureData JNI symbols

    Rebuild bin/libimgui-java64.so (linux64) so the new ImTextureData /
    ImTextureRect / ImDrawData / ImGuiPlatformIO native methods resolve at
    runtime; without this the branch throws UnsatisfiedLinkError against the
    stale prebuilt library.
    
    NOTE: only the linux64 native is refreshed here — the macOS/Windows natives
    in bin/ still predate these JNI methods and will be regenerated by CI's
    post-merge native build.
    
    Co-authored-by: Claude <[email protected]>
    claude authored and Igrium committed Jul 23, 2026
    Configuration menu
    Copy the full SHA
    f7ab47a View commit details
    Browse the repository at this point in the history
  6. fix(example): don't call ImFontAtlas.build() under RendererHasTexture…

    …s backend
    
    With the 1.92 texture-management backend the font atlas is baked lazily by
    the renderer. Calling build() explicitly sets PreloadedAllGlyphsRanges and
    trips the 'you don't need to call Build()' assertion in ImFontAtlasUpdateNewFrame,
    after which NewFrame proceeds with an inconsistent atlas and the render path
    crashes.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01Jj7rjyyfxUigrtxA4fMRKf
    claude authored and Igrium committed Jul 23, 2026
    Configuration menu
    Copy the full SHA
    5e003ff View commit details
    Browse the repository at this point in the history
  7. fix(gl3): save/restore GL_UNPACK state in updateTexture to match upst…

    …ream
    
    Compared updateTexture against the current imgui_impl_opengl3.cpp
    ImGui_ImplOpenGL3_UpdateTexture. Upstream backs up GL_UNPACK_ROW_LENGTH and
    GL_UNPACK_ALIGNMENT on entry and restores them on exit; the port previously
    set them without restoring, breaking the backend's back-up/restore-all-GL-state
    contract for hosts with non-default unpack state. Mirror upstream exactly:
    save both, set ALIGNMENT=1, set ROW_LENGTH=0 in WantCreate / =width in
    WantUpdates, then restore both.
    
    Co-Authored-By: Claude Opus 4.8 <[email protected]>
    Claude-Session: https://claude.ai/code/session_01Jj7rjyyfxUigrtxA4fMRKf
    claude authored and Igrium committed Jul 23, 2026
    Configuration menu
    Copy the full SHA
    1c9d7b8 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d278f3b View commit details
    Browse the repository at this point in the history
  9. forgot to regenerate api again

    Igrium committed Jul 23, 2026
    Configuration menu
    Copy the full SHA
    89f0a30 View commit details
    Browse the repository at this point in the history
Loading