Skip to content

fix nifty to support non rgba images in non-gles backends#2842

Open
riccardobl wants to merge 2 commits into
jMonkeyEngine:masterfrom
riccardobl:niftyfix
Open

fix nifty to support non rgba images in non-gles backends#2842
riccardobl wants to merge 2 commits into
jMonkeyEngine:masterfrom
riccardobl:niftyfix

Conversation

@riccardobl
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the GLES-specific platform check in JmeBatchRenderBackend.loadImage, causing the RGBA8 conversion logic to run unconditionally on all platforms when the texture format is not Format.RGBA8. The reviewer correctly identified that this can lead to runtime crashes (UnsupportedOperationException) when loading compressed textures (like DXT or ETC) because ImageRaster does not support them, and suggested adding a check using ImageRaster.isSupported to prevent this issue.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread jme3-niftygui/src/main/java/com/jme3/niftygui/JmeBatchRenderBackend.java Outdated
…ckend.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

🖼️ Screenshot tests have failed.

The purpose of these tests is to ensure that changes introduced in this PR don't break visual features. They are visual unit tests.

📄 Where to find the report:

⚠️ If you didn't expect to change anything visual:
Fix your changes so the screenshot tests pass.

If you did mean to change things:
Review the replacement images in jme3-screenshot-tests/build/changed-images to make sure they really are improvements and then replace and commit the replacement images at jme3-screenshot-tests/src/test/resources.

If you are creating entirely new tests:
Find the new images in jme3-screenshot-tests/build/changed-images and commit the new images at jme3-screenshot-tests/src/test/resources.

Note; it is very important that the committed reference images are created on the build pipeline, locally created images are not reliable. Similarly tests will fail locally but you can look at the report to check they are "visually similar".

See https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-screenshot-tests/README.md for more information

Contact @richardTingle (aka richtea) for guidance if required

@riccardobl riccardobl added this to the v3.10.0 milestone Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant