Skip to content

Remove NPOT texture check in DJUI#1329

Open
eros71-dev wants to merge 1 commit into
coop-deluxe:devfrom
eros71-dev:dev
Open

Remove NPOT texture check in DJUI#1329
eros71-dev wants to merge 1 commit into
coop-deluxe:devfrom
eros71-dev:dev

Conversation

@eros71-dev

Copy link
Copy Markdown
Contributor

Doesn't seem to crash anymore, not needed, tested and NPOT textures work under both renderers (OpenGL and DX11)

Doesn't seem to crash anymore, not needed, tested and NPOT textures work under both renderers (OpenGL and DX11)
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9499d5c1-757e-489f-9603-35632c3c4297

📥 Commits

Reviewing files that changed from the base of the PR and between 63660e5 and 73a91ac.

📒 Files selected for processing (1)
  • src/pc/djui/djui_hud_utils.c
💤 Files with no reviewable changes (1)
  • src/pc/djui/djui_hud_utils.c

📝 Walkthrough

Walkthrough

In djui_hud_render_texture_raw (src/pc/djui/djui_hud_utils.c), the five-line block that checked whether width and height were powers of two—logging a warning via LOG_LUA_LINE and returning early if they were not—has been deleted. The function now only guards against a NULL texture pointer and otherwise proceeds unconditionally with texture rendering, accepting non-power-of-two dimensions.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: removing the NPOT texture check in DJUI.
Description check ✅ Passed The description is directly related to the change and explains why the NPOT check was removed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@xLuigiGamerx xLuigiGamerx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's not just about whether it crashes or not, the engine just doesn't handle NPOT well, did you confirm that functions like djui_hud_render_texture_tile work correctly with it and with NPOT tilewidths and tileheights ans such

@eros71-dev

Copy link
Copy Markdown
Contributor Author

It's not just about whether it crashes or not, the engine just doesn't handle NPOT well, did you confirm that functions like djui_hud_render_texture_tile work correctly with it and with NPOT tilewidths and tileheights ans such

You're right, let me check that

@eros71-dev

Copy link
Copy Markdown
Contributor Author
2026-06-24.18-41-27.mp4
2026-06-24.18-59-29.mp4

A couple of examples of the interpolation and rendering functions working with NPOT textures, 201x212 for the FNAF logo and 200x200 for the heart icon. Works in tiled and regular textures, interpolated or not. @AgentXLP helped me out with the heart test since the other one was a bit hard to see and I wanted to make sure I was doing it right as well as checking with other setups.

Should be good to go now and merge, but feel free to test under another OS maybe just in case.

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.

2 participants