Use int for texture size, otherwise it'd never equal to the actual texture size. 

Fixes #2215.