Power of 2 syndrome fix incorporated in the engine

Issue #171 resolved
Anonymous created an issue

I just found in the wiki page for ImageData http://love2d.org/wiki/ImageData a lua code which fixes the power of 2 syndrome that occurs in graphics cards. I think it would be better if this was inside the engine itself, i.e. all loaded images are automatically converted to a power of two dimension, so designers need not to worry about it.

Comments (2)

  1. Anders Ruud repo owner

    LÖVE actually used to do this, but it was removed in some version (I forget which).

    It was removed because it meant a lot of unnecessary texture coordinate calculations, which made things slower, but more importantly, it meant more complicated code which was a lot harder to maintain. With more and more components using textures and sub-textures (SpriteBatch, Frame), it became increasingly complicated to deal with the textures that were automatically converted to pow2, and at the same time hiding the true pow2 size from the user.

  2. Log in to comment