added support for not POT-sized textures