Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for HD textures when loading textures for the GUI #334

Merged
merged 1 commit into from
Aug 6, 2023

Conversation

Archez
Copy link
Contributor

@Archez Archez commented Jul 30, 2023

We had simple support for loading certain types of textures into ImGui directly to be able to render them for things like the item tracker/save editor. There was different logic for loading an rgba image vs a greyscale image.

However with HD textures, all images are in the rbga32 format (even greyscale images).

This makes it so we check the resource's flags to see if we should treat it as "raw" and load the texture data differently. For HD textures, the raw buffer is loaded similarly to how it is done in gfx_pp.cpp, albeit with less of the safety/size checking (I'm not sure how much of that needs to be done here).

Tested with the OoT reloaded HD texture pack and confirmed that greyscale images like the song note textures are now rendering correctly.

@Kenix3 Kenix3 merged commit 507a2c4 into Kenix3:main Aug 6, 2023
4 checks passed
@Archez Archez deleted the support-hd-textures-imgui-load branch August 8, 2023 21:24
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