Aleph-One-Marathon / alephone

Aleph One is the open source continuation of Bungie’s Marathon 2 game engine.
https://alephone.lhowon.org/
GNU General Public License v3.0
621 stars 100 forks source link

ogl: properly respect filter preference when drawing hud #495

Closed celesteisabel closed 1 week ago

celesteisabel commented 1 month ago

The OpenGL renderer doesn't respect the HUD filtering preference properly. Fix works for Lua and default HUDs, tested on the M1 and M2 scenarios. Affects terminal text but not graphics. Needs more testing and tweaking, currently makes TxtrTypeInfoList and TxtrTypeInfoData public to access the filter values, and adds filter parameters to OGL_Blitter, FontSpecifier and others.

treellama commented 1 month ago

I'd like to see these have a separate setting for at least Weapons-in-hand vs HUD. Maybe settings for terminals/main menu as well.

Is something like that something you're interested in modifying the PR for? You can use a global boolean and we can handle the preferences dialogs/file if that makes it easier for you.

celesteisabel commented 1 month ago

I was thinking that as well, I'm down to do that. I'm going to try to do the preference code myself. Quick question: since we're exporting TxtrTypeInfo{List,Data}, might it make more sense to put the definitions in OGL_Setup since that's also where the texture types are defined?

celesteisabel commented 4 weeks ago

note: the "Default Preferences.xml" file will have to be edited to include the new texture type (index 4). The near filter should be set to 1 (linear) for consistency and appearance; HUD text looks odd with nearest filter when the resolution is not an integer multiple of 640x480.

treellama commented 1 week ago

This looks good! Can you change HUD to HUD/Terminals, and update your branch to master so we can run the update workflows? I'll probably squash this merge, so if you want to resubmit it squashed then you'll get the top commit.