Correct a bug with non power of 2 textures
Fix lhint warnings