Skip to content

Add bilinear filtering option and integrate with Defaults reset - #132

Open
rgdilisio wants to merge 5 commits into
OpenFodder:multifrom
rgdilisio:feature/bilinearFiltering
Open

rgdilisio wants to merge 5 commits into
OpenFodder:multifrom
rgdilisio:feature/bilinearFiltering

Conversation

@rgdilisio

@rgdilisio rgdilisio commented Sep 13, 2026 •

Copy link
Copy Markdown

This PR introduces bilinear filtering for textures in OpenFodder using SDL_SetTextureScaleMode() (SDL v3)

  • Bilinear Filtering toggle is applied during cWindow:RenderAt() and cWindow:RenderShrunk()
  • Added --bilinear for CLI processing
  • Added toggle in Options menu
  • Integrated with Save Ini and Defaults reset (resets to nearest which acts as bilinear=OFF )
  • Integrated bilinear=false/true option within openfodder.ini

Tested locally on Bazzite using a Fedora toolbox with SDL3 build, works as expected.
Happy to make changes and adjustments as needed!

Bilinear OFF
OpenFodder_Bilinear_OFF

Bilinear ON
OpenFodder_Bilinear_ON

--bilinear in CLI params
OpenFodder_CLI

@segrax

segrax commented Sep 15, 2026

Copy link
Copy Markdown
Member

Thanks!

Can you do me one favor, just remove the
// Bilinear filtering

comments from before/after the changes

@rgdilisio

Copy link
Copy Markdown
Author

Thanks!

Can you do me one favor, just remove the // Bilinear filtering

comments from before/after the changes

Done, thank you Sir!

@rgdilisio

Copy link
Copy Markdown
Author

Added F10 as hotkey to toggle bilinear filtering on the fly (similar as F11 for toggle window mode)

@segrax

segrax commented Sep 20, 2026 •

Copy link
Copy Markdown
Member

Added F10 as hotkey to toggle bilinear filtering on the fly (similar as F11 for toggle window mode)

F10 is already one of the cheat keys 😆
im planning on adding an F key to bring up the options menu soon, but im currently in the process of making a rather large change in the 'multi' branch which is due to merge any day now...

so i'll merge the other change, but we need to fix the F key overlap, but if you want.. you could do the options menu popup (although i recommend working from the multi branch.. it kinda got carried away.... alot of stuff is changing)

@rgdilisio

rgdilisio commented Sep 21, 2026 •

Copy link
Copy Markdown
Author

Added F10 as hotkey to toggle bilinear filtering on the fly (similar as F11 for toggle window mode)

F10 is already one of the cheat keys 😆 im planning on adding an F key to bring up the options menu soon, but im currently in the process of making a rather large change in the 'multi' branch which is due to merge any day now...

so i'll merge the other change, but we need to fix the F key overlap, but if you want.. you could do the options menu popup (although i recommend working from the multi branch.. it kinda got carried away.... alot of stuff is changing)

My bad, it worked great for me since I do not use cheats but yeah I've noticed it by reading the Readme.md :p

Sure thing I can remap to F8 (if available). I'll promise I'll do a find in all files this time :)

Just to confirm do you want me to rebase this PR to multi branch after fixing the F key?

I'll give it a try to add an F hotkey for the options menu too but not sure if I can get these 2 things together

@segrax

segrax commented Sep 21, 2026

Copy link
Copy Markdown
Member

My bad, it worked great for me since I do not use cheats but yeah I've noticed it by reading the Readme.md :p

😆 me either, they where meant for debugging.. but have been in so long now that i cant really remove them (altho the dos version did have cheat codes too, they where actually a pain to enable)

Just to confirm do you want me to rebase this PR to multi branch after fixing the F key?

yeah probably the easiest option, im planning to merge it hopefully by late next week, pretty busy atm

@rgdilisio
rgdilisio force-pushed the feature/bilinearFiltering branch from d2f773a to 32b3520 Compare September 21, 2026 22:29
@rgdilisio
rgdilisio changed the base branch from master to multi September 21, 2026 22:30
@rgdilisio

rgdilisio commented Sep 21, 2026 •

Copy link
Copy Markdown
Author

My bad, it worked great for me since I do not use cheats but yeah I've noticed it by reading the Readme.md :p

😆 me either, they where meant for debugging.. but have been in so long now that i cant really remove them (altho the dos version did have cheat codes too, they where actually a pain to enable)

Just to confirm do you want me to rebase this PR to multi branch after fixing the F key?

yeah probably the easiest option, im planning to merge it hopefully by late next week, pretty busy atm

No worries Sir! I've done the rebase and recompiled over here (I'm on bazzite using toolbox).
It works with some flaws such as now no openfodder.ini seems to be saved and new Keys option within Select Campaign goes blank when chosen and hitting ESC quickly shows something to end up in a Segmentation Fault :(

I will take a closer look later this week to see what I can find out

This branch has not been deployed

No deployments
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