Issue #542 resolved

Texture filtering inconsistencies

Alex 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