Not related to this pull request, but I think we should change this to nested y,x loops, thus skipping the difference between texturewidth and bufw each line.