Issue #542 resolved

Texture filtering inconsistencies

Alex Szpakowski avatarAlex Szpakowski created an issue

As noted in issue #422 and issue #525, there are some inconsistencies in the way texture filtering is applied: font textures don't have get/setFilter methods, the default image filter doesn't affect canvases, and (not reported in the issue tracker), canvas:setFilter's second argument doesn't default to its first like and image:setFilter do.

Additionally, there is a lot of internal code duplication in LÖVE wherever set/getFilter and set/getWrap are involved, and the default image filter variable is contained within the OpenGL-specific subclass of the Image class, rather than the base Image class where I believe it should belong.

I have created a patch which fixes these issues: canvases are affected by the default image filter and canvas:setFilter is consistent with the rest of the Filter API, font objects have get/setFilter methods, the default Filter variable resides in the base Image class, and there is much less code duplication around Filter and Wrap mode getter/setters.

The patch is attached below.

Comments (2)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.